/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.2
 *
 * 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 defined(__GNUC__)
#  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#    ifndef GCC_HASCLASSVISIBILITY
#      define GCC_HASCLASSVISIBILITY
#    endif
#  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(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
/* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
# include <math.h>
#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 1
#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
#define SWIG_POINTER_NO_NULL       0x4

/* 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 = (unsigned char)((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = (unsigned char)((d - ('a'-10)) << 4);
    else
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (unsigned char)(d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (unsigned char)(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 >= 0x03030000
  return (char *)PyUnicode_AsUTF8(str);
#elif PY_VERSION_HEX >= 0x03000000
  char *newstr = 0;
  str = PyUnicode_AsUTF8String(str);
  if (str) {
    char *cstr;
    Py_ssize_t len;
    if (PyBytes_AsStringAndSize(str, &cstr, &len) != -1) {
      newstr = (char *) malloc(len+1);
      if (newstr)
        memcpy(newstr, cstr, len+1);
    }
    Py_XDECREF(str);
  }
  return newstr;
#else
  return PyString_AsString(str);
#endif
}

#if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000
#  define SWIG_Python_str_DelForPy3(x)
#else
#  define SWIG_Python_str_DelForPy3(x) free( (void*) (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
}

#ifndef PyObject_DEL
# define PyObject_DEL PyObject_Del
#endif

// SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user
// interface files check for it.
# define SWIGPY_USE_CAPSULE
# define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)

#if PY_VERSION_HEX < 0x03020000
#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
#define Py_hash_t long
#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) {
    PyObject *old_str = PyObject_Str(value);
    const char *tmp = SWIG_Python_str_AsChar(old_str);
    PyErr_Clear();
    Py_XINCREF(type);
    if (tmp)
      PyErr_Format(type, "%s %s", tmp, mesg);
    else
      PyErr_Format(type, "%s", mesg);
    SWIG_Python_str_DelForPy3(tmp);
    Py_DECREF(old_str);
    Py_DECREF(value);
  } else {
    PyErr_SetString(PyExc_RuntimeError, mesg);
  }
}

SWIGRUNTIME int
SWIG_Python_TypeErrorOccurred(PyObject *obj)
{
  PyObject *error;
  if (obj)
    return 0;
  error = PyErr_Occurred();
  return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
}

SWIGRUNTIME void
SWIG_Python_RaiseOrModifyTypeError(const char *message)
{
  if (SWIG_Python_TypeErrorOccurred(NULL)) {
    /* Use existing TypeError to preserve stacktrace and enhance with given message */
    PyObject *newvalue;
    PyObject *type = NULL, *value = NULL, *traceback = NULL;
    PyErr_Fetch(&type, &value, &traceback);
#if PY_VERSION_HEX >= 0x03000000
    newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message);
#else
    newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message);
#endif
    Py_XDECREF(value);
    PyErr_Restore(type, newvalue, traceback);
  } else {
    /* Raise TypeError using given message */
    PyErr_SetString(PyExc_TypeError, message);
  }
}

#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)
#    define SWIG_PYTHON_USE_GIL
#  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;
  const char *name;
  long lvalue;
  double dvalue;
  void   *pvalue;
  swig_type_info **ptype;
} swig_const_info;

#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.
 *
 * ----------------------------------------------------------------------------- */

#if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */
# error "This version of SWIG only supports Python >= 2.7"
#endif

#if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000
# error "This version of SWIG only supports Python 3 >= 3.2"
#endif

/* 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) {   
  PyDict_SetItemString(d, name, obj);
  Py_DECREF(obj);
  if (public_interface)
    SwigPyBuiltin_AddPublicSymbol(public_interface, name);
}

#else

SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
  PyDict_SetItemString(d, name, obj);
  Py_DECREF(obj);                            
}

#endif

/* Append a value to the result obj */

SWIGINTERN PyObject*
SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
  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;
}

/* 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;
    }    
  }
}

SWIGINTERN int
SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) {
  int no_kwargs = 1;
  if (kwargs) {
    assert(PyDict_Check(kwargs));
    if (PyDict_Size(kwargs) > 0) {
      PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name);
      no_kwargs = 0;
    }
  }
  return no_kwargs;
}

/* A functor is a function object with one single object argument */
#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunctionObjArgs(functor, obj, NULL);

/*
  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

/* 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;
  int fail = data ? data->implicitconv : 0;
  if (fail)
    PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors.");
  return fail;
}

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 {
      data->newraw = PyObject_GetAttrString(data->klass, "__new__");
      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, "__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);
      data->delargs = !(flags & (METH_O));
    } 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 *
SwigPyObject_repr(SwigPyObject *v)
{
  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) {
    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
# 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;  
}

/* We need a version taking two PyObject* parameters so it's a valid
 * PyCFunction to use in swigobject_methods[]. */
SWIGRUNTIME PyObject *
SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
{
  return SwigPyObject_repr((SwigPyObject*)v);
}

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 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 *type = NULL, *value = NULL, *traceback = NULL;
      PyErr_Fetch(&type, &value, &traceback);

      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(type, value, traceback);

      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;
  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* 
SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
{
  SwigPyObject *sobj = (SwigPyObject *) v;
  if (sobj->next) {    
    Py_INCREF(sobj->next);
    return sobj->next;
  } else {
    return SWIG_Py_Void();
  }
}

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

SWIGINTERN PyObject*
SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
{
  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 (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
    return NULL;
  } else {
    SwigPyObject *sobj = (SwigPyObject *)v;
    PyObject *obj = PyBool_FromLong(sobj->own);
    if (val) {
      if (PyObject_IsTrue(val)) {
        SwigPyObject_acquire(v,args);
      } else {
        SwigPyObject_disown(v,args);
      }
    } 
    return obj;
  }
}

static PyMethodDef
swigobject_methods[] = {
  {"disown",  SwigPyObject_disown,  METH_NOARGS,  "releases ownership of the pointer"},
  {"acquire", SwigPyObject_acquire, METH_NOARGS,  "acquires ownership of the pointer"},
  {"own",     SwigPyObject_own,     METH_VARARGS, "returns/sets ownership of the pointer"},
  {"append",  SwigPyObject_append,  METH_O,       "appends another 'this' object"},
  {"next",    SwigPyObject_next,    METH_NOARGS,  "returns the next 'this' object"},
  {"__repr__",SwigPyObject_repr2,   METH_NOARGS,  "returns object representation"},
  {0, 0, 0, 0}  
};

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 */
#else
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
#endif
  };

  static PyTypeObject swigpyobject_type;
  static int type_init = 0;
  if (!type_init) {
    const PyTypeObject tmp = {
#if PY_VERSION_HEX >= 0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                    /* ob_size */
#endif
      "SwigPyObject",                       /* tp_name */
      sizeof(SwigPyObject),                 /* tp_basicsize */
      0,                                    /* tp_itemsize */
      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
      0,                                    /* tp_print */
      (getattrfunc)0,                       /* tp_getattr */
      (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 */
      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 */
      0,                                    /* tp_del */
      0,                                    /* tp_version_tag */
#if PY_VERSION_HEX >= 0x03040000
      0,                                    /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
      0,                                    /* tp_vectorcall */
#endif
#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
      0,                                    /* tp_print */
#endif
#ifdef COUNT_ALLOCS
      0,                                    /* tp_allocs */
      0,                                    /* tp_frees */
      0,                                    /* tp_maxalloc */
      0,                                    /* tp_prev */
      0                                     /* tp_next */
#endif
    };
    swigpyobject_type = tmp;
    type_init = 1;
    if (PyType_Ready(&swigpyobject_type) < 0)
      return NULL;
  }
  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 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((const char *)v->pack, (const 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 = {
#if PY_VERSION_HEX>=0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                    /* ob_size */
#endif
      "SwigPyPacked",                       /* tp_name */
      sizeof(SwigPyPacked),                 /* tp_basicsize */
      0,                                    /* tp_itemsize */
      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
      0,                                    /* 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 */
      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 */
      0,                                    /* tp_del */
      0,                                    /* tp_version_tag */
#if PY_VERSION_HEX >= 0x03040000
      0,                                    /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
      0,                                    /* tp_vectorcall */
#endif
#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
      0,                                    /* tp_print */
#endif
#ifdef COUNT_ALLOCS
      0,                                    /* tp_allocs */
      0,                                    /* tp_frees */
      0,                                    /* tp_maxalloc */
      0,                                    /* tp_prev */
      0                                     /* tp_next */
#endif
    };
    swigpypacked_type = tmp;
    type_init = 1;
    if (PyType_Ready(&swigpypacked_type) < 0)
      return NULL;
  }
  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
 * ----------------------------------------------------------------------------- */

static PyObject *Swig_This_global = NULL;

SWIGRUNTIME PyObject *
SWIG_This(void)
{
  if (Swig_This_global == NULL)
    Swig_This_global = SWIG_Python_str_FromChar("this");
  return Swig_This_global;
}

/* #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)
  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 (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : 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;
    swig_cast_info *tc;

    /* 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;
    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;
    }
    return SWIG_OK;
  }
}

/* Convert a packed pointer 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)
{
  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
      if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
        Py_DECREF(inst);
        inst = 0;
      }
#endif
    }
  } else {
#if PY_VERSION_HEX >= 0x03000000
    PyObject *empty_args = PyTuple_New(0);
    if (empty_args) {
      PyObject *empty_kwargs = PyDict_New();
      if (empty_kwargs) {
        inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs);
        Py_DECREF(empty_kwargs);
        if (inst) {
          if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
            Py_DECREF(inst);
            inst = 0;
          } else {
            Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
          }
        }
      }
      Py_DECREF(empty_args);
    }
#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;
}

SWIGRUNTIME int
SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
{
#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;
    }
    return PyDict_SetItem(dict, SWIG_This(), swig_this);
  }
#endif
  return PyObject_SetAttr(inst, SWIG_This(), swig_this);
} 


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 {
      if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0)
        return NULL;
    }
    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
    type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
    if (PyErr_Occurred()) {
      PyErr_Clear();
      type_pointer = (void *)0;
    }
#endif
  }
  return (swig_module_info *) type_pointer;
}

SWIGRUNTIME void
SWIG_Python_DestroyModule(PyObject *obj)
{
  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
  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_global = 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("swig_runtime_data" SWIG_RUNTIME_VERSION);
#else
  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
  PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
#endif
  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
  if (pointer && module) {
    PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
  } else {
    Py_XDECREF(pointer);
  }
}

/* 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) {
    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
  } else {
    swig_module_info *swig_module = SWIG_GetModule(0);
    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
    if (descriptor) {
      obj = PyCapsule_New((void*) descriptor, NULL, NULL);
      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) {
      PyObject *old_str = PyObject_Str(value);
      const char *tmp = SWIG_Python_str_AsChar(old_str);
      const char *errmesg = tmp ? tmp : "Invalid error message";
      Py_XINCREF(type);
      PyErr_Clear();
      if (infront) {
	PyErr_Format(type, "%s %s", mesg, errmesg);
      } else {
	PyErr_Format(type, "%s %s", errmesg, 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);
      if (!encoded_name)
        return -1;
    }
    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 



#ifdef __cplusplus
extern "C" {
#endif

/* Method creation and docstring support functions */

SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name);
SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);

#ifdef __cplusplus
}
#endif


  #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_OGRCodedValue swig_types[3]
#define SWIGTYPE_p_OGRDataSourceShadow swig_types[4]
#define SWIGTYPE_p_OGRDriverShadow swig_types[5]
#define SWIGTYPE_p_OGRFeatureDefnShadow swig_types[6]
#define SWIGTYPE_p_OGRFeatureShadow swig_types[7]
#define SWIGTYPE_p_OGRFieldDefnShadow swig_types[8]
#define SWIGTYPE_p_OGRFieldDomainShadow swig_types[9]
#define SWIGTYPE_p_OGRGeomFieldDefnShadow swig_types[10]
#define SWIGTYPE_p_OGRGeomTransformerShadow swig_types[11]
#define SWIGTYPE_p_OGRGeometryShadow swig_types[12]
#define SWIGTYPE_p_OGRLayerShadow swig_types[13]
#define SWIGTYPE_p_OGRPreparedGeometryShadow swig_types[14]
#define SWIGTYPE_p_OGRStyleTableShadow swig_types[15]
#define SWIGTYPE_p_OSRCoordinateTransformationShadow swig_types[16]
#define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[17]
#define SWIGTYPE_p_char swig_types[18]
#define SWIGTYPE_p_double swig_types[19]
#define SWIGTYPE_p_f_double_p_q_const__char_p_void__int swig_types[20]
#define SWIGTYPE_p_float swig_types[21]
#define SWIGTYPE_p_int swig_types[22]
#define SWIGTYPE_p_p_GIntBig swig_types[23]
#define SWIGTYPE_p_p_char swig_types[24]
#define SWIGTYPE_p_p_double swig_types[25]
#define SWIGTYPE_p_p_int swig_types[26]
#define SWIGTYPE_p_size_t swig_types[27]
static swig_type_info *swig_types[29];
static swig_module_info swig_module = {swig_types, 28, 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) -------- */

#ifdef SWIG_TypeQuery
# undef SWIG_TypeQuery
#endif
#define SWIG_TypeQuery SWIG_Python_TypeQuery

/*-----------------------------------------------
              @(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 0x040002 
#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;
typedef struct OGRDriverHS OGRDriverShadow;
typedef struct OGRDataSourceHS OGRDataSourceShadow;
typedef struct OGRLayerHS OGRLayerShadow;
typedef struct OGRFeatureHS OGRFeatureShadow;
typedef struct OGRFeatureDefnHS OGRFeatureDefnShadow;
typedef struct OGRGeometryHS OGRGeometryShadow;
typedef struct OGRCoordinateTransformationHS OSRCoordinateTransformationShadow;
typedef struct OGRFieldDefnHS OGRFieldDefnShadow;
#else
typedef void OSRSpatialReferenceShadow;
typedef void OGRDriverShadow;
typedef void OGRDataSourceShadow;
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;
typedef struct OGRGeomTransformer OGRGeomTransformerShadow;
typedef struct _OGRPreparedGeometry OGRPreparedGeometryShadow;
typedef struct OGRFieldDomainHS OGRFieldDomainShadow;


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 defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
      return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
#else
      return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
#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 non-failure messages since
  ** they won't be translated into exceptions.
  */
  else if (eclass != CE_Failure ) {
    pfnPreviousHandler(eclass, code, msg );
  }
  else {
    CPLSetThreadLocalConfigOption("__last_error_message", msg);
    CPLSetThreadLocalConfigOption("__last_error_code", CPLSPrintf("%d", code));
  }
}



static
int GetUseExceptions() {
  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);
    // if the previous logger was custom, we need the user data available
    pfnPreviousHandler =
        CPLSetErrorHandlerEx( (CPLErrorHandler) PythonBindingErrorHandler, CPLGetErrorHandlerUserData() );
  }
}

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' )
    {
        CPLFree(pszNewValue);
        pszNewValue = NULL;
    }
    CPLSetConfigOption("__chain_python_error_handlers", pszNewValue);
    CPLFree(pszNewValue);
    bUseExceptions = 0;
    // if the previous logger was custom, we need the user data available. Preserve it.
    CPLSetErrorHandlerEx( pfnPreviousHandler, CPLGetErrorHandlerUserData());
  }
}


/* 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;

// Note: this is also copy&pasted in gdal_array.i
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), "strict");
        if (pyObj != NULL && !PyErr_Occurred())
            return pyObj;
        PyErr_Clear();
        return PyBytes_FromString(pszStr);
    }
    pszIter ++;
  }
  return PyUnicode_FromString(pszStr);
}

/* 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;
      PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
      pszNewStr = (char *) malloc(nLen+1);
      if( pszNewStr == NULL )
      {
          CPLError(CE_Failure, CPLE_OutOfMemory, "Failed to allocate %llu bytes",
                   (unsigned long long)(nLen + 1));
          Py_XDECREF(pyUTF8Str);
          return NULL;
      }
      memcpy(pszNewStr, pszStr, nLen+1);
      Py_XDECREF(pyUTF8Str);
      *pbToFree = 1;
      return pszNewStr;
  }
  else if( PyBytes_Check(pyObject) )
  {
      char* ret = PyBytes_AsString(pyObject);

      // Check if there are \0 bytes inside the string
      const Py_ssize_t size = PyBytes_Size(pyObject);
      for( Py_ssize_t i = 0; i < size; i++ )
      {
          if( ret[i] == 0 )
          {
              CPLError(CE_Failure, CPLE_AppDefined,
                       "bytes object cast as string contains a zero-byte.");
              return NULL;
          }
      }

      return ret;
  }
  else
  {
      CPLError(CE_Failure, CPLE_AppDefined,
               "Passed object is neither of type string nor bytes");
      return NULL;
  }
}

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 = PyObject_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 defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
  if (PyBytes_Check(obj))
#else
  if (PyUnicode_Check(obj))
#endif
#else  
  if (PyString_Check(obj))
#endif
  {
    char *cstr; Py_ssize_t len;
    int ret = SWIG_OK;
#if PY_VERSION_HEX>=0x03000000
#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    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;
    if (!obj)
      return SWIG_TypeError;
    if (alloc)
      *alloc = SWIG_NEWOBJ;
#endif
    if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
      return SWIG_TypeError;
#else
    if (PyString_AsStringAndSize(obj, &cstr, &len) == -1)
      return SWIG_TypeError;
#endif
    if (cptr) {
      if (alloc) {
	if (*alloc == SWIG_NEWOBJ) {
	  *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
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
	*cptr = PyBytes_AsString(obj);
#else
	assert(0); /* Should never reach here with Unicode strings in Python 3 */
#endif
#else
	*cptr = SWIG_Python_str_AsChar(obj);
        if (!*cptr)
          ret = SWIG_TypeError;
#endif
      }
    }
    if (psize) *psize = len + 1;
#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    Py_XDECREF(obj);
#endif
    return ret;
  } else {
#if defined(SWIG_PYTHON_2_UNICODE)
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
#endif
#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 (!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);
  }

int GetGEOSVersionMajor() {
    int num;
    OGRGetGEOSVersion(&num, NULL, NULL);
    return num;
}

int GetGEOSVersionMinor() {
    int num;
    OGRGetGEOSVersion(NULL, &num, NULL);
    return num;
}

int GetGEOSVersionMicro() {
    int num;
    OGRGetGEOSVersion(NULL, NULL, &num);
    return num;
}

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 );
   }

/************************************************************************/
/*                         CSLFromPySequence()                          */
/************************************************************************/
static char **CSLFromPySequence( PyObject *pySeq, int *pbErr )

{
  *pbErr = FALSE;
  /* Check if is a list (and reject strings, that are seen as sequence of characters)  */
  if ( ! PySequence_Check(pySeq) || PyUnicode_Check(pySeq) ) {
    PyErr_SetString(PyExc_TypeError,"not a sequence");
    *pbErr = TRUE;
    return NULL;
  }

  Py_ssize_t size = PySequence_Size(pySeq);
  if( size != (int)size ) {
    PyErr_SetString(PyExc_TypeError, "too big sequence");
    *pbErr = TRUE;
    return NULL;
  }
  char** papszRet = NULL;
  for (int i = 0; i < (int)size; i++) {
    PyObject* pyObj = PySequence_GetItem(pySeq,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");
        CSLDestroy(papszRet);
        *pbErr = TRUE;
        return NULL;
      }
      PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
      papszRet = CSLAddString( papszRet, pszStr );
      Py_XDECREF(pyUTF8Str);
    }
    else if (PyBytes_Check(pyObj))
      papszRet = CSLAddString( papszRet, PyBytes_AsString(pyObj) );
    else
    {
        Py_DECREF(pyObj);
        PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
        CSLDestroy(papszRet);
        *pbErr = TRUE;
        return NULL;
    }
    Py_DECREF(pyObj);
  }
  return papszRet;
}

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 = (double) 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 OGRErr OGRDataSourceShadow_AbortSQL(OGRDataSourceShadow *self){
    return GDALDatasetAbortSQL((OGRDataSourceShadow*)self);
  }
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 OGRErr OGRLayerShadow_Rename(OGRLayerShadow *self,char const *new_name){
    return OGR_L_Rename( self, new_name);
  }
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);
  }

static int*
CreateCIntListFromSequence( PyObject* pySeq, int* pnSize ) {
  /* check if is List */
  if ( !PySequence_Check(pySeq) ) {
    PyErr_SetString(PyExc_TypeError, "not a sequence");
    *pnSize = -1;
    return NULL;
  }
  Py_ssize_t size = PySequence_Size(pySeq);
  if( size != (int)size ) {
    PyErr_SetString(PyExc_TypeError, "too big sequence");
    *pnSize = -1;
    return NULL;
  }
  *pnSize = (int)size;
  int* ret = (int*) malloc(*pnSize*sizeof(int));
  for( int i = 0; i<*pnSize; i++ ) {
    PyObject *o = PySequence_GetItem(pySeq,i);
    if ( !PyArg_Parse(o,"i",&ret[i]) ) {
        PyErr_SetString(PyExc_TypeError, "not an integer");
        Py_DECREF(o);
        free(ret);
        *pnSize = -1;
        return NULL;
    }
    Py_DECREF(o);
  }
  return ret;
}

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*)VSIMalloc(*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*)VSIMalloc(*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
/* isfinite() is a macro for C99 */
# if defined(isfinite)
#  define SWIG_isfinite(X) (isfinite(X))
# elif defined(__cplusplus) && __cplusplus >= 201103L
/* Use a template so that this works whether isfinite() is std::isfinite() or
 * in the global namespace.  The reality seems to vary between compiler
 * versions.
 *
 * Make sure namespace std exists to avoid compiler warnings.
 *
 * extern "C++" is required as this fragment can end up inside an extern "C" { } block
 */
namespace std { }
extern "C++" template<typename T>
inline int SWIG_isfinite_func(T x) {
  using namespace std;
  return isfinite(x);
}
#  define SWIG_isfinite(X) (SWIG_isfinite_func(X))
# elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
#  define SWIG_isfinite(X) (__builtin_isfinite(X))
# elif defined(__clang__) && defined(__has_builtin)
#  if __has_builtin(__builtin_isfinite)
#   define SWIG_isfinite(X) (__builtin_isfinite(X))
#  endif
# 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:
            case OFSTJSON:
            case OFSTUUID:
                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 char const *OGRFieldDefnShadow_GetAlternativeName(OGRFieldDefnShadow *self){
    return OGR_Fld_GetAlternativeNameRef(self);
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetAlternativeNameRef(OGRFieldDefnShadow *self){
    return OGR_Fld_GetAlternativeNameRef(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetAlternativeName(OGRFieldDefnShadow *self,char const *alternativeName){
    OGR_Fld_SetAlternativeName(self, alternativeName);
  }
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 int OGRFieldDefnShadow_IsUnique(OGRFieldDefnShadow *self){
    return OGR_Fld_IsUnique( self );
  }
SWIGINTERN void OGRFieldDefnShadow_SetUnique(OGRFieldDefnShadow *self,int bUnique){
    OGR_Fld_SetUnique( self, bUnique );
  }
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 char const *OGRFieldDefnShadow_GetDomainName(OGRFieldDefnShadow *self){
    return OGR_Fld_GetDomainName(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetDomainName(OGRFieldDefnShadow *self,char const *name){
    OGR_Fld_SetDomainName( self, name );
  }
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( size_t len, char *bin_string,
                                            OSRSpatialReferenceShadow *reference=NULL ) {
    OGRGeometryH geom = NULL;
    OGRErr err = OGR_G_CreateFromWkbEx( (unsigned char *) bin_string,
                                        reference,
                                        &geom,
                                        len );
    if (err != 0 ) {
       CPLError(CE_Failure, err, "%s", OGRErrMessages(err));
       return NULL;
    }
    return (OGRGeometryShadow*) geom;
  }



SWIGINTERN int
SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
{
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(obj)) {
    long v = PyInt_AsLong(obj);
    if (v >= 0) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      return SWIG_OverflowError;
    }
  } else
#endif
  if (PyLong_Check(obj)) {
    unsigned long v = PyLong_AsUnsignedLong(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;
    unsigned long v = PyLong_AsUnsignedLong(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, 0, ULONG_MAX)) {
	if (val) *val = (unsigned long)(d);
	return res;
      }
    }
  }
#endif
  return SWIG_TypeError;
}


#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
#  define SWIG_LONG_LONG_AVAILABLE
#endif


#ifdef SWIG_LONG_LONG_AVAILABLE
SWIGINTERN int
SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
{
  int res = SWIG_TypeError;
  if (PyLong_Check(obj)) {
    unsigned long long v = PyLong_AsUnsignedLongLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      res = SWIG_OverflowError;
    }
  } else {
    unsigned long v;
    res = SWIG_AsVal_unsigned_SS_long (obj,&v);
    if (SWIG_IsOK(res)) {
      if (val) *val = v;
      return res;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    const double mant_max = 1LL << DBL_MANT_DIG;
    double d;
    res = SWIG_AsVal_double (obj,&d);
    if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max))
      return SWIG_OverflowError;
    if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
      if (val) *val = (unsigned long long)(d);
      return SWIG_AddCast(res);
    }
    res = SWIG_TypeError;
  }
#endif
  return res;
}
#endif


