/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 3.0.8
 *
 * This file is not intended to be easily readable and contains a number of
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG
 * interface file instead.
 * ----------------------------------------------------------------------------- */


#ifndef SWIGPYTHON
#define SWIGPYTHON
#define SED_HACKS
#endif

#define SWIG_PYTHON_THREADS
#define SWIG_PYTHON_DIRECTOR_NO_VTABLE


#ifdef __cplusplus
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
  struct SwigMovePointer {
    T *ptr;
    SwigMovePointer(T *p) : ptr(p) { }
    ~SwigMovePointer() { delete ptr; }
    SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
  } pointer;
  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
  SwigValueWrapper() : pointer(0) { }
  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
  operator T&() const { return *pointer.ptr; }
  T *operator&() { return pointer.ptr; }
};

template <typename T> T SwigValueInit() {
  return T();
}
#endif

/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#  define SWIGTEMPLATEDISAMBIGUATOR template
# elif defined(__HP_aCC)
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
#  define SWIGTEMPLATEDISAMBIGUATOR template
# else
#  define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__))
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__))
# else
#   define SWIGUNUSED
# endif
#endif

#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
# endif
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#  ifndef GCC_HASCLASSVISIBILITY
#    define GCC_HASCLASSVISIBILITY
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif

/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
#endif

/* Intel's compiler complains if a variable which was never initialised is
 * cast to void, which is a common idiom which we use to indicate that we
 * are aware a variable isn't used.  So we just silence that warning.
 * See: https://github.com/swig/swig/issues/192 for more discussion.
 */
#ifdef __INTEL_COMPILER
# pragma warning disable 592
#endif


#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
/* Use debug wrappers with the Python release dll */
# undef _DEBUG
# include <Python.h>
# define _DEBUG
#else
# include <Python.h>
#endif

/* -----------------------------------------------------------------------------
 * swigrun.swg
 *
 * This file contains generic C API SWIG runtime support for pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

/* This should only be incremented when either the layout of swig_type_info changes,
   or for whatever reason, the runtime changes incompatibly */
#define SWIG_RUNTIME_VERSION "4"

/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
# define SWIG_QUOTE_STRING(x) #x
# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
#else
# define SWIG_TYPE_TABLE_NAME
#endif

/*
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  creating a static or dynamic library from the SWIG runtime code.
  In 99.9% of the cases, SWIG just needs to declare them as 'static'.

  But only do this if strictly necessary, ie, if you have problems
  with your compiler or suchlike.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

/*  Generic buffer size */
#ifndef SWIG_BUFFER_SIZE
# define SWIG_BUFFER_SIZE 1024
#endif

/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN        0x1
#define SWIG_CAST_NEW_MEMORY       0x2

/* Flags for new pointer objects */
#define SWIG_POINTER_OWN           0x1


/*
   Flags/methods for returning states.

   The SWIG conversion methods, as ConvertPtr, return an integer
   that tells if the conversion was successful or not. And if not,
   an error code can be returned (see swigerrors.swg for the codes).

   Use the following macros/flags to set or process the returning
   states.

   In old versions of SWIG, code such as the following was usually written:

     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
       // success code
     } else {
       //fail code
     }

   Now you can be more explicit:

    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
    } else {
      // fail code
    }

   which is the same really, but now you can also do

    Type *ptr;
    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
      if (SWIG_IsNewObj(res) {
        ...
	delete *ptr;
      } else {
        ...
      }
    } else {
      // fail code
    }

   I.e., now SWIG_ConvertPtr can return new objects and you can
   identify the case and take care of the deallocation. Of course that
   also requires SWIG_ConvertPtr to return new result values, such as

      int SWIG_ConvertPtr(obj, ptr,...) {
        if (<obj is ok>) {
          if (<need new object>) {
            *ptr = <ptr to new allocated object>;
            return SWIG_NEWOBJ;
          } else {
            *ptr = <ptr to old object>;
            return SWIG_OLDOBJ;
          }
        } else {
          return SWIG_BADOBJ;
        }
      }

   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
   SWIG errors code.

   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
   allows to return the 'cast rank', for example, if you have this

       int food(double)
       int fooi(int);

   and you call

      food(1)   // cast rank '1'  (1 -> 1.0)
      fooi(1)   // cast rank '0'

   just use the SWIG_AddCast()/SWIG_CheckState()
*/

#define SWIG_OK                    (0)
#define SWIG_ERROR                 (-1)
#define SWIG_IsOK(r)               (r >= 0)
#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)

/* The CastRankLimit says how many bits are used for the cast rank */
#define SWIG_CASTRANKLIMIT         (1 << 8)
/* The NewMask denotes the object was created (using new/malloc) */
#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
/* The TmpMask is for in/out typemaps that use temporal objects */
#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
/* Simple returning values */
#define SWIG_BADOBJ                (SWIG_ERROR)
#define SWIG_OLDOBJ                (SWIG_OK)
#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
/* Check, add and del mask methods */
#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))

/* Cast-Rank Mode */
#if defined(SWIG_CASTRANK_MODE)
#  ifndef SWIG_TypeRank
#    define SWIG_TypeRank             unsigned long
#  endif
#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
#    define SWIG_MAXCASTRANK          (2)
#  endif
#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
SWIGINTERNINLINE int SWIG_AddCast(int r) {
  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
}
SWIGINTERNINLINE int SWIG_CheckState(int r) {
  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
}
#else /* no cast-rank mode */
#  define SWIG_AddCast(r) (r)
#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);

/* Structure to store information on one type */
typedef struct swig_type_info {
  const char             *name;			/* mangled name of this type */
  const char             *str;			/* human readable name of this type */
  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
  void                   *clientdata;		/* language specific type data */
  int                    owndata;		/* flag if the structure owns the clientdata */
} swig_type_info;

/* Structure to store a type and conversion function used for casting */
typedef struct swig_cast_info {
  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
  swig_converter_func     converter;		/* function to cast the void pointers */
  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
  struct swig_cast_info  *prev;			/* pointer to the previous cast */
} swig_cast_info;

/* Structure used to store module information
 * Each module generates one structure like this, and the runtime collects
 * all of these structures and stores them in a circularly linked list.*/
typedef struct swig_module_info {
  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
  size_t                 size;		        /* Number of types in this module */
  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
  swig_type_info         **type_initial;	/* Array of initially generated type structures */
  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
  void                    *clientdata;		/* Language specific module data */
} swig_module_info;

/*
  Compare two type names skipping the space characters, therefore
  "char*" == "char *" and "Class<int>" == "Class<int >", etc.

  Return 0 when the two name types are equivalent, as in
  strncmp, but skipping ' '.
*/
SWIGRUNTIME int
SWIG_TypeNameComp(const char *f1, const char *l1,
		  const char *f2, const char *l2) {
  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
    while ((*f1 == ' ') && (f1 != l1)) ++f1;
    while ((*f2 == ' ') && (f2 != l2)) ++f2;
    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  }
  return (int)((l1 - f1) - (l2 - f2));
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/
SWIGRUNTIME int
SWIG_TypeCmp(const char *nb, const char *tb) {
  int equiv = 1;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (equiv != 0 && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = SWIG_TypeNameComp(nb, ne, tb, te);
    if (*ne) ++ne;
  }
  return equiv;
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if not equal, 1 if equal
*/
SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) {
  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
}

/*
  Check the typename
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (strcmp(iter->type->name, c) == 0) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->next;
    }
  }
  return 0;
}

/*
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (iter->type == from) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->next;
    }
  }
  return 0;
}

/*
  Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}

/*
   Dynamic pointer casting. Down an inheritance hierarchy
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  swig_type_info *lastty = ty;
  if (!ty || !ty->dcast) return ty;
  while (ty && (ty->dcast)) {
    ty = (*ty->dcast)(ptr);
    if (ty) lastty = ty;
  }
  return lastty;
}

/*
  Return the name associated with this type
*/
SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info *ty) {
  return ty->name;
}

/*
  Return the pretty name associated with this type,
  that is an unmangled type name in a form presentable to the user.
*/
SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info *type) {
  /* The "str" field contains the equivalent pretty names of the
     type, separated by vertical-bar characters.  We choose
     to print the last name, as it is often (?) the most
     specific. */
  if (!type) return NULL;
  if (type->str != NULL) {
    const char *last_name = type->str;
    const char *s;
    for (s = type->str; *s; s++)
      if (*s == '|') last_name = s+1;
    return last_name;
  }
  else
    return type->name;
}

/*
   Set the clientdata field for a type
*/
SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  swig_cast_info *cast = ti->cast;
  /* if (ti->clientdata == clientdata) return; */
  ti->clientdata = clientdata;

  while (cast) {
    if (!cast->converter) {
      swig_type_info *tc = cast->type;
      if (!tc->clientdata) {
	SWIG_TypeClientData(tc, clientdata);
      }
    }
    cast = cast->next;
  }
}
SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  SWIG_TypeClientData(ti, clientdata);
  ti->owndata = 1;
}

/*
  Search for a swig_type_info structure only by mangled name
  Search is a O(log #types)

  We start searching at module start, and finish searching when start == end.
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info *start,
                            swig_module_info *end,
		            const char *name) {
  swig_module_info *iter = start;
  do {
    if (iter->size) {
      size_t l = 0;
      size_t r = iter->size - 1;
      do {
	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
	size_t i = (l + r) >> 1;
	const char *iname = iter->types[i]->name;
	if (iname) {
	  int compare = strcmp(name, iname);
	  if (compare == 0) {
	    return iter->types[i];
	  } else if (compare < 0) {
	    if (i) {
	      r = i - 1;
	    } else {
	      break;
	    }
	  } else if (compare > 0) {
	    l = i + 1;
	  }
	} else {
	  break; /* should never happen */
	}
      } while (l <= r);
    }
    iter = iter->next;
  } while (iter != end);
  return 0;
}

/*
  Search for a swig_type_info structure for either a mangled name or a human readable name.
  It first searches the mangled names of the types, which is a O(log #types)
  If a type is not found it then searches the human readable names, which is O(#types).

  We start searching at module start, and finish searching when start == end.
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info *start,
                     swig_module_info *end,
		     const char *name) {
  /* STEP 1: Search the name field using binary search */
  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  if (ret) {
    return ret;
  } else {
    /* STEP 2: If the type hasn't been found, do a complete search
       of the str field (the human readable name) */
    swig_module_info *iter = start;
    do {
      size_t i = 0;
      for (; i < iter->size; ++i) {
	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
	  return iter->types[i];
      }
      iter = iter->next;
    } while (iter != end);
  }

  /* neither found a match */
  return 0;
}

/*
   Pack binary data into a string
*/
SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
  static const char hex[17] = "0123456789abcdef";
  const unsigned char *u = (unsigned char *) ptr;
  const unsigned char *eu =  u + sz;
  for (; u != eu; ++u) {
    unsigned char uu = *u;
    *(c++) = hex[(uu & 0xf0) >> 4];
    *(c++) = hex[uu & 0xf];
  }
  return c;
}

/*
   Unpack binary data from a string
*/
SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  unsigned char *u = (unsigned char *) ptr;
  const unsigned char *eu = u + sz;
  for (; u != eu; ++u) {
    char d = *(c++);
    unsigned char uu;
    if ((d >= '0') && (d <= '9'))
      uu = ((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = ((d - ('a'-10)) << 4);
    else
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (d - ('a'-10));
    else
      return (char *) 0;
    *u = uu;
  }
  return c;
}

/*
   Pack 'void *' into a string buffer.
*/
SWIGRUNTIME char *
SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  char *r = buff;
  if ((2*sizeof(void *) + 2) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,&ptr,sizeof(void *));
  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  strcpy(r,name);
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      *ptr = (void *) 0;
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sizeof(void *));
}

SWIGRUNTIME char *
SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  char *r = buff;
  size_t lname = (name ? strlen(name) : 0);
  if ((2*sz + 2 + lname) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,ptr,sz);
  if (lname) {
    strncpy(r,name,lname+1);
  } else {
    *r = 0;
  }
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      memset(ptr,0,sz);
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sz);
}

#ifdef __cplusplus
}
#endif

/*  Errors in SWIG */
#define  SWIG_UnknownError    	   -1
#define  SWIG_IOError        	   -2
#define  SWIG_RuntimeError   	   -3
#define  SWIG_IndexError     	   -4
#define  SWIG_TypeError      	   -5
#define  SWIG_DivisionByZero 	   -6
#define  SWIG_OverflowError  	   -7
#define  SWIG_SyntaxError    	   -8
#define  SWIG_ValueError     	   -9
#define  SWIG_SystemError    	   -10
#define  SWIG_AttributeError 	   -11
#define  SWIG_MemoryError    	   -12
#define  SWIG_NullReferenceError   -13



/* Compatibility macros for Python 3 */
#if PY_VERSION_HEX >= 0x03000000

#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
#define PyInt_Check(x) PyLong_Check(x)
#define PyInt_AsLong(x) PyLong_AsLong(x)
#define PyInt_FromLong(x) PyLong_FromLong(x)
#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
#define PyString_Check(name) PyBytes_Check(name)
#define PyString_FromString(x) PyUnicode_FromString(x)
#define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
#define PyString_AsString(str) PyBytes_AsString(str)
#define PyString_Size(str) PyBytes_Size(str)	
#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)

#endif

#ifndef Py_TYPE
#  define Py_TYPE(op) ((op)->ob_type)
#endif

/* SWIG APIs for compatibility of both Python 2 & 3 */

#if PY_VERSION_HEX >= 0x03000000
#  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
#else
#  define SWIG_Python_str_FromFormat PyString_FromFormat
#endif


/* Warning: This function will allocate a new string in Python 3,
 * so please call SWIG_Python_str_DelForPy3(x) to free the space.
 */
SWIGINTERN char*
SWIG_Python_str_AsChar(PyObject *str)
{
#if PY_VERSION_HEX >= 0x03000000
  char *cstr;
  char *newstr;
  Py_ssize_t len;
  str = PyUnicode_AsUTF8String(str);
  PyBytes_AsStringAndSize(str, &cstr, &len);
  newstr = (char *) malloc(len+1);
  memcpy(newstr, cstr, len+1);
  Py_XDECREF(str);
  return newstr;
#else
  return PyString_AsString(str);
#endif
}

#if PY_VERSION_HEX >= 0x03000000
#  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
#else
#  define SWIG_Python_str_DelForPy3(x) 
#endif


SWIGINTERN PyObject*
SWIG_Python_str_FromChar(const char *c)
{
#if PY_VERSION_HEX >= 0x03000000
  return PyUnicode_FromString(c); 
#else
  return PyString_FromString(c);
#endif
}

/* Add PyOS_snprintf for old Pythons */
#if PY_VERSION_HEX < 0x02020000
# if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
#  define PyOS_snprintf _snprintf
# else
#  define PyOS_snprintf snprintf
# endif
#endif

/* A crude PyString_FromFormat implementation for old Pythons */
#if PY_VERSION_HEX < 0x02020000

#ifndef SWIG_PYBUFFER_SIZE
# define SWIG_PYBUFFER_SIZE 1024
#endif

static PyObject *
PyString_FromFormat(const char *fmt, ...) {
  va_list ap;
  char buf[SWIG_PYBUFFER_SIZE * 2];
  int res;
  va_start(ap, fmt);
  res = vsnprintf(buf, sizeof(buf), fmt, ap);
  va_end(ap);
  return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
}
#endif

/* Add PyObject_Del for old Pythons */
#if PY_VERSION_HEX < 0x01060000
# define PyObject_Del(op) PyMem_DEL((op))
#endif
#ifndef PyObject_DEL
# define PyObject_DEL PyObject_Del
#endif

/* A crude PyExc_StopIteration exception for old Pythons */
#if PY_VERSION_HEX < 0x02020000
# ifndef PyExc_StopIteration
#  define PyExc_StopIteration PyExc_RuntimeError
# endif
# ifndef PyObject_GenericGetAttr
#  define PyObject_GenericGetAttr 0
# endif
#endif

/* Py_NotImplemented is defined in 2.1 and up. */
#if PY_VERSION_HEX < 0x02010000
# ifndef Py_NotImplemented
#  define Py_NotImplemented PyExc_RuntimeError
# endif
#endif

/* A crude PyString_AsStringAndSize implementation for old Pythons */
#if PY_VERSION_HEX < 0x02010000
# ifndef PyString_AsStringAndSize
#  define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
# endif
#endif

/* PySequence_Size for old Pythons */
#if PY_VERSION_HEX < 0x02000000
# ifndef PySequence_Size
#  define PySequence_Size PySequence_Length
# endif
#endif

/* PyBool_FromLong for old Pythons */
#if PY_VERSION_HEX < 0x02030000
static
PyObject *PyBool_FromLong(long ok)
{
  PyObject *result = ok ? Py_True : Py_False;
  Py_INCREF(result);
  return result;
}
#endif

/* Py_ssize_t for old Pythons */
/* This code is as recommended by: */
/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef int Py_ssize_t;
# define PY_SSIZE_T_MAX INT_MAX
# define PY_SSIZE_T_MIN INT_MIN
typedef inquiry lenfunc;
typedef intargfunc ssizeargfunc;
typedef intintargfunc ssizessizeargfunc;
typedef intobjargproc ssizeobjargproc;
typedef intintobjargproc ssizessizeobjargproc;
typedef getreadbufferproc readbufferproc;
typedef getwritebufferproc writebufferproc;
typedef getsegcountproc segcountproc;
typedef getcharbufferproc charbufferproc;
static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
{
  long result = 0;
  PyObject *i = PyNumber_Int(x);
  if (i) {
    result = PyInt_AsLong(i);
    Py_DECREF(i);
  }
  return result;
}
#endif

#if PY_VERSION_HEX < 0x02050000
#define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
#endif

#if PY_VERSION_HEX < 0x02040000
#define Py_VISIT(op)				\
  do { 						\
    if (op) {					\
      int vret = visit((op), arg);		\
      if (vret)					\
        return vret;				\
    }						\
  } while (0)
#endif

#if PY_VERSION_HEX < 0x02030000
typedef struct {
  PyTypeObject type;
  PyNumberMethods as_number;
  PyMappingMethods as_mapping;
  PySequenceMethods as_sequence;
  PyBufferProcs as_buffer;
  PyObject *name, *slots;
} PyHeapTypeObject;
#endif

#if PY_VERSION_HEX < 0x02030000
typedef destructor freefunc;
#endif

#if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
     (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
     (PY_MAJOR_VERSION > 3))
# define SWIGPY_USE_CAPSULE
# define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
#endif

#if PY_VERSION_HEX < 0x03020000
#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
#endif

/* -----------------------------------------------------------------------------
 * error manipulation
 * ----------------------------------------------------------------------------- */

SWIGRUNTIME PyObject*
SWIG_Python_ErrorType(int code) {
  PyObject* type = 0;
  switch(code) {
  case SWIG_MemoryError:
    type = PyExc_MemoryError;
    break;
  case SWIG_IOError:
    type = PyExc_IOError;
    break;
  case SWIG_RuntimeError:
    type = PyExc_RuntimeError;
    break;
  case SWIG_IndexError:
    type = PyExc_IndexError;
    break;
  case SWIG_TypeError:
    type = PyExc_TypeError;
    break;
  case SWIG_DivisionByZero:
    type = PyExc_ZeroDivisionError;
    break;
  case SWIG_OverflowError:
    type = PyExc_OverflowError;
    break;
  case SWIG_SyntaxError:
    type = PyExc_SyntaxError;
    break;
  case SWIG_ValueError:
    type = PyExc_ValueError;
    break;
  case SWIG_SystemError:
    type = PyExc_SystemError;
    break;
  case SWIG_AttributeError:
    type = PyExc_AttributeError;
    break;
  default:
    type = PyExc_RuntimeError;
  }
  return type;
}


SWIGRUNTIME void
SWIG_Python_AddErrorMsg(const char* mesg)
{
  PyObject *type = 0;
  PyObject *value = 0;
  PyObject *traceback = 0;

  if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
  if (value) {
    char *tmp;
    PyObject *old_str = PyObject_Str(value);
    PyErr_Clear();
    Py_XINCREF(type);

    PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
    SWIG_Python_str_DelForPy3(tmp);
    Py_DECREF(old_str);
    Py_DECREF(value);
  } else {
    PyErr_SetString(PyExc_RuntimeError, mesg);
  }
}

#if defined(SWIG_PYTHON_NO_THREADS)
#  if defined(SWIG_PYTHON_THREADS)
#    undef SWIG_PYTHON_THREADS
#  endif
#endif
#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
#  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
#    if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
#      define SWIG_PYTHON_USE_GIL
#    endif
#  endif
#  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
#    ifndef SWIG_PYTHON_INITIALIZE_THREADS
#     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
#    endif
#    ifdef __cplusplus /* C++ code */
       class SWIG_Python_Thread_Block {
         bool status;
         PyGILState_STATE state;
       public:
         void end() { if (status) { PyGILState_Release(state); status = false;} }
         SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
         ~SWIG_Python_Thread_Block() { end(); }
       };
       class SWIG_Python_Thread_Allow {
         bool status;
         PyThreadState *save;
       public:
         void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
         SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
         ~SWIG_Python_Thread_Allow() { end(); }
       };
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
#      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
#      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
#    else /* C code */
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
#      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
#      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
#    endif
#  else /* Old thread way, not implemented, user must provide it */
#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
#      define SWIG_PYTHON_INITIALIZE_THREADS
#    endif
#    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
#    endif
#    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
#      define SWIG_PYTHON_THREAD_END_BLOCK
#    endif
#    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
#    endif
#    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
#      define SWIG_PYTHON_THREAD_END_ALLOW
#    endif
#  endif
#else /* No thread support */
#  define SWIG_PYTHON_INITIALIZE_THREADS
#  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
#  define SWIG_PYTHON_THREAD_END_BLOCK
#  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
#  define SWIG_PYTHON_THREAD_END_ALLOW
#endif

/* -----------------------------------------------------------------------------
 * Python API portion that goes into the runtime
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#endif

/* -----------------------------------------------------------------------------
 * Constant declarations
 * ----------------------------------------------------------------------------- */

/* Constant Types */
#define SWIG_PY_POINTER 4
#define SWIG_PY_BINARY  5

/* Constant information structure */
typedef struct swig_const_info {
  int type;
  char *name;
  long lvalue;
  double dvalue;
  void   *pvalue;
  swig_type_info **ptype;
} swig_const_info;


/* -----------------------------------------------------------------------------
 * Wrapper of PyInstanceMethod_New() used in Python 3
 * It is exported to the generated module, used for -fastproxy
 * ----------------------------------------------------------------------------- */
#if PY_VERSION_HEX >= 0x03000000
SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
{
  return PyInstanceMethod_New(func);
}
#else
SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
{
  return NULL;
}
#endif

#ifdef __cplusplus
}
#endif


/* -----------------------------------------------------------------------------
 * pyrun.swg
 *
 * This file contains the runtime support for Python modules
 * and includes code for managing global variables and pointer
 * type checking.
 *
 * ----------------------------------------------------------------------------- */

/* Common SWIG API */

/* for raw pointers */
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)

#ifdef SWIGPYTHON_BUILTIN
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
#else
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
#endif

#define SWIG_InternalNewPointerObj(ptr, type, flags)	SWIG_Python_NewPointerObj(NULL, ptr, type, flags)

#define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
#define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
#define swig_owntype                                    int

/* for raw packed data */
#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)

/* for class or struct pointers */
#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)

/* for C or C++ function pointers */
#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)

/* for C++ member pointers, ie, member methods */
#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)


/* Runtime API */

#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule(clientdata)
#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
#define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)

#define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
#define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
#define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
#define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
#define SWIG_fail                        		goto fail					   


/* Runtime API implementation */

/* Error manipulation */

SWIGINTERN void 
SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
  PyErr_SetObject(errtype, obj);
  Py_DECREF(obj);
  SWIG_PYTHON_THREAD_END_BLOCK;
}

SWIGINTERN void 
SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  PyErr_SetString(errtype, msg);
  SWIG_PYTHON_THREAD_END_BLOCK;
}

#define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)

/* Set a constant value */

#if defined(SWIGPYTHON_BUILTIN)

SWIGINTERN void
SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
  PyObject *s = PyString_InternFromString(key);
  PyList_Append(seq, s);
  Py_DECREF(s);
}

SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
#if PY_VERSION_HEX < 0x02030000
  PyDict_SetItemString(d, (char *)name, obj);
#else
  PyDict_SetItemString(d, name, obj);
#endif
  Py_DECREF(obj);
  if (public_interface)
    SwigPyBuiltin_AddPublicSymbol(public_interface, name);
}

#else

SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
#if PY_VERSION_HEX < 0x02030000
  PyDict_SetItemString(d, (char *)name, obj);
#else
  PyDict_SetItemString(d, name, obj);
#endif
  Py_DECREF(obj);                            
}

#endif

/* Append a value to the result obj */

SWIGINTERN PyObject*
SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
#if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
  if (!result) {
    result = obj;
  } else if (result == Py_None) {
    Py_DECREF(result);
    result = obj;
  } else {
    if (!PyList_Check(result)) {
      PyObject *o2 = result;
      result = PyList_New(1);
      PyList_SetItem(result, 0, o2);
    }
    PyList_Append(result,obj);
    Py_DECREF(obj);
  }
  return result;
#else
  PyObject*   o2;
  PyObject*   o3;
  if (!result) {
    result = obj;
  } else if (result == Py_None) {
    Py_DECREF(result);
    result = obj;
  } else {
    if (!PyTuple_Check(result)) {
      o2 = result;
      result = PyTuple_New(1);
      PyTuple_SET_ITEM(result, 0, o2);
    }
    o3 = PyTuple_New(1);
    PyTuple_SET_ITEM(o3, 0, obj);
    o2 = result;
    result = PySequence_Concat(o2, o3);
    Py_DECREF(o2);
    Py_DECREF(o3);
  }
  return result;
#endif
}

/* Unpack the argument tuple */

SWIGINTERN Py_ssize_t
SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
{
  if (!args) {
    if (!min && !max) {
      return 1;
    } else {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
		   name, (min == max ? "" : "at least "), (int)min);
      return 0;
    }
  }  
  if (!PyTuple_Check(args)) {
    if (min <= 1 && max >= 1) {
      Py_ssize_t i;
      objs[0] = args;
      for (i = 1; i < max; ++i) {
	objs[i] = 0;
      }
      return 2;
    }
    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
    return 0;
  } else {
    Py_ssize_t l = PyTuple_GET_SIZE(args);
    if (l < min) {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
		   name, (min == max ? "" : "at least "), (int)min, (int)l);
      return 0;
    } else if (l > max) {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
		   name, (min == max ? "" : "at most "), (int)max, (int)l);
      return 0;
    } else {
      Py_ssize_t i;
      for (i = 0; i < l; ++i) {
	objs[i] = PyTuple_GET_ITEM(args, i);
      }
      for (; l < max; ++l) {
	objs[l] = 0;
      }
      return i + 1;
    }    
  }
}

/* A functor is a function object with one single object argument */
#if PY_VERSION_HEX >= 0x02020000
#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunctionObjArgs(functor, obj, NULL);
#else
#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunction(functor, "O", obj);
#endif

/*
  Helper for static pointer initialization for both C and C++ code, for example
  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
*/
#ifdef __cplusplus
#define SWIG_STATIC_POINTER(var)  var
#else
#define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
#endif

/* -----------------------------------------------------------------------------
 * Pointer declarations
 * ----------------------------------------------------------------------------- */

/* Flags for new pointer objects */
#define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
#define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)

#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)

#define SWIG_BUILTIN_TP_INIT	    (SWIG_POINTER_OWN << 2)
#define SWIG_BUILTIN_INIT	    (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)

#ifdef __cplusplus
extern "C" {
#endif

/*  How to access Py_None */
#if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#  ifndef SWIG_PYTHON_NO_BUILD_NONE
#    ifndef SWIG_PYTHON_BUILD_NONE
#      define SWIG_PYTHON_BUILD_NONE
#    endif
#  endif
#endif

#ifdef SWIG_PYTHON_BUILD_NONE
#  ifdef Py_None
#   undef Py_None
#   define Py_None SWIG_Py_None()
#  endif
SWIGRUNTIMEINLINE PyObject * 
_SWIG_Py_None(void)
{
  PyObject *none = Py_BuildValue((char*)"");
  Py_DECREF(none);
  return none;
}
SWIGRUNTIME PyObject * 
SWIG_Py_None(void)
{
  static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
  return none;
}
#endif

/* The python void return value */

SWIGRUNTIMEINLINE PyObject * 
SWIG_Py_Void(void)
{
  PyObject *none = Py_None;
  Py_INCREF(none);
  return none;
}

/* SwigPyClientData */

typedef struct {
  PyObject *klass;
  PyObject *newraw;
  PyObject *newargs;
  PyObject *destroy;
  int delargs;
  int implicitconv;
  PyTypeObject *pytype;
} SwigPyClientData;

SWIGRUNTIMEINLINE int 
SWIG_Python_CheckImplicit(swig_type_info *ty)
{
  SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
  return data ? data->implicitconv : 0;
}

SWIGRUNTIMEINLINE PyObject *
SWIG_Python_ExceptionType(swig_type_info *desc) {
  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
  PyObject *klass = data ? data->klass : 0;
  return (klass ? klass : PyExc_RuntimeError);
}


SWIGRUNTIME SwigPyClientData * 
SwigPyClientData_New(PyObject* obj)
{
  if (!obj) {
    return 0;
  } else {
    SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
    /* the klass element */
    data->klass = obj;
    Py_INCREF(data->klass);
    /* the newraw method and newargs arguments used to create a new raw instance */
    if (PyClass_Check(obj)) {
      data->newraw = 0;
      data->newargs = obj;
      Py_INCREF(obj);
    } else {
#if (PY_VERSION_HEX < 0x02020000)
      data->newraw = 0;
#else
      data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
#endif
      if (data->newraw) {
	Py_INCREF(data->newraw);
	data->newargs = PyTuple_New(1);
	PyTuple_SetItem(data->newargs, 0, obj);
      } else {
	data->newargs = obj;
      }
      Py_INCREF(data->newargs);
    }
    /* the destroy method, aka as the C++ delete method */
    data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
    if (PyErr_Occurred()) {
      PyErr_Clear();
      data->destroy = 0;
    }
    if (data->destroy) {
      int flags;
      Py_INCREF(data->destroy);
      flags = PyCFunction_GET_FLAGS(data->destroy);
#ifdef METH_O
      data->delargs = !(flags & (METH_O));
#else
      data->delargs = 0;
#endif
    } else {
      data->delargs = 0;
    }
    data->implicitconv = 0;
    data->pytype = 0;
    return data;
  }
}

SWIGRUNTIME void 
SwigPyClientData_Del(SwigPyClientData *data) {
  Py_XDECREF(data->newraw);
  Py_XDECREF(data->newargs);
  Py_XDECREF(data->destroy);
}

/* =============== SwigPyObject =====================*/

typedef struct {
  PyObject_HEAD
  void *ptr;
  swig_type_info *ty;
  int own;
  PyObject *next;
#ifdef SWIGPYTHON_BUILTIN
  PyObject *dict;
#endif
} SwigPyObject;


#ifdef SWIGPYTHON_BUILTIN

SWIGRUNTIME PyObject *
SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
{
  SwigPyObject *sobj = (SwigPyObject *)v;

  if (!sobj->dict)
    sobj->dict = PyDict_New();

  Py_INCREF(sobj->dict);
  return sobj->dict;
}

#endif

SWIGRUNTIME PyObject *
SwigPyObject_long(SwigPyObject *v)
{
  return PyLong_FromVoidPtr(v->ptr);
}

SWIGRUNTIME PyObject *
SwigPyObject_format(const char* fmt, SwigPyObject *v)
{
  PyObject *res = NULL;
  PyObject *args = PyTuple_New(1);
  if (args) {
    if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
      PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
      if (ofmt) {
#if PY_VERSION_HEX >= 0x03000000
	res = PyUnicode_Format(ofmt,args);
#else
	res = PyString_Format(ofmt,args);
#endif
	Py_DECREF(ofmt);
      }
      Py_DECREF(args);
    }
  }
  return res;
}

SWIGRUNTIME PyObject *
SwigPyObject_oct(SwigPyObject *v)
{
  return SwigPyObject_format("%o",v);
}

SWIGRUNTIME PyObject *
SwigPyObject_hex(SwigPyObject *v)
{
  return SwigPyObject_format("%x",v);
}

SWIGRUNTIME PyObject *
#ifdef METH_NOARGS
SwigPyObject_repr(SwigPyObject *v)
#else
SwigPyObject_repr(SwigPyObject *v, PyObject *args)
#endif
{
  const char *name = SWIG_TypePrettyName(v->ty);
  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
  if (v->next) {
# ifdef METH_NOARGS
    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
# else
    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
# endif
# if PY_VERSION_HEX >= 0x03000000
    PyObject *joined = PyUnicode_Concat(repr, nrep);
    Py_DecRef(repr);
    Py_DecRef(nrep);
    repr = joined;
# else
    PyString_ConcatAndDel(&repr,nrep);
# endif
  }
  return repr;  
}

SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
{
  void *i = v->ptr;
  void *j = w->ptr;
  return (i < j) ? -1 : ((i > j) ? 1 : 0);
}

/* Added for Python 3.x, would it also be useful for Python 2.x? */
SWIGRUNTIME PyObject*
SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
{
  PyObject* res;
  if( op != Py_EQ && op != Py_NE ) {
    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
  }
  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
  return res;  
}


SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);

#ifdef SWIGPYTHON_BUILTIN
static swig_type_info *SwigPyObject_stype = 0;
SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void) {
    SwigPyClientData *cd;
    assert(SwigPyObject_stype);
    cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
    assert(cd);
    assert(cd->pytype);
    return cd->pytype;
}
#else
SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void) {
  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
  return type;
}
#endif

SWIGRUNTIMEINLINE int
SwigPyObject_Check(PyObject *op) {
#ifdef SWIGPYTHON_BUILTIN
  PyTypeObject *target_tp = SwigPyObject_type();
  if (PyType_IsSubtype(op->ob_type, target_tp))
    return 1;
  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
#else
  return (Py_TYPE(op) == SwigPyObject_type())
    || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
#endif
}

SWIGRUNTIME PyObject *
SwigPyObject_New(void *ptr, swig_type_info *ty, int own);

SWIGRUNTIME void
SwigPyObject_dealloc(PyObject *v)
{
  SwigPyObject *sobj = (SwigPyObject *) v;
  PyObject *next = sobj->next;
  if (sobj->own == SWIG_POINTER_OWN) {
    swig_type_info *ty = sobj->ty;
    SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    PyObject *destroy = data ? data->destroy : 0;
    if (destroy) {
      /* destroy is always a VARARGS method */
      PyObject *res;

      /* PyObject_CallFunction() has the potential to silently drop
         the active active exception.  In cases of unnamed temporary
         variable or where we just finished iterating over a generator
         StopIteration will be active right now, and this needs to
         remain true upon return from SwigPyObject_dealloc.  So save
         and restore. */
      
      PyObject *val = NULL, *type = NULL, *tb = NULL;
      PyErr_Fetch(&val, &type, &tb);

      if (data->delargs) {
        /* we need to create a temporary object to carry the destroy operation */
        PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
        res = SWIG_Python_CallFunctor(destroy, tmp);
        Py_DECREF(tmp);
      } else {
        PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
        PyObject *mself = PyCFunction_GET_SELF(destroy);
        res = ((*meth)(mself, v));
      }
      if (!res)
        PyErr_WriteUnraisable(destroy);

      PyErr_Restore(val, type, tb);

      Py_XDECREF(res);
    } 
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
    else {
      const char *name = SWIG_TypePrettyName(ty);
      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
    }
#endif
  } 
  Py_XDECREF(next);
  PyObject_DEL(v);
}

SWIGRUNTIME PyObject* 
SwigPyObject_append(PyObject* v, PyObject* next)
{
  SwigPyObject *sobj = (SwigPyObject *) v;
#ifndef METH_O
  PyObject *tmp = 0;
  if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
  next = tmp;
#endif
  if (!SwigPyObject_Check(next)) {
    PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
    return NULL;
  }
  sobj->next = next;
  Py_INCREF(next);
  return SWIG_Py_Void();
}

SWIGRUNTIME PyObject* 
#ifdef METH_NOARGS
SwigPyObject_next(PyObject* v)
#else
SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{
  SwigPyObject *sobj = (SwigPyObject *) v;
  if (sobj->next) {    
    Py_INCREF(sobj->next);
    return sobj->next;
  } else {
    return SWIG_Py_Void();
  }
}

SWIGINTERN PyObject*
#ifdef METH_NOARGS
SwigPyObject_disown(PyObject *v)
#else
SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{
  SwigPyObject *sobj = (SwigPyObject *)v;
  sobj->own = 0;
  return SWIG_Py_Void();
}

SWIGINTERN PyObject*
#ifdef METH_NOARGS
SwigPyObject_acquire(PyObject *v)
#else
SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
#endif
{
  SwigPyObject *sobj = (SwigPyObject *)v;
  sobj->own = SWIG_POINTER_OWN;
  return SWIG_Py_Void();
}

SWIGINTERN PyObject*
SwigPyObject_own(PyObject *v, PyObject *args)
{
  PyObject *val = 0;
#if (PY_VERSION_HEX < 0x02020000)
  if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
#elif (PY_VERSION_HEX < 0x02050000)
  if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val)) 
#else
  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) 
#endif
    {
      return NULL;
    } 
  else
    {
      SwigPyObject *sobj = (SwigPyObject *)v;
      PyObject *obj = PyBool_FromLong(sobj->own);
      if (val) {
#ifdef METH_NOARGS
	if (PyObject_IsTrue(val)) {
	  SwigPyObject_acquire(v);
	} else {
	  SwigPyObject_disown(v);
	}
#else
	if (PyObject_IsTrue(val)) {
	  SwigPyObject_acquire(v,args);
	} else {
	  SwigPyObject_disown(v,args);
	}
#endif
      } 
      return obj;
    }
}

#ifdef METH_O
static PyMethodDef
swigobject_methods[] = {
  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_NOARGS,  (char *)"releases ownership of the pointer"},
  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS,  (char *)"acquires ownership of the pointer"},
  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_O,       (char *)"appends another 'this' object"},
  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_NOARGS,  (char *)"returns the next 'this' object"},
  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,    METH_NOARGS,  (char *)"returns object representation"},
  {0, 0, 0, 0}  
};
#else
static PyMethodDef
swigobject_methods[] = {
  {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS,  (char *)"acquires ownership of the pointer"},
  {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
  {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
  {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
  {(char *)"__repr__",(PyCFunction)SwigPyObject_repr,   METH_VARARGS,  (char *)"returns object representation"},
  {0, 0, 0, 0}  
};
#endif

#if PY_VERSION_HEX < 0x02020000
SWIGINTERN PyObject *
SwigPyObject_getattr(SwigPyObject *sobj,char *name)
{
  return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
}
#endif

SWIGRUNTIME PyTypeObject*
SwigPyObject_TypeOnce(void) {
  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";

  static PyNumberMethods SwigPyObject_as_number = {
    (binaryfunc)0, /*nb_add*/
    (binaryfunc)0, /*nb_subtract*/
    (binaryfunc)0, /*nb_multiply*/
    /* nb_divide removed in Python 3 */
#if PY_VERSION_HEX < 0x03000000
    (binaryfunc)0, /*nb_divide*/
#endif
    (binaryfunc)0, /*nb_remainder*/
    (binaryfunc)0, /*nb_divmod*/
    (ternaryfunc)0,/*nb_power*/
    (unaryfunc)0,  /*nb_negative*/
    (unaryfunc)0,  /*nb_positive*/
    (unaryfunc)0,  /*nb_absolute*/
    (inquiry)0,    /*nb_nonzero*/
    0,		   /*nb_invert*/
    0,		   /*nb_lshift*/
    0,		   /*nb_rshift*/
    0,		   /*nb_and*/
    0,		   /*nb_xor*/
    0,		   /*nb_or*/
#if PY_VERSION_HEX < 0x03000000
    0,   /*nb_coerce*/
#endif
    (unaryfunc)SwigPyObject_long, /*nb_int*/
#if PY_VERSION_HEX < 0x03000000
    (unaryfunc)SwigPyObject_long, /*nb_long*/
#else
    0, /*nb_reserved*/
#endif
    (unaryfunc)0,                 /*nb_float*/
#if PY_VERSION_HEX < 0x03000000
    (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
    (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
#endif
#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
    0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
#endif
  };

  static PyTypeObject swigpyobject_type;
  static int type_init = 0;
  if (!type_init) {
    const PyTypeObject tmp = {
      /* PyObject header changed in Python 3 */
#if PY_VERSION_HEX >= 0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                    /* ob_size */
#endif
      (char *)"SwigPyObject",               /* tp_name */
      sizeof(SwigPyObject),                 /* tp_basicsize */
      0,                                    /* tp_itemsize */
      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
      0,				    /* tp_print */
#if PY_VERSION_HEX < 0x02020000
      (getattrfunc)SwigPyObject_getattr,    /* tp_getattr */
#else
      (getattrfunc)0,                       /* tp_getattr */
#endif
      (setattrfunc)0,                       /* tp_setattr */
#if PY_VERSION_HEX >= 0x03000000
    0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
#else
      (cmpfunc)SwigPyObject_compare,        /* tp_compare */
#endif
      (reprfunc)SwigPyObject_repr,          /* tp_repr */
      &SwigPyObject_as_number,              /* tp_as_number */
      0,                                    /* tp_as_sequence */
      0,                                    /* tp_as_mapping */
      (hashfunc)0,                          /* tp_hash */
      (ternaryfunc)0,                       /* tp_call */
      0,				    /* tp_str */
      PyObject_GenericGetAttr,              /* tp_getattro */
      0,                                    /* tp_setattro */
      0,                                    /* tp_as_buffer */
      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
      swigobject_doc,                       /* tp_doc */
      0,                                    /* tp_traverse */
      0,                                    /* tp_clear */
      (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
      0,                                    /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
      0,                                    /* tp_iter */
      0,                                    /* tp_iternext */
      swigobject_methods,                   /* tp_methods */
      0,                                    /* tp_members */
      0,                                    /* tp_getset */
      0,                                    /* tp_base */
      0,                                    /* tp_dict */
      0,                                    /* tp_descr_get */
      0,                                    /* tp_descr_set */
      0,                                    /* tp_dictoffset */
      0,                                    /* tp_init */
      0,                                    /* tp_alloc */
      0,                                    /* tp_new */
      0,                                    /* tp_free */
      0,                                    /* tp_is_gc */
      0,                                    /* tp_bases */
      0,                                    /* tp_mro */
      0,                                    /* tp_cache */
      0,                                    /* tp_subclasses */
      0,                                    /* tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
      0,                                    /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
      0,                                    /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
      0,                                    /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
      0,                                    /* tp_allocs */
      0,                                    /* tp_frees */
      0,                                    /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
      0,                                    /* tp_prev */
#endif
      0                                     /* tp_next */
#endif
    };
    swigpyobject_type = tmp;
    type_init = 1;
#if PY_VERSION_HEX < 0x02020000
    swigpyobject_type.ob_type = &PyType_Type;
#else
    if (PyType_Ready(&swigpyobject_type) < 0)
      return NULL;
#endif
  }
  return &swigpyobject_type;
}

SWIGRUNTIME PyObject *
SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
{
  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
  if (sobj) {
    sobj->ptr  = ptr;
    sobj->ty   = ty;
    sobj->own  = own;
    sobj->next = 0;
  }
  return (PyObject *)sobj;
}

/* -----------------------------------------------------------------------------
 * Implements a simple Swig Packed type, and use it instead of string
 * ----------------------------------------------------------------------------- */

typedef struct {
  PyObject_HEAD
  void *pack;
  swig_type_info *ty;
  size_t size;
} SwigPyPacked;

SWIGRUNTIME int
SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
{
  char result[SWIG_BUFFER_SIZE];
  fputs("<Swig Packed ", fp); 
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
    fputs("at ", fp); 
    fputs(result, fp); 
  }
  fputs(v->ty->name,fp); 
  fputs(">", fp);
  return 0; 
}
  
SWIGRUNTIME PyObject *
SwigPyPacked_repr(SwigPyPacked *v)
{
  char result[SWIG_BUFFER_SIZE];
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
    return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
  } else {
    return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
  }  
}

SWIGRUNTIME PyObject *
SwigPyPacked_str(SwigPyPacked *v)
{
  char result[SWIG_BUFFER_SIZE];
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
    return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
  } else {
    return SWIG_Python_str_FromChar(v->ty->name);
  }  
}

SWIGRUNTIME int
SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
{
  size_t i = v->size;
  size_t j = w->size;
  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
  return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
}

SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);

SWIGRUNTIME PyTypeObject*
SwigPyPacked_type(void) {
  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
  return type;
}

SWIGRUNTIMEINLINE int
SwigPyPacked_Check(PyObject *op) {
  return ((op)->ob_type == SwigPyPacked_TypeOnce()) 
    || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
}

SWIGRUNTIME void
SwigPyPacked_dealloc(PyObject *v)
{
  if (SwigPyPacked_Check(v)) {
    SwigPyPacked *sobj = (SwigPyPacked *) v;
    free(sobj->pack);
  }
  PyObject_DEL(v);
}

SWIGRUNTIME PyTypeObject*
SwigPyPacked_TypeOnce(void) {
  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
  static PyTypeObject swigpypacked_type;
  static int type_init = 0;
  if (!type_init) {
    const PyTypeObject tmp = {
      /* PyObject header changed in Python 3 */
#if PY_VERSION_HEX>=0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                    /* ob_size */
#endif
      (char *)"SwigPyPacked",               /* tp_name */
      sizeof(SwigPyPacked),                 /* tp_basicsize */
      0,                                    /* tp_itemsize */
      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
      (printfunc)SwigPyPacked_print,        /* tp_print */
      (getattrfunc)0,                       /* tp_getattr */
      (setattrfunc)0,                       /* tp_setattr */
#if PY_VERSION_HEX>=0x03000000
      0, /* tp_reserved in 3.0.1 */
#else
      (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
#endif
      (reprfunc)SwigPyPacked_repr,          /* tp_repr */
      0,                                    /* tp_as_number */
      0,                                    /* tp_as_sequence */
      0,                                    /* tp_as_mapping */
      (hashfunc)0,                          /* tp_hash */
      (ternaryfunc)0,                       /* tp_call */
      (reprfunc)SwigPyPacked_str,           /* tp_str */
      PyObject_GenericGetAttr,              /* tp_getattro */
      0,                                    /* tp_setattro */
      0,                                    /* tp_as_buffer */
      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
      swigpacked_doc,                       /* tp_doc */
      0,                                    /* tp_traverse */
      0,                                    /* tp_clear */
      0,                                    /* tp_richcompare */
      0,                                    /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
      0,                                    /* tp_iter */
      0,                                    /* tp_iternext */
      0,                                    /* tp_methods */
      0,                                    /* tp_members */
      0,                                    /* tp_getset */
      0,                                    /* tp_base */
      0,                                    /* tp_dict */
      0,                                    /* tp_descr_get */
      0,                                    /* tp_descr_set */
      0,                                    /* tp_dictoffset */
      0,                                    /* tp_init */
      0,                                    /* tp_alloc */
      0,                                    /* tp_new */
      0,                                    /* tp_free */
      0,                                    /* tp_is_gc */
      0,                                    /* tp_bases */
      0,                                    /* tp_mro */
      0,                                    /* tp_cache */
      0,                                    /* tp_subclasses */
      0,                                    /* tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
      0,                                    /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
      0,                                    /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
      0,                                    /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
      0,                                    /* tp_allocs */
      0,                                    /* tp_frees */
      0,                                    /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
      0,                                    /* tp_prev */
#endif
      0                                     /* tp_next */
#endif
    };
    swigpypacked_type = tmp;
    type_init = 1;
#if PY_VERSION_HEX < 0x02020000
    swigpypacked_type.ob_type = &PyType_Type;
#else
    if (PyType_Ready(&swigpypacked_type) < 0)
      return NULL;
#endif
  }
  return &swigpypacked_type;
}

SWIGRUNTIME PyObject *
SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
{
  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
  if (sobj) {
    void *pack = malloc(size);
    if (pack) {
      memcpy(pack, ptr, size);
      sobj->pack = pack;
      sobj->ty   = ty;
      sobj->size = size;
    } else {
      PyObject_DEL((PyObject *) sobj);
      sobj = 0;
    }
  }
  return (PyObject *) sobj;
}

SWIGRUNTIME swig_type_info *
SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
{
  if (SwigPyPacked_Check(obj)) {
    SwigPyPacked *sobj = (SwigPyPacked *)obj;
    if (sobj->size != size) return 0;
    memcpy(ptr, sobj->pack, size);
    return sobj->ty;
  } else {
    return 0;
  }
}

/* -----------------------------------------------------------------------------
 * pointers/data manipulation
 * ----------------------------------------------------------------------------- */

SWIGRUNTIMEINLINE PyObject *
_SWIG_This(void)
{
    return SWIG_Python_str_FromChar("this");
}

static PyObject *swig_this = NULL;

SWIGRUNTIME PyObject *
SWIG_This(void)
{
  if (swig_this == NULL)
    swig_this = _SWIG_This();
  return swig_this;
}

/* #define SWIG_PYTHON_SLOW_GETSET_THIS */

/* TODO: I don't know how to implement the fast getset in Python 3 right now */
#if PY_VERSION_HEX>=0x03000000
#define SWIG_PYTHON_SLOW_GETSET_THIS 
#endif

SWIGRUNTIME SwigPyObject *
SWIG_Python_GetSwigThis(PyObject *pyobj) 
{
  PyObject *obj;

  if (SwigPyObject_Check(pyobj))
    return (SwigPyObject *) pyobj;

#ifdef SWIGPYTHON_BUILTIN
  (void)obj;
# ifdef PyWeakref_CheckProxy
  if (PyWeakref_CheckProxy(pyobj)) {
    pyobj = PyWeakref_GET_OBJECT(pyobj);
    if (pyobj && SwigPyObject_Check(pyobj))
      return (SwigPyObject*) pyobj;
  }
# endif
  return NULL;
#else

  obj = 0;

#if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
  if (PyInstance_Check(pyobj)) {
    obj = _PyInstance_Lookup(pyobj, SWIG_This());      
  } else {
    PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
    if (dictptr != NULL) {
      PyObject *dict = *dictptr;
      obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
    } else {
#ifdef PyWeakref_CheckProxy
      if (PyWeakref_CheckProxy(pyobj)) {
	PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
	return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
      }
#endif
      obj = PyObject_GetAttr(pyobj,SWIG_This());
      if (obj) {
	Py_DECREF(obj);
      } else {
	if (PyErr_Occurred()) PyErr_Clear();
	return 0;
      }
    }
  }
#else
  obj = PyObject_GetAttr(pyobj,SWIG_This());
  if (obj) {
    Py_DECREF(obj);
  } else {
    if (PyErr_Occurred()) PyErr_Clear();
    return 0;
  }
#endif
  if (obj && !SwigPyObject_Check(obj)) {
    /* a PyObject is called 'this', try to get the 'real this'
       SwigPyObject from it */ 
    return SWIG_Python_GetSwigThis(obj);
  }
  return (SwigPyObject *)obj;
#endif
}

/* Acquire a pointer value */

SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject *obj, int own) {
  if (own == SWIG_POINTER_OWN) {
    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
    if (sobj) {
      int oldown = sobj->own;
      sobj->own = own;
      return oldown;
    }
  }
  return 0;
}

/* Convert a pointer value */

SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
  int res;
  SwigPyObject *sobj;
  int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;

  if (!obj)
    return SWIG_ERROR;
  if (obj == Py_None && !implicit_conv) {
    if (ptr)
      *ptr = 0;
    return SWIG_OK;
  }

  res = SWIG_ERROR;

  sobj = SWIG_Python_GetSwigThis(obj);
  if (own)
    *own = 0;
  while (sobj) {
    void *vptr = sobj->ptr;
    if (ty) {
      swig_type_info *to = sobj->ty;
      if (to == ty) {
        /* no type cast needed */
        if (ptr) *ptr = vptr;
        break;
      } else {
        swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
        if (!tc) {
          sobj = (SwigPyObject *)sobj->next;
        } else {
          if (ptr) {
            int newmemory = 0;
            *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
            if (newmemory == SWIG_CAST_NEW_MEMORY) {
              assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
              if (own)
                *own = *own | SWIG_CAST_NEW_MEMORY;
            }
          }
          break;
        }
      }
    } else {
      if (ptr) *ptr = vptr;
      break;
    }
  }
  if (sobj) {
    if (own)
      *own = *own | sobj->own;
    if (flags & SWIG_POINTER_DISOWN) {
      sobj->own = 0;
    }
    res = SWIG_OK;
  } else {
    if (implicit_conv) {
      SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
      if (data && !data->implicitconv) {
        PyObject *klass = data->klass;
        if (klass) {
          PyObject *impconv;
          data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
          impconv = SWIG_Python_CallFunctor(klass, obj);
          data->implicitconv = 0;
          if (PyErr_Occurred()) {
            PyErr_Clear();
            impconv = 0;
          }
          if (impconv) {
            SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
            if (iobj) {
              void *vptr;
              res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
              if (SWIG_IsOK(res)) {
                if (ptr) {
                  *ptr = vptr;
                  /* transfer the ownership to 'ptr' */
                  iobj->own = 0;
                  res = SWIG_AddCast(res);
                  res = SWIG_AddNewMask(res);
                } else {
                  res = SWIG_AddCast(res);		    
                }
              }
            }
            Py_DECREF(impconv);
          }
        }
      }
    }
    if (!SWIG_IsOK(res) && obj == Py_None) {
      if (ptr)
        *ptr = 0;
      if (PyErr_Occurred())
        PyErr_Clear();
      res = SWIG_OK;
    }
  }
  return res;
}

/* Convert a function ptr value */

SWIGRUNTIME int
SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
  if (!PyCFunction_Check(obj)) {
    return SWIG_ConvertPtr(obj, ptr, ty, 0);
  } else {
    void *vptr = 0;
    
    /* here we get the method pointer for callbacks */
    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
    if (desc)
      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
    if (!desc) 
      return SWIG_ERROR;
    if (ty) {
      swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
      if (tc) {
        int newmemory = 0;
        *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
        assert(!newmemory); /* newmemory handling not yet implemented */
      } else {
        return SWIG_ERROR;
      }
    } else {
      *ptr = vptr;
    }
    return SWIG_OK;
  }
}

/* Convert a packed value value */

SWIGRUNTIME int
SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
  if (!to) return SWIG_ERROR;
  if (ty) {
    if (to != ty) {
      /* check type cast? */
      swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
      if (!tc) return SWIG_ERROR;
    }
  }
  return SWIG_OK;
}  

/* -----------------------------------------------------------------------------
 * Create a new pointer object
 * ----------------------------------------------------------------------------- */

/*
  Create a new instance object, without calling __init__, and set the
  'this' attribute.
*/

SWIGRUNTIME PyObject* 
SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
{
#if (PY_VERSION_HEX >= 0x02020000)
  PyObject *inst = 0;
  PyObject *newraw = data->newraw;
  if (newraw) {
    inst = PyObject_Call(newraw, data->newargs, NULL);
    if (inst) {
#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
      PyObject **dictptr = _PyObject_GetDictPtr(inst);
      if (dictptr != NULL) {
	PyObject *dict = *dictptr;
	if (dict == NULL) {
	  dict = PyDict_New();
	  *dictptr = dict;
	  PyDict_SetItem(dict, SWIG_This(), swig_this);
	}
      }
#else
      PyObject *key = SWIG_This();
      PyObject_SetAttr(inst, key, swig_this);
#endif
    }
  } else {
#if PY_VERSION_HEX >= 0x03000000
    inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
    if (inst) {
      PyObject_SetAttr(inst, SWIG_This(), swig_this);
      Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
    }
#else
    PyObject *dict = PyDict_New();
    if (dict) {
      PyDict_SetItem(dict, SWIG_This(), swig_this);
      inst = PyInstance_NewRaw(data->newargs, dict);
      Py_DECREF(dict);
    }
#endif
  }
  return inst;
#else
#if (PY_VERSION_HEX >= 0x02010000)
  PyObject *inst = 0;
  PyObject *dict = PyDict_New();
  if (dict) {
    PyDict_SetItem(dict, SWIG_This(), swig_this);
    inst = PyInstance_NewRaw(data->newargs, dict);
    Py_DECREF(dict);
  }
  return (PyObject *) inst;
#else
  PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
  if (inst == NULL) {
    return NULL;
  }
  inst->in_class = (PyClassObject *)data->newargs;
  Py_INCREF(inst->in_class);
  inst->in_dict = PyDict_New();
  if (inst->in_dict == NULL) {
    Py_DECREF(inst);
    return NULL;
  }
#ifdef Py_TPFLAGS_HAVE_WEAKREFS
  inst->in_weakreflist = NULL;
#endif
#ifdef Py_TPFLAGS_GC
  PyObject_GC_Init(inst);
#endif
  PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
  return (PyObject *) inst;
#endif
#endif
}

SWIGRUNTIME void
SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
{
 PyObject *dict;
#if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
 PyObject **dictptr = _PyObject_GetDictPtr(inst);
 if (dictptr != NULL) {
   dict = *dictptr;
   if (dict == NULL) {
     dict = PyDict_New();
     *dictptr = dict;
   }
   PyDict_SetItem(dict, SWIG_This(), swig_this);
   return;
 }
#endif
 dict = PyObject_GetAttrString(inst, (char*)"__dict__");
 PyDict_SetItem(dict, SWIG_This(), swig_this);
 Py_DECREF(dict);
} 


SWIGINTERN PyObject *
SWIG_Python_InitShadowInstance(PyObject *args) {
  PyObject *obj[2];
  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
    return NULL;
  } else {
    SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
    if (sthis) {
      SwigPyObject_append((PyObject*) sthis, obj[1]);
    } else {
      SWIG_Python_SetSwigThis(obj[0], obj[1]);
    }
    return SWIG_Py_Void();
  }
}

/* Create a new pointer object */

SWIGRUNTIME PyObject *
SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
  SwigPyClientData *clientdata;
  PyObject * robj;
  int own;

  if (!ptr)
    return SWIG_Py_Void();

  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
  if (clientdata && clientdata->pytype) {
    SwigPyObject *newobj;
    if (flags & SWIG_BUILTIN_TP_INIT) {
      newobj = (SwigPyObject*) self;
      if (newobj->ptr) {
        PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
        while (newobj->next)
	  newobj = (SwigPyObject *) newobj->next;
        newobj->next = next_self;
        newobj = (SwigPyObject *)next_self;
#ifdef SWIGPYTHON_BUILTIN
        newobj->dict = 0;
#endif
      }
    } else {
      newobj = PyObject_New(SwigPyObject, clientdata->pytype);
#ifdef SWIGPYTHON_BUILTIN
      newobj->dict = 0;
#endif
    }
    if (newobj) {
      newobj->ptr = ptr;
      newobj->ty = type;
      newobj->own = own;
      newobj->next = 0;
      return (PyObject*) newobj;
    }
    return SWIG_Py_Void();
  }

  assert(!(flags & SWIG_BUILTIN_TP_INIT));

  robj = SwigPyObject_New(ptr, type, own);
  if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
    Py_DECREF(robj);
    robj = inst;
  }
  return robj;
}

/* Create a new packed object */

SWIGRUNTIMEINLINE PyObject *
SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
}

/* -----------------------------------------------------------------------------*
 *  Get type list 
 * -----------------------------------------------------------------------------*/

#ifdef SWIG_LINK_RUNTIME
void *SWIG_ReturnGlobalTypeList(void *);
#endif

SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
  static void *type_pointer = (void *)0;
  /* first check if module already created */
  if (!type_pointer) {
#ifdef SWIG_LINK_RUNTIME
    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
#else
# ifdef SWIGPY_USE_CAPSULE
    type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
# else
    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
# endif
    if (PyErr_Occurred()) {
      PyErr_Clear();
      type_pointer = (void *)0;
    }
#endif
  }
  return (swig_module_info *) type_pointer;
}

#if PY_MAJOR_VERSION < 2
/* PyModule_AddObject function was introduced in Python 2.0.  The following function
   is copied out of Python/modsupport.c in python version 2.3.4 */
SWIGINTERN int
PyModule_AddObject(PyObject *m, char *name, PyObject *o)
{
  PyObject *dict;
  if (!PyModule_Check(m)) {
    PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg");
    return SWIG_ERROR;
  }
  if (!o) {
    PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value");
    return SWIG_ERROR;
  }
  
  dict = PyModule_GetDict(m);
  if (dict == NULL) {
    /* Internal error -- modules must have a dict! */
    PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
		 PyModule_GetName(m));
    return SWIG_ERROR;
  }
  if (PyDict_SetItemString(dict, name, o))
    return SWIG_ERROR;
  Py_DECREF(o);
  return SWIG_OK;
}
#endif

SWIGRUNTIME void
#ifdef SWIGPY_USE_CAPSULE
SWIG_Python_DestroyModule(PyObject *obj)
#else
SWIG_Python_DestroyModule(void *vptr)
#endif
{
#ifdef SWIGPY_USE_CAPSULE
  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
#else
  swig_module_info *swig_module = (swig_module_info *) vptr;
#endif
  swig_type_info **types = swig_module->types;
  size_t i;
  for (i =0; i < swig_module->size; ++i) {
    swig_type_info *ty = types[i];
    if (ty->owndata) {
      SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
      if (data) SwigPyClientData_Del(data);
    }
  }
  Py_DECREF(SWIG_This());
  swig_this = NULL;
}

SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info *swig_module) {
#if PY_VERSION_HEX >= 0x03000000
 /* Add a dummy module object into sys.modules */
  PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
#else
  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
#endif
#ifdef SWIGPY_USE_CAPSULE
  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
  if (pointer && module) {
    PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
  } else {
    Py_XDECREF(pointer);
  }
#else
  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
  if (pointer && module) {
    PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
  } else {
    Py_XDECREF(pointer);
  }
#endif
}

/* The python cached type query */
SWIGRUNTIME PyObject *
SWIG_Python_TypeCache(void) {
  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
  return cache;
}

SWIGRUNTIME swig_type_info *
SWIG_Python_TypeQuery(const char *type)
{
  PyObject *cache = SWIG_Python_TypeCache();
  PyObject *key = SWIG_Python_str_FromChar(type); 
  PyObject *obj = PyDict_GetItem(cache, key);
  swig_type_info *descriptor;
  if (obj) {
#ifdef SWIGPY_USE_CAPSULE
    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
#else
    descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
#endif
  } else {
    swig_module_info *swig_module = SWIG_GetModule(0);
    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
    if (descriptor) {
#ifdef SWIGPY_USE_CAPSULE
      obj = PyCapsule_New((void*) descriptor, NULL, NULL);
#else
      obj = PyCObject_FromVoidPtr(descriptor, NULL);
#endif
      PyDict_SetItem(cache, key, obj);
      Py_DECREF(obj);
    }
  }
  Py_DECREF(key);
  return descriptor;
}

/* 
   For backward compatibility only
*/
#define SWIG_POINTER_EXCEPTION  0
#define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)

SWIGRUNTIME int
SWIG_Python_AddErrMesg(const char* mesg, int infront)
{  
  if (PyErr_Occurred()) {
    PyObject *type = 0;
    PyObject *value = 0;
    PyObject *traceback = 0;
    PyErr_Fetch(&type, &value, &traceback);
    if (value) {
      char *tmp;
      PyObject *old_str = PyObject_Str(value);
      Py_XINCREF(type);
      PyErr_Clear();
      if (infront) {
	PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
      } else {
	PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
      }
      SWIG_Python_str_DelForPy3(tmp);
      Py_DECREF(old_str);
    }
    return 1;
  } else {
    return 0;
  }
}
  
SWIGRUNTIME int
SWIG_Python_ArgFail(int argnum)
{
  if (PyErr_Occurred()) {
    /* add information about failing argument */
    char mesg[256];
    PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
    return SWIG_Python_AddErrMesg(mesg, 1);
  } else {
    return 0;
  }
}

SWIGRUNTIMEINLINE const char *
SwigPyObject_GetDesc(PyObject *self)
{
  SwigPyObject *v = (SwigPyObject *)self;
  swig_type_info *ty = v ? v->ty : 0;
  return ty ? ty->str : "";
}

SWIGRUNTIME void
SWIG_Python_TypeError(const char *type, PyObject *obj)
{
  if (type) {
#if defined(SWIG_COBJECT_TYPES)
    if (obj && SwigPyObject_Check(obj)) {
      const char *otype = (const char *) SwigPyObject_GetDesc(obj);
      if (otype) {
	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
		     type, otype);
	return;
      }
    } else 
#endif      
    {
      const char *otype = (obj ? obj->ob_type->tp_name : 0); 
      if (otype) {
	PyObject *str = PyObject_Str(obj);
	const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
	if (cstr) {
	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
		       type, otype, cstr);
          SWIG_Python_str_DelForPy3(cstr);
	} else {
	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
		       type, otype);
	}
	Py_XDECREF(str);
	return;
      }
    }   
    PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
  } else {
    PyErr_Format(PyExc_TypeError, "unexpected type is received");
  }
}


/* Convert a pointer value, signal an exception on a type mismatch */
SWIGRUNTIME void *
SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
  void *result;
  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
    PyErr_Clear();
#if SWIG_POINTER_EXCEPTION
    if (flags) {
      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
      SWIG_Python_ArgFail(argnum);
    }
#endif
  }
  return result;
}

#ifdef SWIGPYTHON_BUILTIN
SWIGRUNTIME int
SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
  PyTypeObject *tp = obj->ob_type;
  PyObject *descr;
  PyObject *encoded_name;
  descrsetfunc f;
  int res = -1;

# ifdef Py_USING_UNICODE
  if (PyString_Check(name)) {
    name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
    if (!name)
      return -1;
  } else if (!PyUnicode_Check(name))
# else
  if (!PyString_Check(name))
# endif
  {
    PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
    return -1;
  } else {
    Py_INCREF(name);
  }

  if (!tp->tp_dict) {
    if (PyType_Ready(tp) < 0)
      goto done;
  }

  descr = _PyType_Lookup(tp, name);
  f = NULL;
  if (descr != NULL)
    f = descr->ob_type->tp_descr_set;
  if (!f) {
    if (PyString_Check(name)) {
      encoded_name = name;
      Py_INCREF(name);
    } else {
      encoded_name = PyUnicode_AsUTF8String(name);
    }
    PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
    Py_DECREF(encoded_name);
  } else {
    res = f(descr, obj, value);
  }
  
  done:
  Py_DECREF(name);
  return res;
}
#endif


#ifdef __cplusplus
}
#endif



#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 

#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 



  #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) 


/* -------- TYPES TABLE (BEGIN) -------- */

#define SWIGTYPE_p_GDALMajorObjectShadow swig_types[0]
#define SWIGTYPE_p_GDALProgressFunc swig_types[1]
#define SWIGTYPE_p_GIntBig swig_types[2]
#define SWIGTYPE_p_OGRDataSourceShadow swig_types[3]
#define SWIGTYPE_p_OGRDriverShadow swig_types[4]
#define SWIGTYPE_p_OGRFeatureDefnShadow swig_types[5]
#define SWIGTYPE_p_OGRFeatureShadow swig_types[6]
#define SWIGTYPE_p_OGRFieldDefnShadow swig_types[7]
#define SWIGTYPE_p_OGRGeomFieldDefnShadow swig_types[8]
#define SWIGTYPE_p_OGRGeometryShadow swig_types[9]
#define SWIGTYPE_p_OGRLayerShadow swig_types[10]
#define SWIGTYPE_p_OGRStyleTableShadow swig_types[11]
#define SWIGTYPE_p_OSRCoordinateTransformationShadow swig_types[12]
#define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[13]
#define SWIGTYPE_p_char swig_types[14]
#define SWIGTYPE_p_double swig_types[15]
#define SWIGTYPE_p_f_double_p_q_const__char_p_void__int swig_types[16]
#define SWIGTYPE_p_float swig_types[17]
#define SWIGTYPE_p_int swig_types[18]
#define SWIGTYPE_p_p_GIntBig swig_types[19]
#define SWIGTYPE_p_p_char swig_types[20]
#define SWIGTYPE_p_p_double swig_types[21]
#define SWIGTYPE_p_p_int swig_types[22]
static swig_type_info *swig_types[24];
static swig_module_info swig_module = {swig_types, 23, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)

/* -------- TYPES TABLE (END) -------- */

#if (PY_VERSION_HEX <= 0x02000000)
# if !defined(SWIG_PYTHON_CLASSIC)
#  error "This python version requires swig to be run with the '-classic' option"
# endif
#endif

/*-----------------------------------------------
              @(target):= _ogr.so
  ------------------------------------------------*/
#if PY_VERSION_HEX >= 0x03000000
#  define SWIG_init    PyInit__ogr

#else
#  define SWIG_init    init_ogr

#endif
#define SWIG_name    "_ogr"

#define SWIGVERSION 0x030008 
#define SWIG_VERSION SWIGVERSION


#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) 
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) 


#include <stdexcept>


namespace swig {
  class SwigPtr_PyObject {
  protected:
    PyObject *_obj;

  public:
    SwigPtr_PyObject() :_obj(0)
    {
    }

    SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      Py_XINCREF(_obj);      
      SWIG_PYTHON_THREAD_END_BLOCK;
    }
    
    SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
    {
      if (initial_ref) {
        SWIG_PYTHON_THREAD_BEGIN_BLOCK;
        Py_XINCREF(_obj);
        SWIG_PYTHON_THREAD_END_BLOCK;
      }
    }
    
    SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) 
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      Py_XINCREF(item._obj);
      Py_XDECREF(_obj);
      _obj = item._obj;
      SWIG_PYTHON_THREAD_END_BLOCK;
      return *this;      
    }
    
    ~SwigPtr_PyObject() 
    {
      SWIG_PYTHON_THREAD_BEGIN_BLOCK;
      Py_XDECREF(_obj);
      SWIG_PYTHON_THREAD_END_BLOCK;
    }
    
    operator PyObject *() const
    {
      return _obj;
    }

    PyObject *operator->() const
    {
      return _obj;
    }
  };
}


namespace swig {
  struct SwigVar_PyObject : SwigPtr_PyObject {
    SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
    
    SwigVar_PyObject & operator = (PyObject* obj)
    {
      Py_XDECREF(_obj);
      _obj = obj;
      return *this;      
    }
  };
}


typedef char retStringAndCPLFree;


#include <iostream>
using namespace std;

#define CPL_SUPRESS_CPLUSPLUS

#include "gdal.h"
#include "ogr_api.h"
#include "ogr_core.h"
#include "cpl_port.h"
#include "cpl_string.h"
#include "ogr_srs_api.h"

#define FIELD_INDEX_ERROR_TMPL "Invalid field index: '%i'"
#define FIELD_NAME_ERROR_TMPL "Invalid field name: '%s'"

typedef void GDALMajorObjectShadow;

#ifdef DEBUG
typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
#ifndef SWIGPERL
typedef struct OGRDriverHS OGRDriverShadow;
typedef struct OGRDataSourceHS OGRDataSourceShadow;
#endif
typedef struct OGRLayerHS OGRLayerShadow;
typedef struct OGRFeatureHS OGRFeatureShadow;
typedef struct OGRFeatureDefnHS OGRFeatureDefnShadow;
typedef struct OGRGeometryHS OGRGeometryShadow;
typedef struct OGRCoordinateTransformationHS OSRCoordinateTransformationShadow;
typedef struct OGRCoordinateTransformationHS OGRCoordinateTransformationShadow;
typedef struct OGRFieldDefnHS OGRFieldDefnShadow;
#else
typedef void OSRSpatialReferenceShadow;
#ifndef SWIGPERL
typedef void OGRDriverShadow;
typedef void OGRDataSourceShadow;
#endif
typedef void OGRLayerShadow;
typedef void OGRFeatureShadow;
typedef void OGRFeatureDefnShadow;
typedef void OGRGeometryShadow;
typedef void OSRCoordinateTransformationShadow;
typedef void OGRFieldDefnShadow;
#endif
typedef struct OGRStyleTableHS OGRStyleTableShadow;
typedef struct OGRGeomFieldDefnHS OGRGeomFieldDefnShadow;


SWIGINTERNINLINE PyObject*
  SWIG_From_int  (int value)
{
  return PyInt_FromLong((long) value);
}


SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)
{
  static int init = 0;
  static swig_type_info* info = 0;
  if (!init) {
    info = SWIG_TypeQuery("_p_char");
    init = 1;
  }
  return info;
}


SWIGINTERNINLINE PyObject *
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
{
  if (carray) {
    if (size > INT_MAX) {
      swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
      return pchar_descriptor ? 
	SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
    } else {
#if PY_VERSION_HEX >= 0x03000000
#if PY_VERSION_HEX >= 0x03010000
      return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
#else
      return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif
#else
      return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#endif
    }
  } else {
    return SWIG_Py_Void();
  }
}


SWIGINTERNINLINE PyObject * 
SWIG_FromCharPtr(const char *cptr)
{ 
  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
}


#define MODULE_NAME           "ogr"


static int bUseExceptions=0;
static CPLErrorHandler pfnPreviousHandler = CPLDefaultErrorHandler;

static void CPL_STDCALL
PythonBindingErrorHandler(CPLErr eclass, int code, const char *msg )
{
  /*
  ** Generally we want to suppress error reporting if we have exceptions
  ** enabled as the error message will be in the exception thrown in
  ** Python.
  */

  /* If the error class is CE_Fatal, we want to have a message issued
     because the CPL support code does an abort() before any exception
     can be generated */
  if (eclass == CE_Fatal ) {
    pfnPreviousHandler(eclass, code, msg );
  }

  /*
  ** We do not want to interfere with warnings or debug messages since
  ** they won't be translated into exceptions.
  */
  else if (eclass == CE_Warning || eclass == CE_Debug ) {
    pfnPreviousHandler(eclass, code, msg );
  }
  else {
    CPLSetThreadLocalConfigOption("__last_error_message", msg);
    CPLSetThreadLocalConfigOption("__last_error_code", CPLSPrintf("%d", code));
  }
}



static
int GetUseExceptions() {
  CPLErrorReset();
  return bUseExceptions;
}

static
void UseExceptions() {
  CPLErrorReset();
  if( !bUseExceptions )
  {
    bUseExceptions = 1;
    char* pszNewValue = CPLStrdup(CPLSPrintf("%s %s",
                   MODULE_NAME,
                   CPLGetConfigOption("__chain_python_error_handlers", "")));
    CPLSetConfigOption("__chain_python_error_handlers", pszNewValue);
    CPLFree(pszNewValue);
    pfnPreviousHandler =
        CPLSetErrorHandler( (CPLErrorHandler) PythonBindingErrorHandler );
  }
}

static
void DontUseExceptions() {
  CPLErrorReset();
  if( bUseExceptions )
  {
    const char* pszValue = CPLGetConfigOption("__chain_python_error_handlers", "");
    if( strncmp(pszValue, MODULE_NAME, strlen(MODULE_NAME)) != 0 ||
        pszValue[strlen(MODULE_NAME)] != ' ')
    {
        CPLError(CE_Failure, CPLE_NotSupported,
                 "Cannot call %s.DontUseExceptions() at that point since the "
                 "stack of error handlers is: %s", MODULE_NAME, pszValue);
        return;
    }
    char* pszNewValue = CPLStrdup(pszValue + strlen(MODULE_NAME) + 1);
    if( pszNewValue[0] == ' ' && pszNewValue[1] == '\0' )
        pszNewValue = NULL;
    CPLSetConfigOption("__chain_python_error_handlers", pszNewValue);
    CPLFree(pszNewValue);
    bUseExceptions = 0;
    CPLSetErrorHandler( pfnPreviousHandler );
  }
}


/* Completely unrelated: just to avoid Coverity warnings */

static int bReturnSame = 1;

void NeverCallMePlease() {
    bReturnSame = 0;
}

/* Some SWIG code generates dead code, which Coverity warns about */
template<class T> static T ReturnSame(T x)
{
    if( bReturnSame )
        return x;
    return 0;
}

static void ClearErrorState()
{
    CPLSetThreadLocalConfigOption("__last_error_message", NULL);
    CPLSetThreadLocalConfigOption("__last_error_code", NULL);
    CPLErrorReset();
}

static void StoreLastException() CPL_UNUSED;

static void StoreLastException()
{
    const char* pszLastErrorMessage =
        CPLGetThreadLocalConfigOption("__last_error_message", NULL);
    const char* pszLastErrorCode =
        CPLGetThreadLocalConfigOption("__last_error_code", NULL);
    if( pszLastErrorMessage != NULL && pszLastErrorCode != NULL )
    {
        CPLErrorSetState( CE_Failure,
            static_cast<CPLErrorNum>(atoi(pszLastErrorCode)),
            pszLastErrorMessage);
    }
}




/* Return a PyObject* from a NULL terminated C String */
static PyObject* GDALPythonObjectFromCStr(const char *pszStr) CPL_UNUSED;
static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
{
  const unsigned char* pszIter = (const unsigned char*) pszStr;
  while(*pszIter != 0)
  {
    if (*pszIter > 127)
    {
        PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "ignore");
        if (pyObj != NULL)
            return pyObj;
#if PY_VERSION_HEX >= 0x03000000
        return PyBytes_FromString(pszStr);
#else
        return PyString_FromString(pszStr);
#endif
    }
    pszIter ++;
  }
#if PY_VERSION_HEX >= 0x03000000
  return PyUnicode_FromString(pszStr);
#else
  return PyString_FromString(pszStr);
#endif
}

/* Return a NULL terminated c String from a PyObject */
/* Result must be freed with GDALPythonFreeCStr */
static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
{
  *pbToFree = 0;
  if (PyUnicode_Check(pyObject))
  {
      char *pszStr;
      char *pszNewStr;
      Py_ssize_t nLen;
      PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
      if( pyUTF8Str == NULL )
        return NULL;
#if PY_VERSION_HEX >= 0x03000000
      PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
      PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
      pszNewStr = (char *) malloc(nLen+1);
      memcpy(pszNewStr, pszStr, nLen+1);
      Py_XDECREF(pyUTF8Str);
      *pbToFree = 1;
      return pszNewStr;
  }
  else
  {
#if PY_VERSION_HEX >= 0x03000000
      return PyBytes_AsString(pyObject);
#else
      return PyString_AsString(pyObject);
#endif
  }
}

static void GDALPythonFreeCStr(void* ptr, int bToFree) CPL_UNUSED;
static void GDALPythonFreeCStr(void* ptr, int bToFree)
{
   if (bToFree)
       free(ptr);
}




typedef struct {
    PyObject *psPyCallback;
    PyObject *psPyCallbackData;
    int nLastReported;
} PyProgressData;

/************************************************************************/
/*                          PyProgressProxy()                           */
/************************************************************************/


static int CPL_STDCALL
PyProgressProxy( double dfComplete, const char *pszMessage, void *pData ) CPL_UNUSED;

static int CPL_STDCALL
PyProgressProxy( double dfComplete, const char *pszMessage, void *pData )

{
    PyProgressData *psInfo = (PyProgressData *) pData;
    PyObject *psArgs, *psResult;
    int      bContinue = TRUE;

    if( psInfo->nLastReported == (int) (100.0 * dfComplete) )
        return TRUE;

    if( psInfo->psPyCallback == NULL || psInfo->psPyCallback == Py_None )
        return TRUE;

    psInfo->nLastReported = (int) (100.0 * dfComplete);

    if( pszMessage == NULL )
        pszMessage = "";

    SWIG_PYTHON_THREAD_BEGIN_BLOCK;

    if( psInfo->psPyCallbackData == NULL )
        psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, Py_None );
    else
        psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage,
	                       psInfo->psPyCallbackData );

    psResult = PyEval_CallObject( psInfo->psPyCallback, psArgs);
    Py_XDECREF(psArgs);

    if( PyErr_Occurred() != NULL )
    {
        PyErr_Print();
        PyErr_Clear();
        SWIG_PYTHON_THREAD_END_BLOCK;
        return FALSE;
    }

    if( psResult == NULL )
    {
        SWIG_PYTHON_THREAD_END_BLOCK;
        return TRUE;
    }

    if( psResult == Py_None )
    {
        SWIG_PYTHON_THREAD_END_BLOCK;
        return TRUE;
    }

    if( !PyArg_Parse( psResult, "i", &bContinue ) )
    {
        PyErr_Clear();
        CPLError(CE_Failure, CPLE_AppDefined, "bad progress return value");
        Py_XDECREF(psResult);
        SWIG_PYTHON_THREAD_END_BLOCK;
        return FALSE;
    }

    Py_XDECREF(psResult);
    SWIG_PYTHON_THREAD_END_BLOCK;

    return bContinue;
}


#include "gdal.h"

SWIGINTERN char const *GDALMajorObjectShadow_GetDescription(GDALMajorObjectShadow *self){
    return GDALGetDescription( self );
  }

SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
{
#if PY_VERSION_HEX>=0x03000000
  if (PyUnicode_Check(obj))
#else  
  if (PyString_Check(obj))
#endif
  {
    char *cstr; Py_ssize_t len;
#if PY_VERSION_HEX>=0x03000000
    if (!alloc && cptr) {
        /* We can't allow converting without allocation, since the internal
           representation of string in Python 3 is UCS-2/UCS-4 but we require
           a UTF-8 representation.
           TODO(bhy) More detailed explanation */
        return SWIG_RuntimeError;
    }
    obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
    PyBytes_AsStringAndSize(obj, &cstr, &len);
    if(alloc) *alloc = SWIG_NEWOBJ;
#else
    PyString_AsStringAndSize(obj, &cstr, &len);
#endif
    if (cptr) {
      if (alloc) {
	/* 
	   In python the user should not be able to modify the inner
	   string representation. To warranty that, if you define
	   SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
	   buffer is always returned.

	   The default behavior is just to return the pointer value,
	   so, be careful.
	*/ 
#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
	if (*alloc != SWIG_OLDOBJ) 
#else
	if (*alloc == SWIG_NEWOBJ) 
#endif
	{
	  *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
	  *alloc = SWIG_NEWOBJ;
	} else {
	  *cptr = cstr;
	  *alloc = SWIG_OLDOBJ;
	}
      } else {
	#if PY_VERSION_HEX>=0x03000000
	assert(0); /* Should never reach here in Python 3 */
	#endif
	*cptr = SWIG_Python_str_AsChar(obj);
      }
    }
    if (psize) *psize = len + 1;
#if PY_VERSION_HEX>=0x03000000
    Py_XDECREF(obj);
#endif
    return SWIG_OK;
  } else {
#if defined(SWIG_PYTHON_2_UNICODE)
#if PY_VERSION_HEX<0x03000000
    if (PyUnicode_Check(obj)) {
      char *cstr; Py_ssize_t len;
      if (!alloc && cptr) {
        return SWIG_RuntimeError;
      }
      obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
      if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
        if (cptr) {
          if (alloc) *alloc = SWIG_NEWOBJ;
          *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
        }
        if (psize) *psize = len + 1;

        Py_XDECREF(obj);
        return SWIG_OK;
      } else {
        Py_XDECREF(obj);
      }
    }
#endif
#endif

    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    if (pchar_descriptor) {
      void* vptr = 0;
      if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
	if (cptr) *cptr = (char *) vptr;
	if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
	if (alloc) *alloc = SWIG_OLDOBJ;
	return SWIG_OK;
      }
    }
  }
  return SWIG_TypeError;
}




SWIGINTERN void GDALMajorObjectShadow_SetDescription(GDALMajorObjectShadow *self,char const *pszNewDesc){
    GDALSetDescription( self, pszNewDesc );
  }
SWIGINTERN char **GDALMajorObjectShadow_GetMetadataDomainList(GDALMajorObjectShadow *self){
    return GDALGetMetadataDomainList( self );
  }
SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_Dict(GDALMajorObjectShadow *self,char const *pszDomain=""){
    return GDALGetMetadata( self, pszDomain );
  }
SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_List(GDALMajorObjectShadow *self,char const *pszDomain=""){
    return GDALGetMetadata( self, pszDomain );
  }
SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_0(GDALMajorObjectShadow *self,char **papszMetadata,char const *pszDomain=""){
    return GDALSetMetadata( self, papszMetadata, pszDomain );
  }
SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_1(GDALMajorObjectShadow *self,char *pszMetadataString,char const *pszDomain=""){
    char *tmpList[2];
    tmpList[0] = pszMetadataString;
    tmpList[1] = 0;
    return GDALSetMetadata( self, tmpList, pszDomain );
  }
SWIGINTERN char const *GDALMajorObjectShadow_GetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszDomain=""){
    return GDALGetMetadataItem( self, pszName, pszDomain);
  }
SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszValue,char const *pszDomain=""){
    return GDALSetMetadataItem( self, pszName, pszValue, pszDomain);
  }
SWIGINTERN OGRStyleTableShadow *new_OGRStyleTableShadow(){
        return (OGRStyleTableShadow*) OGR_STBL_Create();
   }
SWIGINTERN void delete_OGRStyleTableShadow(OGRStyleTableShadow *self){
        OGR_STBL_Destroy( (OGRStyleTableH) self );
   }
SWIGINTERN int OGRStyleTableShadow_AddStyle(OGRStyleTableShadow *self,char const *pszName,char const *pszStyleString){
        return OGR_STBL_AddStyle( (OGRStyleTableH) self, pszName, pszStyleString);
   }
SWIGINTERN int OGRStyleTableShadow_LoadStyleTable(OGRStyleTableShadow *self,char const *utf8_path){
        return OGR_STBL_LoadStyleTable( (OGRStyleTableH) self, utf8_path );
   }
SWIGINTERN int OGRStyleTableShadow_SaveStyleTable(OGRStyleTableShadow *self,char const *utf8_path){
        return OGR_STBL_SaveStyleTable( (OGRStyleTableH) self, utf8_path );
   }
SWIGINTERN char const *OGRStyleTableShadow_Find(OGRStyleTableShadow *self,char const *pszName){
        return OGR_STBL_Find( (OGRStyleTableH) self, pszName );
   }
SWIGINTERN void OGRStyleTableShadow_ResetStyleStringReading(OGRStyleTableShadow *self){
        OGR_STBL_ResetStyleStringReading( (OGRStyleTableH) self );
   }
SWIGINTERN char const *OGRStyleTableShadow_GetNextStyle(OGRStyleTableShadow *self){
        return OGR_STBL_GetNextStyle( (OGRStyleTableH) self );
   }
SWIGINTERN char const *OGRStyleTableShadow_GetLastStyleName(OGRStyleTableShadow *self){
        return OGR_STBL_GetLastStyleName( (OGRStyleTableH) self );
   }
SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_CreateDataSource(OGRDriverShadow *self,char const *utf8_path,char **options=0){
    OGRDataSourceShadow *ds = (OGRDataSourceShadow*) OGR_Dr_CreateDataSource( self, utf8_path, options);
    return ds;
  }
SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_CopyDataSource(OGRDriverShadow *self,OGRDataSourceShadow *copy_ds,char const *utf8_path,char **options=0){
    OGRDataSourceShadow *ds = (OGRDataSourceShadow*) OGR_Dr_CopyDataSource(self, copy_ds, utf8_path, options);
    return ds;
  }

#include <limits.h>
#if !defined(SWIG_NO_LLONG_MAX)
# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
#   define LLONG_MAX __LONG_LONG_MAX__
#   define LLONG_MIN (-LLONG_MAX - 1LL)
#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
# endif
#endif


SWIGINTERN int
SWIG_AsVal_double (PyObject *obj, double *val)
{
  int res = SWIG_TypeError;
  if (PyFloat_Check(obj)) {
    if (val) *val = PyFloat_AsDouble(obj);
    return SWIG_OK;
#if PY_VERSION_HEX < 0x03000000
  } else if (PyInt_Check(obj)) {
    if (val) *val = PyInt_AsLong(obj);
    return SWIG_OK;
#endif
  } else if (PyLong_Check(obj)) {
    double v = PyLong_AsDouble(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    double d = PyFloat_AsDouble(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = d;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      long v = PyLong_AsLong(obj);
      if (!PyErr_Occurred()) {
	if (val) *val = v;
	return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
      } else {
	PyErr_Clear();
      }
    }
  }
#endif
  return res;
}


#include <float.h>


#include <math.h>


SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double *d, double min, double max) {
  double x = *d;
  if ((min <= x && x <= max)) {
   double fx = floor(x);
   double cx = ceil(x);
   double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
   if ((errno == EDOM) || (errno == ERANGE)) {
     errno = 0;
   } else {
     double summ, reps, diff;
     if (rd < x) {
       diff = x - rd;
     } else if (rd > x) {
       diff = rd - x;
     } else {
       return 1;
     }
     summ = rd + x;
     reps = diff/summ;
     if (reps < 8*DBL_EPSILON) {
       *d = rd;
       return 1;
     }
   }
  }
  return 0;
}


SWIGINTERN int
SWIG_AsVal_long (PyObject *obj, long* val)
{
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(obj)) {
    if (val) *val = PyInt_AsLong(obj);
    return SWIG_OK;
  } else
#endif
  if (PyLong_Check(obj)) {
    long v = PyLong_AsLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      return SWIG_OverflowError;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    long v = PyInt_AsLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
	if (val) *val = (long)(d);
	return res;
      }
    }
  }
#endif
  return SWIG_TypeError;
}


SWIGINTERN int
SWIG_AsVal_int (PyObject * obj, int *val)
{
  long v;
  int res = SWIG_AsVal_long (obj, &v);
  if (SWIG_IsOK(res)) {
    if ((v < INT_MIN || v > INT_MAX)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = static_cast< int >(v);
    }
  }  
  return res;
}

SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_Open(OGRDriverShadow *self,char const *utf8_path,int update=0){
    CPLErrorReset();
    OGRDataSourceShadow* ds = (OGRDataSourceShadow*) OGR_Dr_Open(self, utf8_path, update);












    return ds;
  }
SWIGINTERN int OGRDriverShadow_DeleteDataSource(OGRDriverShadow *self,char const *utf8_path){

    return OGR_Dr_DeleteDataSource( self, utf8_path );
  }
SWIGINTERN bool OGRDriverShadow_TestCapability(OGRDriverShadow *self,char const *cap){
    return (OGR_Dr_TestCapability(self, cap) > 0);
  }

SWIGINTERNINLINE PyObject*
  SWIG_From_bool  (bool value)
{
  return PyBool_FromLong(value ? 1 : 0);
}

SWIGINTERN char const *OGRDriverShadow_GetName(OGRDriverShadow *self){
    return OGR_Dr_GetName( self );
  }
SWIGINTERN void OGRDriverShadow_Register(OGRDriverShadow *self){
    OGRRegisterDriver( self );
  }
SWIGINTERN void OGRDriverShadow_Deregister(OGRDriverShadow *self){
    OGRDeregisterDriver( self );
  }
SWIGINTERN void delete_OGRDataSourceShadow(OGRDataSourceShadow *self){
    OGRReleaseDataSource(self);
  }
SWIGINTERN int OGRDataSourceShadow_GetRefCount(OGRDataSourceShadow *self){
    return OGR_DS_GetRefCount(self);
  }
SWIGINTERN int OGRDataSourceShadow_GetSummaryRefCount(OGRDataSourceShadow *self){
    return OGR_DS_GetSummaryRefCount(self);
  }
SWIGINTERN int OGRDataSourceShadow_GetLayerCount(OGRDataSourceShadow *self){
    return OGR_DS_GetLayerCount(self);
  }
SWIGINTERN OGRDriverShadow *OGRDataSourceShadow_GetDriver(OGRDataSourceShadow *self){
    return (OGRDriverShadow *) OGR_DS_GetDriver( self );
  }
SWIGINTERN char const *OGRDataSourceShadow_GetName(OGRDataSourceShadow *self){
    return OGR_DS_GetName(self);
  }
SWIGINTERN OGRErr OGRDataSourceShadow_DeleteLayer(OGRDataSourceShadow *self,int index){
    return OGR_DS_DeleteLayer(self, index);
  }


#include "ogr_core.h"
static char const *
OGRErrMessages( int rc ) {
  switch( rc ) {
  case OGRERR_NONE:
    return "OGR Error: None";
  case OGRERR_NOT_ENOUGH_DATA:
    return "OGR Error: Not enough data to deserialize";
  case OGRERR_NOT_ENOUGH_MEMORY:
    return "OGR Error: Not enough memory";
  case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
    return "OGR Error: Unsupported geometry type";
  case OGRERR_UNSUPPORTED_OPERATION:
    return "OGR Error: Unsupported operation";
  case OGRERR_CORRUPT_DATA:
    return "OGR Error: Corrupt data";
  case OGRERR_FAILURE:
    return "OGR Error: General Error";
  case OGRERR_UNSUPPORTED_SRS:
    return "OGR Error: Unsupported SRS";
  case OGRERR_INVALID_HANDLE:
    return "OGR Error: Invalid handle";
  case OGRERR_NON_EXISTING_FEATURE:
    return "OGR Error: Non existing feature";
  default:
    return "OGR Error: Unknown";
  }
}

SWIGINTERN OGRErr OGRDataSourceShadow_SyncToDisk(OGRDataSourceShadow *self){
    return OGR_DS_SyncToDisk(self);
  }
SWIGINTERN void OGRDataSourceShadow_FlushCache(OGRDataSourceShadow *self){
    GDALFlushCache( self );
  }
SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_CreateLayer(OGRDataSourceShadow *self,char const *name,OSRSpatialReferenceShadow *srs=NULL,OGRwkbGeometryType geom_type=wkbUnknown,char **options=0){
    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_CreateLayer( self,
								  name,
								  srs,
								  geom_type,
								  options);
    return layer;
  }
SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_CopyLayer(OGRDataSourceShadow *self,OGRLayerShadow *src_layer,char const *new_name,char **options=0){
    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_CopyLayer( self,
                                                      src_layer,
                                                      new_name,
                                                      options);
    return layer;
  }
SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_GetLayerByIndex(OGRDataSourceShadow *self,int index=0){

    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_GetLayer(self, index);
    return layer;
  }
SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_GetLayerByName(OGRDataSourceShadow *self,char const *layer_name){
    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_GetLayerByName(self, layer_name);
    return layer;
  }
SWIGINTERN bool OGRDataSourceShadow_TestCapability(OGRDataSourceShadow *self,char const *cap){
    return (OGR_DS_TestCapability(self, cap) > 0);
  }
SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_ExecuteSQL(OGRDataSourceShadow *self,char const *statement,OGRGeometryShadow *spatialFilter=NULL,char const *dialect=""){
    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_ExecuteSQL((OGRDataSourceShadow*)self,
                                                      statement,
                                                      spatialFilter,
                                                      dialect);
    return layer;
  }
SWIGINTERN void OGRDataSourceShadow_ReleaseResultSet(OGRDataSourceShadow *self,OGRLayerShadow *layer){
    OGR_DS_ReleaseResultSet(self, layer);
  }
SWIGINTERN OGRStyleTableShadow *OGRDataSourceShadow_GetStyleTable(OGRDataSourceShadow *self){
    return (OGRStyleTableShadow*) OGR_DS_GetStyleTable(self);
  }
SWIGINTERN void OGRDataSourceShadow_SetStyleTable(OGRDataSourceShadow *self,OGRStyleTableShadow *table){
    if( table != NULL )
        OGR_DS_SetStyleTable(self, (OGRStyleTableH) table);
  }
SWIGINTERN OGRErr OGRDataSourceShadow_StartTransaction(OGRDataSourceShadow *self,int force=FALSE){
    return GDALDatasetStartTransaction(self, force);
  }
SWIGINTERN OGRErr OGRDataSourceShadow_CommitTransaction(OGRDataSourceShadow *self){
    return GDALDatasetCommitTransaction(self);
  }
SWIGINTERN OGRErr OGRDataSourceShadow_RollbackTransaction(OGRDataSourceShadow *self){
    return GDALDatasetRollbackTransaction(self);
  }
SWIGINTERN int OGRLayerShadow_GetRefCount(OGRLayerShadow *self){
    return OGR_L_GetRefCount(self);
  }
SWIGINTERN void OGRLayerShadow_SetSpatialFilter__SWIG_0(OGRLayerShadow *self,OGRGeometryShadow *filter){
    OGR_L_SetSpatialFilter (self, filter);
  }
SWIGINTERN void OGRLayerShadow_SetSpatialFilterRect__SWIG_0(OGRLayerShadow *self,double minx,double miny,double maxx,double maxy){
    OGR_L_SetSpatialFilterRect(self, minx, miny, maxx, maxy);
  }
SWIGINTERN void OGRLayerShadow_SetSpatialFilter__SWIG_1(OGRLayerShadow *self,int iGeomField,OGRGeometryShadow *filter){
    OGR_L_SetSpatialFilterEx (self, iGeomField, filter);
  }
SWIGINTERN void OGRLayerShadow_SetSpatialFilterRect__SWIG_1(OGRLayerShadow *self,int iGeomField,double minx,double miny,double maxx,double maxy){
    OGR_L_SetSpatialFilterRectEx(self, iGeomField, minx, miny, maxx, maxy);
  }
SWIGINTERN OGRGeometryShadow *OGRLayerShadow_GetSpatialFilter(OGRLayerShadow *self){
    return (OGRGeometryShadow *) OGR_L_GetSpatialFilter(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetAttributeFilter(OGRLayerShadow *self,char *filter_string){
    return OGR_L_SetAttributeFilter((OGRLayerShadow*)self, filter_string);
  }
SWIGINTERN void OGRLayerShadow_ResetReading(OGRLayerShadow *self){
    OGR_L_ResetReading(self);
  }
SWIGINTERN char const *OGRLayerShadow_GetName(OGRLayerShadow *self){
    return OGR_L_GetName(self);
  }
SWIGINTERN OGRwkbGeometryType OGRLayerShadow_GetGeomType(OGRLayerShadow *self){
    return (OGRwkbGeometryType) OGR_L_GetGeomType(self);
  }
SWIGINTERN char const *OGRLayerShadow_GetGeometryColumn(OGRLayerShadow *self){
    return OGR_L_GetGeometryColumn(self);
  }
SWIGINTERN char const *OGRLayerShadow_GetFIDColumn(OGRLayerShadow *self){
    return OGR_L_GetFIDColumn(self);
  }
SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetFeature(OGRLayerShadow *self,GIntBig fid){
    return (OGRFeatureShadow*) OGR_L_GetFeature(self, fid);
  }
SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetNextFeature(OGRLayerShadow *self){
    return (OGRFeatureShadow*) OGR_L_GetNextFeature(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetNextByIndex(OGRLayerShadow *self,GIntBig new_index){
    return OGR_L_SetNextByIndex(self, new_index);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
    return OGR_L_SetFeature(self, feature);
  }
SWIGINTERN OGRErr OGRLayerShadow_CreateFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
    return OGR_L_CreateFeature(self, feature);
  }
SWIGINTERN OGRErr OGRLayerShadow_DeleteFeature(OGRLayerShadow *self,GIntBig fid){
    return OGR_L_DeleteFeature(self, fid);
  }
SWIGINTERN OGRErr OGRLayerShadow_SyncToDisk(OGRLayerShadow *self){
    return OGR_L_SyncToDisk(self);
  }
SWIGINTERN OGRFeatureDefnShadow *OGRLayerShadow_GetLayerDefn(OGRLayerShadow *self){
    return (OGRFeatureDefnShadow*) OGR_L_GetLayerDefn(self);
  }
SWIGINTERN GIntBig OGRLayerShadow_GetFeatureCount(OGRLayerShadow *self,int force=1){
    return OGR_L_GetFeatureCount(self, force);
  }
SWIGINTERN void OGRLayerShadow_GetExtent(OGRLayerShadow *self,double argout[4],int *isvalid=NULL,int force=1,int can_return_null=0,int geom_field=0){
    OGRErr eErr = OGR_L_GetExtentEx(self, geom_field, (OGREnvelope*)argout, force);
    if (can_return_null)
        *isvalid = (eErr == 0);
    else
        *isvalid = TRUE;
    return;
  }
SWIGINTERN bool OGRLayerShadow_TestCapability(OGRLayerShadow *self,char const *cap){
    return (OGR_L_TestCapability(self, cap) > 0);
  }
SWIGINTERN OGRErr OGRLayerShadow_CreateField(OGRLayerShadow *self,OGRFieldDefnShadow *field_def,int approx_ok=1){
    return OGR_L_CreateField(self, field_def, approx_ok);
  }
SWIGINTERN OGRErr OGRLayerShadow_DeleteField(OGRLayerShadow *self,int iField){
    return OGR_L_DeleteField(self, iField);
  }
SWIGINTERN OGRErr OGRLayerShadow_ReorderField(OGRLayerShadow *self,int iOldFieldPos,int iNewFieldPos){
    return OGR_L_ReorderField(self, iOldFieldPos, iNewFieldPos);
  }
SWIGINTERN OGRErr OGRLayerShadow_ReorderFields(OGRLayerShadow *self,int nList,int *pList){
    if (nList != OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)))
    {
      CPLError(CE_Failure, CPLE_IllegalArg,
               "List should have %d elements",
               OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)));
      return 6;
    }
    return OGR_L_ReorderFields(self, pList);
  }
SWIGINTERN OGRErr OGRLayerShadow_AlterFieldDefn(OGRLayerShadow *self,int iField,OGRFieldDefnShadow *field_def,int nFlags){
    return OGR_L_AlterFieldDefn(self, iField, field_def, nFlags);
  }
SWIGINTERN OGRErr OGRLayerShadow_CreateGeomField(OGRLayerShadow *self,OGRGeomFieldDefnShadow *field_def,int approx_ok=1){
    return OGR_L_CreateGeomField(self, field_def, approx_ok);
  }
SWIGINTERN OGRErr OGRLayerShadow_StartTransaction(OGRLayerShadow *self){
    return OGR_L_StartTransaction(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_CommitTransaction(OGRLayerShadow *self){
    return OGR_L_CommitTransaction(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_RollbackTransaction(OGRLayerShadow *self){
    return OGR_L_RollbackTransaction(self);
  }
SWIGINTERN int OGRLayerShadow_FindFieldIndex(OGRLayerShadow *self,char const *pszFieldName,int bExactMatch){
    return OGR_L_FindFieldIndex(self, pszFieldName, bExactMatch );
  }
SWIGINTERN OSRSpatialReferenceShadow *OGRLayerShadow_GetSpatialRef(OGRLayerShadow *self){
    OGRSpatialReferenceH ref =  OGR_L_GetSpatialRef(self);
    if( ref )
        OSRReference(ref);
    return (OSRSpatialReferenceShadow*) ref;
  }
SWIGINTERN GIntBig OGRLayerShadow_GetFeaturesRead(OGRLayerShadow *self){
    return OGR_L_GetFeaturesRead(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetIgnoredFields(OGRLayerShadow *self,char const **options){
    return OGR_L_SetIgnoredFields( self, options );
  }
SWIGINTERN OGRErr OGRLayerShadow_Intersection(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Intersection( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Union(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Union( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_SymDifference(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_SymDifference( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Identity(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Identity( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Update(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Update( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Clip(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Clip( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Erase(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Erase( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRStyleTableShadow *OGRLayerShadow_GetStyleTable(OGRLayerShadow *self){
    return (OGRStyleTableShadow*) OGR_L_GetStyleTable(self);
  }
SWIGINTERN void OGRLayerShadow_SetStyleTable(OGRLayerShadow *self,OGRStyleTableShadow *table){
    if( table != NULL )
        OGR_L_SetStyleTable(self, (OGRStyleTableH) table);
  }
SWIGINTERN void delete_OGRFeatureShadow(OGRFeatureShadow *self){
    OGR_F_Destroy(self);
  }
SWIGINTERN OGRFeatureShadow *new_OGRFeatureShadow(OGRFeatureDefnShadow *feature_def){
      return (OGRFeatureShadow*) OGR_F_Create( feature_def );
  }
SWIGINTERN OGRFeatureDefnShadow *OGRFeatureShadow_GetDefnRef(OGRFeatureShadow *self){
    return (OGRFeatureDefnShadow*) OGR_F_GetDefnRef(self);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeometry(OGRFeatureShadow *self,OGRGeometryShadow *geom){
    return OGR_F_SetGeometry(self, geom);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeometryDirectly(OGRFeatureShadow *self,OGRGeometryShadow *geom){
    return OGR_F_SetGeometryDirectly(self, geom);
  }
SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeometryRef(OGRFeatureShadow *self){
    return (OGRGeometryShadow*) OGR_F_GetGeometryRef(self);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeomField__SWIG_0(OGRFeatureShadow *self,int iField,OGRGeometryShadow *geom){
    return OGR_F_SetGeomField(self, iField, geom);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeomField__SWIG_1(OGRFeatureShadow *self,char const *field_name,OGRGeometryShadow *geom){
      int iField = OGR_F_GetGeomFieldIndex(self, field_name);
      if (iField == -1)
      {
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
          return 6;
      }
      else
          return OGR_F_SetGeomField(self, iField, geom);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeomFieldDirectly__SWIG_0(OGRFeatureShadow *self,int iField,OGRGeometryShadow *geom){
    return OGR_F_SetGeomFieldDirectly(self, iField, geom);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeomFieldDirectly__SWIG_1(OGRFeatureShadow *self,char const *field_name,OGRGeometryShadow *geom){
      int iField = OGR_F_GetGeomFieldIndex(self, field_name);
      if (iField == -1)
      {
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
          return 6;
      }
      else
          return OGR_F_SetGeomFieldDirectly(self, iField, geom);
  }
SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeomFieldRef__SWIG_0(OGRFeatureShadow *self,int iField){
    return (OGRGeometryShadow*) OGR_F_GetGeomFieldRef(self, iField);
  }
SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeomFieldRef__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetGeomFieldIndex(self, field_name);
      if (i == -1)
      {
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
          return NULL;
      }
      else
          return (OGRGeometryShadow*) OGR_F_GetGeomFieldRef(self, i);
  }
SWIGINTERN OGRFeatureShadow *OGRFeatureShadow_Clone(OGRFeatureShadow *self){
    return (OGRFeatureShadow*) OGR_F_Clone(self);
  }
SWIGINTERN bool OGRFeatureShadow_Equal(OGRFeatureShadow *self,OGRFeatureShadow *feature){
    return (OGR_F_Equal(self, feature) > 0);
  }
SWIGINTERN int OGRFeatureShadow_GetFieldCount(OGRFeatureShadow *self){
    return OGR_F_GetFieldCount(self);
  }
SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_0(OGRFeatureShadow *self,int id){
    return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, id);
  }
SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, i);
      return NULL;
  }
SWIGINTERN int OGRFeatureShadow_GetGeomFieldCount(OGRFeatureShadow *self){
    return OGR_F_GetGeomFieldCount(self);
  }
SWIGINTERN OGRGeomFieldDefnShadow *OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_0(OGRFeatureShadow *self,int id){
      return (OGRGeomFieldDefnShadow *) OGR_F_GetGeomFieldDefnRef(self, id);
  }
SWIGINTERN OGRGeomFieldDefnShadow *OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetGeomFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          return (OGRGeomFieldDefnShadow *) OGR_F_GetGeomFieldDefnRef(self, i);
      return NULL;
  }
SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_0(OGRFeatureShadow *self,int id){
    return (const char *) OGR_F_GetFieldAsString(self, id);
  }
SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  return (const char *) OGR_F_GetFieldAsString(self, i);
      return NULL;
  }
SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_0(OGRFeatureShadow *self,int id){
    return OGR_F_GetFieldAsInteger(self, id);
  }
SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  return OGR_F_GetFieldAsInteger(self, i);
      return 0;
  }
SWIGINTERN GIntBig OGRFeatureShadow_GetFieldAsInteger64__SWIG_0(OGRFeatureShadow *self,int id){
    return OGR_F_GetFieldAsInteger64(self, id);
  }
SWIGINTERN GIntBig OGRFeatureShadow_GetFieldAsInteger64__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          return OGR_F_GetFieldAsInteger64(self, i);
      return 0;
  }
SWIGINTERN double OGRFeatureShadow_GetFieldAsDouble__SWIG_0(OGRFeatureShadow *self,int id){
    return OGR_F_GetFieldAsDouble(self, id);
  }

  #define SWIG_From_double   PyFloat_FromDouble 

SWIGINTERN double OGRFeatureShadow_GetFieldAsDouble__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          return OGR_F_GetFieldAsDouble(self, i);
      return 0;
  }

SWIGINTERNINLINE PyObject *
SWIG_From_float  (float value)
{    
  return SWIG_From_double  (value);
}

SWIGINTERN void OGRFeatureShadow_GetFieldAsDateTime__SWIG_0(OGRFeatureShadow *self,int id,int *pnYear,int *pnMonth,int *pnDay,int *pnHour,int *pnMinute,float *pfSecond,int *pnTZFlag){
      OGR_F_GetFieldAsDateTimeEx(self, id, pnYear, pnMonth, pnDay,
			       pnHour, pnMinute, pfSecond,
			       pnTZFlag);
  }
SWIGINTERN void OGRFeatureShadow_GetFieldAsDateTime__SWIG_1(OGRFeatureShadow *self,char const *field_name,int *pnYear,int *pnMonth,int *pnDay,int *pnHour,int *pnMinute,float *pfSecond,int *pnTZFlag){
      int id = OGR_F_GetFieldIndex(self, field_name);
      if (id == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  OGR_F_GetFieldAsDateTimeEx(self, id, pnYear, pnMonth, pnDay,
			       pnHour, pnMinute, pfSecond,
			       pnTZFlag);
  }
SWIGINTERN void OGRFeatureShadow_GetFieldAsIntegerList__SWIG_0(OGRFeatureShadow *self,int id,int *nLen,int const **pList){
      *pList = OGR_F_GetFieldAsIntegerList(self, id, nLen);
  }
SWIGINTERN void OGRFeatureShadow_GetFieldAsIntegerList__SWIG_1(OGRFeatureShadow *self,char const *field_name,int *nLen,int const **pList){
      int id = OGR_F_GetFieldIndex(self, field_name);
      if (id == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          *pList = OGR_F_GetFieldAsIntegerList(self, id, nLen);
  }
SWIGINTERN void OGRFeatureShadow_GetFieldAsInteger64List(OGRFeatureShadow *self,int id,int *nLen,GIntBig const **pList){
      *pList = OGR_F_GetFieldAsInteger64List(self, id, nLen);
  }
SWIGINTERN void OGRFeatureShadow_GetFieldAsDoubleList__SWIG_0(OGRFeatureShadow *self,int id,int *nLen,double const **pList){
      *pList = OGR_F_GetFieldAsDoubleList(self, id, nLen);
  }
SWIGINTERN void OGRFeatureShadow_GetFieldAsDoubleList__SWIG_1(OGRFeatureShadow *self,char const *field_name,int *nLen,double const **pList){
      int id = OGR_F_GetFieldIndex(self, field_name);
      if (id == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          *pList = OGR_F_GetFieldAsDoubleList(self, id, nLen);
  }
SWIGINTERN char **OGRFeatureShadow_GetFieldAsStringList(OGRFeatureShadow *self,int id){
      return OGR_F_GetFieldAsStringList(self, id);
  }
SWIGINTERN OGRErr OGRFeatureShadow_GetFieldAsBinary__SWIG_0(OGRFeatureShadow *self,int id,int *nLen,char **pBuf){
    GByte* pabyBlob = OGR_F_GetFieldAsBinary(self, id, nLen);
    *pBuf = (char*)malloc(*nLen);
    memcpy(*pBuf, pabyBlob, *nLen);
    return 0;
  }
SWIGINTERN OGRErr OGRFeatureShadow_GetFieldAsBinary__SWIG_1(OGRFeatureShadow *self,char const *field_name,int *nLen,char **pBuf){
      int id = OGR_F_GetFieldIndex(self, field_name);
      if (id == -1)
      {
        CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
        return 6;
      }
      else
      {
        GByte* pabyBlob = OGR_F_GetFieldAsBinary(self, id, nLen);
        *pBuf = (char*)malloc(*nLen);
        memcpy(*pBuf, pabyBlob, *nLen);
        return 0;
      }
  }
SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_0(OGRFeatureShadow *self,int id){
    return (OGR_F_IsFieldSet(self, id) > 0);
  }
SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  return (OGR_F_IsFieldSet(self, i) > 0);
      return false;
  }
SWIGINTERN bool OGRFeatureShadow_IsFieldNull__SWIG_0(OGRFeatureShadow *self,int id){
    return (OGR_F_IsFieldNull(self, id) > 0);
  }
SWIGINTERN bool OGRFeatureShadow_IsFieldNull__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  return (OGR_F_IsFieldNull(self, i) > 0);
      return false;
  }
SWIGINTERN bool OGRFeatureShadow_IsFieldSetAndNotNull__SWIG_0(OGRFeatureShadow *self,int id){
    return (OGR_F_IsFieldSetAndNotNull(self, id) > 0);
  }
SWIGINTERN bool OGRFeatureShadow_IsFieldSetAndNotNull__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  return (OGR_F_IsFieldSetAndNotNull(self, i) > 0);
      return false;
  }
SWIGINTERN int OGRFeatureShadow_GetFieldIndex(OGRFeatureShadow *self,char const *field_name){
      // Do not issue an error if the field doesn't exist. It is intended to be silent
      return OGR_F_GetFieldIndex(self, field_name);
  }
SWIGINTERN int OGRFeatureShadow_GetGeomFieldIndex(OGRFeatureShadow *self,char const *field_name){
      // Do not issue an error if the field doesn't exist. It is intended to be silent
      return OGR_F_GetGeomFieldIndex(self, field_name);
  }
SWIGINTERN GIntBig OGRFeatureShadow_GetFID(OGRFeatureShadow *self){
    return OGR_F_GetFID(self);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetFID(OGRFeatureShadow *self,GIntBig fid){
    return OGR_F_SetFID(self, fid);
  }
SWIGINTERN void OGRFeatureShadow_DumpReadable(OGRFeatureShadow *self){
    OGR_F_DumpReadable(self, NULL);
  }
SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_0(OGRFeatureShadow *self,int id){
    OGR_F_UnsetField(self, id);
  }
SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          OGR_F_UnsetField(self, i);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldNull__SWIG_0(OGRFeatureShadow *self,int id){
    OGR_F_SetFieldNull(self, id);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldNull__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          OGR_F_SetFieldNull(self, i);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_0(OGRFeatureShadow *self,int id,char const *value){
    OGR_F_SetFieldString(self, id, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_1(OGRFeatureShadow *self,char const *field_name,char const *value){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          OGR_F_SetFieldString(self, i, value);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldInteger64(OGRFeatureShadow *self,int id,GIntBig value){
    OGR_F_SetFieldInteger64(self, id, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_2(OGRFeatureShadow *self,int id,double value){
    OGR_F_SetFieldDouble(self, id, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_3(OGRFeatureShadow *self,char const *field_name,double value){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  OGR_F_SetFieldDouble(self, i, value);
  }

/* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
#ifndef SWIG_isfinite
# if defined(isfinite)
#  define SWIG_isfinite(X) (isfinite(X))
# elif defined(_MSC_VER)
#  define SWIG_isfinite(X) (_finite(X))
# elif defined(__sun) && defined(__SVR4)
#  include <ieeefp.h>
#  define SWIG_isfinite(X) (finite(X))
# endif
#endif


/* Accept infinite as a valid float value unless we are unable to check if a value is finite */
#ifdef SWIG_isfinite
# define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X))
#else
# define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX))
#endif


SWIGINTERN int
SWIG_AsVal_float (PyObject * obj, float *val)
{
  double v;
  int res = SWIG_AsVal_double (obj, &v);
  if (SWIG_IsOK(res)) {
    if (SWIG_Float_Overflow_Check(v)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = static_cast< float >(v);
    }
  }  
  return res;
}

SWIGINTERN void OGRFeatureShadow_SetField__SWIG_4(OGRFeatureShadow *self,int id,int year,int month,int day,int hour,int minute,float second,int tzflag){
    OGR_F_SetFieldDateTimeEx(self, id, year, month, day,
                             hour, minute, second,
                             tzflag);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_5(OGRFeatureShadow *self,char const *field_name,int year,int month,int day,int hour,int minute,float second,int tzflag){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  OGR_F_SetFieldDateTimeEx(self, i, year, month, day,
				 hour, minute, second,
				 tzflag);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldIntegerList(OGRFeatureShadow *self,int id,int nList,int *pList){
      OGR_F_SetFieldIntegerList(self, id, nList, pList);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldInteger64List(OGRFeatureShadow *self,int id,int nList,GIntBig *pList){
      OGR_F_SetFieldInteger64List(self, id, nList, pList);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldDoubleList(OGRFeatureShadow *self,int id,int nList,double *pList){
      OGR_F_SetFieldDoubleList(self, id, nList, pList);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldStringList(OGRFeatureShadow *self,int id,char **pList){
      OGR_F_SetFieldStringList(self, id, pList);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_0(OGRFeatureShadow *self,int id,char const *pszValue){
     int nBytes;
     GByte* pabyBuf = CPLHexToBinary(pszValue, &nBytes );
     OGR_F_SetFieldBinary(self, id, nBytes, pabyBuf);
     CPLFree(pabyBuf);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_1(OGRFeatureShadow *self,char const *field_name,char const *pszValue){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
      {
          int nBytes;
          GByte* pabyBuf = CPLHexToBinary(pszValue, &nBytes );
          OGR_F_SetFieldBinary(self, i, nBytes, pabyBuf);
          CPLFree(pabyBuf);
      }
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetFrom(OGRFeatureShadow *self,OGRFeatureShadow *other,int forgiving=1){
    return OGR_F_SetFrom(self, other, forgiving);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetFromWithMap(OGRFeatureShadow *self,OGRFeatureShadow *other,int forgiving,int nList,int *pList){
    if (nList != OGR_F_GetFieldCount(other))
    {
        CPLError(CE_Failure, CPLE_AppDefined,
                 "The size of map doesn't match with the field count of the source feature");
        return 6;
    }
    return OGR_F_SetFromWithMap(self, other, forgiving, pList);
  }
SWIGINTERN char const *OGRFeatureShadow_GetStyleString(OGRFeatureShadow *self){
    return (const char*) OGR_F_GetStyleString(self);
  }
SWIGINTERN void OGRFeatureShadow_SetStyleString(OGRFeatureShadow *self,char const *the_string){
    OGR_F_SetStyleString(self, the_string);
  }
SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_0(OGRFeatureShadow *self,int id){
      OGRFieldDefnH fd = OGR_F_GetFieldDefnRef( self,  id );
      if (fd)
          return (OGRFieldType) OGR_Fld_GetType( fd );
      else
          return (OGRFieldType)0;
  }
SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1) {
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
          return (OGRFieldType)0;
      } else
          return (OGRFieldType) OGR_Fld_GetType( OGR_F_GetFieldDefnRef( self, i ) );
  }
SWIGINTERN int OGRFeatureShadow_Validate(OGRFeatureShadow *self,int flags=OGR_F_VAL_ALL,int bEmitError=TRUE){
    return OGR_F_Validate(self, flags, bEmitError);
  }
SWIGINTERN void OGRFeatureShadow_FillUnsetWithDefault(OGRFeatureShadow *self,int bNotNullableOnly=FALSE,char **options=NULL){
    OGR_F_FillUnsetWithDefault(self, bNotNullableOnly, options );
  }
SWIGINTERN char const *OGRFeatureShadow_GetNativeData(OGRFeatureShadow *self){
    return OGR_F_GetNativeData(self);
  }
SWIGINTERN char const *OGRFeatureShadow_GetNativeMediaType(OGRFeatureShadow *self){
    return OGR_F_GetNativeMediaType(self);
  }
SWIGINTERN void OGRFeatureShadow_SetNativeData(OGRFeatureShadow *self,char const *nativeData){
    OGR_F_SetNativeData(self, nativeData);
  }
SWIGINTERN void OGRFeatureShadow_SetNativeMediaType(OGRFeatureShadow *self,char const *nativeMediaType){
    OGR_F_SetNativeMediaType(self, nativeMediaType);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldString(OGRFeatureShadow *self,int id,char const *value){
    OGR_F_SetFieldString(self, id, value);
  }

    static int ValidateOGRGeometryType(OGRwkbGeometryType field_type)
    {
        switch(field_type)
        {
            case wkbUnknown:
            case wkbPoint:
            case wkbLineString:
            case wkbPolygon:
            case wkbMultiPoint:
            case wkbMultiLineString:
            case wkbMultiPolygon:
            case wkbGeometryCollection:
            case wkbCircularString:
            case wkbCompoundCurve:
            case wkbCurvePolygon:
            case wkbMultiCurve:
            case wkbMultiSurface:
            case wkbCurve:
            case wkbSurface:
            case wkbTriangle:
            case wkbTIN:
            case wkbPolyhedralSurface:
            case wkbNone:
            /*case wkbLinearRing:*/
            case wkbCircularStringZ:
            case wkbCompoundCurveZ:
            case wkbCurvePolygonZ:
            case wkbMultiCurveZ:
            case wkbMultiSurfaceZ:
            case wkbCurveZ:
            case wkbSurfaceZ:
            case wkbTriangleZ:
            case wkbTINZ:
            case wkbPolyhedralSurfaceZ:
            case wkbPoint25D:
            case wkbLineString25D:
            case wkbPolygon25D:
            case wkbMultiPoint25D:
            case wkbMultiLineString25D:
            case wkbMultiPolygon25D:
            case wkbGeometryCollection25D:
            case wkbPointM:
            case wkbLineStringM:
            case wkbPolygonM:
            case wkbMultiPointM:
            case wkbMultiLineStringM:
            case wkbMultiPolygonM:
            case wkbGeometryCollectionM:
            case wkbCircularStringM:
            case wkbCompoundCurveM:
            case wkbCurvePolygonM:
            case wkbMultiCurveM:
            case wkbMultiSurfaceM:
            case wkbCurveM:
            case wkbSurfaceM:
            case wkbTriangleM:
            case wkbTINM:
            case wkbPolyhedralSurfaceM:
            case wkbPointZM:
            case wkbLineStringZM:
            case wkbPolygonZM:
            case wkbMultiPointZM:
            case wkbMultiLineStringZM:
            case wkbMultiPolygonZM:
            case wkbGeometryCollectionZM:
            case wkbCircularStringZM:
            case wkbCompoundCurveZM:
            case wkbCurvePolygonZM:
            case wkbMultiCurveZM:
            case wkbMultiSurfaceZM:
            case wkbCurveZM:
            case wkbSurfaceZM:
            case wkbTriangleZM:
            case wkbTINZM:
            case wkbPolyhedralSurfaceZM:
                return TRUE;
            default:
                CPLError(CE_Failure, CPLE_IllegalArg, "Illegal geometry type value");
                return FALSE;
        }
    }

SWIGINTERN void delete_OGRFeatureDefnShadow(OGRFeatureDefnShadow *self){
    /*OGR_FD_Destroy(self);*/
    OGR_FD_Release( OGRFeatureDefnH(self) );
  }
SWIGINTERN OGRFeatureDefnShadow *new_OGRFeatureDefnShadow(char const *name_null_ok=NULL){
    OGRFeatureDefnH h = OGR_FD_Create(name_null_ok);
    OGR_FD_Reference(h);
    return (OGRFeatureDefnShadow* )h;
  }
SWIGINTERN char const *OGRFeatureDefnShadow_GetName(OGRFeatureDefnShadow *self){
    return OGR_FD_GetName(self);
  }
SWIGINTERN int OGRFeatureDefnShadow_GetFieldCount(OGRFeatureDefnShadow *self){
    return OGR_FD_GetFieldCount(self);
  }
SWIGINTERN OGRFieldDefnShadow *OGRFeatureDefnShadow_GetFieldDefn(OGRFeatureDefnShadow *self,int i){
    return (OGRFieldDefnShadow*) OGR_FD_GetFieldDefn(self, i);
  }
SWIGINTERN int OGRFeatureDefnShadow_GetFieldIndex(OGRFeatureDefnShadow *self,char const *field_name){
      // Do not issue an error if the field doesn't exist. It is intended to be silent
      return OGR_FD_GetFieldIndex(self, field_name);
  }
SWIGINTERN void OGRFeatureDefnShadow_AddFieldDefn(OGRFeatureDefnShadow *self,OGRFieldDefnShadow *defn){
    OGR_FD_AddFieldDefn(self, defn);
  }
SWIGINTERN int OGRFeatureDefnShadow_GetGeomFieldCount(OGRFeatureDefnShadow *self){
    return OGR_FD_GetGeomFieldCount(self);
  }
SWIGINTERN OGRGeomFieldDefnShadow *OGRFeatureDefnShadow_GetGeomFieldDefn(OGRFeatureDefnShadow *self,int i){
    return (OGRGeomFieldDefnShadow*) OGR_FD_GetGeomFieldDefn(self, i);
  }
SWIGINTERN int OGRFeatureDefnShadow_GetGeomFieldIndex(OGRFeatureDefnShadow *self,char const *field_name){
      // Do not issue an error if the field doesn't exist. It is intended to be silent
      return OGR_FD_GetGeomFieldIndex(self, field_name);
  }
SWIGINTERN void OGRFeatureDefnShadow_AddGeomFieldDefn(OGRFeatureDefnShadow *self,OGRGeomFieldDefnShadow *defn){
    OGR_FD_AddGeomFieldDefn(self, defn);
  }
SWIGINTERN OGRErr OGRFeatureDefnShadow_DeleteGeomFieldDefn(OGRFeatureDefnShadow *self,int idx){
    return OGR_FD_DeleteGeomFieldDefn(self, idx);
  }
SWIGINTERN OGRwkbGeometryType OGRFeatureDefnShadow_GetGeomType(OGRFeatureDefnShadow *self){
    return (OGRwkbGeometryType) OGR_FD_GetGeomType(self);
  }
SWIGINTERN void OGRFeatureDefnShadow_SetGeomType(OGRFeatureDefnShadow *self,OGRwkbGeometryType geom_type){
    if( ValidateOGRGeometryType(geom_type) )
        OGR_FD_SetGeomType(self, geom_type);
  }
SWIGINTERN int OGRFeatureDefnShadow_GetReferenceCount(OGRFeatureDefnShadow *self){
    return OGR_FD_GetReferenceCount(self);
  }
SWIGINTERN int OGRFeatureDefnShadow_IsGeometryIgnored(OGRFeatureDefnShadow *self){
    return OGR_FD_IsGeometryIgnored(self);
  }
SWIGINTERN void OGRFeatureDefnShadow_SetGeometryIgnored(OGRFeatureDefnShadow *self,int bIgnored){
    return OGR_FD_SetGeometryIgnored(self,bIgnored);
  }
SWIGINTERN int OGRFeatureDefnShadow_IsStyleIgnored(OGRFeatureDefnShadow *self){
    return OGR_FD_IsStyleIgnored(self);
  }
SWIGINTERN void OGRFeatureDefnShadow_SetStyleIgnored(OGRFeatureDefnShadow *self,int bIgnored){
    return OGR_FD_SetStyleIgnored(self,bIgnored);
  }
SWIGINTERN int OGRFeatureDefnShadow_IsSame(OGRFeatureDefnShadow *self,OGRFeatureDefnShadow *other_defn){
    return OGR_FD_IsSame(self, other_defn);
  }

    static int ValidateOGRFieldType(OGRFieldType field_type)
    {
        switch(field_type)
        {
            case OFTInteger:
            case OFTIntegerList:
            case OFTReal:
            case OFTRealList:
            case OFTString:
            case OFTStringList:
            case OFTBinary:
            case OFTDate:
            case OFTTime:
            case OFTDateTime:
            case OFTInteger64:
            case OFTInteger64List:
                return TRUE;
            default:
                CPLError(CE_Failure, CPLE_IllegalArg, "Illegal field type value");
                return FALSE;
        }
    }


    static int ValidateOGRFieldSubType(OGRFieldSubType field_subtype)
    {
        switch(field_subtype)
        {
            case OFSTNone:
            case OFSTBoolean:
            case OFSTInt16:
            case OFSTFloat32:
                return TRUE;
            default:
                CPLError(CE_Failure, CPLE_IllegalArg, "Illegal field subtype value");
                return FALSE;
        }
    }

SWIGINTERN void delete_OGRFieldDefnShadow(OGRFieldDefnShadow *self){
    OGR_Fld_Destroy(self);
  }
SWIGINTERN OGRFieldDefnShadow *new_OGRFieldDefnShadow(char const *name_null_ok="unnamed",OGRFieldType field_type=OFTString){
    if (ValidateOGRFieldType(field_type))
        return (OGRFieldDefnShadow*) OGR_Fld_Create(name_null_ok, field_type);
    else
        return NULL;
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetName(OGRFieldDefnShadow *self){
    return (const char *) OGR_Fld_GetNameRef(self);
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetNameRef(OGRFieldDefnShadow *self){
    return (const char *) OGR_Fld_GetNameRef(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetName(OGRFieldDefnShadow *self,char const *name){
    OGR_Fld_SetName(self, name);
  }
SWIGINTERN OGRFieldType OGRFieldDefnShadow_GetType(OGRFieldDefnShadow *self){
    return OGR_Fld_GetType(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetType(OGRFieldDefnShadow *self,OGRFieldType type){
    if (ValidateOGRFieldType(type))
        OGR_Fld_SetType(self, type);
  }
SWIGINTERN OGRFieldSubType OGRFieldDefnShadow_GetSubType(OGRFieldDefnShadow *self){
    return OGR_Fld_GetSubType(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetSubType(OGRFieldDefnShadow *self,OGRFieldSubType type){
    if (ValidateOGRFieldSubType(type))
        OGR_Fld_SetSubType(self, type);
  }
SWIGINTERN OGRJustification OGRFieldDefnShadow_GetJustify(OGRFieldDefnShadow *self){
    return OGR_Fld_GetJustify(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetJustify(OGRFieldDefnShadow *self,OGRJustification justify){
    OGR_Fld_SetJustify(self, justify);
  }
SWIGINTERN int OGRFieldDefnShadow_GetWidth(OGRFieldDefnShadow *self){
    return OGR_Fld_GetWidth(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetWidth(OGRFieldDefnShadow *self,int width){
    OGR_Fld_SetWidth(self, width);
  }
SWIGINTERN int OGRFieldDefnShadow_GetPrecision(OGRFieldDefnShadow *self){
    return OGR_Fld_GetPrecision(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetPrecision(OGRFieldDefnShadow *self,int precision){
    OGR_Fld_SetPrecision(self, precision);
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetTypeName(OGRFieldDefnShadow *self){
      return OGR_GetFieldTypeName(OGR_Fld_GetType(self));
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetFieldTypeName(OGRFieldDefnShadow *self,OGRFieldType type){
    return OGR_GetFieldTypeName(type);
  }
SWIGINTERN int OGRFieldDefnShadow_IsIgnored(OGRFieldDefnShadow *self){
    return OGR_Fld_IsIgnored( self );
  }
SWIGINTERN void OGRFieldDefnShadow_SetIgnored(OGRFieldDefnShadow *self,int bIgnored){
    OGR_Fld_SetIgnored( self, bIgnored );
  }
SWIGINTERN int OGRFieldDefnShadow_IsNullable(OGRFieldDefnShadow *self){
    return OGR_Fld_IsNullable( self );
  }
SWIGINTERN void OGRFieldDefnShadow_SetNullable(OGRFieldDefnShadow *self,int bNullable){
    OGR_Fld_SetNullable( self, bNullable );
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetDefault(OGRFieldDefnShadow *self){
    return OGR_Fld_GetDefault( self );
  }
SWIGINTERN void OGRFieldDefnShadow_SetDefault(OGRFieldDefnShadow *self,char const *pszValue){
    OGR_Fld_SetDefault( self, pszValue );
  }
SWIGINTERN int OGRFieldDefnShadow_IsDefaultDriverSpecific(OGRFieldDefnShadow *self){
    return OGR_Fld_IsDefaultDriverSpecific( self );
  }
SWIGINTERN void delete_OGRGeomFieldDefnShadow(OGRGeomFieldDefnShadow *self){
    OGR_GFld_Destroy(self);
  }
SWIGINTERN OGRGeomFieldDefnShadow *new_OGRGeomFieldDefnShadow(char const *name_null_ok="",OGRwkbGeometryType field_type=wkbUnknown){
    if( ValidateOGRGeometryType(field_type) )
        return (OGRGeomFieldDefnShadow*) OGR_GFld_Create(name_null_ok, field_type);
    else
        return NULL;
  }
SWIGINTERN char const *OGRGeomFieldDefnShadow_GetName(OGRGeomFieldDefnShadow *self){
    return (const char *) OGR_GFld_GetNameRef(self);
  }
SWIGINTERN char const *OGRGeomFieldDefnShadow_GetNameRef(OGRGeomFieldDefnShadow *self){
    return (const char *) OGR_GFld_GetNameRef(self);
  }
SWIGINTERN void OGRGeomFieldDefnShadow_SetName(OGRGeomFieldDefnShadow *self,char const *name){
    OGR_GFld_SetName(self, name);
  }
SWIGINTERN OGRwkbGeometryType OGRGeomFieldDefnShadow_GetType(OGRGeomFieldDefnShadow *self){
    return OGR_GFld_GetType(self);
  }
SWIGINTERN void OGRGeomFieldDefnShadow_SetType(OGRGeomFieldDefnShadow *self,OGRwkbGeometryType type){
    if( ValidateOGRGeometryType(type) )
        OGR_GFld_SetType(self, type);
  }
SWIGINTERN OSRSpatialReferenceShadow *OGRGeomFieldDefnShadow_GetSpatialRef(OGRGeomFieldDefnShadow *self){
    OGRSpatialReferenceH ref =  OGR_GFld_GetSpatialRef(self);
    if( ref )
        OSRReference(ref);
    return (OSRSpatialReferenceShadow*) ref;
  }
SWIGINTERN void OGRGeomFieldDefnShadow_SetSpatialRef(OGRGeomFieldDefnShadow *self,OSRSpatialReferenceShadow *srs){
     OGR_GFld_SetSpatialRef( self, (OGRSpatialReferenceH)srs );
  }
SWIGINTERN int OGRGeomFieldDefnShadow_IsIgnored(OGRGeomFieldDefnShadow *self){
    return OGR_GFld_IsIgnored( self );
  }
SWIGINTERN void OGRGeomFieldDefnShadow_SetIgnored(OGRGeomFieldDefnShadow *self,int bIgnored){
    OGR_GFld_SetIgnored( self, bIgnored );
  }
SWIGINTERN int OGRGeomFieldDefnShadow_IsNullable(OGRGeomFieldDefnShadow *self){
    return OGR_GFld_IsNullable( self );
  }
SWIGINTERN void OGRGeomFieldDefnShadow_SetNullable(OGRGeomFieldDefnShadow *self,int bNullable){
    return OGR_GFld_SetNullable( self, bNullable );
  }

  OGRGeometryShadow* CreateGeometryFromWkb( int len, char *bin_string,
                                            OSRSpatialReferenceShadow *reference=NULL ) {
    OGRGeometryH geom = NULL;
    OGRErr err = OGR_G_CreateFromWkb( (unsigned char *) bin_string,
                                      reference,
                                      &geom,
                                      len );
    if (err != 0 ) {
       CPLError(CE_Failure, err, "%s", OGRErrMessages(err));
       return NULL;
    }
    return (OGRGeometryShadow*) geom;
  }



  OGRGeometryShadow* CreateGeometryFromWkt( char **val,
                                      OSRSpatialReferenceShadow *reference=NULL ) {
    OGRGeometryH geom = NULL;
    OGRErr err = OGR_G_CreateFromWkt(val,
                                      reference,
                                      &geom);
    if (err != 0 ) {
       CPLError(CE_Failure, err, "%s", OGRErrMessages(err));
       return NULL;
    }
    return (OGRGeometryShadow*) geom;
  }



  OGRGeometryShadow *CreateGeometryFromGML( const char * input_string ) {
    OGRGeometryShadow* geom = (OGRGeometryShadow*)OGR_G_CreateFromGML(input_string);
    return geom;
  }



  OGRGeometryShadow *CreateGeometryFromJson( const char * input_string ) {
    OGRGeometryShadow* geom = (OGRGeometryShadow*)OGR_G_CreateGeometryFromJson(input_string);
    return geom;
  }



  OGRGeometryShadow* BuildPolygonFromEdges( OGRGeometryShadow*  hLineCollection,
                                            int bBestEffort = 0,
                                            int bAutoClose = 0,
                                            double dfTolerance=0) {

  OGRGeometryH hPolygon = NULL;

  OGRErr eErr;

  hPolygon = OGRBuildPolygonFromEdges( hLineCollection, bBestEffort,
                                       bAutoClose, dfTolerance, &eErr );

  if (eErr != OGRERR_NONE ) {
    CPLError(CE_Failure, eErr, "%s", OGRErrMessages(eErr));
    return NULL;
  }

  return (OGRGeometryShadow* )hPolygon;
  }


  OGRGeometryShadow* ApproximateArcAngles(
        double dfCenterX, double dfCenterY, double dfZ,
  	double dfPrimaryRadius, double dfSecondaryAxis, double dfRotation,
        double dfStartAngle, double dfEndAngle,
        double dfMaxAngleStepSizeDegrees ) {

  return (OGRGeometryShadow* )OGR_G_ApproximateArcAngles(
             dfCenterX, dfCenterY, dfZ,
             dfPrimaryRadius, dfSecondaryAxis, dfRotation,
             dfStartAngle, dfEndAngle, dfMaxAngleStepSizeDegrees );
  }


OGRGeometryShadow* ForceToPolygon( OGRGeometryShadow *geom_in ) {
 if (geom_in == NULL)
     return NULL;
 return (OGRGeometryShadow* )OGR_G_ForceToPolygon( OGR_G_Clone(geom_in) );
}


OGRGeometryShadow* ForceToLineString( OGRGeometryShadow *geom_in ) {
 if (geom_in == NULL)
     return NULL;
 return (OGRGeometryShadow* )OGR_G_ForceToLineString( OGR_G_Clone(geom_in) );
}


OGRGeometryShadow* ForceToMultiPolygon( OGRGeometryShadow *geom_in ) {
 if (geom_in == NULL)
     return NULL;
 return (OGRGeometryShadow* )OGR_G_ForceToMultiPolygon( OGR_G_Clone(geom_in) );
}


OGRGeometryShadow* ForceToMultiPoint( OGRGeometryShadow *geom_in ) {
 if (geom_in == NULL)
     return NULL;
 return (OGRGeometryShadow* )OGR_G_ForceToMultiPoint( OGR_G_Clone(geom_in) );
}


OGRGeometryShadow* ForceToMultiLineString( OGRGeometryShadow *geom_in ) {
 if (geom_in == NULL)
     return NULL;
 return (OGRGeometryShadow* )OGR_G_ForceToMultiLineString( OGR_G_Clone(geom_in) );
}


OGRGeometryShadow* ForceTo( OGRGeometryShadow *geom_in, OGRwkbGeometryType eTargetType, char** options = NULL ) {
 if (geom_in == NULL)
     return NULL;
 return (OGRGeometryShadow* )OGR_G_ForceTo( OGR_G_Clone(geom_in), eTargetType, options );
}

SWIGINTERN void delete_OGRGeometryShadow(OGRGeometryShadow *self){
    OGR_G_DestroyGeometry( self );
  }
SWIGINTERN OGRGeometryShadow *new_OGRGeometryShadow(OGRwkbGeometryType type=wkbUnknown,char *wkt=0,int wkb=0,char *wkb_buf=0,char *gml=0){
    if (type != wkbUnknown ) {
      return (OGRGeometryShadow*) OGR_G_CreateGeometry( type );
    }
    else if ( wkt != 0 ) {
      return CreateGeometryFromWkt( &wkt );
    }
    else if ( wkb != 0 ) {
      return CreateGeometryFromWkb( wkb, wkb_buf );
    }
    else if ( gml != 0 ) {
      return CreateGeometryFromGML( gml );
    }
    // throw?
    else {
        CPLError(CE_Failure, 1, "Empty geometries cannot be constructed");
        return NULL;}

  }

#define t_output_helper SWIG_Python_AppendOutput

SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkt(OGRGeometryShadow *self,char **argout){
    return OGR_G_ExportToWkt(self, argout);
  }
SWIGINTERN OGRErr OGRGeometryShadow_ExportToIsoWkt(OGRGeometryShadow *self,char **argout){
    return OGR_G_ExportToIsoWkt(self, argout);
  }
SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkb(OGRGeometryShadow *self,int *nLen,char **pBuf,OGRwkbByteOrder byte_order=wkbXDR){
    *nLen = OGR_G_WkbSize( self );
    *pBuf = (char *) malloc( *nLen );
    return OGR_G_ExportToWkb(self, byte_order, (unsigned char*) *pBuf );
  }
SWIGINTERN OGRErr OGRGeometryShadow_ExportToIsoWkb(OGRGeometryShadow *self,int *nLen,char **pBuf,OGRwkbByteOrder byte_order=wkbXDR){
    *nLen = OGR_G_WkbSize( self );
    *pBuf = (char *) malloc( *nLen );
    return OGR_G_ExportToIsoWkb(self, byte_order, (unsigned char*) *pBuf );
  }
SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToGML(OGRGeometryShadow *self,char **options=0){
    return (retStringAndCPLFree*) OGR_G_ExportToGMLEx(self, options);
  }
SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToKML(OGRGeometryShadow *self,char const *altitude_mode=NULL){
    return (retStringAndCPLFree *) OGR_G_ExportToKML(self, altitude_mode);
  }
SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToJson(OGRGeometryShadow *self,char **options=0){
    return (retStringAndCPLFree *) OGR_G_ExportToJsonEx(self, options);
  }
SWIGINTERN void OGRGeometryShadow_AddPoint(OGRGeometryShadow *self,double x,double y,double z=0){
    OGR_G_AddPoint( self, x, y, z );
  }
SWIGINTERN void OGRGeometryShadow_AddPointM(OGRGeometryShadow *self,double x,double y,double m){
      OGR_G_AddPointM( self, x, y, m );
  }
SWIGINTERN void OGRGeometryShadow_AddPointZM(OGRGeometryShadow *self,double x,double y,double z,double m){
      OGR_G_AddPointZM( self, x, y, z, m );
  }
SWIGINTERN void OGRGeometryShadow_AddPoint_2D(OGRGeometryShadow *self,double x,double y){
    OGR_G_AddPoint_2D( self, x, y );
  }
SWIGINTERN OGRErr OGRGeometryShadow_AddGeometryDirectly(OGRGeometryShadow *self,OGRGeometryShadow *other_disown){
    return OGR_G_AddGeometryDirectly( self, other_disown );
  }
SWIGINTERN OGRErr OGRGeometryShadow_AddGeometry(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_AddGeometry( self, other );
  }
SWIGINTERN OGRErr OGRGeometryShadow_RemoveGeometry(OGRGeometryShadow *self,int iSubGeom){
    return OGR_G_RemoveGeometry( self, iSubGeom, TRUE );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Clone(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Clone(self);
  }
SWIGINTERN OGRwkbGeometryType OGRGeometryShadow_GetGeometryType(OGRGeometryShadow *self){
    return (OGRwkbGeometryType) OGR_G_GetGeometryType(self);
  }
SWIGINTERN char const *OGRGeometryShadow_GetGeometryName(OGRGeometryShadow *self){
    return (const char *) OGR_G_GetGeometryName(self);
  }
SWIGINTERN double OGRGeometryShadow_Length(OGRGeometryShadow *self){
    return OGR_G_Length(self);
  }
SWIGINTERN double OGRGeometryShadow_Area(OGRGeometryShadow *self){
    return OGR_G_Area(self);
  }
SWIGINTERN double OGRGeometryShadow_GetArea(OGRGeometryShadow *self){
    return OGR_G_Area(self);
  }
SWIGINTERN int OGRGeometryShadow_GetPointCount(OGRGeometryShadow *self){
    return OGR_G_GetPointCount(self);
  }
SWIGINTERN void OGRGeometryShadow_GetPoints(OGRGeometryShadow *self,int *pnCount,double **ppadfXY,double **ppadfZ,int nCoordDimension=0){
    int nPoints = OGR_G_GetPointCount(self);
    *pnCount = nPoints;
    if (nPoints == 0)
    {
        *ppadfXY = NULL;
        *ppadfZ = NULL;
    }
    *ppadfXY = (double*)VSIMalloc(2 * sizeof(double) * nPoints);
    if (*ppadfXY == NULL)
    {
        CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate resulting array");
        *pnCount = 0;
        return;
    }
    if (nCoordDimension <= 0)
        nCoordDimension = OGR_G_GetCoordinateDimension(self);
    *ppadfZ = (nCoordDimension == 3) ? (double*)VSIMalloc(sizeof(double) * nPoints) : NULL;
    OGR_G_GetPoints(self,
                    *ppadfXY, 2 * sizeof(double),
                    (*ppadfXY) + 1, 2 * sizeof(double),
                    *ppadfZ, sizeof(double));
  }
SWIGINTERN double OGRGeometryShadow_GetX(OGRGeometryShadow *self,int point=0){
    return OGR_G_GetX(self, point);
  }
SWIGINTERN double OGRGeometryShadow_GetY(OGRGeometryShadow *self,int point=0){
    return OGR_G_GetY(self, point);
  }
SWIGINTERN double OGRGeometryShadow_GetZ(OGRGeometryShadow *self,int point=0){
    return OGR_G_GetZ(self, point);
  }
SWIGINTERN double OGRGeometryShadow_GetM(OGRGeometryShadow *self,int point=0){
    return OGR_G_GetM(self, point);
  }

static PyObject *
CreateTupleFromDoubleArray( double *first, unsigned int size ) {
  PyObject *out = PyTuple_New( size );
  for( unsigned int i=0; i<size; i++ ) {
    PyObject *val = PyFloat_FromDouble( *first );
    ++first;
    PyTuple_SetItem( out, i, val );
  }
  return out;
}

SWIGINTERN void OGRGeometryShadow_GetPoint(OGRGeometryShadow *self,int iPoint=0,double argout[3]=NULL){

    OGR_G_GetPoint( self, iPoint, argout+0, argout+1, argout+2 );
  }
SWIGINTERN void OGRGeometryShadow_GetPointZM(OGRGeometryShadow *self,int iPoint=0,double argout[4]=NULL){

      OGR_G_GetPointZM( self, iPoint, argout+0, argout+1, argout+2, argout+3 );
  }
SWIGINTERN void OGRGeometryShadow_GetPoint_2D(OGRGeometryShadow *self,int iPoint=0,double argout[2]=NULL){

    OGR_G_GetPoint( self, iPoint, argout+0, argout+1, NULL );
  }
SWIGINTERN int OGRGeometryShadow_GetGeometryCount(OGRGeometryShadow *self){
    return OGR_G_GetGeometryCount(self);
  }
SWIGINTERN void OGRGeometryShadow_SetPoint(OGRGeometryShadow *self,int point,double x,double y,double z=0){
    OGR_G_SetPoint(self, point, x, y, z);
  }
SWIGINTERN void OGRGeometryShadow_SetPointM(OGRGeometryShadow *self,int point,double x,double y,double m){
      OGR_G_SetPointM(self, point, x, y, m);
  }
SWIGINTERN void OGRGeometryShadow_SetPointZM(OGRGeometryShadow *self,int point,double x,double y,double z,double m){
      OGR_G_SetPointZM(self, point, x, y, z, m);
  }
SWIGINTERN void OGRGeometryShadow_SetPoint_2D(OGRGeometryShadow *self,int point,double x,double y){
    OGR_G_SetPoint_2D(self, point, x, y);
  }
SWIGINTERN void OGRGeometryShadow_SwapXY(OGRGeometryShadow *self){
    OGR_G_SwapXY(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetGeometryRef(OGRGeometryShadow *self,int geom){
    return (OGRGeometryShadow*) OGR_G_GetGeometryRef(self, geom);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Simplify(OGRGeometryShadow *self,double tolerance){
    return (OGRGeometryShadow*) OGR_G_Simplify(self, tolerance);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SimplifyPreserveTopology(OGRGeometryShadow *self,double tolerance){
    return (OGRGeometryShadow*) OGR_G_SimplifyPreserveTopology(self, tolerance);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_DelaunayTriangulation(OGRGeometryShadow *self,double dfTolerance=0.0,int bOnlyEdges=FALSE){
    return (OGRGeometryShadow*) OGR_G_DelaunayTriangulation(self, dfTolerance, bOnlyEdges);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Polygonize(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Polygonize(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Boundary(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Boundary(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetBoundary(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Boundary(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_ConvexHull(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_ConvexHull(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Buffer(OGRGeometryShadow *self,double distance,int quadsecs=30){
    return (OGRGeometryShadow*) OGR_G_Buffer( self, distance, quadsecs );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Intersection(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_Intersection( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Union(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_Union( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_UnionCascaded(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_UnionCascaded( self );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Difference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_Difference( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymmetricDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
  }
SWIGINTERN double OGRGeometryShadow_Distance(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_Distance(self, other);
  }
SWIGINTERN double OGRGeometryShadow_Distance3D(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_Distance3D(self, other);
  }
SWIGINTERN void OGRGeometryShadow_Empty(OGRGeometryShadow *self){
    OGR_G_Empty(self);
  }
SWIGINTERN bool OGRGeometryShadow_IsEmpty(OGRGeometryShadow *self){
    return (OGR_G_IsEmpty(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_IsValid(OGRGeometryShadow *self){
    return (OGR_G_IsValid(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_IsSimple(OGRGeometryShadow *self){
    return (OGR_G_IsSimple(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_IsRing(OGRGeometryShadow *self){
    return (OGR_G_IsRing(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Intersects(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Intersects(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Intersect(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Intersects(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Equals(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Equals(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Equal(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Equals(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Disjoint(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Disjoint(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Touches(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Touches(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Crosses(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Crosses(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Within(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Within(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Contains(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Contains(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Overlaps(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Overlaps(self, other) > 0);
  }
SWIGINTERN OGRErr OGRGeometryShadow_TransformTo(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
    return OGR_G_TransformTo(self, reference);
  }
SWIGINTERN OGRErr OGRGeometryShadow_Transform(OGRGeometryShadow *self,OSRCoordinateTransformationShadow *trans){
    return OGR_G_Transform(self, trans);
  }
SWIGINTERN OSRSpatialReferenceShadow *OGRGeometryShadow_GetSpatialReference(OGRGeometryShadow *self){
    OGRSpatialReferenceH ref =  OGR_G_GetSpatialReference(self);
    if( ref )
        OSRReference(ref);
    return (OSRSpatialReferenceShadow*) ref;
  }
SWIGINTERN void OGRGeometryShadow_AssignSpatialReference(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
    OGR_G_AssignSpatialReference(self, reference);
  }
SWIGINTERN void OGRGeometryShadow_CloseRings(OGRGeometryShadow *self){
    OGR_G_CloseRings(self);
  }
SWIGINTERN void OGRGeometryShadow_FlattenTo2D(OGRGeometryShadow *self){
    OGR_G_FlattenTo2D(self);
  }
SWIGINTERN void OGRGeometryShadow_Segmentize(OGRGeometryShadow *self,double dfMaxLength){
    OGR_G_Segmentize(self, dfMaxLength);
  }
SWIGINTERN void OGRGeometryShadow_GetEnvelope(OGRGeometryShadow *self,double argout[4]){
    OGR_G_GetEnvelope(self, (OGREnvelope*)argout);
  }
SWIGINTERN void OGRGeometryShadow_GetEnvelope3D(OGRGeometryShadow *self,double argout[6]){
    OGR_G_GetEnvelope3D(self, (OGREnvelope3D*)argout);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Centroid(OGRGeometryShadow *self){
    OGRGeometryShadow *pt = (OGRGeometryShadow*) OGR_G_CreateGeometry( wkbPoint );
    OGR_G_Centroid( self, pt );
    return pt;
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_PointOnSurface(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_PointOnSurface( self );
  }
SWIGINTERN int OGRGeometryShadow_WkbSize(OGRGeometryShadow *self){
    return OGR_G_WkbSize(self);
  }
SWIGINTERN int OGRGeometryShadow_GetCoordinateDimension(OGRGeometryShadow *self){
    return OGR_G_GetCoordinateDimension(self);
  }
SWIGINTERN int OGRGeometryShadow_CoordinateDimension(OGRGeometryShadow *self){
    return OGR_G_CoordinateDimension(self);
  }
SWIGINTERN int OGRGeometryShadow_Is3D(OGRGeometryShadow *self){
      return OGR_G_Is3D(self);
  }
SWIGINTERN int OGRGeometryShadow_IsMeasured(OGRGeometryShadow *self){
      return OGR_G_IsMeasured(self);
  }
SWIGINTERN void OGRGeometryShadow_SetCoordinateDimension(OGRGeometryShadow *self,int dimension){
    OGR_G_SetCoordinateDimension(self, dimension);
  }
SWIGINTERN void OGRGeometryShadow_Set3D(OGRGeometryShadow *self,int b3D){
      OGR_G_Set3D(self, b3D);
  }
SWIGINTERN void OGRGeometryShadow_SetMeasured(OGRGeometryShadow *self,int bMeasured){
      OGR_G_SetMeasured(self, bMeasured);
  }
SWIGINTERN int OGRGeometryShadow_GetDimension(OGRGeometryShadow *self){
    return OGR_G_GetDimension(self);
  }
SWIGINTERN int OGRGeometryShadow_HasCurveGeometry(OGRGeometryShadow *self,int bLookForCircular=FALSE){
        return OGR_G_HasCurveGeometry(self, bLookForCircular);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetLinearGeometry(OGRGeometryShadow *self,double dfMaxAngleStepSizeDegrees=0.0,char **options=NULL){
    return (OGRGeometryShadow* )OGR_G_GetLinearGeometry(self, dfMaxAngleStepSizeDegrees, options);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetCurveGeometry(OGRGeometryShadow *self,char **options=NULL){
    return (OGRGeometryShadow* )OGR_G_GetCurveGeometry(self, options);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Value(OGRGeometryShadow *self,double dfDistance){
    return OGR_G_Value(self, dfDistance);
  }

char const *OGRDriverShadow_get_name( OGRDriverShadow *h ) {
  return OGR_Dr_GetName( h );
}

char const *OGRDataSourceShadow_get_name( OGRDataSourceShadow *h ) {
  return OGR_DS_GetName( h );
}

char const *OGRDriverShadow_name_get( OGRDriverShadow *h ) {
  return OGR_Dr_GetName( h );
}

char const *OGRDataSourceShadow_name_get( OGRDataSourceShadow *h ) {
  return OGR_DS_GetName( h );
}


OGRwkbGeometryType GT_SetModifier( OGRwkbGeometryType eType, int bSetZ, int bSetM = FALSE)
{
    return OGR_GT_SetModifier(eType, bSetZ, bSetM);
}


  OGRDataSourceShadow* GetOpenDS(int ds_number) {
    OGRDataSourceShadow* layer = (OGRDataSourceShadow*) OGRGetOpenDS(ds_number);
    return layer;
  }


  OGRDataSourceShadow* Open( const char *utf8_path, int update =0 ) {
    CPLErrorReset();
    OGRDataSourceShadow* ds = (OGRDataSourceShadow*)OGROpen(utf8_path,update,NULL);
#ifndef SWIGPYTHON
    if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
    {
        CPLDebug( "SWIG",
		  "OGROpen() succeeded, but an error is posted, so we destroy"
		  " the datasource and fail at swig level." );
        OGRReleaseDataSource(ds);
        ds = NULL;
    }
#endif
    return ds;
  }


  OGRDataSourceShadow* OpenShared( const char *utf8_path, int update =0 ) {
    CPLErrorReset();
    OGRDataSourceShadow* ds = (OGRDataSourceShadow*)OGROpenShared(utf8_path,update,NULL);
#ifndef SWIGPYTHON
    if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
    {
        OGRReleaseDataSource(ds);
        ds = NULL;
    }
#endif
    return ds;
  }


static
OGRDriverShadow* GetDriverByName( char const *name ) {
  return (OGRDriverShadow*) OGRGetDriverByName( name );
}

static
OGRDriverShadow* GetDriver(int driver_number) {
  return (OGRDriverShadow*) OGRGetDriver(driver_number);
}


  char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
    int nResArgCount;

    if( papszArgv == NULL )
        return NULL;

    nResArgCount =
      GDALGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, GDAL_OF_VECTOR | nOptions );

    if( nResArgCount <= 0 )
        return NULL;
    else
        return papszArgv;
  }


static
int GDALTermProgress_nocb( double dfProgress, const char * pszMessage=NULL, void *pData=NULL ) {
  return GDALTermProgress( dfProgress, pszMessage, pData);
}

#ifdef __cplusplus
extern "C" {
#endif
SWIGINTERN PyObject *wkb25DBit_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkb25DBit",SWIG_From_int(static_cast< int >(0x80000000)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkb25Bit_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkb25Bit",SWIG_From_int(static_cast< int >(0x80000000)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbUnknown_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbUnknown",SWIG_From_int(static_cast< int >(0)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbPoint_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbPoint",SWIG_From_int(static_cast< int >(1)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbLineString_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbLineString",SWIG_From_int(static_cast< int >(2)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbPolygon_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbPolygon",SWIG_From_int(static_cast< int >(3)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiPoint_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiPoint",SWIG_From_int(static_cast< int >(4)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiLineString_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiLineString",SWIG_From_int(static_cast< int >(5)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiPolygon_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiPolygon",SWIG_From_int(static_cast< int >(6)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbGeometryCollection_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbGeometryCollection",SWIG_From_int(static_cast< int >(7)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbCircularString_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbCircularString",SWIG_From_int(static_cast< int >(8)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbCompoundCurve_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbCompoundCurve",SWIG_From_int(static_cast< int >(9)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbCurvePolygon_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbCurvePolygon",SWIG_From_int(static_cast< int >(10)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiCurve_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiCurve",SWIG_From_int(static_cast< int >(11)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiSurface_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiSurface",SWIG_From_int(static_cast< int >(12)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbCurve_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbCurve",SWIG_From_int(static_cast< int >(13)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbSurface_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbSurface",SWIG_From_int(static_cast< int >(14)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbPolyhedralSurface_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbPolyhedralSurface",SWIG_From_int(static_cast< int >(15)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbTIN_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbTIN",SWIG_From_int(static_cast< int >(16)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbTriangle_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbTriangle",SWIG_From_int(static_cast< int >(17)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbNone_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbNone",SWIG_From_int(static_cast< int >(100)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbLinearRing_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbLinearRing",SWIG_From_int(static_cast< int >(101)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbCircularStringZ_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbCircularStringZ",SWIG_From_int(static_cast< int >(1008)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbCompoundCurveZ_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbCompoundCurveZ",SWIG_From_int(static_cast< int >(1009)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbCurvePolygonZ_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbCurvePolygonZ",SWIG_From_int(static_cast< int >(1010)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiCurveZ_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiCurveZ",SWIG_From_int(static_cast< int >(1011)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiSurfaceZ_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiSurfaceZ",SWIG_From_int(static_cast< int >(1012)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbCurveZ_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbCurveZ",SWIG_From_int(static_cast< int >(1013)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbSurfaceZ_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbSurfaceZ",SWIG_From_int(static_cast< int >(1014)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbPolyhedralSurfaceZ_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbPolyhedralSurfaceZ",SWIG_From_int(static_cast< int >(1015)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbTINZ_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbTINZ",SWIG_From_int(static_cast< int >(1016)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbTriangleZ_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbTriangleZ",SWIG_From_int(static_cast< int >(1017)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbPointM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbPointM",SWIG_From_int(static_cast< int >(2001)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbLineStringM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbLineStringM",SWIG_From_int(static_cast< int >(2002)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbPolygonM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbPolygonM",SWIG_From_int(static_cast< int >(2003)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiPointM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiPointM",SWIG_From_int(static_cast< int >(2004)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiLineStringM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiLineStringM",SWIG_From_int(static_cast< int >(2005)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiPolygonM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiPolygonM",SWIG_From_int(static_cast< int >(2006)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbGeometryCollectionM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbGeometryCollectionM",SWIG_From_int(static_cast< int >(2007)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbCircularStringM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbCircularStringM",SWIG_From_int(static_cast< int >(2008)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbCompoundCurveM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbCompoundCurveM",SWIG_From_int(static_cast< int >(2009)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbCurvePolygonM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbCurvePolygonM",SWIG_From_int(static_cast< int >(2010)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiCurveM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiCurveM",SWIG_From_int(static_cast< int >(2011)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiSurfaceM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiSurfaceM",SWIG_From_int(static_cast< int >(2012)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbCurveM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbCurveM",SWIG_From_int(static_cast< int >(2013)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbSurfaceM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbSurfaceM",SWIG_From_int(static_cast< int >(2014)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbPolyhedralSurfaceM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbPolyhedralSurfaceM",SWIG_From_int(static_cast< int >(2015)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbTINM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbTINM",SWIG_From_int(static_cast< int >(2016)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbTriangleM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbTriangleM",SWIG_From_int(static_cast< int >(2017)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbPointZM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbPointZM",SWIG_From_int(static_cast< int >(3001)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbLineStringZM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbLineStringZM",SWIG_From_int(static_cast< int >(3002)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbPolygonZM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbPolygonZM",SWIG_From_int(static_cast< int >(3003)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiPointZM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiPointZM",SWIG_From_int(static_cast< int >(3004)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiLineStringZM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiLineStringZM",SWIG_From_int(static_cast< int >(3005)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiPolygonZM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiPolygonZM",SWIG_From_int(static_cast< int >(3006)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbGeometryCollectionZM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbGeometryCollectionZM",SWIG_From_int(static_cast< int >(3007)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbCircularStringZM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbCircularStringZM",SWIG_From_int(static_cast< int >(3008)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbCompoundCurveZM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbCompoundCurveZM",SWIG_From_int(static_cast< int >(3009)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbCurvePolygonZM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbCurvePolygonZM",SWIG_From_int(static_cast< int >(3010)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiCurveZM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiCurveZM",SWIG_From_int(static_cast< int >(3011)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiSurfaceZM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiSurfaceZM",SWIG_From_int(static_cast< int >(3012)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbCurveZM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbCurveZM",SWIG_From_int(static_cast< int >(3013)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbSurfaceZM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbSurfaceZM",SWIG_From_int(static_cast< int >(3014)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbPolyhedralSurfaceZM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbPolyhedralSurfaceZM",SWIG_From_int(static_cast< int >(3015)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbTINZM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbTINZM",SWIG_From_int(static_cast< int >(3016)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbTriangleZM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbTriangleZM",SWIG_From_int(static_cast< int >(3017)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbPoint25D_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbPoint25D",SWIG_From_int(static_cast< int >(0x80000001)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbLineString25D_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbLineString25D",SWIG_From_int(static_cast< int >(0x80000002)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbPolygon25D_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbPolygon25D",SWIG_From_int(static_cast< int >(0x80000003)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiPoint25D_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiPoint25D",SWIG_From_int(static_cast< int >(0x80000004)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiLineString25D_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiLineString25D",SWIG_From_int(static_cast< int >(0x80000005)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbMultiPolygon25D_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbMultiPolygon25D",SWIG_From_int(static_cast< int >(0x80000006)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbGeometryCollection25D_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbGeometryCollection25D",SWIG_From_int(static_cast< int >(0x80000007)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFTInteger_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFTInteger",SWIG_From_int(static_cast< int >(0)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFTIntegerList_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFTIntegerList",SWIG_From_int(static_cast< int >(1)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFTReal_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFTReal",SWIG_From_int(static_cast< int >(2)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFTRealList_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFTRealList",SWIG_From_int(static_cast< int >(3)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFTString_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFTString",SWIG_From_int(static_cast< int >(4)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFTStringList_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFTStringList",SWIG_From_int(static_cast< int >(5)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFTWideString_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFTWideString",SWIG_From_int(static_cast< int >(6)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFTWideStringList_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFTWideStringList",SWIG_From_int(static_cast< int >(7)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFTBinary_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFTBinary",SWIG_From_int(static_cast< int >(8)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFTDate_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFTDate",SWIG_From_int(static_cast< int >(9)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFTTime_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFTTime",SWIG_From_int(static_cast< int >(10)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFTDateTime_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFTDateTime",SWIG_From_int(static_cast< int >(11)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFTInteger64_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFTInteger64",SWIG_From_int(static_cast< int >(12)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFTInteger64List_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFTInteger64List",SWIG_From_int(static_cast< int >(13)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFSTNone_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFSTNone",SWIG_From_int(static_cast< int >(0)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFSTBoolean_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFSTBoolean",SWIG_From_int(static_cast< int >(1)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFSTInt16_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFSTInt16",SWIG_From_int(static_cast< int >(2)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OFSTFloat32_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OFSTFloat32",SWIG_From_int(static_cast< int >(3)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OJUndefined_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OJUndefined",SWIG_From_int(static_cast< int >(0)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OJLeft_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OJLeft",SWIG_From_int(static_cast< int >(1)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OJRight_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OJRight",SWIG_From_int(static_cast< int >(2)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbXDR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbXDR",SWIG_From_int(static_cast< int >(0)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *wkbNDR_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "wkbNDR",SWIG_From_int(static_cast< int >(1)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *NullFID_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "NullFID",SWIG_From_int(static_cast< int >(-1)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *ALTER_NAME_FLAG_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "ALTER_NAME_FLAG",SWIG_From_int(static_cast< int >(1)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *ALTER_TYPE_FLAG_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "ALTER_TYPE_FLAG",SWIG_From_int(static_cast< int >(2)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *ALTER_WIDTH_PRECISION_FLAG_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "ALTER_WIDTH_PRECISION_FLAG",SWIG_From_int(static_cast< int >(4)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *ALTER_NULLABLE_FLAG_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "ALTER_NULLABLE_FLAG",SWIG_From_int(static_cast< int >(8)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *ALTER_DEFAULT_FLAG_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "ALTER_DEFAULT_FLAG",SWIG_From_int(static_cast< int >(16)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *ALTER_ALL_FLAG_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "ALTER_ALL_FLAG",SWIG_From_int(static_cast< int >(1+2+4+8+16)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *F_VAL_NULL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "F_VAL_NULL",SWIG_From_int(static_cast< int >(0x00000001)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *F_VAL_GEOM_TYPE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "F_VAL_GEOM_TYPE",SWIG_From_int(static_cast< int >(0x00000002)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *F_VAL_WIDTH_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "F_VAL_WIDTH",SWIG_From_int(static_cast< int >(0x00000004)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *F_VAL_ALLOW_NULL_WHEN_DEFAULT_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "F_VAL_ALLOW_NULL_WHEN_DEFAULT",SWIG_From_int(static_cast< int >(0x00000008)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *F_VAL_ALL_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "F_VAL_ALL",SWIG_From_int(static_cast< int >(0xFFFFFFFF)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCRandomRead_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCRandomRead",SWIG_FromCharPtr("RandomRead"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCSequentialWrite_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCSequentialWrite",SWIG_FromCharPtr("SequentialWrite"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCRandomWrite_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCRandomWrite",SWIG_FromCharPtr("RandomWrite"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCFastSpatialFilter_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCFastSpatialFilter",SWIG_FromCharPtr("FastSpatialFilter"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCFastFeatureCount_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCFastFeatureCount",SWIG_FromCharPtr("FastFeatureCount"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCFastGetExtent_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCFastGetExtent",SWIG_FromCharPtr("FastGetExtent"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCCreateField_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCCreateField",SWIG_FromCharPtr("CreateField"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCDeleteField_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCDeleteField",SWIG_FromCharPtr("DeleteField"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCReorderFields_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCReorderFields",SWIG_FromCharPtr("ReorderFields"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCAlterFieldDefn_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCAlterFieldDefn",SWIG_FromCharPtr("AlterFieldDefn"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCTransactions_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCTransactions",SWIG_FromCharPtr("Transactions"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCDeleteFeature_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCDeleteFeature",SWIG_FromCharPtr("DeleteFeature"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCFastSetNextByIndex_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCFastSetNextByIndex",SWIG_FromCharPtr("FastSetNextByIndex"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCStringsAsUTF8_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCStringsAsUTF8",SWIG_FromCharPtr("StringsAsUTF8"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCIgnoreFields_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCIgnoreFields",SWIG_FromCharPtr("IgnoreFields"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCCreateGeomField_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCCreateGeomField",SWIG_FromCharPtr("CreateGeomField"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCCurveGeometries_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCCurveGeometries",SWIG_FromCharPtr("CurveGeometries"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLCMeasuredGeometries_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLCMeasuredGeometries",SWIG_FromCharPtr("MeasuredGeometries"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *ODsCCreateLayer_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "ODsCCreateLayer",SWIG_FromCharPtr("CreateLayer"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *ODsCDeleteLayer_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "ODsCDeleteLayer",SWIG_FromCharPtr("DeleteLayer"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *ODsCCreateGeomFieldAfterCreateLayer_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "ODsCCreateGeomFieldAfterCreateLayer",SWIG_FromCharPtr("CreateGeomFieldAfterCreateLayer"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *ODsCCurveGeometries_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "ODsCCurveGeometries",SWIG_FromCharPtr("CurveGeometries"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *ODsCTransactions_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "ODsCTransactions",SWIG_FromCharPtr("Transactions"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *ODsCEmulatedTransactions_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "ODsCEmulatedTransactions",SWIG_FromCharPtr("EmulatedTransactions"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *ODsCMeasuredGeometries_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "ODsCMeasuredGeometries",SWIG_FromCharPtr("MeasuredGeometries"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *ODsCRandomLayerRead_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "ODsCRandomLayerRead",SWIG_FromCharPtr("RandomLayerRead"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *ODsCRandomLayerWrite_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "ODsCRandomLayerWrite",SWIG_FromCharPtr("RandomLayerWrite"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *ODrCCreateDataSource_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "ODrCCreateDataSource",SWIG_FromCharPtr("CreateDataSource"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *ODrCDeleteDataSource_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "ODrCDeleteDataSource",SWIG_FromCharPtr("DeleteDataSource"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OLMD_FID64_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OLMD_FID64",SWIG_FromCharPtr("OLMD_FID64"));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OGRERR_NONE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OGRERR_NONE",SWIG_From_int(static_cast< int >(0)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OGRERR_NOT_ENOUGH_DATA_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OGRERR_NOT_ENOUGH_DATA",SWIG_From_int(static_cast< int >(1)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OGRERR_NOT_ENOUGH_MEMORY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OGRERR_NOT_ENOUGH_MEMORY",SWIG_From_int(static_cast< int >(2)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OGRERR_UNSUPPORTED_GEOMETRY_TYPE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OGRERR_UNSUPPORTED_GEOMETRY_TYPE",SWIG_From_int(static_cast< int >(3)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OGRERR_UNSUPPORTED_OPERATION_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OGRERR_UNSUPPORTED_OPERATION",SWIG_From_int(static_cast< int >(4)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OGRERR_CORRUPT_DATA_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OGRERR_CORRUPT_DATA",SWIG_From_int(static_cast< int >(5)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OGRERR_FAILURE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OGRERR_FAILURE",SWIG_From_int(static_cast< int >(6)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OGRERR_UNSUPPORTED_SRS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OGRERR_UNSUPPORTED_SRS",SWIG_From_int(static_cast< int >(7)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OGRERR_INVALID_HANDLE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OGRERR_INVALID_HANDLE",SWIG_From_int(static_cast< int >(8)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *OGRERR_NON_EXISTING_FEATURE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  SWIG_Python_SetConstant(d, "OGRERR_NON_EXISTING_FEATURE",SWIG_From_int(static_cast< int >(9)));
  return SWIG_Py_Void();
}


SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)":GetUseExceptions")) SWIG_fail;
  result = (int)GetUseExceptions();
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  
  if (!PyArg_ParseTuple(args,(char *)":UseExceptions")) SWIG_fail;
  UseExceptions();
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  
  if (!PyArg_ParseTuple(args,(char *)":DontUseExceptions")) SWIG_fail;
  DontUseExceptions();
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MajorObject_GetDescription",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALMajorObjectShadow_GetDescription(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_SetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:MajorObject_SetDescription",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetDescription" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetDescription" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      GDALMajorObjectShadow_SetDescription(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataDomainList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char **result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:MajorObject_GetMetadataDomainList",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataDomainList" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALMajorObjectShadow_GetMetadataDomainList(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    char **stringarray = result;
    if ( stringarray == NULL ) {
      resultobj = Py_None;
      Py_INCREF( resultobj );
    }
    else {
      int len = CSLCount( stringarray );
      resultobj = PyList_New( len );
      for ( int i = 0; i < len; ++i ) {
        PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
        PyList_SetItem(resultobj, i, o );
      }
    }
    CSLDestroy(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_Dict(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
  char *arg2 = (char *) "" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char **result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O|O:MajorObject_GetMetadata_Dict",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  if (obj1) {
    res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "2"" of type '" "char const *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALMajorObjectShadow_GetMetadata_Dict(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **dict */
    char **stringarray = result;
    resultobj = PyDict_New();
    if ( stringarray != NULL ) {
      while (*stringarray != NULL ) {
        char const *valptr;
        char *keyptr;
        const char* pszSep = strchr( *stringarray, '=' );
        if ( pszSep != NULL) {
          keyptr = CPLStrdup(*stringarray);
          keyptr[pszSep - *stringarray] = '\0';
          valptr = pszSep + 1;
          PyObject *nm = GDALPythonObjectFromCStr( keyptr );
          PyObject *val = GDALPythonObjectFromCStr( valptr );
          PyDict_SetItem(resultobj, nm, val );
          Py_DECREF(nm);
          Py_DECREF(val);
          CPLFree( keyptr );
        }
        stringarray++;
      }
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_List(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
  char *arg2 = (char *) "" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char **result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O|O:MajorObject_GetMetadata_List",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_List" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  if (obj1) {
    res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_List" "', argument " "2"" of type '" "char const *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALMajorObjectShadow_GetMetadata_List(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **options -> ( string ) */
    char **stringarray = result;
    if ( stringarray == NULL ) {
      resultobj = Py_None;
      Py_INCREF( resultobj );
    }
    else {
      int len = CSLCount( stringarray );
      resultobj = PyList_New( len );
      for ( int i = 0; i < len; ++i ) {
        PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
        PyList_SetItem(resultobj, i, o );
      }
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  char *arg3 = (char *) "" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  CPLErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO|O:MajorObject_SetMetadata",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( obj1 ) ) {
      Py_ssize_t size = PySequence_Size(obj1);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj1,i);
        int bFreeStr;
        char* pszStr = GDALPythonObjectToCStr(pyObj, &bFreeStr);
        if ( pszStr == NULL ) {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        arg2 = CSLAddString( arg2, pszStr );
        GDALPythonFreeCStr(pszStr, bFreeStr);
        Py_DECREF(pyObj);
      }
    }
    else if ( PyMapping_Check( obj1 ) ) {
      /* We need to use the dictionary form. */
      Py_ssize_t size = PyMapping_Length( obj1 );
      if ( size > 0 && size == (int)size) {
#if PY_VERSION_HEX < 0x03000000
        // PyMapping_Items also work with python 2.x  but throws a warning about
        // -Wwrite-strings warning
        PyObject *item_list = PyObject_CallMethod(obj1,const_cast<char*>("items"),NULL);
#else
        PyObject *item_list = PyMapping_Items( obj1 );
#endif
        for( int i=0; i<(int)size; i++ ) {
          PyObject *it = PySequence_GetItem( item_list, i );
          
          PyObject *k, *v;
          if ( ! PyArg_ParseTuple( it, "OO", &k, &v ) ) {
            Py_DECREF(it);
            PyErr_SetString(PyExc_TypeError,"Dictionary must contain tuples of strings");
            SWIG_fail;
          }
          
          int bFreeK, bFreeV;
          char* pszK = GDALPythonObjectToCStr(k, &bFreeK);
          char* pszV = GDALPythonObjectToCStr(v, &bFreeV);
          if( pszK == NULL || pszV == NULL )
          {
            GDALPythonFreeCStr(pszK, bFreeK);
            GDALPythonFreeCStr(pszV, bFreeV);
            Py_DECREF(it);
            PyErr_SetString(PyExc_TypeError,"Dictionary must contain tuples of strings");
            SWIG_fail;
          }
          arg2 = CSLAddNameValue( arg2, pszK, pszV );
          
          GDALPythonFreeCStr(pszK, bFreeK);
          GDALPythonFreeCStr(pszV, bFreeV);
          Py_DECREF(it);
        }
        Py_DECREF(item_list);
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  if (obj2) {
    res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_0(arg1,arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) "" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  CPLErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO|O:MajorObject_SetMetadata",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadata" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (obj2) {
    res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_1(arg1,arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if ((argc >= 2) && (argc <= 3)) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
        /* Note: we exclude explicitly strings, because they can be considered as a sequence of characters, */
        /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
        /* (see #4816) */
        _v = ((PyMapping_Check(argv[1]) || PySequence_Check(argv[1]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0)) ) ? 1 : 0;
      }
      if (_v) {
        if (argc <= 2) {
          return _wrap_MajorObject_SetMetadata__SWIG_0(self, args);
        }
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_MajorObject_SetMetadata__SWIG_0(self, args);
        }
      }
    }
  }
  if ((argc >= 2) && (argc <= 3)) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_GDALMajorObjectShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        if (argc <= 2) {
          return _wrap_MajorObject_SetMetadata__SWIG_1(self, args);
        }
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_MajorObject_SetMetadata__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'MajorObject_SetMetadata'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    GDALMajorObjectShadow::SetMetadata(char **,char const *)\n"
    "    GDALMajorObjectShadow::SetMetadata(char *,char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) "" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO|O:MajorObject_GetMetadataItem",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadataItem" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (obj2) {
    res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_GetMetadataItem" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)GDALMajorObjectShadow_GetMetadataItem(arg1,(char const *)arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_SetMetadataItem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) "" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  CPLErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO|O:MajorObject_SetMetadataItem",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadataItem" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_SetMetadataItem" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadataItem" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  if (obj3) {
    res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MajorObject_SetMetadataItem" "', argument " "4"" of type '" "char const *""'");
    }
    arg4 = reinterpret_cast< char * >(buf4);
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMajorObjectShadow_SetMetadataItem(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *MajorObject_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALMajorObjectShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_StyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRStyleTableShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)":new_StyleTable")) SWIG_fail;
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRStyleTableShadow *)new_OGRStyleTableShadow();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRStyleTableShadow, SWIG_POINTER_NEW |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_StyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_StyleTable",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRStyleTableShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_StyleTable" "', argument " "1"" of type '" "OGRStyleTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_OGRStyleTableShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StyleTable_AddStyle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:StyleTable_AddStyle",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_AddStyle" "', argument " "1"" of type '" "OGRStyleTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StyleTable_AddStyle" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "StyleTable_AddStyle" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRStyleTableShadow_AddStyle(arg1,(char const *)arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StyleTable_LoadStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StyleTable_LoadStyleTable",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_LoadStyleTable" "', argument " "1"" of type '" "OGRStyleTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRStyleTableShadow_LoadStyleTable(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_StyleTable_SaveStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StyleTable_SaveStyleTable",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_SaveStyleTable" "', argument " "1"" of type '" "OGRStyleTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRStyleTableShadow_SaveStyleTable(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_StyleTable_Find(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:StyleTable_Find",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_Find" "', argument " "1"" of type '" "OGRStyleTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "StyleTable_Find" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRStyleTableShadow_Find(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_StyleTable_ResetStyleStringReading(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StyleTable_ResetStyleStringReading",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_ResetStyleStringReading" "', argument " "1"" of type '" "OGRStyleTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRStyleTableShadow_ResetStyleStringReading(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StyleTable_GetNextStyle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StyleTable_GetNextStyle",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_GetNextStyle" "', argument " "1"" of type '" "OGRStyleTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRStyleTableShadow_GetNextStyle(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_StyleTable_GetLastStyleName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:StyleTable_GetLastStyleName",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_GetLastStyleName" "', argument " "1"" of type '" "OGRStyleTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRStyleTableShadow_GetLastStyleName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *StyleTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRStyleTableShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_Driver_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Driver_name_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_name_get" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRDriverShadow_name_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_CreateDataSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char **arg3 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "utf8_path",(char *) "options", NULL 
  };
  OGRDataSourceShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Driver_CreateDataSource",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateDataSource" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  if (obj2) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj2) || PyUnicode_Check(obj2)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj2)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      Py_ssize_t size = PySequence_Size(obj2);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj2,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
          if( !pyUTF8Str )
          {
            Py_DECREF(pyObj);
            PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
            SWIG_fail;
          }
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg3 = CSLAddString( arg3, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRDataSourceShadow *)OGRDriverShadow_CreateDataSource(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_CopyDataSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  OGRDataSourceShadow *arg2 = (OGRDataSourceShadow *) 0 ;
  char *arg3 = (char *) 0 ;
  char **arg4 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int bToFree3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "copy_ds",(char *) "utf8_path",(char *) "options", NULL 
  };
  OGRDataSourceShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:Driver_CopyDataSource",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CopyDataSource" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_CopyDataSource" "', argument " "2"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRDataSourceShadow * >(argp2);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg3 = GDALPythonObjectToCStr( obj2, &bToFree3 );
    if (arg3 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  if (obj3) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj3)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      Py_ssize_t size = PySequence_Size(obj3);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj3,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
          if( !pyUTF8Str )
          {
            Py_DECREF(pyObj);
            PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
            SWIG_fail;
          }
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg4 = CSLAddString( arg4, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRDataSourceShadow *)OGRDriverShadow_CopyDataSource(arg1,arg2,(char const *)arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 = (int) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "utf8_path",(char *) "update", NULL 
  };
  OGRDataSourceShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Driver_Open",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Open" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  if (obj2) {
    ecode3 = SWIG_AsVal_int(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Driver_Open" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRDataSourceShadow *)OGRDriverShadow_Open(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if( result == NULL && bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
    if( result != NULL && bUseExceptions ) {
      StoreLastException();
#ifdef SED_HACKS
      bLocalUseExceptionsCode = FALSE;
#endif
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_DeleteDataSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Driver_DeleteDataSource",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_DeleteDataSource" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    result = (int)OGRDriverShadow_DeleteDataSource(arg1,(char const *)arg2);
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Driver_TestCapability",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_TestCapability" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_TestCapability" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    result = (bool)OGRDriverShadow_TestCapability(arg1,(char const *)arg2);
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Driver_GetName",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_GetName" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    result = (char *)OGRDriverShadow_GetName(arg1);
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_Register(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Driver_Register",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Register" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    OGRDriverShadow_Register(arg1);
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Driver_Deregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Driver_Deregister",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Deregister" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    OGRDriverShadow_Deregister(arg1);
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *Driver_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRDriverShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_DataSource_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:DataSource_name_get",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_name_get" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRDataSourceShadow_name_get(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_DataSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_DataSource",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DataSource" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_OGRDataSourceShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_GetRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetRefCount",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetRefCount" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRDataSourceShadow_GetRefCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_GetSummaryRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetSummaryRefCount",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetSummaryRefCount" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRDataSourceShadow_GetSummaryRefCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_GetLayerCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetLayerCount",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetLayerCount" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRDataSourceShadow_GetLayerCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRDriverShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetDriver",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetDriver" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRDriverShadow *)OGRDataSourceShadow_GetDriver(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetName",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetName" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRDataSourceShadow_GetName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_DeleteLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:DataSource_DeleteLayer",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_DeleteLayer" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DataSource_DeleteLayer" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRDataSourceShadow_DeleteLayer(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_SyncToDisk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:DataSource_SyncToDisk",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_SyncToDisk" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRDataSourceShadow_SyncToDisk(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_FlushCache(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:DataSource_FlushCache",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_FlushCache" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRDataSourceShadow_FlushCache(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_CreateLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
  OGRwkbGeometryType arg4 = (OGRwkbGeometryType) wkbUnknown ;
  char **arg5 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "name",(char *) "srs",(char *) "geom_type",(char *) "options", NULL 
  };
  OGRLayerShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OOO:DataSource_CreateLayer",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_CreateLayer" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_CreateLayer" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (obj2) {
    res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DataSource_CreateLayer" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'"); 
    }
    arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
  }
  if (obj3) {
    ecode4 = SWIG_AsVal_int(obj3, &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "DataSource_CreateLayer" "', argument " "4"" of type '" "OGRwkbGeometryType""'");
    } 
    arg4 = static_cast< OGRwkbGeometryType >(val4);
  }
  if (obj4) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj4) || PyUnicode_Check(obj4)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj4)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      Py_ssize_t size = PySequence_Size(obj4);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj4,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
          if( !pyUTF8Str )
          {
            Py_DECREF(pyObj);
            PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
            SWIG_fail;
          }
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg5 = CSLAddString( arg5, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg5 = CSLAddString( arg5, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg5 = CSLAddString( arg5, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRLayerShadow *)OGRDataSourceShadow_CreateLayer(arg1,(char const *)arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg5 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg5 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_CopyLayer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  char *arg3 = (char *) 0 ;
  char **arg4 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "src_layer",(char *) "new_name",(char *) "options", NULL 
  };
  OGRLayerShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:DataSource_CopyLayer",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_CopyLayer" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_CopyLayer" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DataSource_CopyLayer" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  if (obj3) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj3)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      Py_ssize_t size = PySequence_Size(obj3);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj3,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
          if( !pyUTF8Str )
          {
            Py_DECREF(pyObj);
            PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
            SWIG_fail;
          }
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg4 = CSLAddString( arg4, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRLayerShadow *)OGRDataSourceShadow_CopyLayer(arg1,arg2,(char const *)arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_GetLayerByIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  int arg2 = (int) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRLayerShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O|O:DataSource_GetLayerByIndex",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetLayerByIndex" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DataSource_GetLayerByIndex" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRLayerShadow *)OGRDataSourceShadow_GetLayerByIndex(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_GetLayerByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRLayerShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:DataSource_GetLayerByName",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetLayerByName" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_GetLayerByName" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRLayerShadow *)OGRDataSourceShadow_GetLayerByName(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:DataSource_TestCapability",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_TestCapability" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_TestCapability" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRDataSourceShadow_TestCapability(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_ExecuteSQL(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRGeometryShadow *arg3 = (OGRGeometryShadow *) NULL ;
  char *arg4 = (char *) "" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "statement",(char *) "spatialFilter",(char *) "dialect", NULL 
  };
  OGRLayerShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|OO:DataSource_ExecuteSQL",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_ExecuteSQL" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_ExecuteSQL" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  if (obj2) {
    res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DataSource_ExecuteSQL" "', argument " "3"" of type '" "OGRGeometryShadow *""'"); 
    }
    arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
  }
  if (obj3) {
    res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
    if (!SWIG_IsOK(res4)) {
      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DataSource_ExecuteSQL" "', argument " "4"" of type '" "char const *""'");
    }
    arg4 = reinterpret_cast< char * >(buf4);
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRLayerShadow *)OGRDataSourceShadow_ExecuteSQL(arg1,(char const *)arg2,arg3,(char const *)arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_ReleaseResultSet(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:DataSource_ReleaseResultSet",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_ReleaseResultSet" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRLayerShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_ReleaseResultSet" "', argument " "2"" of type '" "OGRLayerShadow *""'");
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRDataSourceShadow_ReleaseResultSet(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_GetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRStyleTableShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:DataSource_GetStyleTable",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_GetStyleTable" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRStyleTableShadow *)OGRDataSourceShadow_GetStyleTable(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_SetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  OGRStyleTableShadow *arg2 = (OGRStyleTableShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:DataSource_SetStyleTable",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_SetStyleTable" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_SetStyleTable" "', argument " "2"" of type '" "OGRStyleTableShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRStyleTableShadow * >(argp2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRDataSourceShadow_SetStyleTable(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_StartTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  int arg2 = (int) FALSE ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "force", NULL 
  };
  OGRErr result;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:DataSource_StartTransaction",kwnames,&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_StartTransaction" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DataSource_StartTransaction" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRDataSourceShadow_StartTransaction(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_CommitTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:DataSource_CommitTransaction",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_CommitTransaction" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRDataSourceShadow_CommitTransaction(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DataSource_RollbackTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:DataSource_RollbackTransaction",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_RollbackTransaction" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRDataSourceShadow_RollbackTransaction(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *DataSource_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRDataSourceShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_Layer_GetRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetRefCount",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetRefCount" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRLayerShadow_GetRefCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilter__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetSpatialFilter",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetSpatialFilter" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRLayerShadow_SetSpatialFilter__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilterRect__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOO:Layer_SetSpatialFilterRect",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilterRect" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetSpatialFilterRect" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_SetSpatialFilterRect" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_SetSpatialFilterRect" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_SetSpatialFilterRect" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRLayerShadow_SetSpatialFilterRect__SWIG_0(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilter__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 ;
  OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Layer_SetSpatialFilter",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetSpatialFilter" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_SetSpatialFilter" "', argument " "3"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRLayerShadow_SetSpatialFilter__SWIG_1(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilter(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRLayerShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Layer_SetSpatialFilter__SWIG_0(self, args);
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRLayerShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_Layer_SetSpatialFilter__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Layer_SetSpatialFilter'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRLayerShadow::SetSpatialFilter(OGRGeometryShadow *)\n"
    "    OGRLayerShadow::SetSpatialFilter(int,OGRGeometryShadow *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilterRect__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOOO:Layer_SetSpatialFilterRect",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilterRect" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetSpatialFilterRect" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_SetSpatialFilterRect" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_SetSpatialFilterRect" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_SetSpatialFilterRect" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Layer_SetSpatialFilterRect" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRLayerShadow_SetSpatialFilterRect__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilterRect(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[7] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 6) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 5) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRLayerShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              return _wrap_Layer_SetSpatialFilterRect__SWIG_0(self, args);
            }
          }
        }
      }
    }
  }
  if (argc == 6) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRLayerShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                return _wrap_Layer_SetSpatialFilterRect__SWIG_1(self, args);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Layer_SetSpatialFilterRect'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRLayerShadow::SetSpatialFilterRect(double,double,double,double)\n"
    "    OGRLayerShadow::SetSpatialFilterRect(int,double,double,double,double)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Layer_GetSpatialFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetSpatialFilter",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetSpatialFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRLayerShadow_GetSpatialFilter(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SetAttributeFilter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetAttributeFilter",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetAttributeFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetAttributeFilter" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_SetAttributeFilter(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_ResetReading(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_ResetReading",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ResetReading" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRLayerShadow_ResetReading(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetName",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetName" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRLayerShadow_GetName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_GetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRwkbGeometryType result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetGeomType",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetGeomType" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)OGRLayerShadow_GetGeomType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_GetGeometryColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetGeometryColumn",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetGeometryColumn" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRLayerShadow_GetGeometryColumn(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_GetFIDColumn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetFIDColumn",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFIDColumn" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRLayerShadow_GetFIDColumn(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_GetFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  GIntBig arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRFeatureShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Layer_GetFeature",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    PY_LONG_LONG val;
    if ( !PyArg_Parse(obj1,"L",&val) ) {
      PyErr_SetString(PyExc_TypeError, "not an integer");
      SWIG_fail;
    }
    arg2 = (GIntBig)val;
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFeatureShadow *)OGRLayerShadow_GetFeature(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_GetNextFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRFeatureShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetNextFeature",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetNextFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFeatureShadow *)OGRLayerShadow_GetNextFeature(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SetNextByIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  GIntBig arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetNextByIndex",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetNextByIndex" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    PY_LONG_LONG val;
    if ( !PyArg_Parse(obj1,"L",&val) ) {
      PyErr_SetString(PyExc_TypeError, "not an integer");
      SWIG_fail;
    }
    arg2 = (GIntBig)val;
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_SetNextByIndex(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SetFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetFeature",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetFeature" "', argument " "2"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_SetFeature(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_CreateFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Layer_CreateFeature",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateFeature" "', argument " "2"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_CreateFeature(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_DeleteFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  GIntBig arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Layer_DeleteFeature",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_DeleteFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    PY_LONG_LONG val;
    if ( !PyArg_Parse(obj1,"L",&val) ) {
      PyErr_SetString(PyExc_TypeError, "not an integer");
      SWIG_fail;
    }
    arg2 = (GIntBig)val;
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_DeleteFeature(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SyncToDisk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_SyncToDisk",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SyncToDisk" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_SyncToDisk(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_GetLayerDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRFeatureDefnShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetLayerDefn",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetLayerDefn" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFeatureDefnShadow *)OGRLayerShadow_GetLayerDefn(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_GetFeatureCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 = (int) 1 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "force", NULL 
  };
  GIntBig result;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Layer_GetFeatureCount",kwnames,&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeatureCount" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_GetFeatureCount" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = OGRLayerShadow_GetFeatureCount(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    char szTmp[32];
    sprintf(szTmp, CPL_FRMT_GIB, result);
#if PY_VERSION_HEX>=0x03000000
    resultobj = PyLong_FromString(szTmp, NULL, 10);
#else
    resultobj = PyInt_FromString(szTmp, NULL, 10);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_GetExtent(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  double *arg2 ;
  int *arg3 = (int *) NULL ;
  int arg4 = (int) 1 ;
  int arg5 = (int) 0 ;
  int arg6 = (int) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double argout2[6] ;
  int isvalid2 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "force",(char *) "can_return_null",(char *) "geom_field", NULL 
  };
  
  {
    /* %typemap(in) (double argout2[4], int* isvalid2) */
    arg2 = argout2;
    arg3 = &isvalid2;
  }
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:Layer_GetExtent",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetExtent" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  if (obj1) {
    ecode4 = SWIG_AsVal_int(obj1, &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_GetExtent" "', argument " "4"" of type '" "int""'");
    } 
    arg4 = static_cast< int >(val4);
  }
  if (obj2) {
    ecode5 = SWIG_AsVal_int(obj2, &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_GetExtent" "', argument " "5"" of type '" "int""'");
    } 
    arg5 = static_cast< int >(val5);
  }
  if (obj3) {
    ecode6 = SWIG_AsVal_int(obj3, &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Layer_GetExtent" "', argument " "6"" of type '" "int""'");
    } 
    arg6 = static_cast< int >(val6);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRLayerShadow_GetExtent(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double argout[4], int* isvalid)  */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = CreateTupleFromDoubleArray(arg2, 4);
    }
    resultobj = t_output_helper(resultobj,r);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Layer_TestCapability",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_TestCapability" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_TestCapability" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRLayerShadow_TestCapability(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_CreateField(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
  int arg3 = (int) 1 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "field_def",(char *) "approx_ok", NULL 
  };
  OGRErr result;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Layer_CreateField",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateField" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateField" "', argument " "2"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRFieldDefnShadow * >(argp2);
  if (obj2) {
    ecode3 = SWIG_AsVal_int(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_CreateField" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_CreateField(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_DeleteField(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Layer_DeleteField",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_DeleteField" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_DeleteField" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_DeleteField(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_ReorderField(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Layer_ReorderField",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ReorderField" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_ReorderField" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_ReorderField" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_ReorderField(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_ReorderFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 ;
  int *arg3 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Layer_ReorderFields",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ReorderFields" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    /* check if is List */
    if ( !PySequence_Check(obj1) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(obj1);
    if( size != (int)size ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg2 = (int)size;
    arg3 = (int*) malloc(arg2*sizeof(int));
    for( int i = 0; i<arg2; i++ ) {
      PyObject *o = PySequence_GetItem(obj1,i);
      if ( !PyArg_Parse(o,"i",&arg3[i]) ) {
        PyErr_SetString(PyExc_TypeError, "not an integer");
        Py_DECREF(o);
        SWIG_fail;
      }
      Py_DECREF(o);
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_ReorderFields(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (int nList, int* pList) */
    if (arg3) {
      free((void*) arg3);
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, int* pList) */
    if (arg3) {
      free((void*) arg3);
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_AlterFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 ;
  OGRFieldDefnShadow *arg3 = (OGRFieldDefnShadow *) 0 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:Layer_AlterFieldDefn",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_AlterFieldDefn" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_AlterFieldDefn" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_AlterFieldDefn" "', argument " "3"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRFieldDefnShadow * >(argp3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_AlterFieldDefn" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  {
    if (!arg3) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_AlterFieldDefn(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_CreateGeomField(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRGeomFieldDefnShadow *arg2 = (OGRGeomFieldDefnShadow *) 0 ;
  int arg3 = (int) 1 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "field_def",(char *) "approx_ok", NULL 
  };
  OGRErr result;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Layer_CreateGeomField",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateGeomField" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateGeomField" "', argument " "2"" of type '" "OGRGeomFieldDefnShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp2);
  if (obj2) {
    ecode3 = SWIG_AsVal_int(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_CreateGeomField" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_CreateGeomField(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_StartTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_StartTransaction",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_StartTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_StartTransaction(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_CommitTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_CommitTransaction",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CommitTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_CommitTransaction(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_RollbackTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_RollbackTransaction",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_RollbackTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_RollbackTransaction(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_FindFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Layer_FindFieldIndex",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_FindFieldIndex" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_FindFieldIndex" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_FindFieldIndex" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRLayerShadow_FindFieldIndex(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OSRSpatialReferenceShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetSpatialRef",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetSpatialRef" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OSRSpatialReferenceShadow *)OGRLayerShadow_GetSpatialRef(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_GetFeaturesRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  GIntBig result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetFeaturesRead",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeaturesRead" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = OGRLayerShadow_GetFeaturesRead(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    char szTmp[32];
    sprintf(szTmp, CPL_FRMT_GIB, result);
#if PY_VERSION_HEX>=0x03000000
    resultobj = PyLong_FromString(szTmp, NULL, 10);
#else
    resultobj = PyInt_FromString(szTmp, NULL, 10);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SetIgnoredFields(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetIgnoredFields",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetIgnoredFields" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    /* %typemap(in) char **options */
    /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    if ( ! PySequence_Check(obj1) || PyUnicode_Check(obj1)
  #if PY_VERSION_HEX < 0x03000000
      || PyString_Check(obj1)
  #endif
      ) {
      PyErr_SetString(PyExc_TypeError,"not a sequence");
      SWIG_fail;
    }
    
    Py_ssize_t size = PySequence_Size(obj1);
    if( size != (int)size ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    for (int i = 0; i < (int)size; i++) {
      PyObject* pyObj = PySequence_GetItem(obj1,i);
      if (PyUnicode_Check(pyObj))
      {
        char *pszStr;
        Py_ssize_t nLen;
        PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
        if( !pyUTF8Str )
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
          SWIG_fail;
        }
#if PY_VERSION_HEX >= 0x03000000
        PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
        PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
        arg2 = CSLAddString( arg2, pszStr );
        Py_XDECREF(pyUTF8Str);
      }
#if PY_VERSION_HEX >= 0x03000000
      else if (PyBytes_Check(pyObj))
      arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
#else
      else if (PyString_Check(pyObj))
      arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
#endif
      else
      {
        Py_DECREF(pyObj);
        PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
        SWIG_fail;
      }
      Py_DECREF(pyObj);
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_SetIgnoredFields(arg1,(char const **)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg2 );
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_Intersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
  };
  OGRErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Intersection",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Intersection" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Intersection" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Intersection" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
  if (obj3) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj3)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      Py_ssize_t size = PySequence_Size(obj3);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj3,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
          if( !pyUTF8Str )
          {
            Py_DECREF(pyObj);
            PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
            SWIG_fail;
          }
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg4 = CSLAddString( arg4, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  if (obj4) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
      {
        if( PyLong_AsLong(obj4) == 0 )
        {
          obj4 = Py_None;
        }
      }
      
      if (obj4 && obj4 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj4)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj4;
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj5) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj5 ;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_Intersection(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_Union(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
  };
  OGRErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Union",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Union" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Union" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Union" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
  if (obj3) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj3)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      Py_ssize_t size = PySequence_Size(obj3);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj3,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
          if( !pyUTF8Str )
          {
            Py_DECREF(pyObj);
            PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
            SWIG_fail;
          }
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg4 = CSLAddString( arg4, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  if (obj4) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
      {
        if( PyLong_AsLong(obj4) == 0 )
        {
          obj4 = Py_None;
        }
      }
      
      if (obj4 && obj4 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj4)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj4;
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj5) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj5 ;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_Union(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SymDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
  };
  OGRErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_SymDifference",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SymDifference" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SymDifference" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_SymDifference" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
  if (obj3) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj3)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      Py_ssize_t size = PySequence_Size(obj3);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj3,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
          if( !pyUTF8Str )
          {
            Py_DECREF(pyObj);
            PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
            SWIG_fail;
          }
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg4 = CSLAddString( arg4, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  if (obj4) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
      {
        if( PyLong_AsLong(obj4) == 0 )
        {
          obj4 = Py_None;
        }
      }
      
      if (obj4 && obj4 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj4)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj4;
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj5) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj5 ;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_SymDifference(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_Identity(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
  };
  OGRErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Identity",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Identity" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Identity" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Identity" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
  if (obj3) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj3)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      Py_ssize_t size = PySequence_Size(obj3);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj3,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
          if( !pyUTF8Str )
          {
            Py_DECREF(pyObj);
            PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
            SWIG_fail;
          }
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg4 = CSLAddString( arg4, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  if (obj4) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
      {
        if( PyLong_AsLong(obj4) == 0 )
        {
          obj4 = Py_None;
        }
      }
      
      if (obj4 && obj4 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj4)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj4;
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj5) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj5 ;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_Identity(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_Update(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
  };
  OGRErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Update",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Update" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Update" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Update" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
  if (obj3) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj3)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      Py_ssize_t size = PySequence_Size(obj3);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj3,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
          if( !pyUTF8Str )
          {
            Py_DECREF(pyObj);
            PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
            SWIG_fail;
          }
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg4 = CSLAddString( arg4, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  if (obj4) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
      {
        if( PyLong_AsLong(obj4) == 0 )
        {
          obj4 = Py_None;
        }
      }
      
      if (obj4 && obj4 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj4)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj4;
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj5) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj5 ;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_Update(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_Clip(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
  };
  OGRErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Clip",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Clip" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Clip" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Clip" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
  if (obj3) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj3)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      Py_ssize_t size = PySequence_Size(obj3);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj3,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
          if( !pyUTF8Str )
          {
            Py_DECREF(pyObj);
            PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
            SWIG_fail;
          }
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg4 = CSLAddString( arg4, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  if (obj4) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
      {
        if( PyLong_AsLong(obj4) == 0 )
        {
          obj4 = Py_None;
        }
      }
      
      if (obj4 && obj4 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj4)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj4;
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj5) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj5 ;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_Clip(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_Erase(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "method_layer",(char *) "result_layer",(char *) "options",(char *) "callback",(char *) "callback_data", NULL 
  };
  OGRErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|OOO:Layer_Erase",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Erase" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Erase" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Erase" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
  if (obj3) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj3) || PyUnicode_Check(obj3)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj3)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      Py_ssize_t size = PySequence_Size(obj3);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj3,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
          if( !pyUTF8Str )
          {
            Py_DECREF(pyObj);
            PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
            SWIG_fail;
          }
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg4 = CSLAddString( arg4, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  if (obj4) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
      {
        if( PyLong_AsLong(obj4) == 0 )
        {
          obj4 = Py_None;
        }
      }
      
      if (obj4 && obj4 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj4)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj4;
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj5) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj5 ;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_Erase(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_GetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRStyleTableShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetStyleTable",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetStyleTable" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRStyleTableShadow *)OGRLayerShadow_GetStyleTable(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SetStyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRStyleTableShadow *arg2 = (OGRStyleTableShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetStyleTable",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetStyleTable" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetStyleTable" "', argument " "2"" of type '" "OGRStyleTableShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRStyleTableShadow * >(argp2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRLayerShadow_SetStyleTable(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *Layer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRLayerShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_Feature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_Feature",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Feature" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_OGRFeatureShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Feature(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *  kwnames[] = {
    (char *) "feature_def", NULL 
  };
  OGRFeatureShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O:new_Feature",kwnames,&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Feature" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFeatureShadow *)new_OGRFeatureShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_NEW |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetDefnRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRFeatureDefnShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetDefnRef",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFeatureDefnShadow *)OGRFeatureShadow_GetDefnRef(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetGeometry",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeometry" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetGeometry" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRFeatureShadow_SetGeometry(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetGeometryDirectly(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetGeometryDirectly",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeometryDirectly" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetGeometryDirectly" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRFeatureShadow_SetGeometryDirectly(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetGeometryRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetGeometryRef",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeometryRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeometryRef(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetGeomField__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetGeomField",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeomField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetGeomField" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetGeomField" "', argument " "3"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRFeatureShadow_SetGeomField__SWIG_0(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetGeomField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetGeomField",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeomField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetGeomField" "', argument " "3"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRFeatureShadow_SetGeomField__SWIG_1(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetGeomField(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_Feature_SetGeomField__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_Feature_SetGeomField__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_SetGeomField'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::SetGeomField(int,OGRGeometryShadow *)\n"
    "    OGRFeatureShadow::SetGeomField(char const *,OGRGeometryShadow *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_SetGeomFieldDirectly__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetGeomFieldDirectly",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeomFieldDirectly" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetGeomFieldDirectly" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&arg3), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetGeomFieldDirectly" "', argument " "3"" of type '" "OGRGeometryShadow *""'");
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRFeatureShadow_SetGeomFieldDirectly__SWIG_0(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetGeomFieldDirectly__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetGeomFieldDirectly",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetGeomFieldDirectly" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  res3 = SWIG_ConvertPtr(obj2, SWIG_as_voidptrptr(&arg3), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetGeomFieldDirectly" "', argument " "3"" of type '" "OGRGeometryShadow *""'");
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRFeatureShadow_SetGeomFieldDirectly__SWIG_1(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetGeomFieldDirectly(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_Feature_SetGeomFieldDirectly__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_Feature_SetGeomFieldDirectly__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_SetGeomFieldDirectly'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::SetGeomFieldDirectly(int,OGRGeometryShadow *)\n"
    "    OGRFeatureShadow::SetGeomFieldDirectly(char const *,OGRGeometryShadow *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldRef__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetGeomFieldRef",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetGeomFieldRef" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeomFieldRef__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldRef__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetGeomFieldRef",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeomFieldRef__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldRef(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_GetGeomFieldRef__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_GetGeomFieldRef__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_GetGeomFieldRef'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::GetGeomFieldRef(int)\n"
    "    OGRFeatureShadow::GetGeomFieldRef(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRFeatureShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Feature_Clone",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_Clone" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFeatureShadow *)OGRFeatureShadow_Clone(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_Equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_Equal",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_Equal" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_Equal" "', argument " "2"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRFeatureShadow_Equal(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetFieldCount",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldCount" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureShadow_GetFieldCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRFieldDefnShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldDefnRef",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldDefnRef" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRFieldDefnShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldDefnRef",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_GetFieldDefnRef__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_GetFieldDefnRef__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_GetFieldDefnRef'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::GetFieldDefnRef(int)\n"
    "    OGRFeatureShadow::GetFieldDefnRef(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetGeomFieldCount",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldCount" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureShadow_GetGeomFieldCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldDefnRef__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeomFieldDefnShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetGeomFieldDefnRef",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetGeomFieldDefnRef" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeomFieldDefnShadow *)OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldDefnRef__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeomFieldDefnShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetGeomFieldDefnRef",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeomFieldDefnShadow *)OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldDefnRef(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_GetGeomFieldDefnRef__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_GetGeomFieldDefnRef__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_GetGeomFieldDefnRef'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::GetGeomFieldDefnRef(int)\n"
    "    OGRFeatureShadow::GetGeomFieldDefnRef(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsString",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsString" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsString",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_GetFieldAsString__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_GetFieldAsString__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsString'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::GetFieldAsString(int)\n"
    "    OGRFeatureShadow::GetFieldAsString(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsInteger",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsInteger" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsInteger",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_GetFieldAsInteger__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_GetFieldAsInteger__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsInteger'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::GetFieldAsInteger(int)\n"
    "    OGRFeatureShadow::GetFieldAsInteger(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger64__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  GIntBig result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsInteger64",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger64" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsInteger64" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = OGRFeatureShadow_GetFieldAsInteger64__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    char szTmp[32];
    sprintf(szTmp, CPL_FRMT_GIB, result);
#if PY_VERSION_HEX>=0x03000000
    resultobj = PyLong_FromString(szTmp, NULL, 10);
#else
    resultobj = PyInt_FromString(szTmp, NULL, 10);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger64__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  GIntBig result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsInteger64",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger64" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = OGRFeatureShadow_GetFieldAsInteger64__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    char szTmp[32];
    sprintf(szTmp, CPL_FRMT_GIB, result);
#if PY_VERSION_HEX>=0x03000000
    resultobj = PyLong_FromString(szTmp, NULL, 10);
#else
    resultobj = PyInt_FromString(szTmp, NULL, 10);
#endif
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger64(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_GetFieldAsInteger64__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_GetFieldAsInteger64__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsInteger64'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::GetFieldAsInteger64(int)\n"
    "    OGRFeatureShadow::GetFieldAsInteger64(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDouble",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDouble" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDouble" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDouble",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDouble" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_GetFieldAsDouble__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_GetFieldAsDouble__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsDouble'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::GetFieldAsDouble(int)\n"
    "    OGRFeatureShadow::GetFieldAsDouble(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDateTime__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int *arg3 = (int *) 0 ;
  int *arg4 = (int *) 0 ;
  int *arg5 = (int *) 0 ;
  int *arg6 = (int *) 0 ;
  int *arg7 = (int *) 0 ;
  float *arg8 = (float *) 0 ;
  int *arg9 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int temp3 ;
  int res3 = SWIG_TMPOBJ ;
  int temp4 ;
  int res4 = SWIG_TMPOBJ ;
  int temp5 ;
  int res5 = SWIG_TMPOBJ ;
  int temp6 ;
  int res6 = SWIG_TMPOBJ ;
  int temp7 ;
  int res7 = SWIG_TMPOBJ ;
  float temp8 ;
  int res8 = SWIG_TMPOBJ ;
  int temp9 ;
  int res9 = SWIG_TMPOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  arg3 = &temp3;
  arg4 = &temp4;
  arg5 = &temp5;
  arg6 = &temp6;
  arg7 = &temp7;
  arg8 = &temp8;
  arg9 = &temp9;
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDateTime",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDateTime" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDateTime" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_GetFieldAsDateTime__SWIG_0(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (ReturnSame(SWIG_IsTmpObj(res3))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
  }
  if (ReturnSame(SWIG_IsTmpObj(res4))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
  }
  if (ReturnSame(SWIG_IsTmpObj(res5))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
  }
  if (ReturnSame(SWIG_IsTmpObj(res6))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
  }
  if (ReturnSame(SWIG_IsTmpObj(res7))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7)));
  } else {
    int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags));
  }
  if (ReturnSame(SWIG_IsTmpObj(res8))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg8)));
  } else {
    int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_float, new_flags));
  }
  if (ReturnSame(SWIG_IsTmpObj(res9))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9)));
  } else {
    int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags));
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDateTime__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int *arg3 = (int *) 0 ;
  int *arg4 = (int *) 0 ;
  int *arg5 = (int *) 0 ;
  int *arg6 = (int *) 0 ;
  int *arg7 = (int *) 0 ;
  float *arg8 = (float *) 0 ;
  int *arg9 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  int temp3 ;
  int res3 = SWIG_TMPOBJ ;
  int temp4 ;
  int res4 = SWIG_TMPOBJ ;
  int temp5 ;
  int res5 = SWIG_TMPOBJ ;
  int temp6 ;
  int res6 = SWIG_TMPOBJ ;
  int temp7 ;
  int res7 = SWIG_TMPOBJ ;
  float temp8 ;
  int res8 = SWIG_TMPOBJ ;
  int temp9 ;
  int res9 = SWIG_TMPOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  arg3 = &temp3;
  arg4 = &temp4;
  arg5 = &temp5;
  arg6 = &temp6;
  arg7 = &temp7;
  arg8 = &temp8;
  arg9 = &temp9;
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDateTime",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDateTime" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_GetFieldAsDateTime__SWIG_1(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (ReturnSame(SWIG_IsTmpObj(res3))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
  }
  if (ReturnSame(SWIG_IsTmpObj(res4))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags));
  }
  if (ReturnSame(SWIG_IsTmpObj(res5))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags));
  }
  if (ReturnSame(SWIG_IsTmpObj(res6))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags));
  }
  if (ReturnSame(SWIG_IsTmpObj(res7))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7)));
  } else {
    int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags));
  }
  if (ReturnSame(SWIG_IsTmpObj(res8))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg8)));
  } else {
    int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_float, new_flags));
  }
  if (ReturnSame(SWIG_IsTmpObj(res9))) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg9)));
  } else {
    int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags));
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDateTime(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_GetFieldAsDateTime__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_GetFieldAsDateTime__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsDateTime'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::GetFieldAsDateTime(int,int *,int *,int *,int *,int *,float *,int *)\n"
    "    OGRFeatureShadow::GetFieldAsDateTime(char const *,int *,int *,int *,int *,int *,float *,int *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsIntegerList__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int *arg3 = (int *) 0 ;
  int **arg4 = (int **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int nLen3 = 0 ;
  int *pList3 = NULL ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen3, const int **pList3) (int nLen3, int *pList3) */
    arg3 = &nLen3;
    arg4 = &pList3;
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsIntegerList",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsIntegerList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsIntegerList" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_GetFieldAsIntegerList__SWIG_0(arg1,arg2,arg3,(int const **)arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (int *nLen, const int **pList ) */
    Py_DECREF(resultobj);
    PyObject *out = PyList_New( *arg3 );
    for( int i=0; i<*arg3; i++ ) {
      PyObject *val = PyInt_FromLong( (*arg4)[i] );
      PyList_SetItem( out, i, val );
    }
    resultobj = out;
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsIntegerList__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int *arg3 = (int *) 0 ;
  int **arg4 = (int **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  int nLen3 = 0 ;
  int *pList3 = NULL ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen3, const int **pList3) (int nLen3, int *pList3) */
    arg3 = &nLen3;
    arg4 = &pList3;
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsIntegerList",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsIntegerList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_GetFieldAsIntegerList__SWIG_1(arg1,(char const *)arg2,arg3,(int const **)arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (int *nLen, const int **pList ) */
    Py_DECREF(resultobj);
    PyObject *out = PyList_New( *arg3 );
    for( int i=0; i<*arg3; i++ ) {
      PyObject *val = PyInt_FromLong( (*arg4)[i] );
      PyList_SetItem( out, i, val );
    }
    resultobj = out;
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsIntegerList(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_GetFieldAsIntegerList__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_GetFieldAsIntegerList__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsIntegerList'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::GetFieldAsIntegerList(int,int *,int const **)\n"
    "    OGRFeatureShadow::GetFieldAsIntegerList(char const *,int *,int const **)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger64List(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int *arg3 = (int *) 0 ;
  GIntBig **arg4 = (GIntBig **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int nLen3 = 0 ;
  GIntBig *pList3 = NULL ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen3, const GIntBig **pList3) (int nLen3, GIntBig *pList3) */
    arg3 = &nLen3;
    arg4 = &pList3;
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsInteger64List",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger64List" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsInteger64List" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_GetFieldAsInteger64List(arg1,arg2,arg3,(GIntBig const **)arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (int *nLen, const GIntBig **pList ) */
    Py_DECREF(resultobj);
    PyObject *out = PyList_New( *arg3 );
    for( int i=0; i<*arg3; i++ ) {
      char szTmp[32];
      sprintf(szTmp, CPL_FRMT_GIB, (*arg4)[i]);
      PyObject* val;
#if PY_VERSION_HEX>=0x03000000
      val = PyLong_FromString(szTmp, NULL, 10);
#else
      val = PyInt_FromString(szTmp, NULL, 10);
#endif
      PyList_SetItem( out, i, val );
    }
    resultobj = out;
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDoubleList__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int *arg3 = (int *) 0 ;
  double **arg4 = (double **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int nLen3 = 0 ;
  double *pList3 = NULL ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen3, const double **pList3) (int nLen3, double *pList3) */
    arg3 = &nLen3;
    arg4 = &pList3;
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDoubleList",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDoubleList" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_GetFieldAsDoubleList__SWIG_0(arg1,arg2,arg3,(double const **)arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (int *nLen, const double **pList ) */
    Py_DECREF(resultobj);
    PyObject *out = PyList_New( *arg3 );
    for( int i=0; i<*arg3; i++ ) {
      PyObject *val = PyFloat_FromDouble( (*arg4)[i] );
      PyList_SetItem( out, i, val );
    }
    resultobj = out;
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDoubleList__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int *arg3 = (int *) 0 ;
  double **arg4 = (double **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  int nLen3 = 0 ;
  double *pList3 = NULL ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen3, const double **pList3) (int nLen3, double *pList3) */
    arg3 = &nLen3;
    arg4 = &pList3;
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDoubleList",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_GetFieldAsDoubleList__SWIG_1(arg1,(char const *)arg2,arg3,(double const **)arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (int *nLen, const double **pList ) */
    Py_DECREF(resultobj);
    PyObject *out = PyList_New( *arg3 );
    for( int i=0; i<*arg3; i++ ) {
      PyObject *val = PyFloat_FromDouble( (*arg4)[i] );
      PyList_SetItem( out, i, val );
    }
    resultobj = out;
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDoubleList(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_GetFieldAsDoubleList__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_GetFieldAsDoubleList__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsDoubleList'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::GetFieldAsDoubleList(int,int *,double const **)\n"
    "    OGRFeatureShadow::GetFieldAsDoubleList(char const *,int *,double const **)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char **result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsStringList",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsStringList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsStringList" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)OGRFeatureShadow_GetFieldAsStringList(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **options -> ( string ) */
    char **stringarray = result;
    if ( stringarray == NULL ) {
      resultobj = Py_None;
      Py_INCREF( resultobj );
    }
    else {
      int len = CSLCount( stringarray );
      resultobj = PyList_New( len );
      for ( int i = 0; i < len; ++i ) {
        PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
        PyList_SetItem(resultobj, i, o );
      }
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsBinary__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int *arg3 = (int *) 0 ;
  char **arg4 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int nLen3 = 0 ;
  char *pBuf3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen3, char **pBuf3 ) */
    arg3 = &nLen3;
    arg4 = &pBuf3;
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsBinary",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsBinary" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsBinary" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRFeatureShadow_GetFieldAsBinary__SWIG_0(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(argout) (int *nLen, char **pBuf ) */
    Py_XDECREF(resultobj);
#if PY_VERSION_HEX >= 0x03000000
    resultobj = PyBytes_FromStringAndSize( *arg4, *arg3 );
#else
    resultobj = PyString_FromStringAndSize( *arg4, *arg3 );
#endif
  }
  {
    /* %typemap(freearg) (int *nLen, char **pBuf ) */
    if( *arg3 ) {
      free( *arg4 );
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int *nLen, char **pBuf ) */
    if( *arg3 ) {
      free( *arg4 );
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsBinary__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int *arg3 = (int *) 0 ;
  char **arg4 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  int nLen3 = 0 ;
  char *pBuf3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen3, char **pBuf3 ) */
    arg3 = &nLen3;
    arg4 = &pBuf3;
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsBinary",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsBinary" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRFeatureShadow_GetFieldAsBinary__SWIG_1(arg1,(char const *)arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(argout) (int *nLen, char **pBuf ) */
    Py_XDECREF(resultobj);
#if PY_VERSION_HEX >= 0x03000000
    resultobj = PyBytes_FromStringAndSize( *arg4, *arg3 );
#else
    resultobj = PyString_FromStringAndSize( *arg4, *arg3 );
#endif
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) (int *nLen, char **pBuf ) */
    if( *arg3 ) {
      free( *arg4 );
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) (int *nLen, char **pBuf ) */
    if( *arg3 ) {
      free( *arg4 );
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsBinary(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_GetFieldAsBinary__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_GetFieldAsBinary__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsBinary'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::GetFieldAsBinary(int,int *,char **)\n"
    "    OGRFeatureShadow::GetFieldAsBinary(char const *,int *,char **)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_IsFieldSet__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_IsFieldSet",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSet" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_IsFieldSet" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_IsFieldSet__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_IsFieldSet",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSet" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_IsFieldSet(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_IsFieldSet__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_IsFieldSet__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_IsFieldSet'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::IsFieldSet(int)\n"
    "    OGRFeatureShadow::IsFieldSet(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_IsFieldNull__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_IsFieldNull",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_IsFieldNull" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRFeatureShadow_IsFieldNull__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_IsFieldNull__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_IsFieldNull",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRFeatureShadow_IsFieldNull__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_IsFieldNull(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_IsFieldNull__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_IsFieldNull__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_IsFieldNull'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::IsFieldNull(int)\n"
    "    OGRFeatureShadow::IsFieldNull(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_IsFieldSetAndNotNull__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_IsFieldSetAndNotNull",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSetAndNotNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_IsFieldSetAndNotNull" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRFeatureShadow_IsFieldSetAndNotNull__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_IsFieldSetAndNotNull__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_IsFieldSetAndNotNull",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSetAndNotNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRFeatureShadow_IsFieldSetAndNotNull__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_IsFieldSetAndNotNull(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_IsFieldSetAndNotNull__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_IsFieldSetAndNotNull__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_IsFieldSetAndNotNull'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::IsFieldSetAndNotNull(int)\n"
    "    OGRFeatureShadow::IsFieldSetAndNotNull(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldIndex",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldIndex" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureShadow_GetFieldIndex(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetGeomFieldIndex",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldIndex" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureShadow_GetGeomFieldIndex(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  GIntBig result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetFID",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFID" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = OGRFeatureShadow_GetFID(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    char szTmp[32];
    sprintf(szTmp, CPL_FRMT_GIB, result);
#if PY_VERSION_HEX>=0x03000000
    resultobj = PyLong_FromString(szTmp, NULL, 10);
#else
    resultobj = PyInt_FromString(szTmp, NULL, 10);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  GIntBig arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetFID",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFID" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    PY_LONG_LONG val;
    if ( !PyArg_Parse(obj1,"L",&val) ) {
      PyErr_SetString(PyExc_TypeError, "not an integer");
      SWIG_fail;
    }
    arg2 = (GIntBig)val;
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRFeatureShadow_SetFID(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_DumpReadable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Feature_DumpReadable",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_DumpReadable" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_DumpReadable(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_UnsetField__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_UnsetField",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_UnsetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_UnsetField" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_UnsetField__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_UnsetField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_UnsetField",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_UnsetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_UnsetField__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_UnsetField(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_UnsetField__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_UnsetField__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_UnsetField'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::UnsetField(int)\n"
    "    OGRFeatureShadow::UnsetField(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_SetFieldNull__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetFieldNull",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldNull" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetFieldNull__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFieldNull__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetFieldNull",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetFieldNull__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFieldNull(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_SetFieldNull__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_SetFieldNull__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_SetFieldNull'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::SetFieldNull(int)\n"
    "    OGRFeatureShadow::SetFieldNull(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *str3 = 0 ;
  int bToFree3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in) (tostring argin) */
    str3 = PyObject_Str( obj2 );
    if ( str3 == 0 ) {
      PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
      SWIG_fail;
    }
    
    arg3 = GDALPythonObjectToCStr(str3, &bToFree3);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetField__SWIG_0(arg1,arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str3 != NULL)
    {
      Py_DECREF(str3);
    }
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str3 != NULL)
    {
      Py_DECREF(str3);
    }
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject *str3 = 0 ;
  int bToFree3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(in) (tostring argin) */
    str3 = PyObject_Str( obj2 );
    if ( str3 == 0 ) {
      PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
      SWIG_fail;
    }
    
    arg3 = GDALPythonObjectToCStr(str3, &bToFree3);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetField__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str3 != NULL)
    {
      Py_DECREF(str3);
    }
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str3 != NULL)
    {
      Py_DECREF(str3);
    }
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFieldInteger64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  GIntBig arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldInteger64",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldInteger64" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldInteger64" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    PY_LONG_LONG val;
    if ( !PyArg_Parse(obj2,"L",&val) ) {
      PyErr_SetString(PyExc_TypeError, "not an integer");
      SWIG_fail;
    }
    arg3 = (GIntBig)val;
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetFieldInteger64(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetField__SWIG_2(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetField__SWIG_3(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  float arg8 ;
  int arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  float val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:Feature_SetField",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Feature_SetField" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Feature_SetField" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Feature_SetField" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Feature_SetField" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  ecode8 = SWIG_AsVal_float(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Feature_SetField" "', argument " "8"" of type '" "float""'");
  } 
  arg8 = static_cast< float >(val8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Feature_SetField" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetField__SWIG_4(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  float arg8 ;
  int arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  float val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:Feature_SetField",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Feature_SetField" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Feature_SetField" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Feature_SetField" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Feature_SetField" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  ecode8 = SWIG_AsVal_float(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Feature_SetField" "', argument " "8"" of type '" "float""'");
  } 
  arg8 = static_cast< float >(val8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Feature_SetField" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetField__SWIG_5(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetField(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[10] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 9) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Feature_SetField__SWIG_2(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_Feature_SetField__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Feature_SetField__SWIG_3(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_Feature_SetField__SWIG_1(self, args);
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_int(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_float(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_int(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      return _wrap_Feature_SetField__SWIG_4(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_int(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_int(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_int(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_int(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_float(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_int(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      return _wrap_Feature_SetField__SWIG_5(self, args);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_SetField'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::SetField(int,char const *)\n"
    "    OGRFeatureShadow::SetField(char const *,char const *)\n"
    "    OGRFeatureShadow::SetField(int,double)\n"
    "    OGRFeatureShadow::SetField(char const *,double)\n"
    "    OGRFeatureShadow::SetField(int,int,int,int,int,int,float,int)\n"
    "    OGRFeatureShadow::SetField(char const *,int,int,int,int,int,float,int)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_SetFieldIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  int *arg4 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldIntegerList",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldIntegerList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldIntegerList" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    /* check if is List */
    if ( !PySequence_Check(obj2) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(obj2);
    if( size != (int)size ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg3 = (int)size;
    arg4 = (int*) malloc(arg3*sizeof(int));
    for( int i = 0; i<arg3; i++ ) {
      PyObject *o = PySequence_GetItem(obj2,i);
      if ( !PyArg_Parse(o,"i",&arg4[i]) ) {
        PyErr_SetString(PyExc_TypeError, "not an integer");
        Py_DECREF(o);
        SWIG_fail;
      }
      Py_DECREF(o);
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetFieldIntegerList(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (int nList, int* pList) */
    if (arg4) {
      free((void*) arg4);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, int* pList) */
    if (arg4) {
      free((void*) arg4);
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFieldInteger64List(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  GIntBig *arg4 = (GIntBig *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldInteger64List",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldInteger64List" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldInteger64List" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
    /* check if is List */
    if ( !PySequence_Check(obj2) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(obj2);
    if( size != (int)size ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg3 = (int)size;
    arg4 = (GIntBig*) malloc(arg3*sizeof(GIntBig));
    for( int i = 0; i<arg3; i++ ) {
      PyObject *o = PySequence_GetItem(obj2,i);
      PY_LONG_LONG val;
      if ( !PyArg_Parse(o,"L",&val) ) {
        PyErr_SetString(PyExc_TypeError, "not an integer");
        Py_DECREF(o);
        SWIG_fail;
      }
      arg4[i] = (GIntBig)val;
      Py_DECREF(o);
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetFieldInteger64List(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (int nList, GIntBig* pList) */
    if (arg4) {
      free((void*) arg4);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, GIntBig* pList) */
    if (arg4) {
      free((void*) arg4);
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFieldDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  double *arg4 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldDoubleList",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldDoubleList" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in,numinputs=1) (int nList, double* pList)*/
    /* check if is List */
    if ( !PySequence_Check(obj2) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(obj2);
    if( size != (int)size ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg3 = (int)size;
    arg4 = (double*) malloc(arg3*sizeof(double));
    for( int i = 0; i<arg3; i++ ) {
      PyObject *o = PySequence_GetItem(obj2,i);
      if ( !PyArg_Parse(o,"d",&arg4[i]) ) {
        PyErr_SetString(PyExc_TypeError, "not a number");
        Py_DECREF(o);
        SWIG_fail;
      }
      Py_DECREF(o);
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetFieldDoubleList(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (int nList, double* pList) */
    if (arg4) {
      free((void*) arg4);
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, double* pList) */
    if (arg4) {
      free((void*) arg4);
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFieldStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  char **arg3 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldStringList",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldStringList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldStringList" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in) char **options */
    /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    if ( ! PySequence_Check(obj2) || PyUnicode_Check(obj2)
  #if PY_VERSION_HEX < 0x03000000
      || PyString_Check(obj2)
  #endif
      ) {
      PyErr_SetString(PyExc_TypeError,"not a sequence");
      SWIG_fail;
    }
    
    Py_ssize_t size = PySequence_Size(obj2);
    if( size != (int)size ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    for (int i = 0; i < (int)size; i++) {
      PyObject* pyObj = PySequence_GetItem(obj2,i);
      if (PyUnicode_Check(pyObj))
      {
        char *pszStr;
        Py_ssize_t nLen;
        PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
        if( !pyUTF8Str )
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
          SWIG_fail;
        }
#if PY_VERSION_HEX >= 0x03000000
        PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
        PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
        arg3 = CSLAddString( arg3, pszStr );
        Py_XDECREF(pyUTF8Str);
      }
#if PY_VERSION_HEX >= 0x03000000
      else if (PyBytes_Check(pyObj))
      arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
#else
      else if (PyString_Check(pyObj))
      arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
#endif
      else
      {
        Py_DECREF(pyObj);
        PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
        SWIG_fail;
      }
      Py_DECREF(pyObj);
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetFieldStringList(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFieldBinaryFromHexString__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldBinaryFromHexString",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_0(arg1,arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFieldBinaryFromHexString__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldBinaryFromHexString",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFieldBinaryFromHexString(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 3) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_Feature_SetFieldBinaryFromHexString__SWIG_0(self, args);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_Feature_SetFieldBinaryFromHexString__SWIG_1(self, args);
        }
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_SetFieldBinaryFromHexString'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::SetFieldBinaryFromHexString(int,char const *)\n"
    "    OGRFeatureShadow::SetFieldBinaryFromHexString(char const *,char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_SetFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
  int arg3 = (int) 1 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "other",(char *) "forgiving", NULL 
  };
  OGRErr result;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Feature_SetFrom",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFrom" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetFrom" "', argument " "2"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
  if (obj2) {
    ecode3 = SWIG_AsVal_int(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetFrom" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRFeatureShadow_SetFrom(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFromWithMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
  int arg3 ;
  int arg4 ;
  int *arg5 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOO:Feature_SetFromWithMap",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFromWithMap" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetFromWithMap" "', argument " "2"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetFromWithMap" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    /* check if is List */
    if ( !PySequence_Check(obj3) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(obj3);
    if( size != (int)size ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    arg4 = (int)size;
    arg5 = (int*) malloc(arg4*sizeof(int));
    for( int i = 0; i<arg4; i++ ) {
      PyObject *o = PySequence_GetItem(obj3,i);
      if ( !PyArg_Parse(o,"i",&arg5[i]) ) {
        PyErr_SetString(PyExc_TypeError, "not an integer");
        Py_DECREF(o);
        SWIG_fail;
      }
      Py_DECREF(o);
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRFeatureShadow_SetFromWithMap(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (int nList, int* pList) */
    if (arg5) {
      free((void*) arg5);
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, int* pList) */
    if (arg5) {
      free((void*) arg5);
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetStyleString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetStyleString",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetStyleString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFeatureShadow_GetStyleString(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetStyleString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetStyleString",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetStyleString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetStyleString" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetStyleString(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldType__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRFieldType result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldType",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldType" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldType" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldType__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRFieldType result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldType",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldType" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldType(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  Py_ssize_t ii;
  
  if (args == NULL || !PyTuple_Check(args)) SWIG_fail;
  argc = args ? PyObject_Length(args) : 0;
  for (ii = 0; (ii < 2) && (ii < argc); ii++) {
    argv[ii] = PyTuple_GET_ITEM(args,ii);
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_Feature_GetFieldType__SWIG_0(self, args);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Feature_GetFieldType__SWIG_1(self, args);
      }
    }
  }
  
fail:
  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Feature_GetFieldType'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::GetFieldType(int)\n"
    "    OGRFeatureShadow::GetFieldType(char const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_Validate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 = (int) OGR_F_VAL_ALL ;
  int arg3 = (int) TRUE ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O|OO:Feature_Validate",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_Validate" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_Validate" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  if (obj2) {
    ecode3 = SWIG_AsVal_int(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_Validate" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureShadow_Validate(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_FillUnsetWithDefault(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 = (int) FALSE ;
  char **arg3 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O|OO:Feature_FillUnsetWithDefault",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_FillUnsetWithDefault" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_FillUnsetWithDefault" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  if (obj2) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj2) || PyUnicode_Check(obj2)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj2)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      Py_ssize_t size = PySequence_Size(obj2);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj2,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
          if( !pyUTF8Str )
          {
            Py_DECREF(pyObj);
            PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
            SWIG_fail;
          }
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg3 = CSLAddString( arg3, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_FillUnsetWithDefault(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetNativeData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetNativeData",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetNativeData" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFeatureShadow_GetNativeData(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetNativeMediaType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetNativeMediaType",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetNativeMediaType" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFeatureShadow_GetNativeMediaType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetNativeData(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetNativeData",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetNativeData" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetNativeData" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetNativeData(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetNativeMediaType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetNativeMediaType",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetNativeMediaType" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetNativeMediaType" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetNativeMediaType(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFieldString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int bToFree3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldString",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldString" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg3 = GDALPythonObjectToCStr( obj2, &bToFree3 );
    if (arg3 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    OGRFeatureShadow_SetFieldString(arg1,arg2,(char const *)arg3);
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  return NULL;
}


SWIGINTERN PyObject *Feature_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRFeatureShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_FeatureDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_FeatureDefn",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FeatureDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_OGRFeatureDefnShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_FeatureDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  char *arg1 = (char *) NULL ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  char *  kwnames[] = {
    (char *) "name_null_ok", NULL 
  };
  OGRFeatureDefnShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_FeatureDefn",kwnames,&obj0)) SWIG_fail;
  if (obj0) {
    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FeatureDefn" "', argument " "1"" of type '" "char const *""'");
    }
    arg1 = reinterpret_cast< char * >(buf1);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFeatureDefnShadow *)new_OGRFeatureDefnShadow((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_POINTER_NEW |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_GetName",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetName" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFeatureDefnShadow_GetName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_GetFieldCount",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldCount" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureDefnShadow_GetFieldCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRFieldDefnShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_GetFieldDefn",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_GetFieldDefn" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDefnShadow *)OGRFeatureDefnShadow_GetFieldDefn(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_GetFieldIndex",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldIndex" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureDefnShadow_GetFieldIndex(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_AddFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_AddFieldDefn",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_AddFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FeatureDefn_AddFieldDefn" "', argument " "2"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRFieldDefnShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureDefnShadow_AddFieldDefn(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_GetGeomFieldCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_GetGeomFieldCount",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetGeomFieldCount" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureDefnShadow_GetGeomFieldCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_GetGeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeomFieldDefnShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_GetGeomFieldDefn",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetGeomFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_GetGeomFieldDefn" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeomFieldDefnShadow *)OGRFeatureDefnShadow_GetGeomFieldDefn(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_GetGeomFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_GetGeomFieldIndex",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetGeomFieldIndex" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureDefnShadow_GetGeomFieldIndex(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_AddGeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  OGRGeomFieldDefnShadow *arg2 = (OGRGeomFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_AddGeomFieldDefn",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_AddGeomFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FeatureDefn_AddGeomFieldDefn" "', argument " "2"" of type '" "OGRGeomFieldDefnShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureDefnShadow_AddGeomFieldDefn(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_DeleteGeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_DeleteGeomFieldDefn",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_DeleteGeomFieldDefn" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_DeleteGeomFieldDefn" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRFeatureDefnShadow_DeleteGeomFieldDefn(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_GetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRwkbGeometryType result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_GetGeomType",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetGeomType" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)OGRFeatureDefnShadow_GetGeomType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_SetGeomType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  OGRwkbGeometryType arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_SetGeomType",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetGeomType" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetGeomType" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
  } 
  arg2 = static_cast< OGRwkbGeometryType >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureDefnShadow_SetGeomType(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_GetReferenceCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_GetReferenceCount",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetReferenceCount" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureDefnShadow_GetReferenceCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_IsGeometryIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_IsGeometryIgnored",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_IsGeometryIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureDefnShadow_IsGeometryIgnored(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_SetGeometryIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_SetGeometryIgnored",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetGeometryIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetGeometryIgnored" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureDefnShadow_SetGeometryIgnored(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_IsStyleIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FeatureDefn_IsStyleIgnored",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_IsStyleIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureDefnShadow_IsStyleIgnored(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_SetStyleIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_SetStyleIgnored",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_SetStyleIgnored" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_SetStyleIgnored" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureDefnShadow_SetStyleIgnored(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FeatureDefn_IsSame(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  OGRFeatureDefnShadow *arg2 = (OGRFeatureDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_IsSame",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_IsSame" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FeatureDefn_IsSame" "', argument " "2"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRFeatureDefnShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureDefnShadow_IsSame(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *FeatureDefn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_FieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_FieldDefn",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FieldDefn" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_OGRFieldDefnShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_FieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  char *arg1 = (char *) "unnamed" ;
  OGRFieldType arg2 = (OGRFieldType) OFTString ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "name_null_ok",(char *) "field_type", NULL 
  };
  OGRFieldDefnShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:new_FieldDefn",kwnames,&obj0,&obj1)) SWIG_fail;
  if (obj0) {
    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FieldDefn" "', argument " "1"" of type '" "char const *""'");
    }
    arg1 = reinterpret_cast< char * >(buf1);
  }
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_FieldDefn" "', argument " "2"" of type '" "OGRFieldType""'");
    } 
    arg2 = static_cast< OGRFieldType >(val2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDefnShadow *)new_OGRFieldDefnShadow((char const *)arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, SWIG_POINTER_NEW |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetName",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDefnShadow_GetName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_GetNameRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetNameRef",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetNameRef" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDefnShadow_GetNameRef(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_SetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetName",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetName" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFieldDefnShadow_SetName(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRFieldType result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetType",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldType)OGRFieldDefnShadow_GetType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_SetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  OGRFieldType arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetType",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetType" "', argument " "2"" of type '" "OGRFieldType""'");
  } 
  arg2 = static_cast< OGRFieldType >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFieldDefnShadow_SetType(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_GetSubType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRFieldSubType result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetSubType",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetSubType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldSubType)OGRFieldDefnShadow_GetSubType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_SetSubType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  OGRFieldSubType arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetSubType",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetSubType" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetSubType" "', argument " "2"" of type '" "OGRFieldSubType""'");
  } 
  arg2 = static_cast< OGRFieldSubType >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFieldDefnShadow_SetSubType(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_GetJustify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRJustification result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetJustify",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetJustify" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRJustification)OGRFieldDefnShadow_GetJustify(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_SetJustify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  OGRJustification arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetJustify",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetJustify" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetJustify" "', argument " "2"" of type '" "OGRJustification""'");
  } 
  arg2 = static_cast< OGRJustification >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFieldDefnShadow_SetJustify(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_GetWidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetWidth",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetWidth" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFieldDefnShadow_GetWidth(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_SetWidth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetWidth",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetWidth" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetWidth" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFieldDefnShadow_SetWidth(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_GetPrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetPrecision",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetPrecision" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFieldDefnShadow_GetPrecision(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_SetPrecision(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetPrecision",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetPrecision" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetPrecision" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFieldDefnShadow_SetPrecision(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_GetTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetTypeName",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetTypeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDefnShadow_GetTypeName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_GetFieldTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  OGRFieldType arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_GetFieldTypeName",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetFieldTypeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_GetFieldTypeName" "', argument " "2"" of type '" "OGRFieldType""'");
  } 
  arg2 = static_cast< OGRFieldType >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDefnShadow_GetFieldTypeName(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_IsIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_IsIgnored",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_IsIgnored" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFieldDefnShadow_IsIgnored(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_SetIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetIgnored",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetIgnored" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetIgnored" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFieldDefnShadow_SetIgnored(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_IsNullable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_IsNullable",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_IsNullable" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFieldDefnShadow_IsNullable(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_SetNullable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetNullable",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetNullable" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetNullable" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFieldDefnShadow_SetNullable(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_GetDefault(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_GetDefault",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetDefault" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDefnShadow_GetDefault(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_SetDefault(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FieldDefn_SetDefault",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetDefault" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetDefault" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFieldDefnShadow_SetDefault(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_IsDefaultDriverSpecific(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:FieldDefn_IsDefaultDriverSpecific",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_IsDefaultDriverSpecific" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFieldDefnShadow_IsDefaultDriverSpecific(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *FieldDefn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRFieldDefnShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_delete_GeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_GeomFieldDefn",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GeomFieldDefn" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_OGRGeomFieldDefnShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_GeomFieldDefn(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  char *arg1 = (char *) "" ;
  OGRwkbGeometryType arg2 = (OGRwkbGeometryType) wkbUnknown ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "name_null_ok",(char *) "field_type", NULL 
  };
  OGRGeomFieldDefnShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OO:new_GeomFieldDefn",kwnames,&obj0,&obj1)) SWIG_fail;
  if (obj0) {
    res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GeomFieldDefn" "', argument " "1"" of type '" "char const *""'");
    }
    arg1 = reinterpret_cast< char * >(buf1);
  }
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GeomFieldDefn" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
    } 
    arg2 = static_cast< OGRwkbGeometryType >(val2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeomFieldDefnShadow *)new_OGRGeomFieldDefnShadow((char const *)arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomFieldDefnShadow, SWIG_POINTER_NEW |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomFieldDefn_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GeomFieldDefn_GetName",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_GetName" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRGeomFieldDefnShadow_GetName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomFieldDefn_GetNameRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GeomFieldDefn_GetNameRef",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_GetNameRef" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRGeomFieldDefnShadow_GetNameRef(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:GeomFieldDefn_SetName",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetName" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomFieldDefn_SetName" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeomFieldDefnShadow_SetName(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomFieldDefn_GetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRwkbGeometryType result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GeomFieldDefn_GetType",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_GetType" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)OGRGeomFieldDefnShadow_GetType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  OGRwkbGeometryType arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:GeomFieldDefn_SetType",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetType" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeomFieldDefn_SetType" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
  } 
  arg2 = static_cast< OGRwkbGeometryType >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeomFieldDefnShadow_SetType(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomFieldDefn_GetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OSRSpatialReferenceShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GeomFieldDefn_GetSpatialRef",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_GetSpatialRef" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OSRSpatialReferenceShadow *)OGRGeomFieldDefnShadow_GetSpatialRef(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetSpatialRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:GeomFieldDefn_SetSpatialRef",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetSpatialRef" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomFieldDefn_SetSpatialRef" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
  }
  arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeomFieldDefnShadow_SetSpatialRef(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomFieldDefn_IsIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GeomFieldDefn_IsIgnored",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_IsIgnored" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGeomFieldDefnShadow_IsIgnored(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetIgnored(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:GeomFieldDefn_SetIgnored",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetIgnored" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeomFieldDefn_SetIgnored" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeomFieldDefnShadow_SetIgnored(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomFieldDefn_IsNullable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GeomFieldDefn_IsNullable",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_IsNullable" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGeomFieldDefnShadow_IsNullable(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetNullable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:GeomFieldDefn_SetNullable",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetNullable" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeomFieldDefn_SetNullable" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeomFieldDefnShadow_SetNullable(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *GeomFieldDefn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRGeomFieldDefnShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_CreateGeometryFromWkb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  int arg1 ;
  char *arg2 = (char *) 0 ;
  OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
  int alloc1 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "len",(char *) "reference", NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CreateGeometryFromWkb",kwnames,&obj0,&obj1)) SWIG_fail;
  {
    /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
#if PY_VERSION_HEX>=0x03000000
    if (PyUnicode_Check(obj0))
    {
      size_t safeLen = 0;
      int ret = SWIG_AsCharPtrAndSize(obj0, (char**) &arg2, &safeLen, &alloc1);
      if (!SWIG_IsOK(ret)) {
        SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
      }
      
      if (safeLen) safeLen--;
      if( safeLen > INT_MAX ) {
        SWIG_exception( SWIG_RuntimeError, "too large buffer (>2GB)" );
      }
      arg1 = (int) safeLen;
    }
    else if (PyBytes_Check(obj0))
    {
      Py_ssize_t safeLen = 0;
      PyBytes_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
      if( safeLen > INT_MAX ) {
        SWIG_exception( SWIG_RuntimeError, "too large buffer (>2GB)" );
      }
      arg1 = (int) safeLen;
    }
    else
    {
      PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
      SWIG_fail;
    }
#else
    if (PyString_Check(obj0))
    {
      Py_ssize_t safeLen = 0;
      PyString_AsStringAndSize(obj0, (char**) &arg2, &safeLen);
      if( safeLen > INT_MAX ) {
        SWIG_exception( SWIG_RuntimeError, "too large buffer (>2GB)" );
      }
      arg1 = (int) safeLen;
    }
    else
    {
      PyErr_SetString(PyExc_TypeError, "not a string");
      SWIG_fail;
    }
#endif
  }
  if (obj1) {
    res3 = SWIG_ConvertPtr(obj1, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreateGeometryFromWkb" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'"); 
    }
    arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)CreateGeometryFromWkb(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
      delete[] arg2;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
      delete[] arg2;
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_CreateGeometryFromWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  char **arg1 = (char **) 0 ;
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) NULL ;
  char *val1 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "val",(char *) "reference", NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CreateGeometryFromWkt",kwnames,&obj0,&obj1)) SWIG_fail;
  {
    /* %typemap(in) (char **ignorechange) */
    if( !PyArg_Parse( obj0, "s", &val1 ) ) {
      PyErr_SetString( PyExc_TypeError, "not a string" );
      SWIG_fail;
    }
    arg1 = &val1;
  }
  if (obj1) {
    res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateGeometryFromWkt" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
    }
    arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)CreateGeometryFromWkt(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_CreateGeometryFromGML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CreateGeometryFromGML",&obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGeometryFromGML" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)CreateGeometryFromGML((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_CreateGeometryFromJson(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CreateGeometryFromJson",&obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGeometryFromJson" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)CreateGeometryFromJson((char const *)arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_BuildPolygonFromEdges(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  int arg3 = (int) 0 ;
  double arg4 = (double) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char *  kwnames[] = {
    (char *) "hLineCollection",(char *) "bBestEffort",(char *) "bAutoClose",(char *) "dfTolerance", NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:BuildPolygonFromEdges",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BuildPolygonFromEdges" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BuildPolygonFromEdges" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  if (obj2) {
    ecode3 = SWIG_AsVal_int(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BuildPolygonFromEdges" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  if (obj3) {
    ecode4 = SWIG_AsVal_double(obj3, &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BuildPolygonFromEdges" "', argument " "4"" of type '" "double""'");
    } 
    arg4 = static_cast< double >(val4);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)BuildPolygonFromEdges(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ApproximateArcAngles(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  double arg8 ;
  double arg9 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  double val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  char *  kwnames[] = {
    (char *) "dfCenterX",(char *) "dfCenterY",(char *) "dfZ",(char *) "dfPrimaryRadius",(char *) "dfSecondaryAxis",(char *) "dfRotation",(char *) "dfStartAngle",(char *) "dfEndAngle",(char *) "dfMaxAngleStepSizeDegrees", NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOOO:ApproximateArcAngles",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ApproximateArcAngles" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ApproximateArcAngles" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ApproximateArcAngles" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ApproximateArcAngles" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ApproximateArcAngles" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "ApproximateArcAngles" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  ecode7 = SWIG_AsVal_double(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ApproximateArcAngles" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_double(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "ApproximateArcAngles" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  ecode9 = SWIG_AsVal_double(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ApproximateArcAngles" "', argument " "9"" of type '" "double""'");
  } 
  arg9 = static_cast< double >(val9);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)ApproximateArcAngles(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ForceToPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ForceToPolygon",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToPolygon" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)ForceToPolygon(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ForceToLineString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ForceToLineString",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToLineString" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)ForceToLineString(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ForceToMultiPolygon(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ForceToMultiPolygon",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiPolygon" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)ForceToMultiPolygon(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ForceToMultiPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ForceToMultiPoint",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)ForceToMultiPoint(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ForceToMultiLineString(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:ForceToMultiLineString",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceToMultiLineString" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)ForceToMultiLineString(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ForceTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRwkbGeometryType arg2 ;
  char **arg3 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO|O:ForceTo",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceTo" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ForceTo" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
  } 
  arg2 = static_cast< OGRwkbGeometryType >(val2);
  if (obj2) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj2) || PyUnicode_Check(obj2)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj2)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      Py_ssize_t size = PySequence_Size(obj2);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj2,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
          if( !pyUTF8Str )
          {
            Py_DECREF(pyObj);
            PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
            SWIG_fail;
          }
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg3 = CSLAddString( arg3, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)ForceTo(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:delete_Geometry",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Geometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_OGRGeometryShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRwkbGeometryType arg1 = (OGRwkbGeometryType) wkbUnknown ;
  char *arg2 = (char *) 0 ;
  int arg3 = (int) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int alloc3 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char *  kwnames[] = {
    (char *) "type",(char *) "wkt",(char *) "wkb",(char *) "gml", NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOO:new_Geometry",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  if (obj0) {
    ecode1 = SWIG_AsVal_int(obj0, &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Geometry" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
    } 
    arg1 = static_cast< OGRwkbGeometryType >(val1);
  }
  if (obj1) {
    res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Geometry" "', argument " "2"" of type '" "char *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  if (obj2) {
    {
      /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
#if PY_VERSION_HEX>=0x03000000
      if (PyUnicode_Check(obj2))
      {
        size_t safeLen = 0;
        int ret = SWIG_AsCharPtrAndSize(obj2, (char**) &arg4, &safeLen, &alloc3);
        if (!SWIG_IsOK(ret)) {
          SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
        }
        
        if (safeLen) safeLen--;
        if( safeLen > INT_MAX ) {
          SWIG_exception( SWIG_RuntimeError, "too large buffer (>2GB)" );
        }
        arg3 = (int) safeLen;
      }
      else if (PyBytes_Check(obj2))
      {
        Py_ssize_t safeLen = 0;
        PyBytes_AsStringAndSize(obj2, (char**) &arg4, &safeLen);
        if( safeLen > INT_MAX ) {
          SWIG_exception( SWIG_RuntimeError, "too large buffer (>2GB)" );
        }
        arg3 = (int) safeLen;
      }
      else
      {
        PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
        SWIG_fail;
      }
#else
      if (PyString_Check(obj2))
      {
        Py_ssize_t safeLen = 0;
        PyString_AsStringAndSize(obj2, (char**) &arg4, &safeLen);
        if( safeLen > INT_MAX ) {
          SWIG_exception( SWIG_RuntimeError, "too large buffer (>2GB)" );
        }
        arg3 = (int) safeLen;
      }
      else
      {
        PyErr_SetString(PyExc_TypeError, "not a string");
        SWIG_fail;
      }
#endif
    }
  }
  if (obj3) {
    res5 = SWIG_AsCharPtrAndSize(obj3, &buf5, NULL, &alloc5);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_Geometry" "', argument " "5"" of type '" "char *""'");
    }
    arg5 = reinterpret_cast< char * >(buf5);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)new_OGRGeometryShadow(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_NEW |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if (ReturnSame(alloc3) == SWIG_NEWOBJ ) {
      delete[] arg4;
    }
  }
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if (ReturnSame(alloc3) == SWIG_NEWOBJ ) {
      delete[] arg4;
    }
  }
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_ExportToWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *argout2 = 0 ;
  PyObject * obj0 = 0 ;
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (char **argout2) */
    arg2 = &argout2;
  }
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_ExportToWkt",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToWkt" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRGeometryShadow_ExportToWkt(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(argout) (char **argout) */
    PyObject *o;
    if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
      o = GDALPythonObjectFromCStr( *arg2 );
    }
    else {
      o = Py_None;
      Py_INCREF( o );
    }
    resultobj = t_output_helper(resultobj, o);
  }
  {
    /* %typemap(freearg) (char **argout) */
    if ( *arg2 )
    CPLFree( *arg2 );
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (char **argout) */
    if ( *arg2 )
    CPLFree( *arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_ExportToIsoWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *argout2 = 0 ;
  PyObject * obj0 = 0 ;
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (char **argout2) */
    arg2 = &argout2;
  }
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_ExportToIsoWkt",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToIsoWkt" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRGeometryShadow_ExportToIsoWkt(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(argout) (char **argout) */
    PyObject *o;
    if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
      o = GDALPythonObjectFromCStr( *arg2 );
    }
    else {
      o = Py_None;
      Py_INCREF( o );
    }
    resultobj = t_output_helper(resultobj, o);
  }
  {
    /* %typemap(freearg) (char **argout) */
    if ( *arg2 )
    CPLFree( *arg2 );
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (char **argout) */
    if ( *arg2 )
    CPLFree( *arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_ExportToWkb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int *arg2 = (int *) 0 ;
  char **arg3 = (char **) 0 ;
  OGRwkbByteOrder arg4 = (OGRwkbByteOrder) wkbXDR ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int nLen2 = 0 ;
  char *pBuf2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "byte_order", NULL 
  };
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen2, char **pBuf2 ) */
    arg2 = &nLen2;
    arg3 = &pBuf2;
  }
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_ExportToWkb",kwnames,&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToWkb" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode4 = SWIG_AsVal_int(obj1, &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_ExportToWkb" "', argument " "4"" of type '" "OGRwkbByteOrder""'");
    } 
    arg4 = static_cast< OGRwkbByteOrder >(val4);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRGeometryShadow_ExportToWkb(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(argout) (int *nLen, char **pBuf ) */
    Py_XDECREF(resultobj);
#if PY_VERSION_HEX >= 0x03000000
    resultobj = PyBytes_FromStringAndSize( *arg3, *arg2 );
#else
    resultobj = PyString_FromStringAndSize( *arg3, *arg2 );
#endif
  }
  {
    /* %typemap(freearg) (int *nLen, char **pBuf ) */
    if( *arg2 ) {
      free( *arg3 );
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int *nLen, char **pBuf ) */
    if( *arg2 ) {
      free( *arg3 );
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_ExportToIsoWkb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int *arg2 = (int *) 0 ;
  char **arg3 = (char **) 0 ;
  OGRwkbByteOrder arg4 = (OGRwkbByteOrder) wkbXDR ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int nLen2 = 0 ;
  char *pBuf2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "byte_order", NULL 
  };
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen2, char **pBuf2 ) */
    arg2 = &nLen2;
    arg3 = &pBuf2;
  }
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_ExportToIsoWkb",kwnames,&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToIsoWkb" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode4 = SWIG_AsVal_int(obj1, &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_ExportToIsoWkb" "', argument " "4"" of type '" "OGRwkbByteOrder""'");
    } 
    arg4 = static_cast< OGRwkbByteOrder >(val4);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRGeometryShadow_ExportToIsoWkb(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(argout) (int *nLen, char **pBuf ) */
    Py_XDECREF(resultobj);
#if PY_VERSION_HEX >= 0x03000000
    resultobj = PyBytes_FromStringAndSize( *arg3, *arg2 );
#else
    resultobj = PyString_FromStringAndSize( *arg3, *arg2 );
#endif
  }
  {
    /* %typemap(freearg) (int *nLen, char **pBuf ) */
    if( *arg2 ) {
      free( *arg3 );
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int *nLen, char **pBuf ) */
    if( *arg2 ) {
      free( *arg3 );
    }
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_ExportToGML(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "options", NULL 
  };
  retStringAndCPLFree *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_ExportToGML",kwnames,&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToGML" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj1) || PyUnicode_Check(obj1)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj1)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      Py_ssize_t size = PySequence_Size(obj1);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj1,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
          if( !pyUTF8Str )
          {
            Py_DECREF(pyObj);
            PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
            SWIG_fail;
          }
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg2 = CSLAddString( arg2, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToGML(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_ExportToKML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char *arg2 = (char *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  retStringAndCPLFree *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O|O:Geometry_ExportToKML",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToKML" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_ExportToKML" "', argument " "2"" of type '" "char const *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToKML(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_ExportToJson(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "options", NULL 
  };
  retStringAndCPLFree *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_ExportToJson",kwnames,&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToJson" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj1) || PyUnicode_Check(obj1)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj1)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      Py_ssize_t size = PySequence_Size(obj1);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj1,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
          if( !pyUTF8Str )
          {
            Py_DECREF(pyObj);
            PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
            SWIG_fail;
          }
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg2 = CSLAddString( arg2, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToJson(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_AddPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 = (double) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "x",(char *) "y",(char *) "z", NULL 
  };
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:Geometry_AddPoint",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPoint" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPoint" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  if (obj3) {
    ecode4 = SWIG_AsVal_double(obj3, &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_AddPoint" "', argument " "4"" of type '" "double""'");
    } 
    arg4 = static_cast< double >(val4);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_AddPoint(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_AddPointM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "x",(char *) "y",(char *) "m", NULL 
  };
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Geometry_AddPointM",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPointM" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPointM" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPointM" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_AddPointM" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_AddPointM(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_AddPointZM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "x",(char *) "y",(char *) "z",(char *) "m", NULL 
  };
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:Geometry_AddPointZM",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPointZM" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPointZM" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPointZM" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_AddPointZM" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_AddPointZM" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_AddPointZM(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_AddPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Geometry_AddPoint_2D",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPoint_2D" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPoint_2D" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_AddPoint_2D(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_AddGeometryDirectly(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_AddGeometryDirectly",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddGeometryDirectly" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, SWIG_as_voidptrptr(&arg2), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AddGeometryDirectly" "', argument " "2"" of type '" "OGRGeometryShadow *""'");
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRGeometryShadow_AddGeometryDirectly(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_AddGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_AddGeometry",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AddGeometry" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRGeometryShadow_AddGeometry(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_RemoveGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_RemoveGeometry",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_RemoveGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_RemoveGeometry" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRGeometryShadow_RemoveGeometry(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Clone",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Clone" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Clone(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetGeometryType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRwkbGeometryType result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetGeometryType",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryType" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)OGRGeometryShadow_GetGeometryType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetGeometryName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetGeometryName",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryName" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRGeometryShadow_GetGeometryName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Length(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Length",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Length" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRGeometryShadow_Length(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Area",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Area" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRGeometryShadow_Area(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetArea(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  double result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetArea",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetArea" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRGeometryShadow_GetArea(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetPointCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetPointCount",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPointCount" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGeometryShadow_GetPointCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int *arg2 = (int *) 0 ;
  double **arg3 = (double **) 0 ;
  double **arg4 = (double **) 0 ;
  int arg5 = (int) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int nPoints2 = 0 ;
  double *padfXY2 = NULL ;
  double *padfZ2 = NULL ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "nCoordDimension", NULL 
  };
  
  {
    /* %typemap(in,numinputs=0) (int* pnCount, double** ppadfXY, double** ppadfZ) */
    arg2 = &nPoints2;
    arg3 = &padfXY2;
    arg4 = &padfZ2;
  }
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetPoints",kwnames,&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoints" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode5 = SWIG_AsVal_int(obj1, &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_GetPoints" "', argument " "5"" of type '" "int""'");
    } 
    arg5 = static_cast< int >(val5);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_GetPoints(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout)  (int* pnCount, double** ppadfXY, double** ppadfZ) */
    Py_DECREF(resultobj);
    int nPointCount = *(arg2);
    if (nPointCount == 0)
    {
      resultobj = Py_None;
    }
    else
    {
      PyObject *xyz = PyList_New( nPointCount );
      int nDimensions = (*arg4 != NULL) ? 3 : 2;
      for( int i=0; i< nPointCount; i++ ) {
        PyObject *tuple = PyTuple_New( nDimensions );
        PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (*arg3)[2*i] ) );
        PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (*arg3)[2*i+1] ) );
        if (nDimensions == 3)
        PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (*arg4)[i] ) );
        PyList_SetItem( xyz, i, tuple );
      }
      resultobj = xyz;
    }
  }
  {
    /* %typemap(freearg)  (int* pnCount, double** ppadfXY, double** ppadfZ) */
    VSIFree(*arg3);
    VSIFree(*arg4);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg)  (int* pnCount, double** ppadfXY, double** ppadfZ) */
    VSIFree(*arg3);
    VSIFree(*arg4);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetX(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "point", NULL 
  };
  double result;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetX",kwnames,&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetX" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetX" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRGeometryShadow_GetX(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetY(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "point", NULL 
  };
  double result;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetY",kwnames,&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetY" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetY" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRGeometryShadow_GetY(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "point", NULL 
  };
  double result;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetZ",kwnames,&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetZ" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetZ" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRGeometryShadow_GetZ(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "point", NULL 
  };
  double result;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetM",kwnames,&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetM" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetM" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRGeometryShadow_GetM(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  double *arg3 = (double *) (double *)NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double argout3[3] ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    /* %typemap(in,numinputs=0) (double argout3[ANY]) */
    memset(argout3, 0, sizeof(argout3));
    arg3 = argout3;
  }
  if (!PyArg_ParseTuple(args,(char *)"O|O:Geometry_GetPoint",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetPoint" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_GetPoint(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double argout[ANY]) */
    PyObject *out = CreateTupleFromDoubleArray( arg3, 3 );
    resultobj = t_output_helper(resultobj,out);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetPointZM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  double *arg3 = (double *) (double *)NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double argout3[4] ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    /* %typemap(in,numinputs=0) (double argout3[ANY]) */
    memset(argout3, 0, sizeof(argout3));
    arg3 = argout3;
  }
  if (!PyArg_ParseTuple(args,(char *)"O|O:Geometry_GetPointZM",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPointZM" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetPointZM" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_GetPointZM(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double argout[ANY]) */
    PyObject *out = CreateTupleFromDoubleArray( arg3, 4 );
    resultobj = t_output_helper(resultobj,out);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  double *arg3 = (double *) (double *)NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double argout3[2] ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    /* %typemap(in,numinputs=0) (double argout3[ANY]) */
    memset(argout3, 0, sizeof(argout3));
    arg3 = argout3;
  }
  if (!PyArg_ParseTuple(args,(char *)"O|O:Geometry_GetPoint_2D",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetPoint_2D" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_GetPoint_2D(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double argout[ANY]) */
    PyObject *out = CreateTupleFromDoubleArray( arg3, 2 );
    resultobj = t_output_helper(resultobj,out);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetGeometryCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetGeometryCount",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryCount" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGeometryShadow_GetGeometryCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SetPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 = (double) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "point",(char *) "x",(char *) "y",(char *) "z", NULL 
  };
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO|O:Geometry_SetPoint",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPoint" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPoint" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPoint" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  if (obj4) {
    ecode5 = SWIG_AsVal_double(obj4, &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_SetPoint" "', argument " "5"" of type '" "double""'");
    } 
    arg5 = static_cast< double >(val5);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_SetPoint(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SetPointM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "point",(char *) "x",(char *) "y",(char *) "m", NULL 
  };
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:Geometry_SetPointM",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPointM" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPointM" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPointM" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPointM" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_SetPointM" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_SetPointM(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SetPointZM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "point",(char *) "x",(char *) "y",(char *) "z",(char *) "m", NULL 
  };
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:Geometry_SetPointZM",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPointZM" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPointZM" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPointZM" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPointZM" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_SetPointZM" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Geometry_SetPointZM" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_SetPointZM(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SetPoint_2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "point",(char *) "x",(char *) "y", NULL 
  };
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:Geometry_SetPoint_2D",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPoint_2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPoint_2D" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPoint_2D" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPoint_2D" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_SetPoint_2D(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SwapXY(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_SwapXY",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SwapXY" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_SwapXY(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetGeometryRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_GetGeometryRef",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetGeometryRef" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetGeometryRef" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_GetGeometryRef(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Simplify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Simplify",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Simplify" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Simplify" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Simplify(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SimplifyPreserveTopology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SimplifyPreserveTopology",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SimplifyPreserveTopology" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SimplifyPreserveTopology" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_SimplifyPreserveTopology(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_DelaunayTriangulation(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 = (double) 0.0 ;
  int arg3 = (int) FALSE ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "dfTolerance",(char *) "bOnlyEdges", NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Geometry_DelaunayTriangulation",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_DelaunayTriangulation" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_double(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_DelaunayTriangulation" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
  }
  if (obj2) {
    ecode3 = SWIG_AsVal_int(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_DelaunayTriangulation" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_DelaunayTriangulation(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Polygonize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Polygonize",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Polygonize" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Polygonize(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Boundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Boundary",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Boundary" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Boundary(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetBoundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetBoundary",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetBoundary" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_GetBoundary(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_ConvexHull(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_ConvexHull",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ConvexHull" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_ConvexHull(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Buffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  int arg3 = (int) 30 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "distance",(char *) "quadsecs", NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Geometry_Buffer",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Buffer" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Buffer" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (obj2) {
    ecode3 = SWIG_AsVal_int(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_Buffer" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Buffer(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Intersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Intersection",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersection" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersection" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Intersection(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Union(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Union",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Union" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Union" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Union(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_UnionCascaded(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_UnionCascaded",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_UnionCascaded" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_UnionCascaded(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Difference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Difference",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Difference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Difference" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Difference(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SymDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SymDifference",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SymDifference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_SymDifference" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_SymDifference(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SymmetricDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SymmetricDifference",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SymmetricDifference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_SymmetricDifference" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_SymmetricDifference(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Distance",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Distance" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Distance" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRGeometryShadow_Distance(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Distance3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Distance3D",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Distance3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Distance3D" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRGeometryShadow_Distance3D(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Empty",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Empty" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_Empty(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_IsEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsEmpty",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsEmpty" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_IsEmpty(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_IsValid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsValid",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsValid" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_IsValid(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_IsSimple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsSimple",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsSimple" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_IsSimple(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_IsRing(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsRing",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsRing" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_IsRing(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Intersects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Intersects",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersects" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersects" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Intersects(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Intersect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Intersect",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersect" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersect" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Intersect(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Equals",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Equals" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Equals" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Equals(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Equal",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Equal" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Equal" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Equal(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Disjoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Disjoint",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Disjoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Disjoint" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Disjoint(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Touches(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Touches",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Touches" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Touches" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Touches(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Crosses(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Crosses",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Crosses" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Crosses" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Crosses(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Within(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Within",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Within" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Within" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Within(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Contains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Contains",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Contains" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Contains" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Contains(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Overlaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Overlaps",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Overlaps" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Overlaps" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Overlaps(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_TransformTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_TransformTo",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_TransformTo" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_TransformTo" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
  }
  arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRGeometryShadow_TransformTo(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OSRCoordinateTransformationShadow *arg2 = (OSRCoordinateTransformationShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Transform",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Transform" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Transform" "', argument " "2"" of type '" "OSRCoordinateTransformationShadow *""'"); 
  }
  arg2 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRGeometryShadow_Transform(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetSpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OSRSpatialReferenceShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetSpatialReference",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetSpatialReference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OSRSpatialReferenceShadow *)OGRGeometryShadow_GetSpatialReference(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_AssignSpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_AssignSpatialReference",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AssignSpatialReference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AssignSpatialReference" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
  }
  arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_AssignSpatialReference(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_CloseRings(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_CloseRings",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_CloseRings" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_CloseRings(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_FlattenTo2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_FlattenTo2D",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_FlattenTo2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_FlattenTo2D(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Segmentize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Segmentize",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Segmentize" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Segmentize" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_Segmentize(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetEnvelope(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double argout2[4] ;
  PyObject * obj0 = 0 ;
  
  {
    /* %typemap(in,numinputs=0) (double argout2[ANY]) */
    memset(argout2, 0, sizeof(argout2));
    arg2 = argout2;
  }
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetEnvelope",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetEnvelope" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_GetEnvelope(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double argout[ANY]) */
    PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
    resultobj = t_output_helper(resultobj,out);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetEnvelope3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double argout2[6] ;
  PyObject * obj0 = 0 ;
  
  {
    /* %typemap(in,numinputs=0) (double argout2[ANY]) */
    memset(argout2, 0, sizeof(argout2));
    arg2 = argout2;
  }
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetEnvelope3D",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetEnvelope3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_GetEnvelope3D(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double argout[ANY]) */
    PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
    resultobj = t_output_helper(resultobj,out);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Centroid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Centroid",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Centroid" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Centroid(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_PointOnSurface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_PointOnSurface",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_PointOnSurface" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_PointOnSurface(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_WkbSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_WkbSize",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_WkbSize" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGeometryShadow_WkbSize(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetCoordinateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetCoordinateDimension",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetCoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGeometryShadow_GetCoordinateDimension(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_CoordinateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_CoordinateDimension",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_CoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGeometryShadow_CoordinateDimension(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Is3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Is3D",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Is3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGeometryShadow_Is3D(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_IsMeasured(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsMeasured",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsMeasured" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGeometryShadow_IsMeasured(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SetCoordinateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SetCoordinateDimension",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetCoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetCoordinateDimension" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_SetCoordinateDimension(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Set3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Set3D",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Set3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Set3D" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_Set3D(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SetMeasured(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SetMeasured",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetMeasured" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetMeasured" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_SetMeasured(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetDimension",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGeometryShadow_GetDimension(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_HasCurveGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) FALSE ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O|O:Geometry_HasCurveGeometry",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_HasCurveGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_HasCurveGeometry" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGeometryShadow_HasCurveGeometry(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetLinearGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 = (double) 0.0 ;
  char **arg3 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "dfMaxAngleStepSizeDegrees",(char *) "options", NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Geometry_GetLinearGeometry",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetLinearGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_double(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetLinearGeometry" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
  }
  if (obj2) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj2) || PyUnicode_Check(obj2)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj2)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      Py_ssize_t size = PySequence_Size(obj2);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj2,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
          if( !pyUTF8Str )
          {
            Py_DECREF(pyObj);
            PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
            SWIG_fail;
          }
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg3 = CSLAddString( arg3, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_GetLinearGeometry(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetCurveGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char **arg2 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "options", NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetCurveGeometry",kwnames,&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetCurveGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
      if ( ! PySequence_Check(obj1) || PyUnicode_Check(obj1)
  #if PY_VERSION_HEX < 0x03000000
        || PyString_Check(obj1)
  #endif
        ) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      Py_ssize_t size = PySequence_Size(obj1);
      if( size != (int)size ) {
        PyErr_SetString(PyExc_TypeError, "too big sequence");
        SWIG_fail;
      }
      for (int i = 0; i < (int)size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj1,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
          if( !pyUTF8Str )
          {
            Py_DECREF(pyObj);
            PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
            SWIG_fail;
          }
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg2 = CSLAddString( arg2, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_GetCurveGeometry(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Value",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Value" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Value" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Value(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *Geometry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRGeometryShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)":GetDriverCount")) SWIG_fail;
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGetDriverCount();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetOpenDSCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)":GetOpenDSCount")) SWIG_fail;
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGetOpenDSCount();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SetGenerate_DB2_V72_BYTE_ORDER(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:SetGenerate_DB2_V72_BYTE_ORDER",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetGenerate_DB2_V72_BYTE_ORDER" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRSetGenerate_DB2_V72_BYTE_ORDER(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RegisterAll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  
  if (!PyArg_ParseTuple(args,(char *)":RegisterAll")) SWIG_fail;
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRRegisterAll();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeometryTypeToName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GeometryTypeToName",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GeometryTypeToName" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRGeometryTypeToName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetFieldTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GetFieldTypeName",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetFieldTypeName" "', argument " "1"" of type '" "OGRFieldType""'");
  } 
  arg1 = static_cast< OGRFieldType >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGR_GetFieldTypeName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetFieldSubTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldSubType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GetFieldSubTypeName",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetFieldSubTypeName" "', argument " "1"" of type '" "OGRFieldSubType""'");
  } 
  arg1 = static_cast< OGRFieldSubType >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGR_GetFieldSubTypeName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_Flatten(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRwkbGeometryType result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GT_Flatten",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_Flatten" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)OGR_GT_Flatten(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_SetZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRwkbGeometryType result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GT_SetZ",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_SetZ" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)OGR_GT_SetZ(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_SetM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRwkbGeometryType result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GT_SetM",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_SetM" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)OGR_GT_SetM(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_SetModifier(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRwkbGeometryType arg1 ;
  int arg2 ;
  int arg3 = (int) FALSE ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  OGRwkbGeometryType result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO|O:GT_SetModifier",&obj0,&obj1,&obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_SetModifier" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GT_SetModifier" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (obj2) {
    ecode3 = SWIG_AsVal_int(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GT_SetModifier" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)GT_SetModifier(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_HasZ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GT_HasZ",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_HasZ" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGR_GT_HasZ(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_HasM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GT_HasM",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_HasM" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGR_GT_HasM(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_IsSubClassOf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRwkbGeometryType arg1 ;
  OGRwkbGeometryType arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:GT_IsSubClassOf",&obj0,&obj1)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_IsSubClassOf" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GT_IsSubClassOf" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
  } 
  arg2 = static_cast< OGRwkbGeometryType >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGR_GT_IsSubClassOf(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_IsCurve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GT_IsCurve",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_IsCurve" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGR_GT_IsCurve(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_IsSurface(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GT_IsSurface",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_IsSurface" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGR_GT_IsSurface(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_IsNonLinear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GT_IsNonLinear",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_IsNonLinear" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGR_GT_IsNonLinear(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_GetCollection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRwkbGeometryType result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GT_GetCollection",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_GetCollection" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)OGR_GT_GetCollection(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_GetCurve(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRwkbGeometryType result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GT_GetCurve",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_GetCurve" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)OGR_GT_GetCurve(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_GetLinear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRwkbGeometryType result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GT_GetLinear",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_GetLinear" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)OGR_GT_GetLinear(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SetNonLinearGeometriesEnabledFlag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:SetNonLinearGeometriesEnabledFlag",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetNonLinearGeometriesEnabledFlag" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRSetNonLinearGeometriesEnabledFlag(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetNonLinearGeometriesEnabledFlag(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)":GetNonLinearGeometriesEnabledFlag")) SWIG_fail;
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGetNonLinearGeometriesEnabledFlag();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetOpenDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRDataSourceShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GetOpenDS",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetOpenDS" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRDataSourceShadow *)GetOpenDS(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  char *arg1 = (char *) 0 ;
  int arg2 = (int) 0 ;
  int bToFree1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "utf8_path",(char *) "update", NULL 
  };
  OGRDataSourceShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Open",kwnames,&obj0,&obj1)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Open" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRDataSourceShadow *)Open((char const *)arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if( result == NULL && bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
    if( result != NULL && bUseExceptions ) {
      StoreLastException();
#ifdef SED_HACKS
      bLocalUseExceptionsCode = FALSE;
#endif
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_OpenShared(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  char *arg1 = (char *) 0 ;
  int arg2 = (int) 0 ;
  int bToFree1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "utf8_path",(char *) "update", NULL 
  };
  OGRDataSourceShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:OpenShared",kwnames,&obj0,&obj1)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenShared" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRDataSourceShadow *)OpenShared((char const *)arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
#ifndef SED_HACKS
    if( result == NULL && bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
    if( result != NULL && bUseExceptions ) {
      StoreLastException();
#ifdef SED_HACKS
      bLocalUseExceptionsCode = FALSE;
#endif
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetDriverByName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRDriverShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GetDriverByName",&obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    result = (OGRDriverShadow *)GetDriverByName((char const *)arg1);
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRDriverShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GetDriver",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDriver" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    result = (OGRDriverShadow *)GetDriver(arg1);
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeneralCmdLineProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  char **arg1 = (char **) 0 ;
  int arg2 = (int) 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char **result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O|O:GeneralCmdLineProcessor",&obj0,&obj1)) SWIG_fail;
  {
    /* %typemap(in) char **options */
    /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
    if ( ! PySequence_Check(obj0) || PyUnicode_Check(obj0)
  #if PY_VERSION_HEX < 0x03000000
      || PyString_Check(obj0)
  #endif
      ) {
      PyErr_SetString(PyExc_TypeError,"not a sequence");
      SWIG_fail;
    }
    
    Py_ssize_t size = PySequence_Size(obj0);
    if( size != (int)size ) {
      PyErr_SetString(PyExc_TypeError, "too big sequence");
      SWIG_fail;
    }
    for (int i = 0; i < (int)size; i++) {
      PyObject* pyObj = PySequence_GetItem(obj0,i);
      if (PyUnicode_Check(pyObj))
      {
        char *pszStr;
        Py_ssize_t nLen;
        PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
        if( !pyUTF8Str )
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
          SWIG_fail;
        }
#if PY_VERSION_HEX >= 0x03000000
        PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
        PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
        arg1 = CSLAddString( arg1, pszStr );
        Py_XDECREF(pyUTF8Str);
      }
#if PY_VERSION_HEX >= 0x03000000
      else if (PyBytes_Check(pyObj))
      arg1 = CSLAddString( arg1, PyBytes_AsString(pyObj) );
#else
      else if (PyString_Check(pyObj))
      arg1 = CSLAddString( arg1, PyString_AsString(pyObj) );
#endif
      else
      {
        Py_DECREF(pyObj);
        PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
        SWIG_fail;
      }
      Py_DECREF(pyObj);
    }
  }
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeneralCmdLineProcessor" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    result = (char **)GeneralCmdLineProcessor(arg1,arg2);
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    char **stringarray = result;
    if ( stringarray == NULL ) {
      resultobj = Py_None;
      Py_INCREF( resultobj );
    }
    else {
      int len = CSLCount( stringarray );
      resultobj = PyList_New( len );
      for ( int i = 0; i < len; ++i ) {
        PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
        PyList_SetItem(resultobj, i, o );
      }
    }
    CSLDestroy(result);
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermProgress_nocb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  double arg1 ;
  char *arg2 = (char *) NULL ;
  void *arg3 = (void *) NULL ;
  double val1 ;
  int ecode1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *  kwnames[] = {
    (char *) "dfProgress",(char *) "pszMessage",(char *) "pData", NULL 
  };
  int result;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:TermProgress_nocb",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "TermProgress_nocb" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  if (obj1) {
    res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermProgress_nocb" "', argument " "2"" of type '" "char const *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  if (obj2) {
    res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TermProgress_nocb" "', argument " "3"" of type '" "void *""'"); 
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    result = (int)GDALTermProgress_nocb(arg1,(char const *)arg2,arg3);
#ifndef SED_HACKS
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *TermProgress_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *module;
  PyObject *d;
  if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
  d = PyModule_GetDict(module);
  if (!d) return NULL;
  
  return SWIG_Py_Void();
}


static PyMethodDef SwigMethods[] = {
	 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
	 { (char *)"wkb25DBit_swigconstant", wkb25DBit_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkb25Bit_swigconstant", wkb25Bit_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbUnknown_swigconstant", wkbUnknown_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbPoint_swigconstant", wkbPoint_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbLineString_swigconstant", wkbLineString_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbPolygon_swigconstant", wkbPolygon_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiPoint_swigconstant", wkbMultiPoint_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiLineString_swigconstant", wkbMultiLineString_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiPolygon_swigconstant", wkbMultiPolygon_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbGeometryCollection_swigconstant", wkbGeometryCollection_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbCircularString_swigconstant", wkbCircularString_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbCompoundCurve_swigconstant", wkbCompoundCurve_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbCurvePolygon_swigconstant", wkbCurvePolygon_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiCurve_swigconstant", wkbMultiCurve_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiSurface_swigconstant", wkbMultiSurface_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbCurve_swigconstant", wkbCurve_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbSurface_swigconstant", wkbSurface_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbPolyhedralSurface_swigconstant", wkbPolyhedralSurface_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbTIN_swigconstant", wkbTIN_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbTriangle_swigconstant", wkbTriangle_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbNone_swigconstant", wkbNone_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbLinearRing_swigconstant", wkbLinearRing_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbCircularStringZ_swigconstant", wkbCircularStringZ_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbCompoundCurveZ_swigconstant", wkbCompoundCurveZ_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbCurvePolygonZ_swigconstant", wkbCurvePolygonZ_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiCurveZ_swigconstant", wkbMultiCurveZ_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiSurfaceZ_swigconstant", wkbMultiSurfaceZ_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbCurveZ_swigconstant", wkbCurveZ_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbSurfaceZ_swigconstant", wkbSurfaceZ_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbPolyhedralSurfaceZ_swigconstant", wkbPolyhedralSurfaceZ_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbTINZ_swigconstant", wkbTINZ_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbTriangleZ_swigconstant", wkbTriangleZ_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbPointM_swigconstant", wkbPointM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbLineStringM_swigconstant", wkbLineStringM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbPolygonM_swigconstant", wkbPolygonM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiPointM_swigconstant", wkbMultiPointM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiLineStringM_swigconstant", wkbMultiLineStringM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiPolygonM_swigconstant", wkbMultiPolygonM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbGeometryCollectionM_swigconstant", wkbGeometryCollectionM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbCircularStringM_swigconstant", wkbCircularStringM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbCompoundCurveM_swigconstant", wkbCompoundCurveM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbCurvePolygonM_swigconstant", wkbCurvePolygonM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiCurveM_swigconstant", wkbMultiCurveM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiSurfaceM_swigconstant", wkbMultiSurfaceM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbCurveM_swigconstant", wkbCurveM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbSurfaceM_swigconstant", wkbSurfaceM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbPolyhedralSurfaceM_swigconstant", wkbPolyhedralSurfaceM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbTINM_swigconstant", wkbTINM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbTriangleM_swigconstant", wkbTriangleM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbPointZM_swigconstant", wkbPointZM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbLineStringZM_swigconstant", wkbLineStringZM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbPolygonZM_swigconstant", wkbPolygonZM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiPointZM_swigconstant", wkbMultiPointZM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiLineStringZM_swigconstant", wkbMultiLineStringZM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiPolygonZM_swigconstant", wkbMultiPolygonZM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbGeometryCollectionZM_swigconstant", wkbGeometryCollectionZM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbCircularStringZM_swigconstant", wkbCircularStringZM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbCompoundCurveZM_swigconstant", wkbCompoundCurveZM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbCurvePolygonZM_swigconstant", wkbCurvePolygonZM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiCurveZM_swigconstant", wkbMultiCurveZM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiSurfaceZM_swigconstant", wkbMultiSurfaceZM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbCurveZM_swigconstant", wkbCurveZM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbSurfaceZM_swigconstant", wkbSurfaceZM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbPolyhedralSurfaceZM_swigconstant", wkbPolyhedralSurfaceZM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbTINZM_swigconstant", wkbTINZM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbTriangleZM_swigconstant", wkbTriangleZM_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbPoint25D_swigconstant", wkbPoint25D_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbLineString25D_swigconstant", wkbLineString25D_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbPolygon25D_swigconstant", wkbPolygon25D_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiPoint25D_swigconstant", wkbMultiPoint25D_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiLineString25D_swigconstant", wkbMultiLineString25D_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbMultiPolygon25D_swigconstant", wkbMultiPolygon25D_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbGeometryCollection25D_swigconstant", wkbGeometryCollection25D_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFTInteger_swigconstant", OFTInteger_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFTIntegerList_swigconstant", OFTIntegerList_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFTReal_swigconstant", OFTReal_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFTRealList_swigconstant", OFTRealList_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFTString_swigconstant", OFTString_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFTStringList_swigconstant", OFTStringList_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFTWideString_swigconstant", OFTWideString_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFTWideStringList_swigconstant", OFTWideStringList_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFTBinary_swigconstant", OFTBinary_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFTDate_swigconstant", OFTDate_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFTTime_swigconstant", OFTTime_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFTDateTime_swigconstant", OFTDateTime_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFTInteger64_swigconstant", OFTInteger64_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFTInteger64List_swigconstant", OFTInteger64List_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFSTNone_swigconstant", OFSTNone_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFSTBoolean_swigconstant", OFSTBoolean_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFSTInt16_swigconstant", OFSTInt16_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OFSTFloat32_swigconstant", OFSTFloat32_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OJUndefined_swigconstant", OJUndefined_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OJLeft_swigconstant", OJLeft_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OJRight_swigconstant", OJRight_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbXDR_swigconstant", wkbXDR_swigconstant, METH_VARARGS, NULL},
	 { (char *)"wkbNDR_swigconstant", wkbNDR_swigconstant, METH_VARARGS, NULL},
	 { (char *)"NullFID_swigconstant", NullFID_swigconstant, METH_VARARGS, NULL},
	 { (char *)"ALTER_NAME_FLAG_swigconstant", ALTER_NAME_FLAG_swigconstant, METH_VARARGS, NULL},
	 { (char *)"ALTER_TYPE_FLAG_swigconstant", ALTER_TYPE_FLAG_swigconstant, METH_VARARGS, NULL},
	 { (char *)"ALTER_WIDTH_PRECISION_FLAG_swigconstant", ALTER_WIDTH_PRECISION_FLAG_swigconstant, METH_VARARGS, NULL},
	 { (char *)"ALTER_NULLABLE_FLAG_swigconstant", ALTER_NULLABLE_FLAG_swigconstant, METH_VARARGS, NULL},
	 { (char *)"ALTER_DEFAULT_FLAG_swigconstant", ALTER_DEFAULT_FLAG_swigconstant, METH_VARARGS, NULL},
	 { (char *)"ALTER_ALL_FLAG_swigconstant", ALTER_ALL_FLAG_swigconstant, METH_VARARGS, NULL},
	 { (char *)"F_VAL_NULL_swigconstant", F_VAL_NULL_swigconstant, METH_VARARGS, NULL},
	 { (char *)"F_VAL_GEOM_TYPE_swigconstant", F_VAL_GEOM_TYPE_swigconstant, METH_VARARGS, NULL},
	 { (char *)"F_VAL_WIDTH_swigconstant", F_VAL_WIDTH_swigconstant, METH_VARARGS, NULL},
	 { (char *)"F_VAL_ALLOW_NULL_WHEN_DEFAULT_swigconstant", F_VAL_ALLOW_NULL_WHEN_DEFAULT_swigconstant, METH_VARARGS, NULL},
	 { (char *)"F_VAL_ALL_swigconstant", F_VAL_ALL_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCRandomRead_swigconstant", OLCRandomRead_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCSequentialWrite_swigconstant", OLCSequentialWrite_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCRandomWrite_swigconstant", OLCRandomWrite_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCFastSpatialFilter_swigconstant", OLCFastSpatialFilter_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCFastFeatureCount_swigconstant", OLCFastFeatureCount_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCFastGetExtent_swigconstant", OLCFastGetExtent_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCCreateField_swigconstant", OLCCreateField_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCDeleteField_swigconstant", OLCDeleteField_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCReorderFields_swigconstant", OLCReorderFields_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCAlterFieldDefn_swigconstant", OLCAlterFieldDefn_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCTransactions_swigconstant", OLCTransactions_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCDeleteFeature_swigconstant", OLCDeleteFeature_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCFastSetNextByIndex_swigconstant", OLCFastSetNextByIndex_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCStringsAsUTF8_swigconstant", OLCStringsAsUTF8_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCIgnoreFields_swigconstant", OLCIgnoreFields_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCCreateGeomField_swigconstant", OLCCreateGeomField_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCCurveGeometries_swigconstant", OLCCurveGeometries_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLCMeasuredGeometries_swigconstant", OLCMeasuredGeometries_swigconstant, METH_VARARGS, NULL},
	 { (char *)"ODsCCreateLayer_swigconstant", ODsCCreateLayer_swigconstant, METH_VARARGS, NULL},
	 { (char *)"ODsCDeleteLayer_swigconstant", ODsCDeleteLayer_swigconstant, METH_VARARGS, NULL},
	 { (char *)"ODsCCreateGeomFieldAfterCreateLayer_swigconstant", ODsCCreateGeomFieldAfterCreateLayer_swigconstant, METH_VARARGS, NULL},
	 { (char *)"ODsCCurveGeometries_swigconstant", ODsCCurveGeometries_swigconstant, METH_VARARGS, NULL},
	 { (char *)"ODsCTransactions_swigconstant", ODsCTransactions_swigconstant, METH_VARARGS, NULL},
	 { (char *)"ODsCEmulatedTransactions_swigconstant", ODsCEmulatedTransactions_swigconstant, METH_VARARGS, NULL},
	 { (char *)"ODsCMeasuredGeometries_swigconstant", ODsCMeasuredGeometries_swigconstant, METH_VARARGS, NULL},
	 { (char *)"ODsCRandomLayerRead_swigconstant", ODsCRandomLayerRead_swigconstant, METH_VARARGS, NULL},
	 { (char *)"ODsCRandomLayerWrite_swigconstant", ODsCRandomLayerWrite_swigconstant, METH_VARARGS, NULL},
	 { (char *)"ODrCCreateDataSource_swigconstant", ODrCCreateDataSource_swigconstant, METH_VARARGS, NULL},
	 { (char *)"ODrCDeleteDataSource_swigconstant", ODrCDeleteDataSource_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OLMD_FID64_swigconstant", OLMD_FID64_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OGRERR_NONE_swigconstant", OGRERR_NONE_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OGRERR_NOT_ENOUGH_DATA_swigconstant", OGRERR_NOT_ENOUGH_DATA_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OGRERR_NOT_ENOUGH_MEMORY_swigconstant", OGRERR_NOT_ENOUGH_MEMORY_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OGRERR_UNSUPPORTED_GEOMETRY_TYPE_swigconstant", OGRERR_UNSUPPORTED_GEOMETRY_TYPE_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OGRERR_UNSUPPORTED_OPERATION_swigconstant", OGRERR_UNSUPPORTED_OPERATION_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OGRERR_CORRUPT_DATA_swigconstant", OGRERR_CORRUPT_DATA_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OGRERR_FAILURE_swigconstant", OGRERR_FAILURE_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OGRERR_UNSUPPORTED_SRS_swigconstant", OGRERR_UNSUPPORTED_SRS_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OGRERR_INVALID_HANDLE_swigconstant", OGRERR_INVALID_HANDLE_swigconstant, METH_VARARGS, NULL},
	 { (char *)"OGRERR_NON_EXISTING_FEATURE_swigconstant", OGRERR_NON_EXISTING_FEATURE_swigconstant, METH_VARARGS, NULL},
	 { (char *)"GetUseExceptions", _wrap_GetUseExceptions, METH_VARARGS, (char *)"GetUseExceptions() -> int"},
	 { (char *)"UseExceptions", _wrap_UseExceptions, METH_VARARGS, (char *)"UseExceptions()"},
	 { (char *)"DontUseExceptions", _wrap_DontUseExceptions, METH_VARARGS, (char *)"DontUseExceptions()"},
	 { (char *)"MajorObject_GetDescription", _wrap_MajorObject_GetDescription, METH_VARARGS, (char *)"MajorObject_GetDescription(MajorObject self) -> char const *"},
	 { (char *)"MajorObject_SetDescription", _wrap_MajorObject_SetDescription, METH_VARARGS, (char *)"MajorObject_SetDescription(MajorObject self, char const * pszNewDesc)"},
	 { (char *)"MajorObject_GetMetadataDomainList", _wrap_MajorObject_GetMetadataDomainList, METH_VARARGS, (char *)"MajorObject_GetMetadataDomainList(MajorObject self) -> char **"},
	 { (char *)"MajorObject_GetMetadata_Dict", _wrap_MajorObject_GetMetadata_Dict, METH_VARARGS, (char *)"MajorObject_GetMetadata_Dict(MajorObject self, char const * pszDomain) -> char **"},
	 { (char *)"MajorObject_GetMetadata_List", _wrap_MajorObject_GetMetadata_List, METH_VARARGS, (char *)"MajorObject_GetMetadata_List(MajorObject self, char const * pszDomain) -> char **"},
	 { (char *)"MajorObject_SetMetadata", _wrap_MajorObject_SetMetadata, METH_VARARGS, (char *)"\n"
		"SetMetadata(char ** papszMetadata, char const * pszDomain) -> CPLErr\n"
		"MajorObject_SetMetadata(MajorObject self, char * pszMetadataString, char const * pszDomain) -> CPLErr\n"
		""},
	 { (char *)"MajorObject_GetMetadataItem", _wrap_MajorObject_GetMetadataItem, METH_VARARGS, (char *)"MajorObject_GetMetadataItem(MajorObject self, char const * pszName, char const * pszDomain) -> char const *"},
	 { (char *)"MajorObject_SetMetadataItem", _wrap_MajorObject_SetMetadataItem, METH_VARARGS, (char *)"MajorObject_SetMetadataItem(MajorObject self, char const * pszName, char const * pszValue, char const * pszDomain) -> CPLErr"},
	 { (char *)"MajorObject_swigregister", MajorObject_swigregister, METH_VARARGS, NULL},
	 { (char *)"new_StyleTable", _wrap_new_StyleTable, METH_VARARGS, (char *)"new_StyleTable() -> StyleTable"},
	 { (char *)"delete_StyleTable", _wrap_delete_StyleTable, METH_VARARGS, (char *)"delete_StyleTable(StyleTable self)"},
	 { (char *)"StyleTable_AddStyle", _wrap_StyleTable_AddStyle, METH_VARARGS, (char *)"StyleTable_AddStyle(StyleTable self, char const * pszName, char const * pszStyleString) -> int"},
	 { (char *)"StyleTable_LoadStyleTable", _wrap_StyleTable_LoadStyleTable, METH_VARARGS, (char *)"StyleTable_LoadStyleTable(StyleTable self, char const * utf8_path) -> int"},
	 { (char *)"StyleTable_SaveStyleTable", _wrap_StyleTable_SaveStyleTable, METH_VARARGS, (char *)"StyleTable_SaveStyleTable(StyleTable self, char const * utf8_path) -> int"},
	 { (char *)"StyleTable_Find", _wrap_StyleTable_Find, METH_VARARGS, (char *)"StyleTable_Find(StyleTable self, char const * pszName) -> char const *"},
	 { (char *)"StyleTable_ResetStyleStringReading", _wrap_StyleTable_ResetStyleStringReading, METH_VARARGS, (char *)"StyleTable_ResetStyleStringReading(StyleTable self)"},
	 { (char *)"StyleTable_GetNextStyle", _wrap_StyleTable_GetNextStyle, METH_VARARGS, (char *)"StyleTable_GetNextStyle(StyleTable self) -> char const *"},
	 { (char *)"StyleTable_GetLastStyleName", _wrap_StyleTable_GetLastStyleName, METH_VARARGS, (char *)"StyleTable_GetLastStyleName(StyleTable self) -> char const *"},
	 { (char *)"StyleTable_swigregister", StyleTable_swigregister, METH_VARARGS, NULL},
	 { (char *)"Driver_name_get", _wrap_Driver_name_get, METH_VARARGS, (char *)"Driver_name_get(Driver self) -> char const *"},
	 { (char *)"Driver_CreateDataSource", (PyCFunction) _wrap_Driver_CreateDataSource, METH_VARARGS | METH_KEYWORDS, (char *)"Driver_CreateDataSource(Driver self, char const * utf8_path, char ** options=None) -> DataSource"},
	 { (char *)"Driver_CopyDataSource", (PyCFunction) _wrap_Driver_CopyDataSource, METH_VARARGS | METH_KEYWORDS, (char *)"Driver_CopyDataSource(Driver self, DataSource copy_ds, char const * utf8_path, char ** options=None) -> DataSource"},
	 { (char *)"Driver_Open", (PyCFunction) _wrap_Driver_Open, METH_VARARGS | METH_KEYWORDS, (char *)"Driver_Open(Driver self, char const * utf8_path, int update=0) -> DataSource"},
	 { (char *)"Driver_DeleteDataSource", _wrap_Driver_DeleteDataSource, METH_VARARGS, (char *)"Driver_DeleteDataSource(Driver self, char const * utf8_path) -> int"},
	 { (char *)"Driver_TestCapability", _wrap_Driver_TestCapability, METH_VARARGS, (char *)"Driver_TestCapability(Driver self, char const * cap) -> bool"},
	 { (char *)"Driver_GetName", _wrap_Driver_GetName, METH_VARARGS, (char *)"Driver_GetName(Driver self) -> char const *"},
	 { (char *)"Driver_Register", _wrap_Driver_Register, METH_VARARGS, (char *)"Driver_Register(Driver self)"},
	 { (char *)"Driver_Deregister", _wrap_Driver_Deregister, METH_VARARGS, (char *)"Driver_Deregister(Driver self)"},
	 { (char *)"Driver_swigregister", Driver_swigregister, METH_VARARGS, NULL},
	 { (char *)"DataSource_name_get", _wrap_DataSource_name_get, METH_VARARGS, (char *)"DataSource_name_get(DataSource self) -> char const *"},
	 { (char *)"delete_DataSource", _wrap_delete_DataSource, METH_VARARGS, (char *)"delete_DataSource(DataSource self)"},
	 { (char *)"DataSource_GetRefCount", _wrap_DataSource_GetRefCount, METH_VARARGS, (char *)"\n"
		"DataSource_GetRefCount(DataSource self) -> int\n"
		"\n"
		"int\n"
		"OGR_DS_GetRefCount(OGRDataSourceH hDataSource) \n"
		""},
	 { (char *)"DataSource_GetSummaryRefCount", _wrap_DataSource_GetSummaryRefCount, METH_VARARGS, (char *)"\n"
		"DataSource_GetSummaryRefCount(DataSource self) -> int\n"
		"\n"
		"int\n"
		"OGR_DS_GetSummaryRefCount(OGRDataSourceH hDataSource) \n"
		""},
	 { (char *)"DataSource_GetLayerCount", _wrap_DataSource_GetLayerCount, METH_VARARGS, (char *)"\n"
		"DataSource_GetLayerCount(DataSource self) -> int\n"
		"\n"
		"int\n"
		"OGR_DS_GetLayerCount(OGRDataSourceH hDS)\n"
		"\n"
		"Get the number of layers in this data source.\n"
		"\n"
		"Deprecated Use GDALDatasetGetLayerCount() in GDAL 2.0\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  handle to the data source from which to get the number of\n"
		"layers.\n"
		"\n"
		"layer count. \n"
		""},
	 { (char *)"DataSource_GetDriver", _wrap_DataSource_GetDriver, METH_VARARGS, (char *)"\n"
		"DataSource_GetDriver(DataSource self) -> Driver\n"
		"\n"
		"OGRSFDriverH\n"
		"OGR_DS_GetDriver(OGRDataSourceH hDS)\n"
		"\n"
		"Returns the driver that the dataset was opened with.\n"
		"\n"
		"NOTE: Starting with GDAL 2.0, it is NOT safe to cast the returned\n"
		"handle to OGRSFDriver*. If a C++ object is needed, the handle should\n"
		"be cast to GDALDriver*.\n"
		"\n"
		"Deprecated Use GDALGetDatasetDriver() in GDAL 2.0\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  handle to the datasource\n"
		"\n"
		"NULL if driver info is not available, or pointer to a driver owned by\n"
		"the OGRSFDriverManager. \n"
		""},
	 { (char *)"DataSource_GetName", _wrap_DataSource_GetName, METH_VARARGS, (char *)"\n"
		"DataSource_GetName(DataSource self) -> char const *\n"
		"\n"
		"const char*\n"
		"OGR_DS_GetName(OGRDataSourceH hDS)\n"
		"\n"
		"Returns the name of the data source.\n"
		"\n"
		"This string should be sufficient to open the data source if passed to\n"
		"the same OGRSFDriver that this data source was opened with, but it\n"
		"need not be exactly the same string that was used to open the data\n"
		"source. Normally this is a filename.\n"
		"\n"
		"Deprecated Use GDALGetDescription() in GDAL 2.0\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  handle to the data source to get the name from.\n"
		"\n"
		"pointer to an internal name string which should not be modified or\n"
		"freed by the caller. \n"
		""},
	 { (char *)"DataSource_DeleteLayer", _wrap_DataSource_DeleteLayer, METH_VARARGS, (char *)"\n"
		"DataSource_DeleteLayer(DataSource self, int index) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_DS_DeleteLayer(OGRDataSourceH hDS, int iLayer)\n"
		"\n"
		"Delete the indicated layer from the datasource.\n"
		"\n"
		"If this method is supported the ODsCDeleteLayer capability will test\n"
		"TRUE on the OGRDataSource.\n"
		"\n"
		"Deprecated Use GDALDatasetDeleteLayer() in GDAL 2.0\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  handle to the datasource\n"
		"\n"
		"iLayer:  the index of the layer to delete.\n"
		"\n"
		"OGRERR_NONE on success, or OGRERR_UNSUPPORTED_OPERATION if deleting\n"
		"layers is not supported for this datasource. \n"
		""},
	 { (char *)"DataSource_SyncToDisk", _wrap_DataSource_SyncToDisk, METH_VARARGS, (char *)"\n"
		"DataSource_SyncToDisk(DataSource self) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_DS_SyncToDisk(OGRDataSourceH hDS)\n"
		"\n"
		"Flush pending changes to disk.\n"
		"\n"
		"See GDALDataset::FlushCache() \n"
		""},
	 { (char *)"DataSource_FlushCache", _wrap_DataSource_FlushCache, METH_VARARGS, (char *)"DataSource_FlushCache(DataSource self)"},
	 { (char *)"DataSource_CreateLayer", (PyCFunction) _wrap_DataSource_CreateLayer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"DataSource_CreateLayer(DataSource self, char const * name, SpatialReference srs=None, OGRwkbGeometryType geom_type, char ** options=None) -> Layer\n"
		"\n"
		"OGRLayerH\n"
		"OGR_DS_CreateLayer(OGRDataSourceH hDS, const char *pszName,\n"
		"OGRSpatialReferenceH hSpatialRef, OGRwkbGeometryType eType, char\n"
		"**papszOptions)\n"
		"\n"
		"This function attempts to create a new layer on the data source with\n"
		"the indicated name, coordinate system, geometry type.\n"
		"\n"
		"The papszOptions argument can be used to control driver specific\n"
		"creation options. These options are normally documented in the format\n"
		"specific documentation.\n"
		"\n"
		"Deprecated Use GDALDatasetCreateLayer() in GDAL 2.0\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  The dataset handle.\n"
		"\n"
		"pszName:  the name for the new layer. This should ideally not match\n"
		"any existing layer on the datasource.\n"
		"\n"
		"hSpatialRef:  handle to the coordinate system to use for the new\n"
		"layer, or NULL if no coordinate system is available. The driver might\n"
		"only increase the reference counter of the object to take ownership,\n"
		"and not make a full copy, so do not use OSRDestroySpatialReference(),\n"
		"but OSRRelease() instead when you are done with the object.\n"
		"\n"
		"eType:  the geometry type for the layer. Use wkbUnknown if there are\n"
		"no constraints on the types geometry to be written.\n"
		"\n"
		"papszOptions:  a StringList of name=value options. Options are driver\n"
		"specific, and driver information can be found at the following\n"
		"url:http://www.gdal.org/ogr_formats.html\n"
		"\n"
		"NULL is returned on failure, or a new OGRLayer handle on success.\n"
		"Example: \n"
		""},
	 { (char *)"DataSource_CopyLayer", (PyCFunction) _wrap_DataSource_CopyLayer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"DataSource_CopyLayer(DataSource self, Layer src_layer, char const * new_name, char ** options=None) -> Layer\n"
		"\n"
		"OGRLayerH\n"
		"OGR_DS_CopyLayer(OGRDataSourceH hDS, OGRLayerH hSrcLayer, const char\n"
		"*pszNewName, char **papszOptions)\n"
		"\n"
		"Duplicate an existing layer.\n"
		"\n"
		"This function creates a new layer, duplicate the field definitions of\n"
		"the source layer and then duplicate each features of the source layer.\n"
		"The papszOptions argument can be used to control driver specific\n"
		"creation options. These options are normally documented in the format\n"
		"specific documentation. The source layer may come from another\n"
		"dataset.\n"
		"\n"
		"Deprecated Use GDALDatasetCopyLayer() in GDAL 2.0\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  handle to the data source where to create the new layer\n"
		"\n"
		"hSrcLayer:  handle to the source layer.\n"
		"\n"
		"pszNewName:  the name of the layer to create.\n"
		"\n"
		"papszOptions:  a StringList of name=value options. Options are driver\n"
		"specific.\n"
		"\n"
		"an handle to the layer, or NULL if an error occurs. \n"
		""},
	 { (char *)"DataSource_GetLayerByIndex", _wrap_DataSource_GetLayerByIndex, METH_VARARGS, (char *)"DataSource_GetLayerByIndex(DataSource self, int index=0) -> Layer"},
	 { (char *)"DataSource_GetLayerByName", _wrap_DataSource_GetLayerByName, METH_VARARGS, (char *)"\n"
		"DataSource_GetLayerByName(DataSource self, char const * layer_name) -> Layer\n"
		"\n"
		"OGRLayerH\n"
		"OGR_DS_GetLayerByName(OGRDataSourceH hDS, const char *pszName)\n"
		"\n"
		"Fetch a layer by name.\n"
		"\n"
		"The returned layer remains owned by the OGRDataSource and should not\n"
		"be deleted by the application.\n"
		"\n"
		"Deprecated Use GDALDatasetGetLayerByName() in GDAL 2.0\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  handle to the data source from which to get the layer.\n"
		"\n"
		"pszLayerName:  Layer the layer name of the layer to fetch.\n"
		"\n"
		"an handle to the layer, or NULL if the layer is not found or an error\n"
		"occurs. \n"
		""},
	 { (char *)"DataSource_TestCapability", _wrap_DataSource_TestCapability, METH_VARARGS, (char *)"\n"
		"DataSource_TestCapability(DataSource self, char const * cap) -> bool\n"
		"\n"
		"int\n"
		"OGR_DS_TestCapability(OGRDataSourceH hDS, const char *pszCap)\n"
		"\n"
		"Test if capability is available.\n"
		"\n"
		"One of the following data source capability names can be passed into\n"
		"this function, and a TRUE or FALSE value will be returned indicating\n"
		"whether or not the capability is available for this object.\n"
		"\n"
		"ODsCCreateLayer: True if this datasource can create new layers.\n"
		"\n"
		"ODsCDeleteLayer: True if this datasource can delete existing layers.\n"
		"\n"
		"ODsCCreateGeomFieldAfterCreateLayer: True if the layers of this\n"
		"datasource support CreateGeomField() just after layer creation.\n"
		"\n"
		"ODsCCurveGeometries: True if this datasource supports writing curve\n"
		"geometries. (GDAL 2.0). In that case, OLCCurveGeometries must also be\n"
		"declared in layers of that dataset.\n"
		"\n"
		"The #define macro forms of the capability names should be used in\n"
		"preference to the strings themselves to avoid misspelling.\n"
		"\n"
		"Deprecated Use GDALDatasetTestCapability() in GDAL 2.0\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  handle to the data source against which to test the capability.\n"
		"\n"
		"pszCapability:  the capability to test.\n"
		"\n"
		"TRUE if capability available otherwise FALSE. \n"
		""},
	 { (char *)"DataSource_ExecuteSQL", (PyCFunction) _wrap_DataSource_ExecuteSQL, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"DataSource_ExecuteSQL(DataSource self, char const * statement, Geometry spatialFilter=None, char const * dialect) -> Layer\n"
		"\n"
		"OGRLayerH\n"
		"OGR_DS_ExecuteSQL(OGRDataSourceH hDS, const char *pszStatement,\n"
		"OGRGeometryH hSpatialFilter, const char *pszDialect)\n"
		"\n"
		"Execute an SQL statement against the data store.\n"
		"\n"
		"The result of an SQL query is either NULL for statements that are in\n"
		"error, or that have no results set, or an OGRLayer handle representing\n"
		"a results set from the query. Note that this OGRLayer is in addition\n"
		"to the layers in the data store and must be destroyed with\n"
		"OGR_DS_ReleaseResultSet() before the data source is closed\n"
		"(destroyed).\n"
		"\n"
		"For more information on the SQL dialect supported internally by OGR\n"
		"review theOGR SQL document. Some drivers (i.e. Oracle and PostGIS)\n"
		"pass the SQL directly through to the underlying RDBMS.\n"
		"\n"
		"Starting with OGR 1.10, theSQLITE dialect can also be used.\n"
		"\n"
		"Deprecated Use GDALDatasetExecuteSQL() in GDAL 2.0\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  handle to the data source on which the SQL query is executed.\n"
		"\n"
		"pszSQLCommand:  the SQL statement to execute.\n"
		"\n"
		"hSpatialFilter:  handle to a geometry which represents a spatial\n"
		"filter. Can be NULL.\n"
		"\n"
		"pszDialect:  allows control of the statement dialect. If set to NULL,\n"
		"the OGR SQL engine will be used, except for RDBMS drivers that will\n"
		"use their dedicated SQL engine, unless OGRSQL is explicitly passed as\n"
		"the dialect. Starting with OGR 1.10, the SQLITE dialect can also be\n"
		"used.\n"
		"\n"
		"an handle to a OGRLayer containing the results of the query.\n"
		"Deallocate with OGR_DS_ReleaseResultSet(). \n"
		""},
	 { (char *)"DataSource_ReleaseResultSet", _wrap_DataSource_ReleaseResultSet, METH_VARARGS, (char *)"\n"
		"DataSource_ReleaseResultSet(DataSource self, Layer layer)\n"
		"\n"
		"void\n"
		"OGR_DS_ReleaseResultSet(OGRDataSourceH hDS, OGRLayerH hLayer)\n"
		"\n"
		"Release results of OGR_DS_ExecuteSQL().\n"
		"\n"
		"This function should only be used to deallocate OGRLayers resulting\n"
		"from an OGR_DS_ExecuteSQL() call on the same OGRDataSource. Failure to\n"
		"deallocate a results set before destroying the OGRDataSource may cause\n"
		"errors.\n"
		"\n"
		"Deprecated Use GDALDatasetReleaseResultSet() in GDAL 2.0\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  an handle to the data source on which was executed an SQL query.\n"
		"\n"
		"hLayer:  handle to the result of a previous OGR_DS_ExecuteSQL() call.\n"
		"\n"
		""},
	 { (char *)"DataSource_GetStyleTable", _wrap_DataSource_GetStyleTable, METH_VARARGS, (char *)"\n"
		"DataSource_GetStyleTable(DataSource self) -> StyleTable\n"
		"\n"
		"OGRStyleTableH\n"
		"OGR_DS_GetStyleTable(OGRDataSourceH hDS)\n"
		"\n"
		"Get style table. \n"
		""},
	 { (char *)"DataSource_SetStyleTable", _wrap_DataSource_SetStyleTable, METH_VARARGS, (char *)"\n"
		"DataSource_SetStyleTable(DataSource self, StyleTable table)\n"
		"\n"
		"void\n"
		"OGR_DS_SetStyleTable(OGRDataSourceH hDS, OGRStyleTableH hStyleTable)\n"
		"\n"
		"Set style table. \n"
		""},
	 { (char *)"DataSource_StartTransaction", (PyCFunction) _wrap_DataSource_StartTransaction, METH_VARARGS | METH_KEYWORDS, (char *)"DataSource_StartTransaction(DataSource self, int force=False) -> OGRErr"},
	 { (char *)"DataSource_CommitTransaction", _wrap_DataSource_CommitTransaction, METH_VARARGS, (char *)"DataSource_CommitTransaction(DataSource self) -> OGRErr"},
	 { (char *)"DataSource_RollbackTransaction", _wrap_DataSource_RollbackTransaction, METH_VARARGS, (char *)"DataSource_RollbackTransaction(DataSource self) -> OGRErr"},
	 { (char *)"DataSource_swigregister", DataSource_swigregister, METH_VARARGS, NULL},
	 { (char *)"Layer_GetRefCount", _wrap_Layer_GetRefCount, METH_VARARGS, (char *)"\n"
		"Layer_GetRefCount(Layer self) -> int\n"
		"\n"
		"int OGR_L_GetRefCount(OGRLayerH\n"
		"hLayer) \n"
		""},
	 { (char *)"Layer_SetSpatialFilter", _wrap_Layer_SetSpatialFilter, METH_VARARGS, (char *)"\n"
		"SetSpatialFilter(Geometry filter)\n"
		"Layer_SetSpatialFilter(Layer self, int iGeomField, Geometry filter)\n"
		"\n"
		"void\n"
		"OGR_L_SetSpatialFilter(OGRLayerH hLayer, OGRGeometryH hGeom)\n"
		"\n"
		"Set a new spatial filter.\n"
		"\n"
		"This function set the geometry to be used as a spatial filter when\n"
		"fetching features via the OGR_L_GetNextFeature() function. Only\n"
		"features that geometrically intersect the filter geometry will be\n"
		"returned.\n"
		"\n"
		"Currently this test is may be inaccurately implemented, but it is\n"
		"guaranteed that all features whose envelope (as returned by\n"
		"OGR_G_GetEnvelope()) overlaps the envelope of the spatial filter will\n"
		"be returned. This can result in more shapes being returned that should\n"
		"strictly be the case.\n"
		"\n"
		"Starting with GDAL 2.3, features with null or empty geometries will\n"
		"never be considered as matching a spatial filter.\n"
		"\n"
		"This function makes an internal copy of the passed geometry. The\n"
		"passed geometry remains the responsibility of the caller, and may be\n"
		"safely destroyed.\n"
		"\n"
		"For the time being the passed filter geometry should be in the same\n"
		"SRS as the layer (as returned by OGR_L_GetSpatialRef()). In the future\n"
		"this may be generalized.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRLayer::SetSpatialFilter.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer on which to set the spatial filter.\n"
		"\n"
		"hGeom:  handle to the geometry to use as a filtering region. NULL may\n"
		"be passed indicating that the current spatial filter should be\n"
		"cleared, but no new one instituted. \n"
		""},
	 { (char *)"Layer_SetSpatialFilterRect", _wrap_Layer_SetSpatialFilterRect, METH_VARARGS, (char *)"\n"
		"SetSpatialFilterRect(double minx, double miny, double maxx, double maxy)\n"
		"Layer_SetSpatialFilterRect(Layer self, int iGeomField, double minx, double miny, double maxx, double maxy)\n"
		"\n"
		"void\n"
		"OGR_L_SetSpatialFilterRect(OGRLayerH hLayer, double dfMinX, double\n"
		"dfMinY, double dfMaxX, double dfMaxY)\n"
		"\n"
		"Set a new rectangular spatial filter.\n"
		"\n"
		"This method set rectangle to be used as a spatial filter when fetching\n"
		"features via the OGR_L_GetNextFeature() method. Only features that\n"
		"geometrically intersect the given rectangle will be returned.\n"
		"\n"
		"The x/y values should be in the same coordinate system as the layer as\n"
		"a whole (as returned by OGRLayer::GetSpatialRef()). Internally this\n"
		"method is normally implemented as creating a 5 vertex closed\n"
		"rectangular polygon and passing it to OGRLayer::SetSpatialFilter(). It\n"
		"exists as a convenience.\n"
		"\n"
		"The only way to clear a spatial filter set with this method is to call\n"
		"OGRLayer::SetSpatialFilter(NULL).\n"
		"\n"
		"This method is the same as the C++ method\n"
		"OGRLayer::SetSpatialFilterRect().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer on which to set the spatial filter.\n"
		"\n"
		"dfMinX:  the minimum X coordinate for the rectangular region.\n"
		"\n"
		"dfMinY:  the minimum Y coordinate for the rectangular region.\n"
		"\n"
		"dfMaxX:  the maximum X coordinate for the rectangular region.\n"
		"\n"
		"dfMaxY:  the maximum Y coordinate for the rectangular region. \n"
		""},
	 { (char *)"Layer_GetSpatialFilter", _wrap_Layer_GetSpatialFilter, METH_VARARGS, (char *)"\n"
		"Layer_GetSpatialFilter(Layer self) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_L_GetSpatialFilter(OGRLayerH hLayer)\n"
		"\n"
		"This function returns the current spatial filter for this layer.\n"
		"\n"
		"The returned pointer is to an internally owned object, and should not\n"
		"be altered or deleted by the caller.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRLayer::GetSpatialFilter().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer to get the spatial filter from.\n"
		"\n"
		"an handle to the spatial filter geometry. \n"
		""},
	 { (char *)"Layer_SetAttributeFilter", _wrap_Layer_SetAttributeFilter, METH_VARARGS, (char *)"\n"
		"Layer_SetAttributeFilter(Layer self, char * filter_string) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_SetAttributeFilter(OGRLayerH hLayer, const char *pszQuery)\n"
		"\n"
		"Set a new attribute query.\n"
		"\n"
		"This function sets the attribute query string to be used when fetching\n"
		"features via the OGR_L_GetNextFeature() function. Only features for\n"
		"which the query evaluates as true will be returned.\n"
		"\n"
		"The query string should be in the format of an SQL WHERE clause. For\n"
		"instance \"population > 1000000 and population < 5000000\" where\n"
		"population is an attribute in the layer. The query format is a\n"
		"restricted form of SQL WHERE clause as defined\n"
		"\"eq_format=restricted_where\" about half way through this document:\n"
		"\n"
		"http://ogdi.sourceforge.net/prop/6.2.CapabilitiesMetadata.html\n"
		"\n"
		"Note that installing a query string will generally result in resetting\n"
		"the current reading position (ala OGR_L_ResetReading()).\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRLayer::SetAttributeFilter().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer on which attribute query will be\n"
		"executed.\n"
		"\n"
		"pszQuery:  query in restricted SQL WHERE format, or NULL to clear the\n"
		"current query.\n"
		"\n"
		"OGRERR_NONE if successfully installed, or an error code if the query\n"
		"expression is in error, or some other failure occurs. \n"
		""},
	 { (char *)"Layer_ResetReading", _wrap_Layer_ResetReading, METH_VARARGS, (char *)"\n"
		"Layer_ResetReading(Layer self)\n"
		"\n"
		"void\n"
		"OGR_L_ResetReading(OGRLayerH hLayer)\n"
		"\n"
		"Reset feature reading to start on the first feature.\n"
		"\n"
		"This affects GetNextFeature().\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::ResetReading().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer on which features are read. \n"
		""},
	 { (char *)"Layer_GetName", _wrap_Layer_GetName, METH_VARARGS, (char *)"\n"
		"Layer_GetName(Layer self) -> char const *\n"
		"\n"
		"const char* OGR_L_GetName(OGRLayerH\n"
		"hLayer)\n"
		"\n"
		"Return the layer name.\n"
		"\n"
		"This returns the same content as\n"
		"OGR_FD_GetName(OGR_L_GetLayerDefn(hLayer)), but for a few drivers,\n"
		"calling OGR_L_GetName() directly can avoid lengthy layer definition\n"
		"initialization.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::GetName().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer.\n"
		"\n"
		"the layer name (must not been freed)\n"
		"\n"
		"OGR 1.8.0 \n"
		""},
	 { (char *)"Layer_GetGeomType", _wrap_Layer_GetGeomType, METH_VARARGS, (char *)"\n"
		"Layer_GetGeomType(Layer self) -> OGRwkbGeometryType\n"
		"\n"
		"OGRwkbGeometryType\n"
		"OGR_L_GetGeomType(OGRLayerH hLayer)\n"
		"\n"
		"Return the layer geometry type.\n"
		"\n"
		"This returns the same result as\n"
		"OGR_FD_GetGeomType(OGR_L_GetLayerDefn(hLayer)), but for a few drivers,\n"
		"calling OGR_L_GetGeomType() directly can avoid lengthy layer\n"
		"definition initialization.\n"
		"\n"
		"For layers with multiple geometry fields, this method only returns the\n"
		"geometry type of the first geometry column. For other columns, use\n"
		"OGR_GFld_GetType(OGR_FD_GetGeomFieldDefn(OGR_L_GetLayerDefn(hLayer),\n"
		"i)). For layers without any geometry field, this method returns\n"
		"wkbNone.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::GetGeomType().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer.\n"
		"\n"
		"the geometry type\n"
		"\n"
		"OGR 1.8.0 \n"
		""},
	 { (char *)"Layer_GetGeometryColumn", _wrap_Layer_GetGeometryColumn, METH_VARARGS, (char *)"\n"
		"Layer_GetGeometryColumn(Layer self) -> char const *\n"
		"\n"
		"const char*\n"
		"OGR_L_GetGeometryColumn(OGRLayerH hLayer)\n"
		"\n"
		"This method returns the name of the underlying database column being\n"
		"used as the geometry column, or \"\" if not supported.\n"
		"\n"
		"For layers with multiple geometry fields, this method only returns the\n"
		"geometry type of the first geometry column. For other columns, use OGR\n"
		"_GFld_GetNameRef(OGR_FD_GetGeomFieldDefn(OGR_L_GetLayerDefn(hLayer),\n"
		"i)).\n"
		"\n"
		"This method is the same as the C++ method\n"
		"OGRLayer::GetGeometryColumn()\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer\n"
		"\n"
		"geometry column name. \n"
		""},
	 { (char *)"Layer_GetFIDColumn", _wrap_Layer_GetFIDColumn, METH_VARARGS, (char *)"\n"
		"Layer_GetFIDColumn(Layer self) -> char const *\n"
		"\n"
		"const char*\n"
		"OGR_L_GetFIDColumn(OGRLayerH hLayer)\n"
		"\n"
		"This method returns the name of the underlying database column being\n"
		"used as the FID column, or \"\" if not supported.\n"
		"\n"
		"This method is the same as the C++ method OGRLayer::GetFIDColumn()\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer\n"
		"\n"
		"fid column name. \n"
		""},
	 { (char *)"Layer_GetFeature", _wrap_Layer_GetFeature, METH_VARARGS, (char *)"\n"
		"Layer_GetFeature(Layer self, GIntBig fid) -> Feature\n"
		"\n"
		"OGRFeatureH\n"
		"OGR_L_GetFeature(OGRLayerH hLayer, GIntBig nFeatureId)\n"
		"\n"
		"Fetch a feature by its identifier.\n"
		"\n"
		"This function will attempt to read the identified feature. The nFID\n"
		"value cannot be OGRNullFID. Success or failure of this operation is\n"
		"unaffected by the spatial or attribute filters (and specialized\n"
		"implementations in drivers should make sure that they do not take into\n"
		"account spatial or attribute filters).\n"
		"\n"
		"If this function returns a non-NULL feature, it is guaranteed that its\n"
		"feature id ( OGR_F_GetFID()) will be the same as nFID.\n"
		"\n"
		"Use OGR_L_TestCapability(OLCRandomRead) to establish if this layer\n"
		"supports efficient random access reading via OGR_L_GetFeature();\n"
		"however, the call should always work if the feature exists as a\n"
		"fallback implementation just scans all the features in the layer\n"
		"looking for the desired feature.\n"
		"\n"
		"Sequential reads (with OGR_L_GetNextFeature()) are generally\n"
		"considered interrupted by a OGR_L_GetFeature() call.\n"
		"\n"
		"The returned feature should be free with OGR_F_Destroy().\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::GetFeature( ).\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer that owned the feature.\n"
		"\n"
		"nFeatureId:  the feature id of the feature to read.\n"
		"\n"
		"an handle to a feature now owned by the caller, or NULL on failure. \n"
		""},
	 { (char *)"Layer_GetNextFeature", _wrap_Layer_GetNextFeature, METH_VARARGS, (char *)"\n"
		"Layer_GetNextFeature(Layer self) -> Feature\n"
		"\n"
		"OGRFeatureH\n"
		"OGR_L_GetNextFeature(OGRLayerH hLayer)\n"
		"\n"
		"Fetch the next available feature from this layer.\n"
		"\n"
		"The returned feature becomes the responsibility of the caller to\n"
		"delete with OGR_F_Destroy(). It is critical that all features\n"
		"associated with an OGRLayer (more specifically an OGRFeatureDefn) be\n"
		"deleted before that layer/datasource is deleted.\n"
		"\n"
		"Only features matching the current spatial filter (set with\n"
		"SetSpatialFilter()) will be returned.\n"
		"\n"
		"This function implements sequential access to the features of a layer.\n"
		"The OGR_L_ResetReading() function can be used to start at the\n"
		"beginning again.\n"
		"\n"
		"Features returned by OGR_GetNextFeature() may or may not be affected\n"
		"by concurrent modifications depending on drivers. A guaranteed way of\n"
		"seeing modifications in effect is to call OGR_L_ResetReading() on\n"
		"layers where OGR_GetNextFeature() has been called, before reading\n"
		"again. Structural changes in layers (field addition, deletion, ...)\n"
		"when a read is in progress may or may not be possible depending on\n"
		"drivers. If a transaction is committed/aborted, the current sequential\n"
		"reading may or may not be valid after that operation and a call to\n"
		"OGR_L_ResetReading() might be needed.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRLayer::GetNextFeature().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer from which feature are read.\n"
		"\n"
		"an handle to a feature, or NULL if no more features are available. \n"
		""},
	 { (char *)"Layer_SetNextByIndex", _wrap_Layer_SetNextByIndex, METH_VARARGS, (char *)"\n"
		"Layer_SetNextByIndex(Layer self, GIntBig new_index) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_SetNextByIndex(OGRLayerH hLayer, GIntBig nIndex)\n"
		"\n"
		"Move read cursor to the nIndex'th feature in the current resultset.\n"
		"\n"
		"This method allows positioning of a layer such that the\n"
		"GetNextFeature() call will read the requested feature, where nIndex is\n"
		"an absolute index into the current result set. So, setting it to 3\n"
		"would mean the next feature read with GetNextFeature() would have been\n"
		"the 4th feature to have been read if sequential reading took place\n"
		"from the beginning of the layer, including accounting for spatial and\n"
		"attribute filters.\n"
		"\n"
		"Only in rare circumstances is SetNextByIndex() efficiently\n"
		"implemented. In all other cases the default implementation which calls\n"
		"ResetReading() and then calls GetNextFeature() nIndex times is used.\n"
		"To determine if fast seeking is available on the current layer use the\n"
		"TestCapability() method with a value of OLCFastSetNextByIndex.\n"
		"\n"
		"This method is the same as the C++ method OGRLayer::SetNextByIndex()\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer\n"
		"\n"
		"nIndex:  the index indicating how many steps into the result set to\n"
		"seek.\n"
		"\n"
		"OGRERR_NONE on success or an error code. \n"
		""},
	 { (char *)"Layer_SetFeature", _wrap_Layer_SetFeature, METH_VARARGS, (char *)"\n"
		"Layer_SetFeature(Layer self, Feature feature) -> OGRErr\n"
		"\n"
		"OGRErr OGR_L_SetFeature(OGRLayerH\n"
		"hLayer, OGRFeatureH hFeat)\n"
		"\n"
		"Rewrite an existing feature.\n"
		"\n"
		"This function will write a feature to the layer, based on the feature\n"
		"id within the OGRFeature.\n"
		"\n"
		"Use OGR_L_TestCapability(OLCRandomWrite) to establish if this layer\n"
		"supports random access writing via OGR_L_SetFeature().\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::SetFeature().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer to write the feature.\n"
		"\n"
		"hFeat:  the feature to write.\n"
		"\n"
		"OGRERR_NONE if the operation works, otherwise an appropriate error\n"
		"code (e.g OGRERR_NON_EXISTING_FEATURE if the feature does not exist).\n"
		"\n"
		""},
	 { (char *)"Layer_CreateFeature", _wrap_Layer_CreateFeature, METH_VARARGS, (char *)"\n"
		"Layer_CreateFeature(Layer self, Feature feature) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_CreateFeature(OGRLayerH hLayer, OGRFeatureH hFeat)\n"
		"\n"
		"Create and write a new feature within a layer.\n"
		"\n"
		"The passed feature is written to the layer as a new feature, rather\n"
		"than overwriting an existing one. If the feature has a feature id\n"
		"other than OGRNullFID, then the native implementation may use that as\n"
		"the feature id of the new feature, but not necessarily. Upon\n"
		"successful return the passed feature will have been updated with the\n"
		"new feature id.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::CreateFeature().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer to write the feature to.\n"
		"\n"
		"hFeat:  the handle of the feature to write to disk.\n"
		"\n"
		"OGRERR_NONE on success. \n"
		""},
	 { (char *)"Layer_DeleteFeature", _wrap_Layer_DeleteFeature, METH_VARARGS, (char *)"\n"
		"Layer_DeleteFeature(Layer self, GIntBig fid) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_DeleteFeature(OGRLayerH hLayer, GIntBig nFID)\n"
		"\n"
		"Delete feature from layer.\n"
		"\n"
		"The feature with the indicated feature id is deleted from the layer if\n"
		"supported by the driver. Most drivers do not support feature deletion,\n"
		"and will return OGRERR_UNSUPPORTED_OPERATION. The\n"
		"OGR_L_TestCapability() function may be called with OLCDeleteFeature to\n"
		"check if the driver supports feature deletion.\n"
		"\n"
		"This method is the same as the C++ method OGRLayer::DeleteFeature().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer\n"
		"\n"
		"nFID:  the feature id to be deleted from the layer\n"
		"\n"
		"OGRERR_NONE if the operation works, otherwise an appropriate error\n"
		"code (e.g OGRERR_NON_EXISTING_FEATURE if the feature does not exist).\n"
		"\n"
		""},
	 { (char *)"Layer_SyncToDisk", _wrap_Layer_SyncToDisk, METH_VARARGS, (char *)"\n"
		"Layer_SyncToDisk(Layer self) -> OGRErr\n"
		"\n"
		"OGRErr OGR_L_SyncToDisk(OGRLayerH\n"
		"hLayer)\n"
		"\n"
		"Flush pending changes to disk.\n"
		"\n"
		"This call is intended to force the layer to flush any pending writes\n"
		"to disk, and leave the disk file in a consistent state. It would not\n"
		"normally have any effect on read-only datasources.\n"
		"\n"
		"Some layers do not implement this method, and will still return\n"
		"OGRERR_NONE. The default implementation just returns OGRERR_NONE. An\n"
		"error is only returned if an error occurs while attempting to flush to\n"
		"disk.\n"
		"\n"
		"In any event, you should always close any opened datasource with\n"
		"OGR_DS_Destroy() that will ensure all data is correctly flushed.\n"
		"\n"
		"This method is the same as the C++ method OGRLayer::SyncToDisk()\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer\n"
		"\n"
		"OGRERR_NONE if no error occurs (even if nothing is done) or an error\n"
		"code. \n"
		""},
	 { (char *)"Layer_GetLayerDefn", _wrap_Layer_GetLayerDefn, METH_VARARGS, (char *)"\n"
		"Layer_GetLayerDefn(Layer self) -> FeatureDefn\n"
		"\n"
		"OGRFeatureDefnH\n"
		"OGR_L_GetLayerDefn(OGRLayerH hLayer)\n"
		"\n"
		"Fetch the schema information for this layer.\n"
		"\n"
		"The returned handle to the OGRFeatureDefn is owned by the OGRLayer,\n"
		"and should not be modified or freed by the application. It\n"
		"encapsulates the attribute schema of the features of the layer.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::GetLayerDefn().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer to get the schema information.\n"
		"\n"
		"an handle to the feature definition. \n"
		""},
	 { (char *)"Layer_GetFeatureCount", (PyCFunction) _wrap_Layer_GetFeatureCount, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Layer_GetFeatureCount(Layer self, int force=1) -> GIntBig\n"
		"\n"
		"GIntBig\n"
		"OGR_L_GetFeatureCount(OGRLayerH hLayer, int bForce)\n"
		"\n"
		"Fetch the feature count in this layer.\n"
		"\n"
		"Returns the number of features in the layer. For dynamic databases the\n"
		"count may not be exact. If bForce is FALSE, and it would be expensive\n"
		"to establish the feature count a value of -1 may be returned\n"
		"indicating that the count isn't know. If bForce is TRUE some\n"
		"implementations will actually scan the entire layer once to count\n"
		"objects.\n"
		"\n"
		"The returned count takes the spatial filter into account.\n"
		"\n"
		"Note that some implementations of this method may alter the read\n"
		"cursor of the layer.\n"
		"\n"
		"This function is the same as the CPP OGRLayer::GetFeatureCount().\n"
		"\n"
		"Note: since GDAL 2.0, this method returns a GIntBig (previously a int)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer that owned the features.\n"
		"\n"
		"bForce:  Flag indicating whether the count should be computed even if\n"
		"it is expensive.\n"
		"\n"
		"feature count, -1 if count not known. \n"
		""},
	 { (char *)"Layer_GetExtent", (PyCFunction) _wrap_Layer_GetExtent, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Layer_GetExtent(Layer self, int force=1, int can_return_null=0, int geom_field=0)\n"
		"\n"
		"OGRErr OGR_L_GetExtent(OGRLayerH\n"
		"hLayer, OGREnvelope *psExtent, int bForce)\n"
		"\n"
		"Fetch the extent of this layer.\n"
		"\n"
		"Returns the extent (MBR) of the data in the layer. If bForce is FALSE,\n"
		"and it would be expensive to establish the extent then OGRERR_FAILURE\n"
		"will be returned indicating that the extent isn't know. If bForce is\n"
		"TRUE then some implementations will actually scan the entire layer\n"
		"once to compute the MBR of all the features in the layer.\n"
		"\n"
		"Depending on the drivers, the returned extent may or may not take the\n"
		"spatial filter into account. So it is safer to call OGR_L_GetExtent()\n"
		"without setting a spatial filter.\n"
		"\n"
		"Layers without any geometry may return OGRERR_FAILURE just indicating\n"
		"that no meaningful extents could be collected.\n"
		"\n"
		"Note that some implementations of this method may alter the read\n"
		"cursor of the layer.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::GetExtent().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer from which to get extent.\n"
		"\n"
		"psExtent:  the structure in which the extent value will be returned.\n"
		"\n"
		"bForce:  Flag indicating whether the extent should be computed even if\n"
		"it is expensive.\n"
		"\n"
		"OGRERR_NONE on success, OGRERR_FAILURE if extent not known. \n"
		""},
	 { (char *)"Layer_TestCapability", _wrap_Layer_TestCapability, METH_VARARGS, (char *)"\n"
		"Layer_TestCapability(Layer self, char const * cap) -> bool\n"
		"\n"
		"int\n"
		"OGR_L_TestCapability(OGRLayerH hLayer, const char *pszCap)\n"
		"\n"
		"Test if this layer supported the named capability.\n"
		"\n"
		"The capability codes that can be tested are represented as strings,\n"
		"but #defined constants exists to ensure correct spelling. Specific\n"
		"layer types may implement class specific capabilities, but this can't\n"
		"generally be discovered by the caller.\n"
		"\n"
		"OLCRandomRead / \"RandomRead\": TRUE if the GetFeature() method is\n"
		"implemented in an optimized way for this layer, as opposed to the\n"
		"default implementation using ResetReading() and GetNextFeature() to\n"
		"find the requested feature id.\n"
		"\n"
		"OLCSequentialWrite / \"SequentialWrite\": TRUE if the CreateFeature()\n"
		"method works for this layer. Note this means that this particular\n"
		"layer is writable. The same OGRLayer class may returned FALSE for\n"
		"other layer instances that are effectively read-only.\n"
		"\n"
		"OLCRandomWrite / \"RandomWrite\": TRUE if the SetFeature() method is\n"
		"operational on this layer. Note this means that this particular layer\n"
		"is writable. The same OGRLayer class may returned FALSE for other\n"
		"layer instances that are effectively read-only.\n"
		"\n"
		"OLCFastSpatialFilter / \"FastSpatialFilter\": TRUE if this layer\n"
		"implements spatial filtering efficiently. Layers that effectively read\n"
		"all features, and test them with the OGRFeature intersection methods\n"
		"should return FALSE. This can be used as a clue by the application\n"
		"whether it should build and maintain its own spatial index for\n"
		"features in this layer.\n"
		"\n"
		"OLCFastFeatureCount / \"FastFeatureCount\": TRUE if this layer can\n"
		"return a feature count (via OGR_L_GetFeatureCount()) efficiently, i.e.\n"
		"without counting the features. In some cases this will return TRUE\n"
		"until a spatial filter is installed after which it will return FALSE.\n"
		"\n"
		"OLCFastGetExtent / \"FastGetExtent\": TRUE if this layer can return\n"
		"its data extent (via OGR_L_GetExtent()) efficiently, i.e. without\n"
		"scanning all the features. In some cases this will return TRUE until a\n"
		"spatial filter is installed after which it will return FALSE.\n"
		"\n"
		"OLCFastSetNextByIndex / \"FastSetNextByIndex\": TRUE if this layer can\n"
		"perform the SetNextByIndex() call efficiently, otherwise FALSE.\n"
		"\n"
		"OLCCreateField / \"CreateField\": TRUE if this layer can create new\n"
		"fields on the current layer using CreateField(), otherwise FALSE.\n"
		"\n"
		"OLCCreateGeomField / \"CreateGeomField\": (GDAL >= 1.11) TRUE if this\n"
		"layer can create new geometry fields on the current layer using\n"
		"CreateGeomField(), otherwise FALSE.\n"
		"\n"
		"OLCDeleteField / \"DeleteField\": TRUE if this layer can delete\n"
		"existing fields on the current layer using DeleteField(), otherwise\n"
		"FALSE.\n"
		"\n"
		"OLCReorderFields / \"ReorderFields\": TRUE if this layer can reorder\n"
		"existing fields on the current layer using ReorderField() or\n"
		"ReorderFields(), otherwise FALSE.\n"
		"\n"
		"OLCAlterFieldDefn / \"AlterFieldDefn\": TRUE if this layer can alter\n"
		"the definition of an existing field on the current layer using\n"
		"AlterFieldDefn(), otherwise FALSE.\n"
		"\n"
		"OLCDeleteFeature / \"DeleteFeature\": TRUE if the DeleteFeature()\n"
		"method is supported on this layer, otherwise FALSE.\n"
		"\n"
		"OLCStringsAsUTF8 / \"StringsAsUTF8\": TRUE if values of OFTString\n"
		"fields are assured to be in UTF-8 format. If FALSE the encoding of\n"
		"fields is uncertain, though it might still be UTF-8.\n"
		"\n"
		"OLCTransactions / \"Transactions\": TRUE if the StartTransaction(),\n"
		"CommitTransaction() and RollbackTransaction() methods work in a\n"
		"meaningful way, otherwise FALSE.\n"
		"\n"
		"OLCCurveGeometries / \"CurveGeometries\": TRUE if this layer supports\n"
		"writing curve geometries or may return such geometries. (GDAL 2.0).\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRLayer::TestCapability().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer to get the capability from.\n"
		"\n"
		"pszCap:  the name of the capability to test.\n"
		"\n"
		"TRUE if the layer has the requested capability, or FALSE otherwise.\n"
		"OGRLayers will return FALSE for any unrecognized capabilities. \n"
		""},
	 { (char *)"Layer_CreateField", (PyCFunction) _wrap_Layer_CreateField, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Layer_CreateField(Layer self, FieldDefn field_def, int approx_ok=1) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_CreateField(OGRLayerH hLayer, OGRFieldDefnH hField, int\n"
		"bApproxOK)\n"
		"\n"
		"Create a new field on a layer.\n"
		"\n"
		"You must use this to create new fields on a real layer. Internally the\n"
		"OGRFeatureDefn for the layer will be updated to reflect the new field.\n"
		"Applications should never modify the OGRFeatureDefn used by a layer\n"
		"directly.\n"
		"\n"
		"This function should not be called while there are feature objects in\n"
		"existence that were obtained or created with the previous layer\n"
		"definition.\n"
		"\n"
		"Not all drivers support this function. You can query a layer to check\n"
		"if it supports it with the OLCCreateField capability. Some drivers may\n"
		"only support this method while there are still no features in the\n"
		"layer. When it is supported, the existing features of the backing\n"
		"file/database should be updated accordingly.\n"
		"\n"
		"Drivers may or may not support not-null constraints. If they support\n"
		"creating fields with not-null constraints, this is generally before\n"
		"creating any feature to the layer.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::CreateField().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer to write the field definition.\n"
		"\n"
		"hField:  handle of the field definition to write to disk.\n"
		"\n"
		"bApproxOK:  If TRUE, the field may be created in a slightly different\n"
		"form depending on the limitations of the format driver.\n"
		"\n"
		"OGRERR_NONE on success. \n"
		""},
	 { (char *)"Layer_DeleteField", _wrap_Layer_DeleteField, METH_VARARGS, (char *)"\n"
		"Layer_DeleteField(Layer self, int iField) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_DeleteField(OGRLayerH hLayer, int iField)\n"
		"\n"
		"Delete an existing field on a layer.\n"
		"\n"
		"You must use this to delete existing fields on a real layer.\n"
		"Internally the OGRFeatureDefn for the layer will be updated to reflect\n"
		"the deleted field. Applications should never modify the OGRFeatureDefn\n"
		"used by a layer directly.\n"
		"\n"
		"This function should not be called while there are feature objects in\n"
		"existence that were obtained or created with the previous layer\n"
		"definition.\n"
		"\n"
		"Not all drivers support this function. You can query a layer to check\n"
		"if it supports it with the OLCDeleteField capability. Some drivers may\n"
		"only support this method while there are still no features in the\n"
		"layer. When it is supported, the existing features of the backing\n"
		"file/database should be updated accordingly.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::DeleteField().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer.\n"
		"\n"
		"iField:  index of the field to delete.\n"
		"\n"
		"OGRERR_NONE on success.\n"
		"\n"
		"OGR 1.9.0 \n"
		""},
	 { (char *)"Layer_ReorderField", _wrap_Layer_ReorderField, METH_VARARGS, (char *)"\n"
		"Layer_ReorderField(Layer self, int iOldFieldPos, int iNewFieldPos) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_ReorderField(OGRLayerH hLayer, int iOldFieldPos, int\n"
		"iNewFieldPos)\n"
		"\n"
		"Reorder an existing field on a layer.\n"
		"\n"
		"This function is a convenience wrapper of OGR_L_ReorderFields()\n"
		"dedicated to move a single field.\n"
		"\n"
		"You must use this to reorder existing fields on a real layer.\n"
		"Internally the OGRFeatureDefn for the layer will be updated to reflect\n"
		"the reordering of the fields. Applications should never modify the\n"
		"OGRFeatureDefn used by a layer directly.\n"
		"\n"
		"This function should not be called while there are feature objects in\n"
		"existence that were obtained or created with the previous layer\n"
		"definition.\n"
		"\n"
		"The field definition that was at initial position iOldFieldPos will be\n"
		"moved at position iNewFieldPos, and elements between will be shuffled\n"
		"accordingly.\n"
		"\n"
		"For example, let suppose the fields were \"0\",\"1\",\"2\",\"3\",\"4\"\n"
		"initially. ReorderField(1, 3) will reorder them as\n"
		"\"0\",\"2\",\"3\",\"1\",\"4\".\n"
		"\n"
		"Not all drivers support this function. You can query a layer to check\n"
		"if it supports it with the OLCReorderFields capability. Some drivers\n"
		"may only support this method while there are still no features in the\n"
		"layer. When it is supported, the existing features of the backing\n"
		"file/database should be updated accordingly.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::ReorderField().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer.\n"
		"\n"
		"iOldFieldPos:  previous position of the field to move. Must be in the\n"
		"range [0,GetFieldCount()-1].\n"
		"\n"
		"iNewFieldPos:  new position of the field to move. Must be in the range\n"
		"[0,GetFieldCount()-1].\n"
		"\n"
		"OGRERR_NONE on success.\n"
		"\n"
		"OGR 1.9.0 \n"
		""},
	 { (char *)"Layer_ReorderFields", _wrap_Layer_ReorderFields, METH_VARARGS, (char *)"\n"
		"Layer_ReorderFields(Layer self, int nList) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_ReorderFields(OGRLayerH hLayer, int *panMap)\n"
		"\n"
		"Reorder all the fields of a layer.\n"
		"\n"
		"You must use this to reorder existing fields on a real layer.\n"
		"Internally the OGRFeatureDefn for the layer will be updated to reflect\n"
		"the reordering of the fields. Applications should never modify the\n"
		"OGRFeatureDefn used by a layer directly.\n"
		"\n"
		"This function should not be called while there are feature objects in\n"
		"existence that were obtained or created with the previous layer\n"
		"definition.\n"
		"\n"
		"panMap is such that,for each field definition at position i after\n"
		"reordering, its position before reordering was panMap[i].\n"
		"\n"
		"For example, let suppose the fields were \"0\",\"1\",\"2\",\"3\",\"4\"\n"
		"initially. ReorderFields([0,2,3,1,4]) will reorder them as\n"
		"\"0\",\"2\",\"3\",\"1\",\"4\".\n"
		"\n"
		"Not all drivers support this function. You can query a layer to check\n"
		"if it supports it with the OLCReorderFields capability. Some drivers\n"
		"may only support this method while there are still no features in the\n"
		"layer. When it is supported, the existing features of the backing\n"
		"file/database should be updated accordingly.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::ReorderFields().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer.\n"
		"\n"
		"panMap:  an array of GetLayerDefn()-> OGRFeatureDefn::GetFieldCount()\n"
		"elements which is a permutation of [0, GetLayerDefn()->\n"
		"OGRFeatureDefn::GetFieldCount()-1].\n"
		"\n"
		"OGRERR_NONE on success.\n"
		"\n"
		"OGR 1.9.0 \n"
		""},
	 { (char *)"Layer_AlterFieldDefn", _wrap_Layer_AlterFieldDefn, METH_VARARGS, (char *)"\n"
		"Layer_AlterFieldDefn(Layer self, int iField, FieldDefn field_def, int nFlags) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_AlterFieldDefn(OGRLayerH hLayer, int iField, OGRFieldDefnH\n"
		"hNewFieldDefn, int nFlags)\n"
		"\n"
		"Alter the definition of an existing field on a layer.\n"
		"\n"
		"You must use this to alter the definition of an existing field of a\n"
		"real layer. Internally the OGRFeatureDefn for the layer will be\n"
		"updated to reflect the altered field. Applications should never modify\n"
		"the OGRFeatureDefn used by a layer directly.\n"
		"\n"
		"This function should not be called while there are feature objects in\n"
		"existence that were obtained or created with the previous layer\n"
		"definition.\n"
		"\n"
		"Not all drivers support this function. You can query a layer to check\n"
		"if it supports it with the OLCAlterFieldDefn capability. Some drivers\n"
		"may only support this method while there are still no features in the\n"
		"layer. When it is supported, the existing features of the backing\n"
		"file/database should be updated accordingly. Some drivers might also\n"
		"not support all update flags.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRLayer::AlterFieldDefn().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer.\n"
		"\n"
		"iField:  index of the field whose definition must be altered.\n"
		"\n"
		"hNewFieldDefn:  new field definition\n"
		"\n"
		"nFlags:  combination of ALTER_NAME_FLAG, ALTER_TYPE_FLAG,\n"
		"ALTER_WIDTH_PRECISION_FLAG, ALTER_NULLABLE_FLAG and ALTER_DEFAULT_FLAG\n"
		"to indicate which of the name and/or type and/or width and precision\n"
		"fields and/or nullability from the new field definition must be taken\n"
		"into account.\n"
		"\n"
		"OGRERR_NONE on success.\n"
		"\n"
		"OGR 1.9.0 \n"
		""},
	 { (char *)"Layer_CreateGeomField", (PyCFunction) _wrap_Layer_CreateGeomField, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Layer_CreateGeomField(Layer self, GeomFieldDefn field_def, int approx_ok=1) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_CreateGeomField(OGRLayerH hLayer, OGRGeomFieldDefnH hField, int\n"
		"bApproxOK)\n"
		"\n"
		"Create a new geometry field on a layer.\n"
		"\n"
		"You must use this to create new geometry fields on a real layer.\n"
		"Internally the OGRFeatureDefn for the layer will be updated to reflect\n"
		"the new field. Applications should never modify the OGRFeatureDefn\n"
		"used by a layer directly.\n"
		"\n"
		"This function should not be called while there are feature objects in\n"
		"existence that were obtained or created with the previous layer\n"
		"definition.\n"
		"\n"
		"Not all drivers support this function. You can query a layer to check\n"
		"if it supports it with the OLCCreateField capability. Some drivers may\n"
		"only support this method while there are still no features in the\n"
		"layer. When it is supported, the existing features of the backing\n"
		"file/database should be updated accordingly.\n"
		"\n"
		"Drivers may or may not support not-null constraints. If they support\n"
		"creating fields with not-null constraints, this is generally before\n"
		"creating any feature to the layer.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::CreateField().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer to write the field definition.\n"
		"\n"
		"hField:  handle of the geometry field definition to write to disk.\n"
		"\n"
		"bApproxOK:  If TRUE, the field may be created in a slightly different\n"
		"form depending on the limitations of the format driver.\n"
		"\n"
		"OGRERR_NONE on success.\n"
		"\n"
		"OGR 1.11 \n"
		""},
	 { (char *)"Layer_StartTransaction", _wrap_Layer_StartTransaction, METH_VARARGS, (char *)"\n"
		"Layer_StartTransaction(Layer self) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_StartTransaction(OGRLayerH hLayer)\n"
		"\n"
		"For datasources which support transactions, StartTransaction creates a\n"
		"transaction.\n"
		"\n"
		"If starting the transaction fails, will return OGRERR_FAILURE.\n"
		"Datasources which do not support transactions will always return\n"
		"OGRERR_NONE.\n"
		"\n"
		"Note: as of GDAL 2.0, use of this API is discouraged when the dataset\n"
		"offers dataset level transaction with GDALDataset::StartTransaction().\n"
		"The reason is that most drivers can only offer transactions at dataset\n"
		"level, and not layer level. Very few drivers really support\n"
		"transactions at layer scope.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRLayer::StartTransaction().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer\n"
		"\n"
		"OGRERR_NONE on success. \n"
		""},
	 { (char *)"Layer_CommitTransaction", _wrap_Layer_CommitTransaction, METH_VARARGS, (char *)"\n"
		"Layer_CommitTransaction(Layer self) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_CommitTransaction(OGRLayerH hLayer)\n"
		"\n"
		"For datasources which support transactions, CommitTransaction commits\n"
		"a transaction.\n"
		"\n"
		"If no transaction is active, or the commit fails, will return\n"
		"OGRERR_FAILURE. Datasources which do not support transactions will\n"
		"always return OGRERR_NONE.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRLayer::CommitTransaction().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer\n"
		"\n"
		"OGRERR_NONE on success. \n"
		""},
	 { (char *)"Layer_RollbackTransaction", _wrap_Layer_RollbackTransaction, METH_VARARGS, (char *)"\n"
		"Layer_RollbackTransaction(Layer self) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_RollbackTransaction(OGRLayerH hLayer)\n"
		"\n"
		"For datasources which support transactions, RollbackTransaction will\n"
		"roll back a datasource to its state before the start of the current\n"
		"transaction.\n"
		"\n"
		"If no transaction is active, or the rollback fails, will return\n"
		"OGRERR_FAILURE. Datasources which do not support transactions will\n"
		"always return OGRERR_NONE.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRLayer::RollbackTransaction().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer\n"
		"\n"
		"OGRERR_NONE on success. \n"
		""},
	 { (char *)"Layer_FindFieldIndex", _wrap_Layer_FindFieldIndex, METH_VARARGS, (char *)"\n"
		"Layer_FindFieldIndex(Layer self, char const * pszFieldName, int bExactMatch) -> int\n"
		"\n"
		"int\n"
		"OGR_L_FindFieldIndex(OGRLayerH hLayer, const char *pszFieldName, int\n"
		"bExactMatch)\n"
		"\n"
		"Find the index of field in a layer.\n"
		"\n"
		"The returned number is the index of the field in the layers, or -1 if\n"
		"the field doesn't exist.\n"
		"\n"
		"If bExactMatch is set to FALSE and the field doesn't exists in the\n"
		"given form the driver might apply some changes to make it match, like\n"
		"those it might do if the layer was created (eg. like LAUNDER in the\n"
		"OCI driver).\n"
		"\n"
		"This method is the same as the C++ method OGRLayer::FindFieldIndex().\n"
		"\n"
		"field index, or -1 if the field doesn't exist \n"
		""},
	 { (char *)"Layer_GetSpatialRef", _wrap_Layer_GetSpatialRef, METH_VARARGS, (char *)"\n"
		"Layer_GetSpatialRef(Layer self) -> SpatialReference\n"
		"\n"
		"OGRSpatialReferenceH\n"
		"OGR_L_GetSpatialRef(OGRLayerH hLayer)\n"
		"\n"
		"Fetch the spatial reference system for this layer.\n"
		"\n"
		"The returned object is owned by the OGRLayer and should not be\n"
		"modified or freed by the application.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::GetSpatialRef().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer to get the spatial reference from.\n"
		"\n"
		"spatial reference, or NULL if there isn't one. \n"
		""},
	 { (char *)"Layer_GetFeaturesRead", _wrap_Layer_GetFeaturesRead, METH_VARARGS, (char *)"\n"
		"Layer_GetFeaturesRead(Layer self) -> GIntBig\n"
		"\n"
		"GIntBig\n"
		"OGR_L_GetFeaturesRead(OGRLayerH hLayer) \n"
		""},
	 { (char *)"Layer_SetIgnoredFields", _wrap_Layer_SetIgnoredFields, METH_VARARGS, (char *)"\n"
		"Layer_SetIgnoredFields(Layer self, char const ** options) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_SetIgnoredFields(OGRLayerH hLayer, const char **papszFields)\n"
		"\n"
		"Set which fields can be omitted when retrieving features from the\n"
		"layer.\n"
		"\n"
		"If the driver supports this functionality (testable using\n"
		"OLCIgnoreFields capability), it will not fetch the specified fields in\n"
		"subsequent calls to GetFeature() / GetNextFeature() and thus save some\n"
		"processing time and/or bandwidth.\n"
		"\n"
		"Besides field names of the layers, the following special fields can be\n"
		"passed: \"OGR_GEOMETRY\" to ignore geometry and \"OGR_STYLE\" to\n"
		"ignore layer style.\n"
		"\n"
		"By default, no fields are ignored.\n"
		"\n"
		"This method is the same as the C++ method OGRLayer::SetIgnoredFields()\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"papszFields:  an array of field names terminated by NULL item. If NULL\n"
		"is passed, the ignored list is cleared.\n"
		"\n"
		"OGRERR_NONE if all field names have been resolved (even if the driver\n"
		"does not support this method) \n"
		""},
	 { (char *)"Layer_Intersection", (PyCFunction) _wrap_Layer_Intersection, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Layer_Intersection(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_Intersection(OGRLayerH pLayerInput, OGRLayerH pLayerMethod,\n"
		"OGRLayerH pLayerResult, char **papszOptions, GDALProgressFunc\n"
		"pfnProgress, void *pProgressArg)\n"
		"\n"
		"Intersection of two layers.\n"
		"\n"
		"The result layer contains features whose geometries represent areas\n"
		"that are common between features in the input layer and in the method\n"
		"layer. The features in the result layer have attributes from both\n"
		"input and method layers. The schema of the result layer can be set by\n"
		"the user or, if it is empty, is initialized to contain all fields in\n"
		"the input and method layers.\n"
		"\n"
		"If the schema of the result is set by user and contains fields that\n"
		"have the same name as a field in input and in method layer, then the\n"
		"attribute in the result feature will get the value from the feature of\n"
		"the method layer.\n"
		"\n"
		"For best performance use the minimum amount of features in the method\n"
		"layer and copy it into a memory layer.\n"
		"\n"
		"This method relies on GEOS support. Do not use unless the GEOS support\n"
		"is compiled in.  The recognized list of options is :\n"
		"SKIP_FAILURES=YES/NO. Set it to YES to go on, even when a feature\n"
		"could not be inserted or a GEOS call failed.\n"
		"\n"
		"PROMOTE_TO_MULTI=YES/NO. Set it to YES to convert Polygons into\n"
		"MultiPolygons, or LineStrings to MultiLineStrings.\n"
		"\n"
		"INPUT_PREFIX=string. Set a prefix for the field names that will be\n"
		"created from the fields of the input layer.\n"
		"\n"
		"METHOD_PREFIX=string. Set a prefix for the field names that will be\n"
		"created from the fields of the method layer.\n"
		"\n"
		"USE_PREPARED_GEOMETRIES=YES/NO. Set to NO to not use prepared\n"
		"geometries to pretest intersection of features of method layer with\n"
		"features of this layer.\n"
		"\n"
		"PRETEST_CONTAINMENT=YES/NO. Set to YES to pretest the containment of\n"
		"features of method layer within the features of this layer. This will\n"
		"speed up the method significantly in some cases. Requires that the\n"
		"prepared geometries are in effect.\n"
		"\n"
		"KEEP_LOWER_DIMENSION_GEOMETRIES=YES/NO. Set to NO to skip result\n"
		"features with lower dimension geometry that would otherwise be added\n"
		"to the result layer. The default is to add but only if the result\n"
		"layer has an unknown geometry type.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::Intersection().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"pLayerInput:  the input layer. Should not be NULL.\n"
		"\n"
		"pLayerMethod:  the method layer. Should not be NULL.\n"
		"\n"
		"pLayerResult:  the layer where the features resulting from the\n"
		"operation are inserted. Should not be NULL. See above the note about\n"
		"the schema.\n"
		"\n"
		"papszOptions:  NULL terminated list of options (may be NULL).\n"
		"\n"
		"pfnProgress:  a GDALProgressFunc() compatible callback function for\n"
		"reporting progress or NULL.\n"
		"\n"
		"pProgressArg:  argument to be passed to pfnProgress. May be NULL.\n"
		"\n"
		"an error code if there was an error or the execution was interrupted,\n"
		"OGRERR_NONE otherwise.\n"
		"\n"
		"The first geometry field is always used.\n"
		"\n"
		"OGR 1.10 \n"
		""},
	 { (char *)"Layer_Union", (PyCFunction) _wrap_Layer_Union, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Layer_Union(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
		"\n"
		"OGRErr OGR_L_Union(OGRLayerH\n"
		"pLayerInput, OGRLayerH pLayerMethod, OGRLayerH pLayerResult, char\n"
		"**papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg)\n"
		"\n"
		"Union of two layers.\n"
		"\n"
		"The result layer contains features whose geometries represent areas\n"
		"that are in either in the input layer, in the method layer, or in\n"
		"both. The features in the result layer have attributes from both input\n"
		"and method layers. For features which represent areas that are only in\n"
		"the input or in the method layer the respective attributes have\n"
		"undefined values. The schema of the result layer can be set by the\n"
		"user or, if it is empty, is initialized to contain all fields in the\n"
		"input and method layers.\n"
		"\n"
		"If the schema of the result is set by user and contains fields that\n"
		"have the same name as a field in input and in method layer, then the\n"
		"attribute in the result feature will get the value from the feature of\n"
		"the method layer (even if it is undefined).\n"
		"\n"
		"For best performance use the minimum amount of features in the method\n"
		"layer and copy it into a memory layer.\n"
		"\n"
		"This method relies on GEOS support. Do not use unless the GEOS support\n"
		"is compiled in.  The recognized list of options is :\n"
		"SKIP_FAILURES=YES/NO. Set it to YES to go on, even when a feature\n"
		"could not be inserted or a GEOS call failed.\n"
		"\n"
		"PROMOTE_TO_MULTI=YES/NO. Set it to YES to convert Polygons into\n"
		"MultiPolygons, or LineStrings to MultiLineStrings.\n"
		"\n"
		"INPUT_PREFIX=string. Set a prefix for the field names that will be\n"
		"created from the fields of the input layer.\n"
		"\n"
		"METHOD_PREFIX=string. Set a prefix for the field names that will be\n"
		"created from the fields of the method layer.\n"
		"\n"
		"USE_PREPARED_GEOMETRIES=YES/NO. Set to NO to not use prepared\n"
		"geometries to pretest intersection of features of method layer with\n"
		"features of this layer.\n"
		"\n"
		"KEEP_LOWER_DIMENSION_GEOMETRIES=YES/NO. Set to NO to skip result\n"
		"features with lower dimension geometry that would otherwise be added\n"
		"to the result layer. The default is to add but only if the result\n"
		"layer has an unknown geometry type.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::Union().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"pLayerInput:  the input layer. Should not be NULL.\n"
		"\n"
		"pLayerMethod:  the method layer. Should not be NULL.\n"
		"\n"
		"pLayerResult:  the layer where the features resulting from the\n"
		"operation are inserted. Should not be NULL. See above the note about\n"
		"the schema.\n"
		"\n"
		"papszOptions:  NULL terminated list of options (may be NULL).\n"
		"\n"
		"pfnProgress:  a GDALProgressFunc() compatible callback function for\n"
		"reporting progress or NULL.\n"
		"\n"
		"pProgressArg:  argument to be passed to pfnProgress. May be NULL.\n"
		"\n"
		"an error code if there was an error or the execution was interrupted,\n"
		"OGRERR_NONE otherwise.\n"
		"\n"
		"The first geometry field is always used.\n"
		"\n"
		"OGR 1.10 \n"
		""},
	 { (char *)"Layer_SymDifference", (PyCFunction) _wrap_Layer_SymDifference, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Layer_SymDifference(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_SymDifference(OGRLayerH pLayerInput, OGRLayerH pLayerMethod,\n"
		"OGRLayerH pLayerResult, char **papszOptions, GDALProgressFunc\n"
		"pfnProgress, void *pProgressArg)\n"
		"\n"
		"Symmetrical difference of two layers.\n"
		"\n"
		"The result layer contains features whose geometries represent areas\n"
		"that are in either in the input layer or in the method layer but not\n"
		"in both. The features in the result layer have attributes from both\n"
		"input and method layers. For features which represent areas that are\n"
		"only in the input or in the method layer the respective attributes\n"
		"have undefined values. The schema of the result layer can be set by\n"
		"the user or, if it is empty, is initialized to contain all fields in\n"
		"the input and method layers.\n"
		"\n"
		"If the schema of the result is set by user and contains fields that\n"
		"have the same name as a field in input and in method layer, then the\n"
		"attribute in the result feature will get the value from the feature of\n"
		"the method layer (even if it is undefined).\n"
		"\n"
		"For best performance use the minimum amount of features in the method\n"
		"layer and copy it into a memory layer.\n"
		"\n"
		"This method relies on GEOS support. Do not use unless the GEOS support\n"
		"is compiled in.  The recognized list of options is :\n"
		"SKIP_FAILURES=YES/NO. Set it to YES to go on, even when a feature\n"
		"could not be inserted or a GEOS call failed.\n"
		"\n"
		"PROMOTE_TO_MULTI=YES/NO. Set it to YES to convert Polygons into\n"
		"MultiPolygons, or LineStrings to MultiLineStrings.\n"
		"\n"
		"INPUT_PREFIX=string. Set a prefix for the field names that will be\n"
		"created from the fields of the input layer.\n"
		"\n"
		"METHOD_PREFIX=string. Set a prefix for the field names that will be\n"
		"created from the fields of the method layer.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::SymDifference().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"pLayerInput:  the input layer. Should not be NULL.\n"
		"\n"
		"pLayerMethod:  the method layer. Should not be NULL.\n"
		"\n"
		"pLayerResult:  the layer where the features resulting from the\n"
		"operation are inserted. Should not be NULL. See above the note about\n"
		"the schema.\n"
		"\n"
		"papszOptions:  NULL terminated list of options (may be NULL).\n"
		"\n"
		"pfnProgress:  a GDALProgressFunc() compatible callback function for\n"
		"reporting progress or NULL.\n"
		"\n"
		"pProgressArg:  argument to be passed to pfnProgress. May be NULL.\n"
		"\n"
		"an error code if there was an error or the execution was interrupted,\n"
		"OGRERR_NONE otherwise.\n"
		"\n"
		"The first geometry field is always used.\n"
		"\n"
		"OGR 1.10 \n"
		""},
	 { (char *)"Layer_Identity", (PyCFunction) _wrap_Layer_Identity, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Layer_Identity(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
		"\n"
		"OGRErr OGR_L_Identity(OGRLayerH\n"
		"pLayerInput, OGRLayerH pLayerMethod, OGRLayerH pLayerResult, char\n"
		"**papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg)\n"
		"\n"
		"Identify the features of this layer with the ones from the identity\n"
		"layer.\n"
		"\n"
		"The result layer contains features whose geometries represent areas\n"
		"that are in the input layer. The features in the result layer have\n"
		"attributes from both input and method layers. The schema of the result\n"
		"layer can be set by the user or, if it is empty, is initialized to\n"
		"contain all fields in input and method layers.\n"
		"\n"
		"If the schema of the result is set by user and contains fields that\n"
		"have the same name as a field in input and in method layer, then the\n"
		"attribute in the result feature will get the value from the feature of\n"
		"the method layer (even if it is undefined).\n"
		"\n"
		"For best performance use the minimum amount of features in the method\n"
		"layer and copy it into a memory layer.\n"
		"\n"
		"This method relies on GEOS support. Do not use unless the GEOS support\n"
		"is compiled in.  The recognized list of options is :\n"
		"SKIP_FAILURES=YES/NO. Set it to YES to go on, even when a feature\n"
		"could not be inserted or a GEOS call failed.\n"
		"\n"
		"PROMOTE_TO_MULTI=YES/NO. Set it to YES to convert Polygons into\n"
		"MultiPolygons, or LineStrings to MultiLineStrings.\n"
		"\n"
		"INPUT_PREFIX=string. Set a prefix for the field names that will be\n"
		"created from the fields of the input layer.\n"
		"\n"
		"METHOD_PREFIX=string. Set a prefix for the field names that will be\n"
		"created from the fields of the method layer.\n"
		"\n"
		"USE_PREPARED_GEOMETRIES=YES/NO. Set to NO to not use prepared\n"
		"geometries to pretest intersection of features of method layer with\n"
		"features of this layer.\n"
		"\n"
		"KEEP_LOWER_DIMENSION_GEOMETRIES=YES/NO. Set to NO to skip result\n"
		"features with lower dimension geometry that would otherwise be added\n"
		"to the result layer. The default is to add but only if the result\n"
		"layer has an unknown geometry type.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::Identity().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"pLayerInput:  the input layer. Should not be NULL.\n"
		"\n"
		"pLayerMethod:  the method layer. Should not be NULL.\n"
		"\n"
		"pLayerResult:  the layer where the features resulting from the\n"
		"operation are inserted. Should not be NULL. See above the note about\n"
		"the schema.\n"
		"\n"
		"papszOptions:  NULL terminated list of options (may be NULL).\n"
		"\n"
		"pfnProgress:  a GDALProgressFunc() compatible callback function for\n"
		"reporting progress or NULL.\n"
		"\n"
		"pProgressArg:  argument to be passed to pfnProgress. May be NULL.\n"
		"\n"
		"an error code if there was an error or the execution was interrupted,\n"
		"OGRERR_NONE otherwise.\n"
		"\n"
		"The first geometry field is always used.\n"
		"\n"
		"OGR 1.10 \n"
		""},
	 { (char *)"Layer_Update", (PyCFunction) _wrap_Layer_Update, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Layer_Update(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
		"\n"
		"OGRErr OGR_L_Update(OGRLayerH\n"
		"pLayerInput, OGRLayerH pLayerMethod, OGRLayerH pLayerResult, char\n"
		"**papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg)\n"
		"\n"
		"Update this layer with features from the update layer.\n"
		"\n"
		"The result layer contains features whose geometries represent areas\n"
		"that are either in the input layer or in the method layer. The\n"
		"features in the result layer have areas of the features of the method\n"
		"layer or those ares of the features of the input layer that are not\n"
		"covered by the method layer. The features of the result layer get\n"
		"their attributes from the input layer. The schema of the result layer\n"
		"can be set by the user or, if it is empty, is initialized to contain\n"
		"all fields in the input layer.\n"
		"\n"
		"If the schema of the result is set by user and contains fields that\n"
		"have the same name as a field in the method layer, then the attribute\n"
		"in the result feature the originates from the method layer will get\n"
		"the value from the feature of the method layer.\n"
		"\n"
		"For best performance use the minimum amount of features in the method\n"
		"layer and copy it into a memory layer.\n"
		"\n"
		"This method relies on GEOS support. Do not use unless the GEOS support\n"
		"is compiled in.  The recognized list of options is :\n"
		"SKIP_FAILURES=YES/NO. Set it to YES to go on, even when a feature\n"
		"could not be inserted or a GEOS call failed.\n"
		"\n"
		"PROMOTE_TO_MULTI=YES/NO. Set it to YES to convert Polygons into\n"
		"MultiPolygons, or LineStrings to MultiLineStrings.\n"
		"\n"
		"INPUT_PREFIX=string. Set a prefix for the field names that will be\n"
		"created from the fields of the input layer.\n"
		"\n"
		"METHOD_PREFIX=string. Set a prefix for the field names that will be\n"
		"created from the fields of the method layer.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::Update().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"pLayerInput:  the input layer. Should not be NULL.\n"
		"\n"
		"pLayerMethod:  the method layer. Should not be NULL.\n"
		"\n"
		"pLayerResult:  the layer where the features resulting from the\n"
		"operation are inserted. Should not be NULL. See above the note about\n"
		"the schema.\n"
		"\n"
		"papszOptions:  NULL terminated list of options (may be NULL).\n"
		"\n"
		"pfnProgress:  a GDALProgressFunc() compatible callback function for\n"
		"reporting progress or NULL.\n"
		"\n"
		"pProgressArg:  argument to be passed to pfnProgress. May be NULL.\n"
		"\n"
		"an error code if there was an error or the execution was interrupted,\n"
		"OGRERR_NONE otherwise.\n"
		"\n"
		"The first geometry field is always used.\n"
		"\n"
		"OGR 1.10 \n"
		""},
	 { (char *)"Layer_Clip", (PyCFunction) _wrap_Layer_Clip, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Layer_Clip(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
		"\n"
		"OGRErr OGR_L_Clip(OGRLayerH pLayerInput,\n"
		"OGRLayerH pLayerMethod, OGRLayerH pLayerResult, char **papszOptions,\n"
		"GDALProgressFunc pfnProgress, void *pProgressArg)\n"
		"\n"
		"Clip off areas that are not covered by the method layer.\n"
		"\n"
		"The result layer contains features whose geometries represent areas\n"
		"that are in the input layer and in the method layer. The features in\n"
		"the result layer have the (possibly clipped) areas of features in the\n"
		"input layer and the attributes from the same features. The schema of\n"
		"the result layer can be set by the user or, if it is empty, is\n"
		"initialized to contain all fields in the input layer.\n"
		"\n"
		"For best performance use the minimum amount of features in the method\n"
		"layer and copy it into a memory layer.\n"
		"\n"
		"This method relies on GEOS support. Do not use unless the GEOS support\n"
		"is compiled in.  The recognized list of options is :\n"
		"SKIP_FAILURES=YES/NO. Set it to YES to go on, even when a feature\n"
		"could not be inserted or a GEOS call failed.\n"
		"\n"
		"PROMOTE_TO_MULTI=YES/NO. Set it to YES to convert Polygons into\n"
		"MultiPolygons, or LineStrings to MultiLineStrings.\n"
		"\n"
		"INPUT_PREFIX=string. Set a prefix for the field names that will be\n"
		"created from the fields of the input layer.\n"
		"\n"
		"METHOD_PREFIX=string. Set a prefix for the field names that will be\n"
		"created from the fields of the method layer.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::Clip().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"pLayerInput:  the input layer. Should not be NULL.\n"
		"\n"
		"pLayerMethod:  the method layer. Should not be NULL.\n"
		"\n"
		"pLayerResult:  the layer where the features resulting from the\n"
		"operation are inserted. Should not be NULL. See above the note about\n"
		"the schema.\n"
		"\n"
		"papszOptions:  NULL terminated list of options (may be NULL).\n"
		"\n"
		"pfnProgress:  a GDALProgressFunc() compatible callback function for\n"
		"reporting progress or NULL.\n"
		"\n"
		"pProgressArg:  argument to be passed to pfnProgress. May be NULL.\n"
		"\n"
		"an error code if there was an error or the execution was interrupted,\n"
		"OGRERR_NONE otherwise.\n"
		"\n"
		"The first geometry field is always used.\n"
		"\n"
		"OGR 1.10 \n"
		""},
	 { (char *)"Layer_Erase", (PyCFunction) _wrap_Layer_Erase, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Layer_Erase(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
		"\n"
		"OGRErr OGR_L_Erase(OGRLayerH\n"
		"pLayerInput, OGRLayerH pLayerMethod, OGRLayerH pLayerResult, char\n"
		"**papszOptions, GDALProgressFunc pfnProgress, void *pProgressArg)\n"
		"\n"
		"Remove areas that are covered by the method layer.\n"
		"\n"
		"The result layer contains features whose geometries represent areas\n"
		"that are in the input layer but not in the method layer. The features\n"
		"in the result layer have attributes from the input layer. The schema\n"
		"of the result layer can be set by the user or, if it is empty, is\n"
		"initialized to contain all fields in the input layer.\n"
		"\n"
		"For best performance use the minimum amount of features in the method\n"
		"layer and copy it into a memory layer.\n"
		"\n"
		"This method relies on GEOS support. Do not use unless the GEOS support\n"
		"is compiled in.  The recognized list of options is :\n"
		"SKIP_FAILURES=YES/NO. Set it to YES to go on, even when a feature\n"
		"could not be inserted or a GEOS call failed.\n"
		"\n"
		"PROMOTE_TO_MULTI=YES/NO. Set it to YES to convert Polygons into\n"
		"MultiPolygons, or LineStrings to MultiLineStrings.\n"
		"\n"
		"INPUT_PREFIX=string. Set a prefix for the field names that will be\n"
		"created from the fields of the input layer.\n"
		"\n"
		"METHOD_PREFIX=string. Set a prefix for the field names that will be\n"
		"created from the fields of the method layer.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::Erase().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"pLayerInput:  the input layer. Should not be NULL.\n"
		"\n"
		"pLayerMethod:  the method layer. Should not be NULL.\n"
		"\n"
		"pLayerResult:  the layer where the features resulting from the\n"
		"operation are inserted. Should not be NULL. See above the note about\n"
		"the schema.\n"
		"\n"
		"papszOptions:  NULL terminated list of options (may be NULL).\n"
		"\n"
		"pfnProgress:  a GDALProgressFunc() compatible callback function for\n"
		"reporting progress or NULL.\n"
		"\n"
		"pProgressArg:  argument to be passed to pfnProgress. May be NULL.\n"
		"\n"
		"an error code if there was an error or the execution was interrupted,\n"
		"OGRERR_NONE otherwise.\n"
		"\n"
		"The first geometry field is always used.\n"
		"\n"
		"OGR 1.10 \n"
		""},
	 { (char *)"Layer_GetStyleTable", _wrap_Layer_GetStyleTable, METH_VARARGS, (char *)"\n"
		"Layer_GetStyleTable(Layer self) -> StyleTable\n"
		"\n"
		"OGRStyleTableH\n"
		"OGR_L_GetStyleTable(OGRLayerH hLayer)\n"
		"\n"
		"Get style table. \n"
		""},
	 { (char *)"Layer_SetStyleTable", _wrap_Layer_SetStyleTable, METH_VARARGS, (char *)"\n"
		"Layer_SetStyleTable(Layer self, StyleTable table)\n"
		"\n"
		"void\n"
		"OGR_L_SetStyleTable(OGRLayerH hLayer, OGRStyleTableH hStyleTable)\n"
		"\n"
		"Set style table. \n"
		""},
	 { (char *)"Layer_swigregister", Layer_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_Feature", _wrap_delete_Feature, METH_VARARGS, (char *)"delete_Feature(Feature self)"},
	 { (char *)"new_Feature", (PyCFunction) _wrap_new_Feature, METH_VARARGS | METH_KEYWORDS, (char *)"new_Feature(FeatureDefn feature_def) -> Feature"},
	 { (char *)"Feature_GetDefnRef", _wrap_Feature_GetDefnRef, METH_VARARGS, (char *)"\n"
		"Feature_GetDefnRef(Feature self) -> FeatureDefn\n"
		"\n"
		"OGRFeatureDefnH\n"
		"OGR_F_GetDefnRef(OGRFeatureH hFeat)\n"
		"\n"
		"Fetch feature definition.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::GetDefnRef().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to get the feature definition from.\n"
		"\n"
		"an handle to the feature definition object on which feature depends.\n"
		"\n"
		""},
	 { (char *)"Feature_SetGeometry", _wrap_Feature_SetGeometry, METH_VARARGS, (char *)"\n"
		"Feature_SetGeometry(Feature self, Geometry geom) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_F_SetGeometry(OGRFeatureH hFeat, OGRGeometryH hGeom)\n"
		"\n"
		"Set feature geometry.\n"
		"\n"
		"This function updates the features geometry, and operate exactly as\n"
		"SetGeometryDirectly(), except that this function does not assume\n"
		"ownership of the passed geometry, but instead makes a copy of it.\n"
		"\n"
		"This function is the same as the C++ OGRFeature::SetGeometry().\n"
		"\n"
		"This method has only an effect on the in-memory feature object. If\n"
		"this object comes from a layer and the modifications must be\n"
		"serialized back to the datasource, OGR_L_SetFeature() must be used\n"
		"afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be\n"
		"used afterwards.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which new geometry is applied to.\n"
		"\n"
		"hGeom:  handle to the new geometry to apply to feature.\n"
		"\n"
		"OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the\n"
		"geometry type is illegal for the OGRFeatureDefn (checking not yet\n"
		"implemented). \n"
		""},
	 { (char *)"Feature_SetGeometryDirectly", _wrap_Feature_SetGeometryDirectly, METH_VARARGS, (char *)"\n"
		"Feature_SetGeometryDirectly(Feature self, Geometry geom) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_F_SetGeometryDirectly(OGRFeatureH hFeat, OGRGeometryH hGeom)\n"
		"\n"
		"Set feature geometry.\n"
		"\n"
		"This function updates the features geometry, and operate exactly as\n"
		"SetGeometry(), except that this function assumes ownership of the\n"
		"passed geometry (even in case of failure of that function).\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::SetGeometryDirectly.\n"
		"\n"
		"This method has only an effect on the in-memory feature object. If\n"
		"this object comes from a layer and the modifications must be\n"
		"serialized back to the datasource, OGR_L_SetFeature() must be used\n"
		"afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be\n"
		"used afterwards.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which to apply the geometry.\n"
		"\n"
		"hGeom:  handle to the new geometry to apply to feature.\n"
		"\n"
		"OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the\n"
		"geometry type is illegal for the OGRFeatureDefn (checking not yet\n"
		"implemented). \n"
		""},
	 { (char *)"Feature_GetGeometryRef", _wrap_Feature_GetGeometryRef, METH_VARARGS, (char *)"\n"
		"Feature_GetGeometryRef(Feature self) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_F_GetGeometryRef(OGRFeatureH hFeat)\n"
		"\n"
		"Fetch an handle to feature geometry.\n"
		"\n"
		"This function is essentially the same as the C++ method\n"
		"OGRFeature::GetGeometryRef() (the only difference is that this C\n"
		"function honours OGRGetNonLinearGeometriesEnabledFlag())\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to get geometry from.\n"
		"\n"
		"an handle to internal feature geometry. This object should not be\n"
		"modified. \n"
		""},
	 { (char *)"Feature_SetGeomField", _wrap_Feature_SetGeomField, METH_VARARGS, (char *)"\n"
		"SetGeomField(int iField, Geometry geom) -> OGRErr\n"
		"Feature_SetGeomField(Feature self, char const * field_name, Geometry geom) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_F_SetGeomField(OGRFeatureH hFeat, int iField, OGRGeometryH hGeom)\n"
		"\n"
		"Set feature geometry of a specified geometry field.\n"
		"\n"
		"This function updates the features geometry, and operate exactly as\n"
		"SetGeometryDirectly(), except that this function does not assume\n"
		"ownership of the passed geometry, but instead makes a copy of it.\n"
		"\n"
		"This function is the same as the C++ OGRFeature::SetGeomField().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which new geometry is applied to.\n"
		"\n"
		"iField:  geometry field to set.\n"
		"\n"
		"hGeom:  handle to the new geometry to apply to feature.\n"
		"\n"
		"OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the\n"
		"geometry type is illegal for the OGRFeatureDefn (checking not yet\n"
		"implemented). \n"
		""},
	 { (char *)"Feature_SetGeomFieldDirectly", _wrap_Feature_SetGeomFieldDirectly, METH_VARARGS, (char *)"\n"
		"SetGeomFieldDirectly(int iField, Geometry geom) -> OGRErr\n"
		"Feature_SetGeomFieldDirectly(Feature self, char const * field_name, Geometry geom) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_F_SetGeomFieldDirectly(OGRFeatureH hFeat, int iField, OGRGeometryH\n"
		"hGeom)\n"
		"\n"
		"Set feature geometry of a specified geometry field.\n"
		"\n"
		"This function updates the features geometry, and operate exactly as\n"
		"SetGeomField(), except that this function assumes ownership of the\n"
		"passed geometry (even in case of failure of that function).\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::SetGeomFieldDirectly.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which to apply the geometry.\n"
		"\n"
		"iField:  geometry field to set.\n"
		"\n"
		"hGeom:  handle to the new geometry to apply to feature.\n"
		"\n"
		"OGRERR_NONE if successful, or OGRERR_FAILURE if the index is invalid,\n"
		"or OGR_UNSUPPORTED_GEOMETRY_TYPE if the geometry type is illegal for\n"
		"the OGRFeatureDefn (checking not yet implemented).\n"
		"\n"
		"GDAL 1.11 \n"
		""},
	 { (char *)"Feature_GetGeomFieldRef", _wrap_Feature_GetGeomFieldRef, METH_VARARGS, (char *)"\n"
		"GetGeomFieldRef(int iField) -> Geometry\n"
		"Feature_GetGeomFieldRef(Feature self, char const * field_name) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_F_GetGeomFieldRef(OGRFeatureH hFeat, int iField)\n"
		"\n"
		"Fetch an handle to feature geometry.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetGeomFieldRef().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to get geometry from.\n"
		"\n"
		"iField:  geometry field to get.\n"
		"\n"
		"an handle to internal feature geometry. This object should not be\n"
		"modified.\n"
		"\n"
		"GDAL 1.11 \n"
		""},
	 { (char *)"Feature_Clone", _wrap_Feature_Clone, METH_VARARGS, (char *)"\n"
		"Feature_Clone(Feature self) -> Feature\n"
		"\n"
		"OGRFeatureH OGR_F_Clone(OGRFeatureH\n"
		"hFeat)\n"
		"\n"
		"Duplicate feature.\n"
		"\n"
		"The newly created feature is owned by the caller, and will have it's\n"
		"own reference to the OGRFeatureDefn.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::Clone().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to clone.\n"
		"\n"
		"an handle to the new feature, exactly matching this feature. \n"
		""},
	 { (char *)"Feature_Equal", _wrap_Feature_Equal, METH_VARARGS, (char *)"\n"
		"Feature_Equal(Feature self, Feature feature) -> bool\n"
		"\n"
		"int OGR_F_Equal(OGRFeatureH hFeat,\n"
		"OGRFeatureH hOtherFeat)\n"
		"\n"
		"Test if two features are the same.\n"
		"\n"
		"Two features are considered equal if the share them (handle equality)\n"
		"same OGRFeatureDefn, have the same field values, and the same geometry\n"
		"(as tested by OGR_G_Equal()) as well as the same feature id.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::Equal().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to one of the feature.\n"
		"\n"
		"hOtherFeat:  handle to the other feature to test this one against.\n"
		"\n"
		"TRUE if they are equal, otherwise FALSE. \n"
		""},
	 { (char *)"Feature_GetFieldCount", _wrap_Feature_GetFieldCount, METH_VARARGS, (char *)"\n"
		"Feature_GetFieldCount(Feature self) -> int\n"
		"\n"
		"int\n"
		"OGR_F_GetFieldCount(OGRFeatureH hFeat)\n"
		"\n"
		"Fetch number of fields on this feature This will always be the same as\n"
		"the field count for the OGRFeatureDefn.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldCount().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to get the fields count from.\n"
		"\n"
		"count of fields. \n"
		""},
	 { (char *)"Feature_GetFieldDefnRef", _wrap_Feature_GetFieldDefnRef, METH_VARARGS, (char *)"\n"
		"GetFieldDefnRef(int id) -> FieldDefn\n"
		"Feature_GetFieldDefnRef(Feature self, char const * field_name) -> FieldDefn\n"
		"\n"
		"OGRFieldDefnH\n"
		"OGR_F_GetFieldDefnRef(OGRFeatureH hFeat, int i)\n"
		"\n"
		"Fetch definition for this field.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldDefnRef().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which the field is found.\n"
		"\n"
		"i:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"an handle to the field definition (from the OGRFeatureDefn). This is\n"
		"an internal reference, and should not be deleted or modified. \n"
		""},
	 { (char *)"Feature_GetGeomFieldCount", _wrap_Feature_GetGeomFieldCount, METH_VARARGS, (char *)"\n"
		"Feature_GetGeomFieldCount(Feature self) -> int\n"
		"\n"
		"int\n"
		"OGR_F_GetGeomFieldCount(OGRFeatureH hFeat)\n"
		"\n"
		"Fetch number of geometry fields on this feature This will always be\n"
		"the same as the geometry field count for the OGRFeatureDefn.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetGeomFieldCount().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to get the geometry fields count from.\n"
		"\n"
		"count of geometry fields.\n"
		"\n"
		"GDAL 1.11 \n"
		""},
	 { (char *)"Feature_GetGeomFieldDefnRef", _wrap_Feature_GetGeomFieldDefnRef, METH_VARARGS, (char *)"\n"
		"GetGeomFieldDefnRef(int id) -> GeomFieldDefn\n"
		"Feature_GetGeomFieldDefnRef(Feature self, char const * field_name) -> GeomFieldDefn\n"
		"\n"
		"OGRGeomFieldDefnH\n"
		"OGR_F_GetGeomFieldDefnRef(OGRFeatureH hFeat, int i)\n"
		"\n"
		"Fetch definition for this geometry field.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetGeomFieldDefnRef().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which the field is found.\n"
		"\n"
		"i:  the field to fetch, from 0 to GetGeomFieldCount()-1.\n"
		"\n"
		"an handle to the field definition (from the OGRFeatureDefn). This is\n"
		"an internal reference, and should not be deleted or modified.\n"
		"\n"
		"GDAL 1.11 \n"
		""},
	 { (char *)"Feature_GetFieldAsString", _wrap_Feature_GetFieldAsString, METH_VARARGS, (char *)"\n"
		"GetFieldAsString(int id) -> char const\n"
		"Feature_GetFieldAsString(Feature self, char const * field_name) -> char const *\n"
		"\n"
		"const char*\n"
		"OGR_F_GetFieldAsString(OGRFeatureH hFeat, int iField)\n"
		"\n"
		"Fetch field value as a string.\n"
		"\n"
		"OFTReal and OFTInteger fields will be translated to string using\n"
		"sprintf(), but not necessarily using the established formatting rules.\n"
		"Other field types, or errors will result in a return value of zero.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldAsString().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"the field value. This string is internal, and should not be modified,\n"
		"or freed. Its lifetime may be very brief. \n"
		""},
	 { (char *)"Feature_GetFieldAsInteger", _wrap_Feature_GetFieldAsInteger, METH_VARARGS, (char *)"\n"
		"GetFieldAsInteger(int id) -> int\n"
		"Feature_GetFieldAsInteger(Feature self, char const * field_name) -> int\n"
		"\n"
		"int\n"
		"OGR_F_GetFieldAsInteger(OGRFeatureH hFeat, int iField)\n"
		"\n"
		"Fetch field value as integer.\n"
		"\n"
		"OFTString features will be translated using atoi(). OFTReal fields\n"
		"will be cast to integer. Other field types, or errors will result in a\n"
		"return value of zero.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldAsInteger().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"the field value. \n"
		""},
	 { (char *)"Feature_GetFieldAsInteger64", _wrap_Feature_GetFieldAsInteger64, METH_VARARGS, (char *)"\n"
		"GetFieldAsInteger64(int id) -> GIntBig\n"
		"Feature_GetFieldAsInteger64(Feature self, char const * field_name) -> GIntBig\n"
		"\n"
		"GIntBig\n"
		"OGR_F_GetFieldAsInteger64(OGRFeatureH hFeat, int iField)\n"
		"\n"
		"Fetch field value as integer 64 bit.\n"
		"\n"
		"OFTInteger are promoted to 64 bit. OFTString features will be\n"
		"translated using CPLAtoGIntBig(). OFTReal fields will be cast to\n"
		"integer. Other field types, or errors will result in a return value of\n"
		"zero.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldAsInteger64().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"the field value.\n"
		"\n"
		"GDAL 2.0 \n"
		""},
	 { (char *)"Feature_GetFieldAsDouble", _wrap_Feature_GetFieldAsDouble, METH_VARARGS, (char *)"\n"
		"GetFieldAsDouble(int id) -> double\n"
		"Feature_GetFieldAsDouble(Feature self, char const * field_name) -> double\n"
		"\n"
		"double\n"
		"OGR_F_GetFieldAsDouble(OGRFeatureH hFeat, int iField)\n"
		"\n"
		"Fetch field value as a double.\n"
		"\n"
		"OFTString features will be translated using CPLAtof(). OFTInteger\n"
		"fields will be cast to double. Other field types, or errors will\n"
		"result in a return value of zero.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldAsDouble().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"the field value. \n"
		""},
	 { (char *)"Feature_GetFieldAsDateTime", _wrap_Feature_GetFieldAsDateTime, METH_VARARGS, (char *)"\n"
		"GetFieldAsDateTime(int id)\n"
		"Feature_GetFieldAsDateTime(Feature self, char const * field_name)\n"
		"\n"
		"int\n"
		"OGR_F_GetFieldAsDateTime(OGRFeatureH hFeat, int iField, int *pnYear,\n"
		"int *pnMonth, int *pnDay, int *pnHour, int *pnMinute, int *pnSecond,\n"
		"int *pnTZFlag)\n"
		"\n"
		"Fetch field value as date and time.\n"
		"\n"
		"Currently this method only works for OFTDate, OFTTime and OFTDateTime\n"
		"fields.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldAsDateTime().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"pnYear:  (including century)\n"
		"\n"
		"pnMonth:  (1-12)\n"
		"\n"
		"pnDay:  (1-31)\n"
		"\n"
		"pnHour:  (0-23)\n"
		"\n"
		"pnMinute:  (0-59)\n"
		"\n"
		"pnSecond:  (0-59)\n"
		"\n"
		"pnTZFlag:  (0=unknown, 1=localtime, 100=GMT, see data model for\n"
		"details)\n"
		"\n"
		"TRUE on success or FALSE on failure.\n"
		"\n"
		"See:  Use OGR_F_GetFieldAsDateTimeEx() for second with millisecond\n"
		"accuracy. \n"
		""},
	 { (char *)"Feature_GetFieldAsIntegerList", _wrap_Feature_GetFieldAsIntegerList, METH_VARARGS, (char *)"\n"
		"GetFieldAsIntegerList(int id)\n"
		"Feature_GetFieldAsIntegerList(Feature self, char const * field_name)\n"
		"\n"
		"const int*\n"
		"OGR_F_GetFieldAsIntegerList(OGRFeatureH hFeat, int iField, int\n"
		"*pnCount)\n"
		"\n"
		"Fetch field value as a list of integers.\n"
		"\n"
		"Currently this function only works for OFTIntegerList fields.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldAsIntegerList().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"pnCount:  an integer to put the list count (number of integers) into.\n"
		"\n"
		"the field value. This list is internal, and should not be modified, or\n"
		"freed. Its lifetime may be very brief. If *pnCount is zero on return\n"
		"the returned pointer may be NULL or non-NULL. \n"
		""},
	 { (char *)"Feature_GetFieldAsInteger64List", _wrap_Feature_GetFieldAsInteger64List, METH_VARARGS, (char *)"\n"
		"Feature_GetFieldAsInteger64List(Feature self, int id)\n"
		"\n"
		"const GIntBig*\n"
		"OGR_F_GetFieldAsInteger64List(OGRFeatureH hFeat, int iField, int\n"
		"*pnCount)\n"
		"\n"
		"Fetch field value as a list of 64 bit integers.\n"
		"\n"
		"Currently this function only works for OFTInteger64List fields.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldAsInteger64List().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"pnCount:  an integer to put the list count (number of integers) into.\n"
		"\n"
		"the field value. This list is internal, and should not be modified, or\n"
		"freed. Its lifetime may be very brief. If *pnCount is zero on return\n"
		"the returned pointer may be NULL or non-NULL.\n"
		"\n"
		"GDAL 2.0 \n"
		""},
	 { (char *)"Feature_GetFieldAsDoubleList", _wrap_Feature_GetFieldAsDoubleList, METH_VARARGS, (char *)"\n"
		"GetFieldAsDoubleList(int id)\n"
		"Feature_GetFieldAsDoubleList(Feature self, char const * field_name)\n"
		"\n"
		"const double*\n"
		"OGR_F_GetFieldAsDoubleList(OGRFeatureH hFeat, int iField, int\n"
		"*pnCount)\n"
		"\n"
		"Fetch field value as a list of doubles.\n"
		"\n"
		"Currently this function only works for OFTRealList fields.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldAsDoubleList().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"pnCount:  an integer to put the list count (number of doubles) into.\n"
		"\n"
		"the field value. This list is internal, and should not be modified, or\n"
		"freed. Its lifetime may be very brief. If *pnCount is zero on return\n"
		"the returned pointer may be NULL or non-NULL. \n"
		""},
	 { (char *)"Feature_GetFieldAsStringList", _wrap_Feature_GetFieldAsStringList, METH_VARARGS, (char *)"\n"
		"Feature_GetFieldAsStringList(Feature self, int id) -> char **\n"
		"\n"
		"char**\n"
		"OGR_F_GetFieldAsStringList(OGRFeatureH hFeat, int iField)\n"
		"\n"
		"Fetch field value as a list of strings.\n"
		"\n"
		"Currently this method only works for OFTStringList fields.\n"
		"\n"
		"The returned list is terminated by a NULL pointer. The number of\n"
		"elements can also be calculated using CSLCount().\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldAsStringList().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"the field value. This list is internal, and should not be modified, or\n"
		"freed. Its lifetime may be very brief. \n"
		""},
	 { (char *)"Feature_GetFieldAsBinary", _wrap_Feature_GetFieldAsBinary, METH_VARARGS, (char *)"\n"
		"GetFieldAsBinary(int id) -> OGRErr\n"
		"Feature_GetFieldAsBinary(Feature self, char const * field_name) -> OGRErr\n"
		"\n"
		"GByte*\n"
		"OGR_F_GetFieldAsBinary(OGRFeatureH hFeat, int iField, int *pnBytes)\n"
		"\n"
		"Fetch field value as binary.\n"
		"\n"
		"This method only works for OFTBinary and OFTString fields.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldAsBinary().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"pnBytes:  location to place count of bytes returned.\n"
		"\n"
		"the field value. This list is internal, and should not be modified, or\n"
		"freed. Its lifetime may be very brief. \n"
		""},
	 { (char *)"Feature_IsFieldSet", _wrap_Feature_IsFieldSet, METH_VARARGS, (char *)"\n"
		"IsFieldSet(int id) -> bool\n"
		"Feature_IsFieldSet(Feature self, char const * field_name) -> bool\n"
		"\n"
		"int OGR_F_IsFieldSet(OGRFeatureH\n"
		"hFeat, int iField)\n"
		"\n"
		"Test if a field has ever been assigned a value or not.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::IsFieldSet().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which the field is.\n"
		"\n"
		"iField:  the field to test.\n"
		"\n"
		"TRUE if the field has been set, otherwise false. \n"
		""},
	 { (char *)"Feature_IsFieldNull", _wrap_Feature_IsFieldNull, METH_VARARGS, (char *)"\n"
		"IsFieldNull(int id) -> bool\n"
		"Feature_IsFieldNull(Feature self, char const * field_name) -> bool\n"
		"\n"
		"int OGR_F_IsFieldNull(OGRFeatureH\n"
		"hFeat, int iField)\n"
		"\n"
		"Test if a field is null.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::IsFieldNull().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which the field is.\n"
		"\n"
		"iField:  the field to test.\n"
		"\n"
		"TRUE if the field is null, otherwise false.\n"
		"\n"
		"GDAL 2.2 \n"
		""},
	 { (char *)"Feature_IsFieldSetAndNotNull", _wrap_Feature_IsFieldSetAndNotNull, METH_VARARGS, (char *)"\n"
		"IsFieldSetAndNotNull(int id) -> bool\n"
		"Feature_IsFieldSetAndNotNull(Feature self, char const * field_name) -> bool\n"
		"\n"
		"int\n"
		"OGR_F_IsFieldSetAndNotNull(OGRFeatureH hFeat, int iField)\n"
		"\n"
		"Test if a field is set and not null.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::IsFieldSetAndNotNull().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which the field is.\n"
		"\n"
		"iField:  the field to test.\n"
		"\n"
		"TRUE if the field is set and not null, otherwise false.\n"
		"\n"
		"GDAL 2.2 \n"
		""},
	 { (char *)"Feature_GetFieldIndex", _wrap_Feature_GetFieldIndex, METH_VARARGS, (char *)"\n"
		"Feature_GetFieldIndex(Feature self, char const * field_name) -> int\n"
		"\n"
		"int\n"
		"OGR_F_GetFieldIndex(OGRFeatureH hFeat, const char *pszName)\n"
		"\n"
		"Fetch the field index given field name.\n"
		"\n"
		"This is a cover for the OGRFeatureDefn::GetFieldIndex() method.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldIndex().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which the field is found.\n"
		"\n"
		"pszName:  the name of the field to search for.\n"
		"\n"
		"the field index, or -1 if no matching field is found. \n"
		""},
	 { (char *)"Feature_GetGeomFieldIndex", _wrap_Feature_GetGeomFieldIndex, METH_VARARGS, (char *)"\n"
		"Feature_GetGeomFieldIndex(Feature self, char const * field_name) -> int\n"
		"\n"
		"int\n"
		"OGR_F_GetGeomFieldIndex(OGRFeatureH hFeat, const char *pszName)\n"
		"\n"
		"Fetch the geometry field index given geometry field name.\n"
		"\n"
		"This is a cover for the OGRFeatureDefn::GetGeomFieldIndex() method.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetGeomFieldIndex().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which the geometry field is found.\n"
		"\n"
		"pszName:  the name of the geometry field to search for.\n"
		"\n"
		"the geometry field index, or -1 if no matching geometry field is\n"
		"found.\n"
		"\n"
		"GDAL 1.11 \n"
		""},
	 { (char *)"Feature_GetFID", _wrap_Feature_GetFID, METH_VARARGS, (char *)"\n"
		"Feature_GetFID(Feature self) -> GIntBig\n"
		"\n"
		"GIntBig OGR_F_GetFID(OGRFeatureH\n"
		"hFeat)\n"
		"\n"
		"Get feature identifier.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::GetFID().\n"
		"Note: since GDAL 2.0, this method returns a GIntBig (previously a\n"
		"long)\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature from which to get the feature\n"
		"identifier.\n"
		"\n"
		"feature id or OGRNullFID if none has been assigned. \n"
		""},
	 { (char *)"Feature_SetFID", _wrap_Feature_SetFID, METH_VARARGS, (char *)"\n"
		"Feature_SetFID(Feature self, GIntBig fid) -> OGRErr\n"
		"\n"
		"OGRErr OGR_F_SetFID(OGRFeatureH hFeat,\n"
		"GIntBig nFID)\n"
		"\n"
		"Set the feature identifier.\n"
		"\n"
		"For specific types of features this operation may fail on illegal\n"
		"features ids. Generally it always succeeds. Feature ids should be\n"
		"greater than or equal to zero, with the exception of OGRNullFID (-1)\n"
		"indicating that the feature id is unknown.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::SetFID().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to set the feature id to.\n"
		"\n"
		"nFID:  the new feature identifier value to assign.\n"
		"\n"
		"On success OGRERR_NONE, or on failure some other value. \n"
		""},
	 { (char *)"Feature_DumpReadable", _wrap_Feature_DumpReadable, METH_VARARGS, (char *)"\n"
		"Feature_DumpReadable(Feature self)\n"
		"\n"
		"void\n"
		"OGR_F_DumpReadable(OGRFeatureH hFeat, FILE *fpOut)\n"
		"\n"
		"Dump this feature in a human readable form.\n"
		"\n"
		"This dumps the attributes, and geometry; however, it doesn't\n"
		"definition information (other than field types and names), nor does it\n"
		"report the geometry spatial reference system.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::DumpReadable().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to dump.\n"
		"\n"
		"fpOut:  the stream to write to, such as strout. \n"
		""},
	 { (char *)"Feature_UnsetField", _wrap_Feature_UnsetField, METH_VARARGS, (char *)"\n"
		"UnsetField(int id)\n"
		"Feature_UnsetField(Feature self, char const * field_name)\n"
		"\n"
		"void OGR_F_UnsetField(OGRFeatureH\n"
		"hFeat, int iField)\n"
		"\n"
		"Clear a field, marking it as unset.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::UnsetField().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which the field is.\n"
		"\n"
		"iField:  the field to unset. \n"
		""},
	 { (char *)"Feature_SetFieldNull", _wrap_Feature_SetFieldNull, METH_VARARGS, (char *)"\n"
		"SetFieldNull(int id)\n"
		"Feature_SetFieldNull(Feature self, char const * field_name)\n"
		"\n"
		"void\n"
		"OGR_F_SetFieldNull(OGRFeatureH hFeat, int iField)\n"
		"\n"
		"Clear a field, marking it as null.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::SetFieldNull().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which the field is.\n"
		"\n"
		"iField:  the field to set to null.\n"
		"\n"
		"GDAL 2.2 \n"
		""},
	 { (char *)"Feature_SetFieldInteger64", _wrap_Feature_SetFieldInteger64, METH_VARARGS, (char *)"\n"
		"Feature_SetFieldInteger64(Feature self, int id, GIntBig value)\n"
		"\n"
		"void\n"
		"OGR_F_SetFieldInteger64(OGRFeatureH hFeat, int iField, GIntBig nValue)\n"
		"\n"
		"Set field to 64 bit integer value.\n"
		"\n"
		"OFTInteger, OFTInteger64 and OFTReal fields will be set directly.\n"
		"OFTString fields will be assigned a string representation of the\n"
		"value, but not necessarily taking into account formatting constraints\n"
		"on this field. Other field types may be unaffected.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::SetField().\n"
		"\n"
		"This method has only an effect on the in-memory feature object. If\n"
		"this object comes from a layer and the modifications must be\n"
		"serialized back to the datasource, OGR_L_SetFeature() must be used\n"
		"afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be\n"
		"used afterwards.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"nValue:  the value to assign.\n"
		"\n"
		"GDAL 2.0 \n"
		""},
	 { (char *)"Feature_SetField", _wrap_Feature_SetField, METH_VARARGS, (char *)"\n"
		"SetField(int id, char const * value)\n"
		"SetField(char const * field_name, char const * value)\n"
		"SetField(int id, double value)\n"
		"SetField(char const * field_name, double value)\n"
		"SetField(int id, int year, int month, int day, int hour, int minute, float second, int tzflag)\n"
		"Feature_SetField(Feature self, char const * field_name, int year, int month, int day, int hour, int minute, float second, int tzflag)\n"
		""},
	 { (char *)"Feature_SetFieldIntegerList", _wrap_Feature_SetFieldIntegerList, METH_VARARGS, (char *)"\n"
		"Feature_SetFieldIntegerList(Feature self, int id, int nList)\n"
		"\n"
		"void\n"
		"OGR_F_SetFieldIntegerList(OGRFeatureH hFeat, int iField, int nCount,\n"
		"int *panValues)\n"
		"\n"
		"Set field to list of integers value.\n"
		"\n"
		"This function currently on has an effect of OFTIntegerList,\n"
		"OFTInteger64List and OFTRealList fields.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::SetField().\n"
		"\n"
		"This method has only an effect on the in-memory feature object. If\n"
		"this object comes from a layer and the modifications must be\n"
		"serialized back to the datasource, OGR_L_SetFeature() must be used\n"
		"afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be\n"
		"used afterwards.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to set, from 0 to GetFieldCount()-1.\n"
		"\n"
		"nCount:  the number of values in the list being assigned.\n"
		"\n"
		"panValues:  the values to assign. \n"
		""},
	 { (char *)"Feature_SetFieldInteger64List", _wrap_Feature_SetFieldInteger64List, METH_VARARGS, (char *)"\n"
		"Feature_SetFieldInteger64List(Feature self, int id, int nList)\n"
		"\n"
		"void\n"
		"OGR_F_SetFieldInteger64List(OGRFeatureH hFeat, int iField, int nCount,\n"
		"const GIntBig *panValues)\n"
		"\n"
		"Set field to list of 64 bit integers value.\n"
		"\n"
		"This function currently on has an effect of OFTIntegerList,\n"
		"OFTInteger64List and OFTRealList fields.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::SetField().\n"
		"\n"
		"This method has only an effect on the in-memory feature object. If\n"
		"this object comes from a layer and the modifications must be\n"
		"serialized back to the datasource, OGR_L_SetFeature() must be used\n"
		"afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be\n"
		"used afterwards.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to set, from 0 to GetFieldCount()-1.\n"
		"\n"
		"nCount:  the number of values in the list being assigned.\n"
		"\n"
		"panValues:  the values to assign.\n"
		"\n"
		"GDAL 2.0 \n"
		""},
	 { (char *)"Feature_SetFieldDoubleList", _wrap_Feature_SetFieldDoubleList, METH_VARARGS, (char *)"\n"
		"Feature_SetFieldDoubleList(Feature self, int id, int nList)\n"
		"\n"
		"void\n"
		"OGR_F_SetFieldDoubleList(OGRFeatureH hFeat, int iField, int nCount,\n"
		"double *padfValues)\n"
		"\n"
		"Set field to list of doubles value.\n"
		"\n"
		"This function currently on has an effect of OFTIntegerList,\n"
		"OFTInteger64List, OFTRealList fields.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::SetField().\n"
		"\n"
		"This method has only an effect on the in-memory feature object. If\n"
		"this object comes from a layer and the modifications must be\n"
		"serialized back to the datasource, OGR_L_SetFeature() must be used\n"
		"afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be\n"
		"used afterwards.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to set, from 0 to GetFieldCount()-1.\n"
		"\n"
		"nCount:  the number of values in the list being assigned.\n"
		"\n"
		"padfValues:  the values to assign. \n"
		""},
	 { (char *)"Feature_SetFieldStringList", _wrap_Feature_SetFieldStringList, METH_VARARGS, (char *)"\n"
		"Feature_SetFieldStringList(Feature self, int id, char ** pList)\n"
		"\n"
		"void\n"
		"OGR_F_SetFieldStringList(OGRFeatureH hFeat, int iField, char\n"
		"**papszValues)\n"
		"\n"
		"Set field to list of strings value.\n"
		"\n"
		"This function currently on has an effect of OFTStringList fields.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::SetField().\n"
		"\n"
		"This method has only an effect on the in-memory feature object. If\n"
		"this object comes from a layer and the modifications must be\n"
		"serialized back to the datasource, OGR_L_SetFeature() must be used\n"
		"afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be\n"
		"used afterwards.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to set, from 0 to GetFieldCount()-1.\n"
		"\n"
		"papszValues:  the values to assign. \n"
		""},
	 { (char *)"Feature_SetFieldBinaryFromHexString", _wrap_Feature_SetFieldBinaryFromHexString, METH_VARARGS, (char *)"\n"
		"SetFieldBinaryFromHexString(int id, char const * pszValue)\n"
		"Feature_SetFieldBinaryFromHexString(Feature self, char const * field_name, char const * pszValue)\n"
		""},
	 { (char *)"Feature_SetFrom", (PyCFunction) _wrap_Feature_SetFrom, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Feature_SetFrom(Feature self, Feature other, int forgiving=1) -> OGRErr\n"
		"\n"
		"OGRErr OGR_F_SetFrom(OGRFeatureH\n"
		"hFeat, OGRFeatureH hOtherFeat, int bForgiving)\n"
		"\n"
		"Set one feature from another.\n"
		"\n"
		"Overwrite the contents of this feature from the geometry and\n"
		"attributes of another. The hOtherFeature does not need to have the\n"
		"same OGRFeatureDefn. Field values are copied by corresponding field\n"
		"names. Field types do not have to exactly match. OGR_F_SetField*()\n"
		"function conversion rules will be applied as needed.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::SetFrom().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to set to.\n"
		"\n"
		"hOtherFeat:  handle to the feature from which geometry, and field\n"
		"values will be copied.\n"
		"\n"
		"bForgiving:  TRUE if the operation should continue despite lacking\n"
		"output fields matching some of the source fields.\n"
		"\n"
		"OGRERR_NONE if the operation succeeds, even if some values are not\n"
		"transferred, otherwise an error code. \n"
		""},
	 { (char *)"Feature_SetFromWithMap", _wrap_Feature_SetFromWithMap, METH_VARARGS, (char *)"\n"
		"Feature_SetFromWithMap(Feature self, Feature other, int forgiving, int nList) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_F_SetFromWithMap(OGRFeatureH hFeat, OGRFeatureH hOtherFeat, int\n"
		"bForgiving, int *panMap)\n"
		"\n"
		"Set one feature from another.\n"
		"\n"
		"Overwrite the contents of this feature from the geometry and\n"
		"attributes of another. The hOtherFeature does not need to have the\n"
		"same OGRFeatureDefn. Field values are copied according to the provided\n"
		"indices map. Field types do not have to exactly match.\n"
		"OGR_F_SetField*() function conversion rules will be applied as needed.\n"
		"This is more efficient than OGR_F_SetFrom() in that this doesn't\n"
		"lookup the fields by their names. Particularly useful when the field\n"
		"names don't match.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::SetFrom().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to set to.\n"
		"\n"
		"hOtherFeat:  handle to the feature from which geometry, and field\n"
		"values will be copied.\n"
		"\n"
		"panMap:  Array of the indices of the destination feature's fields\n"
		"stored at the corresponding index of the source feature's fields. A\n"
		"value of -1 should be used to ignore the source's field. The array\n"
		"should not be NULL and be as long as the number of fields in the\n"
		"source feature.\n"
		"\n"
		"bForgiving:  TRUE if the operation should continue despite lacking\n"
		"output fields matching some of the source fields.\n"
		"\n"
		"OGRERR_NONE if the operation succeeds, even if some values are not\n"
		"transferred, otherwise an error code. \n"
		""},
	 { (char *)"Feature_GetStyleString", _wrap_Feature_GetStyleString, METH_VARARGS, (char *)"\n"
		"Feature_GetStyleString(Feature self) -> char const *\n"
		"\n"
		"const char*\n"
		"OGR_F_GetStyleString(OGRFeatureH hFeat)\n"
		"\n"
		"Fetch style string for this feature.\n"
		"\n"
		"Set the OGR Feature Style Specification for details on the format of\n"
		"this string, and ogr_featurestyle.h for services available to parse\n"
		"it.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetStyleString().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to get the style from.\n"
		"\n"
		"a reference to a representation in string format, or NULL if there\n"
		"isn't one. \n"
		""},
	 { (char *)"Feature_SetStyleString", _wrap_Feature_SetStyleString, METH_VARARGS, (char *)"\n"
		"Feature_SetStyleString(Feature self, char const * the_string)\n"
		"\n"
		"void\n"
		"OGR_F_SetStyleString(OGRFeatureH hFeat, const char *pszStyle)\n"
		"\n"
		"Set feature style string.\n"
		"\n"
		"This method operate exactly as OGR_F_SetStyleStringDirectly() except\n"
		"that it does not assume ownership of the passed string, but instead\n"
		"makes a copy of it.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::SetStyleString().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to set style to.\n"
		"\n"
		"pszStyle:  the style string to apply to this feature, cannot be NULL.\n"
		"\n"
		""},
	 { (char *)"Feature_GetFieldType", _wrap_Feature_GetFieldType, METH_VARARGS, (char *)"\n"
		"GetFieldType(int id) -> OGRFieldType\n"
		"Feature_GetFieldType(Feature self, char const * field_name) -> OGRFieldType\n"
		""},
	 { (char *)"Feature_Validate", _wrap_Feature_Validate, METH_VARARGS, (char *)"\n"
		"Feature_Validate(Feature self, int flags, int bEmitError=True) -> int\n"
		"\n"
		"int OGR_F_Validate(OGRFeatureH\n"
		"hFeat, int nValidateFlags, int bEmitError)\n"
		"\n"
		"Validate that a feature meets constraints of its schema.\n"
		"\n"
		"The scope of test is specified with the nValidateFlags parameter.\n"
		"\n"
		"Regarding OGR_F_VAL_WIDTH, the test is done assuming the string width\n"
		"must be interpreted as the number of UTF-8 characters. Some drivers\n"
		"might interpret the width as the number of bytes instead. So this test\n"
		"is rather conservative (if it fails, then it will fail for all\n"
		"interpretations).\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::Validate().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to validate.\n"
		"\n"
		"nValidateFlags:  OGR_F_VAL_ALL or combination of OGR_F_VAL_NULL,\n"
		"OGR_F_VAL_GEOM_TYPE, OGR_F_VAL_WIDTH and\n"
		"OGR_F_VAL_ALLOW_NULL_WHEN_DEFAULT with '|' operator\n"
		"\n"
		"bEmitError:  TRUE if a CPLError() must be emitted when a check fails\n"
		"\n"
		"TRUE if all enabled validation tests pass.\n"
		"\n"
		"GDAL 2.0 \n"
		""},
	 { (char *)"Feature_FillUnsetWithDefault", _wrap_Feature_FillUnsetWithDefault, METH_VARARGS, (char *)"\n"
		"Feature_FillUnsetWithDefault(Feature self, int bNotNullableOnly=False, char ** options=None)\n"
		"\n"
		"void\n"
		"OGR_F_FillUnsetWithDefault(OGRFeatureH hFeat, int bNotNullableOnly,\n"
		"char **papszOptions)\n"
		"\n"
		"Fill unset fields with default values that might be defined.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::FillUnsetWithDefault().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature.\n"
		"\n"
		"bNotNullableOnly:  if we should fill only unset fields with a not-null\n"
		"constraint.\n"
		"\n"
		"papszOptions:  unused currently. Must be set to NULL.\n"
		"\n"
		"GDAL 2.0 \n"
		""},
	 { (char *)"Feature_GetNativeData", _wrap_Feature_GetNativeData, METH_VARARGS, (char *)"\n"
		"Feature_GetNativeData(Feature self) -> char const *\n"
		"\n"
		"const char*\n"
		"OGR_F_GetNativeData(OGRFeatureH hFeat)\n"
		"\n"
		"Returns the native data for the feature.\n"
		"\n"
		"The native data is the representation in a \"natural\" form that comes\n"
		"from the driver that created this feature, or that is aimed at an\n"
		"output driver. The native data may be in different format, which is\n"
		"indicated by OGR_F_GetNativeMediaType().\n"
		"\n"
		"Note that most drivers do not support storing the native data in the\n"
		"feature object, and if they do, generally the NATIVE_DATA open option\n"
		"must be passed at dataset opening.\n"
		"\n"
		"The \"native data\" does not imply it is something more performant or\n"
		"powerful than what can be obtained with the rest of the API, but it\n"
		"may be useful in round-tripping scenarios where some characteristics\n"
		"of the underlying format are not captured otherwise by the OGR\n"
		"abstraction.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetNativeData().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature.\n"
		"\n"
		"a string with the native data, or NULL if there is none.\n"
		"\n"
		"GDAL 2.1\n"
		"\n"
		"See:\n"
		"https://trac.osgeo.org/gdal/wiki/rfc60_improved_roundtripping_in_ogr\n"
		"\n"
		""},
	 { (char *)"Feature_GetNativeMediaType", _wrap_Feature_GetNativeMediaType, METH_VARARGS, (char *)"\n"
		"Feature_GetNativeMediaType(Feature self) -> char const *\n"
		"\n"
		"const char*\n"
		"OGR_F_GetNativeMediaType(OGRFeatureH hFeat)\n"
		"\n"
		"Returns the native media type for the feature.\n"
		"\n"
		"The native media type is the identifier for the format of the native\n"
		"data. It follows the IANA RFC 2045\n"
		"(seehttps://en.wikipedia.org/wiki/Media_type), e.g.\n"
		"\"application/vnd.geo+json\" for JSon.\n"
		"\n"
		"This function is the same as the C function\n"
		"OGR_F_GetNativeMediaType().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature.\n"
		"\n"
		"a string with the native media type, or NULL if there is none.\n"
		"\n"
		"GDAL 2.1\n"
		"\n"
		"See:\n"
		"https://trac.osgeo.org/gdal/wiki/rfc60_improved_roundtripping_in_ogr\n"
		"\n"
		""},
	 { (char *)"Feature_SetNativeData", _wrap_Feature_SetNativeData, METH_VARARGS, (char *)"\n"
		"Feature_SetNativeData(Feature self, char const * nativeData)\n"
		"\n"
		"void\n"
		"OGR_F_SetNativeData(OGRFeatureH hFeat, const char *pszNativeData)\n"
		"\n"
		"Sets the native data for the feature.\n"
		"\n"
		"The native data is the representation in a \"natural\" form that comes\n"
		"from the driver that created this feature, or that is aimed at an\n"
		"output driver. The native data may be in different format, which is\n"
		"indicated by OGR_F_GetNativeMediaType().\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::SetNativeData().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature.\n"
		"\n"
		"pszNativeData:  a string with the native data, or NULL if there is\n"
		"none.\n"
		"\n"
		"GDAL 2.1\n"
		"\n"
		"See:\n"
		"https://trac.osgeo.org/gdal/wiki/rfc60_improved_roundtripping_in_ogr\n"
		"\n"
		""},
	 { (char *)"Feature_SetNativeMediaType", _wrap_Feature_SetNativeMediaType, METH_VARARGS, (char *)"\n"
		"Feature_SetNativeMediaType(Feature self, char const * nativeMediaType)\n"
		"\n"
		"void\n"
		"OGR_F_SetNativeMediaType(OGRFeatureH hFeat, const char\n"
		"*pszNativeMediaType)\n"
		"\n"
		"Sets the native media type for the feature.\n"
		"\n"
		"The native media type is the identifier for the format of the native\n"
		"data. It follows the IANA RFC 2045\n"
		"(seehttps://en.wikipedia.org/wiki/Media_type), e.g.\n"
		"\"application/vnd.geo+json\" for JSon.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::SetNativeMediaType().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature.\n"
		"\n"
		"pszNativeMediaType:  a string with the native media type, or NULL if\n"
		"there is none.\n"
		"\n"
		"GDAL 2.1\n"
		"\n"
		"See:\n"
		"https://trac.osgeo.org/gdal/wiki/rfc60_improved_roundtripping_in_ogr\n"
		"\n"
		""},
	 { (char *)"Feature_SetFieldString", _wrap_Feature_SetFieldString, METH_VARARGS, (char *)"\n"
		"Feature_SetFieldString(Feature self, int id, char const * value)\n"
		"\n"
		"void\n"
		"OGR_F_SetFieldString(OGRFeatureH hFeat, int iField, const char\n"
		"*pszValue)\n"
		"\n"
		"Set field to string value.\n"
		"\n"
		"OFTInteger fields will be set based on an atoi() conversion of the\n"
		"string. OFTInteger64 fields will be set based on an CPLAtoGIntBig()\n"
		"conversion of the string. OFTReal fields will be set based on an\n"
		"CPLAtof() conversion of the string. Other field types may be\n"
		"unaffected.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::SetField().\n"
		"\n"
		"This method has only an effect on the in-memory feature object. If\n"
		"this object comes from a layer and the modifications must be\n"
		"serialized back to the datasource, OGR_L_SetFeature() must be used\n"
		"afterwards. Or if this is a new feature, OGR_L_CreateFeature() must be\n"
		"used afterwards.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"pszValue:  the value to assign. \n"
		""},
	 { (char *)"Feature_swigregister", Feature_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_FeatureDefn", _wrap_delete_FeatureDefn, METH_VARARGS, (char *)"delete_FeatureDefn(FeatureDefn self)"},
	 { (char *)"new_FeatureDefn", (PyCFunction) _wrap_new_FeatureDefn, METH_VARARGS | METH_KEYWORDS, (char *)"new_FeatureDefn(char const * name_null_ok=None) -> FeatureDefn"},
	 { (char *)"FeatureDefn_GetName", _wrap_FeatureDefn_GetName, METH_VARARGS, (char *)"\n"
		"FeatureDefn_GetName(FeatureDefn self) -> char const *\n"
		"\n"
		"const char*\n"
		"OGR_FD_GetName(OGRFeatureDefnH hDefn)\n"
		"\n"
		"Get name of the OGRFeatureDefn passed as an argument.\n"
		"\n"
		"This function is the same as the C++ method OGRFeatureDefn::GetName().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition to get the name from.\n"
		"\n"
		"the name. This name is internal and should not be modified, or freed.\n"
		"\n"
		""},
	 { (char *)"FeatureDefn_GetFieldCount", _wrap_FeatureDefn_GetFieldCount, METH_VARARGS, (char *)"\n"
		"FeatureDefn_GetFieldCount(FeatureDefn self) -> int\n"
		"\n"
		"int\n"
		"OGR_FD_GetFieldCount(OGRFeatureDefnH hDefn)\n"
		"\n"
		"Fetch number of fields on the passed feature definition.\n"
		"\n"
		"This function is the same as the C++ OGRFeatureDefn::GetFieldCount().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition to get the fields count from.\n"
		"\n"
		"count of fields. \n"
		""},
	 { (char *)"FeatureDefn_GetFieldDefn", _wrap_FeatureDefn_GetFieldDefn, METH_VARARGS, (char *)"\n"
		"FeatureDefn_GetFieldDefn(FeatureDefn self, int i) -> FieldDefn\n"
		"\n"
		"OGRFieldDefnH\n"
		"OGR_FD_GetFieldDefn(OGRFeatureDefnH hDefn, int iField)\n"
		"\n"
		"Fetch field definition of the passed feature definition.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::GetFieldDefn().\n"
		"\n"
		"Starting with GDAL 1.7.0, this method will also issue an error if the\n"
		"index is not valid.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition to get the field definition\n"
		"from.\n"
		"\n"
		"iField:  the field to fetch, between 0 and GetFieldCount()-1.\n"
		"\n"
		"an handle to an internal field definition object or NULL if invalid\n"
		"index. This object should not be modified or freed by the application.\n"
		"\n"
		""},
	 { (char *)"FeatureDefn_GetFieldIndex", _wrap_FeatureDefn_GetFieldIndex, METH_VARARGS, (char *)"\n"
		"FeatureDefn_GetFieldIndex(FeatureDefn self, char const * field_name) -> int\n"
		"\n"
		"int\n"
		"OGR_FD_GetFieldIndex(OGRFeatureDefnH hDefn, const char *pszFieldName)\n"
		"\n"
		"Find field by name.\n"
		"\n"
		"The field index of the first field matching the passed field name\n"
		"(case insensitively) is returned.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::GetFieldIndex.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition to get field index from.\n"
		"\n"
		"pszFieldName:  the field name to search for.\n"
		"\n"
		"the field index, or -1 if no match found. \n"
		""},
	 { (char *)"FeatureDefn_AddFieldDefn", _wrap_FeatureDefn_AddFieldDefn, METH_VARARGS, (char *)"\n"
		"FeatureDefn_AddFieldDefn(FeatureDefn self, FieldDefn defn)\n"
		"\n"
		"void\n"
		"OGR_FD_AddFieldDefn(OGRFeatureDefnH hDefn, OGRFieldDefnH hNewField)\n"
		"\n"
		"Add a new field definition to the passed feature definition.\n"
		"\n"
		"To add a new field definition to a layer definition, do not use this\n"
		"function directly, but use OGR_L_CreateField() instead.\n"
		"\n"
		"This function should only be called while there are no OGRFeature\n"
		"objects in existence based on this OGRFeatureDefn. The OGRFieldDefn\n"
		"passed in is copied, and remains the responsibility of the caller.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::AddFieldDefn().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition to add the field definition\n"
		"to.\n"
		"\n"
		"hNewField:  handle to the new field definition. \n"
		""},
	 { (char *)"FeatureDefn_GetGeomFieldCount", _wrap_FeatureDefn_GetGeomFieldCount, METH_VARARGS, (char *)"\n"
		"FeatureDefn_GetGeomFieldCount(FeatureDefn self) -> int\n"
		"\n"
		"int\n"
		"OGR_FD_GetGeomFieldCount(OGRFeatureDefnH hDefn)\n"
		"\n"
		"Fetch number of geometry fields on the passed feature definition.\n"
		"\n"
		"This function is the same as the C++\n"
		"OGRFeatureDefn::GetGeomFieldCount().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition to get the fields count from.\n"
		"\n"
		"count of geometry fields.\n"
		"\n"
		"GDAL 1.11 \n"
		""},
	 { (char *)"FeatureDefn_GetGeomFieldDefn", _wrap_FeatureDefn_GetGeomFieldDefn, METH_VARARGS, (char *)"\n"
		"FeatureDefn_GetGeomFieldDefn(FeatureDefn self, int i) -> GeomFieldDefn\n"
		"\n"
		"OGRGeomFieldDefnH\n"
		"OGR_FD_GetGeomFieldDefn(OGRFeatureDefnH hDefn, int iGeomField)\n"
		"\n"
		"Fetch geometry field definition of the passed feature definition.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::GetGeomFieldDefn().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition to get the field definition\n"
		"from.\n"
		"\n"
		"iGeomField:  the geometry field to fetch, between 0 and\n"
		"GetGeomFieldCount() - 1.\n"
		"\n"
		"an handle to an internal field definition object or NULL if invalid\n"
		"index. This object should not be modified or freed by the application.\n"
		"\n"
		"GDAL 1.11 \n"
		""},
	 { (char *)"FeatureDefn_GetGeomFieldIndex", _wrap_FeatureDefn_GetGeomFieldIndex, METH_VARARGS, (char *)"\n"
		"FeatureDefn_GetGeomFieldIndex(FeatureDefn self, char const * field_name) -> int\n"
		"\n"
		"int\n"
		"OGR_FD_GetGeomFieldIndex(OGRFeatureDefnH hDefn, const char\n"
		"*pszGeomFieldName)\n"
		"\n"
		"Find geometry field by name.\n"
		"\n"
		"The geometry field index of the first geometry field matching the\n"
		"passed field name (case insensitively) is returned.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::GetGeomFieldIndex.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition to get field index from.\n"
		"\n"
		"pszGeomFieldName:  the geometry field name to search for.\n"
		"\n"
		"the geometry field index, or -1 if no match found. \n"
		""},
	 { (char *)"FeatureDefn_AddGeomFieldDefn", _wrap_FeatureDefn_AddGeomFieldDefn, METH_VARARGS, (char *)"\n"
		"FeatureDefn_AddGeomFieldDefn(FeatureDefn self, GeomFieldDefn defn)\n"
		"\n"
		"void\n"
		"OGR_FD_AddGeomFieldDefn(OGRFeatureDefnH hDefn, OGRGeomFieldDefnH\n"
		"hNewGeomField)\n"
		"\n"
		"Add a new field definition to the passed feature definition.\n"
		"\n"
		"To add a new field definition to a layer definition, do not use this\n"
		"function directly, but use OGR_L_CreateGeomField() instead.\n"
		"\n"
		"This function should only be called while there are no OGRFeature\n"
		"objects in existence based on this OGRFeatureDefn. The\n"
		"OGRGeomFieldDefn passed in is copied, and remains the responsibility\n"
		"of the caller.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::AddGeomFieldDefn().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition to add the geometry field\n"
		"definition to.\n"
		"\n"
		"hNewGeomField:  handle to the new field definition.\n"
		"\n"
		"GDAL 1.11 \n"
		""},
	 { (char *)"FeatureDefn_DeleteGeomFieldDefn", _wrap_FeatureDefn_DeleteGeomFieldDefn, METH_VARARGS, (char *)"\n"
		"FeatureDefn_DeleteGeomFieldDefn(FeatureDefn self, int idx) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_FD_DeleteGeomFieldDefn(OGRFeatureDefnH hDefn, int iGeomField)\n"
		"\n"
		"Delete an existing geometry field definition.\n"
		"\n"
		"To delete an existing geometry field definition from a layer\n"
		"definition, do not use this function directly, but use\n"
		"OGR_L_DeleteGeomField() instead ( not implemented yet).\n"
		"\n"
		"This method should only be called while there are no OGRFeature\n"
		"objects in existence based on this OGRFeatureDefn.\n"
		"\n"
		"This method is the same as the C++ method\n"
		"OGRFeatureDefn::DeleteGeomFieldDefn().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition.\n"
		"\n"
		"iGeomField:  the index of the geometry field definition.\n"
		"\n"
		"OGRERR_NONE in case of success.\n"
		"\n"
		"GDAL 1.11 \n"
		""},
	 { (char *)"FeatureDefn_GetGeomType", _wrap_FeatureDefn_GetGeomType, METH_VARARGS, (char *)"\n"
		"FeatureDefn_GetGeomType(FeatureDefn self) -> OGRwkbGeometryType\n"
		"\n"
		"OGRwkbGeometryType\n"
		"OGR_FD_GetGeomType(OGRFeatureDefnH hDefn)\n"
		"\n"
		"Fetch the geometry base type of the passed feature definition.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::GetGeomType().\n"
		"\n"
		"Starting with GDAL 1.11, this method returns\n"
		"GetGeomFieldDefn(0)->GetType().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition to get the geometry type\n"
		"from.\n"
		"\n"
		"the base type for all geometry related to this definition. \n"
		""},
	 { (char *)"FeatureDefn_SetGeomType", _wrap_FeatureDefn_SetGeomType, METH_VARARGS, (char *)"\n"
		"FeatureDefn_SetGeomType(FeatureDefn self, OGRwkbGeometryType geom_type)\n"
		"\n"
		"void\n"
		"OGR_FD_SetGeomType(OGRFeatureDefnH hDefn, OGRwkbGeometryType eType)\n"
		"\n"
		"Assign the base geometry type for the passed layer (the same as the\n"
		"feature definition).\n"
		"\n"
		"All geometry objects using this type must be of the defined type or a\n"
		"derived type. The default upon creation is wkbUnknown which allows for\n"
		"any geometry type. The geometry type should generally not be changed\n"
		"after any OGRFeatures have been created against this definition.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::SetGeomType().\n"
		"\n"
		"Starting with GDAL 1.11, this method calls\n"
		"GetGeomFieldDefn(0)->SetType().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the layer or feature definition to set the geometry\n"
		"type to.\n"
		"\n"
		"eType:  the new type to assign. \n"
		""},
	 { (char *)"FeatureDefn_GetReferenceCount", _wrap_FeatureDefn_GetReferenceCount, METH_VARARGS, (char *)"\n"
		"FeatureDefn_GetReferenceCount(FeatureDefn self) -> int\n"
		"\n"
		"int\n"
		"OGR_FD_GetReferenceCount(OGRFeatureDefnH hDefn)\n"
		"\n"
		"Fetch current reference count.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::GetReferenceCount().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition on witch OGRFeature are based\n"
		"on.\n"
		"\n"
		"the current reference count. \n"
		""},
	 { (char *)"FeatureDefn_IsGeometryIgnored", _wrap_FeatureDefn_IsGeometryIgnored, METH_VARARGS, (char *)"\n"
		"FeatureDefn_IsGeometryIgnored(FeatureDefn self) -> int\n"
		"\n"
		"int\n"
		"OGR_FD_IsGeometryIgnored(OGRFeatureDefnH hDefn)\n"
		"\n"
		"Determine whether the geometry can be omitted when fetching features.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::IsGeometryIgnored().\n"
		"\n"
		"Starting with GDAL 1.11, this method returns\n"
		"GetGeomFieldDefn(0)->IsIgnored().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition on witch OGRFeature are based\n"
		"on.\n"
		"\n"
		"ignore state \n"
		""},
	 { (char *)"FeatureDefn_SetGeometryIgnored", _wrap_FeatureDefn_SetGeometryIgnored, METH_VARARGS, (char *)"\n"
		"FeatureDefn_SetGeometryIgnored(FeatureDefn self, int bIgnored)\n"
		"\n"
		"void\n"
		"OGR_FD_SetGeometryIgnored(OGRFeatureDefnH hDefn, int bIgnore)\n"
		"\n"
		"Set whether the geometry can be omitted when fetching features.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::SetGeometryIgnored().\n"
		"\n"
		"Starting with GDAL 1.11, this method calls\n"
		"GetGeomFieldDefn(0)->SetIgnored().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition on witch OGRFeature are based\n"
		"on.\n"
		"\n"
		"bIgnore:  ignore state \n"
		""},
	 { (char *)"FeatureDefn_IsStyleIgnored", _wrap_FeatureDefn_IsStyleIgnored, METH_VARARGS, (char *)"\n"
		"FeatureDefn_IsStyleIgnored(FeatureDefn self) -> int\n"
		"\n"
		"int\n"
		"OGR_FD_IsStyleIgnored(OGRFeatureDefnH hDefn)\n"
		"\n"
		"Determine whether the style can be omitted when fetching features.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::IsStyleIgnored().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition on which OGRFeature are based\n"
		"on.\n"
		"\n"
		"ignore state \n"
		""},
	 { (char *)"FeatureDefn_SetStyleIgnored", _wrap_FeatureDefn_SetStyleIgnored, METH_VARARGS, (char *)"\n"
		"FeatureDefn_SetStyleIgnored(FeatureDefn self, int bIgnored)\n"
		"\n"
		"void\n"
		"OGR_FD_SetStyleIgnored(OGRFeatureDefnH hDefn, int bIgnore)\n"
		"\n"
		"Set whether the style can be omitted when fetching features.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::SetStyleIgnored().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition on witch OGRFeature are based\n"
		"on.\n"
		"\n"
		"bIgnore:  ignore state \n"
		""},
	 { (char *)"FeatureDefn_IsSame", _wrap_FeatureDefn_IsSame, METH_VARARGS, (char *)"\n"
		"FeatureDefn_IsSame(FeatureDefn self, FeatureDefn other_defn) -> int\n"
		"\n"
		"int OGR_FD_IsSame(OGRFeatureDefnH\n"
		"hFDefn, OGRFeatureDefnH hOtherFDefn)\n"
		"\n"
		"Test if the feature definition is identical to the other one.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFDefn:  handle to the feature definition on witch OGRFeature are\n"
		"based on.\n"
		"\n"
		"hOtherFDefn:  handle to the other feature definition to compare to.\n"
		"\n"
		"TRUE if the feature definition is identical to the other one.\n"
		"\n"
		"OGR 1.11 \n"
		""},
	 { (char *)"FeatureDefn_swigregister", FeatureDefn_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_FieldDefn", _wrap_delete_FieldDefn, METH_VARARGS, (char *)"delete_FieldDefn(FieldDefn self)"},
	 { (char *)"new_FieldDefn", (PyCFunction) _wrap_new_FieldDefn, METH_VARARGS | METH_KEYWORDS, (char *)"new_FieldDefn(char const * name_null_ok, OGRFieldType field_type) -> FieldDefn"},
	 { (char *)"FieldDefn_GetName", _wrap_FieldDefn_GetName, METH_VARARGS, (char *)"FieldDefn_GetName(FieldDefn self) -> char const *"},
	 { (char *)"FieldDefn_GetNameRef", _wrap_FieldDefn_GetNameRef, METH_VARARGS, (char *)"\n"
		"FieldDefn_GetNameRef(FieldDefn self) -> char const *\n"
		"\n"
		"const char*\n"
		"OGR_Fld_GetNameRef(OGRFieldDefnH hDefn)\n"
		"\n"
		"Fetch name of this field.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRFieldDefn::GetNameRef().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition.\n"
		"\n"
		"the name of the field definition. \n"
		""},
	 { (char *)"FieldDefn_SetName", _wrap_FieldDefn_SetName, METH_VARARGS, (char *)"\n"
		"FieldDefn_SetName(FieldDefn self, char const * name)\n"
		"\n"
		"void OGR_Fld_SetName(OGRFieldDefnH\n"
		"hDefn, const char *pszName)\n"
		"\n"
		"Reset the name of this field.\n"
		"\n"
		"This function is the same as the CPP method OGRFieldDefn::SetName().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to apply the new name to.\n"
		"\n"
		"pszName:  the new name to apply. \n"
		""},
	 { (char *)"FieldDefn_GetType", _wrap_FieldDefn_GetType, METH_VARARGS, (char *)"\n"
		"FieldDefn_GetType(FieldDefn self) -> OGRFieldType\n"
		"\n"
		"OGRFieldType\n"
		"OGR_Fld_GetType(OGRFieldDefnH hDefn)\n"
		"\n"
		"Fetch type of this field.\n"
		"\n"
		"This function is the same as the CPP method OGRFieldDefn::GetType().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to get type from.\n"
		"\n"
		"field type. \n"
		""},
	 { (char *)"FieldDefn_SetType", _wrap_FieldDefn_SetType, METH_VARARGS, (char *)"\n"
		"FieldDefn_SetType(FieldDefn self, OGRFieldType type)\n"
		"\n"
		"void OGR_Fld_SetType(OGRFieldDefnH\n"
		"hDefn, OGRFieldType eType)\n"
		"\n"
		"Set the type of this field.\n"
		"\n"
		"This should never be done to an OGRFieldDefn that is already part of\n"
		"an OGRFeatureDefn.\n"
		"\n"
		"This function is the same as the CPP method OGRFieldDefn::SetType().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to set type to.\n"
		"\n"
		"eType:  the new field type. \n"
		""},
	 { (char *)"FieldDefn_GetSubType", _wrap_FieldDefn_GetSubType, METH_VARARGS, (char *)"\n"
		"FieldDefn_GetSubType(FieldDefn self) -> OGRFieldSubType\n"
		"\n"
		"OGRFieldSubType\n"
		"OGR_Fld_GetSubType(OGRFieldDefnH hDefn)\n"
		"\n"
		"Fetch subtype of this field.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRFieldDefn::GetSubType().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to get subtype from.\n"
		"\n"
		"field subtype.\n"
		"\n"
		"GDAL 2.0 \n"
		""},
	 { (char *)"FieldDefn_SetSubType", _wrap_FieldDefn_SetSubType, METH_VARARGS, (char *)"\n"
		"FieldDefn_SetSubType(FieldDefn self, OGRFieldSubType type)\n"
		"\n"
		"void\n"
		"OGR_Fld_SetSubType(OGRFieldDefnH hDefn, OGRFieldSubType eSubType)\n"
		"\n"
		"Set the subtype of this field.\n"
		"\n"
		"This should never be done to an OGRFieldDefn that is already part of\n"
		"an OGRFeatureDefn.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRFieldDefn::SetSubType().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to set type to.\n"
		"\n"
		"eSubType:  the new field subtype.\n"
		"\n"
		"GDAL 2.0 \n"
		""},
	 { (char *)"FieldDefn_GetJustify", _wrap_FieldDefn_GetJustify, METH_VARARGS, (char *)"\n"
		"FieldDefn_GetJustify(FieldDefn self) -> OGRJustification\n"
		"\n"
		"OGRJustification\n"
		"OGR_Fld_GetJustify(OGRFieldDefnH hDefn)\n"
		"\n"
		"Get the justification for this field.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRFieldDefn::GetJustify().\n"
		"\n"
		"Note: no driver is know to use the concept of field justification.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to get justification from.\n"
		"\n"
		"the justification. \n"
		""},
	 { (char *)"FieldDefn_SetJustify", _wrap_FieldDefn_SetJustify, METH_VARARGS, (char *)"\n"
		"FieldDefn_SetJustify(FieldDefn self, OGRJustification justify)\n"
		"\n"
		"void\n"
		"OGR_Fld_SetJustify(OGRFieldDefnH hDefn, OGRJustification eJustify)\n"
		"\n"
		"Set the justification for this field.\n"
		"\n"
		"Note: no driver is know to use the concept of field justification.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRFieldDefn::SetJustify().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to set justification to.\n"
		"\n"
		"eJustify:  the new justification. \n"
		""},
	 { (char *)"FieldDefn_GetWidth", _wrap_FieldDefn_GetWidth, METH_VARARGS, (char *)"\n"
		"FieldDefn_GetWidth(FieldDefn self) -> int\n"
		"\n"
		"int OGR_Fld_GetWidth(OGRFieldDefnH\n"
		"hDefn)\n"
		"\n"
		"Get the formatting width for this field.\n"
		"\n"
		"This function is the same as the CPP method OGRFieldDefn::GetWidth().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to get width from.\n"
		"\n"
		"the width, zero means no specified width. \n"
		""},
	 { (char *)"FieldDefn_SetWidth", _wrap_FieldDefn_SetWidth, METH_VARARGS, (char *)"\n"
		"FieldDefn_SetWidth(FieldDefn self, int width)\n"
		"\n"
		"void OGR_Fld_SetWidth(OGRFieldDefnH\n"
		"hDefn, int nNewWidth)\n"
		"\n"
		"Set the formatting width for this field in characters.\n"
		"\n"
		"This function is the same as the CPP method OGRFieldDefn::SetWidth().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to set width to.\n"
		"\n"
		"nNewWidth:  the new width. \n"
		""},
	 { (char *)"FieldDefn_GetPrecision", _wrap_FieldDefn_GetPrecision, METH_VARARGS, (char *)"\n"
		"FieldDefn_GetPrecision(FieldDefn self) -> int\n"
		"\n"
		"int\n"
		"OGR_Fld_GetPrecision(OGRFieldDefnH hDefn)\n"
		"\n"
		"Get the formatting precision for this field.\n"
		"\n"
		"This should normally be zero for fields of types other than OFTReal.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRFieldDefn::GetPrecision().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to get precision from.\n"
		"\n"
		"the precision. \n"
		""},
	 { (char *)"FieldDefn_SetPrecision", _wrap_FieldDefn_SetPrecision, METH_VARARGS, (char *)"\n"
		"FieldDefn_SetPrecision(FieldDefn self, int precision)\n"
		"\n"
		"void\n"
		"OGR_Fld_SetPrecision(OGRFieldDefnH hDefn, int nPrecision)\n"
		"\n"
		"Set the formatting precision for this field in characters.\n"
		"\n"
		"This should normally be zero for fields of types other than OFTReal.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRFieldDefn::SetPrecision().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to set precision to.\n"
		"\n"
		"nPrecision:  the new precision. \n"
		""},
	 { (char *)"FieldDefn_GetTypeName", _wrap_FieldDefn_GetTypeName, METH_VARARGS, (char *)"FieldDefn_GetTypeName(FieldDefn self) -> char const *"},
	 { (char *)"FieldDefn_GetFieldTypeName", _wrap_FieldDefn_GetFieldTypeName, METH_VARARGS, (char *)"FieldDefn_GetFieldTypeName(FieldDefn self, OGRFieldType type) -> char const *"},
	 { (char *)"FieldDefn_IsIgnored", _wrap_FieldDefn_IsIgnored, METH_VARARGS, (char *)"\n"
		"FieldDefn_IsIgnored(FieldDefn self) -> int\n"
		"\n"
		"int OGR_Fld_IsIgnored(OGRFieldDefnH\n"
		"hDefn)\n"
		"\n"
		"Return whether this field should be omitted when fetching features.\n"
		"\n"
		"This method is the same as the C++ method OGRFieldDefn::IsIgnored().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition\n"
		"\n"
		"ignore state \n"
		""},
	 { (char *)"FieldDefn_SetIgnored", _wrap_FieldDefn_SetIgnored, METH_VARARGS, (char *)"\n"
		"FieldDefn_SetIgnored(FieldDefn self, int bIgnored)\n"
		"\n"
		"void\n"
		"OGR_Fld_SetIgnored(OGRFieldDefnH hDefn, int ignore)\n"
		"\n"
		"Set whether this field should be omitted when fetching features.\n"
		"\n"
		"This method is the same as the C++ method OGRFieldDefn::SetIgnored().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition\n"
		"\n"
		"ignore:  ignore state \n"
		""},
	 { (char *)"FieldDefn_IsNullable", _wrap_FieldDefn_IsNullable, METH_VARARGS, (char *)"\n"
		"FieldDefn_IsNullable(FieldDefn self) -> int\n"
		"\n"
		"int\n"
		"OGR_Fld_IsNullable(OGRFieldDefnH hDefn)\n"
		"\n"
		"Return whether this field can receive null values.\n"
		"\n"
		"By default, fields are nullable.\n"
		"\n"
		"Even if this method returns FALSE (i.e not-nullable field), it doesn't\n"
		"mean that OGRFeature::IsFieldSet() will necessary return TRUE, as\n"
		"fields can be temporary unset and null /not-null validation is usually\n"
		"done when OGRLayer::CreateFeature()/SetFeature() is called.\n"
		"\n"
		"This method is the same as the C++ method OGRFieldDefn::IsNullable().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition\n"
		"\n"
		"TRUE if the field is authorized to be null.\n"
		"\n"
		"GDAL 2.0 \n"
		""},
	 { (char *)"FieldDefn_SetNullable", _wrap_FieldDefn_SetNullable, METH_VARARGS, (char *)"\n"
		"FieldDefn_SetNullable(FieldDefn self, int bNullable)\n"
		"\n"
		"void\n"
		"OGR_Fld_SetNullable(OGRFieldDefnH hDefn, int bNullableIn)\n"
		"\n"
		"Set whether this field can receive null values.\n"
		"\n"
		"By default, fields are nullable, so this method is generally called\n"
		"with FALSE to set a not-null constraint.\n"
		"\n"
		"Drivers that support writing not-null constraint will advertize the\n"
		"GDAL_DCAP_NOTNULL_FIELDS driver metadata item.\n"
		"\n"
		"This method is the same as the C++ method OGRFieldDefn::SetNullable().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition\n"
		"\n"
		"bNullableIn:  FALSE if the field must have a not-null constraint.\n"
		"\n"
		"GDAL 2.0 \n"
		""},
	 { (char *)"FieldDefn_GetDefault", _wrap_FieldDefn_GetDefault, METH_VARARGS, (char *)"\n"
		"FieldDefn_GetDefault(FieldDefn self) -> char const *\n"
		"\n"
		"const char*\n"
		"OGR_Fld_GetDefault(OGRFieldDefnH hDefn)\n"
		"\n"
		"Get default field value.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFieldDefn::GetDefault().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition.\n"
		"\n"
		"default field value or NULL.\n"
		"\n"
		"GDAL 2.0 \n"
		""},
	 { (char *)"FieldDefn_SetDefault", _wrap_FieldDefn_SetDefault, METH_VARARGS, (char *)"\n"
		"FieldDefn_SetDefault(FieldDefn self, char const * pszValue)\n"
		"\n"
		"void\n"
		"OGR_Fld_SetDefault(OGRFieldDefnH hDefn, const char *pszDefault)\n"
		"\n"
		"Set default field value.\n"
		"\n"
		"The default field value is taken into account by drivers (generally\n"
		"those with a SQL interface) that support it at field creation time.\n"
		"OGR will generally not automatically set the default field value to\n"
		"null fields by itself when calling OGRFeature::CreateFeature() /\n"
		"OGRFeature::SetFeature(), but will let the low-level layers to do the\n"
		"job. So retrieving the feature from the layer is recommended.\n"
		"\n"
		"The accepted values are NULL, a numeric value, a literal value\n"
		"enclosed between single quote characters (and inner single quote\n"
		"characters escaped by repetition of the single quote character),\n"
		"CURRENT_TIMESTAMP, CURRENT_TIME, CURRENT_DATE or a driver specific\n"
		"expression (that might be ignored by other drivers). For a datetime\n"
		"literal value, format should be 'YYYY/MM/DD HH:MM:SS[.sss]'\n"
		"(considered as UTC time).\n"
		"\n"
		"Drivers that support writing DEFAULT clauses will advertize the\n"
		"GDAL_DCAP_DEFAULT_FIELDS driver metadata item.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFieldDefn::SetDefault().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition.\n"
		"\n"
		"pszDefault:  new default field value or NULL pointer.\n"
		"\n"
		"GDAL 2.0 \n"
		""},
	 { (char *)"FieldDefn_IsDefaultDriverSpecific", _wrap_FieldDefn_IsDefaultDriverSpecific, METH_VARARGS, (char *)"\n"
		"FieldDefn_IsDefaultDriverSpecific(FieldDefn self) -> int\n"
		"\n"
		"int\n"
		"OGR_Fld_IsDefaultDriverSpecific(OGRFieldDefnH hDefn)\n"
		"\n"
		"Returns whether the default value is driver specific.\n"
		"\n"
		"Driver specific default values are those that are not NULL, a numeric\n"
		"value, a literal value enclosed between single quote characters,\n"
		"CURRENT_TIMESTAMP, CURRENT_TIME, CURRENT_DATE or datetime literal\n"
		"value.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFieldDefn::IsDefaultDriverSpecific().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition\n"
		"\n"
		"TRUE if the default value is driver specific.\n"
		"\n"
		"GDAL 2.0 \n"
		""},
	 { (char *)"FieldDefn_swigregister", FieldDefn_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_GeomFieldDefn", _wrap_delete_GeomFieldDefn, METH_VARARGS, (char *)"delete_GeomFieldDefn(GeomFieldDefn self)"},
	 { (char *)"new_GeomFieldDefn", (PyCFunction) _wrap_new_GeomFieldDefn, METH_VARARGS | METH_KEYWORDS, (char *)"new_GeomFieldDefn(char const * name_null_ok, OGRwkbGeometryType field_type) -> GeomFieldDefn"},
	 { (char *)"GeomFieldDefn_GetName", _wrap_GeomFieldDefn_GetName, METH_VARARGS, (char *)"GeomFieldDefn_GetName(GeomFieldDefn self) -> char const *"},
	 { (char *)"GeomFieldDefn_GetNameRef", _wrap_GeomFieldDefn_GetNameRef, METH_VARARGS, (char *)"GeomFieldDefn_GetNameRef(GeomFieldDefn self) -> char const *"},
	 { (char *)"GeomFieldDefn_SetName", _wrap_GeomFieldDefn_SetName, METH_VARARGS, (char *)"GeomFieldDefn_SetName(GeomFieldDefn self, char const * name)"},
	 { (char *)"GeomFieldDefn_GetType", _wrap_GeomFieldDefn_GetType, METH_VARARGS, (char *)"GeomFieldDefn_GetType(GeomFieldDefn self) -> OGRwkbGeometryType"},
	 { (char *)"GeomFieldDefn_SetType", _wrap_GeomFieldDefn_SetType, METH_VARARGS, (char *)"GeomFieldDefn_SetType(GeomFieldDefn self, OGRwkbGeometryType type)"},
	 { (char *)"GeomFieldDefn_GetSpatialRef", _wrap_GeomFieldDefn_GetSpatialRef, METH_VARARGS, (char *)"GeomFieldDefn_GetSpatialRef(GeomFieldDefn self) -> SpatialReference"},
	 { (char *)"GeomFieldDefn_SetSpatialRef", _wrap_GeomFieldDefn_SetSpatialRef, METH_VARARGS, (char *)"GeomFieldDefn_SetSpatialRef(GeomFieldDefn self, SpatialReference srs)"},
	 { (char *)"GeomFieldDefn_IsIgnored", _wrap_GeomFieldDefn_IsIgnored, METH_VARARGS, (char *)"GeomFieldDefn_IsIgnored(GeomFieldDefn self) -> int"},
	 { (char *)"GeomFieldDefn_SetIgnored", _wrap_GeomFieldDefn_SetIgnored, METH_VARARGS, (char *)"GeomFieldDefn_SetIgnored(GeomFieldDefn self, int bIgnored)"},
	 { (char *)"GeomFieldDefn_IsNullable", _wrap_GeomFieldDefn_IsNullable, METH_VARARGS, (char *)"GeomFieldDefn_IsNullable(GeomFieldDefn self) -> int"},
	 { (char *)"GeomFieldDefn_SetNullable", _wrap_GeomFieldDefn_SetNullable, METH_VARARGS, (char *)"GeomFieldDefn_SetNullable(GeomFieldDefn self, int bNullable)"},
	 { (char *)"GeomFieldDefn_swigregister", GeomFieldDefn_swigregister, METH_VARARGS, NULL},
	 { (char *)"CreateGeometryFromWkb", (PyCFunction) _wrap_CreateGeometryFromWkb, METH_VARARGS | METH_KEYWORDS, (char *)"CreateGeometryFromWkb(int len, SpatialReference reference=None) -> Geometry"},
	 { (char *)"CreateGeometryFromWkt", (PyCFunction) _wrap_CreateGeometryFromWkt, METH_VARARGS | METH_KEYWORDS, (char *)"CreateGeometryFromWkt(char ** val, SpatialReference reference=None) -> Geometry"},
	 { (char *)"CreateGeometryFromGML", _wrap_CreateGeometryFromGML, METH_VARARGS, (char *)"CreateGeometryFromGML(char const * input_string) -> Geometry"},
	 { (char *)"CreateGeometryFromJson", _wrap_CreateGeometryFromJson, METH_VARARGS, (char *)"CreateGeometryFromJson(char const * input_string) -> Geometry"},
	 { (char *)"BuildPolygonFromEdges", (PyCFunction) _wrap_BuildPolygonFromEdges, METH_VARARGS | METH_KEYWORDS, (char *)"BuildPolygonFromEdges(Geometry hLineCollection, int bBestEffort=0, int bAutoClose=0, double dfTolerance=0) -> Geometry"},
	 { (char *)"ApproximateArcAngles", (PyCFunction) _wrap_ApproximateArcAngles, METH_VARARGS | METH_KEYWORDS, (char *)"ApproximateArcAngles(double dfCenterX, double dfCenterY, double dfZ, double dfPrimaryRadius, double dfSecondaryAxis, double dfRotation, double dfStartAngle, double dfEndAngle, double dfMaxAngleStepSizeDegrees) -> Geometry"},
	 { (char *)"ForceToPolygon", _wrap_ForceToPolygon, METH_VARARGS, (char *)"ForceToPolygon(Geometry geom_in) -> Geometry"},
	 { (char *)"ForceToLineString", _wrap_ForceToLineString, METH_VARARGS, (char *)"ForceToLineString(Geometry geom_in) -> Geometry"},
	 { (char *)"ForceToMultiPolygon", _wrap_ForceToMultiPolygon, METH_VARARGS, (char *)"ForceToMultiPolygon(Geometry geom_in) -> Geometry"},
	 { (char *)"ForceToMultiPoint", _wrap_ForceToMultiPoint, METH_VARARGS, (char *)"ForceToMultiPoint(Geometry geom_in) -> Geometry"},
	 { (char *)"ForceToMultiLineString", _wrap_ForceToMultiLineString, METH_VARARGS, (char *)"ForceToMultiLineString(Geometry geom_in) -> Geometry"},
	 { (char *)"ForceTo", _wrap_ForceTo, METH_VARARGS, (char *)"ForceTo(Geometry geom_in, OGRwkbGeometryType eTargetType, char ** options=None) -> Geometry"},
	 { (char *)"delete_Geometry", _wrap_delete_Geometry, METH_VARARGS, (char *)"delete_Geometry(Geometry self)"},
	 { (char *)"new_Geometry", (PyCFunction) _wrap_new_Geometry, METH_VARARGS | METH_KEYWORDS, (char *)"new_Geometry(OGRwkbGeometryType type, char * wkt=None, int wkb=0, char * gml=None) -> Geometry"},
	 { (char *)"Geometry_ExportToWkt", _wrap_Geometry_ExportToWkt, METH_VARARGS, (char *)"\n"
		"Geometry_ExportToWkt(Geometry self) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_G_ExportToWkt(OGRGeometryH hGeom, char **ppszSrcText)\n"
		"\n"
		"Convert a geometry into well known text format.\n"
		"\n"
		"This function relates to the SFCOM IWks::ExportToWKT() method.\n"
		"\n"
		"For backward compatibility purposes, it exports the Old-style 99-402\n"
		"extended dimension (Z) WKB types for types Point, LineString, Polygon,\n"
		"MultiPoint, MultiLineString, MultiPolygon and GeometryCollection. For\n"
		"other geometry types, it is equivalent to OGR_G_ExportToIsoWkt().\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::exportToWkt().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to convert to a text format from.\n"
		"\n"
		"ppszSrcText:  a text buffer is allocated by the program, and assigned\n"
		"to the passed pointer. After use, *ppszDstText should be freed with\n"
		"CPLFree().\n"
		"\n"
		"Currently OGRERR_NONE is always returned. \n"
		""},
	 { (char *)"Geometry_ExportToIsoWkt", _wrap_Geometry_ExportToIsoWkt, METH_VARARGS, (char *)"\n"
		"Geometry_ExportToIsoWkt(Geometry self) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_G_ExportToIsoWkt(OGRGeometryH hGeom, char **ppszSrcText)\n"
		"\n"
		"Convert a geometry into SFSQL 1.2 / ISO SQL/MM Part 3 well known text\n"
		"format.\n"
		"\n"
		"This function relates to the SFCOM IWks::ExportToWKT() method. It\n"
		"exports the SFSQL 1.2 and ISO SQL/MM Part 3 extended dimension (Z&M)\n"
		"WKB types.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::exportToWkt(wkbVariantIso).\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to convert to a text format from.\n"
		"\n"
		"ppszSrcText:  a text buffer is allocated by the program, and assigned\n"
		"to the passed pointer. After use, *ppszDstText should be freed with\n"
		"CPLFree().\n"
		"\n"
		"Currently OGRERR_NONE is always returned.\n"
		"\n"
		"GDAL 2.0 \n"
		""},
	 { (char *)"Geometry_ExportToWkb", (PyCFunction) _wrap_Geometry_ExportToWkb, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Geometry_ExportToWkb(Geometry self, OGRwkbByteOrder byte_order) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_G_ExportToWkb(OGRGeometryH hGeom, OGRwkbByteOrder eOrder, unsigned\n"
		"char *pabyDstBuffer)\n"
		"\n"
		"Convert a geometry well known binary format.\n"
		"\n"
		"This function relates to the SFCOM IWks::ExportToWKB() method.\n"
		"\n"
		"For backward compatibility purposes, it exports the Old-style 99-402\n"
		"extended dimension (Z) WKB types for types Point, LineString, Polygon,\n"
		"MultiPoint, MultiLineString, MultiPolygon and GeometryCollection. For\n"
		"other geometry types, it is equivalent to OGR_G_ExportToIsoWkb().\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::exportToWkb(OGRwkbByteOrder, unsigned char *,\n"
		"OGRwkbVariant) with eWkbVariant = wkbVariantOldOgc.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to convert to a well know binary data\n"
		"from.\n"
		"\n"
		"eOrder:  One of wkbXDR or wkbNDR indicating MSB or LSB byte order\n"
		"respectively.\n"
		"\n"
		"pabyDstBuffer:  a buffer into which the binary representation is\n"
		"written. This buffer must be at least OGR_G_WkbSize() byte in size.\n"
		"\n"
		"Currently OGRERR_NONE is always returned. \n"
		""},
	 { (char *)"Geometry_ExportToIsoWkb", (PyCFunction) _wrap_Geometry_ExportToIsoWkb, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Geometry_ExportToIsoWkb(Geometry self, OGRwkbByteOrder byte_order) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_G_ExportToIsoWkb(OGRGeometryH hGeom, OGRwkbByteOrder eOrder,\n"
		"unsigned char *pabyDstBuffer)\n"
		"\n"
		"Convert a geometry into SFSQL 1.2 / ISO SQL/MM Part 3 well known\n"
		"binary format.\n"
		"\n"
		"This function relates to the SFCOM IWks::ExportToWKB() method. It\n"
		"exports the SFSQL 1.2 and ISO SQL/MM Part 3 extended dimension (Z&M)\n"
		"WKB types.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::exportToWkb(OGRwkbByteOrder, unsigned char *,\n"
		"OGRwkbVariant) with eWkbVariant = wkbVariantIso.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to convert to a well know binary data\n"
		"from.\n"
		"\n"
		"eOrder:  One of wkbXDR or wkbNDR indicating MSB or LSB byte order\n"
		"respectively.\n"
		"\n"
		"pabyDstBuffer:  a buffer into which the binary representation is\n"
		"written. This buffer must be at least OGR_G_WkbSize() byte in size.\n"
		"\n"
		"Currently OGRERR_NONE is always returned.\n"
		"\n"
		"GDAL 2.0 \n"
		""},
	 { (char *)"Geometry_ExportToGML", (PyCFunction) _wrap_Geometry_ExportToGML, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_ExportToGML(Geometry self, char ** options=None) -> retStringAndCPLFree *"},
	 { (char *)"Geometry_ExportToKML", _wrap_Geometry_ExportToKML, METH_VARARGS, (char *)"Geometry_ExportToKML(Geometry self, char const * altitude_mode=None) -> retStringAndCPLFree *"},
	 { (char *)"Geometry_ExportToJson", (PyCFunction) _wrap_Geometry_ExportToJson, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_ExportToJson(Geometry self, char ** options=None) -> retStringAndCPLFree *"},
	 { (char *)"Geometry_AddPoint", (PyCFunction) _wrap_Geometry_AddPoint, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_AddPoint(Geometry self, double x, double y, double z=0)"},
	 { (char *)"Geometry_AddPointM", (PyCFunction) _wrap_Geometry_AddPointM, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_AddPointM(Geometry self, double x, double y, double m)"},
	 { (char *)"Geometry_AddPointZM", (PyCFunction) _wrap_Geometry_AddPointZM, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_AddPointZM(Geometry self, double x, double y, double z, double m)"},
	 { (char *)"Geometry_AddPoint_2D", _wrap_Geometry_AddPoint_2D, METH_VARARGS, (char *)"Geometry_AddPoint_2D(Geometry self, double x, double y)"},
	 { (char *)"Geometry_AddGeometryDirectly", _wrap_Geometry_AddGeometryDirectly, METH_VARARGS, (char *)"Geometry_AddGeometryDirectly(Geometry self, Geometry other_disown) -> OGRErr"},
	 { (char *)"Geometry_AddGeometry", _wrap_Geometry_AddGeometry, METH_VARARGS, (char *)"Geometry_AddGeometry(Geometry self, Geometry other) -> OGRErr"},
	 { (char *)"Geometry_RemoveGeometry", _wrap_Geometry_RemoveGeometry, METH_VARARGS, (char *)"Geometry_RemoveGeometry(Geometry self, int iSubGeom) -> OGRErr"},
	 { (char *)"Geometry_Clone", _wrap_Geometry_Clone, METH_VARARGS, (char *)"\n"
		"Geometry_Clone(Geometry self) -> Geometry\n"
		"\n"
		"OGRGeometryH OGR_G_Clone(OGRGeometryH\n"
		"hGeom)\n"
		"\n"
		"Make a copy of this object.\n"
		"\n"
		"This function relates to the SFCOM IGeometry::clone() method.\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::clone().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to clone from.\n"
		"\n"
		"an handle on the copy of the geometry with the spatial reference\n"
		"system as the original. \n"
		""},
	 { (char *)"Geometry_GetGeometryType", _wrap_Geometry_GetGeometryType, METH_VARARGS, (char *)"\n"
		"Geometry_GetGeometryType(Geometry self) -> OGRwkbGeometryType\n"
		"\n"
		"OGRwkbGeometryType\n"
		"OGR_G_GetGeometryType(OGRGeometryH hGeom)\n"
		"\n"
		"Fetch geometry type.\n"
		"\n"
		"Note that the geometry type may include the 2.5D flag. To get a 2D\n"
		"flattened version of the geometry type apply the wkbFlatten() macro to\n"
		"the return result.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::getGeometryType().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to get type from.\n"
		"\n"
		"the geometry type code. \n"
		""},
	 { (char *)"Geometry_GetGeometryName", _wrap_Geometry_GetGeometryName, METH_VARARGS, (char *)"\n"
		"Geometry_GetGeometryName(Geometry self) -> char const *\n"
		"\n"
		"const char*\n"
		"OGR_G_GetGeometryName(OGRGeometryH hGeom)\n"
		"\n"
		"Fetch WKT name for geometry type.\n"
		"\n"
		"There is no SFCOM analog to this function.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::getGeometryName().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to get name from.\n"
		"\n"
		"name used for this geometry type in well known text format. \n"
		""},
	 { (char *)"Geometry_Length", _wrap_Geometry_Length, METH_VARARGS, (char *)"Geometry_Length(Geometry self) -> double"},
	 { (char *)"Geometry_Area", _wrap_Geometry_Area, METH_VARARGS, (char *)"Geometry_Area(Geometry self) -> double"},
	 { (char *)"Geometry_GetArea", _wrap_Geometry_GetArea, METH_VARARGS, (char *)"Geometry_GetArea(Geometry self) -> double"},
	 { (char *)"Geometry_GetPointCount", _wrap_Geometry_GetPointCount, METH_VARARGS, (char *)"Geometry_GetPointCount(Geometry self) -> int"},
	 { (char *)"Geometry_GetPoints", (PyCFunction) _wrap_Geometry_GetPoints, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetPoints(Geometry self, int nCoordDimension=0)"},
	 { (char *)"Geometry_GetX", (PyCFunction) _wrap_Geometry_GetX, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetX(Geometry self, int point=0) -> double"},
	 { (char *)"Geometry_GetY", (PyCFunction) _wrap_Geometry_GetY, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetY(Geometry self, int point=0) -> double"},
	 { (char *)"Geometry_GetZ", (PyCFunction) _wrap_Geometry_GetZ, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetZ(Geometry self, int point=0) -> double"},
	 { (char *)"Geometry_GetM", (PyCFunction) _wrap_Geometry_GetM, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetM(Geometry self, int point=0) -> double"},
	 { (char *)"Geometry_GetPoint", _wrap_Geometry_GetPoint, METH_VARARGS, (char *)"Geometry_GetPoint(Geometry self, int iPoint=0)"},
	 { (char *)"Geometry_GetPointZM", _wrap_Geometry_GetPointZM, METH_VARARGS, (char *)"Geometry_GetPointZM(Geometry self, int iPoint=0)"},
	 { (char *)"Geometry_GetPoint_2D", _wrap_Geometry_GetPoint_2D, METH_VARARGS, (char *)"Geometry_GetPoint_2D(Geometry self, int iPoint=0)"},
	 { (char *)"Geometry_GetGeometryCount", _wrap_Geometry_GetGeometryCount, METH_VARARGS, (char *)"Geometry_GetGeometryCount(Geometry self) -> int"},
	 { (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)"},
	 { (char *)"Geometry_SetPointM", (PyCFunction) _wrap_Geometry_SetPointM, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_SetPointM(Geometry self, int point, double x, double y, double m)"},
	 { (char *)"Geometry_SetPointZM", (PyCFunction) _wrap_Geometry_SetPointZM, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_SetPointZM(Geometry self, int point, double x, double y, double z, double m)"},
	 { (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)"},
	 { (char *)"Geometry_SwapXY", _wrap_Geometry_SwapXY, METH_VARARGS, (char *)"\n"
		"Geometry_SwapXY(Geometry self)\n"
		"\n"
		"void OGR_G_SwapXY(OGRGeometryH hGeom)\n"
		"\n"
		"Swap x and y coordinates.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  geometry.\n"
		"\n"
		"OGR 2.3.0 \n"
		""},
	 { (char *)"Geometry_GetGeometryRef", _wrap_Geometry_GetGeometryRef, METH_VARARGS, (char *)"Geometry_GetGeometryRef(Geometry self, int geom) -> Geometry"},
	 { (char *)"Geometry_Simplify", _wrap_Geometry_Simplify, METH_VARARGS, (char *)"\n"
		"Geometry_Simplify(Geometry self, double tolerance) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_Simplify(OGRGeometryH hThis, double dTolerance)\n"
		"\n"
		"Compute a simplified geometry.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Simplify().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry.\n"
		"\n"
		"dTolerance:  the distance tolerance for the simplification.\n"
		"\n"
		"the simplified geometry or NULL if an error occurs.\n"
		"\n"
		"OGR 1.8.0 \n"
		""},
	 { (char *)"Geometry_SimplifyPreserveTopology", _wrap_Geometry_SimplifyPreserveTopology, METH_VARARGS, (char *)"\n"
		"Geometry_SimplifyPreserveTopology(Geometry self, double tolerance) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_SimplifyPreserveTopology(OGRGeometryH hThis, double dTolerance)\n"
		"\n"
		"Simplify the geometry while preserving topology.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRGeometry::SimplifyPreserveTopology().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry.\n"
		"\n"
		"dTolerance:  the distance tolerance for the simplification.\n"
		"\n"
		"the simplified geometry or NULL if an error occurs.\n"
		"\n"
		"OGR 1.9.0 \n"
		""},
	 { (char *)"Geometry_DelaunayTriangulation", (PyCFunction) _wrap_Geometry_DelaunayTriangulation, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Geometry_DelaunayTriangulation(Geometry self, double dfTolerance=0.0, int bOnlyEdges=False) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_DelaunayTriangulation(OGRGeometryH hThis, double dfTolerance,\n"
		"int bOnlyEdges)\n"
		"\n"
		"Return a Delaunay triangulation of the vertices of the geometry.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRGeometry::DelaunayTriangulation().\n"
		"\n"
		"This function is built on the GEOS library, v3.4 or above. If OGR is\n"
		"built without the GEOS library, this function will always fail,\n"
		"issuing a CPLE_NotSupported error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry.\n"
		"\n"
		"dfTolerance:  optional snapping tolerance to use for improved\n"
		"robustness\n"
		"\n"
		"bOnlyEdges:  if TRUE, will return a MULTILINESTRING, otherwise it will\n"
		"return a GEOMETRYCOLLECTION containing triangular POLYGONs.\n"
		"\n"
		"the geometry resulting from the Delaunay triangulation or NULL if an\n"
		"error occurs.\n"
		"\n"
		"OGR 2.1 \n"
		""},
	 { (char *)"Geometry_Polygonize", _wrap_Geometry_Polygonize, METH_VARARGS, (char *)"\n"
		"Geometry_Polygonize(Geometry self) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_Polygonize(OGRGeometryH hTarget)\n"
		"\n"
		"Polygonizes a set of sparse edges.\n"
		"\n"
		"A new geometry object is created and returned containing a collection\n"
		"of reassembled Polygons: NULL will be returned if the input collection\n"
		"doesn't corresponds to a MultiLinestring, or when reassembling Edges\n"
		"into Polygons is impossible due to topological inconsistencies.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Polygonize().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hTarget:  The Geometry to be polygonized.\n"
		"\n"
		"a handle to a newly allocated geometry now owned by the caller, or\n"
		"NULL on failure.\n"
		"\n"
		"OGR 1.9.0 \n"
		""},
	 { (char *)"Geometry_Boundary", _wrap_Geometry_Boundary, METH_VARARGS, (char *)"\n"
		"Geometry_Boundary(Geometry self) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_Boundary(OGRGeometryH hTarget)\n"
		"\n"
		"Compute boundary.\n"
		"\n"
		"A new geometry object is created and returned containing the boundary\n"
		"of the geometry on which the method is invoked.\n"
		"\n"
		"This function is the same as the C++ method OGR_G_Boundary().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hTarget:  The Geometry to calculate the boundary of.\n"
		"\n"
		"a handle to a newly allocated geometry now owned by the caller, or\n"
		"NULL on failure.\n"
		"\n"
		"OGR 1.8.0 \n"
		""},
	 { (char *)"Geometry_GetBoundary", _wrap_Geometry_GetBoundary, METH_VARARGS, (char *)"\n"
		"Geometry_GetBoundary(Geometry self) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_GetBoundary(OGRGeometryH hTarget)\n"
		"\n"
		"Compute boundary (deprecated)\n"
		"\n"
		"Deprecated\n"
		"\n"
		"See:   OGR_G_Boundary() \n"
		""},
	 { (char *)"Geometry_ConvexHull", _wrap_Geometry_ConvexHull, METH_VARARGS, (char *)"\n"
		"Geometry_ConvexHull(Geometry self) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_ConvexHull(OGRGeometryH hTarget)\n"
		"\n"
		"Compute convex hull.\n"
		"\n"
		"A new geometry object is created and returned containing the convex\n"
		"hull of the geometry on which the method is invoked.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::ConvexHull().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hTarget:  The Geometry to calculate the convex hull of.\n"
		"\n"
		"a handle to a newly allocated geometry now owned by the caller, or\n"
		"NULL on failure. \n"
		""},
	 { (char *)"Geometry_Buffer", (PyCFunction) _wrap_Geometry_Buffer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Geometry_Buffer(Geometry self, double distance, int quadsecs=30) -> Geometry\n"
		"\n"
		"OGRGeometryH OGR_G_Buffer(OGRGeometryH\n"
		"hTarget, double dfDist, int nQuadSegs)\n"
		"\n"
		"Compute buffer of geometry.\n"
		"\n"
		"Builds a new geometry containing the buffer region around the geometry\n"
		"on which it is invoked. The buffer is a polygon containing the region\n"
		"within the buffer distance of the original geometry.\n"
		"\n"
		"Some buffer sections are properly described as curves, but are\n"
		"converted to approximate polygons. The nQuadSegs parameter can be used\n"
		"to control how many segments should be used to define a 90 degree\n"
		"curve - a quadrant of a circle. A value of 30 is a reasonable default.\n"
		"Large values result in large numbers of vertices in the resulting\n"
		"buffer geometry while small numbers reduce the accuracy of the result.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Buffer().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hTarget:  the geometry.\n"
		"\n"
		"dfDist:  the buffer distance to be applied. Should be expressed into\n"
		"the same unit as the coordinates of the geometry.\n"
		"\n"
		"nQuadSegs:  the number of segments used to approximate a 90 degree\n"
		"(quadrant) of curvature.\n"
		"\n"
		"the newly created geometry, or NULL if an error occurs. \n"
		""},
	 { (char *)"Geometry_Intersection", _wrap_Geometry_Intersection, METH_VARARGS, (char *)"\n"
		"Geometry_Intersection(Geometry self, Geometry other) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_Intersection(OGRGeometryH hThis, OGRGeometryH hOther)\n"
		"\n"
		"Compute intersection.\n"
		"\n"
		"Generates a new geometry which is the region of intersection of the\n"
		"two geometries operated on. The OGR_G_Intersects() function can be\n"
		"used to test if two geometries intersect.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRGeometry::Intersection().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry.\n"
		"\n"
		"hOther:  the other geometry.\n"
		"\n"
		"a new geometry representing the intersection or NULL if there is no\n"
		"intersection or an error occurs. \n"
		""},
	 { (char *)"Geometry_Union", _wrap_Geometry_Union, METH_VARARGS, (char *)"\n"
		"Geometry_Union(Geometry self, Geometry other) -> Geometry\n"
		"\n"
		"OGRGeometryH OGR_G_Union(OGRGeometryH\n"
		"hThis, OGRGeometryH hOther)\n"
		"\n"
		"Compute union.\n"
		"\n"
		"Generates a new geometry which is the region of union of the two\n"
		"geometries operated on.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Union().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry.\n"
		"\n"
		"hOther:  the other geometry.\n"
		"\n"
		"a new geometry representing the union or NULL if an error occurs. \n"
		""},
	 { (char *)"Geometry_UnionCascaded", _wrap_Geometry_UnionCascaded, METH_VARARGS, (char *)"\n"
		"Geometry_UnionCascaded(Geometry self) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_UnionCascaded(OGRGeometryH hThis)\n"
		"\n"
		"Compute union using cascading.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRGeometry::UnionCascaded().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry.\n"
		"\n"
		"a new geometry representing the union or NULL if an error occurs. \n"
		""},
	 { (char *)"Geometry_Difference", _wrap_Geometry_Difference, METH_VARARGS, (char *)"\n"
		"Geometry_Difference(Geometry self, Geometry other) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_Difference(OGRGeometryH hThis, OGRGeometryH hOther)\n"
		"\n"
		"Compute difference.\n"
		"\n"
		"Generates a new geometry which is the region of this geometry with the\n"
		"region of the other geometry removed.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Difference().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry.\n"
		"\n"
		"hOther:  the other geometry.\n"
		"\n"
		"a new geometry representing the difference or NULL if the difference\n"
		"is empty or an error occurs. \n"
		""},
	 { (char *)"Geometry_SymDifference", _wrap_Geometry_SymDifference, METH_VARARGS, (char *)"\n"
		"Geometry_SymDifference(Geometry self, Geometry other) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_SymDifference(OGRGeometryH hThis, OGRGeometryH hOther)\n"
		"\n"
		"Compute symmetric difference.\n"
		"\n"
		"Generates a new geometry which is the symmetric difference of this\n"
		"geometry and the other geometry.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRGeometry::SymmetricDifference().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry.\n"
		"\n"
		"hOther:  the other geometry.\n"
		"\n"
		"a new geometry representing the symmetric difference or NULL if the\n"
		"difference is empty or an error occurs.\n"
		"\n"
		"OGR 1.8.0 \n"
		""},
	 { (char *)"Geometry_SymmetricDifference", _wrap_Geometry_SymmetricDifference, METH_VARARGS, (char *)"\n"
		"Geometry_SymmetricDifference(Geometry self, Geometry other) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_SymmetricDifference(OGRGeometryH hThis, OGRGeometryH hOther)\n"
		"\n"
		"Compute symmetric difference (deprecated)\n"
		"\n"
		"Deprecated\n"
		"\n"
		"See:  OGR_G_SymmetricDifference() \n"
		""},
	 { (char *)"Geometry_Distance", _wrap_Geometry_Distance, METH_VARARGS, (char *)"\n"
		"Geometry_Distance(Geometry self, Geometry other) -> double\n"
		"\n"
		"double OGR_G_Distance(OGRGeometryH\n"
		"hFirst, OGRGeometryH hOther)\n"
		"\n"
		"Compute distance between two geometries.\n"
		"\n"
		"Returns the shortest distance between the two geometries. The distance\n"
		"is expressed into the same unit as the coordinates of the geometries.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Distance().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFirst:  the first geometry to compare against.\n"
		"\n"
		"hOther:  the other geometry to compare against.\n"
		"\n"
		"the distance between the geometries or -1 if an error occurs. \n"
		""},
	 { (char *)"Geometry_Distance3D", _wrap_Geometry_Distance3D, METH_VARARGS, (char *)"\n"
		"Geometry_Distance3D(Geometry self, Geometry other) -> double\n"
		"\n"
		"double\n"
		"OGR_G_Distance3D(OGRGeometryH hFirst, OGRGeometryH hOther)\n"
		"\n"
		"Returns the 3D distance between two geometries.\n"
		"\n"
		"The distance is expressed into the same unit as the coordinates of the\n"
		"geometries.\n"
		"\n"
		"This method is built on the SFCGAL library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the\n"
		"SFCGAL library, this method will always return -1.0\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Distance3D().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFirst:  the first geometry to compare against.\n"
		"\n"
		"hOther:  the other geometry to compare against.\n"
		"\n"
		"distance between the two geometries\n"
		"\n"
		"GDAL 2.2\n"
		"\n"
		"the distance between the geometries or -1 if an error occurs. \n"
		""},
	 { (char *)"Geometry_Empty", _wrap_Geometry_Empty, METH_VARARGS, (char *)"\n"
		"Geometry_Empty(Geometry self)\n"
		"\n"
		"void OGR_G_Empty(OGRGeometryH hGeom)\n"
		"\n"
		"Clear geometry information.\n"
		"\n"
		"This restores the geometry to it's initial state after construction,\n"
		"and before assignment of actual geometry.\n"
		"\n"
		"This function relates to the SFCOM IGeometry::Empty() method.\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::empty().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to empty. \n"
		""},
	 { (char *)"Geometry_IsEmpty", _wrap_Geometry_IsEmpty, METH_VARARGS, (char *)"\n"
		"Geometry_IsEmpty(Geometry self) -> bool\n"
		"\n"
		"int OGR_G_IsEmpty(OGRGeometryH hGeom)\n"
		"\n"
		"Test if the geometry is empty.\n"
		"\n"
		"This method is the same as the CPP method OGRGeometry::IsEmpty().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  The Geometry to test.\n"
		"\n"
		"TRUE if the geometry has no points, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_IsValid", _wrap_Geometry_IsValid, METH_VARARGS, (char *)"\n"
		"Geometry_IsValid(Geometry self) -> bool\n"
		"\n"
		"int OGR_G_IsValid(OGRGeometryH hGeom)\n"
		"\n"
		"Test if the geometry is valid.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::IsValid().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always return FALSE.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  The Geometry to test.\n"
		"\n"
		"TRUE if the geometry has no points, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_IsSimple", _wrap_Geometry_IsSimple, METH_VARARGS, (char *)"\n"
		"Geometry_IsSimple(Geometry self) -> bool\n"
		"\n"
		"int OGR_G_IsSimple(OGRGeometryH\n"
		"hGeom)\n"
		"\n"
		"Returns TRUE if the geometry is simple.\n"
		"\n"
		"Returns TRUE if the geometry has no anomalous geometric points, such\n"
		"as self intersection or self tangency. The description of each\n"
		"instantiable geometric class will include the specific conditions that\n"
		"cause an instance of that class to be classified as not simple.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::IsSimple()\n"
		"method.\n"
		"\n"
		"If OGR is built without the GEOS library, this function will always\n"
		"return FALSE.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  The Geometry to test.\n"
		"\n"
		"TRUE if object is simple, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_IsRing", _wrap_Geometry_IsRing, METH_VARARGS, (char *)"\n"
		"Geometry_IsRing(Geometry self) -> bool\n"
		"\n"
		"int OGR_G_IsRing(OGRGeometryH hGeom)\n"
		"\n"
		"Test if the geometry is a ring.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::IsRing().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always return FALSE.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  The Geometry to test.\n"
		"\n"
		"TRUE if the geometry has no points, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_Intersects", _wrap_Geometry_Intersects, METH_VARARGS, (char *)"\n"
		"Geometry_Intersects(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Intersects(OGRGeometryH\n"
		"hGeom, OGRGeometryH hOtherGeom)\n"
		"\n"
		"Do these features intersect?\n"
		"\n"
		"Determines whether two geometries intersect. If GEOS is enabled, then\n"
		"this is done in rigorous fashion otherwise TRUE is returned if the\n"
		"envelopes (bounding boxes) of the two geometries overlap.\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::Intersects.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the first geometry.\n"
		"\n"
		"hOtherGeom:  handle on the other geometry to test against.\n"
		"\n"
		"TRUE if the geometries intersect, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_Intersect", _wrap_Geometry_Intersect, METH_VARARGS, (char *)"Geometry_Intersect(Geometry self, Geometry other) -> bool"},
	 { (char *)"Geometry_Equals", _wrap_Geometry_Equals, METH_VARARGS, (char *)"\n"
		"Geometry_Equals(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Equals(OGRGeometryH hGeom,\n"
		"OGRGeometryH hOther)\n"
		"\n"
		"Returns TRUE if two geometries are equivalent.\n"
		"\n"
		"This operation implements the SQL/MM ST_OrderingEquals() operation.\n"
		"\n"
		"The comparison is done in a structural way, that is to say that the\n"
		"geometry types must be identical, as well as the number and ordering\n"
		"of sub-geometries and vertices. Or equivalently, two geometries are\n"
		"considered equal by this method if their WKT/WKB representation is\n"
		"equal. Note: this must be distinguished for equality in a spatial way\n"
		"(which is the purpose of the ST_Equals() operation).\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::Equals()\n"
		"method.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the first geometry.\n"
		"\n"
		"hOther:  handle on the other geometry to test against.\n"
		"\n"
		"TRUE if equivalent or FALSE otherwise. \n"
		""},
	 { (char *)"Geometry_Equal", _wrap_Geometry_Equal, METH_VARARGS, (char *)"Geometry_Equal(Geometry self, Geometry other) -> bool"},
	 { (char *)"Geometry_Disjoint", _wrap_Geometry_Disjoint, METH_VARARGS, (char *)"\n"
		"Geometry_Disjoint(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Disjoint(OGRGeometryH\n"
		"hThis, OGRGeometryH hOther)\n"
		"\n"
		"Test for disjointness.\n"
		"\n"
		"Tests if this geometry and the other geometry are disjoint.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Disjoint().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry to compare.\n"
		"\n"
		"hOther:  the other geometry to compare.\n"
		"\n"
		"TRUE if they are disjoint, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_Touches", _wrap_Geometry_Touches, METH_VARARGS, (char *)"\n"
		"Geometry_Touches(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Touches(OGRGeometryH hThis,\n"
		"OGRGeometryH hOther)\n"
		"\n"
		"Test for touching.\n"
		"\n"
		"Tests if this geometry and the other geometry are touching.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Touches().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry to compare.\n"
		"\n"
		"hOther:  the other geometry to compare.\n"
		"\n"
		"TRUE if they are touching, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_Crosses", _wrap_Geometry_Crosses, METH_VARARGS, (char *)"\n"
		"Geometry_Crosses(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Crosses(OGRGeometryH hThis,\n"
		"OGRGeometryH hOther)\n"
		"\n"
		"Test for crossing.\n"
		"\n"
		"Tests if this geometry and the other geometry are crossing.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Crosses().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry to compare.\n"
		"\n"
		"hOther:  the other geometry to compare.\n"
		"\n"
		"TRUE if they are crossing, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_Within", _wrap_Geometry_Within, METH_VARARGS, (char *)"\n"
		"Geometry_Within(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Within(OGRGeometryH hThis,\n"
		"OGRGeometryH hOther)\n"
		"\n"
		"Test for containment.\n"
		"\n"
		"Tests if this geometry is within the other geometry.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Within().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry to compare.\n"
		"\n"
		"hOther:  the other geometry to compare.\n"
		"\n"
		"TRUE if hThis is within hOther, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_Contains", _wrap_Geometry_Contains, METH_VARARGS, (char *)"\n"
		"Geometry_Contains(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Contains(OGRGeometryH\n"
		"hThis, OGRGeometryH hOther)\n"
		"\n"
		"Test for containment.\n"
		"\n"
		"Tests if this geometry contains the other geometry.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Contains().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry to compare.\n"
		"\n"
		"hOther:  the other geometry to compare.\n"
		"\n"
		"TRUE if hThis contains hOther geometry, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_Overlaps", _wrap_Geometry_Overlaps, METH_VARARGS, (char *)"\n"
		"Geometry_Overlaps(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Overlaps(OGRGeometryH\n"
		"hThis, OGRGeometryH hOther)\n"
		"\n"
		"Test for overlap.\n"
		"\n"
		"Tests if this geometry and the other geometry overlap, that is their\n"
		"intersection has a non-zero area.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Overlaps().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry to compare.\n"
		"\n"
		"hOther:  the other geometry to compare.\n"
		"\n"
		"TRUE if they are overlapping, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_TransformTo", _wrap_Geometry_TransformTo, METH_VARARGS, (char *)"\n"
		"Geometry_TransformTo(Geometry self, SpatialReference reference) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_G_TransformTo(OGRGeometryH hGeom, OGRSpatialReferenceH hSRS)\n"
		"\n"
		"Transform geometry to new spatial reference system.\n"
		"\n"
		"This function will transform the coordinates of a geometry from their\n"
		"current spatial reference system to a new target spatial reference\n"
		"system. Normally this means reprojecting the vectors, but it could\n"
		"include datum shifts, and changes of units.\n"
		"\n"
		"This function will only work if the geometry already has an assigned\n"
		"spatial reference system, and if it is transformable to the target\n"
		"coordinate system.\n"
		"\n"
		"Because this function requires internal creation and initialization of\n"
		"an OGRCoordinateTransformation object it is significantly more\n"
		"expensive to use this function to transform many geometries than it is\n"
		"to create the OGRCoordinateTransformation in advance, and call\n"
		"transform() with that transformation. This function exists primarily\n"
		"for convenience when only transforming a single geometry.\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::transformTo.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to apply the transform to.\n"
		"\n"
		"hSRS:  handle on the spatial reference system to apply.\n"
		"\n"
		"OGRERR_NONE on success, or an error code. \n"
		""},
	 { (char *)"Geometry_Transform", _wrap_Geometry_Transform, METH_VARARGS, (char *)"\n"
		"Geometry_Transform(Geometry self, CoordinateTransformation trans) -> OGRErr\n"
		"\n"
		"OGRErr OGR_G_Transform(OGRGeometryH\n"
		"hGeom, OGRCoordinateTransformationH hTransform)\n"
		"\n"
		"Apply arbitrary coordinate transformation to geometry.\n"
		"\n"
		"This function will transform the coordinates of a geometry from their\n"
		"current spatial reference system to a new target spatial reference\n"
		"system. Normally this means reprojecting the vectors, but it could\n"
		"include datum shifts, and changes of units.\n"
		"\n"
		"Note that this function does not require that the geometry already\n"
		"have a spatial reference system. It will be assumed that they can be\n"
		"treated as having the source spatial reference system of the\n"
		"OGRCoordinateTransformation object, and the actual SRS of the geometry\n"
		"will be ignored. On successful completion the output\n"
		"OGRSpatialReference of the OGRCoordinateTransformation will be\n"
		"assigned to the geometry.\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::transform.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to apply the transform to.\n"
		"\n"
		"hTransform:  handle on the transformation to apply.\n"
		"\n"
		"OGRERR_NONE on success or an error code. \n"
		""},
	 { (char *)"Geometry_GetSpatialReference", _wrap_Geometry_GetSpatialReference, METH_VARARGS, (char *)"\n"
		"Geometry_GetSpatialReference(Geometry self) -> SpatialReference\n"
		"\n"
		"OGRSpatialReferenceH\n"
		"OGR_G_GetSpatialReference(OGRGeometryH hGeom)\n"
		"\n"
		"Returns spatial reference system for geometry.\n"
		"\n"
		"This function relates to the SFCOM IGeometry::get_SpatialReference()\n"
		"method.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::getSpatialReference().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to get spatial reference from.\n"
		"\n"
		"a reference to the spatial reference geometry. \n"
		""},
	 { (char *)"Geometry_AssignSpatialReference", _wrap_Geometry_AssignSpatialReference, METH_VARARGS, (char *)"\n"
		"Geometry_AssignSpatialReference(Geometry self, SpatialReference reference)\n"
		"\n"
		"void\n"
		"OGR_G_AssignSpatialReference(OGRGeometryH hGeom, OGRSpatialReferenceH\n"
		"hSRS)\n"
		"\n"
		"Assign spatial reference to this object.\n"
		"\n"
		"Any existing spatial reference is replaced, but under no circumstances\n"
		"does this result in the object being reprojected. It is just changing\n"
		"the interpretation of the existing geometry. Note that assigning a\n"
		"spatial reference increments the reference count on the\n"
		"OGRSpatialReference, but does not copy it.\n"
		"\n"
		"Starting with GDAL 2.3, this will also assign the spatial reference to\n"
		"potential sub-geometries of the geometry ( OGRGeometryCollection,\n"
		"OGRCurvePolygon/OGRPolygon, OGRCompoundCurve, OGRPolyhedralSurface and\n"
		"their derived classes).\n"
		"\n"
		"This is similar to the SFCOM IGeometry::put_SpatialReference() method.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::assignSpatialReference.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to apply the new spatial reference\n"
		"system.\n"
		"\n"
		"hSRS:  handle on the new spatial reference system to apply. \n"
		""},
	 { (char *)"Geometry_CloseRings", _wrap_Geometry_CloseRings, METH_VARARGS, (char *)"\n"
		"Geometry_CloseRings(Geometry self)\n"
		"\n"
		"void OGR_G_CloseRings(OGRGeometryH\n"
		"hGeom)\n"
		"\n"
		"Force rings to be closed.\n"
		"\n"
		"If this geometry, or any contained geometries has polygon rings that\n"
		"are not closed, they will be closed by adding the starting point at\n"
		"the end.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle to the geometry. \n"
		""},
	 { (char *)"Geometry_FlattenTo2D", _wrap_Geometry_FlattenTo2D, METH_VARARGS, (char *)"\n"
		"Geometry_FlattenTo2D(Geometry self)\n"
		"\n"
		"void\n"
		"OGR_G_FlattenTo2D(OGRGeometryH hGeom)\n"
		"\n"
		"Convert geometry to strictly 2D.\n"
		"\n"
		"In a sense this converts all Z coordinates to 0.0.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::flattenTo2D().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to convert. \n"
		""},
	 { (char *)"Geometry_Segmentize", _wrap_Geometry_Segmentize, METH_VARARGS, (char *)"\n"
		"Geometry_Segmentize(Geometry self, double dfMaxLength)\n"
		"\n"
		"void OGR_G_Segmentize(OGRGeometryH\n"
		"hGeom, double dfMaxLength)\n"
		"\n"
		"Modify the geometry such it has no segment longer then the given\n"
		"distance.\n"
		"\n"
		"Interpolated points will have Z and M values (if needed) set to 0.\n"
		"Distance computation is performed in 2d only.\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::segmentize().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to segmentize\n"
		"\n"
		"dfMaxLength:  the maximum distance between 2 points after\n"
		"segmentization \n"
		""},
	 { (char *)"Geometry_GetEnvelope", _wrap_Geometry_GetEnvelope, METH_VARARGS, (char *)"\n"
		"Geometry_GetEnvelope(Geometry self)\n"
		"\n"
		"void\n"
		"OGR_G_GetEnvelope(OGRGeometryH hGeom, OGREnvelope *psEnvelope)\n"
		"\n"
		"Computes and returns the bounding envelope for this geometry in the\n"
		"passed psEnvelope structure.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::getEnvelope().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle of the geometry to get envelope from.\n"
		"\n"
		"psEnvelope:  the structure in which to place the results. \n"
		""},
	 { (char *)"Geometry_GetEnvelope3D", _wrap_Geometry_GetEnvelope3D, METH_VARARGS, (char *)"\n"
		"Geometry_GetEnvelope3D(Geometry self)\n"
		"\n"
		"void\n"
		"OGR_G_GetEnvelope3D(OGRGeometryH hGeom, OGREnvelope3D *psEnvelope)\n"
		"\n"
		"Computes and returns the bounding envelope (3D) for this geometry in\n"
		"the passed psEnvelope structure.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::getEnvelope().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle of the geometry to get envelope from.\n"
		"\n"
		"psEnvelope:  the structure in which to place the results.\n"
		"\n"
		"OGR 1.9.0 \n"
		""},
	 { (char *)"Geometry_Centroid", _wrap_Geometry_Centroid, METH_VARARGS, (char *)"\n"
		"Geometry_Centroid(Geometry self) -> Geometry\n"
		"\n"
		"int OGR_G_Centroid(OGRGeometryH\n"
		"hGeom, OGRGeometryH hCentroidPoint)\n"
		"\n"
		"Compute the geometry centroid.\n"
		"\n"
		"The centroid location is applied to the passed in OGRPoint object. The\n"
		"centroid is not necessarily within the geometry.\n"
		"\n"
		"This method relates to the SFCOM ISurface::get_Centroid() method\n"
		"however the current implementation based on GEOS can operate on other\n"
		"geometry types such as multipoint, linestring, geometrycollection such\n"
		"as multipolygons. OGC SF SQL 1.1 defines the operation for surfaces\n"
		"(polygons). SQL/MM-Part 3 defines the operation for surfaces and\n"
		"multisurfaces (multipolygons).\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Centroid().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"OGRERR_NONE on success or OGRERR_FAILURE on error. \n"
		""},
	 { (char *)"Geometry_PointOnSurface", _wrap_Geometry_PointOnSurface, METH_VARARGS, (char *)"\n"
		"Geometry_PointOnSurface(Geometry self) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_PointOnSurface(OGRGeometryH hGeom)\n"
		"\n"
		"Returns a point guaranteed to lie on the surface.\n"
		"\n"
		"This method relates to the SFCOM ISurface::get_PointOnSurface() method\n"
		"however the current implementation based on GEOS can operate on other\n"
		"geometry types than the types that are supported by SQL/MM-Part 3 :\n"
		"surfaces (polygons) and multisurfaces (multipolygons).\n"
		"\n"
		"This method is built on the GEOS library, check it for the definition\n"
		"of the geometry operation. If OGR is built without the GEOS library,\n"
		"this method will always fail, issuing a CPLE_NotSupported error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  the geometry to operate on.\n"
		"\n"
		"a point guaranteed to lie on the surface or NULL if an error occurred.\n"
		"\n"
		"OGR 1.10 \n"
		""},
	 { (char *)"Geometry_WkbSize", _wrap_Geometry_WkbSize, METH_VARARGS, (char *)"\n"
		"Geometry_WkbSize(Geometry self) -> int\n"
		"\n"
		"int OGR_G_WkbSize(OGRGeometryH hGeom)\n"
		"\n"
		"Returns size of related binary representation.\n"
		"\n"
		"This function returns the exact number of bytes required to hold the\n"
		"well known binary representation of this geometry object. Its\n"
		"computation may be slightly expensive for complex geometries.\n"
		"\n"
		"This function relates to the SFCOM IWks::WkbSize() method.\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::WkbSize().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to get the binary size from.\n"
		"\n"
		"size of binary representation in bytes. \n"
		""},
	 { (char *)"Geometry_GetCoordinateDimension", _wrap_Geometry_GetCoordinateDimension, METH_VARARGS, (char *)"\n"
		"Geometry_GetCoordinateDimension(Geometry self) -> int\n"
		"\n"
		"int\n"
		"OGR_G_GetCoordinateDimension(OGRGeometryH hGeom)\n"
		"\n"
		"Get the dimension of the coordinates in this geometry.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::getCoordinateDimension().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to get the dimension of the coordinates\n"
		"from.\n"
		"\n"
		"Deprecated use OGR_G_CoordinateDimension(), OGR_G_Is3D(), or\n"
		"OGR_G_IsMeasured().\n"
		"\n"
		"this will return 2 or 3. \n"
		""},
	 { (char *)"Geometry_CoordinateDimension", _wrap_Geometry_CoordinateDimension, METH_VARARGS, (char *)"\n"
		"Geometry_CoordinateDimension(Geometry self) -> int\n"
		"\n"
		"int\n"
		"OGR_G_CoordinateDimension(OGRGeometryH hGeom)\n"
		"\n"
		"Get the dimension of the coordinates in this geometry.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::CoordinateDimension().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to get the dimension of the coordinates\n"
		"from.\n"
		"\n"
		"this will return 2 for XY, 3 for XYZ and XYM, and 4 for XYZM data.\n"
		"\n"
		"GDAL 2.1 \n"
		""},
	 { (char *)"Geometry_Is3D", _wrap_Geometry_Is3D, METH_VARARGS, (char *)"\n"
		"Geometry_Is3D(Geometry self) -> int\n"
		"\n"
		"int OGR_G_Is3D(OGRGeometryH hGeom)\n"
		"\n"
		"See whether this geometry has Z coordinates.\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::Is3D().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to check whether it has Z coordinates.\n"
		"\n"
		"TRUE if the geometry has Z coordinates.\n"
		"\n"
		"GDAL 2.1 \n"
		""},
	 { (char *)"Geometry_IsMeasured", _wrap_Geometry_IsMeasured, METH_VARARGS, (char *)"\n"
		"Geometry_IsMeasured(Geometry self) -> int\n"
		"\n"
		"int OGR_G_IsMeasured(OGRGeometryH\n"
		"hGeom)\n"
		"\n"
		"See whether this geometry is measured.\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::IsMeasured().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to check whether it is measured.\n"
		"\n"
		"TRUE if the geometry has M coordinates.\n"
		"\n"
		"GDAL 2.1 \n"
		""},
	 { (char *)"Geometry_SetCoordinateDimension", _wrap_Geometry_SetCoordinateDimension, METH_VARARGS, (char *)"\n"
		"Geometry_SetCoordinateDimension(Geometry self, int dimension)\n"
		"\n"
		"void\n"
		"OGR_G_SetCoordinateDimension(OGRGeometryH hGeom, int nNewDimension)\n"
		"\n"
		"Set the coordinate dimension.\n"
		"\n"
		"This method sets the explicit coordinate dimension. Setting the\n"
		"coordinate dimension of a geometry to 2 should zero out any existing Z\n"
		"values. Setting the dimension of a geometry collection, a compound\n"
		"curve, a polygon, etc. will affect the children geometries. This will\n"
		"also remove the M dimension if present before this call.\n"
		"\n"
		"Deprecated use OGR_G_Set3D() or OGR_G_SetMeasured().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to set the dimension of the\n"
		"coordinates.\n"
		"\n"
		"nNewDimension:  New coordinate dimension value, either 2 or 3. \n"
		""},
	 { (char *)"Geometry_Set3D", _wrap_Geometry_Set3D, METH_VARARGS, (char *)"\n"
		"Geometry_Set3D(Geometry self, int b3D)\n"
		"\n"
		"void OGR_G_Set3D(OGRGeometryH hGeom,\n"
		"int bIs3D)\n"
		"\n"
		"Add or remove the Z coordinate dimension.\n"
		"\n"
		"This method adds or removes the explicit Z coordinate dimension.\n"
		"Removing the Z coordinate dimension of a geometry will remove any\n"
		"existing Z values. Adding the Z dimension to a geometry collection, a\n"
		"compound curve, a polygon, etc. will affect the children geometries.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to set or unset the Z dimension.\n"
		"\n"
		"bIs3D:  Should the geometry have a Z dimension, either TRUE or FALSE.\n"
		"\n"
		"GDAL 2.1 \n"
		""},
	 { (char *)"Geometry_SetMeasured", _wrap_Geometry_SetMeasured, METH_VARARGS, (char *)"\n"
		"Geometry_SetMeasured(Geometry self, int bMeasured)\n"
		"\n"
		"void\n"
		"OGR_G_SetMeasured(OGRGeometryH hGeom, int bIsMeasured)\n"
		"\n"
		"Add or remove the M coordinate dimension.\n"
		"\n"
		"This method adds or removes the explicit M coordinate dimension.\n"
		"Removing the M coordinate dimension of a geometry will remove any\n"
		"existing M values. Adding the M dimension to a geometry collection, a\n"
		"compound curve, a polygon, etc. will affect the children geometries.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to set or unset the M dimension.\n"
		"\n"
		"bIsMeasured:  Should the geometry have a M dimension, either TRUE or\n"
		"FALSE.\n"
		"\n"
		"GDAL 2.1 \n"
		""},
	 { (char *)"Geometry_GetDimension", _wrap_Geometry_GetDimension, METH_VARARGS, (char *)"\n"
		"Geometry_GetDimension(Geometry self) -> int\n"
		"\n"
		"int\n"
		"OGR_G_GetDimension(OGRGeometryH hGeom)\n"
		"\n"
		"Get the dimension of this geometry.\n"
		"\n"
		"This function corresponds to the SFCOM IGeometry::GetDimension()\n"
		"method. It indicates the dimension of the geometry, but does not\n"
		"indicate the dimension of the underlying space (as indicated by\n"
		"OGR_G_GetCoordinateDimension() function).\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::getDimension().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to get the dimension from.\n"
		"\n"
		"0 for points, 1 for lines and 2 for surfaces. \n"
		""},
	 { (char *)"Geometry_HasCurveGeometry", _wrap_Geometry_HasCurveGeometry, METH_VARARGS, (char *)"Geometry_HasCurveGeometry(Geometry self, int bLookForCircular=False) -> int"},
	 { (char *)"Geometry_GetLinearGeometry", (PyCFunction) _wrap_Geometry_GetLinearGeometry, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetLinearGeometry(Geometry self, double dfMaxAngleStepSizeDegrees=0.0, char ** options=None) -> Geometry"},
	 { (char *)"Geometry_GetCurveGeometry", (PyCFunction) _wrap_Geometry_GetCurveGeometry, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetCurveGeometry(Geometry self, char ** options=None) -> Geometry"},
	 { (char *)"Geometry_Value", _wrap_Geometry_Value, METH_VARARGS, (char *)"Geometry_Value(Geometry self, double dfDistance) -> Geometry"},
	 { (char *)"Geometry_swigregister", Geometry_swigregister, METH_VARARGS, NULL},
	 { (char *)"GetDriverCount", _wrap_GetDriverCount, METH_VARARGS, (char *)"GetDriverCount() -> int"},
	 { (char *)"GetOpenDSCount", _wrap_GetOpenDSCount, METH_VARARGS, (char *)"GetOpenDSCount() -> int"},
	 { (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"},
	 { (char *)"RegisterAll", _wrap_RegisterAll, METH_VARARGS, (char *)"RegisterAll()"},
	 { (char *)"GeometryTypeToName", _wrap_GeometryTypeToName, METH_VARARGS, (char *)"GeometryTypeToName(OGRwkbGeometryType eType) -> char const *"},
	 { (char *)"GetFieldTypeName", _wrap_GetFieldTypeName, METH_VARARGS, (char *)"GetFieldTypeName(OGRFieldType type) -> char const *"},
	 { (char *)"GetFieldSubTypeName", _wrap_GetFieldSubTypeName, METH_VARARGS, (char *)"GetFieldSubTypeName(OGRFieldSubType type) -> char const *"},
	 { (char *)"GT_Flatten", _wrap_GT_Flatten, METH_VARARGS, (char *)"GT_Flatten(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { (char *)"GT_SetZ", _wrap_GT_SetZ, METH_VARARGS, (char *)"GT_SetZ(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { (char *)"GT_SetM", _wrap_GT_SetM, METH_VARARGS, (char *)"GT_SetM(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { (char *)"GT_SetModifier", _wrap_GT_SetModifier, METH_VARARGS, (char *)"GT_SetModifier(OGRwkbGeometryType eType, int bSetZ, int bSetM=False) -> OGRwkbGeometryType"},
	 { (char *)"GT_HasZ", _wrap_GT_HasZ, METH_VARARGS, (char *)"GT_HasZ(OGRwkbGeometryType eType) -> int"},
	 { (char *)"GT_HasM", _wrap_GT_HasM, METH_VARARGS, (char *)"GT_HasM(OGRwkbGeometryType eType) -> int"},
	 { (char *)"GT_IsSubClassOf", _wrap_GT_IsSubClassOf, METH_VARARGS, (char *)"GT_IsSubClassOf(OGRwkbGeometryType eType, OGRwkbGeometryType eSuperType) -> int"},
	 { (char *)"GT_IsCurve", _wrap_GT_IsCurve, METH_VARARGS, (char *)"GT_IsCurve(OGRwkbGeometryType arg1) -> int"},
	 { (char *)"GT_IsSurface", _wrap_GT_IsSurface, METH_VARARGS, (char *)"GT_IsSurface(OGRwkbGeometryType arg1) -> int"},
	 { (char *)"GT_IsNonLinear", _wrap_GT_IsNonLinear, METH_VARARGS, (char *)"GT_IsNonLinear(OGRwkbGeometryType arg1) -> int"},
	 { (char *)"GT_GetCollection", _wrap_GT_GetCollection, METH_VARARGS, (char *)"GT_GetCollection(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { (char *)"GT_GetCurve", _wrap_GT_GetCurve, METH_VARARGS, (char *)"GT_GetCurve(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { (char *)"GT_GetLinear", _wrap_GT_GetLinear, METH_VARARGS, (char *)"GT_GetLinear(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { (char *)"SetNonLinearGeometriesEnabledFlag", _wrap_SetNonLinearGeometriesEnabledFlag, METH_VARARGS, (char *)"SetNonLinearGeometriesEnabledFlag(int bFlag)"},
	 { (char *)"GetNonLinearGeometriesEnabledFlag", _wrap_GetNonLinearGeometriesEnabledFlag, METH_VARARGS, (char *)"GetNonLinearGeometriesEnabledFlag() -> int"},
	 { (char *)"GetOpenDS", _wrap_GetOpenDS, METH_VARARGS, (char *)"GetOpenDS(int ds_number) -> DataSource"},
	 { (char *)"Open", (PyCFunction) _wrap_Open, METH_VARARGS | METH_KEYWORDS, (char *)"Open(char const * utf8_path, int update=0) -> DataSource"},
	 { (char *)"OpenShared", (PyCFunction) _wrap_OpenShared, METH_VARARGS | METH_KEYWORDS, (char *)"OpenShared(char const * utf8_path, int update=0) -> DataSource"},
	 { (char *)"GetDriverByName", _wrap_GetDriverByName, METH_VARARGS, (char *)"GetDriverByName(char const * name) -> Driver"},
	 { (char *)"GetDriver", _wrap_GetDriver, METH_VARARGS, (char *)"GetDriver(int driver_number) -> Driver"},
	 { (char *)"GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, (char *)"GeneralCmdLineProcessor(char ** papszArgv, int nOptions=0) -> char **"},
	 { (char *)"TermProgress_nocb", (PyCFunction) _wrap_TermProgress_nocb, METH_VARARGS | METH_KEYWORDS, (char *)"TermProgress_nocb(double dfProgress, char const * pszMessage=None, void * pData=None) -> int"},
	 { (char *)"TermProgress_swigconstant", TermProgress_swigconstant, METH_VARARGS, NULL},
	 { NULL, NULL, 0, NULL }
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */

static void *_p_OGRDriverShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((GDALMajorObjectShadow *)  ((OGRDriverShadow *) x));
}
static void *_p_OGRLayerShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((GDALMajorObjectShadow *)  ((OGRLayerShadow *) x));
}
static void *_p_OGRDataSourceShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((GDALMajorObjectShadow *)  ((OGRDataSourceShadow *) x));
}
static swig_type_info _swigt__p_GDALMajorObjectShadow = {"_p_GDALMajorObjectShadow", "GDALMajorObjectShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALProgressFunc = {"_p_GDALProgressFunc", "GDALProgressFunc *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRDataSourceShadow = {"_p_OGRDataSourceShadow", "OGRDataSourceShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRDriverShadow = {"_p_OGRDriverShadow", "OGRDriverShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRFeatureDefnShadow = {"_p_OGRFeatureDefnShadow", "OGRFeatureDefnShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRFieldDefnShadow = {"_p_OGRFieldDefnShadow", "OGRFieldDefnShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRGeomFieldDefnShadow = {"_p_OGRGeomFieldDefnShadow", "OGRGeomFieldDefnShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRGeometryShadow = {"_p_OGRGeometryShadow", "OGRGeometryShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRStyleTableShadow = {"_p_OGRStyleTableShadow", "OGRStyleTableShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_double_p_q_const__char_p_void__int = {"_p_f_double_p_q_const__char_p_void__int", "int (*)(double,char const *,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "OGRFieldSubType *|OGRFieldType *|CPLErr *|int *|OGRwkbGeometryType *|OGRJustification *|OGRAxisOrientation *|OGRwkbByteOrder *|OGRErr *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_GIntBig = {"_p_p_GIntBig", "GIntBig **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_GDALMajorObjectShadow,
  &_swigt__p_GDALProgressFunc,
  &_swigt__p_GIntBig,
  &_swigt__p_OGRDataSourceShadow,
  &_swigt__p_OGRDriverShadow,
  &_swigt__p_OGRFeatureDefnShadow,
  &_swigt__p_OGRFeatureShadow,
  &_swigt__p_OGRFieldDefnShadow,
  &_swigt__p_OGRGeomFieldDefnShadow,
  &_swigt__p_OGRGeometryShadow,
  &_swigt__p_OGRLayerShadow,
  &_swigt__p_OGRStyleTableShadow,
  &_swigt__p_OSRCoordinateTransformationShadow,
  &_swigt__p_OSRSpatialReferenceShadow,
  &_swigt__p_char,
  &_swigt__p_double,
  &_swigt__p_f_double_p_q_const__char_p_void__int,
  &_swigt__p_float,
  &_swigt__p_int,
  &_swigt__p_p_GIntBig,
  &_swigt__p_p_char,
  &_swigt__p_p_double,
  &_swigt__p_p_int,
};

static swig_cast_info _swigc__p_GDALMajorObjectShadow[] = {  {&_swigt__p_GDALMajorObjectShadow, 0, 0, 0},  {&_swigt__p_OGRDriverShadow, _p_OGRDriverShadowTo_p_GDALMajorObjectShadow, 0, 0},  {&_swigt__p_OGRLayerShadow, _p_OGRLayerShadowTo_p_GDALMajorObjectShadow, 0, 0},  {&_swigt__p_OGRDataSourceShadow, _p_OGRDataSourceShadowTo_p_GDALMajorObjectShadow, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALProgressFunc[] = {  {&_swigt__p_GDALProgressFunc, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GIntBig[] = {  {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRDataSourceShadow[] = {  {&_swigt__p_OGRDataSourceShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRDriverShadow[] = {  {&_swigt__p_OGRDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRFeatureDefnShadow[] = {  {&_swigt__p_OGRFeatureDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRFeatureShadow[] = {  {&_swigt__p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRFieldDefnShadow[] = {  {&_swigt__p_OGRFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRGeomFieldDefnShadow[] = {  {&_swigt__p_OGRGeomFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRGeometryShadow[] = {  {&_swigt__p_OGRGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRLayerShadow[] = {  {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRStyleTableShadow[] = {  {&_swigt__p_OGRStyleTableShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = {  {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_double_p_q_const__char_p_void__int[] = {  {&_swigt__p_f_double_p_q_const__char_p_void__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_float[] = {  {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_GIntBig[] = {  {&_swigt__p_p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_double[] = {  {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_int[] = {  {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_GDALMajorObjectShadow,
  _swigc__p_GDALProgressFunc,
  _swigc__p_GIntBig,
  _swigc__p_OGRDataSourceShadow,
  _swigc__p_OGRDriverShadow,
  _swigc__p_OGRFeatureDefnShadow,
  _swigc__p_OGRFeatureShadow,
  _swigc__p_OGRFieldDefnShadow,
  _swigc__p_OGRGeomFieldDefnShadow,
  _swigc__p_OGRGeometryShadow,
  _swigc__p_OGRLayerShadow,
  _swigc__p_OGRStyleTableShadow,
  _swigc__p_OSRCoordinateTransformationShadow,
  _swigc__p_OSRSpatialReferenceShadow,
  _swigc__p_char,
  _swigc__p_double,
  _swigc__p_f_double_p_q_const__char_p_void__int,
  _swigc__p_float,
  _swigc__p_int,
  _swigc__p_p_GIntBig,
  _swigc__p_p_char,
  _swigc__p_p_double,
  _swigc__p_p_int,
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

static swig_const_info swig_const_table[] = {
{ SWIG_PY_POINTER, (char*)"TermProgress", 0, 0, (void *)((int (*)(double,char const *,void *))(GDALTermProgress)), &SWIGTYPE_p_f_double_p_q_const__char_p_void__int },
{0, 0, 0, 0.0, 0, 0}};

#ifdef __cplusplus
}
#endif
/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is tough by the requirement that no dynamic
 * memory is used. Also, since swig_type_info structures store pointers to
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization.
 * The idea is that swig generates all the structures that are needed.
 * The runtime then collects these partially filled structures.
 * The SWIG_InitializeModule function takes these initial arrays out of
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.
 *
 * The generated swig_type_info structures are assigned statically to an initial
 * array. We just loop through that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast linked list. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns. So to actually build the cast linked list,
 * we find the array of casts associated with the type, and loop through it
 * adding the casts to the list. The one last trick we need to do is making
 * sure the type pointer in the swig_cast_info struct is correct.
 *
 * First off, we lookup the cast->type name to see if it is already loaded.
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the linked list (because the cast->type) pointer will
 *     be correct.
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#if 0
} /* c-mode */
#endif
#endif

#if 0
#define SWIGRUNTIME_DEBUG
#endif


SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int init;
  
  /* check to see if the circular list has been setup, if not, set it up */
  if (swig_module.next==0) {
    /* Initialize the swig_module */
    swig_module.type_initial = swig_type_initial;
    swig_module.cast_initial = swig_cast_initial;
    swig_module.next = &swig_module;
    init = 1;
  } else {
    init = 0;
  }
  
  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (!module_head) {
    /* This is the first module loaded for this interpreter */
    /* so set the swig module into the interpreter */
    SWIG_SetModule(clientdata, &swig_module);
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    iter=module_head;
    do {
      if (iter==&swig_module) {
        /* Our module is already in the list, so there's nothing more to do. */
        return;
      }
      iter=iter->next;
    } while (iter!= module_head);
    
    /* otherwise we must add our module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }
  
  /* When multiple interpreters are used, a module could have already been initialized in
       a different interpreter, but not yet have a pointer in this interpreter.
       In this case, we do not want to continue adding types... everything should be
       set up already */
  if (init == 0) return;
  
  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *ret;
    swig_cast_info *cast;
    
#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
#endif
    
    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found type %s\n", type->name);
#endif
      if (swig_module.type_initial[i]->clientdata) {
        type->clientdata = swig_module.type_initial[i]->clientdata;
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
#endif
      }
    } else {
      type = swig_module.type_initial[i];
    }
    
    /* Insert casting types */
    cast = swig_module.cast_initial[i];
    while (cast->type) {
      /* Don't need to add information already in the list */
      ret = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
#ifdef SWIGRUNTIME_DEBUG
        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
#endif
      }
      if (ret) {
        if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
#endif
          cast->type = ret;
          ret = 0;
        } else {
          /* Check for casting already in the list */
          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
#ifdef SWIGRUNTIME_DEBUG
          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
#endif
          if (!ocast) ret = 0;
        }
      }
      
      if (!ret) {
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        if (type->cast) {
          type->cast->prev = cast;
          cast->next = type->cast;
        }
        type->cast = cast;
      }
      cast++;
    }
    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
  swig_module.types[i] = 0;
  
#ifdef SWIGRUNTIME_DEBUG
  printf("**** SWIG_InitializeModule: Cast List ******\n");
  for (i = 0; i < swig_module.size; ++i) {
    int j = 0;
    swig_cast_info *cast = swig_module.cast_initial[i];
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
    while (cast->type) {
      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
      cast++;
      ++j;
    }
    printf("---- Total casts: %d\n",j);
  }
  printf("**** SWIG_InitializeModule: Cast List ******\n");
#endif
}

/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
* of equivalent types.  It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
SWIGRUNTIME void
SWIG_PropagateClientData(void) {
  size_t i;
  swig_cast_info *equiv;
  static int init_run = 0;
  
  if (init_run) return;
  init_run = 1;
  
  for (i = 0; i < swig_module.size; i++) {
    if (swig_module.types[i]->clientdata) {
      equiv = swig_module.types[i]->cast;
      while (equiv) {
        if (!equiv->converter) {
          if (equiv->type && !equiv->type->clientdata)
          SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
        }
        equiv = equiv->next;
      }
    }
  }
}

#ifdef __cplusplus
#if 0
{
  /* c-mode */
#endif
}
#endif



#ifdef __cplusplus
extern "C" {
#endif
  
  /* Python-specific SWIG API */
#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
  
  /* -----------------------------------------------------------------------------
   * global variable support code.
   * ----------------------------------------------------------------------------- */
  
  typedef struct swig_globalvar {
    char       *name;                  /* Name of global variable */
    PyObject *(*get_attr)(void);       /* Return the current value */
    int       (*set_attr)(PyObject *); /* Set the value */
    struct swig_globalvar *next;
  } swig_globalvar;
  
  typedef struct swig_varlinkobject {
    PyObject_HEAD
    swig_globalvar *vars;
  } swig_varlinkobject;
  
  SWIGINTERN PyObject *
  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
#if PY_VERSION_HEX >= 0x03000000
    return PyUnicode_InternFromString("<Swig global variables>");
#else
    return PyString_FromString("<Swig global variables>");
#endif
  }
  
  SWIGINTERN PyObject *
  swig_varlink_str(swig_varlinkobject *v) {
#if PY_VERSION_HEX >= 0x03000000
    PyObject *str = PyUnicode_InternFromString("(");
    PyObject *tail;
    PyObject *joined;
    swig_globalvar *var;
    for (var = v->vars; var; var=var->next) {
      tail = PyUnicode_FromString(var->name);
      joined = PyUnicode_Concat(str, tail);
      Py_DecRef(str);
      Py_DecRef(tail);
      str = joined;
      if (var->next) {
        tail = PyUnicode_InternFromString(", ");
        joined = PyUnicode_Concat(str, tail);
        Py_DecRef(str);
        Py_DecRef(tail);
        str = joined;
      }
    }
    tail = PyUnicode_InternFromString(")");
    joined = PyUnicode_Concat(str, tail);
    Py_DecRef(str);
    Py_DecRef(tail);
    str = joined;
#else
    PyObject *str = PyString_FromString("(");
    swig_globalvar *var;
    for (var = v->vars; var; var=var->next) {
      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
      if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
    }
    PyString_ConcatAndDel(&str,PyString_FromString(")"));
#endif
    return str;
  }
  
  SWIGINTERN int
  swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
    char *tmp;
    PyObject *str = swig_varlink_str(v);
    fprintf(fp,"Swig global variables ");
    fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
    SWIG_Python_str_DelForPy3(tmp);
    Py_DECREF(str);
    return 0;
  }
  
  SWIGINTERN void
  swig_varlink_dealloc(swig_varlinkobject *v) {
    swig_globalvar *var = v->vars;
    while (var) {
      swig_globalvar *n = var->next;
      free(var->name);
      free(var);
      var = n;
    }
  }
  
  SWIGINTERN PyObject *
  swig_varlink_getattr(swig_varlinkobject *v, char *n) {
    PyObject *res = NULL;
    swig_globalvar *var = v->vars;
    while (var) {
      if (strcmp(var->name,n) == 0) {
        res = (*var->get_attr)();
        break;
      }
      var = var->next;
    }
    if (res == NULL && !PyErr_Occurred()) {
      PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
    }
    return res;
  }
  
  SWIGINTERN int
  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
    int res = 1;
    swig_globalvar *var = v->vars;
    while (var) {
      if (strcmp(var->name,n) == 0) {
        res = (*var->set_attr)(p);
        break;
      }
      var = var->next;
    }
    if (res == 1 && !PyErr_Occurred()) {
      PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
    }
    return res;
  }
  
  SWIGINTERN PyTypeObject*
  swig_varlink_type(void) {
    static char varlink__doc__[] = "Swig var link object";
    static PyTypeObject varlink_type;
    static int type_init = 0;
    if (!type_init) {
      const PyTypeObject tmp = {
        /* PyObject header changed in Python 3 */
#if PY_VERSION_HEX >= 0x03000000
        PyVarObject_HEAD_INIT(NULL, 0)
#else
        PyObject_HEAD_INIT(NULL)
        0,                                  /* ob_size */
#endif
        (char *)"swigvarlink",              /* tp_name */
        sizeof(swig_varlinkobject),         /* tp_basicsize */
        0,                                  /* tp_itemsize */
        (destructor) swig_varlink_dealloc,  /* tp_dealloc */
        (printfunc) swig_varlink_print,     /* tp_print */
        (getattrfunc) swig_varlink_getattr, /* tp_getattr */
        (setattrfunc) swig_varlink_setattr, /* tp_setattr */
        0,                                  /* tp_compare */
        (reprfunc) swig_varlink_repr,       /* tp_repr */
        0,                                  /* tp_as_number */
        0,                                  /* tp_as_sequence */
        0,                                  /* tp_as_mapping */
        0,                                  /* tp_hash */
        0,                                  /* tp_call */
        (reprfunc) swig_varlink_str,        /* tp_str */
        0,                                  /* tp_getattro */
        0,                                  /* tp_setattro */
        0,                                  /* tp_as_buffer */
        0,                                  /* tp_flags */
        varlink__doc__,                     /* tp_doc */
        0,                                  /* tp_traverse */
        0,                                  /* tp_clear */
        0,                                  /* tp_richcompare */
        0,                                  /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
        0,                                  /* tp_del */
#endif
#if PY_VERSION_HEX >= 0x02060000
        0,                                  /* tp_version_tag */
#endif
#if PY_VERSION_HEX >= 0x03040000
        0,                                  /* tp_finalize */
#endif
#ifdef COUNT_ALLOCS
        0,                                  /* tp_allocs */
        0,                                  /* tp_frees */
        0,                                  /* tp_maxalloc */
#if PY_VERSION_HEX >= 0x02050000
        0,                                  /* tp_prev */
#endif
        0                                   /* tp_next */
#endif
      };
      varlink_type = tmp;
      type_init = 1;
#if PY_VERSION_HEX < 0x02020000
      varlink_type.ob_type = &PyType_Type;
#else
      if (PyType_Ready(&varlink_type) < 0)
      return NULL;
#endif
    }
    return &varlink_type;
  }
  
  /* Create a variable linking object for use later */
  SWIGINTERN PyObject *
  SWIG_Python_newvarlink(void) {
    swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
    if (result) {
      result->vars = 0;
    }
    return ((PyObject*) result);
  }
  
  SWIGINTERN void 
  SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
    swig_varlinkobject *v = (swig_varlinkobject *) p;
    swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
    if (gv) {
      size_t size = strlen(name)+1;
      gv->name = (char *)malloc(size);
      if (gv->name) {
        strncpy(gv->name,name,size);
        gv->get_attr = get_attr;
        gv->set_attr = set_attr;
        gv->next = v->vars;
      }
    }
    v->vars = gv;
  }
  
  SWIGINTERN PyObject *
  SWIG_globals(void) {
    static PyObject *_SWIG_globals = 0; 
    if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
    return _SWIG_globals;
  }
  
  /* -----------------------------------------------------------------------------
   * constants/methods manipulation
   * ----------------------------------------------------------------------------- */
  
  /* Install Constants */
  SWIGINTERN void
  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
    PyObject *obj = 0;
    size_t i;
    for (i = 0; constants[i].type; ++i) {
      switch(constants[i].type) {
      case SWIG_PY_POINTER:
        obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
        break;
      case SWIG_PY_BINARY:
        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
        break;
      default:
        obj = 0;
        break;
      }
      if (obj) {
        PyDict_SetItemString(d, constants[i].name, obj);
        Py_DECREF(obj);
      }
    }
  }
  
  /* -----------------------------------------------------------------------------*/
  /* Fix SwigMethods to carry the callback ptrs when needed */
  /* -----------------------------------------------------------------------------*/
  
  SWIGINTERN void
  SWIG_Python_FixMethods(PyMethodDef *methods,
    swig_const_info *const_table,
    swig_type_info **types,
    swig_type_info **types_initial) {
    size_t i;
    for (i = 0; methods[i].ml_name; ++i) {
      const char *c = methods[i].ml_doc;
      if (!c) continue;
      c = strstr(c, "swig_ptr: ");
      if (c) {
        int j;
        swig_const_info *ci = 0;
        const char *name = c + 10;
        for (j = 0; const_table[j].type; ++j) {
          if (strncmp(const_table[j].name, name, 
              strlen(const_table[j].name)) == 0) {
            ci = &(const_table[j]);
            break;
          }
        }
        if (ci) {
          void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
          if (ptr) {
            size_t shift = (ci->ptype) - types;
            swig_type_info *ty = types_initial[shift];
            size_t ldoc = (c - methods[i].ml_doc);
            size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
            char *ndoc = (char*)malloc(ldoc + lptr + 10);
            if (ndoc) {
              char *buff = ndoc;
              strncpy(buff, methods[i].ml_doc, ldoc);
              buff += ldoc;
              memcpy(buff, "swig_ptr: ", 10);
              buff += 10;
              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
              methods[i].ml_doc = ndoc;
            }
          }
        }
      }
    }
  } 
  
#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------*
 *  Partial Init method
 * -----------------------------------------------------------------------------*/

#ifdef __cplusplus
extern "C"
#endif

SWIGEXPORT 
#if PY_VERSION_HEX >= 0x03000000
PyObject*
#else
void
#endif
SWIG_init(void) {
  PyObject *m, *d, *md;
#if PY_VERSION_HEX >= 0x03000000
  static struct PyModuleDef SWIG_module = {
# if PY_VERSION_HEX >= 0x03020000
    PyModuleDef_HEAD_INIT,
# else
    {
      PyObject_HEAD_INIT(NULL)
      NULL, /* m_init */
      0,    /* m_index */
      NULL, /* m_copy */
    },
# endif
    (char *) SWIG_name,
    NULL,
    -1,
    SwigMethods,
    NULL,
    NULL,
    NULL,
    NULL
  };
#endif
  
#if defined(SWIGPYTHON_BUILTIN)
  static SwigPyClientData SwigPyObject_clientdata = {
    0, 0, 0, 0, 0, 0, 0
  };
  static PyGetSetDef this_getset_def = {
    (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
  };
  static SwigPyGetSet thisown_getset_closure = {
    (PyCFunction) SwigPyObject_own,
    (PyCFunction) SwigPyObject_own
  };
  static PyGetSetDef thisown_getset_def = {
    (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
  };
  PyObject *metatype_args;
  PyTypeObject *builtin_pytype;
  int builtin_base_count;
  swig_type_info *builtin_basetype;
  PyObject *tuple;
  PyGetSetDescrObject *static_getset;
  PyTypeObject *metatype;
  SwigPyClientData *cd;
  PyObject *public_interface, *public_symbol;
  PyObject *this_descr;
  PyObject *thisown_descr;
  PyObject *self = 0;
  int i;
  
  (void)builtin_pytype;
  (void)builtin_base_count;
  (void)builtin_basetype;
  (void)tuple;
  (void)static_getset;
  (void)self;
  
  /* metatype is used to implement static member variables. */
  metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
  assert(metatype_args);
  metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
  assert(metatype);
  Py_DECREF(metatype_args);
  metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
  assert(PyType_Ready(metatype) >= 0);
#endif
  
  /* Fix SwigMethods to carry the callback ptrs when needed */
  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
  
#if PY_VERSION_HEX >= 0x03000000
  m = PyModule_Create(&SWIG_module);
#else
  m = Py_InitModule((char *) SWIG_name, SwigMethods);
#endif
  
  md = d = PyModule_GetDict(m);
  (void)md;
  
  SWIG_InitializeModule(0);
  
#ifdef SWIGPYTHON_BUILTIN
  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
  assert(SwigPyObject_stype);
  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  if (!cd) {
    SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
    SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
  } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
    PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
# if PY_VERSION_HEX >= 0x03000000
    return NULL;
# else
    return;
# endif
  }
  
  /* All objects have a 'this' attribute */
  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
  (void)this_descr;
  
  /* All objects have a 'thisown' attribute */
  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
  (void)thisown_descr;
  
  public_interface = PyList_New(0);
  public_symbol = 0;
  (void)public_symbol;
  
  PyDict_SetItemString(md, "__all__", public_interface);
  Py_DECREF(public_interface);
  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
  for (i = 0; swig_const_table[i].name != 0; ++i)
  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
#endif
  
  SWIG_InstallConstants(d,swig_const_table);
  
  
  
  if ( OGRGetDriverCount() == 0 ) {
    OGRRegisterAll();
  }
  
  
  
  /* Initialize threading */
  SWIG_PYTHON_INITIALIZE_THREADS;
#if PY_VERSION_HEX >= 0x03000000
  return m;
#else
  return;
#endif
}