SWIGINTERNINLINE int
SWIG_AsVal_size_t (PyObject * obj, size_t *val)
{
  int res = SWIG_TypeError;
#ifdef SWIG_LONG_LONG_AVAILABLE
  if (sizeof(size_t) <= sizeof(unsigned long)) {
#endif
    unsigned long v;
    res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
    if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
#ifdef SWIG_LONG_LONG_AVAILABLE
  } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
    unsigned long long v;
    res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
    if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
  }
#endif
  return res;
}


  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 *CreateGeometryFromEsriJson( const char * input_string ) {
    OGRGeometryShadow* geom = (OGRGeometryShadow*)OGR_G_CreateGeometryFromEsriJson(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,size_t *nLen,char **pBuf,OGRwkbByteOrder byte_order=wkbNDR){
    *nLen = OGR_G_WkbSizeEx( self );
    *pBuf = (char *) VSI_MALLOC_VERBOSE( *nLen );
    if( *pBuf == NULL )
        return 6;
    return OGR_G_ExportToWkb(self, byte_order, (unsigned char*) *pBuf );
  }
SWIGINTERN OGRErr OGRGeometryShadow_ExportToIsoWkb(OGRGeometryShadow *self,size_t *nLen,char **pBuf,OGRwkbByteOrder byte_order=wkbNDR){
    *nLen = OGR_G_WkbSizeEx( self );
    *pBuf = (char *) VSI_MALLOC_VERBOSE( *nLen );
    if( *pBuf == NULL )
        return 6;
    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( const double *first, size_t 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_MakeValid(OGRGeometryShadow *self,char **options=NULL){
    return (OGRGeometryShadow*) OGR_G_MakeValidEx(self, options);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Normalize(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Normalize(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_RemoveLowerDimensionSubGeoms(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_RemoveLowerDimensionSubGeoms(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__SWIG_0(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 size_t OGRGeometryShadow_WkbSize(OGRGeometryShadow *self){
    return OGR_G_WkbSizeEx(self);
  }

  #define SWIG_From_long   PyInt_FromLong 


SWIGINTERNINLINE PyObject* 
SWIG_From_unsigned_SS_long  (unsigned long value)
{
  return (value > LONG_MAX) ?
    PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
}


#ifdef SWIG_LONG_LONG_AVAILABLE
SWIGINTERNINLINE PyObject* 
SWIG_From_unsigned_SS_long_SS_long  (unsigned long long value)
{
  return (value > LONG_MAX) ?
    PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value));
}
#endif


SWIGINTERNINLINE PyObject *
SWIG_From_size_t  (size_t value)
{    
#ifdef SWIG_LONG_LONG_AVAILABLE
  if (sizeof(size_t) <= sizeof(unsigned long)) {
#endif
    return SWIG_From_unsigned_SS_long  (static_cast< unsigned long >(value));
#ifdef SWIG_LONG_LONG_AVAILABLE
  } else {
    /* assume sizeof(size_t) <= sizeof(unsigned long long) */
    return SWIG_From_unsigned_SS_long_SS_long  (static_cast< unsigned long long >(value));
  }
#endif
}

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);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Transform__SWIG_1(OGRGeometryShadow *self,OGRGeomTransformerShadow *transformer){
    return (OGRGeometryShadow*)OGR_GeomTransformer_Transform(transformer, self);
  }
SWIGINTERN OGRPreparedGeometryShadow *OGRGeometryShadow_CreatePreparedGeometry(OGRGeometryShadow *self){
    return (OGRPreparedGeometryShadow*)OGRCreatePreparedGeometry(self);
  }
SWIGINTERN void delete_OGRPreparedGeometryShadow(OGRPreparedGeometryShadow *self){
    OGRDestroyPreparedGeometry( self );
  }
SWIGINTERN bool OGRPreparedGeometryShadow_Intersects(OGRPreparedGeometryShadow *self,OGRGeometryShadow const *otherGeom){
    return OGRPreparedGeometryIntersects(self, (OGRGeometryH)otherGeom);
  }
SWIGINTERN bool OGRPreparedGeometryShadow_Contains(OGRPreparedGeometryShadow *self,OGRGeometryShadow const *otherGeom){
    return OGRPreparedGeometryContains(self, (OGRGeometryH)otherGeom);
  }
SWIGINTERN OGRGeomTransformerShadow *new_OGRGeomTransformerShadow(OSRCoordinateTransformationShadow *ct,char **options=NULL){
    return OGR_GeomTransformer_Create(ct, options);
  }
SWIGINTERN void delete_OGRGeomTransformerShadow(OGRGeomTransformerShadow *self){
    OGR_GeomTransformer_Destroy( self );
  }
SWIGINTERN OGRGeometryShadow *OGRGeomTransformerShadow_Transform(OGRGeomTransformerShadow *self,OGRGeometryShadow *src_geom){
    return (OGRGeometryShadow*)OGR_GeomTransformer_Transform(self, src_geom);
  }
SWIGINTERN void delete_OGRFieldDomainShadow(OGRFieldDomainShadow *self){
    OGR_FldDomain_Destroy(self);
  }
SWIGINTERN char const *OGRFieldDomainShadow_GetName(OGRFieldDomainShadow *self){
    return OGR_FldDomain_GetName(self);
  }
SWIGINTERN char const *OGRFieldDomainShadow_GetDescription(OGRFieldDomainShadow *self){
    return OGR_FldDomain_GetDescription(self);
  }
SWIGINTERN OGRFieldType OGRFieldDomainShadow_GetFieldType(OGRFieldDomainShadow *self){
    return OGR_FldDomain_GetFieldType(self);
  }
SWIGINTERN OGRFieldSubType OGRFieldDomainShadow_GetFieldSubType(OGRFieldDomainShadow *self){
    return OGR_FldDomain_GetFieldSubType(self);
  }
SWIGINTERN OGRFieldDomainType OGRFieldDomainShadow_GetDomainType(OGRFieldDomainShadow *self){
    return OGR_FldDomain_GetDomainType(self);
  }
SWIGINTERN OGRFieldDomainSplitPolicy OGRFieldDomainShadow_GetSplitPolicy(OGRFieldDomainShadow *self){
    return OGR_FldDomain_GetSplitPolicy(self);
  }
SWIGINTERN void OGRFieldDomainShadow_SetSplitPolicy(OGRFieldDomainShadow *self,OGRFieldDomainSplitPolicy policy){
    OGR_FldDomain_SetSplitPolicy(self, policy);
  }
SWIGINTERN OGRFieldDomainMergePolicy OGRFieldDomainShadow_GetMergePolicy(OGRFieldDomainShadow *self){
    return OGR_FldDomain_GetMergePolicy(self);
  }
SWIGINTERN void OGRFieldDomainShadow_SetMergePolicy(OGRFieldDomainShadow *self,OGRFieldDomainMergePolicy policy){
    OGR_FldDomain_SetMergePolicy(self, policy);
  }
SWIGINTERN OGRCodedValue const *OGRFieldDomainShadow_GetEnumeration(OGRFieldDomainShadow *self){
    return OGR_CodedFldDomain_GetEnumeration(self);
  }
SWIGINTERN double OGRFieldDomainShadow_GetMinAsDouble(OGRFieldDomainShadow *self){
      const OGRField* psVal = OGR_RangeFldDomain_GetMin(self, NULL);
      if( psVal == NULL || OGR_RawField_IsUnset(psVal) )
          return CPLAtof("-inf");
      const OGRFieldType eType = OGR_FldDomain_GetFieldType(self);
      if( eType == OFTInteger )
          return psVal->Integer;
      if( eType == OFTInteger64 )
          return (double)psVal->Integer64;
      if( eType == OFTReal )
          return psVal->Real;
      return CPLAtof("-inf");
  }
SWIGINTERN bool OGRFieldDomainShadow_IsMinInclusive(OGRFieldDomainShadow *self){
      bool isInclusive = false;
      (void)OGR_RangeFldDomain_GetMin(self, &isInclusive);
      return isInclusive;
  }
SWIGINTERN double OGRFieldDomainShadow_GetMaxAsDouble(OGRFieldDomainShadow *self){
      const OGRField* psVal = OGR_RangeFldDomain_GetMax(self, NULL);
      if( psVal == NULL || OGR_RawField_IsUnset(psVal) )
          return CPLAtof("inf");
      const OGRFieldType eType = OGR_FldDomain_GetFieldType(self);
      if( eType == OFTInteger )
          return psVal->Integer;
      if( eType == OFTInteger64 )
          return (double)psVal->Integer64;
      if( eType == OFTReal )
          return psVal->Real;
      return CPLAtof("inf");
  }
SWIGINTERN bool OGRFieldDomainShadow_IsMaxInclusive(OGRFieldDomainShadow *self){
      bool isInclusive = false;
      (void)OGR_RangeFldDomain_GetMax(self, &isInclusive);
      return isInclusive;
  }
SWIGINTERN char const *OGRFieldDomainShadow_GetGlob(OGRFieldDomainShadow *self){
      return OGR_GlobFldDomain_GetGlob(self);
  }

static
OGRFieldDomainShadow* CreateCodedFieldDomain( const char *name,
                                              const char* description,
                                              OGRFieldType type,
                                              OGRFieldSubType subtype,
                                              const OGRCodedValue* enumeration) {
  return (OGRFieldDomainShadow*) OGR_CodedFldDomain_Create( name,
                                                            description,
                                                            type,
                                                            subtype,
                                                            enumeration );
}


static
OGRFieldDomainShadow* CreateRangeFieldDomain( const char *name,
                                              const char* description,
                                              OGRFieldType type,
                                              OGRFieldSubType subtype,
                                              double min,
                                              bool minIsInclusive,
                                              double max,
                                              double maxIsInclusive) {
  OGRField sMin;
  if( type == OFTInteger )
      sMin.Integer = static_cast<int>(min);
  else if( type == OFTInteger64 )
      sMin.Integer64 = static_cast<GIntBig>(min);
  else if( type == OFTReal )
      sMin.Real = min;
  else
      return NULL;
  OGRField sMax;
  if( type == OFTInteger )
      sMax.Integer = static_cast<int>(max);
  else if( type == OFTInteger64 )
      sMax.Integer64 = static_cast<GIntBig>(max);
  else if( type == OFTReal )
      sMax.Real = max;
  else
      return NULL;
  return (OGRFieldDomainShadow*) OGR_RangeFldDomain_Create( name,
                                                            description,
                                                            type,
                                                            subtype,
                                                            &sMin,
                                                            minIsInclusive,
                                                            &sMax,
                                                            maxIsInclusive );
}


SWIGINTERN int
SWIG_AsVal_bool (PyObject *obj, bool *val)
{
  int r;
  if (!PyBool_Check(obj))
    return SWIG_ERROR;
  r = PyObject_IsTrue(obj);
  if (r == -1)
    return SWIG_ERROR;
  if (val) *val = r ? true : false;
  return SWIG_OK;
}


static
OGRFieldDomainShadow* CreateGlobFieldDomain( const char *name,
                                             const char* description,
                                             OGRFieldType type,
                                             OGRFieldSubType subtype,
                                             const char* glob ) {
  return (OGRFieldDomainShadow*) OGR_GlobFldDomain_Create( name,
                                                           description,
                                                           type,
                                                           subtype,
                                                           glob );
}


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;

    bool bReloadDrivers = ( CSLFindString(papszArgv, "GDAL_SKIP") >= 0 ||
                            CSLFindString(papszArgv, "OGR_SKIP") >= 0 );

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

    if( bReloadDrivers )
    {
        GDALAllRegister();
    }

    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 *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "GetUseExceptions", 0, 0, 0)) SWIG_fail;
  {
#ifdef SED_HACKS
    if( bUseExceptions ) bLocalUseExceptionsCode = FALSE;
#endif
    result = 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 (!SWIG_Python_UnpackTuple(args, "UseExceptions", 0, 0, 0)) 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 (!SWIG_Python_UnpackTuple(args, "DontUseExceptions", 0, 0, 0)) 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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetDescription", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  char **result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  char **result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_Dict", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 (swig_obj[1]) {
    res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &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 *swig_obj[2] ;
  char **result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_List", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 (swig_obj[1]) {
    res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  CPLErr result;
  
  if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1] ) ) {
      Py_ssize_t size = PySequence_Size(swig_obj[1]);
      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(swig_obj[1],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( swig_obj[1] ) ) {
      /* We need to use the dictionary form. */
      Py_ssize_t size = PyMapping_Length( swig_obj[1] );
      if ( size > 0 && size == (int)size) {
        PyObject *item_list = PyMapping_Items( swig_obj[1] );
        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);
            Py_DECREF(item_list);
            PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
            SWIG_fail;
          }
          
          PyObject* kStr = PyObject_Str(k);
          if( PyErr_Occurred() )
          {
            Py_DECREF(it);
            Py_DECREF(item_list);
            SWIG_fail;
          }
          
          PyObject* vStr;
          if( PyBytes_Check(v) )
          {
            vStr = v;
            Py_INCREF(vStr);
          }
          else
          {
            vStr = PyObject_Str(v);
            if( PyErr_Occurred() )
            {
              Py_DECREF(it);
              Py_DECREF(kStr);
              Py_DECREF(item_list);
              SWIG_fail;
            }
          }
          
          int bFreeK, bFreeV;
          char* pszK = GDALPythonObjectToCStr(kStr, &bFreeK);
          char* pszV = GDALPythonObjectToCStr(vStr, &bFreeV);
          if( pszK == NULL || pszV == NULL )
          {
            GDALPythonFreeCStr(pszK, bFreeK);
            GDALPythonFreeCStr(pszV, bFreeV);
            Py_DECREF(kStr);
            Py_DECREF(vStr);
            Py_DECREF(it);
            Py_DECREF(item_list);
            PyErr_SetString(PyExc_TypeError,"Cannot get key/value as string");
            SWIG_fail;
          }
          arg2 = CSLAddNameValue( arg2, pszK, pszV );
          
          GDALPythonFreeCStr(pszK, bFreeK);
          GDALPythonFreeCStr(pszV, bFreeV);
          Py_DECREF(kStr);
          Py_DECREF(vStr);
          Py_DECREF(it);
        }
        Py_DECREF(item_list);
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  if (swig_obj[2]) {
    res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  CPLErr result;
  
  if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 (swig_obj[2]) {
    res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadata", 0, 3, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
        }
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_MajorObject_SetMetadata__SWIG_0(self, argc, argv);
        }
      }
    }
  }
  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, argc, argv);
        }
        int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
        _v = SWIG_CheckState(res);
        if (_v) {
          return _wrap_MajorObject_SetMetadata__SWIG_1(self, argc, argv);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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 *swig_obj[3] ;
  char *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadataItem", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 (swig_obj[2]) {
    res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &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 *swig_obj[4] ;
  CPLErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "MajorObject_SetMetadataItem", 3, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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(swig_obj[2], &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 (swig_obj[3]) {
    res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &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 (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_GDALMajorObjectShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_GetGEOSVersionMajor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "GetGEOSVersionMajor", 0, 0, 0)) SWIG_fail;
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GetGEOSVersionMajor();
      SWIG_PYTHON_THREAD_END_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_GetGEOSVersionMinor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "GetGEOSVersionMinor", 0, 0, 0)) SWIG_fail;
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GetGEOSVersionMinor();
      SWIG_PYTHON_THREAD_END_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_GetGEOSVersionMicro(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "GetGEOSVersionMicro", 0, 0, 0)) SWIG_fail;
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GetGEOSVersionMicro();
      SWIG_PYTHON_THREAD_END_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_new_StyleTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRStyleTableShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "new_StyleTable", 0, 0, 0)) 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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "StyleTable_AddStyle", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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(swig_obj[2], &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 *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "StyleTable_LoadStyleTable", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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 *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "StyleTable_SaveStyleTable", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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 *swig_obj[2] ;
  char *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "StyleTable_Find", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRStyleTableShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *StyleTable_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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, "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 */
      int bErr = FALSE;
      arg3 = CSLFromPySequence(obj2, &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  {
    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, "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 */
      int bErr = FALSE;
      arg4 = CSLFromPySequence(obj3, &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    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, "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 *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "Driver_DeleteDataSource", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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 *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args, "Driver_TestCapability", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  OGRDriverShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "DataSource_DeleteLayer", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  OGRErr result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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, "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 */
      int bErr = FALSE;
      arg5 = CSLFromPySequence(obj4, &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  {
    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, "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 */
      int bErr = FALSE;
      arg4 = CSLFromPySequence(obj3, &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  {
    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 *swig_obj[2] ;
  OGRLayerShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "DataSource_GetLayerByIndex", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &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 *swig_obj[2] ;
  OGRLayerShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "DataSource_GetLayerByName", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args, "DataSource_TestCapability", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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, "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_AbortSQL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRErr result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_AbortSQL" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRDataSourceShadow_AbortSQL(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_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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "DataSource_ReleaseResultSet", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], 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 *swig_obj[1] ;
  OGRStyleTableShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "DataSource_SetStyleTable", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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, "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 *swig_obj[1] ;
  OGRErr result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  OGRErr result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRDataSourceShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_Layer_Rename(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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Layer_Rename", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Rename" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Rename" "', 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 = (OGRErr)OGRLayerShadow_Rename(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;
    }
  }
  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_GetRefCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  if ((nobjs < 5) || (nobjs > 5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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(swig_obj[2], &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(swig_obj[3], &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(swig_obj[4], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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(swig_obj[2], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Layer_SetSpatialFilter", 0, 3, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  if ((nobjs < 6) || (nobjs > 6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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(swig_obj[2], &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(swig_obj[3], &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(swig_obj[4], &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(swig_obj[5], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Layer_SetSpatialFilterRect", 0, 6, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
            }
          }
        }
      }
    }
  }
  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, argc, argv);
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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 *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Layer_SetAttributeFilter", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  OGRwkbGeometryType result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  OGRFeatureShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "Layer_GetFeature", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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);
  {
    arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
  }
  {
    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 *swig_obj[1] ;
  OGRFeatureShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Layer_SetNextByIndex", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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);
  {
    arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
  }
  {
    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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Layer_SetFeature", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Layer_CreateFeature", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Layer_DeleteFeature", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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);
  {
    arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
  }
  {
    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 *swig_obj[1] ;
  OGRErr result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  OGRFeatureDefnShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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, "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
  }
  {
    resultobj = PyLong_FromLongLong(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_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, "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 *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args, "Layer_TestCapability", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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, "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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Layer_DeleteField", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[3] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Layer_ReorderField", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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(swig_obj[2], &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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Layer_ReorderFields", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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)*/
    arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
    if( arg2 < 0 ) {
      SWIG_fail;
    }
  }
  {
    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) */
    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 nList, int* pList) */
    free(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 *swig_obj[4] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Layer_AlterFieldDefn", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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(swig_obj[2], &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(swig_obj[3], &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, "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 *swig_obj[1] ;
  OGRErr result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  OGRErr result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  OGRErr result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "Layer_FindFieldIndex", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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(swig_obj[2], &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 *swig_obj[1] ;
  OSRSpatialReferenceShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  GIntBig result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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
  }
  {
    resultobj = PyLong_FromLongLong(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_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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Layer_SetIgnoredFields", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 */
    int bErr = FALSE;
    arg2 = CSLFromPySequence(swig_obj[1], &bErr);
    if( bErr )
    {
      SWIG_fail;
    }
  }
  {
    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, "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 */
      int bErr = FALSE;
      arg4 = CSLFromPySequence(obj3, &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  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, "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 */
      int bErr = FALSE;
      arg4 = CSLFromPySequence(obj3, &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  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, "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 */
      int bErr = FALSE;
      arg4 = CSLFromPySequence(obj3, &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  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, "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 */
      int bErr = FALSE;
      arg4 = CSLFromPySequence(obj3, &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  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, "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 */
      int bErr = FALSE;
      arg4 = CSLFromPySequence(obj3, &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  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, "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 */
      int bErr = FALSE;
      arg4 = CSLFromPySequence(obj3, &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  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, "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 */
      int bErr = FALSE;
      arg4 = CSLFromPySequence(obj3, &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  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 *swig_obj[1] ;
  OGRStyleTableShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "Layer_SetStyleTable", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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, "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 *swig_obj[1] ;
  OGRFeatureDefnShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetGeometry", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetGeometryDirectly", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], 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 *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  OGRErr result;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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(swig_obj[2], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  OGRErr result;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  res3 = SWIG_ConvertPtr(swig_obj[2], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_SetGeomField", 0, 3, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
        }
      }
    }
  }
  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, argc, argv);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  OGRErr result;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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(swig_obj[2], 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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  OGRErr result;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  res3 = SWIG_ConvertPtr(swig_obj[2], 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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_SetGeomFieldDirectly", 0, 3, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
        }
      }
    }
  }
  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, argc, argv);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetGeomFieldRef", 0, 2, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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 *swig_obj[1] ;
  OGRFeatureShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_Equal", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  OGRFieldDefnShadow *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  OGRFieldDefnShadow *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldDefnRef", 0, 2, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  OGRGeomFieldDefnShadow *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  OGRGeomFieldDefnShadow *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetGeomFieldDefnRef", 0, 2, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  char *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  char *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsString", 0, 2, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  int result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsInteger", 0, 2, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  GIntBig result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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
  }
  {
    resultobj = PyLong_FromLongLong(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_GetFieldAsInteger64__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  GIntBig result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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
  }
  {
    resultobj = PyLong_FromLongLong(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_GetFieldAsInteger64(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsInteger64", 0, 2, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  double result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsDouble", 0, 2, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  arg3 = &temp3;
  arg4 = &temp4;
  arg5 = &temp5;
  arg6 = &temp6;
  arg7 = &temp7;
  arg8 = &temp8;
  arg9 = &temp9;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  arg3 = &temp3;
  arg4 = &temp4;
  arg5 = &temp5;
  arg6 = &temp6;
  arg7 = &temp7;
  arg8 = &temp8;
  arg9 = &temp9;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsDateTime", 0, 2, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen3, const int **pList3) (int nLen3, int *pList3) */
    arg3 = &nLen3;
    arg4 = &pList3;
  }
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen3, const int **pList3) (int nLen3, int *pList3) */
    arg3 = &nLen3;
    arg4 = &pList3;
  }
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsIntegerList", 0, 2, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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 *swig_obj[2] ;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen3, const GIntBig **pList3) (int nLen3, GIntBig *pList3) */
    arg3 = &nLen3;
    arg4 = &pList3;
  }
  if (!SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsInteger64List", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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;
      val = PyLong_FromString(szTmp, NULL, 10);
      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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen3, const double **pList3) (int nLen3, double *pList3) */
    arg3 = &nLen3;
    arg4 = &pList3;
  }
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen3, const double **pList3) (int nLen3, double *pList3) */
    arg3 = &nLen3;
    arg4 = &pList3;
  }
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsDoubleList", 0, 2, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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 *swig_obj[2] ;
  char **result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsStringList", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen3, char **pBuf3 ) */
    arg3 = &nLen3;
    arg4 = &pBuf3;
  }
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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);
    resultobj = PyByteArray_FromStringAndSize( *arg4, *arg3 );
  }
  {
    /* %typemap(freearg) (int *nLen, char **pBuf ) */
    VSIFree( *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 ) */
    VSIFree( *arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsBinary__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen3, char **pBuf3 ) */
    arg3 = &nLen3;
    arg4 = &pBuf3;
  }
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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);
    resultobj = PyByteArray_FromStringAndSize( *arg4, *arg3 );
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) (int *nLen, char **pBuf ) */
    VSIFree( *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 ) */
    VSIFree( *arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsBinary(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsBinary", 0, 2, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  bool result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  bool result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_IsFieldSet", 0, 2, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  bool result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  bool result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_IsFieldNull", 0, 2, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  bool result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  bool result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_IsFieldSetAndNotNull", 0, 2, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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 *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_GetFieldIndex", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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 *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_GetGeomFieldIndex", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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 *swig_obj[1] ;
  GIntBig result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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
  }
  {
    resultobj = PyLong_FromLongLong(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_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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetFID", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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);
  {
    arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
  }
  {
    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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_UnsetField", 0, 2, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_SetFieldNull", 0, 2, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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( swig_obj[2] );
    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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(in) (tostring argin) */
    str3 = PyObject_Str( swig_obj[2] );
    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 *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldInteger64", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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);
  {
    arg3 = (GIntBig)PyLong_AsLongLong(swig_obj[2]);
  }
  {
    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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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(swig_obj[2], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  ecode3 = SWIG_AsVal_double(swig_obj[2], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  if ((nobjs < 9) || (nobjs > 9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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(swig_obj[2], &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(swig_obj[3], &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(swig_obj[4], &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(swig_obj[5], &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(swig_obj[6], &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(swig_obj[7], &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(swig_obj[8], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  if ((nobjs < 9) || (nobjs > 9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  ecode3 = SWIG_AsVal_int(swig_obj[2], &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(swig_obj[3], &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(swig_obj[4], &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(swig_obj[5], &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(swig_obj[6], &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(swig_obj[7], &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(swig_obj[8], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_SetField", 0, 9, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
        }
      }
    }
  }
  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, argc, argv);
        }
      }
    }
  }
  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, argc, argv);
        }
      }
    }
  }
  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, argc, argv);
        }
      }
    }
  }
  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, argc, argv);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  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, argc, argv);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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 *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldIntegerList", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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)*/
    arg4 = CreateCIntListFromSequence(swig_obj[2], &arg3);
    if( arg3 < 0 ) {
      SWIG_fail;
    }
  }
  {
    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) */
    free(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) */
    free(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 *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldInteger64List", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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(swig_obj[2]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[2]);
    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(swig_obj[2],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 *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldDoubleList", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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(swig_obj[2]) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    Py_ssize_t size = PySequence_Size(swig_obj[2]);
    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(swig_obj[2],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 *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldStringList", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 */
    int bErr = FALSE;
    arg3 = CSLFromPySequence(swig_obj[2], &bErr);
    if( bErr )
    {
      SWIG_fail;
    }
  }
  {
    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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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(swig_obj[2], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_SetFieldBinaryFromHexString", 0, 3, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
        }
      }
    }
  }
  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, argc, argv);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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, "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 *swig_obj[4] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetFromWithMap", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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(swig_obj[2], &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)*/
    arg5 = CreateCIntListFromSequence(swig_obj[3], &arg4);
    if( arg4 < 0 ) {
      SWIG_fail;
    }
  }
  {
    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) */
    free(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) */
    free(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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetStyleString", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  OGRFieldType result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  OGRFieldType result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldType", 0, 2, argv))) SWIG_fail;
  --argc;
  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, argc, argv);
      }
    }
  }
  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, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("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 *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_Validate", 1, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &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 (swig_obj[2]) {
    ecode3 = SWIG_AsVal_int(swig_obj[2], &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 *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_FillUnsetWithDefault", 1, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &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 (swig_obj[2]) {
    {
      /* %typemap(in) char **options */
      int bErr = FALSE;
      arg3 = CSLFromPySequence(swig_obj[2], &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  {
    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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetNativeData", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetNativeMediaType", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldString", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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( swig_obj[2], &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 (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRFeatureShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *Feature_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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, "|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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  OGRFieldDefnShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_GetFieldDefn", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_GetFieldIndex", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_AddFieldDefn", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  OGRGeomFieldDefnShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_GetGeomFieldDefn", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_GetGeomFieldIndex", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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( swig_obj[1], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_AddGeomFieldDefn", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_DeleteGeomFieldDefn", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  OGRwkbGeometryType result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_SetGeomType", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_SetGeometryIgnored", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_SetStyleIgnored", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_IsSame", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *FeatureDefn_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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, "|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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetName", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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_GetAlternativeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetAlternativeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDefnShadow_GetAlternativeName(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_GetAlternativeNameRef(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetAlternativeNameRef" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDefnShadow_GetAlternativeNameRef(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_SetAlternativeName(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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetAlternativeName", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetAlternativeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetAlternativeName" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFieldDefnShadow_SetAlternativeName(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 *swig_obj[1] ;
  OGRFieldType result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetType", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  OGRFieldSubType result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetSubType", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  OGRJustification result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetJustify", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetWidth", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetPrecision", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  char *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "FieldDefn_GetFieldTypeName", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetIgnored", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetNullable", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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_IsUnique(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_IsUnique" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFieldDefnShadow_IsUnique(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_SetUnique(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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetUnique", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetUnique" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetUnique" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFieldDefnShadow_SetUnique(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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetDefault", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *_wrap_FieldDefn_GetDomainName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetDomainName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDefnShadow_GetDomainName(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_SetDomainName(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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetDomainName", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetDomainName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetDomainName" "', 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_SetDomainName(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 *FieldDefn_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRFieldDefnShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *FieldDefn_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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, "|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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetName", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  OGRwkbGeometryType result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetType", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  OSRSpatialReferenceShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetSpatialRef", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetIgnored", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetNullable", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRGeomFieldDefnShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GeomFieldDefn_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_CreateGeometryFromWkb(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  size_t arg1 ;
  char *arg2 = (char *) 0 ;
  OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
  int alloc1 = 0 ;
  bool viewIsValid1 = false ;
  Py_buffer view1 ;
  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, "O|O:CreateGeometryFromWkb", kwnames, &obj0, &obj1)) SWIG_fail;
  {
    /* %typemap(in,numinputs=1) (size_t nLen, char *pBuf ) */
    {
      if (PyObject_GetBuffer(obj0, &view1, PyBUF_SIMPLE) == 0)
      {
        viewIsValid1 = true;
        arg1 = view1.len;
        arg2 = (char *) view1.buf;
        goto ok;
      }
      else
      {
        PyErr_Clear();
      }
    }
    if (PyUnicode_Check(obj0))
    {
      size_t safeLen = 0;
      int ret;
      try {
        ret = SWIG_AsCharPtrAndSize(obj0, (char**) &arg2, &safeLen, &alloc1);
      }
      catch( const std::exception& )
      {
        SWIG_exception_fail( SWIG_MemoryError, "out of memory");
      }
      if (!SWIG_IsOK(ret)) {
        SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
      }
      
      if (safeLen) safeLen--;
      arg1 = safeLen;
    }
    else
    {
      PyErr_SetString(PyExc_TypeError, "not a unicode string, bytes, bytearray or memoryview");
      SWIG_fail;
    }
    ok: ;
  }
  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) (size_t *nLen, char *pBuf ) */
    if( viewIsValid1 ) {
      PyBuffer_Release(&view1);
    }
    else 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) (size_t *nLen, char *pBuf ) */
    if( viewIsValid1 ) {
      PyBuffer_Release(&view1);
    }
    else 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, "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 *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &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 *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &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_CreateGeometryFromEsriJson(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGeometryFromEsriJson" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)CreateGeometryFromEsriJson((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, "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, "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 *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[3] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "ForceTo", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 (swig_obj[2]) {
    {
      /* %typemap(in) char **options */
      int bErr = FALSE;
      arg3 = CSLFromPySequence(swig_obj[2], &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  {
    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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 ;
  bool viewIsValid3 = false ;
  Py_buffer view3 ;
  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, "|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 (PyObject_GetBuffer(obj2, &view3, PyBUF_SIMPLE) == 0)
        {
          if( view3.len > INT_MAX ) {
            PyBuffer_Release(&view3);
            SWIG_exception( SWIG_RuntimeError, "too large buffer (>2GB)" );
          }
          viewIsValid3 = true;
          arg3 = (int) view3.len;
          arg4 = (char *) view3.buf;
          goto ok;
        }
        else
        {
          PyErr_Clear();
        }
      }
      if (PyUnicode_Check(obj2))
      {
        size_t safeLen = 0;
        int ret;
        try {
          ret = SWIG_AsCharPtrAndSize(obj2, (char**) &arg4, &safeLen, &alloc3);
        }
        catch( const std::exception& )
        {
          SWIG_exception_fail( SWIG_MemoryError, "out of memory");
        }
        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
      {
        PyErr_SetString(PyExc_TypeError, "not a unicode string, bytes, bytearray or memoryview");
        SWIG_fail;
      }
      ok: ;
    }
  }
  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( viewIsValid3 ) {
      PyBuffer_Release(&view3);
    }
    else 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( viewIsValid3 ) {
      PyBuffer_Release(&view3);
    }
    else 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 *swig_obj[1] ;
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (char **argout2) */
    arg2 = &argout2;
  }
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (char **argout2) */
    arg2 = &argout2;
  }
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 ;
  size_t *arg2 = (size_t *) 0 ;
  char **arg3 = (char **) 0 ;
  OGRwkbByteOrder arg4 = (OGRwkbByteOrder) wkbNDR ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t 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) (size_t *nLen2, char **pBuf2 ) */
    arg2 = &nLen2;
    arg3 = &pBuf2;
  }
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "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) (size_t *nLen, char **pBuf ) */
    Py_XDECREF(resultobj);
    if( *arg3 ) {
      resultobj = PyByteArray_FromStringAndSize( *arg3, *arg2 );
    }
    else {
      resultobj = Py_None;
      Py_INCREF(Py_None);
    }
  }
  {
    /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
    VSIFree( *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) (size_t *nLen, char **pBuf ) */
    VSIFree( *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 ;
  size_t *arg2 = (size_t *) 0 ;
  char **arg3 = (char **) 0 ;
  OGRwkbByteOrder arg4 = (OGRwkbByteOrder) wkbNDR ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  size_t 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) (size_t *nLen2, char **pBuf2 ) */
    arg2 = &nLen2;
    arg3 = &pBuf2;
  }
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "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) (size_t *nLen, char **pBuf ) */
    Py_XDECREF(resultobj);
    if( *arg3 ) {
      resultobj = PyByteArray_FromStringAndSize( *arg3, *arg2 );
    }
    else {
      resultobj = Py_None;
      Py_INCREF(Py_None);
    }
  }
  {
    /* %typemap(freearg) (size_t *nLen, char **pBuf ) */
    VSIFree( *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) (size_t *nLen, char **pBuf ) */
    VSIFree( *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, "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 */
      int bErr = FALSE;
      arg2 = CSLFromPySequence(obj1, &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  {
    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 *swig_obj[2] ;
  retStringAndCPLFree *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_ExportToKML", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 (swig_obj[1]) {
    res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &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, "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 */
      int bErr = FALSE;
      arg2 = CSLFromPySequence(obj1, &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  {
    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, "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, "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, "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 *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_AddPoint_2D", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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(swig_obj[2], &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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_AddGeometryDirectly", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], 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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_AddGeometry", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_RemoveGeometry", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  OGRwkbGeometryType result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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, "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, "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, "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, "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, "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 *swig_obj[2] ;
  
  {
    /* %typemap(in,numinputs=0) (double argout3[ANY]) */
    memset(argout3, 0, sizeof(argout3));
    arg3 = argout3;
  }
  if (!SWIG_Python_UnpackTuple(args, "Geometry_GetPoint", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &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 *swig_obj[2] ;
  
  {
    /* %typemap(in,numinputs=0) (double argout3[ANY]) */
    memset(argout3, 0, sizeof(argout3));
    arg3 = argout3;
  }
  if (!SWIG_Python_UnpackTuple(args, "Geometry_GetPointZM", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &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 *swig_obj[2] ;
  
  {
    /* %typemap(in,numinputs=0) (double argout3[ANY]) */
    memset(argout3, 0, sizeof(argout3));
    arg3 = argout3;
  }
  if (!SWIG_Python_UnpackTuple(args, "Geometry_GetPoint_2D", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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, "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, "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, "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, "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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_GetGeometryRef", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Simplify", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_SimplifyPreserveTopology", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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, "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 *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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_MakeValid(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 ;
  PyObject *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_MakeValid", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_MakeValid" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **options */
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_MakeValid(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_Normalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Normalize" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Normalize(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_RemoveLowerDimensionSubGeoms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_RemoveLowerDimensionSubGeoms" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_RemoveLowerDimensionSubGeoms(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, "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 *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Intersection", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Union", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Difference", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_SymDifference", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_SymmetricDifference", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Distance", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Distance3D", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  bool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  bool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  bool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  bool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Intersects", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Intersect", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Equals", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Equal", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Disjoint", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Touches", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Crosses", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Within", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Contains", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Overlaps", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  OGRErr result;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_TransformTo", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
  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 ;
  OGRErr result;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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__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
  }
  {
    /* %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 *swig_obj[1] ;
  OSRSpatialReferenceShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_AssignSpatialReference", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Segmentize", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (double argout2[ANY]) */
    memset(argout2, 0, sizeof(argout2));
    arg2 = argout2;
  }
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (double argout2[ANY]) */
    memset(argout2, 0, sizeof(argout2));
    arg2 = argout2;
  }
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  size_t result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 = 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_size_t(static_cast< size_t >(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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_SetCoordinateDimension", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Set3D", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_SetMeasured", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_HasCurveGeometry", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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 (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &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, "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 */
      int bErr = FALSE;
      arg3 = CSLFromPySequence(obj2, &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  {
    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, "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 */
      int bErr = FALSE;
      arg2 = CSLFromPySequence(obj1, &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  {
    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 *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Value", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &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 *_wrap_Geometry_Transform__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeomTransformerShadow *arg2 = (OGRGeomTransformerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &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(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeomTransformerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Transform" "', argument " "2"" of type '" "OGRGeomTransformerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeomTransformerShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Transform__SWIG_1(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_Transform(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Geometry_Transform", 0, 2, argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Geometry_Transform__SWIG_0(self, argc, argv);
      }
    }
  }
  if (argc == 2) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OGRGeomTransformerShadow, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Geometry_Transform__SWIG_1(self, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Geometry_Transform'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRGeometryShadow::Transform(OSRCoordinateTransformationShadow *)\n"
    "    OGRGeometryShadow::Transform(OGRGeomTransformerShadow *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Geometry_CreatePreparedGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRPreparedGeometryShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_CreatePreparedGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRPreparedGeometryShadow *)OGRGeometryShadow_CreatePreparedGeometry(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_OGRPreparedGeometryShadow, 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 (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRGeometryShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *Geometry_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_delete_PreparedGeometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRPreparedGeometryShadow *arg1 = (OGRPreparedGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRPreparedGeometryShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PreparedGeometry" "', argument " "1"" of type '" "OGRPreparedGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRPreparedGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_OGRPreparedGeometryShadow(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_PreparedGeometry_Intersects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRPreparedGeometryShadow *arg1 = (OGRPreparedGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args, "PreparedGeometry_Intersects", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRPreparedGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PreparedGeometry_Intersects" "', argument " "1"" of type '" "OGRPreparedGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRPreparedGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PreparedGeometry_Intersects" "', argument " "2"" of type '" "OGRGeometryShadow const *""'"); 
  }
  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)OGRPreparedGeometryShadow_Intersects(arg1,(OGRGeometryShadow 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 ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PreparedGeometry_Contains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRPreparedGeometryShadow *arg1 = (OGRPreparedGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  if (!SWIG_Python_UnpackTuple(args, "PreparedGeometry_Contains", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRPreparedGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PreparedGeometry_Contains" "', argument " "1"" of type '" "OGRPreparedGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRPreparedGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PreparedGeometry_Contains" "', argument " "2"" of type '" "OGRGeometryShadow const *""'"); 
  }
  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)OGRPreparedGeometryShadow_Contains(arg1,(OGRGeometryShadow 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 ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *PreparedGeometry_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRPreparedGeometryShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_new_GeomTransformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
  char **arg2 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  OGRGeomTransformerShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "new_GeomTransformer", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GeomTransformer" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'"); 
  }
  arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **options */
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if( bErr )
      {
        SWIG_fail;
      }
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeomTransformerShadow *)new_OGRGeomTransformerShadow(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_OGRGeomTransformerShadow, SWIG_POINTER_NEW |  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_delete_GeomTransformer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeomTransformerShadow *arg1 = (OGRGeomTransformerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomTransformerShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GeomTransformer" "', argument " "1"" of type '" "OGRGeomTransformerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomTransformerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_OGRGeomTransformerShadow(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_GeomTransformer_Transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRGeomTransformerShadow *arg1 = (OGRGeomTransformerShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "GeomTransformer_Transform", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomTransformerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomTransformer_Transform" "', argument " "1"" of type '" "OGRGeomTransformerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomTransformerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomTransformer_Transform" "', 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 *)OGRGeomTransformerShadow_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
  }
  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 *GeomTransformer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRGeomTransformerShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *GeomTransformer_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_delete_FieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FieldDomain" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_OGRFieldDomainShadow(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_FieldDomain_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetName" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDomainShadow_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_FieldDomain_GetDescription(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetDescription" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDomainShadow_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_FieldDomain_GetFieldType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRFieldType result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetFieldType" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldType)OGRFieldDomainShadow_GetFieldType(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_FieldDomain_GetFieldSubType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRFieldSubType result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetFieldSubType" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldSubType)OGRFieldDomainShadow_GetFieldSubType(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_FieldDomain_GetDomainType(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRFieldDomainType result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetDomainType" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDomainType)OGRFieldDomainShadow_GetDomainType(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_FieldDomain_GetSplitPolicy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRFieldDomainSplitPolicy result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetSplitPolicy" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDomainSplitPolicy)OGRFieldDomainShadow_GetSplitPolicy(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_FieldDomain_SetSplitPolicy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  OGRFieldDomainSplitPolicy arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FieldDomain_SetSplitPolicy", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_SetSplitPolicy" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDomain_SetSplitPolicy" "', argument " "2"" of type '" "OGRFieldDomainSplitPolicy""'");
  } 
  arg2 = static_cast< OGRFieldDomainSplitPolicy >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFieldDomainShadow_SetSplitPolicy(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_FieldDomain_GetMergePolicy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRFieldDomainMergePolicy result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMergePolicy" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDomainMergePolicy)OGRFieldDomainShadow_GetMergePolicy(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_FieldDomain_SetMergePolicy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  OGRFieldDomainMergePolicy arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "FieldDomain_SetMergePolicy", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_SetMergePolicy" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDomain_SetMergePolicy" "', argument " "2"" of type '" "OGRFieldDomainMergePolicy""'");
  } 
  arg2 = static_cast< OGRFieldDomainMergePolicy >(val2);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFieldDomainShadow_SetMergePolicy(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_FieldDomain_GetEnumeration(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRCodedValue *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetEnumeration" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRCodedValue *)OGRFieldDomainShadow_GetEnumeration(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) OGRCodedValue* */
    if( result == NULL )
    {
      PyErr_SetString( PyExc_RuntimeError, CPLGetLastErrorMsg() );
      SWIG_fail;
    }
    PyObject *dict = PyDict_New();
    for( int i = 0; (result)[i].pszCode != NULL; i++ )
    {
      if( (result)[i].pszValue )
      {
        PyObject* val = GDALPythonObjectFromCStr((result)[i].pszValue);
        PyDict_SetItemString(dict, (result)[i].pszCode, val);
        Py_DECREF(val);
      }
      else
      {
        PyDict_SetItemString(dict, (result)[i].pszCode, Py_None);
      }
    }
    resultobj = dict;
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_GetMinAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMinAsDouble" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRFieldDomainShadow_GetMinAsDouble(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_FieldDomain_IsMinInclusive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_IsMinInclusive" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRFieldDomainShadow_IsMinInclusive(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_FieldDomain_GetMaxAsDouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMaxAsDouble" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRFieldDomainShadow_GetMaxAsDouble(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_FieldDomain_IsMaxInclusive(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_IsMaxInclusive" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRFieldDomainShadow_IsMaxInclusive(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_FieldDomain_GetGlob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetGlob" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDomainShadow_GetGlob(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 *FieldDomain_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_OGRFieldDomainShadow, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *_wrap_CreateCodedFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRFieldType arg3 ;
  OGRFieldSubType arg4 ;
  OGRCodedValue *arg5 = (OGRCodedValue *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[5] ;
  OGRFieldDomainShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "CreateCodedFieldDomain", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateCodedFieldDomain" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateCodedFieldDomain" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CreateCodedFieldDomain" "', argument " "3"" of type '" "OGRFieldType""'");
  } 
  arg3 = static_cast< OGRFieldType >(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CreateCodedFieldDomain" "', argument " "4"" of type '" "OGRFieldSubType""'");
  } 
  arg4 = static_cast< OGRFieldSubType >(val4);
  {
    /* %typemap(in) OGRCodedValue* enumeration */
    arg5 = NULL;
    
    if (swig_obj[4] == NULL || !PyMapping_Check(swig_obj[4])) {
      SWIG_exception_fail(SWIG_ValueError,"Expected dict.");
    }
    Py_ssize_t size = PyMapping_Length( swig_obj[4] );
    arg5 = (OGRCodedValue*)CPLCalloc(size+1, sizeof(OGRCodedValue) );
    
    PyObject *item_list = PyMapping_Items( swig_obj[4] );
    if( item_list == NULL )
    {
      PyErr_SetString(PyExc_TypeError,"Cannot retrieve items");
      SWIG_fail;
    }
    
    for( Py_ssize_t i=0; i<size; i++ ) {
      PyObject *it = PySequence_GetItem( item_list, i );
      if( it == NULL )
      {
        Py_DECREF(item_list);
        PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
        SWIG_fail;
      }
      
      PyObject *k, *v;
      if ( ! PyArg_ParseTuple( it, "OO", &k, &v ) ) {
        Py_DECREF(it);
        Py_DECREF(item_list);
        PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
        SWIG_fail;
      }
      
      PyObject* kStr = PyObject_Str(k);
      if( PyErr_Occurred() )
      {
        Py_DECREF(it);
        Py_DECREF(item_list);
        SWIG_fail;
      }
      
      PyObject* vStr = v != Py_None ? PyObject_Str(v) : Py_None;
      if( v == Py_None )
      Py_INCREF(Py_None);
      if( PyErr_Occurred() )
      {
        Py_DECREF(it);
        Py_DECREF(kStr);
        Py_DECREF(item_list);
        SWIG_fail;
      }
      
      int bFreeK, bFreeV;
      char* pszK = GDALPythonObjectToCStr(kStr, &bFreeK);
      char* pszV = vStr != Py_None ? GDALPythonObjectToCStr(vStr, &bFreeV) : NULL;
      if( pszK == NULL || (pszV == NULL && vStr != Py_None) )
      {
        GDALPythonFreeCStr(pszK, bFreeK);
        if( pszV )
        GDALPythonFreeCStr(pszV, bFreeV);
        Py_DECREF(kStr);
        Py_DECREF(vStr);
        Py_DECREF(it);
        Py_DECREF(item_list);
        PyErr_SetString(PyExc_TypeError,"Cannot get key/value as string");
        SWIG_fail;
      }
      (arg5)[i].pszCode = CPLStrdup(pszK);
      (arg5)[i].pszValue = pszV ? CPLStrdup(pszV) : NULL;
      
      GDALPythonFreeCStr(pszK, bFreeK);
      if( pszV )
      GDALPythonFreeCStr(pszV, bFreeV);
      Py_DECREF(kStr);
      Py_DECREF(vStr);
      Py_DECREF(it);
    }
    Py_DECREF(item_list);
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDomainShadow *)CreateCodedFieldDomain((char const *)arg1,(char const *)arg2,arg3,arg4,(OGRCodedValue const *)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_OGRFieldDomainShadow, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) OGRCodedValue* */
    if( arg5 )
    {
      for( size_t i = 0; (arg5)[i].pszCode != NULL; ++i )
      {
        CPLFree((arg5)[i].pszCode);
        CPLFree((arg5)[i].pszValue);
      }
    }
    CPLFree( 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 (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) OGRCodedValue* */
    if( arg5 )
    {
      for( size_t i = 0; (arg5)[i].pszCode != NULL; ++i )
      {
        CPLFree((arg5)[i].pszCode);
        CPLFree((arg5)[i].pszValue);
      }
    }
    CPLFree( arg5 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_CreateRangeFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRFieldType arg3 ;
  OGRFieldSubType arg4 ;
  double arg5 ;
  bool arg6 ;
  double arg7 ;
  double arg8 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  PyObject *swig_obj[8] ;
  OGRFieldDomainShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "CreateRangeFieldDomain", 8, 8, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateRangeFieldDomain" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateRangeFieldDomain" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CreateRangeFieldDomain" "', argument " "3"" of type '" "OGRFieldType""'");
  } 
  arg3 = static_cast< OGRFieldType >(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CreateRangeFieldDomain" "', argument " "4"" of type '" "OGRFieldSubType""'");
  } 
  arg4 = static_cast< OGRFieldSubType >(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CreateRangeFieldDomain" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_bool(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CreateRangeFieldDomain" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CreateRangeFieldDomain" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "CreateRangeFieldDomain" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    if (!arg1) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDomainShadow *)CreateRangeFieldDomain((char const *)arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
      SWIG_PYTHON_THREAD_END_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_OGRFieldDomainShadow, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  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 (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_CreateGlobFieldDomain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRFieldType arg3 ;
  OGRFieldSubType arg4 ;
  char *arg5 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  PyObject *swig_obj[5] ;
  OGRFieldDomainShadow *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "CreateGlobFieldDomain", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGlobFieldDomain" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateGlobFieldDomain" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CreateGlobFieldDomain" "', argument " "3"" of type '" "OGRFieldType""'");
  } 
  arg3 = static_cast< OGRFieldType >(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CreateGlobFieldDomain" "', argument " "4"" of type '" "OGRFieldSubType""'");
  } 
  arg4 = static_cast< OGRFieldSubType >(val4);
  res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CreateGlobFieldDomain" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = reinterpret_cast< char * >(buf5);
  {
    if (!arg1) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg5) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      ClearErrorState();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDomainShadow *)CreateGlobFieldDomain((char const *)arg1,(char const *)arg2,arg3,arg4,(char const *)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_OGRFieldDomainShadow, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  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 (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = bUseExceptions;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "GetDriverCount", 0, 0, 0)) 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 (!SWIG_Python_UnpackTuple(args, "GetOpenDSCount", 0, 0, 0)) 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 *swig_obj[1] ;
  OGRErr result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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 (!SWIG_Python_UnpackTuple(args, "RegisterAll", 0, 0, 0)) 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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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 *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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 *swig_obj[1] ;
  OGRwkbGeometryType result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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 *swig_obj[1] ;
  OGRwkbGeometryType result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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 *swig_obj[1] ;
  OGRwkbGeometryType result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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 *swig_obj[3] ;
  OGRwkbGeometryType result;
  
  if (!SWIG_Python_UnpackTuple(args, "GT_SetModifier", 2, 3, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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(swig_obj[1], &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 (swig_obj[2]) {
    ecode3 = SWIG_AsVal_int(swig_obj[2], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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 *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "GT_IsSubClassOf", 2, 2, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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(swig_obj[1], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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 *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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 *swig_obj[1] ;
  OGRwkbGeometryType result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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 *swig_obj[1] ;
  OGRwkbGeometryType result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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 *swig_obj[1] ;
  OGRwkbGeometryType result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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 *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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 (!SWIG_Python_UnpackTuple(args, "GetNonLinearGeometriesEnabledFlag", 0, 0, 0)) 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 *swig_obj[1] ;
  OGRDataSourceShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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, "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, "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 *swig_obj[1] ;
  OGRDriverShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &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 ( 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 *swig_obj[1] ;
  OGRDriverShadow *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &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 *swig_obj[2] ;
  char **result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "GeneralCmdLineProcessor", 1, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) char **options */
    int bErr = FALSE;
    arg1 = CSLFromPySequence(swig_obj[0], &bErr);
    if( bErr )
    {
      SWIG_fail;
    }
  }
  if (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &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, "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;
}


static PyMethodDef SwigMethods[] = {
	 { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
	 { "GetUseExceptions", _wrap_GetUseExceptions, METH_NOARGS, "GetUseExceptions() -> int"},
	 { "UseExceptions", _wrap_UseExceptions, METH_NOARGS, "UseExceptions()"},
	 { "DontUseExceptions", _wrap_DontUseExceptions, METH_NOARGS, "DontUseExceptions()"},
	 { "MajorObject_GetDescription", _wrap_MajorObject_GetDescription, METH_O, "MajorObject_GetDescription(MajorObject self) -> char const *"},
	 { "MajorObject_SetDescription", _wrap_MajorObject_SetDescription, METH_VARARGS, "MajorObject_SetDescription(MajorObject self, char const * pszNewDesc)"},
	 { "MajorObject_GetMetadataDomainList", _wrap_MajorObject_GetMetadataDomainList, METH_O, "MajorObject_GetMetadataDomainList(MajorObject self) -> char **"},
	 { "MajorObject_GetMetadata_Dict", _wrap_MajorObject_GetMetadata_Dict, METH_VARARGS, "MajorObject_GetMetadata_Dict(MajorObject self, char const * pszDomain=\"\") -> char **"},
	 { "MajorObject_GetMetadata_List", _wrap_MajorObject_GetMetadata_List, METH_VARARGS, "MajorObject_GetMetadata_List(MajorObject self, char const * pszDomain=\"\") -> char **"},
	 { "MajorObject_SetMetadata", _wrap_MajorObject_SetMetadata, METH_VARARGS, "\n"
		"MajorObject_SetMetadata(MajorObject self, char ** papszMetadata, char const * pszDomain=\"\") -> CPLErr\n"
		"MajorObject_SetMetadata(MajorObject self, char * pszMetadataString, char const * pszDomain=\"\") -> CPLErr\n"
		""},
	 { "MajorObject_GetMetadataItem", _wrap_MajorObject_GetMetadataItem, METH_VARARGS, "MajorObject_GetMetadataItem(MajorObject self, char const * pszName, char const * pszDomain=\"\") -> char const *"},
	 { "MajorObject_SetMetadataItem", _wrap_MajorObject_SetMetadataItem, METH_VARARGS, "MajorObject_SetMetadataItem(MajorObject self, char const * pszName, char const * pszValue, char const * pszDomain=\"\") -> CPLErr"},
	 { "MajorObject_swigregister", MajorObject_swigregister, METH_O, NULL},
	 { "GetGEOSVersionMajor", _wrap_GetGEOSVersionMajor, METH_NOARGS, "GetGEOSVersionMajor() -> int"},
	 { "GetGEOSVersionMinor", _wrap_GetGEOSVersionMinor, METH_NOARGS, "GetGEOSVersionMinor() -> int"},
	 { "GetGEOSVersionMicro", _wrap_GetGEOSVersionMicro, METH_NOARGS, "GetGEOSVersionMicro() -> int"},
	 { "new_StyleTable", _wrap_new_StyleTable, METH_NOARGS, "new_StyleTable() -> StyleTable"},
	 { "delete_StyleTable", _wrap_delete_StyleTable, METH_O, "delete_StyleTable(StyleTable self)"},
	 { "StyleTable_AddStyle", _wrap_StyleTable_AddStyle, METH_VARARGS, "StyleTable_AddStyle(StyleTable self, char const * pszName, char const * pszStyleString) -> int"},
	 { "StyleTable_LoadStyleTable", _wrap_StyleTable_LoadStyleTable, METH_VARARGS, "StyleTable_LoadStyleTable(StyleTable self, char const * utf8_path) -> int"},
	 { "StyleTable_SaveStyleTable", _wrap_StyleTable_SaveStyleTable, METH_VARARGS, "StyleTable_SaveStyleTable(StyleTable self, char const * utf8_path) -> int"},
	 { "StyleTable_Find", _wrap_StyleTable_Find, METH_VARARGS, "StyleTable_Find(StyleTable self, char const * pszName) -> char const *"},
	 { "StyleTable_ResetStyleStringReading", _wrap_StyleTable_ResetStyleStringReading, METH_O, "StyleTable_ResetStyleStringReading(StyleTable self)"},
	 { "StyleTable_GetNextStyle", _wrap_StyleTable_GetNextStyle, METH_O, "StyleTable_GetNextStyle(StyleTable self) -> char const *"},
	 { "StyleTable_GetLastStyleName", _wrap_StyleTable_GetLastStyleName, METH_O, "StyleTable_GetLastStyleName(StyleTable self) -> char const *"},
	 { "StyleTable_swigregister", StyleTable_swigregister, METH_O, NULL},
	 { "StyleTable_swiginit", StyleTable_swiginit, METH_VARARGS, NULL},
	 { "Driver_name_get", _wrap_Driver_name_get, METH_O, "Driver_name_get(Driver self) -> char const *"},
	 { "Driver_CreateDataSource", (PyCFunction)(void(*)(void))_wrap_Driver_CreateDataSource, METH_VARARGS|METH_KEYWORDS, "Driver_CreateDataSource(Driver self, char const * utf8_path, char ** options=None) -> DataSource"},
	 { "Driver_CopyDataSource", (PyCFunction)(void(*)(void))_wrap_Driver_CopyDataSource, METH_VARARGS|METH_KEYWORDS, "Driver_CopyDataSource(Driver self, DataSource copy_ds, char const * utf8_path, char ** options=None) -> DataSource"},
	 { "Driver_Open", (PyCFunction)(void(*)(void))_wrap_Driver_Open, METH_VARARGS|METH_KEYWORDS, "Driver_Open(Driver self, char const * utf8_path, int update=0) -> DataSource"},
	 { "Driver_DeleteDataSource", _wrap_Driver_DeleteDataSource, METH_VARARGS, "Driver_DeleteDataSource(Driver self, char const * utf8_path) -> int"},
	 { "Driver_TestCapability", _wrap_Driver_TestCapability, METH_VARARGS, "Driver_TestCapability(Driver self, char const * cap) -> bool"},
	 { "Driver_GetName", _wrap_Driver_GetName, METH_O, "Driver_GetName(Driver self) -> char const *"},
	 { "Driver_Register", _wrap_Driver_Register, METH_O, "Driver_Register(Driver self)"},
	 { "Driver_Deregister", _wrap_Driver_Deregister, METH_O, "Driver_Deregister(Driver self)"},
	 { "Driver_swigregister", Driver_swigregister, METH_O, NULL},
	 { "DataSource_name_get", _wrap_DataSource_name_get, METH_O, "DataSource_name_get(DataSource self) -> char const *"},
	 { "delete_DataSource", _wrap_delete_DataSource, METH_O, "delete_DataSource(DataSource self)"},
	 { "DataSource_GetRefCount", _wrap_DataSource_GetRefCount, METH_O, "\n"
		"DataSource_GetRefCount(DataSource self) -> int\n"
		"int\n"
		"OGR_DS_GetRefCount(OGRDataSourceH hDataSource) \n"
		""},
	 { "DataSource_GetSummaryRefCount", _wrap_DataSource_GetSummaryRefCount, METH_O, "\n"
		"DataSource_GetSummaryRefCount(DataSource self) -> int\n"
		"int\n"
		"OGR_DS_GetSummaryRefCount(OGRDataSourceH hDataSource) \n"
		""},
	 { "DataSource_GetLayerCount", _wrap_DataSource_GetLayerCount, METH_O, "\n"
		"DataSource_GetLayerCount(DataSource self) -> int\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"
		""},
	 { "DataSource_GetDriver", _wrap_DataSource_GetDriver, METH_O, "\n"
		"DataSource_GetDriver(DataSource self) -> Driver\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"
		""},
	 { "DataSource_GetName", _wrap_DataSource_GetName, METH_O, "\n"
		"DataSource_GetName(DataSource self) -> char const *\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"
		""},
	 { "DataSource_DeleteLayer", _wrap_DataSource_DeleteLayer, METH_VARARGS, "\n"
		"DataSource_DeleteLayer(DataSource self, int index) -> OGRErr\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"
		""},
	 { "DataSource_SyncToDisk", _wrap_DataSource_SyncToDisk, METH_O, "\n"
		"DataSource_SyncToDisk(DataSource self) -> OGRErr\n"
		"OGRErr\n"
		"OGR_DS_SyncToDisk(OGRDataSourceH hDS)\n"
		"\n"
		"Flush pending changes to disk.\n"
		"\n"
		"See GDALDataset::FlushCache() \n"
		""},
	 { "DataSource_FlushCache", _wrap_DataSource_FlushCache, METH_O, "DataSource_FlushCache(DataSource self)"},
	 { "DataSource_CreateLayer", (PyCFunction)(void(*)(void))_wrap_DataSource_CreateLayer, METH_VARARGS|METH_KEYWORDS, "\n"
		"DataSource_CreateLayer(DataSource self, char const * name, SpatialReference srs=None, OGRwkbGeometryType geom_type=wkbUnknown, char ** options=None) -> Layer\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"
		""},
	 { "DataSource_CopyLayer", (PyCFunction)(void(*)(void))_wrap_DataSource_CopyLayer, METH_VARARGS|METH_KEYWORDS, "\n"
		"DataSource_CopyLayer(DataSource self, Layer src_layer, char const * new_name, char ** options=None) -> Layer\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"
		"a handle to the layer, or NULL if an error occurs. \n"
		""},
	 { "DataSource_GetLayerByIndex", _wrap_DataSource_GetLayerByIndex, METH_VARARGS, "DataSource_GetLayerByIndex(DataSource self, int index=0) -> Layer"},
	 { "DataSource_GetLayerByName", _wrap_DataSource_GetLayerByName, METH_VARARGS, "\n"
		"DataSource_GetLayerByName(DataSource self, char const * layer_name) -> Layer\n"
		"OGRLayerH\n"
		"OGR_DS_GetLayerByName(OGRDataSourceH hDS, const char *pszLayerName)\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"
		"a handle to the layer, or NULL if the layer is not found or an error\n"
		"occurs. \n"
		""},
	 { "DataSource_TestCapability", _wrap_DataSource_TestCapability, METH_VARARGS, "\n"
		"DataSource_TestCapability(DataSource self, char const * cap) -> bool\n"
		"int\n"
		"OGR_DS_TestCapability(OGRDataSourceH hDS, const char *pszCapability)\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"
		""},
	 { "DataSource_ExecuteSQL", (PyCFunction)(void(*)(void))_wrap_DataSource_ExecuteSQL, METH_VARARGS|METH_KEYWORDS, "\n"
		"DataSource_ExecuteSQL(DataSource self, char const * statement, Geometry spatialFilter=None, char const * dialect=\"\") -> Layer\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"
		"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"
		"pszStatement:  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. The SQLITE dialect can also be used.\n"
		"\n"
		"a handle to a OGRLayer containing the results of the query. Deallocate\n"
		"with OGR_DS_ReleaseResultSet(). \n"
		""},
	 { "DataSource_AbortSQL", _wrap_DataSource_AbortSQL, METH_O, "DataSource_AbortSQL(DataSource self) -> OGRErr"},
	 { "DataSource_ReleaseResultSet", _wrap_DataSource_ReleaseResultSet, METH_VARARGS, "\n"
		"DataSource_ReleaseResultSet(DataSource self, Layer layer)\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:  a 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"
		""},
	 { "DataSource_GetStyleTable", _wrap_DataSource_GetStyleTable, METH_O, "\n"
		"DataSource_GetStyleTable(DataSource self) -> StyleTable\n"
		"OGRStyleTableH\n"
		"OGR_DS_GetStyleTable(OGRDataSourceH hDS)\n"
		"\n"
		"Get style table. \n"
		""},
	 { "DataSource_SetStyleTable", _wrap_DataSource_SetStyleTable, METH_VARARGS, "\n"
		"DataSource_SetStyleTable(DataSource self, StyleTable table)\n"
		"void\n"
		"OGR_DS_SetStyleTable(OGRDataSourceH hDS, OGRStyleTableH hStyleTable)\n"
		"\n"
		"Set style table. \n"
		""},
	 { "DataSource_StartTransaction", (PyCFunction)(void(*)(void))_wrap_DataSource_StartTransaction, METH_VARARGS|METH_KEYWORDS, "DataSource_StartTransaction(DataSource self, int force=FALSE) -> OGRErr"},
	 { "DataSource_CommitTransaction", _wrap_DataSource_CommitTransaction, METH_O, "DataSource_CommitTransaction(DataSource self) -> OGRErr"},
	 { "DataSource_RollbackTransaction", _wrap_DataSource_RollbackTransaction, METH_O, "DataSource_RollbackTransaction(DataSource self) -> OGRErr"},
	 { "DataSource_swigregister", DataSource_swigregister, METH_O, NULL},
	 { "Layer_Rename", _wrap_Layer_Rename, METH_VARARGS, "Layer_Rename(Layer self, char const * new_name) -> OGRErr"},
	 { "Layer_GetRefCount", _wrap_Layer_GetRefCount, METH_O, "\n"
		"Layer_GetRefCount(Layer self) -> int\n"
		"int OGR_L_GetRefCount(OGRLayerH\n"
		"hLayer) \n"
		""},
	 { "Layer_SetSpatialFilter", _wrap_Layer_SetSpatialFilter, METH_VARARGS, "\n"
		"Layer_SetSpatialFilter(Layer self, Geometry filter)\n"
		"Layer_SetSpatialFilter(Layer self, int iGeomField, Geometry filter)\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"
		""},
	 { "Layer_SetSpatialFilterRect", _wrap_Layer_SetSpatialFilterRect, METH_VARARGS, "\n"
		"Layer_SetSpatialFilterRect(Layer self, double minx, double miny, double maxx, double maxy)\n"
		"Layer_SetSpatialFilterRect(Layer self, int iGeomField, double minx, double miny, double maxx, double maxy)\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"
		""},
	 { "Layer_GetSpatialFilter", _wrap_Layer_GetSpatialFilter, METH_O, "\n"
		"Layer_GetSpatialFilter(Layer self) -> Geometry\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"
		"a handle to the spatial filter geometry. \n"
		""},
	 { "Layer_SetAttributeFilter", _wrap_Layer_SetAttributeFilter, METH_VARARGS, "\n"
		"Layer_SetAttributeFilter(Layer self, char * filter_string) -> OGRErr\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"
		""},
	 { "Layer_ResetReading", _wrap_Layer_ResetReading, METH_O, "\n"
		"Layer_ResetReading(Layer self)\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"
		""},
	 { "Layer_GetName", _wrap_Layer_GetName, METH_O, "\n"
		"Layer_GetName(Layer self) -> char const *\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"
		""},
	 { "Layer_GetGeomType", _wrap_Layer_GetGeomType, METH_O, "\n"
		"Layer_GetGeomType(Layer self) -> OGRwkbGeometryType\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"
		""},
	 { "Layer_GetGeometryColumn", _wrap_Layer_GetGeometryColumn, METH_O, "\n"
		"Layer_GetGeometryColumn(Layer self) -> char const *\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"
		""},
	 { "Layer_GetFIDColumn", _wrap_Layer_GetFIDColumn, METH_O, "\n"
		"Layer_GetFIDColumn(Layer self) -> char const *\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"
		""},
	 { "Layer_GetFeature", _wrap_Layer_GetFeature, METH_VARARGS, "\n"
		"Layer_GetFeature(Layer self, GIntBig fid) -> Feature\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"
		"a handle to a feature now owned by the caller, or NULL on failure. \n"
		""},
	 { "Layer_GetNextFeature", _wrap_Layer_GetNextFeature, METH_O, "\n"
		"Layer_GetNextFeature(Layer self) -> Feature\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"
		"a handle to a feature, or NULL if no more features are available. \n"
		""},
	 { "Layer_SetNextByIndex", _wrap_Layer_SetNextByIndex, METH_VARARGS, "\n"
		"Layer_SetNextByIndex(Layer self, GIntBig new_index) -> OGRErr\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"
		""},
	 { "Layer_SetFeature", _wrap_Layer_SetFeature, METH_VARARGS, "\n"
		"Layer_SetFeature(Layer self, Feature feature) -> OGRErr\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"
		""},
	 { "Layer_CreateFeature", _wrap_Layer_CreateFeature, METH_VARARGS, "\n"
		"Layer_CreateFeature(Layer self, Feature feature) -> OGRErr\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"
		""},
	 { "Layer_DeleteFeature", _wrap_Layer_DeleteFeature, METH_VARARGS, "\n"
		"Layer_DeleteFeature(Layer self, GIntBig fid) -> OGRErr\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"
		""},
	 { "Layer_SyncToDisk", _wrap_Layer_SyncToDisk, METH_O, "\n"
		"Layer_SyncToDisk(Layer self) -> OGRErr\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"
		""},
	 { "Layer_GetLayerDefn", _wrap_Layer_GetLayerDefn, METH_O, "\n"
		"Layer_GetLayerDefn(Layer self) -> FeatureDefn\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"
		"a handle to the feature definition. \n"
		""},
	 { "Layer_GetFeatureCount", (PyCFunction)(void(*)(void))_wrap_Layer_GetFeatureCount, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_GetFeatureCount(Layer self, int force=1) -> GIntBig\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"
		""},
	 { "Layer_GetExtent", (PyCFunction)(void(*)(void))_wrap_Layer_GetExtent, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_GetExtent(Layer self, int force=1, int can_return_null=0, int geom_field=0)\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"
		""},
	 { "Layer_TestCapability", _wrap_Layer_TestCapability, METH_VARARGS, "\n"
		"Layer_TestCapability(Layer self, char const * cap) -> bool\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"
		""},
	 { "Layer_CreateField", (PyCFunction)(void(*)(void))_wrap_Layer_CreateField, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_CreateField(Layer self, FieldDefn field_def, int approx_ok=1) -> OGRErr\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"
		""},
	 { "Layer_DeleteField", _wrap_Layer_DeleteField, METH_VARARGS, "\n"
		"Layer_DeleteField(Layer self, int iField) -> OGRErr\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"
		""},
	 { "Layer_ReorderField", _wrap_Layer_ReorderField, METH_VARARGS, "\n"
		"Layer_ReorderField(Layer self, int iOldFieldPos, int iNewFieldPos) -> OGRErr\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"
		""},
	 { "Layer_ReorderFields", _wrap_Layer_ReorderFields, METH_VARARGS, "\n"
		"Layer_ReorderFields(Layer self, int nList) -> OGRErr\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"
		""},
	 { "Layer_AlterFieldDefn", _wrap_Layer_AlterFieldDefn, METH_VARARGS, "\n"
		"Layer_AlterFieldDefn(Layer self, int iField, FieldDefn field_def, int nFlags) -> OGRErr\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"
		""},
	 { "Layer_CreateGeomField", (PyCFunction)(void(*)(void))_wrap_Layer_CreateGeomField, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_CreateGeomField(Layer self, GeomFieldDefn field_def, int approx_ok=1) -> OGRErr\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"
		""},
	 { "Layer_StartTransaction", _wrap_Layer_StartTransaction, METH_O, "\n"
		"Layer_StartTransaction(Layer self) -> OGRErr\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"
		""},
	 { "Layer_CommitTransaction", _wrap_Layer_CommitTransaction, METH_O, "\n"
		"Layer_CommitTransaction(Layer self) -> OGRErr\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"
		""},
	 { "Layer_RollbackTransaction", _wrap_Layer_RollbackTransaction, METH_O, "\n"
		"Layer_RollbackTransaction(Layer self) -> OGRErr\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"
		""},
	 { "Layer_FindFieldIndex", _wrap_Layer_FindFieldIndex, METH_VARARGS, "\n"
		"Layer_FindFieldIndex(Layer self, char const * pszFieldName, int bExactMatch) -> int\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"
		""},
	 { "Layer_GetSpatialRef", _wrap_Layer_GetSpatialRef, METH_O, "\n"
		"Layer_GetSpatialRef(Layer self) -> SpatialReference\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"
		""},
	 { "Layer_GetFeaturesRead", _wrap_Layer_GetFeaturesRead, METH_O, "\n"
		"Layer_GetFeaturesRead(Layer self) -> GIntBig\n"
		"GIntBig\n"
		"OGR_L_GetFeaturesRead(OGRLayerH hLayer) \n"
		""},
	 { "Layer_SetIgnoredFields", _wrap_Layer_SetIgnoredFields, METH_VARARGS, "\n"
		"Layer_SetIgnoredFields(Layer self, char const ** options) -> OGRErr\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"
		"hLayer:  handle to the layer\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"
		""},
	 { "Layer_Intersection", (PyCFunction)(void(*)(void))_wrap_Layer_Intersection, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_Intersection(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\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"
		""},
	 { "Layer_Union", (PyCFunction)(void(*)(void))_wrap_Layer_Union, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_Union(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\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"
		""},
	 { "Layer_SymDifference", (PyCFunction)(void(*)(void))_wrap_Layer_SymDifference, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_SymDifference(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\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"
		""},
	 { "Layer_Identity", (PyCFunction)(void(*)(void))_wrap_Layer_Identity, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_Identity(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\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"
		""},
	 { "Layer_Update", (PyCFunction)(void(*)(void))_wrap_Layer_Update, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_Update(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\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"
		""},
	 { "Layer_Clip", (PyCFunction)(void(*)(void))_wrap_Layer_Clip, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_Clip(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\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"
		""},
	 { "Layer_Erase", (PyCFunction)(void(*)(void))_wrap_Layer_Erase, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_Erase(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\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"
		""},
	 { "Layer_GetStyleTable", _wrap_Layer_GetStyleTable, METH_O, "\n"
		"Layer_GetStyleTable(Layer self) -> StyleTable\n"
		"OGRStyleTableH\n"
		"OGR_L_GetStyleTable(OGRLayerH hLayer)\n"
		"\n"
		"Get style table. \n"
		""},
	 { "Layer_SetStyleTable", _wrap_Layer_SetStyleTable, METH_VARARGS, "\n"
		"Layer_SetStyleTable(Layer self, StyleTable table)\n"
		"void\n"
		"OGR_L_SetStyleTable(OGRLayerH hLayer, OGRStyleTableH hStyleTable)\n"
		"\n"
		"Set style table. \n"
		""},
	 { "Layer_swigregister", Layer_swigregister, METH_O, NULL},
	 { "delete_Feature", _wrap_delete_Feature, METH_O, "delete_Feature(Feature self)"},
	 { "new_Feature", (PyCFunction)(void(*)(void))_wrap_new_Feature, METH_VARARGS|METH_KEYWORDS, "new_Feature(FeatureDefn feature_def) -> Feature"},
	 { "Feature_GetDefnRef", _wrap_Feature_GetDefnRef, METH_O, "\n"
		"Feature_GetDefnRef(Feature self) -> FeatureDefn\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"
		"a handle to the feature definition object on which feature depends. \n"
		""},
	 { "Feature_SetGeometry", _wrap_Feature_SetGeometry, METH_VARARGS, "\n"
		"Feature_SetGeometry(Feature self, Geometry geom) -> OGRErr\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"
		""},
	 { "Feature_SetGeometryDirectly", _wrap_Feature_SetGeometryDirectly, METH_VARARGS, "\n"
		"Feature_SetGeometryDirectly(Feature self, Geometry geom) -> OGRErr\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"
		""},
	 { "Feature_GetGeometryRef", _wrap_Feature_GetGeometryRef, METH_O, "\n"
		"Feature_GetGeometryRef(Feature self) -> Geometry\n"
		"OGRGeometryH\n"
		"OGR_F_GetGeometryRef(OGRFeatureH hFeat)\n"
		"\n"
		"Fetch a 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"
		"a handle to internal feature geometry. This object should not be\n"
		"modified. \n"
		""},
	 { "Feature_SetGeomField", _wrap_Feature_SetGeomField, METH_VARARGS, "\n"
		"Feature_SetGeomField(Feature self, int iField, Geometry geom) -> OGRErr\n"
		"Feature_SetGeomField(Feature self, char const * field_name, Geometry geom) -> OGRErr\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"
		""},
	 { "Feature_SetGeomFieldDirectly", _wrap_Feature_SetGeomFieldDirectly, METH_VARARGS, "\n"
		"Feature_SetGeomFieldDirectly(Feature self, int iField, Geometry geom) -> OGRErr\n"
		"Feature_SetGeomFieldDirectly(Feature self, char const * field_name, Geometry geom) -> OGRErr\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"
		""},
	 { "Feature_GetGeomFieldRef", _wrap_Feature_GetGeomFieldRef, METH_VARARGS, "\n"
		"Feature_GetGeomFieldRef(Feature self, int iField) -> Geometry\n"
		"Feature_GetGeomFieldRef(Feature self, char const * field_name) -> Geometry\n"
		"OGRGeometryH\n"
		"OGR_F_GetGeomFieldRef(OGRFeatureH hFeat, int iField)\n"
		"\n"
		"Fetch a 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"
		"a handle to internal feature geometry. This object should not be\n"
		"modified.\n"
		"\n"
		"GDAL 1.11 \n"
		""},
	 { "Feature_Clone", _wrap_Feature_Clone, METH_O, "\n"
		"Feature_Clone(Feature self) -> Feature\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 its\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"
		"a handle to the new feature, exactly matching this feature. \n"
		""},
	 { "Feature_Equal", _wrap_Feature_Equal, METH_VARARGS, "\n"
		"Feature_Equal(Feature self, Feature feature) -> bool\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"
		""},
	 { "Feature_GetFieldCount", _wrap_Feature_GetFieldCount, METH_O, "\n"
		"Feature_GetFieldCount(Feature self) -> int\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"
		""},
	 { "Feature_GetFieldDefnRef", _wrap_Feature_GetFieldDefnRef, METH_VARARGS, "\n"
		"Feature_GetFieldDefnRef(Feature self, int id) -> FieldDefn\n"
		"Feature_GetFieldDefnRef(Feature self, char const * field_name) -> FieldDefn\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"
		"a handle to the field definition (from the OGRFeatureDefn). This is an\n"
		"internal reference, and should not be deleted or modified. \n"
		""},
	 { "Feature_GetGeomFieldCount", _wrap_Feature_GetGeomFieldCount, METH_O, "\n"
		"Feature_GetGeomFieldCount(Feature self) -> int\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"
		""},
	 { "Feature_GetGeomFieldDefnRef", _wrap_Feature_GetGeomFieldDefnRef, METH_VARARGS, "\n"
		"Feature_GetGeomFieldDefnRef(Feature self, int id) -> GeomFieldDefn\n"
		"Feature_GetGeomFieldDefnRef(Feature self, char const * field_name) -> GeomFieldDefn\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"
		"a handle to the field definition (from the OGRFeatureDefn). This is an\n"
		"internal reference, and should not be deleted or modified.\n"
		"\n"
		"GDAL 1.11 \n"
		""},
	 { "Feature_GetFieldAsString", _wrap_Feature_GetFieldAsString, METH_VARARGS, "\n"
		"Feature_GetFieldAsString(Feature self, int id) -> char const\n"
		"Feature_GetFieldAsString(Feature self, char const * field_name) -> char const *\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"
		""},
	 { "Feature_GetFieldAsInteger", _wrap_Feature_GetFieldAsInteger, METH_VARARGS, "\n"
		"Feature_GetFieldAsInteger(Feature self, int id) -> int\n"
		"Feature_GetFieldAsInteger(Feature self, char const * field_name) -> int\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"
		""},
	 { "Feature_GetFieldAsInteger64", _wrap_Feature_GetFieldAsInteger64, METH_VARARGS, "\n"
		"Feature_GetFieldAsInteger64(Feature self, int id) -> GIntBig\n"
		"Feature_GetFieldAsInteger64(Feature self, char const * field_name) -> GIntBig\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"
		""},
	 { "Feature_GetFieldAsDouble", _wrap_Feature_GetFieldAsDouble, METH_VARARGS, "\n"
		"Feature_GetFieldAsDouble(Feature self, int id) -> double\n"
		"Feature_GetFieldAsDouble(Feature self, char const * field_name) -> double\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"
		""},
	 { "Feature_GetFieldAsDateTime", _wrap_Feature_GetFieldAsDateTime, METH_VARARGS, "\n"
		"Feature_GetFieldAsDateTime(Feature self, int id)\n"
		"Feature_GetFieldAsDateTime(Feature self, char const * field_name)\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"
		""},
	 { "Feature_GetFieldAsIntegerList", _wrap_Feature_GetFieldAsIntegerList, METH_VARARGS, "\n"
		"Feature_GetFieldAsIntegerList(Feature self, int id)\n"
		"Feature_GetFieldAsIntegerList(Feature self, char const * field_name)\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"
		""},
	 { "Feature_GetFieldAsInteger64List", _wrap_Feature_GetFieldAsInteger64List, METH_VARARGS, "\n"
		"Feature_GetFieldAsInteger64List(Feature self, int id)\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"
		""},
	 { "Feature_GetFieldAsDoubleList", _wrap_Feature_GetFieldAsDoubleList, METH_VARARGS, "\n"
		"Feature_GetFieldAsDoubleList(Feature self, int id)\n"
		"Feature_GetFieldAsDoubleList(Feature self, char const * field_name)\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"
		""},
	 { "Feature_GetFieldAsStringList", _wrap_Feature_GetFieldAsStringList, METH_VARARGS, "\n"
		"Feature_GetFieldAsStringList(Feature self, int id) -> char **\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"
		""},
	 { "Feature_GetFieldAsBinary", _wrap_Feature_GetFieldAsBinary, METH_VARARGS, "\n"
		"Feature_GetFieldAsBinary(Feature self, int id) -> OGRErr\n"
		"Feature_GetFieldAsBinary(Feature self, char const * field_name) -> OGRErr\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"
		""},
	 { "Feature_IsFieldSet", _wrap_Feature_IsFieldSet, METH_VARARGS, "\n"
		"Feature_IsFieldSet(Feature self, int id) -> bool\n"
		"Feature_IsFieldSet(Feature self, char const * field_name) -> bool\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"
		""},
	 { "Feature_IsFieldNull", _wrap_Feature_IsFieldNull, METH_VARARGS, "\n"
		"Feature_IsFieldNull(Feature self, int id) -> bool\n"
		"Feature_IsFieldNull(Feature self, char const * field_name) -> bool\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"
		""},
	 { "Feature_IsFieldSetAndNotNull", _wrap_Feature_IsFieldSetAndNotNull, METH_VARARGS, "\n"
		"Feature_IsFieldSetAndNotNull(Feature self, int id) -> bool\n"
		"Feature_IsFieldSetAndNotNull(Feature self, char const * field_name) -> bool\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"
		""},
	 { "Feature_GetFieldIndex", _wrap_Feature_GetFieldIndex, METH_VARARGS, "\n"
		"Feature_GetFieldIndex(Feature self, char const * field_name) -> int\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"
		""},
	 { "Feature_GetGeomFieldIndex", _wrap_Feature_GetGeomFieldIndex, METH_VARARGS, "\n"
		"Feature_GetGeomFieldIndex(Feature self, char const * field_name) -> int\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"
		""},
	 { "Feature_GetFID", _wrap_Feature_GetFID, METH_O, "\n"
		"Feature_GetFID(Feature self) -> GIntBig\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"
		""},
	 { "Feature_SetFID", _wrap_Feature_SetFID, METH_VARARGS, "\n"
		"Feature_SetFID(Feature self, GIntBig fid) -> OGRErr\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"
		""},
	 { "Feature_DumpReadable", _wrap_Feature_DumpReadable, METH_O, "\n"
		"Feature_DumpReadable(Feature self)\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"
		""},
	 { "Feature_UnsetField", _wrap_Feature_UnsetField, METH_VARARGS, "\n"
		"Feature_UnsetField(Feature self, int id)\n"
		"Feature_UnsetField(Feature self, char const * field_name)\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"
		""},
	 { "Feature_SetFieldNull", _wrap_Feature_SetFieldNull, METH_VARARGS, "\n"
		"Feature_SetFieldNull(Feature self, int id)\n"
		"Feature_SetFieldNull(Feature self, char const * field_name)\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"
		""},
	 { "Feature_SetFieldInteger64", _wrap_Feature_SetFieldInteger64, METH_VARARGS, "\n"
		"Feature_SetFieldInteger64(Feature self, int id, GIntBig value)\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"
		""},
	 { "Feature_SetField", _wrap_Feature_SetField, METH_VARARGS, "\n"
		"Feature_SetField(Feature self, int id, char const * value)\n"
		"Feature_SetField(Feature self, char const * field_name, char const * value)\n"
		"Feature_SetField(Feature self, int id, double value)\n"
		"Feature_SetField(Feature self, char const * field_name, double value)\n"
		"Feature_SetField(Feature self, 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"
		""},
	 { "Feature_SetFieldIntegerList", _wrap_Feature_SetFieldIntegerList, METH_VARARGS, "\n"
		"Feature_SetFieldIntegerList(Feature self, int id, int nList)\n"
		"void\n"
		"OGR_F_SetFieldIntegerList(OGRFeatureH hFeat, int iField, int nCount,\n"
		"const 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"
		""},
	 { "Feature_SetFieldInteger64List", _wrap_Feature_SetFieldInteger64List, METH_VARARGS, "\n"
		"Feature_SetFieldInteger64List(Feature self, int id, int nList)\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"
		""},
	 { "Feature_SetFieldDoubleList", _wrap_Feature_SetFieldDoubleList, METH_VARARGS, "\n"
		"Feature_SetFieldDoubleList(Feature self, int id, int nList)\n"
		"void\n"
		"OGR_F_SetFieldDoubleList(OGRFeatureH hFeat, int iField, int nCount,\n"
		"const 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"
		""},
	 { "Feature_SetFieldStringList", _wrap_Feature_SetFieldStringList, METH_VARARGS, "\n"
		"Feature_SetFieldStringList(Feature self, int id, char ** pList)\n"
		"void\n"
		"OGR_F_SetFieldStringList(OGRFeatureH hFeat, int iField, CSLConstList\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. List of NUL-terminated string,\n"
		"ending with a NULL pointer. \n"
		""},
	 { "Feature_SetFieldBinaryFromHexString", _wrap_Feature_SetFieldBinaryFromHexString, METH_VARARGS, "\n"
		"Feature_SetFieldBinaryFromHexString(Feature self, int id, char const * pszValue)\n"
		"Feature_SetFieldBinaryFromHexString(Feature self, char const * field_name, char const * pszValue)\n"
		""},
	 { "Feature_SetFrom", (PyCFunction)(void(*)(void))_wrap_Feature_SetFrom, METH_VARARGS|METH_KEYWORDS, "\n"
		"Feature_SetFrom(Feature self, Feature other, int forgiving=1) -> OGRErr\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"
		""},
	 { "Feature_SetFromWithMap", _wrap_Feature_SetFromWithMap, METH_VARARGS, "\n"
		"Feature_SetFromWithMap(Feature self, Feature other, int forgiving, int nList) -> OGRErr\n"
		"OGRErr\n"
		"OGR_F_SetFromWithMap(OGRFeatureH hFeat, OGRFeatureH hOtherFeat, int\n"
		"bForgiving, const 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"
		""},
	 { "Feature_GetStyleString", _wrap_Feature_GetStyleString, METH_O, "\n"
		"Feature_GetStyleString(Feature self) -> char const *\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"
		""},
	 { "Feature_SetStyleString", _wrap_Feature_SetStyleString, METH_VARARGS, "\n"
		"Feature_SetStyleString(Feature self, char const * the_string)\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"
		""},
	 { "Feature_GetFieldType", _wrap_Feature_GetFieldType, METH_VARARGS, "\n"
		"Feature_GetFieldType(Feature self, int id) -> OGRFieldType\n"
		"Feature_GetFieldType(Feature self, char const * field_name) -> OGRFieldType\n"
		""},
	 { "Feature_Validate", _wrap_Feature_Validate, METH_VARARGS, "\n"
		"Feature_Validate(Feature self, int flags=OGR_F_VAL_ALL, int bEmitError=TRUE) -> int\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"
		""},
	 { "Feature_FillUnsetWithDefault", _wrap_Feature_FillUnsetWithDefault, METH_VARARGS, "\n"
		"Feature_FillUnsetWithDefault(Feature self, int bNotNullableOnly=FALSE, char ** options=None)\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"
		""},
	 { "Feature_GetNativeData", _wrap_Feature_GetNativeData, METH_O, "\n"
		"Feature_GetNativeData(Feature self) -> char const *\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"
		""},
	 { "Feature_GetNativeMediaType", _wrap_Feature_GetNativeMediaType, METH_O, "\n"
		"Feature_GetNativeMediaType(Feature self) -> char const *\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"
		""},
	 { "Feature_SetNativeData", _wrap_Feature_SetNativeData, METH_VARARGS, "\n"
		"Feature_SetNativeData(Feature self, char const * nativeData)\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"
		""},
	 { "Feature_SetNativeMediaType", _wrap_Feature_SetNativeMediaType, METH_VARARGS, "\n"
		"Feature_SetNativeMediaType(Feature self, char const * nativeMediaType)\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"
		""},
	 { "Feature_SetFieldString", _wrap_Feature_SetFieldString, METH_VARARGS, "\n"
		"Feature_SetFieldString(Feature self, int id, char const * value)\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"
		""},
	 { "Feature_swigregister", Feature_swigregister, METH_O, NULL},
	 { "Feature_swiginit", Feature_swiginit, METH_VARARGS, NULL},
	 { "delete_FeatureDefn", _wrap_delete_FeatureDefn, METH_O, "delete_FeatureDefn(FeatureDefn self)"},
	 { "new_FeatureDefn", (PyCFunction)(void(*)(void))_wrap_new_FeatureDefn, METH_VARARGS|METH_KEYWORDS, "new_FeatureDefn(char const * name_null_ok=None) -> FeatureDefn"},
	 { "FeatureDefn_GetName", _wrap_FeatureDefn_GetName, METH_O, "\n"
		"FeatureDefn_GetName(FeatureDefn self) -> char const *\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"
		""},
	 { "FeatureDefn_GetFieldCount", _wrap_FeatureDefn_GetFieldCount, METH_O, "\n"
		"FeatureDefn_GetFieldCount(FeatureDefn self) -> int\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"
		""},
	 { "FeatureDefn_GetFieldDefn", _wrap_FeatureDefn_GetFieldDefn, METH_VARARGS, "\n"
		"FeatureDefn_GetFieldDefn(FeatureDefn self, int i) -> FieldDefn\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"
		"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"
		"a 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"
		""},
	 { "FeatureDefn_GetFieldIndex", _wrap_FeatureDefn_GetFieldIndex, METH_VARARGS, "\n"
		"FeatureDefn_GetFieldIndex(FeatureDefn self, char const * field_name) -> int\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"
		""},
	 { "FeatureDefn_AddFieldDefn", _wrap_FeatureDefn_AddFieldDefn, METH_VARARGS, "\n"
		"FeatureDefn_AddFieldDefn(FeatureDefn self, FieldDefn defn)\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"
		""},
	 { "FeatureDefn_GetGeomFieldCount", _wrap_FeatureDefn_GetGeomFieldCount, METH_O, "\n"
		"FeatureDefn_GetGeomFieldCount(FeatureDefn self) -> int\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"
		""},
	 { "FeatureDefn_GetGeomFieldDefn", _wrap_FeatureDefn_GetGeomFieldDefn, METH_VARARGS, "\n"
		"FeatureDefn_GetGeomFieldDefn(FeatureDefn self, int i) -> GeomFieldDefn\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"
		"a 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"
		""},
	 { "FeatureDefn_GetGeomFieldIndex", _wrap_FeatureDefn_GetGeomFieldIndex, METH_VARARGS, "\n"
		"FeatureDefn_GetGeomFieldIndex(FeatureDefn self, char const * field_name) -> int\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"
		""},
	 { "FeatureDefn_AddGeomFieldDefn", _wrap_FeatureDefn_AddGeomFieldDefn, METH_VARARGS, "\n"
		"FeatureDefn_AddGeomFieldDefn(FeatureDefn self, GeomFieldDefn defn)\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"
		""},
	 { "FeatureDefn_DeleteGeomFieldDefn", _wrap_FeatureDefn_DeleteGeomFieldDefn, METH_VARARGS, "\n"
		"FeatureDefn_DeleteGeomFieldDefn(FeatureDefn self, int idx) -> OGRErr\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"
		""},
	 { "FeatureDefn_GetGeomType", _wrap_FeatureDefn_GetGeomType, METH_O, "\n"
		"FeatureDefn_GetGeomType(FeatureDefn self) -> OGRwkbGeometryType\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"
		""},
	 { "FeatureDefn_SetGeomType", _wrap_FeatureDefn_SetGeomType, METH_VARARGS, "\n"
		"FeatureDefn_SetGeomType(FeatureDefn self, OGRwkbGeometryType geom_type)\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"
		""},
	 { "FeatureDefn_GetReferenceCount", _wrap_FeatureDefn_GetReferenceCount, METH_O, "\n"
		"FeatureDefn_GetReferenceCount(FeatureDefn self) -> int\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"
		""},
	 { "FeatureDefn_IsGeometryIgnored", _wrap_FeatureDefn_IsGeometryIgnored, METH_O, "\n"
		"FeatureDefn_IsGeometryIgnored(FeatureDefn self) -> int\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"
		""},
	 { "FeatureDefn_SetGeometryIgnored", _wrap_FeatureDefn_SetGeometryIgnored, METH_VARARGS, "\n"
		"FeatureDefn_SetGeometryIgnored(FeatureDefn self, int bIgnored)\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"
		""},
	 { "FeatureDefn_IsStyleIgnored", _wrap_FeatureDefn_IsStyleIgnored, METH_O, "\n"
		"FeatureDefn_IsStyleIgnored(FeatureDefn self) -> int\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"
		""},
	 { "FeatureDefn_SetStyleIgnored", _wrap_FeatureDefn_SetStyleIgnored, METH_VARARGS, "\n"
		"FeatureDefn_SetStyleIgnored(FeatureDefn self, int bIgnored)\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"
		""},
	 { "FeatureDefn_IsSame", _wrap_FeatureDefn_IsSame, METH_VARARGS, "\n"
		"FeatureDefn_IsSame(FeatureDefn self, FeatureDefn other_defn) -> int\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"
		""},
	 { "FeatureDefn_swigregister", FeatureDefn_swigregister, METH_O, NULL},
	 { "FeatureDefn_swiginit", FeatureDefn_swiginit, METH_VARARGS, NULL},
	 { "delete_FieldDefn", _wrap_delete_FieldDefn, METH_O, "delete_FieldDefn(FieldDefn self)"},
	 { "new_FieldDefn", (PyCFunction)(void(*)(void))_wrap_new_FieldDefn, METH_VARARGS|METH_KEYWORDS, "new_FieldDefn(char const * name_null_ok=\"unnamed\", OGRFieldType field_type=OFTString) -> FieldDefn"},
	 { "FieldDefn_GetName", _wrap_FieldDefn_GetName, METH_O, "FieldDefn_GetName(FieldDefn self) -> char const *"},
	 { "FieldDefn_GetNameRef", _wrap_FieldDefn_GetNameRef, METH_O, "\n"
		"FieldDefn_GetNameRef(FieldDefn self) -> char const *\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"
		""},
	 { "FieldDefn_SetName", _wrap_FieldDefn_SetName, METH_VARARGS, "\n"
		"FieldDefn_SetName(FieldDefn self, char const * name)\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"
		""},
	 { "FieldDefn_GetAlternativeName", _wrap_FieldDefn_GetAlternativeName, METH_O, "FieldDefn_GetAlternativeName(FieldDefn self) -> char const *"},
	 { "FieldDefn_GetAlternativeNameRef", _wrap_FieldDefn_GetAlternativeNameRef, METH_O, "\n"
		"FieldDefn_GetAlternativeNameRef(FieldDefn self) -> char const *\n"
		"const char*\n"
		"OGR_Fld_GetAlternativeNameRef(OGRFieldDefnH hDefn)\n"
		"\n"
		"Fetch the alternative name (or \"alias\") for this field.\n"
		"\n"
		"The alternative name is an optional attribute for a field which can\n"
		"provide a more user-friendly, descriptive name of a field which is not\n"
		"subject to the usual naming constraints defined by the data provider.\n"
		"\n"
		"This is a metadata style attribute only: the alternative name cannot\n"
		"be used in place of the actual field name during SQL queries or other\n"
		"field name dependent API calls.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRFieldDefn::GetAlternativeNameRef().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition.\n"
		"\n"
		"the alternative name of the field definition.\n"
		"\n"
		"GDAL 3.2 \n"
		""},
	 { "FieldDefn_SetAlternativeName", _wrap_FieldDefn_SetAlternativeName, METH_VARARGS, "\n"
		"FieldDefn_SetAlternativeName(FieldDefn self, char const * alternativeName)\n"
		"void\n"
		"OGR_Fld_SetAlternativeName(OGRFieldDefnH hDefn, const char\n"
		"*pszAlternativeName)\n"
		"\n"
		"Reset the alternative name (or \"alias\") for this field.\n"
		"\n"
		"The alternative name is an optional attribute for a field which can\n"
		"provide a more user-friendly, descriptive name of a field which is not\n"
		"subject to the usual naming constraints defined by the data provider.\n"
		"\n"
		"This is a metadata style attribute only: the alternative name cannot\n"
		"be used in place of the actual field name during SQL queries or other\n"
		"field name dependent API calls.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRFieldDefn::SetAlternativeName().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to apply the new alternative\n"
		"name to.\n"
		"\n"
		"pszAlternativeName:  the new alternative name to apply.\n"
		"\n"
		"GDAL 3.2 \n"
		""},
	 { "FieldDefn_GetType", _wrap_FieldDefn_GetType, METH_O, "\n"
		"FieldDefn_GetType(FieldDefn self) -> OGRFieldType\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"
		""},
	 { "FieldDefn_SetType", _wrap_FieldDefn_SetType, METH_VARARGS, "\n"
		"FieldDefn_SetType(FieldDefn self, OGRFieldType type)\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"
		""},
	 { "FieldDefn_GetSubType", _wrap_FieldDefn_GetSubType, METH_O, "\n"
		"FieldDefn_GetSubType(FieldDefn self) -> OGRFieldSubType\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"
		""},
	 { "FieldDefn_SetSubType", _wrap_FieldDefn_SetSubType, METH_VARARGS, "\n"
		"FieldDefn_SetSubType(FieldDefn self, OGRFieldSubType type)\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"
		""},
	 { "FieldDefn_GetJustify", _wrap_FieldDefn_GetJustify, METH_O, "\n"
		"FieldDefn_GetJustify(FieldDefn self) -> OGRJustification\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"
		""},
	 { "FieldDefn_SetJustify", _wrap_FieldDefn_SetJustify, METH_VARARGS, "\n"
		"FieldDefn_SetJustify(FieldDefn self, OGRJustification justify)\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"
		""},
	 { "FieldDefn_GetWidth", _wrap_FieldDefn_GetWidth, METH_O, "\n"
		"FieldDefn_GetWidth(FieldDefn self) -> int\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"
		""},
	 { "FieldDefn_SetWidth", _wrap_FieldDefn_SetWidth, METH_VARARGS, "\n"
		"FieldDefn_SetWidth(FieldDefn self, int width)\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"
		""},
	 { "FieldDefn_GetPrecision", _wrap_FieldDefn_GetPrecision, METH_O, "\n"
		"FieldDefn_GetPrecision(FieldDefn self) -> int\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"
		""},
	 { "FieldDefn_SetPrecision", _wrap_FieldDefn_SetPrecision, METH_VARARGS, "\n"
		"FieldDefn_SetPrecision(FieldDefn self, int precision)\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"
		""},
	 { "FieldDefn_GetTypeName", _wrap_FieldDefn_GetTypeName, METH_O, "FieldDefn_GetTypeName(FieldDefn self) -> char const *"},
	 { "FieldDefn_GetFieldTypeName", _wrap_FieldDefn_GetFieldTypeName, METH_VARARGS, "FieldDefn_GetFieldTypeName(FieldDefn self, OGRFieldType type) -> char const *"},
	 { "FieldDefn_IsIgnored", _wrap_FieldDefn_IsIgnored, METH_O, "\n"
		"FieldDefn_IsIgnored(FieldDefn self) -> int\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"
		""},
	 { "FieldDefn_SetIgnored", _wrap_FieldDefn_SetIgnored, METH_VARARGS, "\n"
		"FieldDefn_SetIgnored(FieldDefn self, int bIgnored)\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"
		""},
	 { "FieldDefn_IsNullable", _wrap_FieldDefn_IsNullable, METH_O, "\n"
		"FieldDefn_IsNullable(FieldDefn self) -> int\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"
		""},
	 { "FieldDefn_SetNullable", _wrap_FieldDefn_SetNullable, METH_VARARGS, "\n"
		"FieldDefn_SetNullable(FieldDefn self, int bNullable)\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 advertise 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"
		""},
	 { "FieldDefn_IsUnique", _wrap_FieldDefn_IsUnique, METH_O, "\n"
		"FieldDefn_IsUnique(FieldDefn self) -> int\n"
		"int OGR_Fld_IsUnique(OGRFieldDefnH\n"
		"hDefn)\n"
		"\n"
		"Return whether this field has a unique constraint.\n"
		"\n"
		"By default, fields have no unique constraint.\n"
		"\n"
		"This method is the same as the C++ method OGRFieldDefn::IsUnique().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition\n"
		"\n"
		"TRUE if the field has a unique constraint.\n"
		"\n"
		"GDAL 3.2 \n"
		""},
	 { "FieldDefn_SetUnique", _wrap_FieldDefn_SetUnique, METH_VARARGS, "\n"
		"FieldDefn_SetUnique(FieldDefn self, int bUnique)\n"
		"void\n"
		"OGR_Fld_SetUnique(OGRFieldDefnH hDefn, int bUniqueIn)\n"
		"\n"
		"Set whether this field has a unique constraint.\n"
		"\n"
		"By default, fields have no unique constraint, so this method is\n"
		"generally called with TRUE to set a unique constraint.\n"
		"\n"
		"Drivers that support writing unique constraint will advertise the\n"
		"GDAL_DCAP_UNIQUE_FIELDS driver metadata item. field can receive null\n"
		"values.\n"
		"\n"
		"This method is the same as the C++ method OGRFieldDefn::SetUnique().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition\n"
		"\n"
		"bUniqueIn:  TRUE if the field must have a unique constraint.\n"
		"\n"
		"GDAL 3.2 \n"
		""},
	 { "FieldDefn_GetDefault", _wrap_FieldDefn_GetDefault, METH_O, "\n"
		"FieldDefn_GetDefault(FieldDefn self) -> char const *\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"
		""},
	 { "FieldDefn_SetDefault", _wrap_FieldDefn_SetDefault, METH_VARARGS, "\n"
		"FieldDefn_SetDefault(FieldDefn self, char const * pszValue)\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 advertise 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"
		""},
	 { "FieldDefn_IsDefaultDriverSpecific", _wrap_FieldDefn_IsDefaultDriverSpecific, METH_O, "\n"
		"FieldDefn_IsDefaultDriverSpecific(FieldDefn self) -> int\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"
		""},
	 { "FieldDefn_GetDomainName", _wrap_FieldDefn_GetDomainName, METH_O, "\n"
		"FieldDefn_GetDomainName(FieldDefn self) -> char const *\n"
		"const char*\n"
		"OGR_Fld_GetDomainName(OGRFieldDefnH hDefn)\n"
		"\n"
		"Return the name of the field domain for this field.\n"
		"\n"
		"By default, none (empty string) is returned.\n"
		"\n"
		"Field domains ( OGRFieldDomain class) are attached at the GDALDataset\n"
		"level and should be retrieved with GDALDatasetGetFieldDomain().\n"
		"\n"
		"This method is the same as the C++ method\n"
		"OGRFieldDefn::GetDomainName().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition\n"
		"\n"
		"the field domain name, or an empty string if there is none.\n"
		"\n"
		"GDAL 3.3 \n"
		""},
	 { "FieldDefn_SetDomainName", _wrap_FieldDefn_SetDomainName, METH_VARARGS, "\n"
		"FieldDefn_SetDomainName(FieldDefn self, char const * name)\n"
		"void\n"
		"OGR_Fld_SetDomainName(OGRFieldDefnH hDefn, const char *pszFieldName)\n"
		"\n"
		"Set the name of the field domain for this field.\n"
		"\n"
		"Field domains ( OGRFieldDomain) are attached at the GDALDataset level.\n"
		"\n"
		"This method is the same as the C++ method\n"
		"OGRFieldDefn::SetDomainName().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition\n"
		"\n"
		"pszFieldName:  Field domain name.\n"
		"\n"
		"GDAL 3.3 \n"
		""},
	 { "FieldDefn_swigregister", FieldDefn_swigregister, METH_O, NULL},
	 { "FieldDefn_swiginit", FieldDefn_swiginit, METH_VARARGS, NULL},
	 { "delete_GeomFieldDefn", _wrap_delete_GeomFieldDefn, METH_O, "delete_GeomFieldDefn(GeomFieldDefn self)"},
	 { "new_GeomFieldDefn", (PyCFunction)(void(*)(void))_wrap_new_GeomFieldDefn, METH_VARARGS|METH_KEYWORDS, "new_GeomFieldDefn(char const * name_null_ok=\"\", OGRwkbGeometryType field_type=wkbUnknown) -> GeomFieldDefn"},
	 { "GeomFieldDefn_GetName", _wrap_GeomFieldDefn_GetName, METH_O, "GeomFieldDefn_GetName(GeomFieldDefn self) -> char const *"},
	 { "GeomFieldDefn_GetNameRef", _wrap_GeomFieldDefn_GetNameRef, METH_O, "GeomFieldDefn_GetNameRef(GeomFieldDefn self) -> char const *"},
	 { "GeomFieldDefn_SetName", _wrap_GeomFieldDefn_SetName, METH_VARARGS, "GeomFieldDefn_SetName(GeomFieldDefn self, char const * name)"},
	 { "GeomFieldDefn_GetType", _wrap_GeomFieldDefn_GetType, METH_O, "GeomFieldDefn_GetType(GeomFieldDefn self) -> OGRwkbGeometryType"},
	 { "GeomFieldDefn_SetType", _wrap_GeomFieldDefn_SetType, METH_VARARGS, "GeomFieldDefn_SetType(GeomFieldDefn self, OGRwkbGeometryType type)"},
	 { "GeomFieldDefn_GetSpatialRef", _wrap_GeomFieldDefn_GetSpatialRef, METH_O, "GeomFieldDefn_GetSpatialRef(GeomFieldDefn self) -> SpatialReference"},
	 { "GeomFieldDefn_SetSpatialRef", _wrap_GeomFieldDefn_SetSpatialRef, METH_VARARGS, "GeomFieldDefn_SetSpatialRef(GeomFieldDefn self, SpatialReference srs)"},
	 { "GeomFieldDefn_IsIgnored", _wrap_GeomFieldDefn_IsIgnored, METH_O, "GeomFieldDefn_IsIgnored(GeomFieldDefn self) -> int"},
	 { "GeomFieldDefn_SetIgnored", _wrap_GeomFieldDefn_SetIgnored, METH_VARARGS, "GeomFieldDefn_SetIgnored(GeomFieldDefn self, int bIgnored)"},
	 { "GeomFieldDefn_IsNullable", _wrap_GeomFieldDefn_IsNullable, METH_O, "GeomFieldDefn_IsNullable(GeomFieldDefn self) -> int"},
	 { "GeomFieldDefn_SetNullable", _wrap_GeomFieldDefn_SetNullable, METH_VARARGS, "GeomFieldDefn_SetNullable(GeomFieldDefn self, int bNullable)"},
	 { "GeomFieldDefn_swigregister", GeomFieldDefn_swigregister, METH_O, NULL},
	 { "GeomFieldDefn_swiginit", GeomFieldDefn_swiginit, METH_VARARGS, NULL},
	 { "CreateGeometryFromWkb", (PyCFunction)(void(*)(void))_wrap_CreateGeometryFromWkb, METH_VARARGS|METH_KEYWORDS, "CreateGeometryFromWkb(size_t len, SpatialReference reference=None) -> Geometry"},
	 { "CreateGeometryFromWkt", (PyCFunction)(void(*)(void))_wrap_CreateGeometryFromWkt, METH_VARARGS|METH_KEYWORDS, "CreateGeometryFromWkt(char ** val, SpatialReference reference=None) -> Geometry"},
	 { "CreateGeometryFromGML", _wrap_CreateGeometryFromGML, METH_O, "CreateGeometryFromGML(char const * input_string) -> Geometry"},
	 { "CreateGeometryFromJson", _wrap_CreateGeometryFromJson, METH_O, "CreateGeometryFromJson(char const * input_string) -> Geometry"},
	 { "CreateGeometryFromEsriJson", _wrap_CreateGeometryFromEsriJson, METH_O, "CreateGeometryFromEsriJson(char const * input_string) -> Geometry"},
	 { "BuildPolygonFromEdges", (PyCFunction)(void(*)(void))_wrap_BuildPolygonFromEdges, METH_VARARGS|METH_KEYWORDS, "BuildPolygonFromEdges(Geometry hLineCollection, int bBestEffort=0, int bAutoClose=0, double dfTolerance=0) -> Geometry"},
	 { "ApproximateArcAngles", (PyCFunction)(void(*)(void))_wrap_ApproximateArcAngles, METH_VARARGS|METH_KEYWORDS, "ApproximateArcAngles(double dfCenterX, double dfCenterY, double dfZ, double dfPrimaryRadius, double dfSecondaryAxis, double dfRotation, double dfStartAngle, double dfEndAngle, double dfMaxAngleStepSizeDegrees) -> Geometry"},
	 { "ForceToPolygon", _wrap_ForceToPolygon, METH_O, "ForceToPolygon(Geometry geom_in) -> Geometry"},
	 { "ForceToLineString", _wrap_ForceToLineString, METH_O, "ForceToLineString(Geometry geom_in) -> Geometry"},
	 { "ForceToMultiPolygon", _wrap_ForceToMultiPolygon, METH_O, "ForceToMultiPolygon(Geometry geom_in) -> Geometry"},
	 { "ForceToMultiPoint", _wrap_ForceToMultiPoint, METH_O, "ForceToMultiPoint(Geometry geom_in) -> Geometry"},
	 { "ForceToMultiLineString", _wrap_ForceToMultiLineString, METH_O, "ForceToMultiLineString(Geometry geom_in) -> Geometry"},
	 { "ForceTo", _wrap_ForceTo, METH_VARARGS, "ForceTo(Geometry geom_in, OGRwkbGeometryType eTargetType, char ** options=None) -> Geometry"},
	 { "delete_Geometry", _wrap_delete_Geometry, METH_O, "delete_Geometry(Geometry self)"},
	 { "new_Geometry", (PyCFunction)(void(*)(void))_wrap_new_Geometry, METH_VARARGS|METH_KEYWORDS, "new_Geometry(OGRwkbGeometryType type=wkbUnknown, char * wkt=None, int wkb=0, char * gml=None) -> Geometry"},
	 { "Geometry_ExportToWkt", _wrap_Geometry_ExportToWkt, METH_O, "\n"
		"Geometry_ExportToWkt(Geometry self) -> OGRErr\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"
		""},
	 { "Geometry_ExportToIsoWkt", _wrap_Geometry_ExportToIsoWkt, METH_O, "\n"
		"Geometry_ExportToIsoWkt(Geometry self) -> OGRErr\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"
		""},
	 { "Geometry_ExportToWkb", (PyCFunction)(void(*)(void))_wrap_Geometry_ExportToWkb, METH_VARARGS|METH_KEYWORDS, "\n"
		"Geometry_ExportToWkb(Geometry self, OGRwkbByteOrder byte_order=wkbNDR) -> OGRErr\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"
		""},
	 { "Geometry_ExportToIsoWkb", (PyCFunction)(void(*)(void))_wrap_Geometry_ExportToIsoWkb, METH_VARARGS|METH_KEYWORDS, "\n"
		"Geometry_ExportToIsoWkb(Geometry self, OGRwkbByteOrder byte_order=wkbNDR) -> OGRErr\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"
		""},
	 { "Geometry_ExportToGML", (PyCFunction)(void(*)(void))_wrap_Geometry_ExportToGML, METH_VARARGS|METH_KEYWORDS, "Geometry_ExportToGML(Geometry self, char ** options=None) -> retStringAndCPLFree *"},
	 { "Geometry_ExportToKML", _wrap_Geometry_ExportToKML, METH_VARARGS, "Geometry_ExportToKML(Geometry self, char const * altitude_mode=None) -> retStringAndCPLFree *"},
	 { "Geometry_ExportToJson", (PyCFunction)(void(*)(void))_wrap_Geometry_ExportToJson, METH_VARARGS|METH_KEYWORDS, "Geometry_ExportToJson(Geometry self, char ** options=None) -> retStringAndCPLFree *"},
	 { "Geometry_AddPoint", (PyCFunction)(void(*)(void))_wrap_Geometry_AddPoint, METH_VARARGS|METH_KEYWORDS, "Geometry_AddPoint(Geometry self, double x, double y, double z=0)"},
	 { "Geometry_AddPointM", (PyCFunction)(void(*)(void))_wrap_Geometry_AddPointM, METH_VARARGS|METH_KEYWORDS, "Geometry_AddPointM(Geometry self, double x, double y, double m)"},
	 { "Geometry_AddPointZM", (PyCFunction)(void(*)(void))_wrap_Geometry_AddPointZM, METH_VARARGS|METH_KEYWORDS, "Geometry_AddPointZM(Geometry self, double x, double y, double z, double m)"},
	 { "Geometry_AddPoint_2D", _wrap_Geometry_AddPoint_2D, METH_VARARGS, "Geometry_AddPoint_2D(Geometry self, double x, double y)"},
	 { "Geometry_AddGeometryDirectly", _wrap_Geometry_AddGeometryDirectly, METH_VARARGS, "Geometry_AddGeometryDirectly(Geometry self, Geometry other_disown) -> OGRErr"},
	 { "Geometry_AddGeometry", _wrap_Geometry_AddGeometry, METH_VARARGS, "Geometry_AddGeometry(Geometry self, Geometry other) -> OGRErr"},
	 { "Geometry_RemoveGeometry", _wrap_Geometry_RemoveGeometry, METH_VARARGS, "Geometry_RemoveGeometry(Geometry self, int iSubGeom) -> OGRErr"},
	 { "Geometry_Clone", _wrap_Geometry_Clone, METH_O, "\n"
		"Geometry_Clone(Geometry self) -> Geometry\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"
		"a handle on the copy of the geometry with the spatial reference system\n"
		"as the original. \n"
		""},
	 { "Geometry_GetGeometryType", _wrap_Geometry_GetGeometryType, METH_O, "\n"
		"Geometry_GetGeometryType(Geometry self) -> OGRwkbGeometryType\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"
		""},
	 { "Geometry_GetGeometryName", _wrap_Geometry_GetGeometryName, METH_O, "\n"
		"Geometry_GetGeometryName(Geometry self) -> char const *\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"
		""},
	 { "Geometry_Length", _wrap_Geometry_Length, METH_O, "Geometry_Length(Geometry self) -> double"},
	 { "Geometry_Area", _wrap_Geometry_Area, METH_O, "Geometry_Area(Geometry self) -> double"},
	 { "Geometry_GetArea", _wrap_Geometry_GetArea, METH_O, "Geometry_GetArea(Geometry self) -> double"},
	 { "Geometry_GetPointCount", _wrap_Geometry_GetPointCount, METH_O, "Geometry_GetPointCount(Geometry self) -> int"},
	 { "Geometry_GetPoints", (PyCFunction)(void(*)(void))_wrap_Geometry_GetPoints, METH_VARARGS|METH_KEYWORDS, "Geometry_GetPoints(Geometry self, int nCoordDimension=0)"},
	 { "Geometry_GetX", (PyCFunction)(void(*)(void))_wrap_Geometry_GetX, METH_VARARGS|METH_KEYWORDS, "Geometry_GetX(Geometry self, int point=0) -> double"},
	 { "Geometry_GetY", (PyCFunction)(void(*)(void))_wrap_Geometry_GetY, METH_VARARGS|METH_KEYWORDS, "Geometry_GetY(Geometry self, int point=0) -> double"},
	 { "Geometry_GetZ", (PyCFunction)(void(*)(void))_wrap_Geometry_GetZ, METH_VARARGS|METH_KEYWORDS, "Geometry_GetZ(Geometry self, int point=0) -> double"},
	 { "Geometry_GetM", (PyCFunction)(void(*)(void))_wrap_Geometry_GetM, METH_VARARGS|METH_KEYWORDS, "Geometry_GetM(Geometry self, int point=0) -> double"},
	 { "Geometry_GetPoint", _wrap_Geometry_GetPoint, METH_VARARGS, "Geometry_GetPoint(Geometry self, int iPoint=0)"},
	 { "Geometry_GetPointZM", _wrap_Geometry_GetPointZM, METH_VARARGS, "Geometry_GetPointZM(Geometry self, int iPoint=0)"},
	 { "Geometry_GetPoint_2D", _wrap_Geometry_GetPoint_2D, METH_VARARGS, "Geometry_GetPoint_2D(Geometry self, int iPoint=0)"},
	 { "Geometry_GetGeometryCount", _wrap_Geometry_GetGeometryCount, METH_O, "Geometry_GetGeometryCount(Geometry self) -> int"},
	 { "Geometry_SetPoint", (PyCFunction)(void(*)(void))_wrap_Geometry_SetPoint, METH_VARARGS|METH_KEYWORDS, "Geometry_SetPoint(Geometry self, int point, double x, double y, double z=0)"},
	 { "Geometry_SetPointM", (PyCFunction)(void(*)(void))_wrap_Geometry_SetPointM, METH_VARARGS|METH_KEYWORDS, "Geometry_SetPointM(Geometry self, int point, double x, double y, double m)"},
	 { "Geometry_SetPointZM", (PyCFunction)(void(*)(void))_wrap_Geometry_SetPointZM, METH_VARARGS|METH_KEYWORDS, "Geometry_SetPointZM(Geometry self, int point, double x, double y, double z, double m)"},
	 { "Geometry_SetPoint_2D", (PyCFunction)(void(*)(void))_wrap_Geometry_SetPoint_2D, METH_VARARGS|METH_KEYWORDS, "Geometry_SetPoint_2D(Geometry self, int point, double x, double y)"},
	 { "Geometry_SwapXY", _wrap_Geometry_SwapXY, METH_O, "\n"
		"Geometry_SwapXY(Geometry self)\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"
		""},
	 { "Geometry_GetGeometryRef", _wrap_Geometry_GetGeometryRef, METH_VARARGS, "Geometry_GetGeometryRef(Geometry self, int geom) -> Geometry"},
	 { "Geometry_Simplify", _wrap_Geometry_Simplify, METH_VARARGS, "\n"
		"Geometry_Simplify(Geometry self, double tolerance) -> Geometry\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"
		""},
	 { "Geometry_SimplifyPreserveTopology", _wrap_Geometry_SimplifyPreserveTopology, METH_VARARGS, "\n"
		"Geometry_SimplifyPreserveTopology(Geometry self, double tolerance) -> Geometry\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"
		""},
	 { "Geometry_DelaunayTriangulation", (PyCFunction)(void(*)(void))_wrap_Geometry_DelaunayTriangulation, METH_VARARGS|METH_KEYWORDS, "\n"
		"Geometry_DelaunayTriangulation(Geometry self, double dfTolerance=0.0, int bOnlyEdges=FALSE) -> Geometry\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"
		""},
	 { "Geometry_Polygonize", _wrap_Geometry_Polygonize, METH_O, "\n"
		"Geometry_Polygonize(Geometry self) -> Geometry\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"
		""},
	 { "Geometry_Boundary", _wrap_Geometry_Boundary, METH_O, "\n"
		"Geometry_Boundary(Geometry self) -> Geometry\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"
		""},
	 { "Geometry_GetBoundary", _wrap_Geometry_GetBoundary, METH_O, "\n"
		"Geometry_GetBoundary(Geometry self) -> Geometry\n"
		"OGRGeometryH\n"
		"OGR_G_GetBoundary(OGRGeometryH hTarget)\n"
		"\n"
		"Compute boundary (deprecated)\n"
		"\n"
		"Deprecated\n"
		"\n"
		"See:   OGR_G_Boundary() \n"
		""},
	 { "Geometry_ConvexHull", _wrap_Geometry_ConvexHull, METH_O, "\n"
		"Geometry_ConvexHull(Geometry self) -> Geometry\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"
		""},
	 { "Geometry_MakeValid", _wrap_Geometry_MakeValid, METH_VARARGS, "\n"
		"Geometry_MakeValid(Geometry self, char ** options=None) -> Geometry\n"
		"OGRGeometryH\n"
		"OGR_G_MakeValid(OGRGeometryH hGeom)\n"
		"\n"
		"Attempts to make an invalid geometry valid without losing vertices.\n"
		"\n"
		"Already-valid geometries are cloned without further intervention.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::MakeValid().\n"
		"\n"
		"This function is built on the GEOS >= 3.8 library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		">= 3.8 library, this function will return a clone of the input\n"
		"geometry if it is valid, or NULL if it is invalid\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  The Geometry to make valid.\n"
		"\n"
		"a newly allocated geometry now owned by the caller, or NULL on\n"
		"failure.\n"
		"\n"
		"GDAL 3.0 \n"
		""},
	 { "Geometry_Normalize", _wrap_Geometry_Normalize, METH_O, "\n"
		"Geometry_Normalize(Geometry self) -> Geometry\n"
		"OGRGeometryH\n"
		"OGR_G_Normalize(OGRGeometryH hGeom)\n"
		"\n"
		"Attempts to bring geometry into normalized/canonical form.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Normalize().\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"
		"hGeom:  The Geometry to normalize.\n"
		"\n"
		"a newly allocated geometry now owned by the caller, or NULL on\n"
		"failure.\n"
		"\n"
		"GDAL 3.3 \n"
		""},
	 { "Geometry_RemoveLowerDimensionSubGeoms", _wrap_Geometry_RemoveLowerDimensionSubGeoms, METH_O, "Geometry_RemoveLowerDimensionSubGeoms(Geometry self) -> Geometry"},
	 { "Geometry_Buffer", (PyCFunction)(void(*)(void))_wrap_Geometry_Buffer, METH_VARARGS|METH_KEYWORDS, "\n"
		"Geometry_Buffer(Geometry self, double distance, int quadsecs=30) -> Geometry\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"
		""},
	 { "Geometry_Intersection", _wrap_Geometry_Intersection, METH_VARARGS, "\n"
		"Geometry_Intersection(Geometry self, Geometry other) -> Geometry\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"
		"Geometry validity is not checked. In case you are unsure of the\n"
		"validity of the input geometries, call IsValid() before, otherwise the\n"
		"result might be wrong.\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"
		""},
	 { "Geometry_Union", _wrap_Geometry_Union, METH_VARARGS, "\n"
		"Geometry_Union(Geometry self, Geometry other) -> Geometry\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"
		"Geometry validity is not checked. In case you are unsure of the\n"
		"validity of the input geometries, call IsValid() before, otherwise the\n"
		"result might be wrong.\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"
		""},
	 { "Geometry_UnionCascaded", _wrap_Geometry_UnionCascaded, METH_O, "\n"
		"Geometry_UnionCascaded(Geometry self) -> Geometry\n"
		"OGRGeometryH\n"
		"OGR_G_UnionCascaded(OGRGeometryH hThis)\n"
		"\n"
		"Compute union using cascading.\n"
		"\n"
		"Geometry validity is not checked. In case you are unsure of the\n"
		"validity of the input geometries, call IsValid() before, otherwise the\n"
		"result might be wrong.\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"
		""},
	 { "Geometry_Difference", _wrap_Geometry_Difference, METH_VARARGS, "\n"
		"Geometry_Difference(Geometry self, Geometry other) -> Geometry\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"
		"Geometry validity is not checked. In case you are unsure of the\n"
		"validity of the input geometries, call IsValid() before, otherwise the\n"
		"result might be wrong.\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"
		""},
	 { "Geometry_SymDifference", _wrap_Geometry_SymDifference, METH_VARARGS, "\n"
		"Geometry_SymDifference(Geometry self, Geometry other) -> Geometry\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"
		"Geometry validity is not checked. In case you are unsure of the\n"
		"validity of the input geometries, call IsValid() before, otherwise the\n"
		"result might be wrong.\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"
		""},
	 { "Geometry_SymmetricDifference", _wrap_Geometry_SymmetricDifference, METH_VARARGS, "\n"
		"Geometry_SymmetricDifference(Geometry self, Geometry other) -> Geometry\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"
		""},
	 { "Geometry_Distance", _wrap_Geometry_Distance, METH_VARARGS, "\n"
		"Geometry_Distance(Geometry self, Geometry other) -> double\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"
		""},
	 { "Geometry_Distance3D", _wrap_Geometry_Distance3D, METH_VARARGS, "\n"
		"Geometry_Distance3D(Geometry self, Geometry other) -> double\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"
		""},
	 { "Geometry_Empty", _wrap_Geometry_Empty, METH_O, "\n"
		"Geometry_Empty(Geometry self)\n"
		"void OGR_G_Empty(OGRGeometryH hGeom)\n"
		"\n"
		"Clear geometry information.\n"
		"\n"
		"This restores the geometry to its 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"
		""},
	 { "Geometry_IsEmpty", _wrap_Geometry_IsEmpty, METH_O, "\n"
		"Geometry_IsEmpty(Geometry self) -> bool\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"
		""},
	 { "Geometry_IsValid", _wrap_Geometry_IsValid, METH_O, "\n"
		"Geometry_IsValid(Geometry self) -> bool\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"
		""},
	 { "Geometry_IsSimple", _wrap_Geometry_IsSimple, METH_O, "\n"
		"Geometry_IsSimple(Geometry self) -> bool\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"
		""},
	 { "Geometry_IsRing", _wrap_Geometry_IsRing, METH_O, "\n"
		"Geometry_IsRing(Geometry self) -> bool\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"
		""},
	 { "Geometry_Intersects", _wrap_Geometry_Intersects, METH_VARARGS, "\n"
		"Geometry_Intersects(Geometry self, Geometry other) -> bool\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"
		""},
	 { "Geometry_Intersect", _wrap_Geometry_Intersect, METH_VARARGS, "Geometry_Intersect(Geometry self, Geometry other) -> bool"},
	 { "Geometry_Equals", _wrap_Geometry_Equals, METH_VARARGS, "\n"
		"Geometry_Equals(Geometry self, Geometry other) -> bool\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"
		""},
	 { "Geometry_Equal", _wrap_Geometry_Equal, METH_VARARGS, "Geometry_Equal(Geometry self, Geometry other) -> bool"},
	 { "Geometry_Disjoint", _wrap_Geometry_Disjoint, METH_VARARGS, "\n"
		"Geometry_Disjoint(Geometry self, Geometry other) -> bool\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"
		"Geometry validity is not checked. In case you are unsure of the\n"
		"validity of the input geometries, call IsValid() before, otherwise the\n"
		"result might be wrong.\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"
		""},
	 { "Geometry_Touches", _wrap_Geometry_Touches, METH_VARARGS, "\n"
		"Geometry_Touches(Geometry self, Geometry other) -> bool\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"
		"Geometry validity is not checked. In case you are unsure of the\n"
		"validity of the input geometries, call IsValid() before, otherwise the\n"
		"result might be wrong.\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"
		""},
	 { "Geometry_Crosses", _wrap_Geometry_Crosses, METH_VARARGS, "\n"
		"Geometry_Crosses(Geometry self, Geometry other) -> bool\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"
		"Geometry validity is not checked. In case you are unsure of the\n"
		"validity of the input geometries, call IsValid() before, otherwise the\n"
		"result might be wrong.\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"
		""},
	 { "Geometry_Within", _wrap_Geometry_Within, METH_VARARGS, "\n"
		"Geometry_Within(Geometry self, Geometry other) -> bool\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"
		"Geometry validity is not checked. In case you are unsure of the\n"
		"validity of the input geometries, call IsValid() before, otherwise the\n"
		"result might be wrong.\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"
		""},
	 { "Geometry_Contains", _wrap_Geometry_Contains, METH_VARARGS, "\n"
		"Geometry_Contains(Geometry self, Geometry other) -> bool\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"
		"Geometry validity is not checked. In case you are unsure of the\n"
		"validity of the input geometries, call IsValid() before, otherwise the\n"
		"result might be wrong.\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"
		""},
	 { "Geometry_Overlaps", _wrap_Geometry_Overlaps, METH_VARARGS, "\n"
		"Geometry_Overlaps(Geometry self, Geometry other) -> bool\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"
		"Geometry validity is not checked. In case you are unsure of the\n"
		"validity of the input geometries, call IsValid() before, otherwise the\n"
		"result might be wrong.\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"
		""},
	 { "Geometry_TransformTo", _wrap_Geometry_TransformTo, METH_VARARGS, "\n"
		"Geometry_TransformTo(Geometry self, SpatialReference reference) -> OGRErr\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"
		""},
	 { "Geometry_GetSpatialReference", _wrap_Geometry_GetSpatialReference, METH_O, "\n"
		"Geometry_GetSpatialReference(Geometry self) -> SpatialReference\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"
		""},
	 { "Geometry_AssignSpatialReference", _wrap_Geometry_AssignSpatialReference, METH_VARARGS, "\n"
		"Geometry_AssignSpatialReference(Geometry self, SpatialReference reference)\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"
		""},
	 { "Geometry_CloseRings", _wrap_Geometry_CloseRings, METH_O, "\n"
		"Geometry_CloseRings(Geometry self)\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"
		""},
	 { "Geometry_FlattenTo2D", _wrap_Geometry_FlattenTo2D, METH_O, "\n"
		"Geometry_FlattenTo2D(Geometry self)\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"
		""},
	 { "Geometry_Segmentize", _wrap_Geometry_Segmentize, METH_VARARGS, "\n"
		"Geometry_Segmentize(Geometry self, double dfMaxLength)\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"
		""},
	 { "Geometry_GetEnvelope", _wrap_Geometry_GetEnvelope, METH_O, "\n"
		"Geometry_GetEnvelope(Geometry self)\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"
		""},
	 { "Geometry_GetEnvelope3D", _wrap_Geometry_GetEnvelope3D, METH_O, "\n"
		"Geometry_GetEnvelope3D(Geometry self)\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"
		""},
	 { "Geometry_Centroid", _wrap_Geometry_Centroid, METH_O, "\n"
		"Geometry_Centroid(Geometry self) -> Geometry\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"
		""},
	 { "Geometry_PointOnSurface", _wrap_Geometry_PointOnSurface, METH_O, "\n"
		"Geometry_PointOnSurface(Geometry self) -> Geometry\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"
		""},
	 { "Geometry_WkbSize", _wrap_Geometry_WkbSize, METH_O, "\n"
		"Geometry_WkbSize(Geometry self) -> size_t\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"
		"Use OGR_G_WkbSizeEx() if called on huge geometries (> 2 GB serialized)\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"
		""},
	 { "Geometry_GetCoordinateDimension", _wrap_Geometry_GetCoordinateDimension, METH_O, "\n"
		"Geometry_GetCoordinateDimension(Geometry self) -> int\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"
		""},
	 { "Geometry_CoordinateDimension", _wrap_Geometry_CoordinateDimension, METH_O, "\n"
		"Geometry_CoordinateDimension(Geometry self) -> int\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"
		""},
	 { "Geometry_Is3D", _wrap_Geometry_Is3D, METH_O, "\n"
		"Geometry_Is3D(Geometry self) -> int\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"
		""},
	 { "Geometry_IsMeasured", _wrap_Geometry_IsMeasured, METH_O, "\n"
		"Geometry_IsMeasured(Geometry self) -> int\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"
		""},
	 { "Geometry_SetCoordinateDimension", _wrap_Geometry_SetCoordinateDimension, METH_VARARGS, "\n"
		"Geometry_SetCoordinateDimension(Geometry self, int dimension)\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"
		""},
	 { "Geometry_Set3D", _wrap_Geometry_Set3D, METH_VARARGS, "\n"
		"Geometry_Set3D(Geometry self, int b3D)\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"
		""},
	 { "Geometry_SetMeasured", _wrap_Geometry_SetMeasured, METH_VARARGS, "\n"
		"Geometry_SetMeasured(Geometry self, int bMeasured)\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"
		""},
	 { "Geometry_GetDimension", _wrap_Geometry_GetDimension, METH_O, "\n"
		"Geometry_GetDimension(Geometry self) -> int\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"
		""},
	 { "Geometry_HasCurveGeometry", _wrap_Geometry_HasCurveGeometry, METH_VARARGS, "Geometry_HasCurveGeometry(Geometry self, int bLookForCircular=FALSE) -> int"},
	 { "Geometry_GetLinearGeometry", (PyCFunction)(void(*)(void))_wrap_Geometry_GetLinearGeometry, METH_VARARGS|METH_KEYWORDS, "Geometry_GetLinearGeometry(Geometry self, double dfMaxAngleStepSizeDegrees=0.0, char ** options=None) -> Geometry"},
	 { "Geometry_GetCurveGeometry", (PyCFunction)(void(*)(void))_wrap_Geometry_GetCurveGeometry, METH_VARARGS|METH_KEYWORDS, "Geometry_GetCurveGeometry(Geometry self, char ** options=None) -> Geometry"},
	 { "Geometry_Value", _wrap_Geometry_Value, METH_VARARGS, "Geometry_Value(Geometry self, double dfDistance) -> Geometry"},
	 { "Geometry_Transform", _wrap_Geometry_Transform, METH_VARARGS, "\n"
		"Geometry_Transform(Geometry self, CoordinateTransformation trans) -> OGRErr\n"
		"Geometry_Transform(Geometry self, GeomTransformer transformer) -> Geometry\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"
		""},
	 { "Geometry_CreatePreparedGeometry", _wrap_Geometry_CreatePreparedGeometry, METH_O, "Geometry_CreatePreparedGeometry(Geometry self) -> PreparedGeometry"},
	 { "Geometry_swigregister", Geometry_swigregister, METH_O, NULL},
	 { "Geometry_swiginit", Geometry_swiginit, METH_VARARGS, NULL},
	 { "delete_PreparedGeometry", _wrap_delete_PreparedGeometry, METH_O, "delete_PreparedGeometry(PreparedGeometry self)"},
	 { "PreparedGeometry_Intersects", _wrap_PreparedGeometry_Intersects, METH_VARARGS, "PreparedGeometry_Intersects(PreparedGeometry self, Geometry otherGeom) -> bool"},
	 { "PreparedGeometry_Contains", _wrap_PreparedGeometry_Contains, METH_VARARGS, "PreparedGeometry_Contains(PreparedGeometry self, Geometry otherGeom) -> bool"},
	 { "PreparedGeometry_swigregister", PreparedGeometry_swigregister, METH_O, NULL},
	 { "new_GeomTransformer", _wrap_new_GeomTransformer, METH_VARARGS, "new_GeomTransformer(CoordinateTransformation ct, char ** options=None) -> GeomTransformer"},
	 { "delete_GeomTransformer", _wrap_delete_GeomTransformer, METH_O, "delete_GeomTransformer(GeomTransformer self)"},
	 { "GeomTransformer_Transform", _wrap_GeomTransformer_Transform, METH_VARARGS, "GeomTransformer_Transform(GeomTransformer self, Geometry src_geom) -> Geometry"},
	 { "GeomTransformer_swigregister", GeomTransformer_swigregister, METH_O, NULL},
	 { "GeomTransformer_swiginit", GeomTransformer_swiginit, METH_VARARGS, NULL},
	 { "delete_FieldDomain", _wrap_delete_FieldDomain, METH_O, "delete_FieldDomain(FieldDomain self)"},
	 { "FieldDomain_GetName", _wrap_FieldDomain_GetName, METH_O, "FieldDomain_GetName(FieldDomain self) -> char const *"},
	 { "FieldDomain_GetDescription", _wrap_FieldDomain_GetDescription, METH_O, "FieldDomain_GetDescription(FieldDomain self) -> char const *"},
	 { "FieldDomain_GetFieldType", _wrap_FieldDomain_GetFieldType, METH_O, "FieldDomain_GetFieldType(FieldDomain self) -> OGRFieldType"},
	 { "FieldDomain_GetFieldSubType", _wrap_FieldDomain_GetFieldSubType, METH_O, "FieldDomain_GetFieldSubType(FieldDomain self) -> OGRFieldSubType"},
	 { "FieldDomain_GetDomainType", _wrap_FieldDomain_GetDomainType, METH_O, "FieldDomain_GetDomainType(FieldDomain self) -> OGRFieldDomainType"},
	 { "FieldDomain_GetSplitPolicy", _wrap_FieldDomain_GetSplitPolicy, METH_O, "FieldDomain_GetSplitPolicy(FieldDomain self) -> OGRFieldDomainSplitPolicy"},
	 { "FieldDomain_SetSplitPolicy", _wrap_FieldDomain_SetSplitPolicy, METH_VARARGS, "FieldDomain_SetSplitPolicy(FieldDomain self, OGRFieldDomainSplitPolicy policy)"},
	 { "FieldDomain_GetMergePolicy", _wrap_FieldDomain_GetMergePolicy, METH_O, "FieldDomain_GetMergePolicy(FieldDomain self) -> OGRFieldDomainMergePolicy"},
	 { "FieldDomain_SetMergePolicy", _wrap_FieldDomain_SetMergePolicy, METH_VARARGS, "FieldDomain_SetMergePolicy(FieldDomain self, OGRFieldDomainMergePolicy policy)"},
	 { "FieldDomain_GetEnumeration", _wrap_FieldDomain_GetEnumeration, METH_O, "FieldDomain_GetEnumeration(FieldDomain self) -> OGRCodedValue const *"},
	 { "FieldDomain_GetMinAsDouble", _wrap_FieldDomain_GetMinAsDouble, METH_O, "FieldDomain_GetMinAsDouble(FieldDomain self) -> double"},
	 { "FieldDomain_IsMinInclusive", _wrap_FieldDomain_IsMinInclusive, METH_O, "FieldDomain_IsMinInclusive(FieldDomain self) -> bool"},
	 { "FieldDomain_GetMaxAsDouble", _wrap_FieldDomain_GetMaxAsDouble, METH_O, "FieldDomain_GetMaxAsDouble(FieldDomain self) -> double"},
	 { "FieldDomain_IsMaxInclusive", _wrap_FieldDomain_IsMaxInclusive, METH_O, "FieldDomain_IsMaxInclusive(FieldDomain self) -> bool"},
	 { "FieldDomain_GetGlob", _wrap_FieldDomain_GetGlob, METH_O, "FieldDomain_GetGlob(FieldDomain self) -> char const *"},
	 { "FieldDomain_swigregister", FieldDomain_swigregister, METH_O, NULL},
	 { "CreateCodedFieldDomain", _wrap_CreateCodedFieldDomain, METH_VARARGS, "CreateCodedFieldDomain(char const * name, char const * description, OGRFieldType type, OGRFieldSubType subtype, OGRCodedValue const * enumeration) -> FieldDomain"},
	 { "CreateRangeFieldDomain", _wrap_CreateRangeFieldDomain, METH_VARARGS, "CreateRangeFieldDomain(char const * name, char const * description, OGRFieldType type, OGRFieldSubType subtype, double min, bool minIsInclusive, double max, double maxIsInclusive) -> FieldDomain"},
	 { "CreateGlobFieldDomain", _wrap_CreateGlobFieldDomain, METH_VARARGS, "CreateGlobFieldDomain(char const * name, char const * description, OGRFieldType type, OGRFieldSubType subtype, char const * glob) -> FieldDomain"},
	 { "GetDriverCount", _wrap_GetDriverCount, METH_NOARGS, "GetDriverCount() -> int"},
	 { "GetOpenDSCount", _wrap_GetOpenDSCount, METH_NOARGS, "GetOpenDSCount() -> int"},
	 { "SetGenerate_DB2_V72_BYTE_ORDER", _wrap_SetGenerate_DB2_V72_BYTE_ORDER, METH_O, "SetGenerate_DB2_V72_BYTE_ORDER(int bGenerate_DB2_V72_BYTE_ORDER) -> OGRErr"},
	 { "RegisterAll", _wrap_RegisterAll, METH_NOARGS, "RegisterAll()"},
	 { "GeometryTypeToName", _wrap_GeometryTypeToName, METH_O, "GeometryTypeToName(OGRwkbGeometryType eType) -> char const *"},
	 { "GetFieldTypeName", _wrap_GetFieldTypeName, METH_O, "GetFieldTypeName(OGRFieldType type) -> char const *"},
	 { "GetFieldSubTypeName", _wrap_GetFieldSubTypeName, METH_O, "GetFieldSubTypeName(OGRFieldSubType type) -> char const *"},
	 { "GT_Flatten", _wrap_GT_Flatten, METH_O, "GT_Flatten(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { "GT_SetZ", _wrap_GT_SetZ, METH_O, "GT_SetZ(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { "GT_SetM", _wrap_GT_SetM, METH_O, "GT_SetM(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { "GT_SetModifier", _wrap_GT_SetModifier, METH_VARARGS, "GT_SetModifier(OGRwkbGeometryType eType, int bSetZ, int bSetM=FALSE) -> OGRwkbGeometryType"},
	 { "GT_HasZ", _wrap_GT_HasZ, METH_O, "GT_HasZ(OGRwkbGeometryType eType) -> int"},
	 { "GT_HasM", _wrap_GT_HasM, METH_O, "GT_HasM(OGRwkbGeometryType eType) -> int"},
	 { "GT_IsSubClassOf", _wrap_GT_IsSubClassOf, METH_VARARGS, "GT_IsSubClassOf(OGRwkbGeometryType eType, OGRwkbGeometryType eSuperType) -> int"},
	 { "GT_IsCurve", _wrap_GT_IsCurve, METH_O, "GT_IsCurve(OGRwkbGeometryType arg1) -> int"},
	 { "GT_IsSurface", _wrap_GT_IsSurface, METH_O, "GT_IsSurface(OGRwkbGeometryType arg1) -> int"},
	 { "GT_IsNonLinear", _wrap_GT_IsNonLinear, METH_O, "GT_IsNonLinear(OGRwkbGeometryType arg1) -> int"},
	 { "GT_GetCollection", _wrap_GT_GetCollection, METH_O, "GT_GetCollection(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { "GT_GetCurve", _wrap_GT_GetCurve, METH_O, "GT_GetCurve(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { "GT_GetLinear", _wrap_GT_GetLinear, METH_O, "GT_GetLinear(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { "SetNonLinearGeometriesEnabledFlag", _wrap_SetNonLinearGeometriesEnabledFlag, METH_O, "SetNonLinearGeometriesEnabledFlag(int bFlag)"},
	 { "GetNonLinearGeometriesEnabledFlag", _wrap_GetNonLinearGeometriesEnabledFlag, METH_NOARGS, "GetNonLinearGeometriesEnabledFlag() -> int"},
	 { "GetOpenDS", _wrap_GetOpenDS, METH_O, "GetOpenDS(int ds_number) -> DataSource"},
	 { "Open", (PyCFunction)(void(*)(void))_wrap_Open, METH_VARARGS|METH_KEYWORDS, "Open(char const * utf8_path, int update=0) -> DataSource"},
	 { "OpenShared", (PyCFunction)(void(*)(void))_wrap_OpenShared, METH_VARARGS|METH_KEYWORDS, "OpenShared(char const * utf8_path, int update=0) -> DataSource"},
	 { "GetDriverByName", _wrap_GetDriverByName, METH_O, "GetDriverByName(char const * name) -> Driver"},
	 { "GetDriver", _wrap_GetDriver, METH_O, "GetDriver(int driver_number) -> Driver"},
	 { "GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, "GeneralCmdLineProcessor(char ** papszArgv, int nOptions=0) -> char **"},
	 { "TermProgress_nocb", (PyCFunction)(void(*)(void))_wrap_TermProgress_nocb, METH_VARARGS|METH_KEYWORDS, "TermProgress_nocb(double dfProgress, char const * pszMessage=None, void * pData=None) -> int"},
	 { NULL, NULL, 0, NULL }
};

static PyMethodDef SwigMethods_proxydocs[] = {
	 { 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_OGRCodedValue = {"_p_OGRCodedValue", "OGRCodedValue *", 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_OGRFieldDomainShadow = {"_p_OGRFieldDomainShadow", "OGRFieldDomainShadow *", 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_OGRGeomTransformerShadow = {"_p_OGRGeomTransformerShadow", "OGRGeomTransformerShadow *", 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_OGRPreparedGeometryShadow = {"_p_OGRPreparedGeometryShadow", "OGRPreparedGeometryShadow *", 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 *|OSRAxisMappingStrategy *|OGRFieldDomainType *|OGRFieldType *|CPLErr *|int *|OGRwkbGeometryType *|OGRJustification *|OGRAxisOrientation *|OGRFieldDomainSplitPolicy *|OGRFieldDomainMergePolicy *|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 _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_GDALMajorObjectShadow,
  &_swigt__p_GDALProgressFunc,
  &_swigt__p_GIntBig,
  &_swigt__p_OGRCodedValue,
  &_swigt__p_OGRDataSourceShadow,
  &_swigt__p_OGRDriverShadow,
  &_swigt__p_OGRFeatureDefnShadow,
  &_swigt__p_OGRFeatureShadow,
  &_swigt__p_OGRFieldDefnShadow,
  &_swigt__p_OGRFieldDomainShadow,
  &_swigt__p_OGRGeomFieldDefnShadow,
  &_swigt__p_OGRGeomTransformerShadow,
  &_swigt__p_OGRGeometryShadow,
  &_swigt__p_OGRLayerShadow,
  &_swigt__p_OGRPreparedGeometryShadow,
  &_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,
  &_swigt__p_size_t,
};

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_OGRCodedValue[] = {  {&_swigt__p_OGRCodedValue, 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_OGRFieldDomainShadow[] = {  {&_swigt__p_OGRFieldDomainShadow, 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_OGRGeomTransformerShadow[] = {  {&_swigt__p_OGRGeomTransformerShadow, 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_OGRPreparedGeometryShadow[] = {  {&_swigt__p_OGRPreparedGeometryShadow, 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 _swigc__p_size_t[] = {  {&_swigt__p_size_t, 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_OGRCodedValue,
  _swigc__p_OGRDataSourceShadow,
  _swigc__p_OGRDriverShadow,
  _swigc__p_OGRFeatureDefnShadow,
  _swigc__p_OGRFeatureShadow,
  _swigc__p_OGRFieldDefnShadow,
  _swigc__p_OGRFieldDomainShadow,
  _swigc__p_OGRGeomFieldDefnShadow,
  _swigc__p_OGRGeomTransformerShadow,
  _swigc__p_OGRGeometryShadow,
  _swigc__p_OGRLayerShadow,
  _swigc__p_OGRPreparedGeometryShadow,
  _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,
  _swigc__p_size_t,
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

static swig_const_info swig_const_table[] = {
{ SWIG_PY_POINTER, "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 %lu\n", (unsigned long)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 %lu %s\n", (unsigned long)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 %lu %s\n", (unsigned long)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 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 = {
#if PY_VERSION_HEX >= 0x03000000
        PyVarObject_HEAD_INIT(NULL, 0)
#else
        PyObject_HEAD_INIT(NULL)
        0,                                  /* ob_size */
#endif
        "swigvarlink",                      /* tp_name */
        sizeof(swig_varlinkobject),         /* tp_basicsize */
        0,                                  /* tp_itemsize */
        (destructor) swig_varlink_dealloc,  /* tp_dealloc */
        0,                                  /* 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 */
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
        0,                                  /* tp_del */
        0,                                  /* tp_version_tag */
#if PY_VERSION_HEX >= 0x03040000
        0,                                  /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
        0,                                  /* tp_vectorcall */
#endif
#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
        0,                                  /* tp_print */
#endif
#ifdef COUNT_ALLOCS
        0,                                  /* tp_allocs */
        0,                                  /* tp_frees */
        0,                                  /* tp_maxalloc */
        0,                                  /* tp_prev */
        0                                   /* tp_next */
#endif
      };
      varlink_type = tmp;
      type_init = 1;
      if (PyType_Ready(&varlink_type) < 0)
      return NULL;
    }
    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, const 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) {
        memcpy(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 *globals = 0;
    if (!globals) {
      globals = SWIG_newvarlink();
    }
    return 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;
              memcpy(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;
            }
          }
        }
      }
    }
  } 
  
  /* -----------------------------------------------------------------------------
   * Method creation and docstring support functions
   * ----------------------------------------------------------------------------- */
  
  /* -----------------------------------------------------------------------------
   * Function to find the method definition with the correct docstring for the
   * proxy module as opposed to the low-level API
   * ----------------------------------------------------------------------------- */
  
  SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
    /* Find the function in the modified method table */
    size_t offset = 0;
    int found = 0;
    while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
      if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
        found = 1;
        break;
      }
      offset++;
    }
    /* Use the copy with the modified docstring if available */
    return found ? &SwigMethods_proxydocs[offset] : NULL;
  }
  
  /* -----------------------------------------------------------------------------
   * Wrapper of PyInstanceMethod_New() used in Python 3
   * It is exported to the generated module, used for -fastproxy
   * ----------------------------------------------------------------------------- */
  
  SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
    if (PyCFunction_Check(func)) {
      PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
      PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
      if (ml)
      func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
    }
#if PY_VERSION_HEX >= 0x03000000
    return PyInstanceMethod_New(func);
#else
    return PyMethod_New(func, NULL, NULL);
#endif
  }
  
  /* -----------------------------------------------------------------------------
   * Wrapper of PyStaticMethod_New()
   * It is exported to the generated module, used for -fastproxy
   * ----------------------------------------------------------------------------- */
  
  SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
    if (PyCFunction_Check(func)) {
      PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
      PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
      if (ml)
      func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
    }
    return PyStaticMethod_New(func);
  }
  
#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, *globals;
  
#if PY_VERSION_HEX >= 0x03000000
  static struct PyModuleDef SWIG_module = {
    PyModuleDef_HEAD_INIT,
    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 = {
    SwigPyObject_own,
    SwigPyObject_own
  };
  static PyGetSetDef thisown_getset_def = {
    (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
  };
  PyTypeObject *builtin_pytype;
  int builtin_base_count;
  swig_type_info *builtin_basetype;
  PyObject *tuple;
  PyGetSetDescrObject *static_getset;
  PyTypeObject *metatype;
  PyTypeObject *swigpyobject;
  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;
  
  /* Metaclass is used to implement static member variables */
  metatype = SwigPyObjectType();
  assert(metatype);
#endif
  
  (void)globals;
  
  /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
  SWIG_This();
  SWIG_Python_TypeCache();
  SwigPyPacked_type();
#ifndef SWIGPYTHON_BUILTIN
  SwigPyObject_type();
#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(SWIG_name, SwigMethods);
#endif
  
  md = d = PyModule_GetDict(m);
  (void)md;
  
  SWIG_InitializeModule(0);
  
#ifdef SWIGPYTHON_BUILTIN
  swigpyobject = SwigPyObject_TypeOnce();
  
  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;
  } else if (swigpyobject->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);
  
  SWIG_Python_SetConstant(d, "wkb25DBit",SWIG_From_int(static_cast< int >(0x80000000)));
  SWIG_Python_SetConstant(d, "wkb25Bit",SWIG_From_int(static_cast< int >(0x80000000)));
  SWIG_Python_SetConstant(d, "wkbUnknown",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "wkbPoint",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "wkbLineString",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "wkbPolygon",SWIG_From_int(static_cast< int >(3)));
  SWIG_Python_SetConstant(d, "wkbMultiPoint",SWIG_From_int(static_cast< int >(4)));
  SWIG_Python_SetConstant(d, "wkbMultiLineString",SWIG_From_int(static_cast< int >(5)));
  SWIG_Python_SetConstant(d, "wkbMultiPolygon",SWIG_From_int(static_cast< int >(6)));
  SWIG_Python_SetConstant(d, "wkbGeometryCollection",SWIG_From_int(static_cast< int >(7)));
  SWIG_Python_SetConstant(d, "wkbCircularString",SWIG_From_int(static_cast< int >(8)));
  SWIG_Python_SetConstant(d, "wkbCompoundCurve",SWIG_From_int(static_cast< int >(9)));
  SWIG_Python_SetConstant(d, "wkbCurvePolygon",SWIG_From_int(static_cast< int >(10)));
  SWIG_Python_SetConstant(d, "wkbMultiCurve",SWIG_From_int(static_cast< int >(11)));
  SWIG_Python_SetConstant(d, "wkbMultiSurface",SWIG_From_int(static_cast< int >(12)));
  SWIG_Python_SetConstant(d, "wkbCurve",SWIG_From_int(static_cast< int >(13)));
  SWIG_Python_SetConstant(d, "wkbSurface",SWIG_From_int(static_cast< int >(14)));
  SWIG_Python_SetConstant(d, "wkbPolyhedralSurface",SWIG_From_int(static_cast< int >(15)));
  SWIG_Python_SetConstant(d, "wkbTIN",SWIG_From_int(static_cast< int >(16)));
  SWIG_Python_SetConstant(d, "wkbTriangle",SWIG_From_int(static_cast< int >(17)));
  SWIG_Python_SetConstant(d, "wkbNone",SWIG_From_int(static_cast< int >(100)));
  SWIG_Python_SetConstant(d, "wkbLinearRing",SWIG_From_int(static_cast< int >(101)));
  SWIG_Python_SetConstant(d, "wkbCircularStringZ",SWIG_From_int(static_cast< int >(1008)));
  SWIG_Python_SetConstant(d, "wkbCompoundCurveZ",SWIG_From_int(static_cast< int >(1009)));
  SWIG_Python_SetConstant(d, "wkbCurvePolygonZ",SWIG_From_int(static_cast< int >(1010)));
  SWIG_Python_SetConstant(d, "wkbMultiCurveZ",SWIG_From_int(static_cast< int >(1011)));
  SWIG_Python_SetConstant(d, "wkbMultiSurfaceZ",SWIG_From_int(static_cast< int >(1012)));
  SWIG_Python_SetConstant(d, "wkbCurveZ",SWIG_From_int(static_cast< int >(1013)));
  SWIG_Python_SetConstant(d, "wkbSurfaceZ",SWIG_From_int(static_cast< int >(1014)));
  SWIG_Python_SetConstant(d, "wkbPolyhedralSurfaceZ",SWIG_From_int(static_cast< int >(1015)));
  SWIG_Python_SetConstant(d, "wkbTINZ",SWIG_From_int(static_cast< int >(1016)));
  SWIG_Python_SetConstant(d, "wkbTriangleZ",SWIG_From_int(static_cast< int >(1017)));
  SWIG_Python_SetConstant(d, "wkbPointM",SWIG_From_int(static_cast< int >(2001)));
  SWIG_Python_SetConstant(d, "wkbLineStringM",SWIG_From_int(static_cast< int >(2002)));
  SWIG_Python_SetConstant(d, "wkbPolygonM",SWIG_From_int(static_cast< int >(2003)));
  SWIG_Python_SetConstant(d, "wkbMultiPointM",SWIG_From_int(static_cast< int >(2004)));
  SWIG_Python_SetConstant(d, "wkbMultiLineStringM",SWIG_From_int(static_cast< int >(2005)));
  SWIG_Python_SetConstant(d, "wkbMultiPolygonM",SWIG_From_int(static_cast< int >(2006)));
  SWIG_Python_SetConstant(d, "wkbGeometryCollectionM",SWIG_From_int(static_cast< int >(2007)));
  SWIG_Python_SetConstant(d, "wkbCircularStringM",SWIG_From_int(static_cast< int >(2008)));
  SWIG_Python_SetConstant(d, "wkbCompoundCurveM",SWIG_From_int(static_cast< int >(2009)));
  SWIG_Python_SetConstant(d, "wkbCurvePolygonM",SWIG_From_int(static_cast< int >(2010)));
  SWIG_Python_SetConstant(d, "wkbMultiCurveM",SWIG_From_int(static_cast< int >(2011)));
  SWIG_Python_SetConstant(d, "wkbMultiSurfaceM",SWIG_From_int(static_cast< int >(2012)));
  SWIG_Python_SetConstant(d, "wkbCurveM",SWIG_From_int(static_cast< int >(2013)));
  SWIG_Python_SetConstant(d, "wkbSurfaceM",SWIG_From_int(static_cast< int >(2014)));
  SWIG_Python_SetConstant(d, "wkbPolyhedralSurfaceM",SWIG_From_int(static_cast< int >(2015)));
  SWIG_Python_SetConstant(d, "wkbTINM",SWIG_From_int(static_cast< int >(2016)));
  SWIG_Python_SetConstant(d, "wkbTriangleM",SWIG_From_int(static_cast< int >(2017)));
  SWIG_Python_SetConstant(d, "wkbPointZM",SWIG_From_int(static_cast< int >(3001)));
  SWIG_Python_SetConstant(d, "wkbLineStringZM",SWIG_From_int(static_cast< int >(3002)));
  SWIG_Python_SetConstant(d, "wkbPolygonZM",SWIG_From_int(static_cast< int >(3003)));
  SWIG_Python_SetConstant(d, "wkbMultiPointZM",SWIG_From_int(static_cast< int >(3004)));
  SWIG_Python_SetConstant(d, "wkbMultiLineStringZM",SWIG_From_int(static_cast< int >(3005)));
  SWIG_Python_SetConstant(d, "wkbMultiPolygonZM",SWIG_From_int(static_cast< int >(3006)));
  SWIG_Python_SetConstant(d, "wkbGeometryCollectionZM",SWIG_From_int(static_cast< int >(3007)));
  SWIG_Python_SetConstant(d, "wkbCircularStringZM",SWIG_From_int(static_cast< int >(3008)));
  SWIG_Python_SetConstant(d, "wkbCompoundCurveZM",SWIG_From_int(static_cast< int >(3009)));
  SWIG_Python_SetConstant(d, "wkbCurvePolygonZM",SWIG_From_int(static_cast< int >(3010)));
  SWIG_Python_SetConstant(d, "wkbMultiCurveZM",SWIG_From_int(static_cast< int >(3011)));
  SWIG_Python_SetConstant(d, "wkbMultiSurfaceZM",SWIG_From_int(static_cast< int >(3012)));
  SWIG_Python_SetConstant(d, "wkbCurveZM",SWIG_From_int(static_cast< int >(3013)));
  SWIG_Python_SetConstant(d, "wkbSurfaceZM",SWIG_From_int(static_cast< int >(3014)));
  SWIG_Python_SetConstant(d, "wkbPolyhedralSurfaceZM",SWIG_From_int(static_cast< int >(3015)));
  SWIG_Python_SetConstant(d, "wkbTINZM",SWIG_From_int(static_cast< int >(3016)));
  SWIG_Python_SetConstant(d, "wkbTriangleZM",SWIG_From_int(static_cast< int >(3017)));
  SWIG_Python_SetConstant(d, "wkbPoint25D",SWIG_From_int(static_cast< int >(0x80000001)));
  SWIG_Python_SetConstant(d, "wkbLineString25D",SWIG_From_int(static_cast< int >(0x80000002)));
  SWIG_Python_SetConstant(d, "wkbPolygon25D",SWIG_From_int(static_cast< int >(0x80000003)));
  SWIG_Python_SetConstant(d, "wkbMultiPoint25D",SWIG_From_int(static_cast< int >(0x80000004)));
  SWIG_Python_SetConstant(d, "wkbMultiLineString25D",SWIG_From_int(static_cast< int >(0x80000005)));
  SWIG_Python_SetConstant(d, "wkbMultiPolygon25D",SWIG_From_int(static_cast< int >(0x80000006)));
  SWIG_Python_SetConstant(d, "wkbGeometryCollection25D",SWIG_From_int(static_cast< int >(0x80000007)));
  SWIG_Python_SetConstant(d, "OFTInteger",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "OFTIntegerList",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "OFTReal",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "OFTRealList",SWIG_From_int(static_cast< int >(3)));
  SWIG_Python_SetConstant(d, "OFTString",SWIG_From_int(static_cast< int >(4)));
  SWIG_Python_SetConstant(d, "OFTStringList",SWIG_From_int(static_cast< int >(5)));
  SWIG_Python_SetConstant(d, "OFTWideString",SWIG_From_int(static_cast< int >(6)));
  SWIG_Python_SetConstant(d, "OFTWideStringList",SWIG_From_int(static_cast< int >(7)));
  SWIG_Python_SetConstant(d, "OFTBinary",SWIG_From_int(static_cast< int >(8)));
  SWIG_Python_SetConstant(d, "OFTDate",SWIG_From_int(static_cast< int >(9)));
  SWIG_Python_SetConstant(d, "OFTTime",SWIG_From_int(static_cast< int >(10)));
  SWIG_Python_SetConstant(d, "OFTDateTime",SWIG_From_int(static_cast< int >(11)));
  SWIG_Python_SetConstant(d, "OFTInteger64",SWIG_From_int(static_cast< int >(12)));
  SWIG_Python_SetConstant(d, "OFTInteger64List",SWIG_From_int(static_cast< int >(13)));
  SWIG_Python_SetConstant(d, "OFSTNone",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "OFSTBoolean",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "OFSTInt16",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "OFSTFloat32",SWIG_From_int(static_cast< int >(3)));
  SWIG_Python_SetConstant(d, "OFSTJSON",SWIG_From_int(static_cast< int >(4)));
  SWIG_Python_SetConstant(d, "OFSTUUID",SWIG_From_int(static_cast< int >(5)));
  SWIG_Python_SetConstant(d, "OJUndefined",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "OJLeft",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "OJRight",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "OFDT_CODED",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "OFDT_RANGE",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "OFDT_GLOB",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "OFDSP_DEFAULT_VALUE",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "OFDSP_DUPLICATE",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "OFDSP_GEOMETRY_RATIO",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "OFDMP_DEFAULT_VALUE",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "OFDMP_SUM",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "OFDMP_GEOMETRY_WEIGHTED",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "wkbXDR",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "wkbNDR",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "NullFID",SWIG_From_int(static_cast< int >(-1)));
  SWIG_Python_SetConstant(d, "ALTER_NAME_FLAG",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "ALTER_TYPE_FLAG",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "ALTER_WIDTH_PRECISION_FLAG",SWIG_From_int(static_cast< int >(4)));
  SWIG_Python_SetConstant(d, "ALTER_NULLABLE_FLAG",SWIG_From_int(static_cast< int >(8)));
  SWIG_Python_SetConstant(d, "ALTER__FLAG",SWIG_From_int(static_cast< int >(8)));
  SWIG_Python_SetConstant(d, "ALTER_DEFAULT_FLAG",SWIG_From_int(static_cast< int >(16)));
  SWIG_Python_SetConstant(d, "ALTER_UNIQUE_FLAG",SWIG_From_int(static_cast< int >(32)));
  SWIG_Python_SetConstant(d, "ALTER_DOMAIN_FLAG",SWIG_From_int(static_cast< int >(64)));
  SWIG_Python_SetConstant(d, "ALTER_ALL_FLAG",SWIG_From_int(static_cast< int >(1+2+4+8+16+32+64)));
  SWIG_Python_SetConstant(d, "F_VAL_NULL",SWIG_From_int(static_cast< int >(0x00000001)));
  SWIG_Python_SetConstant(d, "F_VAL_GEOM_TYPE",SWIG_From_int(static_cast< int >(0x00000002)));
  SWIG_Python_SetConstant(d, "F_VAL_WIDTH",SWIG_From_int(static_cast< int >(0x00000004)));
  SWIG_Python_SetConstant(d, "F_VAL_ALLOW_NULL_WHEN_DEFAULT",SWIG_From_int(static_cast< int >(0x00000008)));
  SWIG_Python_SetConstant(d, "F_VAL_ALL",SWIG_From_int(static_cast< int >(0xFFFFFFFF)));
  SWIG_Python_SetConstant(d, "OLCRandomRead",SWIG_FromCharPtr("RandomRead"));
  SWIG_Python_SetConstant(d, "OLCSequentialWrite",SWIG_FromCharPtr("SequentialWrite"));
  SWIG_Python_SetConstant(d, "OLCRandomWrite",SWIG_FromCharPtr("RandomWrite"));
  SWIG_Python_SetConstant(d, "OLCFastSpatialFilter",SWIG_FromCharPtr("FastSpatialFilter"));
  SWIG_Python_SetConstant(d, "OLCFastFeatureCount",SWIG_FromCharPtr("FastFeatureCount"));
  SWIG_Python_SetConstant(d, "OLCFastGetExtent",SWIG_FromCharPtr("FastGetExtent"));
  SWIG_Python_SetConstant(d, "OLCCreateField",SWIG_FromCharPtr("CreateField"));
  SWIG_Python_SetConstant(d, "OLCDeleteField",SWIG_FromCharPtr("DeleteField"));
  SWIG_Python_SetConstant(d, "OLCReorderFields",SWIG_FromCharPtr("ReorderFields"));
  SWIG_Python_SetConstant(d, "OLCAlterFieldDefn",SWIG_FromCharPtr("AlterFieldDefn"));
  SWIG_Python_SetConstant(d, "OLCTransactions",SWIG_FromCharPtr("Transactions"));
  SWIG_Python_SetConstant(d, "OLCDeleteFeature",SWIG_FromCharPtr("DeleteFeature"));
  SWIG_Python_SetConstant(d, "OLCFastSetNextByIndex",SWIG_FromCharPtr("FastSetNextByIndex"));
  SWIG_Python_SetConstant(d, "OLCStringsAsUTF8",SWIG_FromCharPtr("StringsAsUTF8"));
  SWIG_Python_SetConstant(d, "OLCIgnoreFields",SWIG_FromCharPtr("IgnoreFields"));
  SWIG_Python_SetConstant(d, "OLCCreateGeomField",SWIG_FromCharPtr("CreateGeomField"));
  SWIG_Python_SetConstant(d, "OLCCurveGeometries",SWIG_FromCharPtr("CurveGeometries"));
  SWIG_Python_SetConstant(d, "OLCMeasuredGeometries",SWIG_FromCharPtr("MeasuredGeometries"));
  SWIG_Python_SetConstant(d, "OLCRename",SWIG_FromCharPtr("Rename"));
  SWIG_Python_SetConstant(d, "ODsCCreateLayer",SWIG_FromCharPtr("CreateLayer"));
  SWIG_Python_SetConstant(d, "ODsCDeleteLayer",SWIG_FromCharPtr("DeleteLayer"));
  SWIG_Python_SetConstant(d, "ODsCCreateGeomFieldAfterCreateLayer",SWIG_FromCharPtr("CreateGeomFieldAfterCreateLayer"));
  SWIG_Python_SetConstant(d, "ODsCCurveGeometries",SWIG_FromCharPtr("CurveGeometries"));
  SWIG_Python_SetConstant(d, "ODsCTransactions",SWIG_FromCharPtr("Transactions"));
  SWIG_Python_SetConstant(d, "ODsCEmulatedTransactions",SWIG_FromCharPtr("EmulatedTransactions"));
  SWIG_Python_SetConstant(d, "ODsCMeasuredGeometries",SWIG_FromCharPtr("MeasuredGeometries"));
  SWIG_Python_SetConstant(d, "ODsCRandomLayerRead",SWIG_FromCharPtr("RandomLayerRead"));
  SWIG_Python_SetConstant(d, "ODsCRandomLayerWrite",SWIG_FromCharPtr("RandomLayerWrite "));
  SWIG_Python_SetConstant(d, "ODsCAddFieldDomain",SWIG_FromCharPtr("AddFieldDomain"));
  SWIG_Python_SetConstant(d, "ODsCDeleteFieldDomain",SWIG_FromCharPtr("DeleteFieldDomain"));
  SWIG_Python_SetConstant(d, "ODsCUpdateFieldDomain",SWIG_FromCharPtr("UpdateFieldDomain"));
  SWIG_Python_SetConstant(d, "ODrCCreateDataSource",SWIG_FromCharPtr("CreateDataSource"));
  SWIG_Python_SetConstant(d, "ODrCDeleteDataSource",SWIG_FromCharPtr("DeleteDataSource"));
  SWIG_Python_SetConstant(d, "OLMD_FID64",SWIG_FromCharPtr("OLMD_FID64"));
  SWIG_Python_SetConstant(d, "OGRERR_NONE",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "OGRERR_NOT_ENOUGH_DATA",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "OGRERR_NOT_ENOUGH_MEMORY",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "OGRERR_UNSUPPORTED_GEOMETRY_TYPE",SWIG_From_int(static_cast< int >(3)));
  SWIG_Python_SetConstant(d, "OGRERR_UNSUPPORTED_OPERATION",SWIG_From_int(static_cast< int >(4)));
  SWIG_Python_SetConstant(d, "OGRERR_CORRUPT_DATA",SWIG_From_int(static_cast< int >(5)));
  SWIG_Python_SetConstant(d, "OGRERR_FAILURE",SWIG_From_int(static_cast< int >(6)));
  SWIG_Python_SetConstant(d, "OGRERR_UNSUPPORTED_SRS",SWIG_From_int(static_cast< int >(7)));
  SWIG_Python_SetConstant(d, "OGRERR_INVALID_HANDLE",SWIG_From_int(static_cast< int >(8)));
  SWIG_Python_SetConstant(d, "OGRERR_NON_EXISTING_FEATURE",SWIG_From_int(static_cast< int >(9)));
  
  
  if ( OGRGetDriverCount() == 0 ) {
    OGRRegisterAll();
  }
  
  
  
  
  /* Initialize threading */
  SWIG_PYTHON_INITIALIZE_THREADS;
#if PY_VERSION_HEX >= 0x03000000
  return m;
#else
  return;
#endif
}

#define POST_PROCESSING_APPLIED
