/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.40
 * 
 * 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. 
 * ----------------------------------------------------------------------------- */

#define SWIGPYTHON
#define SWIG_PYTHON_DIRECTOR_NO_VTABLE


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



/* Python.h has to appear first */
#include <Python.h>

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

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

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

/*
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  creating a static or dynamic library from the SWIG runtime code.
  In 99.9% of the cases, SWIG just needs to declare them as 'static'.
  
  But only do this if strictly necessary, ie, if you have problems
  with your compiler or suchlike.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

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

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

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


/* 
   Flags/methods for returning states.
   
   The SWIG conversion methods, as ConvertPtr, return and 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
#  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 not equal, 1 if equal
*/
SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) {
  int equiv = 0;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (!equiv && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
    if (*ne) ++ne;
  }
  return equiv;
}

/*
  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_TypeCompare(const char *nb, const char *tb) {
  int equiv = 0;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (!equiv && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
    if (*ne) ++ne;
  }
  return equiv;
}


/*
  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) {
      register size_t l = 0;
      register size_t r = iter->size - 1;
      do {
	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
	register size_t i = (l + r) >> 1; 
	const char *iname = iter->types[i]->name;
	if (iname) {
	  register 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 {
      register 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";
  register const unsigned char *u = (unsigned char *) ptr;
  register const unsigned char *eu =  u + sz;
  for (; u != eu; ++u) {
    register 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) {
  register unsigned char *u = (unsigned char *) ptr;
  register const unsigned char *eu = u + sz;
  for (; u != eu; ++u) {
    register char d = *(c++);
    register unsigned char uu;
    if ((d >= '0') && (d <= '9'))
      uu = ((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = ((d - ('a'-10)) << 4);
    else 
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (d - ('a'-10));
    else 
      return (char *) 0;
    *u = uu;
  }
  return c;
}

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

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

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

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

#ifdef __cplusplus
}
#endif

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



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

#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
#define PyInt_Check(x) PyLong_Check(x)
#define PyInt_AsLong(x) PyLong_AsLong(x)
#define PyInt_FromLong(x) PyLong_FromLong(x)
#define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)

#endif

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

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

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


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

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


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

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

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

#ifndef SWIG_PYBUFFER_SIZE
# define SWIG_PYBUFFER_SIZE 1024
#endif

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

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

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

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

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

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

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

/* Py_ssize_t for old Pythons */
/* This code is as recommended by: */
/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef int Py_ssize_t;
# define PY_SSIZE_T_MAX INT_MAX
# define PY_SSIZE_T_MIN INT_MIN
#endif

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

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


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

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

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

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

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

#ifdef __cplusplus
extern "C" {
#if 0
} /* cc-mode */
#endif
#endif

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

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

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


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

#ifdef __cplusplus
#if 0
{ /* cc-mode */
#endif
}
#endif


/* -----------------------------------------------------------------------------
 * See the LICENSE file for information on copyright, usage and redistribution
 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
 *
 * pyrun.swg
 *
 * This file contains the runtime support for Python modules
 * and includes code for managing global variables and pointer
 * type checking.
 *
 * ----------------------------------------------------------------------------- */

/* Common SWIG API */

/* for raw pointers */
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(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(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 */

#if PY_VERSION_HEX >= 0x03020000
#define SWIG_PYTHON_USE_CAPSULE
#endif

#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule()
#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, (char *) 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 */

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

/* Append a value to the result obj */

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

/* Unpack the argument tuple */

SWIGINTERN int
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)) {
    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
    return 0;
  } else {
    register 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 {
      register int i;
      for (i = 0; i < l; ++i) {
	objs[i] = PyTuple_GET_ITEM(args, i);
      }
      for (; l < max; ++l) {
	objs[l] = 0;
      }
      return i + 1;
    }    
  }
}

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

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

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

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

#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)

#ifdef __cplusplus
extern "C" {
#if 0
} /* cc-mode */
#endif
#endif

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

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

/* The python void return value */

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

/* SwigPyClientData */

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

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

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


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

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

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

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

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

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

SWIGRUNTIME int
SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
{
  char *str;
#ifdef METH_NOARGS
  PyObject *repr = SwigPyObject_repr(v);
#else
  PyObject *repr = SwigPyObject_repr(v, NULL);
#endif
  if (repr) {
    str = SWIG_Python_str_AsChar(repr); 
    fputs(str, fp);
    SWIG_Python_str_DelForPy3(str);
    Py_DECREF(repr);
    return 0; 
  } else {
    return 1; 
  }
}

SWIGRUNTIME PyObject *
SwigPyObject_str(SwigPyObject *v)
{
  char result[SWIG_BUFFER_SIZE];
  return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
    SWIG_Python_str_FromChar(result) : 0;
}

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;
  }
  if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) )
    res = Py_True;
  else
    res = Py_False;
  Py_INCREF(res);
  return res;  
}


SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);

SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void) {
  static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
  return type;
}

SWIGRUNTIMEINLINE int
SwigPyObject_Check(PyObject *op) {
  return (Py_TYPE(op) == SwigPyObject_type())
    || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
}

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

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

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

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

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

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

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

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

SWIGRUNTIME PyTypeObject*
_PySwigObject_type(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 >= 0x03000000 /* 3.0 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
#elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
    0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
#endif
  };

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

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

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

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

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

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

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

SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);

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

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

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

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

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

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

SWIGRUNTIME PyObject *
SWIG_This(void)
{
  static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
  return swig_this;
}

/* #define SWIG_PYTHON_SLOW_GETSET_THIS */

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

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

/* 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) {
  if (!obj) return SWIG_ERROR;
  if (obj == Py_None) {
    if (ptr) *ptr = 0;
    return SWIG_OK;
  } else {
    SwigPyObject *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);
                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;
      }
      return SWIG_OK;
    } else {
      int res = SWIG_ERROR;
      if (flags & SWIG_POINTER_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);
	    }
	  }
	}
      }
      return res;
    }
  }
}

/* Convert a function ptr value */

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

/* Convert a packed value value */

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

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

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

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

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


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

/* Create a new pointer object */

SWIGRUNTIME PyObject *
SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
  if (!ptr) {
    return SWIG_Py_Void();
  } else {
    int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
    PyObject *robj = SwigPyObject_New(ptr, type, own);
    SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
    if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
      PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
      if (inst) {
	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) {
  static void *type_pointer = (void *)0;
  /* first check if module already created */
  if (!type_pointer) {
#ifdef SWIG_LINK_RUNTIME
    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
#else
#ifdef SWIG_PYTHON_USE_CAPSULE
    type_pointer = PyCapsule_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer" SWIG_TYPE_TABLE_NAME, 0);
#else
    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
				    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
#endif
    if (PyErr_Occurred()) {
      PyErr_Clear();
      type_pointer = (void *)0;
    }
#endif
  }
  return (swig_module_info *) type_pointer;
}

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

SWIGRUNTIME void
#ifdef SWIG_PYTHON_USE_CAPSULE
SWIG_Python_DestroyModule(PyObject *capsule)
{
  swig_module_info *swig_module;
  swig_type_info **types;
  size_t i;
  swig_module = (swig_module_info *)PyCapsule_GetPointer(capsule, (char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
  if (swig_module == NULL)
  {
    PyErr_Clear();
    return;
  }
  types = swig_module->types;
#else
SWIG_Python_DestroyModule(void *vptr)
{
  swig_module_info *swig_module = (swig_module_info *) vptr;
  swig_type_info **types = swig_module->types;
  size_t i;
#endif
  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());
}

SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info *swig_module) {
  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */

#if PY_VERSION_HEX >= 0x03000000
 /* Add a dummy module object into sys.modules */
  PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
#else
  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
				   swig_empty_runtime_method_table);
#endif
#ifdef SWIG_PYTHON_USE_CAPSULE
  PyObject *pointer = PyCapsule_New((void *) swig_module,
                                    (char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer" SWIG_TYPE_TABLE_NAME,
                                    SWIG_Python_DestroyModule);
#else
  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
#endif
  if (pointer && module) {
    PyModule_AddObject(module, (char*)"type_pointer" 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) {
#ifdef SWIG_PYTHON_USE_CAPSULE
    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, (char*)"swig_type_info");
#else
    descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
#endif
  } else {
    swig_module_info *swig_module = SWIG_Python_GetModule();
    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
    if (descriptor) {
#ifdef SWIG_PYTHON_USE_CAPSULE
      obj = PyCapsule_New(descriptor, (char*)"swig_type_info", NULL);
#else
      obj = PyCObject_FromVoidPtr(descriptor, NULL);
#endif
      PyDict_SetItem(cache, key, obj);
      Py_DECREF(obj);
    }
  }
  Py_DECREF(key);
  return descriptor;
}

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

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

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

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 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 __cplusplus
#if 0
{ /* cc-mode */
#endif
}
#endif



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

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



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


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

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

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

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

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

#else
#  define SWIG_init    init_ogr

#endif
#define SWIG_name    "_ogr"

#define SWIGVERSION 0x010340 
#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)
    {
      Py_XINCREF(_obj);      
    }
    
    SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
    {
      if (initial_ref) {
        Py_XINCREF(_obj);
      }
    }
    
    SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item) 
    {
      Py_XINCREF(item._obj);
      Py_XDECREF(_obj);
      _obj = item._obj;
      return *this;      
    }
    
    ~SwigPtr_PyObject() 
    {
      Py_XDECREF(_obj);
    }
    
    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;

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

#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 OGRCoordinateTransformationHS OGRCoordinateTransformationShadow;
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


  #define SWIG_From_long   PyInt_FromLong 


SWIGINTERNINLINE PyObject *
SWIG_From_int  (int value)
{    
  return SWIG_From_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_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
    } else {
#if PY_VERSION_HEX >= 0x03000000
      return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
#else
      return PyString_FromStringAndSize(carray, static_cast< int >(size));
#endif
    }
  } else {
    return SWIG_Py_Void();
  }
}


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


int bUseExceptions=0;
CPLErrorHandler pfnPreviousHandler = CPLDefaultErrorHandler;

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

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

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



int GetUseExceptions() {
  return bUseExceptions;
}

void UseExceptions() {
  bUseExceptions = 1;
  pfnPreviousHandler = 
    CPLSetErrorHandler( (CPLErrorHandler) PythonBindingErrorHandler );
}

void DontUseExceptions() {
  bUseExceptions = 0;
  CPLSetErrorHandler( pfnPreviousHandler );
}



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

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

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



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

	   The default behavior is just to return the pointer value,
	   so, be careful.
	*/ 
#if defined(SWIG_PYTHON_SAFE_CSTRINGS)
	if (*alloc != SWIG_OLDOBJ) 
#else
	if (*alloc == SWIG_NEWOBJ) 
#endif
	  {
	    *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
	    *alloc = SWIG_NEWOBJ;
	  }
	else {
	  *cptr = cstr;
	  *alloc = SWIG_OLDOBJ;
	}
      } else {
        #if PY_VERSION_HEX>=0x03000000
        assert(0); /* Should never reach here in Python 3 */
        #endif
	*cptr = SWIG_Python_str_AsChar(obj);
      }
    }
    if (psize) *psize = len + 1;
#if PY_VERSION_HEX>=0x03000000
    Py_XDECREF(obj);
#endif
    return SWIG_OK;
  } else {
    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 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;
  } else if (PyInt_Check(obj)) {
    if (val) *val = PyInt_AsLong(obj);
    return SWIG_OK;
  } 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 (PyInt_Check(obj)) {
    if (val) *val = PyInt_AsLong(obj);
    return SWIG_OK;
  } else if (PyLong_Check(obj)) {
    long v = PyLong_AsLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
    }
  }
#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){
    OGRDataSourceShadow* ds = (OGRDataSourceShadow*) OGR_Dr_Open(self, utf8_path, update);
    if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
    {
        CPLDebug( "SWIG",
          "OGR_Dr_Open() succeeded, but an error is posted, so we destroy"
          " the datasource and fail at swig level." );
        OGRReleaseDataSource(ds);
        ds = NULL;
    }
    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";
  default:
    return "OGR Error: Unknown";
  }
}

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

    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_GetLayer(self, index);
    return layer;
  }
SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_GetLayerByName(OGRDataSourceShadow *self,char const *layer_name){
    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_GetLayerByName(self, layer_name);
    return layer;
  }
SWIGINTERN bool OGRDataSourceShadow_TestCapability(OGRDataSourceShadow *self,char const *cap){
    return (OGR_DS_TestCapability(self, cap) > 0);
  }
SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_ExecuteSQL(OGRDataSourceShadow *self,char const *statement,OGRGeometryShadow *spatialFilter=NULL,char const *dialect=""){
    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_ExecuteSQL((OGRDataSourceShadow*)self,
                                                      statement,
                                                      spatialFilter,
                                                      dialect);
    return layer;
  }
SWIGINTERN void OGRDataSourceShadow_ReleaseResultSet(OGRDataSourceShadow *self,OGRLayerShadow *layer){
    OGR_DS_ReleaseResultSet(self, layer);
  }
SWIGINTERN int OGRLayerShadow_GetRefCount(OGRLayerShadow *self){
    return OGR_L_GetRefCount(self);
  }
SWIGINTERN void OGRLayerShadow_SetSpatialFilter(OGRLayerShadow *self,OGRGeometryShadow *filter){
    OGR_L_SetSpatialFilter (self, filter);
  }
SWIGINTERN void OGRLayerShadow_SetSpatialFilterRect(OGRLayerShadow *self,double minx,double miny,double maxx,double maxy){
    OGR_L_SetSpatialFilterRect(self, 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,long 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,long 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,long 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 int 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){
    OGRErr eErr = OGR_L_GetExtent(self, (OGREnvelope*)argout, force);
    if (can_return_null)
        *isvalid = (eErr == OGRERR_NONE);
    else
        *isvalid = TRUE;
    return;
  }
SWIGINTERN bool OGRLayerShadow_TestCapability(OGRLayerShadow *self,char const *cap){
    return (OGR_L_TestCapability(self, cap) > 0);
  }
SWIGINTERN OGRErr OGRLayerShadow_CreateField(OGRLayerShadow *self,OGRFieldDefnShadow *field_def,int approx_ok=1){
    return OGR_L_CreateField(self, field_def, approx_ok);
  }
SWIGINTERN OGRErr OGRLayerShadow_DeleteField(OGRLayerShadow *self,int iField){
    return OGR_L_DeleteField(self, iField);
  }
SWIGINTERN OGRErr OGRLayerShadow_ReorderField(OGRLayerShadow *self,int iOldFieldPos,int iNewFieldPos){
    return OGR_L_ReorderField(self, iOldFieldPos, iNewFieldPos);
  }
SWIGINTERN OGRErr OGRLayerShadow_ReorderFields(OGRLayerShadow *self,int nList,int *pList){
    if (nList != OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)))
    {
      CPLError(CE_Failure, CPLE_IllegalArg,
               "List should have %d elements",
               OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)));
      return OGRERR_FAILURE;
    }
    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_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 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 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 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 *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(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 *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", 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 *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  return OGR_F_GetFieldAsInteger(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 *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  return OGR_F_GetFieldAsDouble(self, i);
      return 0;
  }
SWIGINTERN void OGRFeatureShadow_GetFieldAsDateTime(OGRFeatureShadow *self,int id,int *pnYear,int *pnMonth,int *pnDay,int *pnHour,int *pnMinute,int *pnSecond,int *pnTZFlag){
      OGR_F_GetFieldAsDateTime(self, id, pnYear, pnMonth, pnDay,
			       pnHour, pnMinute, pnSecond,
			       pnTZFlag);
  }
SWIGINTERN void OGRFeatureShadow_GetFieldAsIntegerList(OGRFeatureShadow *self,int id,int *nLen,int const **pList){
      *pList = OGR_F_GetFieldAsIntegerList(self, id, nLen);
  }
SWIGINTERN void OGRFeatureShadow_GetFieldAsDoubleList(OGRFeatureShadow *self,int id,int *nLen,double const **pList){
      *pList = OGR_F_GetFieldAsDoubleList(self, id, nLen);
  }
SWIGINTERN char **OGRFeatureShadow_GetFieldAsStringList(OGRFeatureShadow *self,int id){
      return OGR_F_GetFieldAsStringList(self, id);
  }
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 *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  return (OGR_F_IsFieldSet(self, i) > 0);
      return false;
  }
SWIGINTERN int OGRFeatureShadow_GetFieldIndex(OGRFeatureShadow *self,char const *name){
      return OGR_F_GetFieldIndex(self, name);
  }
SWIGINTERN int OGRFeatureShadow_GetFID(OGRFeatureShadow *self){
    return OGR_F_GetFID(self);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetFID(OGRFeatureShadow *self,int 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 *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  OGR_F_UnsetField(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 *name,char const *value){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  OGR_F_SetFieldString(self, i, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_2(OGRFeatureShadow *self,int id,int value){
    OGR_F_SetFieldInteger(self, id, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_3(OGRFeatureShadow *self,char const *name,int value){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  OGR_F_SetFieldInteger(self, i, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_4(OGRFeatureShadow *self,int id,double value){
    OGR_F_SetFieldDouble(self, id, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_5(OGRFeatureShadow *self,char const *name,double value){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  OGR_F_SetFieldDouble(self, i, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_6(OGRFeatureShadow *self,int id,int year,int month,int day,int hour,int minute,int second,int tzflag){
    OGR_F_SetFieldDateTime(self, id, year, month, day,
                             hour, minute, second, 
                             tzflag);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_7(OGRFeatureShadow *self,char const *name,int year,int month,int day,int hour,int minute,int second,int tzflag){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  OGR_F_SetFieldDateTime(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_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 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 OGRERR_FAILURE;
    }
    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){
    return (OGRFieldType) OGR_Fld_GetType( OGR_F_GetFieldDefnRef( self, id));
  }
SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_1(OGRFeatureShadow *self,char const *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1) {
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
	  return (OGRFieldType)0;
      } else
	  return (OGRFieldType) OGR_Fld_GetType( 
	      OGR_F_GetFieldDefnRef( self,  i )
	      );
  }
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 *name){
      return OGR_FD_GetFieldIndex(self, name);
  }
SWIGINTERN void OGRFeatureDefnShadow_AddFieldDefn(OGRFeatureDefnShadow *self,OGRFieldDefnShadow *defn){
    OGR_FD_AddFieldDefn(self, defn);
  }
SWIGINTERN OGRwkbGeometryType OGRFeatureDefnShadow_GetGeomType(OGRFeatureDefnShadow *self){
    return (OGRwkbGeometryType) OGR_FD_GetGeomType(self);
  }
SWIGINTERN void OGRFeatureDefnShadow_SetGeomType(OGRFeatureDefnShadow *self,OGRwkbGeometryType 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);
  }

    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:
                return TRUE;
            default:
                CPLError(CE_Failure, CPLE_IllegalArg, "Illegal field type value");
                return FALSE;
        }
    }

SWIGINTERN void delete_OGRFieldDefnShadow(OGRFieldDefnShadow *self){
    OGR_Fld_Destroy(self);
  }
SWIGINTERN OGRFieldDefnShadow *new_OGRFieldDefnShadow(char const *name_null_ok="unnamed",OGRFieldType field_type=OFTString){
    if (ValidateOGRFieldType(field_type))
        return (OGRFieldDefnShadow*) OGR_Fld_Create(name_null_ok, field_type);
    else
        return NULL;
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetName(OGRFieldDefnShadow *self){
    return (const char *) OGR_Fld_GetNameRef(self);
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetNameRef(OGRFieldDefnShadow *self){
    return (const char *) OGR_Fld_GetNameRef(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetName(OGRFieldDefnShadow *self,char const *name){
    OGR_Fld_SetName(self, name);
  }
SWIGINTERN OGRFieldType OGRFieldDefnShadow_GetType(OGRFieldDefnShadow *self){
    return OGR_Fld_GetType(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetType(OGRFieldDefnShadow *self,OGRFieldType type){
    if (ValidateOGRFieldType(type))
        OGR_Fld_SetType(self, type);
  }
SWIGINTERN 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){
    return OGR_Fld_SetIgnored( self, bIgnored );
  }

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


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


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


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


  OGRGeometryShadow* BuildPolygonFromEdges( OGRGeometryShadow*  hLineCollection,  
                                            int bBestEffort = 0, 
                                            int bAutoClose = 0, 
                                            double dfTolerance=0) {
  
  OGRGeometryH hPolygon = NULL;
  
  OGRErr eErr;

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

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

  return (OGRGeometryShadow* )hPolygon;
  }


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


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


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

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_ExportToWkb(OGRGeometryShadow *self,int *nLen,char **pBuf,OGRwkbByteOrder byte_order=wkbXDR){
    *nLen = OGR_G_WkbSize( self );
    *pBuf = (char *) malloc( *nLen * sizeof(unsigned char) );
    return OGR_G_ExportToWkb(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_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 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);
  }

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

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

    OGR_G_GetPoint( self, iPoint, argout+0, argout+1, argout+2 );
  }
SWIGINTERN void OGRGeometryShadow_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_SetPoint_2D(OGRGeometryShadow *self,int point,double x,double y){
    OGR_G_SetPoint_2D(self, point, x, y);
  }
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_Boundary(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Boundary(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetBoundary(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Boundary(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_ConvexHull(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_ConvexHull(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Buffer(OGRGeometryShadow *self,double distance,int quadsecs=30){
    return (OGRGeometryShadow*) OGR_G_Buffer( self, distance, quadsecs );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Intersection(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_Intersection( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Union(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_Union( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_UnionCascaded(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_UnionCascaded( self );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Difference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_Difference( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymmetricDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
  }
SWIGINTERN double OGRGeometryShadow_Distance(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_Distance(self, other);
  }
SWIGINTERN void OGRGeometryShadow_Empty(OGRGeometryShadow *self){
    OGR_G_Empty(self);
  }
SWIGINTERN bool OGRGeometryShadow_IsEmpty(OGRGeometryShadow *self){
    return (OGR_G_IsEmpty(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_IsValid(OGRGeometryShadow *self){
    return (OGR_G_IsValid(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_IsSimple(OGRGeometryShadow *self){
    return (OGR_G_IsSimple(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_IsRing(OGRGeometryShadow *self){
    return (OGR_G_IsRing(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Intersects(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Intersects(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Intersect(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Intersects(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Equals(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Equals(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Equal(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Equals(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Disjoint(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Disjoint(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Touches(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Touches(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Crosses(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Crosses(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Within(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Within(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Contains(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Contains(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Overlaps(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Overlaps(self, other) > 0);
  }
SWIGINTERN OGRErr OGRGeometryShadow_TransformTo(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
    return OGR_G_TransformTo(self, reference);
  }
SWIGINTERN OGRErr OGRGeometryShadow_Transform(OGRGeometryShadow *self,OSRCoordinateTransformationShadow *trans){
    return OGR_G_Transform(self, trans);
  }
SWIGINTERN OSRSpatialReferenceShadow *OGRGeometryShadow_GetSpatialReference(OGRGeometryShadow *self){
    OGRSpatialReferenceH ref =  OGR_G_GetSpatialReference(self);
    if( ref )
        OSRReference(ref);
    return (OSRSpatialReferenceShadow*) ref;
  }
SWIGINTERN void OGRGeometryShadow_AssignSpatialReference(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
    OGR_G_AssignSpatialReference(self, reference);
  }
SWIGINTERN void OGRGeometryShadow_CloseRings(OGRGeometryShadow *self){
    OGR_G_CloseRings(self);
  }
SWIGINTERN void OGRGeometryShadow_FlattenTo2D(OGRGeometryShadow *self){
    OGR_G_FlattenTo2D(self);
  }
SWIGINTERN void OGRGeometryShadow_Segmentize(OGRGeometryShadow *self,double dfMaxLength){
    OGR_G_Segmentize(self, dfMaxLength);
  }
SWIGINTERN void OGRGeometryShadow_GetEnvelope(OGRGeometryShadow *self,double argout[4]){
    OGR_G_GetEnvelope(self, (OGREnvelope*)argout);
  }
SWIGINTERN void OGRGeometryShadow_GetEnvelope3D(OGRGeometryShadow *self,double argout[6]){
    OGR_G_GetEnvelope3D(self, (OGREnvelope3D*)argout);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Centroid(OGRGeometryShadow *self){
    OGRGeometryShadow *pt = (OGRGeometryShadow*) OGR_G_CreateGeometry( wkbPoint );
    OGR_G_Centroid( self, pt );
    return pt;
  }
SWIGINTERN int OGRGeometryShadow_WkbSize(OGRGeometryShadow *self){
    return OGR_G_WkbSize(self);
  }
SWIGINTERN int OGRGeometryShadow_GetCoordinateDimension(OGRGeometryShadow *self){
    return OGR_G_GetCoordinateDimension(self);
  }
SWIGINTERN void OGRGeometryShadow_SetCoordinateDimension(OGRGeometryShadow *self,int dimension){
    OGR_G_SetCoordinateDimension(self, dimension);
  }
SWIGINTERN int OGRGeometryShadow_GetDimension(OGRGeometryShadow *self){
    return OGR_G_GetDimension(self);
  }

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


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


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


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

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


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

    nResArgCount = 
      OGRGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, nOptions ); 

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

#ifdef __cplusplus
extern "C" {
#endif
SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)":GetUseExceptions")) SWIG_fail;
  result = (int)GetUseExceptions();
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  
  if (!PyArg_ParseTuple(args,(char *)":UseExceptions")) SWIG_fail;
  UseExceptions();
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  
  if (!PyArg_ParseTuple(args,(char *)":DontUseExceptions")) SWIG_fail;
  DontUseExceptions();
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Driver_CreateDataSource(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char **arg3 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "utf8_path",(char *) "options", NULL 
  };
  OGRDataSourceShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Driver_CreateDataSource",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CreateDataSource" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  if (obj2) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list */
      if ( ! PySequence_Check(obj2)) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      int size = PySequence_Size(obj2);
      for (int i = 0; i < size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj2,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg3 = CSLAddString( arg3, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRDataSourceShadow *)OGRDriverShadow_CreateDataSource(arg1,(char const *)arg2,arg3);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  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 );
  }
  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;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  OGRDataSourceShadow *arg2 = (OGRDataSourceShadow *) 0 ;
  char *arg3 = (char *) 0 ;
  char **arg4 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int bToFree3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "copy_ds",(char *) "utf8_path",(char *) "options", NULL 
  };
  OGRDataSourceShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:Driver_CopyDataSource",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_CopyDataSource" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_CopyDataSource" "', argument " "2"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRDataSourceShadow * >(argp2);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg3 = GDALPythonObjectToCStr( obj2, &bToFree3 );
    if (arg3 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  if (obj3) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list */
      if ( ! PySequence_Check(obj3)) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      int size = PySequence_Size(obj3);
      for (int i = 0; i < size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj3,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg4 = CSLAddString( arg4, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg4 = CSLAddString( arg4, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg4 = CSLAddString( arg4, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRDataSourceShadow *)OGRDriverShadow_CopyDataSource(arg1,arg2,(char const *)arg3,arg4);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  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 );
  }
  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;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 = (int) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "utf8_path",(char *) "update", NULL 
  };
  OGRDataSourceShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Driver_Open",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_Open" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  if (obj2) {
    ecode3 = SWIG_AsVal_int(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Driver_Open" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRDataSourceShadow *)OGRDriverShadow_Open(arg1,(char const *)arg2,arg3);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  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;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Driver_DeleteDataSource",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_DeleteDataSource" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    arg2 = GDALPythonObjectToCStr( obj1, &bToFree2 );
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (int)OGRDriverShadow_DeleteDataSource(arg1,(char const *)arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  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;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Driver_TestCapability",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Driver_TestCapability" "', argument " "1"" of type '" "OGRDriverShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDriverShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_TestCapability" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (bool)OGRDriverShadow_TestCapability(arg1,(char const *)arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


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


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


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


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

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


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


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


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


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


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


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


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


SWIGINTERN PyObject *_wrap_DataSource_SyncToDisk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:DataSource_SyncToDisk",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DataSource_SyncToDisk" "', argument " "1"" of type '" "OGRDataSourceShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRErr)OGRDataSourceShadow_SyncToDisk(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if (resultobj == Py_None ) {
      Py_DECREF(resultobj);
      resultobj = 0;
    }
    if (resultobj == 0) {
      resultobj = PyInt_FromLong( result );
    }
  }
  return resultobj;
fail:
  return NULL;
}


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


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


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


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


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

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


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


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


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


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


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


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


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


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


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


SWIGINTERN PyObject *_wrap_Layer_GetFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  long arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRFeatureShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Layer_GetFeature",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  ecode2 = SWIG_AsVal_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_GetFeature" "', argument " "2"" of type '" "long""'");
  } 
  arg2 = static_cast< long >(val2);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRFeatureShadow *)OGRLayerShadow_GetFeature(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Layer_SetNextByIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  long arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Layer_SetNextByIndex",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetNextByIndex" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  ecode2 = SWIG_AsVal_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetNextByIndex" "', argument " "2"" of type '" "long""'");
  } 
  arg2 = static_cast< long >(val2);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRErr)OGRLayerShadow_SetNextByIndex(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if (resultobj == Py_None ) {
      Py_DECREF(resultobj);
      resultobj = 0;
    }
    if (resultobj == 0) {
      resultobj = PyInt_FromLong( result );
    }
  }
  return resultobj;
fail:
  return NULL;
}


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


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


SWIGINTERN PyObject *_wrap_Layer_DeleteFeature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  long arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  long val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Layer_DeleteFeature",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_DeleteFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  ecode2 = SWIG_AsVal_long(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_DeleteFeature" "', argument " "2"" of type '" "long""'");
  } 
  arg2 = static_cast< long >(val2);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRErr)OGRLayerShadow_DeleteFeature(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if (resultobj == Py_None ) {
      Py_DECREF(resultobj);
      resultobj = 0;
    }
    if (resultobj == 0) {
      resultobj = PyInt_FromLong( result );
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SyncToDisk(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_SyncToDisk",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SyncToDisk" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRErr)OGRLayerShadow_SyncToDisk(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if (resultobj == Py_None ) {
      Py_DECREF(resultobj);
      resultobj = 0;
    }
    if (resultobj == 0) {
      resultobj = PyInt_FromLong( result );
    }
  }
  return resultobj;
fail:
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Layer_GetFeatureCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0;
  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 
  };
  int result;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Layer_GetFeatureCount",kwnames,&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeatureCount" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_GetFeatureCount" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (int)OGRLayerShadow_GetFeatureCount(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_GetExtent(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  double *arg2 ;
  int *arg3 = (int *) NULL ;
  int arg4 = (int) 1 ;
  int arg5 = (int) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double argout2[6] ;
  int isvalid2 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "force",(char *) "can_return_null", NULL 
  };
  
  {
    /* %typemap(in) (double argout2[4], int* isvalid2) */
    arg2 = argout2;
    arg3 = &isvalid2;
  }
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OO:Layer_GetExtent",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_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 ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRLayerShadow_GetExtent(arg1,arg2,arg3,arg4,arg5);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  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);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_TestCapability(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Layer_TestCapability",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_TestCapability" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_TestCapability" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (bool)OGRLayerShadow_TestCapability(arg1,(char const *)arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  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;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
  int arg3 = (int) 1 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "field_def",(char *) "approx_ok", NULL 
  };
  OGRErr result;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Layer_CreateField",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateField" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateField" "', argument " "2"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRFieldDefnShadow * >(argp2);
  if (obj2) {
    ecode3 = SWIG_AsVal_int(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_CreateField" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRErr)OGRLayerShadow_CreateField(arg1,arg2,arg3);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if (resultobj == Py_None ) {
      Py_DECREF(resultobj);
      resultobj = 0;
    }
    if (resultobj == 0) {
      resultobj = PyInt_FromLong( result );
    }
  }
  return resultobj;
fail:
  return NULL;
}


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


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


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


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


SWIGINTERN PyObject *_wrap_Layer_StartTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_StartTransaction",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_StartTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRErr)OGRLayerShadow_StartTransaction(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if (resultobj == Py_None ) {
      Py_DECREF(resultobj);
      resultobj = 0;
    }
    if (resultobj == 0) {
      resultobj = PyInt_FromLong( result );
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_CommitTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_CommitTransaction",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CommitTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRErr)OGRLayerShadow_CommitTransaction(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if (resultobj == Py_None ) {
      Py_DECREF(resultobj);
      resultobj = 0;
    }
    if (resultobj == 0) {
      resultobj = PyInt_FromLong( result );
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_RollbackTransaction(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_RollbackTransaction",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_RollbackTransaction" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRErr)OGRLayerShadow_RollbackTransaction(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if (resultobj == Py_None ) {
      Py_DECREF(resultobj);
      resultobj = 0;
    }
    if (resultobj == 0) {
      resultobj = PyInt_FromLong( result );
    }
  }
  return resultobj;
fail:
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Layer_GetFeaturesRead(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  GIntBig result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Layer_GetFeaturesRead",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeaturesRead" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = OGRLayerShadow_GetFeaturesRead(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj((new GIntBig(static_cast< const GIntBig& >(result))), SWIGTYPE_p_GIntBig, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


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


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

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


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


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


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


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


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


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


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


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


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


SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRFieldDefnShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldDefnRef",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldDefnRef" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


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


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


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsString",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldAsString" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_1(arg1,(char const *)arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


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


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


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsInteger",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldAsInteger" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_1(arg1,(char const *)arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


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


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


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDouble",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDouble" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldAsDouble" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_1(arg1,(char const *)arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDateTime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  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 ;
  int *arg8 = (int *) 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 ;
  int temp8 ;
  int res8 = SWIG_TMPOBJ ;
  int temp9 ;
  int res9 = SWIG_TMPOBJ ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  arg3 = &temp3;
  arg4 = &temp4;
  arg5 = &temp5;
  arg6 = &temp6;
  arg7 = &temp7;
  arg8 = &temp8;
  arg9 = &temp9;
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDateTime",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDateTime" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDateTime" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRFeatureShadow_GetFieldAsDateTime(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  if (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 (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 (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 (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 (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 (SWIG_IsTmpObj(res8)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8)));
  } else {
    int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags));
  }
  if (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));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsIntegerList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  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 ;
  int *pList3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen3, const int **pList3) (int nLen3, int *pList3) */
    arg3 = &nLen3;
    arg4 = &pList3;
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsIntegerList",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsIntegerList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsIntegerList" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRFeatureShadow_GetFieldAsIntegerList(arg1,arg2,arg3,(int const **)arg4);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  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;
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  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 ;
  double *pList3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen3, const double **pList3) (int nLen3, double *pList3) */
    arg3 = &nLen3;
    arg4 = &pList3;
  }
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsDoubleList",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDoubleList" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRFeatureShadow_GetFieldAsDoubleList(arg1,arg2,arg3,(double const **)arg4);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  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;
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsStringList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char **result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldAsStringList",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsStringList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsStringList" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (char **)OGRFeatureShadow_GetFieldAsStringList(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %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 );
      }
    }
  }
  return resultobj;
fail:
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_IsFieldSet__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_IsFieldSet",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSet" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_IsFieldSet" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_1(arg1,(char const *)arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_GetFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldIndex",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldIndex" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldIndex" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (int)OGRFeatureShadow_GetFieldIndex(arg1,(char const *)arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Feature_GetFID",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFID" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (int)OGRFeatureShadow_GetFID(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFID(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_SetFID",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFID" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFID" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRErr)OGRFeatureShadow_SetFID(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if (resultobj == Py_None ) {
      Py_DECREF(resultobj);
      resultobj = 0;
    }
    if (resultobj == 0) {
      resultobj = PyInt_FromLong( result );
    }
  }
  return resultobj;
fail:
  return NULL;
}


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


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


SWIGINTERN PyObject *_wrap_Feature_UnsetField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_UnsetField",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_UnsetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_UnsetField" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRFeatureShadow_UnsetField__SWIG_1(arg1,(char const *)arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


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


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


SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *str3 = 0 ;
  int bToFree3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    /* %typemap(in) (tostring argin) */
    str3 = PyObject_Str( obj2 );
    if ( str3 == 0 ) {
      PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
      SWIG_fail;
    }
    
    arg3 = GDALPythonObjectToCStr(str3, &bToFree3); 
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRFeatureShadow_SetField__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str3 != NULL)
    {
      Py_DECREF(str3);
    }
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str3 != NULL)
    {
      Py_DECREF(str3);
    }
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRFeatureShadow_SetField__SWIG_3(arg1,(char const *)arg2,arg3);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetField",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRFeatureShadow_SetField__SWIG_5(arg1,(char const *)arg2,arg3);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_7(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  int arg8 ;
  int arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 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 ;
  int val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  PyObject * obj6 = 0 ;
  PyObject * obj7 = 0 ;
  PyObject * obj8 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:Feature_SetField",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(obj3, &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Feature_SetField" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(obj4, &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Feature_SetField" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(obj5, &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Feature_SetField" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_int(obj6, &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Feature_SetField" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  ecode8 = SWIG_AsVal_int(obj7, &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Feature_SetField" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = static_cast< int >(val8);
  ecode9 = SWIG_AsVal_int(obj8, &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Feature_SetField" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRFeatureShadow_SetField__SWIG_7(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


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


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


SWIGINTERN PyObject *_wrap_Feature_SetFieldDoubleList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  double *arg4 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldDoubleList",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldDoubleList" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in,numinputs=1) (int nList, double* pList)*/
    /* check if is List */
    if ( !PySequence_Check(obj2) ) {
      PyErr_SetString(PyExc_TypeError, "not a sequence");
      SWIG_fail;
    }
    arg3 = PySequence_Size(obj2);
    arg4 = (double*) malloc(arg3*sizeof(double));
    for( int i = 0; i<arg3; i++ ) {
      PyObject *o = PySequence_GetItem(obj2,i);
      if ( !PyArg_Parse(o,"d",&arg4[i]) ) {
        PyErr_SetString(PyExc_TypeError, "not a number");
        Py_DECREF(o);
        SWIG_fail;
      }
      Py_DECREF(o);
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRFeatureShadow_SetFieldDoubleList(arg1,arg2,arg3,arg4);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (int nList, double* pList) */
    if (arg4) {
      free((void*) arg4);
    }
  }
  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;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  char **arg3 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OOO:Feature_SetFieldStringList",&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldStringList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldStringList" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in) char **options */
    /* Check if is a list */
    if ( ! PySequence_Check(obj2)) {
      PyErr_SetString(PyExc_TypeError,"not a sequence");
      SWIG_fail;
    }
    
    int size = PySequence_Size(obj2);
    for (int i = 0; i < size; i++) {
      PyObject* pyObj = PySequence_GetItem(obj2,i);
      if (PyUnicode_Check(pyObj))
      {
        char *pszStr;
        Py_ssize_t nLen;
        PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
#if PY_VERSION_HEX >= 0x03000000
        PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
        PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
        arg3 = CSLAddString( arg3, pszStr );
        Py_XDECREF(pyUTF8Str);
      }
#if PY_VERSION_HEX >= 0x03000000
      else if (PyBytes_Check(pyObj))
      arg3 = CSLAddString( arg3, PyBytes_AsString(pyObj) );
#else
      else if (PyString_Check(pyObj))
      arg3 = CSLAddString( arg3, PyString_AsString(pyObj) );
#endif
      else
      {
        Py_DECREF(pyObj);
        PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
        SWIG_fail;
      }
      Py_DECREF(pyObj);
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRFeatureShadow_SetFieldStringList(arg1,arg2,arg3);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg3 );
  }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg3 );
  }
  return NULL;
}


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


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


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


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


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


SWIGINTERN PyObject *_wrap_Feature_GetFieldType__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRFieldType result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Feature_GetFieldType",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldType" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldType" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_1(arg1,(char const *)arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


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


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

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


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


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


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


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


SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldIndex(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:FeatureDefn_GetFieldIndex",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldIndex" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FeatureDefn_GetFieldIndex" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (int)OGRFeatureDefnShadow_GetFieldIndex(arg1,(char const *)arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


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


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


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


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


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


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


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


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


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

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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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

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


SWIGINTERN PyObject *_wrap_CreateGeometryFromWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0;
  char **arg1 = (char **) 0 ;
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) NULL ;
  char *val1 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "val",(char *) "reference", NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:CreateGeometryFromWkt",kwnames,&obj0,&obj1)) SWIG_fail;
  {
    /* %typemap(in) (char **ignorechange) */
    PyArg_Parse( obj0, "s", &val1 );
    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 ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)CreateGeometryFromWkt(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_CreateGeometryFromJson(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:CreateGeometryFromJson",&obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGeometryFromJson" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)CreateGeometryFromJson((char const *)arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  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;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  int arg3 = (int) 0 ;
  double arg4 = (double) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char *  kwnames[] = {
    (char *) "hLineCollection",(char *) "bBestEffort",(char *) "bAutoClose",(char *) "dfTolerance", NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOO:BuildPolygonFromEdges",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BuildPolygonFromEdges" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BuildPolygonFromEdges" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  if (obj2) {
    ecode3 = SWIG_AsVal_int(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BuildPolygonFromEdges" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  if (obj3) {
    ecode4 = SWIG_AsVal_double(obj3, &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BuildPolygonFromEdges" "', argument " "4"" of type '" "double""'");
    } 
    arg4 = static_cast< double >(val4);
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)BuildPolygonFromEdges(arg1,arg2,arg3,arg4);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


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


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


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


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


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


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


SWIGINTERN PyObject *_wrap_new_Geometry(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0;
  OGRwkbGeometryType arg1 = (OGRwkbGeometryType) wkbUnknown ;
  char *arg2 = (char *) 0 ;
  int arg3 = (int) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int alloc3 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char *  kwnames[] = {
    (char *) "type",(char *) "wkt",(char *) "wkb",(char *) "gml", NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|OOOO:new_Geometry",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  if (obj0) {
    ecode1 = SWIG_AsVal_int(obj0, &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Geometry" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
    } 
    arg1 = static_cast< OGRwkbGeometryType >(val1);
  }
  if (obj1) {
    res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Geometry" "', argument " "2"" of type '" "char *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  if (obj2) {
    {
      /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
#if PY_VERSION_HEX>=0x03000000
      if (PyUnicode_Check(obj2))
      {
        size_t safeLen = 0;
        int ret = SWIG_AsCharPtrAndSize(obj2, (char**) &arg4, &safeLen, &alloc3);
        if (!SWIG_IsOK(ret)) {
          SWIG_exception( SWIG_RuntimeError, "invalid Unicode string" );
        }
        
        if (safeLen) safeLen--;
        arg3 = (int) safeLen;
      }
      else if (PyBytes_Check(obj2))
      {
        Py_ssize_t safeLen = 0;
        PyBytes_AsStringAndSize(obj2, (char**) &arg4, &safeLen);
        arg3 = (int) safeLen;
      }
      else
      {
        PyErr_SetString(PyExc_TypeError, "not a unicode string or a bytes");
        SWIG_fail;
      }
#else
      if (PyString_Check(obj2))
      {
        Py_ssize_t safeLen = 0;
        PyString_AsStringAndSize(obj2, (char**) &arg4, &safeLen);
        arg3 = (int) safeLen;
      }
      else
      {
        PyErr_SetString(PyExc_TypeError, "not a string");
        SWIG_fail;
      }
#endif
    }
  }
  if (obj3) {
    res5 = SWIG_AsCharPtrAndSize(obj3, &buf5, NULL, &alloc5);
    if (!SWIG_IsOK(res5)) {
      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_Geometry" "', argument " "5"" of type '" "char *""'");
    }
    arg5 = reinterpret_cast< char * >(buf5);
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)new_OGRGeometryShadow(arg1,arg2,arg3,arg4,arg5);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  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( alloc3 == SWIG_NEWOBJ ) {
      delete[] arg4;
    }
  }
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if( 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;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *argout2 = 0 ;
  PyObject * obj0 = 0 ;
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (char **argout2) */
    arg2 = &argout2;
  }
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_ExportToWkt",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToWkt" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRErr)OGRGeometryShadow_ExportToWkt(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(argout) (char **argout) */
    PyObject *o;
    if ( 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 (resultobj == Py_None ) {
      Py_DECREF(resultobj);
      resultobj = 0;
    }
    if (resultobj == 0) {
      resultobj = PyInt_FromLong( result );
    }
  }
  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;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int *arg2 = (int *) 0 ;
  char **arg3 = (char **) 0 ;
  OGRwkbByteOrder arg4 = (OGRwkbByteOrder) wkbXDR ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int nLen2 = 0 ;
  char *pBuf2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "byte_order", NULL 
  };
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen2, char **pBuf2 ) */
    arg2 = &nLen2;
    arg3 = &pBuf2;
  }
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_ExportToWkb",kwnames,&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToWkb" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode4 = SWIG_AsVal_int(obj1, &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_ExportToWkb" "', argument " "4"" of type '" "OGRwkbByteOrder""'");
    } 
    arg4 = static_cast< OGRwkbByteOrder >(val4);
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRErr)OGRGeometryShadow_ExportToWkb(arg1,arg2,arg3,arg4);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(argout) (int *nLen, char **pBuf ) */
    Py_XDECREF(resultobj);
#if PY_VERSION_HEX >= 0x03000000
    resultobj = PyBytes_FromStringAndSize( *arg3, *arg2 );
#else
    resultobj = PyString_FromStringAndSize( *arg3, *arg2 );
#endif
  }
  {
    /* %typemap(freearg) (int *nLen, char **pBuf ) */
    if( *arg2 ) {
      free( *arg3 );
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if (resultobj == Py_None ) {
      Py_DECREF(resultobj);
      resultobj = 0;
    }
    if (resultobj == 0) {
      resultobj = PyInt_FromLong( result );
    }
  }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int *nLen, char **pBuf ) */
    if( *arg2 ) {
      free( *arg3 );
    }
  }
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Geometry_ExportToKML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char *arg2 = (char *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  retStringAndCPLFree *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O|O:Geometry_ExportToKML",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToKML" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_ExportToKML" "', argument " "2"" of type '" "char const *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToKML(arg1,(char const *)arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  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;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "options", NULL 
  };
  retStringAndCPLFree *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_ExportToJson",kwnames,&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToJson" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    {
      /* %typemap(in) char **options */
      /* Check if is a list */
      if ( ! PySequence_Check(obj1)) {
        PyErr_SetString(PyExc_TypeError,"not a sequence");
        SWIG_fail;
      }
      
      int size = PySequence_Size(obj1);
      for (int i = 0; i < size; i++) {
        PyObject* pyObj = PySequence_GetItem(obj1,i);
        if (PyUnicode_Check(pyObj))
        {
          char *pszStr;
          Py_ssize_t nLen;
          PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
#if PY_VERSION_HEX >= 0x03000000
          PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
          PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
          arg2 = CSLAddString( arg2, pszStr );
          Py_XDECREF(pyUTF8Str);
        }
#if PY_VERSION_HEX >= 0x03000000
        else if (PyBytes_Check(pyObj))
        arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
#else
        else if (PyString_Check(pyObj))
        arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
#endif
        else
        {
          Py_DECREF(pyObj);
          PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
          SWIG_fail;
        }
        Py_DECREF(pyObj);
      }
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToJson(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg2 );
  }
  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;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 = (double) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "x",(char *) "y",(char *) "z", NULL 
  };
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOO|O:Geometry_AddPoint",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPoint" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(obj2, &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPoint" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  if (obj3) {
    ecode4 = SWIG_AsVal_double(obj3, &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_AddPoint" "', argument " "4"" of type '" "double""'");
    } 
    arg4 = static_cast< double >(val4);
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRGeometryShadow_AddPoint(arg1,arg2,arg3,arg4);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


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


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


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


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


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


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


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


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


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


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


SWIGINTERN PyObject *_wrap_Geometry_GetPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int *arg2 = (int *) 0 ;
  double **arg3 = (double **) 0 ;
  double **arg4 = (double **) 0 ;
  int arg5 = (int) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int nPoints2 = 0 ;
  double *padfXY2 = NULL ;
  double *padfZ2 = NULL ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "nCoordDimension", NULL 
  };
  
  {
    /* %typemap(in,numinputs=0) (int* pnCount, double** ppadfXY, double** ppadfZ) */
    arg2 = &nPoints2;
    arg3 = &padfXY2;
    arg4 = &padfZ2;
  }
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetPoints",kwnames,&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoints" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode5 = SWIG_AsVal_int(obj1, &val5);
    if (!SWIG_IsOK(ecode5)) {
      SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_GetPoints" "', argument " "5"" of type '" "int""'");
    } 
    arg5 = static_cast< int >(val5);
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRGeometryShadow_GetPoints(arg1,arg2,arg3,arg4,arg5);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  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);
  }
  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;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "point", NULL 
  };
  double result;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Geometry_GetX",kwnames,&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetX" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetX" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (double)OGRGeometryShadow_GetX(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


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


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


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


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


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


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


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


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


SWIGINTERN PyObject *_wrap_Geometry_Simplify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Simplify",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Simplify" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Simplify" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_Simplify(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SimplifyPreserveTopology(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SimplifyPreserveTopology",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SimplifyPreserveTopology" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SimplifyPreserveTopology" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_SimplifyPreserveTopology(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Boundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Boundary",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Boundary" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_Boundary(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetBoundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetBoundary",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetBoundary" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_GetBoundary(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_ConvexHull(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_ConvexHull",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ConvexHull" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_ConvexHull(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Buffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  int arg3 = (int) 30 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char *  kwnames[] = {
    (char *) "self",(char *) "distance",(char *) "quadsecs", NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OO|O:Geometry_Buffer",kwnames,&obj0,&obj1,&obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Buffer" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Buffer" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (obj2) {
    ecode3 = SWIG_AsVal_int(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_Buffer" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_Buffer(arg1,arg2,arg3);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Intersection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Intersection",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersection" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersection" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_Intersection(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Union(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Union",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Union" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Union" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_Union(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_UnionCascaded(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_UnionCascaded",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_UnionCascaded" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_UnionCascaded(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Difference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Difference",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Difference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Difference" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_Difference(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SymDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SymDifference",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SymDifference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_SymDifference" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_SymDifference(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SymmetricDifference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SymmetricDifference",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SymmetricDifference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_SymmetricDifference" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_SymmetricDifference(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Distance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  double result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Distance",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Distance" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Distance" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (double)OGRGeometryShadow_Distance(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Empty",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Empty" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRGeometryShadow_Empty(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_IsEmpty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsEmpty",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsEmpty" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (bool)OGRGeometryShadow_IsEmpty(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_IsValid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsValid",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsValid" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (bool)OGRGeometryShadow_IsValid(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_IsSimple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsSimple",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsSimple" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (bool)OGRGeometryShadow_IsSimple(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_IsRing(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_IsRing",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsRing" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (bool)OGRGeometryShadow_IsRing(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Intersects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Intersects",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersects" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersects" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (bool)OGRGeometryShadow_Intersects(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Intersect(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Intersect",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersect" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersect" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (bool)OGRGeometryShadow_Intersect(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Equals(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Equals",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Equals" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Equals" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (bool)OGRGeometryShadow_Equals(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Equal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Equal",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Equal" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Equal" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (bool)OGRGeometryShadow_Equal(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Disjoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Disjoint",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Disjoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Disjoint" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (bool)OGRGeometryShadow_Disjoint(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Touches(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Touches",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Touches" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Touches" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (bool)OGRGeometryShadow_Touches(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Crosses(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Crosses",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Crosses" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Crosses" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (bool)OGRGeometryShadow_Crosses(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Within(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Within",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Within" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Within" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (bool)OGRGeometryShadow_Within(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Contains(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Contains",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Contains" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Contains" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (bool)OGRGeometryShadow_Contains(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Overlaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  bool result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Overlaps",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Overlaps" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Overlaps" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (bool)OGRGeometryShadow_Overlaps(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_TransformTo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_TransformTo",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_TransformTo" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_TransformTo" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
  }
  arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRErr)OGRGeometryShadow_TransformTo(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if (resultobj == Py_None ) {
      Py_DECREF(resultobj);
      resultobj = 0;
    }
    if (resultobj == 0) {
      resultobj = PyInt_FromLong( result );
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OSRCoordinateTransformationShadow *arg2 = (OSRCoordinateTransformationShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Transform",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Transform" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Transform" "', argument " "2"" of type '" "OSRCoordinateTransformationShadow *""'"); 
  }
  arg2 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRErr)OGRGeometryShadow_Transform(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if (resultobj == Py_None ) {
      Py_DECREF(resultobj);
      resultobj = 0;
    }
    if (resultobj == 0) {
      resultobj = PyInt_FromLong( result );
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetSpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OSRSpatialReferenceShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetSpatialReference",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetSpatialReference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OSRSpatialReferenceShadow *)OGRGeometryShadow_GetSpatialReference(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_AssignSpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_AssignSpatialReference",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AssignSpatialReference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AssignSpatialReference" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
  }
  arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRGeometryShadow_AssignSpatialReference(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_CloseRings(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_CloseRings",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_CloseRings" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRGeometryShadow_CloseRings(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_FlattenTo2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_FlattenTo2D",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_FlattenTo2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRGeometryShadow_FlattenTo2D(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Segmentize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_Segmentize",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Segmentize" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Segmentize" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRGeometryShadow_Segmentize(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetEnvelope(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double argout2[4] ;
  PyObject * obj0 = 0 ;
  
  {
    /* %typemap(in,numinputs=0) (double argout2[ANY]) */
    arg2 = argout2;
  }
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetEnvelope",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetEnvelope" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRGeometryShadow_GetEnvelope(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double argout[ANY]) */
    PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
    resultobj = t_output_helper(resultobj,out);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetEnvelope3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double argout2[6] ;
  PyObject * obj0 = 0 ;
  
  {
    /* %typemap(in,numinputs=0) (double argout2[ANY]) */
    arg2 = argout2;
  }
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetEnvelope3D",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetEnvelope3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRGeometryShadow_GetEnvelope3D(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double argout[ANY]) */
    PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
    resultobj = t_output_helper(resultobj,out);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Centroid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_Centroid",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Centroid" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_Centroid(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_WkbSize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_WkbSize",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_WkbSize" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (int)OGRGeometryShadow_WkbSize(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetCoordinateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetCoordinateDimension",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetCoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (int)OGRGeometryShadow_GetCoordinateDimension(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SetCoordinateDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"OO:Geometry_SetCoordinateDimension",&obj0,&obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetCoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(obj1, &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetCoordinateDimension" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRGeometryShadow_SetCoordinateDimension(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetDimension(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:Geometry_GetDimension",&obj0)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (int)OGRGeometryShadow_GetDimension(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


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

SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)":GetDriverCount")) SWIG_fail;
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (int)OGRGetDriverCount();
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetOpenDSCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int result;
  
  if (!PyArg_ParseTuple(args,(char *)":GetOpenDSCount")) SWIG_fail;
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (int)OGRGetOpenDSCount();
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SetGenerate_DB2_V72_BYTE_ORDER(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRErr result;
  
  if (!PyArg_ParseTuple(args,(char *)"O:SetGenerate_DB2_V72_BYTE_ORDER",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetGenerate_DB2_V72_BYTE_ORDER" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRErr)OGRSetGenerate_DB2_V72_BYTE_ORDER(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && bUseExceptions) {
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if (resultobj == Py_None ) {
      Py_DECREF(resultobj);
      resultobj = 0;
    }
    if (resultobj == 0) {
      resultobj = PyInt_FromLong( result );
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RegisterAll(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  
  if (!PyArg_ParseTuple(args,(char *)":RegisterAll")) SWIG_fail;
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    OGRRegisterAll();
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeometryTypeToName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GeometryTypeToName",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GeometryTypeToName" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (char *)OGRGeometryTypeToName(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetFieldTypeName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  OGRFieldType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  char *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GetFieldTypeName",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetFieldTypeName" "', argument " "1"" of type '" "OGRFieldType""'");
  } 
  arg1 = static_cast< OGRFieldType >(val1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (char *)OGR_GetFieldTypeName(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetOpenDS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRDataSourceShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GetOpenDS",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetOpenDS" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRDataSourceShadow *)GetOpenDS(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Open(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 = (int) 0 ;
  int bToFree1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "utf8_path",(char *) "update", NULL 
  };
  OGRDataSourceShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:Open",kwnames,&obj0,&obj1)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Open" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRDataSourceShadow *)Open((char const *)arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  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;
  char *arg1 = (char *) 0 ;
  int arg2 = (int) 0 ;
  int bToFree1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char *  kwnames[] = {
    (char *) "utf8_path",(char *) "update", NULL 
  };
  OGRDataSourceShadow *result = 0 ;
  
  if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|O:OpenShared",kwnames,&obj0,&obj1)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string" );
      SWIG_fail;
    }
  }
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OpenShared" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRDataSourceShadow *)OpenShared((char const *)arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDataSourceShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  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;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRDriverShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GetDriverByName",&obj0)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    if (!arg1) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRDriverShadow *)GetDriverByName((char const *)arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetDriver(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject * obj0 = 0 ;
  OGRDriverShadow *result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O:GetDriver",&obj0)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDriver" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (OGRDriverShadow *)GetDriver(arg1);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDriverShadow, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeneralCmdLineProcessor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char **arg1 = (char **) 0 ;
  int arg2 = (int) 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char **result = 0 ;
  
  if (!PyArg_ParseTuple(args,(char *)"O|O:GeneralCmdLineProcessor",&obj0,&obj1)) SWIG_fail;
  {
    /* %typemap(in) char **options */
    /* Check if is a list */
    if ( ! PySequence_Check(obj0)) {
      PyErr_SetString(PyExc_TypeError,"not a sequence");
      SWIG_fail;
    }
    
    int size = PySequence_Size(obj0);
    for (int i = 0; i < size; i++) {
      PyObject* pyObj = PySequence_GetItem(obj0,i);
      if (PyUnicode_Check(pyObj))
      {
        char *pszStr;
        Py_ssize_t nLen;
        PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
#if PY_VERSION_HEX >= 0x03000000
        PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#else
        PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
#endif
        arg1 = CSLAddString( arg1, pszStr );
        Py_XDECREF(pyUTF8Str);
      }
#if PY_VERSION_HEX >= 0x03000000
      else if (PyBytes_Check(pyObj))
      arg1 = CSLAddString( arg1, PyBytes_AsString(pyObj) );
#else
      else if (PyString_Check(pyObj))
      arg1 = CSLAddString( arg1, PyString_AsString(pyObj) );
#endif
      else
      {
        Py_DECREF(pyObj);
        PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
        SWIG_fail;
      }
      Py_DECREF(pyObj);
    }
  }
  if (obj1) {
    ecode2 = SWIG_AsVal_int(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeneralCmdLineProcessor" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    if ( bUseExceptions ) {
      CPLErrorReset();
    }
    result = (char **)GeneralCmdLineProcessor(arg1,arg2);
    if ( bUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
  }
  {
    /* %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 );
  }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg1 );
  }
  return NULL;
}


static PyMethodDef SwigMethods[] = {
	 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
	 { (char *)"GetUseExceptions", _wrap_GetUseExceptions, METH_VARARGS, (char *)"GetUseExceptions() -> int"},
	 { (char *)"UseExceptions", _wrap_UseExceptions, METH_VARARGS, (char *)"UseExceptions()"},
	 { (char *)"DontUseExceptions", _wrap_DontUseExceptions, METH_VARARGS, (char *)"DontUseExceptions()"},
	 { (char *)"Driver_name_get", _wrap_Driver_name_get, METH_VARARGS, (char *)"Driver_name_get(Driver self) -> char"},
	 { (char *)"Driver_CreateDataSource", (PyCFunction) _wrap_Driver_CreateDataSource, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Driver_CreateDataSource(Driver self, char utf8_path, char options = None) -> DataSource\n"
		"\n"
		"OGRDataSourceH\n"
		"OGR_Dr_CreateDataSource(OGRSFDriverH hDriver, const char *pszName,\n"
		"char **papszOptions)\n"
		"\n"
		"This function attempts to create a new data source based on the passed\n"
		"driver.\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"
		"It is important to call OGR_DS_Destroy() when the datasource is no\n"
		"longer used to ensure that all data has been properly flushed to disk.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRSFDriver::CreateDataSource().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDriver:  handle to the driver on which data source creation is based.\n"
		"\n"
		"pszName:  the name for the new data source. UTF-8 encoded.\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/ogr_formats.html\n"
		"\n"
		"NULL is returned on failure, or a new OGRDataSource handle on success.\n"
		"\n"
		""},
	 { (char *)"Driver_CopyDataSource", (PyCFunction) _wrap_Driver_CopyDataSource, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Driver_CopyDataSource(Driver self, DataSource copy_ds, char utf8_path, char options = None) -> DataSource\n"
		"\n"
		"OGRDataSourceH\n"
		"OGR_Dr_CopyDataSource(OGRSFDriverH hDriver, OGRDataSourceH hSrcDS,\n"
		"const char *pszNewName, char **papszOptions)\n"
		"\n"
		"This function creates a new datasource by copying all the layers from\n"
		"the source datasource.\n"
		"\n"
		"It is important to call OGR_DS_Destroy() when the datasource is no\n"
		"longer used to ensure that all data has been properly flushed to disk.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRSFDriver::CopyDataSource().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDriver:  handle to the driver on which data source creation is based.\n"
		"\n"
		"hSrcDS:  source datasource\n"
		"\n"
		"pszNewName:  the name for the new data source.\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/ogr_formats.html\n"
		"\n"
		"NULL is returned on failure, or a new OGRDataSource handle on success.\n"
		"\n"
		""},
	 { (char *)"Driver_Open", (PyCFunction) _wrap_Driver_Open, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Driver_Open(Driver self, char utf8_path, int update = 0) -> DataSource\n"
		"\n"
		"OGRDataSourceH OGR_Dr_Open(OGRSFDriverH\n"
		"hDriver, const char *pszName, int bUpdate)\n"
		"\n"
		"Attempt to open file with this driver.\n"
		"\n"
		"This function is the same as the C++ method OGRSFDriver::Open().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDriver:  handle to the driver that is used to open file.\n"
		"\n"
		"pszName:  the name of the file, or data source to try and open.\n"
		"\n"
		"bUpdate:  TRUE if update access is required, otherwise FALSE (the\n"
		"default).\n"
		"\n"
		"NULL on error or if the pass name is not supported by this driver,\n"
		"otherwise an handle to an OGRDataSource. This OGRDataSource should be\n"
		"closed by deleting the object when it is no longer needed. \n"
		""},
	 { (char *)"Driver_DeleteDataSource", _wrap_Driver_DeleteDataSource, METH_VARARGS, (char *)"\n"
		"Driver_DeleteDataSource(Driver self, char utf8_path) -> int\n"
		"\n"
		"OGRErr\n"
		"OGR_Dr_DeleteDataSource(OGRSFDriverH hDriver, const char\n"
		"*pszDataSource)\n"
		"\n"
		"Delete a datasource.\n"
		"\n"
		"Delete (from the disk, in the database, ...) the named datasource.\n"
		"Normally it would be safest if the datasource was not open at the\n"
		"time.\n"
		"\n"
		"Whether this is a supported operation on this driver case be tested\n"
		"using TestCapability() on ODrCDeleteDataSource.\n"
		"\n"
		"This method is the same as the C++ method\n"
		"OGRSFDriver::DeleteDataSource().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDriver:  handle to the driver on which data source deletion is based.\n"
		"\n"
		"pszDataSource:  the name of the datasource to delete.\n"
		"\n"
		"OGRERR_NONE on success, and OGRERR_UNSUPPORTED_OPERATION if this is\n"
		"not supported by this driver. \n"
		""},
	 { (char *)"Driver_TestCapability", _wrap_Driver_TestCapability, METH_VARARGS, (char *)"\n"
		"Driver_TestCapability(Driver self, char cap) -> bool\n"
		"\n"
		"int\n"
		"OGR_Dr_TestCapability(OGRSFDriverH hDriver, const char *pszCap)\n"
		"\n"
		"Test if capability is available.\n"
		"\n"
		"One of the following data source capability names can be passed into\n"
		"this function, and a TRUE or FALSE value will be returned indicating\n"
		"whether or not the capability is available for this object.\n"
		"\n"
		"ODrCCreateDataSource: True if this driver can support creating data\n"
		"sources.\n"
		"\n"
		"ODrCDeleteDataSource: True if this driver supports deleting data\n"
		"sources.\n"
		"\n"
		"The #define macro forms of the capability names should be used in\n"
		"preference to the strings themselves to avoid mispelling.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRSFDriver::TestCapability().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDriver:  handle to the driver to test the capability against.\n"
		"\n"
		"pszCap:  the capability to test.\n"
		"\n"
		"TRUE if capability available otherwise FALSE. \n"
		""},
	 { (char *)"Driver_GetName", _wrap_Driver_GetName, METH_VARARGS, (char *)"\n"
		"Driver_GetName(Driver self) -> char\n"
		"\n"
		"const char*\n"
		"OGR_Dr_GetName(OGRSFDriverH hDriver)\n"
		"\n"
		"Fetch name of driver (file format). This name should be relatively\n"
		"short (10-40 characters), and should reflect the underlying file\n"
		"format. For instance \"ESRI Shapefile\".\n"
		"\n"
		"This function is the same as the C++ method OGRSFDriver::GetName().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDriver:  handle to the the driver to get the name from.\n"
		"\n"
		"driver name. This is an internal string and should not be modified or\n"
		"freed. \n"
		""},
	 { (char *)"Driver_Register", _wrap_Driver_Register, METH_VARARGS, (char *)"Driver_Register(Driver self)"},
	 { (char *)"Driver_Deregister", _wrap_Driver_Deregister, METH_VARARGS, (char *)"Driver_Deregister(Driver self)"},
	 { (char *)"Driver_swigregister", Driver_swigregister, METH_VARARGS, NULL},
	 { (char *)"DataSource_name_get", _wrap_DataSource_name_get, METH_VARARGS, (char *)"DataSource_name_get(DataSource self) -> char"},
	 { (char *)"delete_DataSource", _wrap_delete_DataSource, METH_VARARGS, (char *)"delete_DataSource(DataSource self)"},
	 { (char *)"DataSource_GetRefCount", _wrap_DataSource_GetRefCount, METH_VARARGS, (char *)"\n"
		"DataSource_GetRefCount(DataSource self) -> int\n"
		"\n"
		"int\n"
		"OGR_DS_GetRefCount(OGRDataSourceH hDataSource) \n"
		""},
	 { (char *)"DataSource_GetSummaryRefCount", _wrap_DataSource_GetSummaryRefCount, METH_VARARGS, (char *)"\n"
		"DataSource_GetSummaryRefCount(DataSource self) -> int\n"
		"\n"
		"int\n"
		"OGR_DS_GetSummaryRefCount(OGRDataSourceH hDataSource) \n"
		""},
	 { (char *)"DataSource_GetLayerCount", _wrap_DataSource_GetLayerCount, METH_VARARGS, (char *)"\n"
		"DataSource_GetLayerCount(DataSource self) -> int\n"
		"\n"
		"int\n"
		"OGR_DS_GetLayerCount(OGRDataSourceH hDS)\n"
		"\n"
		"Get the number of layers in this data source.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRDataSource::GetLayerCount().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  handle to the data source from which to get the number of\n"
		"layers.\n"
		"\n"
		"layer count. \n"
		""},
	 { (char *)"DataSource_GetDriver", _wrap_DataSource_GetDriver, METH_VARARGS, (char *)"\n"
		"DataSource_GetDriver(DataSource self) -> Driver\n"
		"\n"
		"OGRSFDriverH\n"
		"OGR_DS_GetDriver(OGRDataSourceH hDS)\n"
		"\n"
		"Returns the driver that the dataset was opened with.\n"
		"\n"
		"This method is the same as the C++ method OGRDataSource::GetDriver()\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  handle to the datasource\n"
		"\n"
		"NULL if driver info is not available, or pointer to a driver owned by\n"
		"the OGRSFDriverManager. \n"
		""},
	 { (char *)"DataSource_GetName", _wrap_DataSource_GetName, METH_VARARGS, (char *)"\n"
		"DataSource_GetName(DataSource self) -> char\n"
		"\n"
		"const char*\n"
		"OGR_DS_GetName(OGRDataSourceH hDS)\n"
		"\n"
		"Returns the name of the data source.\n"
		"\n"
		"This string should be sufficient to open the data source if passed to\n"
		"the same OGRSFDriver that this data source was opened with, but it\n"
		"need not be exactly the same string that was used to open the data\n"
		"source. Normally this is a filename.\n"
		"\n"
		"This function is the same as the C++ method OGRDataSource::GetName().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  handle to the data source to get the name from.\n"
		"\n"
		"pointer to an internal name string which should not be modified or\n"
		"freed by the caller. \n"
		""},
	 { (char *)"DataSource_DeleteLayer", _wrap_DataSource_DeleteLayer, METH_VARARGS, (char *)"\n"
		"DataSource_DeleteLayer(DataSource self, int index) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_DS_DeleteLayer(OGRDataSourceH hDS, int iLayer)\n"
		"\n"
		"Delete the indicated layer from the datasource.\n"
		"\n"
		"If this method is supported the ODsCDeleteLayer capability will test\n"
		"TRUE on the OGRDataSource.\n"
		"\n"
		"This method is the same as the C++ method\n"
		"OGRDataSource::DeleteLayer().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  handle to the datasource\n"
		"\n"
		"iLayer:  the index of the layer to delete.\n"
		"\n"
		"OGRERR_NONE on success, or OGRERR_UNSUPPORTED_OPERATION if deleting\n"
		"layers is not supported for this datasource. \n"
		""},
	 { (char *)"DataSource_SyncToDisk", _wrap_DataSource_SyncToDisk, METH_VARARGS, (char *)"\n"
		"DataSource_SyncToDisk(DataSource self) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_DS_SyncToDisk(OGRDataSourceH hDS)\n"
		"\n"
		"Flush pending changes to disk.\n"
		"\n"
		"This call is intended to force the datasource to flush any pending\n"
		"writes to disk, and leave the disk file in a consistent state. It\n"
		"would not normally have any effect on read-only datasources.\n"
		"\n"
		"Some data sources do not implement this method, and will still return\n"
		"OGRERR_NONE. An error is only returned if an error occurs while\n"
		"attempting to flush to disk.\n"
		"\n"
		"The default implementation of this method just calls the SyncToDisk()\n"
		"method on each of the layers. Conceptionally, calling SyncToDisk() on\n"
		"a datasource should include any work that might be accomplished by\n"
		"calling SyncToDisk() on layers in that data source.\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 OGRDataSource::SyncToDisk()\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  handle to the data source\n"
		"\n"
		"OGRERR_NONE if no error occurs (even if nothing is done) or an error\n"
		"code. \n"
		""},
	 { (char *)"DataSource_CreateLayer", (PyCFunction) _wrap_DataSource_CreateLayer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"DataSource_CreateLayer(DataSource self, char name, SpatialReference srs = None, \n"
		"    OGRwkbGeometryType geom_type = wkbUnknown, \n"
		"    char options = None) -> Layer\n"
		"\n"
		"OGRLayerH\n"
		"OGR_DS_CreateLayer(OGRDataSourceH hDS, const char *pszName,\n"
		"OGRSpatialReferenceH hSpatialRef, OGRwkbGeometryType eType, char\n"
		"**papszOptions)\n"
		"\n"
		"This function attempts to create a new layer on the data source with\n"
		"the indicated name, coordinate system, geometry type.\n"
		"\n"
		"The papszOptions argument can be used to control driver specific\n"
		"creation options. These options are normally documented in the format\n"
		"specific documentation.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRDataSource::CreateLayer().\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.\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/ogr_formats.html\n"
		"\n"
		"NULL is returned on failure, or a new OGRLayer handle on success.\n"
		"Example: \n"
		""},
	 { (char *)"DataSource_CopyLayer", (PyCFunction) _wrap_DataSource_CopyLayer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"DataSource_CopyLayer(DataSource self, Layer src_layer, char new_name, char options = None) -> Layer\n"
		"\n"
		"OGRLayerH\n"
		"OGR_DS_CopyLayer(OGRDataSourceH hDS, OGRLayerH hSrcLayer, const char\n"
		"*pszNewName, char **papszOptions)\n"
		"\n"
		"Duplicate an existing layer.\n"
		"\n"
		"This function creates a new layer, duplicate the field definitions of\n"
		"the source layer and then duplicate each features of the source layer.\n"
		"The papszOptions argument can be used to control driver specific\n"
		"creation options. These options are normally documented in the format\n"
		"specific documentation. The source layer may come from another\n"
		"dataset.\n"
		"\n"
		"This function is the same as the C++ method OGRDataSource::CopyLayer\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  handle to the data source where to create the new layer\n"
		"\n"
		"hSrcLayer:  handle to the source layer.\n"
		"\n"
		"pszNewName:  the name of the layer to create.\n"
		"\n"
		"papszOptions:  a StringList of name=value options. Options are driver\n"
		"specific.\n"
		"\n"
		"an handle to the layer, or NULL if an error occurs. \n"
		""},
	 { (char *)"DataSource_GetLayerByIndex", _wrap_DataSource_GetLayerByIndex, METH_VARARGS, (char *)"DataSource_GetLayerByIndex(DataSource self, int index = 0) -> Layer"},
	 { (char *)"DataSource_GetLayerByName", _wrap_DataSource_GetLayerByName, METH_VARARGS, (char *)"\n"
		"DataSource_GetLayerByName(DataSource self, char layer_name) -> Layer\n"
		"\n"
		"OGRLayerH\n"
		"OGR_DS_GetLayerByName(OGRDataSourceH hDS, const char *pszName)\n"
		"\n"
		"Fetch a layer by name.\n"
		"\n"
		"The returned layer remains owned by the OGRDataSource and should not\n"
		"be deleted by the application.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRDataSource::GetLayerByName().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  handle to the data source from which to get the layer.\n"
		"\n"
		"pszLayerName:  Layer the layer name of the layer to fetch.\n"
		"\n"
		"an handle to the layer, or NULL if the layer is not found or an error\n"
		"occurs. \n"
		""},
	 { (char *)"DataSource_TestCapability", _wrap_DataSource_TestCapability, METH_VARARGS, (char *)"\n"
		"DataSource_TestCapability(DataSource self, char cap) -> bool\n"
		"\n"
		"int\n"
		"OGR_DS_TestCapability(OGRDataSourceH hDS, const char *pszCap)\n"
		"\n"
		"Test if capability is available.\n"
		"\n"
		"One of the following data source capability names can be passed into\n"
		"this function, and a TRUE or FALSE value will be returned indicating\n"
		"whether or not the capability is available for this object.\n"
		"\n"
		"ODsCCreateLayer: True if this datasource can create new layers.\n"
		"\n"
		"The #define macro forms of the capability names should be used in\n"
		"preference to the strings themselves to avoid mispelling.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRDataSource::TestCapability().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  handle to the data source against which to test the capability.\n"
		"\n"
		"pszCapability:  the capability to test.\n"
		"\n"
		"TRUE if capability available otherwise FALSE. \n"
		""},
	 { (char *)"DataSource_ExecuteSQL", (PyCFunction) _wrap_DataSource_ExecuteSQL, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"DataSource_ExecuteSQL(DataSource self, char statement, Geometry spatialFilter = None, \n"
		"    char dialect = \"\") -> Layer\n"
		"\n"
		"OGRLayerH\n"
		"OGR_DS_ExecuteSQL(OGRDataSourceH hDS, const char *pszStatement,\n"
		"OGRGeometryH hSpatialFilter, const char *pszDialect)\n"
		"\n"
		"Execute an SQL statement against the data store.\n"
		"\n"
		"The result of an SQL query is either NULL for statements that are in\n"
		"error, or that have no results set, or an OGRLayer handle representing\n"
		"a results set from the query. Note that this OGRLayer is in addition\n"
		"to the layers in the data store and must be destroyed with\n"
		"OGR_DS_ReleaseResultSet() before the data source is closed\n"
		"(destroyed).\n"
		"\n"
		"For more information on the SQL dialect supported internally by OGR\n"
		"review theOGR SQL document. Some drivers (ie. Oracle and PostGIS) pass\n"
		"the SQL directly through to the underlying RDBMS.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRDataSource::ExecuteSQL();\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  handle to the data source on which the SQL query is executed.\n"
		"\n"
		"pszSQLCommand:  the SQL statement to execute.\n"
		"\n"
		"hSpatialFilter:  handle to a geometry which represents a spatial\n"
		"filter. Can be NULL.\n"
		"\n"
		"pszDialect:  allows control of the statement dialect. If set to NULL,\n"
		"the OGR SQL engine will be used, except for RDBMS drivers that will\n"
		"use their dedicated SQL engine, unless OGRSQL is explicitely passed as\n"
		"the dialect.\n"
		"\n"
		"an handle to a OGRLayer containing the results of the query.\n"
		"Deallocate with OGR_DS_ReleaseResultSet(). \n"
		""},
	 { (char *)"DataSource_ReleaseResultSet", _wrap_DataSource_ReleaseResultSet, METH_VARARGS, (char *)"\n"
		"DataSource_ReleaseResultSet(DataSource self, Layer layer)\n"
		"\n"
		"void\n"
		"OGR_DS_ReleaseResultSet(OGRDataSourceH hDS, OGRLayerH hLayer)\n"
		"\n"
		"Release results of OGR_DS_ExecuteSQL().\n"
		"\n"
		"This function should only be used to deallocate OGRLayers resulting\n"
		"from an OGR_DS_ExecuteSQL() call on the same OGRDataSource. Failure to\n"
		"deallocate a results set before destroying the OGRDataSource may cause\n"
		"errors.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRDataSource::ReleaseResultSet().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDS:  an handle to the data source on which was executed an SQL query.\n"
		"\n"
		"hLayer:  handle to the result of a previous OGR_DS_ExecuteSQL() call.\n"
		"\n"
		""},
	 { (char *)"DataSource_swigregister", DataSource_swigregister, METH_VARARGS, NULL},
	 { (char *)"Layer_GetRefCount", _wrap_Layer_GetRefCount, METH_VARARGS, (char *)"\n"
		"Layer_GetRefCount(Layer self) -> int\n"
		"\n"
		"int OGR_L_GetRefCount(OGRLayerH\n"
		"hLayer) \n"
		""},
	 { (char *)"Layer_SetSpatialFilter", _wrap_Layer_SetSpatialFilter, METH_VARARGS, (char *)"\n"
		"Layer_SetSpatialFilter(Layer self, Geometry filter)\n"
		"\n"
		"void\n"
		"OGR_L_SetSpatialFilter(OGRLayerH hLayer, OGRGeometryH hGeom)\n"
		"\n"
		"Set a new spatial filter.\n"
		"\n"
		"This function set the geometry to be used as a spatial filter when\n"
		"fetching features via the OGR_L_GetNextFeature() function. Only\n"
		"features that geometrically intersect the filter geometry will be\n"
		"returned.\n"
		"\n"
		"Currently this test is may be inaccurately implemented, but it is\n"
		"guaranteed that all features who's 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"
		"This function makes an internal copy of the passed geometry. The\n"
		"passed geometry remains the responsibility of the caller, and may be\n"
		"safely destroyed.\n"
		"\n"
		"For the time being the passed filter geometry should be in the same\n"
		"SRS as the layer (as returned by OGR_L_GetSpatialRef()). In the future\n"
		"this may be generalized.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRLayer::SetSpatialFilter.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer on which to set the spatial filter.\n"
		"\n"
		"hGeom:  handle to the geometry to use as a filtering region. NULL may\n"
		"be passed indicating that the current spatial filter should be\n"
		"cleared, but no new one instituted. \n"
		""},
	 { (char *)"Layer_SetSpatialFilterRect", _wrap_Layer_SetSpatialFilterRect, METH_VARARGS, (char *)"\n"
		"Layer_SetSpatialFilterRect(Layer self, double minx, double miny, double maxx, \n"
		"    double maxy)\n"
		"\n"
		"void\n"
		"OGR_L_SetSpatialFilterRect(OGRLayerH hLayer, double dfMinX, double\n"
		"dfMinY, double dfMaxX, double dfMaxY)\n"
		"\n"
		"Set a new rectangular spatial filter.\n"
		"\n"
		"This method set rectangle to be used as a spatial filter when fetching\n"
		"features via the OGR_L_GetNextFeature() method. Only features that\n"
		"geometrically intersect the given rectangle will be returned.\n"
		"\n"
		"The x/y values should be in the same coordinate system as the layer as\n"
		"a whole (as returned by OGRLayer::GetSpatialRef()). Internally this\n"
		"method is normally implemented as creating a 5 vertex closed\n"
		"rectangular polygon and passing it to OGRLayer::SetSpatialFilter(). It\n"
		"exists as a convenience.\n"
		"\n"
		"The only way to clear a spatial filter set with this method is to call\n"
		"OGRLayer::SetSpatialFilter(NULL).\n"
		"\n"
		"This method is the same as the C++ method\n"
		"OGRLayer::SetSpatialFilterRect().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer on which to set the spatial filter.\n"
		"\n"
		"dfMinX:  the minimum X coordinate for the rectangular region.\n"
		"\n"
		"dfMinY:  the minimum Y coordinate for the rectangular region.\n"
		"\n"
		"dfMaxX:  the maximum X coordinate for the rectangular region.\n"
		"\n"
		"dfMaxY:  the maximum Y coordinate for the rectangular region. \n"
		""},
	 { (char *)"Layer_GetSpatialFilter", _wrap_Layer_GetSpatialFilter, METH_VARARGS, (char *)"\n"
		"Layer_GetSpatialFilter(Layer self) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_L_GetSpatialFilter(OGRLayerH hLayer)\n"
		"\n"
		"This function returns the current spatial filter for this layer.\n"
		"\n"
		"The returned pointer is to an internally owned object, and should not\n"
		"be altered or deleted by the caller.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRLayer::GetSpatialFilter().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer to get the spatial filter from.\n"
		"\n"
		"an handle to the spatial filter geometry. \n"
		""},
	 { (char *)"Layer_SetAttributeFilter", _wrap_Layer_SetAttributeFilter, METH_VARARGS, (char *)"\n"
		"Layer_SetAttributeFilter(Layer self, char filter_string) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_SetAttributeFilter(OGRLayerH hLayer, const char *pszQuery)\n"
		"\n"
		"Set a new attribute query.\n"
		"\n"
		"This function sets the attribute query string to be used when fetching\n"
		"features via the OGR_L_GetNextFeature() function. Only features for\n"
		"which the query evaluates as true will be returned.\n"
		"\n"
		"The query string should be in the format of an SQL WHERE clause. For\n"
		"instance \"population > 1000000 and population < 5000000\" where\n"
		"population is an attribute in the layer. The query format is a\n"
		"restricted form of SQL WHERE clause as defined\n"
		"\"eq_format=restricted_where\" about half way through this document:\n"
		"\n"
		"http://ogdi.sourceforge.net/prop/6.2.CapabilitiesMetadata.html\n"
		"\n"
		"Note that installing a query string will generally result in resetting\n"
		"the current reading position (ala OGR_L_ResetReading()).\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRLayer::SetAttributeFilter().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer on which attribute query will be\n"
		"executed.\n"
		"\n"
		"pszQuery:  query in restricted SQL WHERE format, or NULL to clear the\n"
		"current query.\n"
		"\n"
		"OGRERR_NONE if successfully installed, or an error code if the query\n"
		"expression is in error, or some other failure occurs. \n"
		""},
	 { (char *)"Layer_ResetReading", _wrap_Layer_ResetReading, METH_VARARGS, (char *)"\n"
		"Layer_ResetReading(Layer self)\n"
		"\n"
		"void\n"
		"OGR_L_ResetReading(OGRLayerH hLayer)\n"
		"\n"
		"Reset feature reading to start on the first feature.\n"
		"\n"
		"This affects GetNextFeature().\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::ResetReading().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer on which features are read. \n"
		""},
	 { (char *)"Layer_GetName", _wrap_Layer_GetName, METH_VARARGS, (char *)"\n"
		"Layer_GetName(Layer self) -> char\n"
		"\n"
		"const char* OGR_L_GetName(OGRLayerH\n"
		"hLayer)\n"
		"\n"
		"Return the layer name.\n"
		"\n"
		"This returns the same content as\n"
		"OGR_FD_GetName(OGR_L_GetLayerDefn(hLayer)), but for a few drivers,\n"
		"calling OGR_L_GetName() directly can avoid lengthy layer definition\n"
		"initialization.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::GetName().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer.\n"
		"\n"
		"the layer name (must not been freed)\n"
		"\n"
		"OGR 1.8.0 \n"
		""},
	 { (char *)"Layer_GetGeomType", _wrap_Layer_GetGeomType, METH_VARARGS, (char *)"\n"
		"Layer_GetGeomType(Layer self) -> OGRwkbGeometryType\n"
		"\n"
		"OGRwkbGeometryType\n"
		"OGR_L_GetGeomType(OGRLayerH hLayer)\n"
		"\n"
		"Return the layer geometry type.\n"
		"\n"
		"This returns the same result as\n"
		"OGR_FD_GetGeomType(OGR_L_GetLayerDefn(hLayer)), but for a few drivers,\n"
		"calling OGR_L_GetGeomType() directly can avoid lengthy layer\n"
		"definition initialization.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::GetGeomType().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer.\n"
		"\n"
		"the geometry type\n"
		"\n"
		"OGR 1.8.0 \n"
		""},
	 { (char *)"Layer_GetGeometryColumn", _wrap_Layer_GetGeometryColumn, METH_VARARGS, (char *)"\n"
		"Layer_GetGeometryColumn(Layer self) -> char\n"
		"\n"
		"const char*\n"
		"OGR_L_GetGeometryColumn(OGRLayerH hLayer)\n"
		"\n"
		"This method returns the name of the underlying database column being\n"
		"used as the geometry column, or \"\" if not supported.\n"
		"\n"
		"This method is the same as the C++ method\n"
		"OGRLayer::GetGeometryColumn()\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer\n"
		"\n"
		"geometry column name. \n"
		""},
	 { (char *)"Layer_GetFIDColumn", _wrap_Layer_GetFIDColumn, METH_VARARGS, (char *)"\n"
		"Layer_GetFIDColumn(Layer self) -> char\n"
		"\n"
		"const char*\n"
		"OGR_L_GetFIDColumn(OGRLayerH hLayer)\n"
		"\n"
		"This method returns the name of the underlying database column being\n"
		"used as the FID column, or \"\" if not supported.\n"
		"\n"
		"This method is the same as the C++ method OGRLayer::GetFIDColumn()\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer\n"
		"\n"
		"fid column name. \n"
		""},
	 { (char *)"Layer_GetFeature", _wrap_Layer_GetFeature, METH_VARARGS, (char *)"\n"
		"Layer_GetFeature(Layer self, long fid) -> Feature\n"
		"\n"
		"OGRFeatureH\n"
		"OGR_L_GetFeature(OGRLayerH hLayer, long 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.\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 are generally considered interrupted by a\n"
		"OGR_L_GetFeature() call.\n"
		"\n"
		"The returned feature should be free with OGR_F_Destroy().\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::GetFeature( ).\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer that owned the feature.\n"
		"\n"
		"nFeatureId:  the feature id of the feature to read.\n"
		"\n"
		"an handle to a feature now owned by the caller, or NULL on failure. \n"
		""},
	 { (char *)"Layer_GetNextFeature", _wrap_Layer_GetNextFeature, METH_VARARGS, (char *)"\n"
		"Layer_GetNextFeature(Layer self) -> Feature\n"
		"\n"
		"OGRFeatureH\n"
		"OGR_L_GetNextFeature(OGRLayerH hLayer)\n"
		"\n"
		"Fetch the next available feature from this layer.\n"
		"\n"
		"The returned feature becomes the responsiblity of the caller to delete\n"
		"with OGR_F_Destroy(). It is critical that all features associated with\n"
		"an OGRLayer (more specifically an OGRFeatureDefn) be deleted before\n"
		"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"
		"This function is the same as the C++ method\n"
		"OGRLayer::GetNextFeature().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer from which feature are read.\n"
		"\n"
		"an handle to a feature, or NULL if no more features are available. \n"
		""},
	 { (char *)"Layer_SetNextByIndex", _wrap_Layer_SetNextByIndex, METH_VARARGS, (char *)"\n"
		"Layer_SetNextByIndex(Layer self, long new_index) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_SetNextByIndex(OGRLayerH hLayer, long nIndex)\n"
		"\n"
		"Move read cursor to the nIndex'th feature in the current resultset.\n"
		"\n"
		"This method allows positioning of a layer such that the\n"
		"GetNextFeature() call will read the requested feature, where nIndex is\n"
		"an absolute index into the current result set. So, setting it to 3\n"
		"would mean the next feature read with GetNextFeature() would have been\n"
		"the 4th feature to have been read if sequential reading took place\n"
		"from the beginning of the layer, including accounting for spatial and\n"
		"attribute filters.\n"
		"\n"
		"Only in rare circumstances is SetNextByIndex() efficiently\n"
		"implemented. In all other cases the default implementation which calls\n"
		"ResetReading() and then calls GetNextFeature() nIndex times is used.\n"
		"To determine if fast seeking is available on the current layer use the\n"
		"TestCapability() method with a value of OLCFastSetNextByIndex.\n"
		"\n"
		"This method is the same as the C++ method OGRLayer::SetNextByIndex()\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer\n"
		"\n"
		"nIndex:  the index indicating how many steps into the result set to\n"
		"seek.\n"
		"\n"
		"OGRERR_NONE on success or an error code. \n"
		""},
	 { (char *)"Layer_SetFeature", _wrap_Layer_SetFeature, METH_VARARGS, (char *)"\n"
		"Layer_SetFeature(Layer self, Feature feature) -> OGRErr\n"
		"\n"
		"OGRErr OGR_L_SetFeature(OGRLayerH\n"
		"hLayer, OGRFeatureH hFeat)\n"
		"\n"
		"Rewrite an existing feature.\n"
		"\n"
		"This function will write a feature to the layer, based on the feature\n"
		"id within the OGRFeature.\n"
		"\n"
		"Use OGR_L_TestCapability(OLCRandomWrite) to establish if this layer\n"
		"supports random access writing via OGR_L_SetFeature().\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::SetFeature().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer to write the feature.\n"
		"\n"
		"hFeat:  the feature to write.\n"
		"\n"
		"OGRERR_NONE if the operation works, otherwise an appropriate error\n"
		"code. \n"
		""},
	 { (char *)"Layer_CreateFeature", _wrap_Layer_CreateFeature, METH_VARARGS, (char *)"\n"
		"Layer_CreateFeature(Layer self, Feature feature) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_CreateFeature(OGRLayerH hLayer, OGRFeatureH hFeat)\n"
		"\n"
		"Create and write a new feature within a layer.\n"
		"\n"
		"The passed feature is written to the layer as a new feature, rather\n"
		"than overwriting an existing one. If the feature has a feature id\n"
		"other than OGRNullFID, then the native implementation may use that as\n"
		"the feature id of the new feature, but not necessarily. Upon\n"
		"successful return the passed feature will have been updated with the\n"
		"new feature id.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::CreateFeature().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer to write the feature to.\n"
		"\n"
		"hFeat:  the handle of the feature to write to disk.\n"
		"\n"
		"OGRERR_NONE on success. \n"
		""},
	 { (char *)"Layer_DeleteFeature", _wrap_Layer_DeleteFeature, METH_VARARGS, (char *)"\n"
		"Layer_DeleteFeature(Layer self, long fid) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_DeleteFeature(OGRLayerH hDS, long 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 on success. \n"
		""},
	 { (char *)"Layer_SyncToDisk", _wrap_Layer_SyncToDisk, METH_VARARGS, (char *)"\n"
		"Layer_SyncToDisk(Layer self) -> OGRErr\n"
		"\n"
		"OGRErr OGR_L_SyncToDisk(OGRLayerH\n"
		"hDS)\n"
		"\n"
		"Flush pending changes to disk.\n"
		"\n"
		"This call is intended to force the layer to flush any pending writes\n"
		"to disk, and leave the disk file in a consistent state. It would not\n"
		"normally have any effect on read-only datasources.\n"
		"\n"
		"Some layers do not implement this method, and will still return\n"
		"OGRERR_NONE. The default implementation just returns OGRERR_NONE. An\n"
		"error is only returned if an error occurs while attempting to flush to\n"
		"disk.\n"
		"\n"
		"In any event, you should always close any opened datasource with\n"
		"OGR_DS_Destroy() that will ensure all data is correctly flushed.\n"
		"\n"
		"This method is the same as the C++ method OGRLayer::SyncToDisk()\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer\n"
		"\n"
		"OGRERR_NONE if no error occurs (even if nothing is done) or an error\n"
		"code. \n"
		""},
	 { (char *)"Layer_GetLayerDefn", _wrap_Layer_GetLayerDefn, METH_VARARGS, (char *)"\n"
		"Layer_GetLayerDefn(Layer self) -> FeatureDefn\n"
		"\n"
		"OGRFeatureDefnH\n"
		"OGR_L_GetLayerDefn(OGRLayerH hLayer)\n"
		"\n"
		"Fetch the schema information for this layer.\n"
		"\n"
		"The returned handle to the OGRFeatureDefn is owned by the OGRLayer,\n"
		"and should not be modified or freed by the application. It\n"
		"encapsulates the attribute schema of the features of the layer.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::GetLayerDefn().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer to get the schema information.\n"
		"\n"
		"an handle to the feature definition. \n"
		""},
	 { (char *)"Layer_GetFeatureCount", (PyCFunction) _wrap_Layer_GetFeatureCount, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Layer_GetFeatureCount(Layer self, int force = 1) -> int\n"
		"\n"
		"int\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"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer that owned the features.\n"
		"\n"
		"bForce:  Flag indicating whether the count should be computed even if\n"
		"it is expensive.\n"
		"\n"
		"feature count, -1 if count not known. \n"
		""},
	 { (char *)"Layer_GetExtent", (PyCFunction) _wrap_Layer_GetExtent, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Layer_GetExtent(Layer self, int force = 1, int can_return_null = 0)\n"
		"\n"
		"OGRErr OGR_L_GetExtent(OGRLayerH\n"
		"hLayer, OGREnvelope *psExtent, int bForce)\n"
		"\n"
		"Fetch the extent of this layer.\n"
		"\n"
		"Returns the extent (MBR) of the data in the layer. If bForce is FALSE,\n"
		"and it would be expensive to establish the extent then OGRERR_FAILURE\n"
		"will be returned indicating that the extent isn't know. If bForce is\n"
		"TRUE then some implementations will actually scan the entire layer\n"
		"once to compute the MBR of all the features in the layer.\n"
		"\n"
		"Depending on the drivers, the returned extent may or may not take the\n"
		"spatial filter into account. So it is safer to call OGR_L_GetExtent()\n"
		"without setting a spatial filter.\n"
		"\n"
		"Layers without any geometry may return OGRERR_FAILURE just indicating\n"
		"that no meaningful extents could be collected.\n"
		"\n"
		"Note that some implementations of this method may alter the read\n"
		"cursor of the layer.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::GetExtent().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer from which to get extent.\n"
		"\n"
		"psExtent:  the structure in which the extent value will be returned.\n"
		"\n"
		"bForce:  Flag indicating whether the extent should be computed even if\n"
		"it is expensive.\n"
		"\n"
		"OGRERR_NONE on success, OGRERR_FAILURE if extent not known. \n"
		""},
	 { (char *)"Layer_TestCapability", _wrap_Layer_TestCapability, METH_VARARGS, (char *)"\n"
		"Layer_TestCapability(Layer self, char cap) -> bool\n"
		"\n"
		"int\n"
		"OGR_L_TestCapability(OGRLayerH hLayer, const char *pszCap)\n"
		"\n"
		"Test if this layer supported the named capability.\n"
		"\n"
		"The capability codes that can be tested are represented as strings,\n"
		"but #defined constants exists to ensure correct spelling. Specific\n"
		"layer types may implement class specific capabilities, but this can't\n"
		"generally be discovered by the caller.\n"
		"\n"
		"OLCRandomRead / \"RandomRead\": TRUE if the GetFeature() method is\n"
		"implemented in an optimized way for this layer, as opposed to the\n"
		"default implementation using ResetReading() and GetNextFeature() to\n"
		"find the requested feature id.\n"
		"\n"
		"OLCSequentialWrite / \"SequentialWrite\": TRUE if the CreateFeature()\n"
		"method works for this layer. Note this means that this particular\n"
		"layer is writable. The same OGRLayer class may returned FALSE for\n"
		"other layer instances that are effectively read-only.\n"
		"\n"
		"OLCRandomWrite / \"RandomWrite\": TRUE if the SetFeature() method is\n"
		"operational on this layer. Note this means that this particular layer\n"
		"is writable. The same OGRLayer class may returned FALSE for other\n"
		"layer instances that are effectively read-only.\n"
		"\n"
		"OLCFastSpatialFilter / \"FastSpatialFilter\": TRUE if this layer\n"
		"implements spatial filtering efficiently. Layers that effectively read\n"
		"all features, and test them with the OGRFeature intersection methods\n"
		"should return FALSE. This can be used as a clue by the application\n"
		"whether it should build and maintain its own spatial index for\n"
		"features in this layer.\n"
		"\n"
		"OLCFastFeatureCount / \"FastFeatureCount\": TRUE if this layer can\n"
		"return a feature count (via OGR_L_GetFeatureCount()) efficiently ...\n"
		"ie. 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 ... ie. 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"
		"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"
		"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 unrecognised capabilities. \n"
		""},
	 { (char *)"Layer_CreateField", (PyCFunction) _wrap_Layer_CreateField, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Layer_CreateField(Layer self, FieldDefn field_def, int approx_ok = 1) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_CreateField(OGRLayerH hLayer, OGRFieldDefnH hField, int\n"
		"bApproxOK)\n"
		"\n"
		"Create a new field on a layer.\n"
		"\n"
		"You must use this to create new fields on a real layer. Internally the\n"
		"OGRFeatureDefn for the layer will be updated to reflect the new field.\n"
		"Applications should never modify the OGRFeatureDefn used by a layer\n"
		"directly.\n"
		"\n"
		"This function should not be called while there are feature objects in\n"
		"existance 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 existings features of the backing\n"
		"file/database should be updated accordingly.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::CreateField().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer to write the field definition.\n"
		"\n"
		"hField:  handle of the field definition to write to disk.\n"
		"\n"
		"bApproxOK:  If TRUE, the field may be created in a slightly different\n"
		"form depending on the limitations of the format driver.\n"
		"\n"
		"OGRERR_NONE on success. \n"
		""},
	 { (char *)"Layer_DeleteField", _wrap_Layer_DeleteField, METH_VARARGS, (char *)"\n"
		"Layer_DeleteField(Layer self, int iField) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_DeleteField(OGRLayerH hLayer, int iField)\n"
		"\n"
		"Create a new 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"
		"existance 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 existings features of the backing\n"
		"file/database should be updated accordingly.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::DeleteField().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer.\n"
		"\n"
		"iField:  index of the field to delete.\n"
		"\n"
		"OGRERR_NONE on success.\n"
		"\n"
		"OGR 1.9.0 \n"
		""},
	 { (char *)"Layer_ReorderField", _wrap_Layer_ReorderField, METH_VARARGS, (char *)"\n"
		"Layer_ReorderField(Layer self, int iOldFieldPos, int iNewFieldPos) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_ReorderField(OGRLayerH hLayer, int iOldFieldPos, int\n"
		"iNewFieldPos)\n"
		"\n"
		"Reorder an existing field on a layer.\n"
		"\n"
		"This function is a conveniency 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"
		"existance 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 existings features of the backing\n"
		"file/database should be updated accordingly.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::ReorderField().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer.\n"
		"\n"
		"iOldFieldPos:  previous position of the field to move. Must be in the\n"
		"range [0,GetFieldCount()-1].\n"
		"\n"
		"iNewFieldPos:  new position of the field to move. Must be in the range\n"
		"[0,GetFieldCount()-1].\n"
		"\n"
		"OGRERR_NONE on success.\n"
		"\n"
		"OGR 1.9.0 \n"
		""},
	 { (char *)"Layer_ReorderFields", _wrap_Layer_ReorderFields, METH_VARARGS, (char *)"\n"
		"Layer_ReorderFields(Layer self, int nList) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_ReorderFields(OGRLayerH hLayer, int *panMap)\n"
		"\n"
		"Reorder all the fields of a layer.\n"
		"\n"
		"You must use this to reorder existing fields on a real layer.\n"
		"Internally the OGRFeatureDefn for the layer will be updated to reflect\n"
		"the reordering of the fields. Applications should never modify the\n"
		"OGRFeatureDefn used by a layer directly.\n"
		"\n"
		"This function should not be called while there are feature objects in\n"
		"existance 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 existings 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()->GetFieldCount() elements which is\n"
		"a permutation of [0, GetLayerDefn()->GetFieldCount()-1].\n"
		"\n"
		"OGRERR_NONE on success.\n"
		"\n"
		"OGR 1.9.0 \n"
		""},
	 { (char *)"Layer_AlterFieldDefn", _wrap_Layer_AlterFieldDefn, METH_VARARGS, (char *)"\n"
		"Layer_AlterFieldDefn(Layer self, int iField, FieldDefn field_def, int nFlags) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_AlterFieldDefn(OGRLayerH hLayer, int iField, OGRFieldDefnH\n"
		"hNewFieldDefn, int nFlags)\n"
		"\n"
		"Alter the definition of an existing field on a layer.\n"
		"\n"
		"You must use this to alter the definition of an existing field of a\n"
		"real layer. Internally the OGRFeatureDefn for the layer will be\n"
		"updated to reflect the altered field. Applications should never modify\n"
		"the OGRFeatureDefn used by a layer directly.\n"
		"\n"
		"This function should not be called while there are feature objects in\n"
		"existance 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 existings 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 and\n"
		"ALTER_WIDTH_PRECISION_FLAG to indicate which of the name and/or type\n"
		"and/or width and precision fields from the new field definition must\n"
		"be taken into account.\n"
		"\n"
		"OGRERR_NONE on success.\n"
		"\n"
		"OGR 1.9.0 \n"
		""},
	 { (char *)"Layer_StartTransaction", _wrap_Layer_StartTransaction, METH_VARARGS, (char *)"\n"
		"Layer_StartTransaction(Layer self) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_StartTransaction(OGRLayerH hLayer)\n"
		"\n"
		"For datasources which support transactions, StartTransaction creates a\n"
		"transaction.\n"
		"\n"
		"If starting the transaction fails, will return OGRERR_FAILURE.\n"
		"Datasources which do not support transactions will always return\n"
		"OGRERR_NONE.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRLayer::StartTransaction().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer\n"
		"\n"
		"OGRERR_NONE on success. \n"
		""},
	 { (char *)"Layer_CommitTransaction", _wrap_Layer_CommitTransaction, METH_VARARGS, (char *)"\n"
		"Layer_CommitTransaction(Layer self) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_CommitTransaction(OGRLayerH hLayer)\n"
		"\n"
		"For datasources which support transactions, CommitTransaction commits\n"
		"a transaction.\n"
		"\n"
		"If no transaction is active, or the commit fails, will return\n"
		"OGRERR_FAILURE. Datasources which do not support transactions will\n"
		"always return OGRERR_NONE.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRLayer::CommitTransaction().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer\n"
		"\n"
		"OGRERR_NONE on success. \n"
		""},
	 { (char *)"Layer_RollbackTransaction", _wrap_Layer_RollbackTransaction, METH_VARARGS, (char *)"\n"
		"Layer_RollbackTransaction(Layer self) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_RollbackTransaction(OGRLayerH hLayer)\n"
		"\n"
		"For datasources which support transactions, RollbackTransaction will\n"
		"roll back a datasource to its state before the start of the current\n"
		"transaction. If no transaction is active, or the rollback fails, will\n"
		"return OGRERR_FAILURE. Datasources which do not support transactions\n"
		"will always return OGRERR_NONE.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRLayer::RollbackTransaction().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer\n"
		"\n"
		"OGRERR_NONE on success. \n"
		""},
	 { (char *)"Layer_GetSpatialRef", _wrap_Layer_GetSpatialRef, METH_VARARGS, (char *)"\n"
		"Layer_GetSpatialRef(Layer self) -> SpatialReference\n"
		"\n"
		"OGRSpatialReferenceH\n"
		"OGR_L_GetSpatialRef(OGRLayerH hLayer)\n"
		"\n"
		"Fetch the spatial reference system for this layer.\n"
		"\n"
		"The returned object is owned by the OGRLayer and should not be\n"
		"modified or freed by the application.\n"
		"\n"
		"This function is the same as the C++ method OGRLayer::GetSpatialRef().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hLayer:  handle to the layer to get the spatial reference from.\n"
		"\n"
		"spatial reference, or NULL if there isn't one. \n"
		""},
	 { (char *)"Layer_GetFeaturesRead", _wrap_Layer_GetFeaturesRead, METH_VARARGS, (char *)"\n"
		"Layer_GetFeaturesRead(Layer self) -> GIntBig\n"
		"\n"
		"GIntBig\n"
		"OGR_L_GetFeaturesRead(OGRLayerH hLayer) \n"
		""},
	 { (char *)"Layer_SetIgnoredFields", _wrap_Layer_SetIgnoredFields, METH_VARARGS, (char *)"\n"
		"Layer_SetIgnoredFields(Layer self, char options) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_L_SetIgnoredFields(OGRLayerH hLayer, const char **papszFields)\n"
		"\n"
		"Set which fields can be omitted when retrieving features from the\n"
		"layer.\n"
		"\n"
		"If the driver supports this functionality (testable using\n"
		"OLCIgnoreFields capability), it will not fetch the specified fields in\n"
		"subsequent calls to GetFeature() / GetNextFeature() and thus save some\n"
		"processing time and/or bandwidth.\n"
		"\n"
		"Besides field names of the layers, the following special fields can be\n"
		"passed: \"OGR_GEOMETRY\" to ignore geometry and \"OGR_STYLE\" to\n"
		"ignore layer style.\n"
		"\n"
		"By default, no fields are ignored.\n"
		"\n"
		"This method is the same as the C++ method OGRLayer::SetIgnoredFields()\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"papszFields:  an array of field names terminated by NULL item. If NULL\n"
		"is passed, the ignored list is cleared.\n"
		"\n"
		"OGRERR_NONE if all field names have been resolved (even if the driver\n"
		"does not support this method) \n"
		""},
	 { (char *)"Layer_swigregister", Layer_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_Feature", _wrap_delete_Feature, METH_VARARGS, (char *)"delete_Feature(Feature self)"},
	 { (char *)"new_Feature", (PyCFunction) _wrap_new_Feature, METH_VARARGS | METH_KEYWORDS, (char *)"new_Feature(FeatureDefn feature_def) -> Feature"},
	 { (char *)"Feature_GetDefnRef", _wrap_Feature_GetDefnRef, METH_VARARGS, (char *)"\n"
		"Feature_GetDefnRef(Feature self) -> FeatureDefn\n"
		"\n"
		"OGRFeatureDefnH\n"
		"OGR_F_GetDefnRef(OGRFeatureH hFeat)\n"
		"\n"
		"Fetch feature definition.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::GetDefnRef().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to get the feature definition from.\n"
		"\n"
		"an handle to the feature definition object on which feature depends.\n"
		"\n"
		""},
	 { (char *)"Feature_SetGeometry", _wrap_Feature_SetGeometry, METH_VARARGS, (char *)"\n"
		"Feature_SetGeometry(Feature self, Geometry geom) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_F_SetGeometry(OGRFeatureH hFeat, OGRGeometryH hGeom)\n"
		"\n"
		"Set feature geometry.\n"
		"\n"
		"This function updates the features geometry, and operate exactly as\n"
		"SetGeometryDirectly(), except that this function does not assume\n"
		"ownership of the passed geometry, but instead makes a copy of it.\n"
		"\n"
		"This function is the same as the C++ OGRFeature::SetGeometry().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which new geometry is applied to.\n"
		"\n"
		"hGeom:  handle to the new geometry to apply to feature.\n"
		"\n"
		"OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the\n"
		"geometry type is illegal for the OGRFeatureDefn (checking not yet\n"
		"implemented). \n"
		""},
	 { (char *)"Feature_SetGeometryDirectly", _wrap_Feature_SetGeometryDirectly, METH_VARARGS, (char *)"\n"
		"Feature_SetGeometryDirectly(Feature self, Geometry geom) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_F_SetGeometryDirectly(OGRFeatureH hFeat, OGRGeometryH hGeom)\n"
		"\n"
		"Set feature geometry.\n"
		"\n"
		"This function updates the features geometry, and operate exactly as\n"
		"SetGeometry(), except that this function assumes ownership of the\n"
		"passed geometry.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::SetGeometryDirectly.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which to apply the geometry.\n"
		"\n"
		"hGeom:  handle to the new geometry to apply to feature.\n"
		"\n"
		"OGRERR_NONE if successful, or OGR_UNSUPPORTED_GEOMETRY_TYPE if the\n"
		"geometry type is illegal for the OGRFeatureDefn (checking not yet\n"
		"implemented). \n"
		""},
	 { (char *)"Feature_GetGeometryRef", _wrap_Feature_GetGeometryRef, METH_VARARGS, (char *)"\n"
		"Feature_GetGeometryRef(Feature self) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_F_GetGeometryRef(OGRFeatureH hFeat)\n"
		"\n"
		"Fetch an handle to feature geometry.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetGeometryRef().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to get geometry from.\n"
		"\n"
		"an handle to internal feature geometry. This object should not be\n"
		"modified. \n"
		""},
	 { (char *)"Feature_Clone", _wrap_Feature_Clone, METH_VARARGS, (char *)"\n"
		"Feature_Clone(Feature self) -> Feature\n"
		"\n"
		"OGRFeatureH OGR_F_Clone(OGRFeatureH\n"
		"hFeat)\n"
		"\n"
		"Duplicate feature.\n"
		"\n"
		"The newly created feature is owned by the caller, and will have it's\n"
		"own reference to the OGRFeatureDefn.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::Clone().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to clone.\n"
		"\n"
		"an handle to the new feature, exactly matching this feature. \n"
		""},
	 { (char *)"Feature_Equal", _wrap_Feature_Equal, METH_VARARGS, (char *)"\n"
		"Feature_Equal(Feature self, Feature feature) -> bool\n"
		"\n"
		"int OGR_F_Equal(OGRFeatureH hFeat,\n"
		"OGRFeatureH hOtherFeat)\n"
		"\n"
		"Test if two features are the same.\n"
		"\n"
		"Two features are considered equal if the share them (handle equality)\n"
		"same OGRFeatureDefn, have the same field values, and the same geometry\n"
		"(as tested by OGR_G_Equal()) as well as the same feature id.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::Equal().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to one of the feature.\n"
		"\n"
		"hOtherFeat:  handle to the other feature to test this one against.\n"
		"\n"
		"TRUE if they are equal, otherwise FALSE. \n"
		""},
	 { (char *)"Feature_GetFieldCount", _wrap_Feature_GetFieldCount, METH_VARARGS, (char *)"\n"
		"Feature_GetFieldCount(Feature self) -> int\n"
		"\n"
		"int\n"
		"OGR_F_GetFieldCount(OGRFeatureH hFeat)\n"
		"\n"
		"Fetch number of fields on this feature This will always be the same as\n"
		"the field count for the OGRFeatureDefn.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldCount().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to get the fields count from.\n"
		"\n"
		"count of fields. \n"
		""},
	 { (char *)"Feature_GetFieldDefnRef", _wrap_Feature_GetFieldDefnRef, METH_VARARGS, (char *)"\n"
		"GetFieldDefnRef(int id) -> FieldDefn\n"
		"Feature_GetFieldDefnRef(Feature self, char name) -> FieldDefn\n"
		"\n"
		"OGRFieldDefnH\n"
		"OGR_F_GetFieldDefnRef(OGRFeatureH hFeat, int i)\n"
		"\n"
		"Fetch definition for this field.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldDefnRef().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which the field is found.\n"
		"\n"
		"i:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"an handle to the field definition (from the OGRFeatureDefn). This is\n"
		"an internal reference, and should not be deleted or modified. \n"
		""},
	 { (char *)"Feature_GetFieldAsString", _wrap_Feature_GetFieldAsString, METH_VARARGS, (char *)"\n"
		"GetFieldAsString(int id) -> char\n"
		"Feature_GetFieldAsString(Feature self, char name) -> char\n"
		"\n"
		"const char*\n"
		"OGR_F_GetFieldAsString(OGRFeatureH hFeat, int iField)\n"
		"\n"
		"Fetch field value as a string.\n"
		"\n"
		"OFTReal and OFTInteger fields will be translated to string using\n"
		"sprintf(), but not necessarily using the established formatting rules.\n"
		"Other field types, or errors will result in a return value of zero.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldAsString().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"the field value. This string is internal, and should not be modified,\n"
		"or freed. Its lifetime may be very brief. \n"
		""},
	 { (char *)"Feature_GetFieldAsInteger", _wrap_Feature_GetFieldAsInteger, METH_VARARGS, (char *)"\n"
		"GetFieldAsInteger(int id) -> int\n"
		"Feature_GetFieldAsInteger(Feature self, char name) -> int\n"
		"\n"
		"int\n"
		"OGR_F_GetFieldAsInteger(OGRFeatureH hFeat, int iField)\n"
		"\n"
		"Fetch field value as integer.\n"
		"\n"
		"OFTString features will be translated using atoi(). OFTReal fields\n"
		"will be cast to integer. Other field types, or errors will result in a\n"
		"return value of zero.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldAsInteger().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"the field value. \n"
		""},
	 { (char *)"Feature_GetFieldAsDouble", _wrap_Feature_GetFieldAsDouble, METH_VARARGS, (char *)"\n"
		"GetFieldAsDouble(int id) -> double\n"
		"Feature_GetFieldAsDouble(Feature self, char name) -> double\n"
		"\n"
		"double\n"
		"OGR_F_GetFieldAsDouble(OGRFeatureH hFeat, int iField)\n"
		"\n"
		"Fetch field value as a double.\n"
		"\n"
		"OFTString features will be translated using atof(). OFTInteger fields\n"
		"will be cast to double. 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::GetFieldAsDouble().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"the field value. \n"
		""},
	 { (char *)"Feature_GetFieldAsDateTime", _wrap_Feature_GetFieldAsDateTime, METH_VARARGS, (char *)"\n"
		"Feature_GetFieldAsDateTime(Feature self, int id)\n"
		"\n"
		"int\n"
		"OGR_F_GetFieldAsDateTime(OGRFeatureH hFeat, int iField, int *pnYear,\n"
		"int *pnMonth, int *pnDay, int *pnHour, int *pnMinute, int *pnSecond,\n"
		"int *pnTZFlag)\n"
		"\n"
		"Fetch field value as date and time.\n"
		"\n"
		"Currently this method only works for OFTDate, OFTTime and OFTDateTime\n"
		"fields.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldAsDateTime().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"pnYear:  (including century)\n"
		"\n"
		"pnMonth:  (1-12)\n"
		"\n"
		"pnDay:  (1-31)\n"
		"\n"
		"pnHour:  (0-23)\n"
		"\n"
		"pnMinute:  (0-59)\n"
		"\n"
		"pnSecond:  (0-59)\n"
		"\n"
		"pnTZFlag:  (0=unknown, 1=localtime, 100=GMT, see data model for\n"
		"details)\n"
		"\n"
		"TRUE on success or FALSE on failure. \n"
		""},
	 { (char *)"Feature_GetFieldAsIntegerList", _wrap_Feature_GetFieldAsIntegerList, METH_VARARGS, (char *)"\n"
		"Feature_GetFieldAsIntegerList(Feature self, int id)\n"
		"\n"
		"const int*\n"
		"OGR_F_GetFieldAsIntegerList(OGRFeatureH hFeat, int iField, int\n"
		"*pnCount)\n"
		"\n"
		"Fetch field value as a list of integers.\n"
		"\n"
		"Currently this function only works for OFTIntegerList fields.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldAsIntegerList().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"pnCount:  an integer to put the list count (number of integers) into.\n"
		"\n"
		"the field value. This list is internal, and should not be modified, or\n"
		"freed. Its lifetime may be very brief. If *pnCount is zero on return\n"
		"the returned pointer may be NULL or non-NULL. \n"
		""},
	 { (char *)"Feature_GetFieldAsDoubleList", _wrap_Feature_GetFieldAsDoubleList, METH_VARARGS, (char *)"\n"
		"Feature_GetFieldAsDoubleList(Feature self, int id)\n"
		"\n"
		"const double*\n"
		"OGR_F_GetFieldAsDoubleList(OGRFeatureH hFeat, int iField, int\n"
		"*pnCount)\n"
		"\n"
		"Fetch field value as a list of doubles.\n"
		"\n"
		"Currently this function only works for OFTRealList fields.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldAsDoubleList().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"pnCount:  an integer to put the list count (number of doubles) into.\n"
		"\n"
		"the field value. This list is internal, and should not be modified, or\n"
		"freed. Its lifetime may be very brief. If *pnCount is zero on return\n"
		"the returned pointer may be NULL or non-NULL. \n"
		""},
	 { (char *)"Feature_GetFieldAsStringList", _wrap_Feature_GetFieldAsStringList, METH_VARARGS, (char *)"\n"
		"Feature_GetFieldAsStringList(Feature self, int id) -> char\n"
		"\n"
		"char**\n"
		"OGR_F_GetFieldAsStringList(OGRFeatureH hFeat, int iField)\n"
		"\n"
		"Fetch field value as a list of strings.\n"
		"\n"
		"Currently this method only works for OFTStringList fields.\n"
		"\n"
		"The returned list is terminated by a NULL pointer. The number of\n"
		"elements can also be calculated using CSLCount().\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldAsStringList().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to fetch, from 0 to GetFieldCount()-1.\n"
		"\n"
		"the field value. This list is internal, and should not be modified, or\n"
		"freed. Its lifetime may be very brief. \n"
		""},
	 { (char *)"Feature_IsFieldSet", _wrap_Feature_IsFieldSet, METH_VARARGS, (char *)"\n"
		"IsFieldSet(int id) -> bool\n"
		"Feature_IsFieldSet(Feature self, char name) -> bool\n"
		"\n"
		"int OGR_F_IsFieldSet(OGRFeatureH\n"
		"hFeat, int iField)\n"
		"\n"
		"Test if a field has ever been assigned a value or not.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::IsFieldSet().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which the field is.\n"
		"\n"
		"iField:  the field to test.\n"
		"\n"
		"TRUE if the field has been set, otherwise false. \n"
		""},
	 { (char *)"Feature_GetFieldIndex", _wrap_Feature_GetFieldIndex, METH_VARARGS, (char *)"\n"
		"Feature_GetFieldIndex(Feature self, char name) -> int\n"
		"\n"
		"int\n"
		"OGR_F_GetFieldIndex(OGRFeatureH hFeat, const char *pszName)\n"
		"\n"
		"Fetch the field index given field name.\n"
		"\n"
		"This is a cover for the OGRFeatureDefn::GetFieldIndex() method.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetFieldIndex().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which the field is found.\n"
		"\n"
		"pszName:  the name of the field to search for.\n"
		"\n"
		"the field index, or -1 if no matching field is found. \n"
		""},
	 { (char *)"Feature_GetFID", _wrap_Feature_GetFID, METH_VARARGS, (char *)"\n"
		"Feature_GetFID(Feature self) -> int\n"
		"\n"
		"long OGR_F_GetFID(OGRFeatureH hFeat)\n"
		"\n"
		"Get feature identifier.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::GetFID().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature from which to get the feature\n"
		"identifier.\n"
		"\n"
		"feature id or OGRNullFID if none has been assigned. \n"
		""},
	 { (char *)"Feature_SetFID", _wrap_Feature_SetFID, METH_VARARGS, (char *)"\n"
		"Feature_SetFID(Feature self, int fid) -> OGRErr\n"
		"\n"
		"OGRErr OGR_F_SetFID(OGRFeatureH hFeat,\n"
		"long nFID)\n"
		"\n"
		"Set the feature identifier.\n"
		"\n"
		"For specific types of features this operation may fail on illegal\n"
		"features ids. Generally it always succeeds. Feature ids should be\n"
		"greater than or equal to zero, with the exception of OGRNullFID (-1)\n"
		"indicating that the feature id is unknown.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::SetFID().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to set the feature id to.\n"
		"\n"
		"nFID:  the new feature identifier value to assign.\n"
		"\n"
		"On success OGRERR_NONE, or on failure some other value. \n"
		""},
	 { (char *)"Feature_DumpReadable", _wrap_Feature_DumpReadable, METH_VARARGS, (char *)"\n"
		"Feature_DumpReadable(Feature self)\n"
		"\n"
		"void\n"
		"OGR_F_DumpReadable(OGRFeatureH hFeat, FILE *fpOut)\n"
		"\n"
		"Dump this feature in a human readable form.\n"
		"\n"
		"This dumps the attributes, and geometry; however, it doesn't\n"
		"definition information (other than field types and names), nor does it\n"
		"report the geometry spatial reference system.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::DumpReadable().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to dump.\n"
		"\n"
		"fpOut:  the stream to write to, such as strout. \n"
		""},
	 { (char *)"Feature_UnsetField", _wrap_Feature_UnsetField, METH_VARARGS, (char *)"\n"
		"UnsetField(int id)\n"
		"Feature_UnsetField(Feature self, char name)\n"
		"\n"
		"void OGR_F_UnsetField(OGRFeatureH\n"
		"hFeat, int iField)\n"
		"\n"
		"Clear a field, marking it as unset.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::UnsetField().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature on which the field is.\n"
		"\n"
		"iField:  the field to unset. \n"
		""},
	 { (char *)"Feature_SetField", _wrap_Feature_SetField, METH_VARARGS, (char *)"\n"
		"SetField(int id, char value)\n"
		"SetField(char name, char value)\n"
		"SetField(int id, int value)\n"
		"SetField(char name, int value)\n"
		"SetField(int id, double value)\n"
		"SetField(char name, double value)\n"
		"SetField(int id, int year, int month, int day, int hour, int minute, \n"
		"    int second, int tzflag)\n"
		"Feature_SetField(Feature self, char name, int year, int month, int day, \n"
		"    int hour, int minute, int second, int tzflag)\n"
		""},
	 { (char *)"Feature_SetFieldIntegerList", _wrap_Feature_SetFieldIntegerList, METH_VARARGS, (char *)"\n"
		"Feature_SetFieldIntegerList(Feature self, int id, int nList)\n"
		"\n"
		"void\n"
		"OGR_F_SetFieldIntegerList(OGRFeatureH hFeat, int iField, int nCount,\n"
		"int *panValues)\n"
		"\n"
		"Set field to list of integers value.\n"
		"\n"
		"This function currently on has an effect of OFTIntegerList fields.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::SetField().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to set, from 0 to GetFieldCount()-1.\n"
		"\n"
		"nCount:  the number of values in the list being assigned.\n"
		"\n"
		"panValues:  the values to assign. \n"
		""},
	 { (char *)"Feature_SetFieldDoubleList", _wrap_Feature_SetFieldDoubleList, METH_VARARGS, (char *)"\n"
		"Feature_SetFieldDoubleList(Feature self, int id, int nList)\n"
		"\n"
		"void\n"
		"OGR_F_SetFieldDoubleList(OGRFeatureH hFeat, int iField, int nCount,\n"
		"double *padfValues)\n"
		"\n"
		"Set field to list of doubles value.\n"
		"\n"
		"This function currently on has an effect of OFTRealList fields.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::SetField().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to set, from 0 to GetFieldCount()-1.\n"
		"\n"
		"nCount:  the number of values in the list being assigned.\n"
		"\n"
		"padfValues:  the values to assign. \n"
		""},
	 { (char *)"Feature_SetFieldStringList", _wrap_Feature_SetFieldStringList, METH_VARARGS, (char *)"\n"
		"Feature_SetFieldStringList(Feature self, int id, char pList)\n"
		"\n"
		"void\n"
		"OGR_F_SetFieldStringList(OGRFeatureH hFeat, int iField, char\n"
		"**papszValues)\n"
		"\n"
		"Set field to list of strings value.\n"
		"\n"
		"This function currently on has an effect of OFTStringList fields.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::SetField().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature that owned the field.\n"
		"\n"
		"iField:  the field to set, from 0 to GetFieldCount()-1.\n"
		"\n"
		"papszValues:  the values to assign. \n"
		""},
	 { (char *)"Feature_SetFrom", (PyCFunction) _wrap_Feature_SetFrom, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Feature_SetFrom(Feature self, Feature other, int forgiving = 1) -> OGRErr\n"
		"\n"
		"OGRErr OGR_F_SetFrom(OGRFeatureH\n"
		"hFeat, OGRFeatureH hOtherFeat, int bForgiving)\n"
		"\n"
		"Set one feature from another.\n"
		"\n"
		"Overwrite the contents of this feature from the geometry and\n"
		"attributes of another. The hOtherFeature does not need to have the\n"
		"same OGRFeatureDefn. Field values are copied by corresponding field\n"
		"names. Field types do not have to exactly match. OGR_F_SetField*()\n"
		"function conversion rules will be applied as needed.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::SetFrom().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to set to.\n"
		"\n"
		"hOtherFeat:  handle to the feature from which geometry, and field\n"
		"values will be copied.\n"
		"\n"
		"bForgiving:  TRUE if the operation should continue despite lacking\n"
		"output fields matching some of the source fields.\n"
		"\n"
		"OGRERR_NONE if the operation succeeds, even if some values are not\n"
		"transferred, otherwise an error code. \n"
		""},
	 { (char *)"Feature_SetFromWithMap", _wrap_Feature_SetFromWithMap, METH_VARARGS, (char *)"\n"
		"Feature_SetFromWithMap(Feature self, Feature other, int forgiving, int nList) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_F_SetFromWithMap(OGRFeatureH hFeat, OGRFeatureH hOtherFeat, int\n"
		"bForgiving, int *panMap)\n"
		"\n"
		"Set one feature from another.\n"
		"\n"
		"Overwrite the contents of this feature from the geometry and\n"
		"attributes of another. The hOtherFeature does not need to have the\n"
		"same OGRFeatureDefn. Field values are copied according to the provided\n"
		"indices map. Field types do not have to exactly match.\n"
		"OGR_F_SetField*() function conversion rules will be applied as needed.\n"
		"This is more efficient than OGR_F_SetFrom() in that this doesn't\n"
		"lookup the fields by their names. Particularly useful when the field\n"
		"names don't match.\n"
		"\n"
		"This function is the same as the C++ method OGRFeature::SetFrom().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to set to.\n"
		"\n"
		"hOtherFeat:  handle to the feature from which geometry, and field\n"
		"values will be copied.\n"
		"\n"
		"panMap:  Array of the indices of the destination feature's fields\n"
		"stored at the corresponding index of the source feature's fields. A\n"
		"value of -1 should be used to ignore the source's field. The array\n"
		"should not be NULL and be as long as the number of fields in the\n"
		"source feature.\n"
		"\n"
		"bForgiving:  TRUE if the operation should continue despite lacking\n"
		"output fields matching some of the source fields.\n"
		"\n"
		"OGRERR_NONE if the operation succeeds, even if some values are not\n"
		"transferred, otherwise an error code. \n"
		""},
	 { (char *)"Feature_GetStyleString", _wrap_Feature_GetStyleString, METH_VARARGS, (char *)"\n"
		"Feature_GetStyleString(Feature self) -> char\n"
		"\n"
		"const char*\n"
		"OGR_F_GetStyleString(OGRFeatureH hFeat)\n"
		"\n"
		"Fetch style string for this feature.\n"
		"\n"
		"Set the OGR Feature Style Specification for details on the format of\n"
		"this string, and ogr_featurestyle.h for services available to parse\n"
		"it.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::GetStyleString().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to get the style from.\n"
		"\n"
		"a reference to a representation in string format, or NULL if there\n"
		"isn't one. \n"
		""},
	 { (char *)"Feature_SetStyleString", _wrap_Feature_SetStyleString, METH_VARARGS, (char *)"\n"
		"Feature_SetStyleString(Feature self, char the_string)\n"
		"\n"
		"void\n"
		"OGR_F_SetStyleString(OGRFeatureH hFeat, const char *pszStyle)\n"
		"\n"
		"Set feature style string. This method operate exactly as\n"
		"OGR_F_SetStyleStringDirectly() except that it does not assume\n"
		"ownership of the passed string, but instead makes a copy of it.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeature::SetStyleString().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFeat:  handle to the feature to set style to.\n"
		"\n"
		"pszStyle:  the style string to apply to this feature, cannot be NULL.\n"
		"\n"
		""},
	 { (char *)"Feature_GetFieldType", _wrap_Feature_GetFieldType, METH_VARARGS, (char *)"\n"
		"GetFieldType(int id) -> OGRFieldType\n"
		"Feature_GetFieldType(Feature self, char name) -> OGRFieldType\n"
		""},
	 { (char *)"Feature_swigregister", Feature_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_FeatureDefn", _wrap_delete_FeatureDefn, METH_VARARGS, (char *)"delete_FeatureDefn(FeatureDefn self)"},
	 { (char *)"new_FeatureDefn", (PyCFunction) _wrap_new_FeatureDefn, METH_VARARGS | METH_KEYWORDS, (char *)"new_FeatureDefn(char name_null_ok = None) -> FeatureDefn"},
	 { (char *)"FeatureDefn_GetName", _wrap_FeatureDefn_GetName, METH_VARARGS, (char *)"\n"
		"FeatureDefn_GetName(FeatureDefn self) -> char\n"
		"\n"
		"const char*\n"
		"OGR_FD_GetName(OGRFeatureDefnH hDefn)\n"
		"\n"
		"Get name of the OGRFeatureDefn passed as an argument.\n"
		"\n"
		"This function is the same as the C++ method OGRFeatureDefn::GetName().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition to get the name from.\n"
		"\n"
		"the name. This name is internal and should not be modified, or freed.\n"
		"\n"
		""},
	 { (char *)"FeatureDefn_GetFieldCount", _wrap_FeatureDefn_GetFieldCount, METH_VARARGS, (char *)"\n"
		"FeatureDefn_GetFieldCount(FeatureDefn self) -> int\n"
		"\n"
		"int\n"
		"OGR_FD_GetFieldCount(OGRFeatureDefnH hDefn)\n"
		"\n"
		"Fetch number of fields on the passed feature definition.\n"
		"\n"
		"This function is the same as the C++ OGRFeatureDefn::GetFieldCount().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition to get the fields count from.\n"
		"\n"
		"count of fields. \n"
		""},
	 { (char *)"FeatureDefn_GetFieldDefn", _wrap_FeatureDefn_GetFieldDefn, METH_VARARGS, (char *)"\n"
		"FeatureDefn_GetFieldDefn(FeatureDefn self, int i) -> FieldDefn\n"
		"\n"
		"OGRFieldDefnH\n"
		"OGR_FD_GetFieldDefn(OGRFeatureDefnH hDefn, int iField)\n"
		"\n"
		"Fetch field definition of the passed feature definition.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::GetFieldDefn().\n"
		"\n"
		"Starting with GDAL 1.7.0, this method will also issue an error if the\n"
		"index is not valid.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition to get the field definition\n"
		"from.\n"
		"\n"
		"iField:  the field to fetch, between 0 and GetFieldCount()-1.\n"
		"\n"
		"an handle to an internal field definition object or NULL if invalid\n"
		"index. This object should not be modified or freed by the application.\n"
		"\n"
		""},
	 { (char *)"FeatureDefn_GetFieldIndex", _wrap_FeatureDefn_GetFieldIndex, METH_VARARGS, (char *)"\n"
		"FeatureDefn_GetFieldIndex(FeatureDefn self, char name) -> int\n"
		"\n"
		"int\n"
		"OGR_FD_GetFieldIndex(OGRFeatureDefnH hDefn, const char *pszFieldName)\n"
		"\n"
		"Find field by name.\n"
		"\n"
		"The field index of the first field matching the passed field name\n"
		"(case insensitively) is returned.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::GetFieldIndex.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition to get field index from.\n"
		"\n"
		"pszFieldName:  the field name to search for.\n"
		"\n"
		"the field index, or -1 if no match found. \n"
		""},
	 { (char *)"FeatureDefn_AddFieldDefn", _wrap_FeatureDefn_AddFieldDefn, METH_VARARGS, (char *)"\n"
		"FeatureDefn_AddFieldDefn(FeatureDefn self, FieldDefn defn)\n"
		"\n"
		"void\n"
		"OGR_FD_AddFieldDefn(OGRFeatureDefnH hDefn, OGRFieldDefnH hNewField)\n"
		"\n"
		"Add a new field definition to the passed feature definition.\n"
		"\n"
		"To add a new field definition to a layer definition, do not use this\n"
		"function directly, but use OGR_L_CreateField() instead.\n"
		"\n"
		"This function should only be called while there are no OGRFeature\n"
		"objects in existance based on this OGRFeatureDefn. The OGRFieldDefn\n"
		"passed in is copied, and remains the responsibility of the caller.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::AddFieldDefn().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition to add the field definition\n"
		"to.\n"
		"\n"
		"hNewField:  handle to the new field definition. \n"
		""},
	 { (char *)"FeatureDefn_GetGeomType", _wrap_FeatureDefn_GetGeomType, METH_VARARGS, (char *)"\n"
		"FeatureDefn_GetGeomType(FeatureDefn self) -> OGRwkbGeometryType\n"
		"\n"
		"OGRwkbGeometryType\n"
		"OGR_FD_GetGeomType(OGRFeatureDefnH hDefn)\n"
		"\n"
		"Fetch the geometry base type of the passed feature definition.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::GetGeomType().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition to get the geometry type\n"
		"from.\n"
		"\n"
		"the base type for all geometry related to this definition. \n"
		""},
	 { (char *)"FeatureDefn_SetGeomType", _wrap_FeatureDefn_SetGeomType, METH_VARARGS, (char *)"\n"
		"FeatureDefn_SetGeomType(FeatureDefn self, OGRwkbGeometryType geom_type)\n"
		"\n"
		"void\n"
		"OGR_FD_SetGeomType(OGRFeatureDefnH hDefn, OGRwkbGeometryType eType)\n"
		"\n"
		"Assign the base geometry type for the passed layer (the same as the\n"
		"feature definition).\n"
		"\n"
		"All geometry objects using this type must be of the defined type or a\n"
		"derived type. The default upon creation is wkbUnknown which allows for\n"
		"any geometry type. The geometry type should generally not be changed\n"
		"after any OGRFeatures have been created against this definition.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::SetGeomType().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the layer or feature definition to set the geometry\n"
		"type to.\n"
		"\n"
		"eType:  the new type to assign. \n"
		""},
	 { (char *)"FeatureDefn_GetReferenceCount", _wrap_FeatureDefn_GetReferenceCount, METH_VARARGS, (char *)"\n"
		"FeatureDefn_GetReferenceCount(FeatureDefn self) -> int\n"
		"\n"
		"int\n"
		"OGR_FD_GetReferenceCount(OGRFeatureDefnH hDefn)\n"
		"\n"
		"Fetch current reference count.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::GetReferenceCount().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  hanlde to the feature definition on witch OGRFeature are based\n"
		"on.\n"
		"\n"
		"the current reference count. \n"
		""},
	 { (char *)"FeatureDefn_IsGeometryIgnored", _wrap_FeatureDefn_IsGeometryIgnored, METH_VARARGS, (char *)"\n"
		"FeatureDefn_IsGeometryIgnored(FeatureDefn self) -> int\n"
		"\n"
		"int\n"
		"OGR_FD_IsGeometryIgnored(OGRFeatureDefnH hDefn)\n"
		"\n"
		"Determine whether the geometry can be omitted when fetching features.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::IsGeometryIgnored().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  hanlde to the feature definition on witch OGRFeature are based\n"
		"on.\n"
		"\n"
		"ignore state \n"
		""},
	 { (char *)"FeatureDefn_SetGeometryIgnored", _wrap_FeatureDefn_SetGeometryIgnored, METH_VARARGS, (char *)"\n"
		"FeatureDefn_SetGeometryIgnored(FeatureDefn self, int bIgnored)\n"
		"\n"
		"void\n"
		"OGR_FD_SetGeometryIgnored(OGRFeatureDefnH hDefn, int bIgnore)\n"
		"\n"
		"Set whether the geometry can be omitted when fetching features.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::SetGeometryIgnored().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  hanlde to the feature definition on witch OGRFeature are based\n"
		"on.\n"
		"\n"
		"bIgnore:  ignore state \n"
		""},
	 { (char *)"FeatureDefn_IsStyleIgnored", _wrap_FeatureDefn_IsStyleIgnored, METH_VARARGS, (char *)"\n"
		"FeatureDefn_IsStyleIgnored(FeatureDefn self) -> int\n"
		"\n"
		"int\n"
		"OGR_FD_IsStyleIgnored(OGRFeatureDefnH hDefn)\n"
		"\n"
		"Determine whether the style can be omitted when fetching features.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::IsStyleIgnored().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the feature definition on which OGRFeature are based\n"
		"on.\n"
		"\n"
		"ignore state \n"
		""},
	 { (char *)"FeatureDefn_SetStyleIgnored", _wrap_FeatureDefn_SetStyleIgnored, METH_VARARGS, (char *)"\n"
		"FeatureDefn_SetStyleIgnored(FeatureDefn self, int bIgnored)\n"
		"\n"
		"void\n"
		"OGR_FD_SetStyleIgnored(OGRFeatureDefnH hDefn, int bIgnore)\n"
		"\n"
		"Set whether the style can be omitted when fetching features.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRFeatureDefn::SetStyleIgnored().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  hanlde to the feature definition on witch OGRFeature are based\n"
		"on.\n"
		"\n"
		"bIgnore:  ignore state \n"
		""},
	 { (char *)"FeatureDefn_swigregister", FeatureDefn_swigregister, METH_VARARGS, NULL},
	 { (char *)"delete_FieldDefn", _wrap_delete_FieldDefn, METH_VARARGS, (char *)"delete_FieldDefn(FieldDefn self)"},
	 { (char *)"new_FieldDefn", (PyCFunction) _wrap_new_FieldDefn, METH_VARARGS | METH_KEYWORDS, (char *)"new_FieldDefn(char name_null_ok = \"unnamed\", OGRFieldType field_type = OFTString) -> FieldDefn"},
	 { (char *)"FieldDefn_GetName", _wrap_FieldDefn_GetName, METH_VARARGS, (char *)"FieldDefn_GetName(FieldDefn self) -> char"},
	 { (char *)"FieldDefn_GetNameRef", _wrap_FieldDefn_GetNameRef, METH_VARARGS, (char *)"\n"
		"FieldDefn_GetNameRef(FieldDefn self) -> char\n"
		"\n"
		"const char*\n"
		"OGR_Fld_GetNameRef(OGRFieldDefnH hDefn)\n"
		"\n"
		"Fetch name of this field.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRFieldDefn::GetNameRef().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition.\n"
		"\n"
		"the name of the field definition. \n"
		""},
	 { (char *)"FieldDefn_SetName", _wrap_FieldDefn_SetName, METH_VARARGS, (char *)"\n"
		"FieldDefn_SetName(FieldDefn self, char name)\n"
		"\n"
		"void OGR_Fld_SetName(OGRFieldDefnH\n"
		"hDefn, const char *pszName)\n"
		"\n"
		"Reset the name of this field.\n"
		"\n"
		"This function is the same as the CPP method OGRFieldDefn::SetName().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to apply the new name to.\n"
		"\n"
		"pszName:  the new name to apply. \n"
		""},
	 { (char *)"FieldDefn_GetType", _wrap_FieldDefn_GetType, METH_VARARGS, (char *)"\n"
		"FieldDefn_GetType(FieldDefn self) -> OGRFieldType\n"
		"\n"
		"OGRFieldType\n"
		"OGR_Fld_GetType(OGRFieldDefnH hDefn)\n"
		"\n"
		"Fetch type of this field.\n"
		"\n"
		"This function is the same as the CPP method OGRFieldDefn::GetType().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to get type from.\n"
		"\n"
		"field type. \n"
		""},
	 { (char *)"FieldDefn_SetType", _wrap_FieldDefn_SetType, METH_VARARGS, (char *)"\n"
		"FieldDefn_SetType(FieldDefn self, OGRFieldType type)\n"
		"\n"
		"void OGR_Fld_SetType(OGRFieldDefnH\n"
		"hDefn, OGRFieldType eType)\n"
		"\n"
		"Set the type of this field. This should never be done to an\n"
		"OGRFieldDefn that is already part of an OGRFeatureDefn.\n"
		"\n"
		"This function is the same as the CPP method OGRFieldDefn::SetType().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to set type to.\n"
		"\n"
		"eType:  the new field type. \n"
		""},
	 { (char *)"FieldDefn_GetJustify", _wrap_FieldDefn_GetJustify, METH_VARARGS, (char *)"\n"
		"FieldDefn_GetJustify(FieldDefn self) -> OGRJustification\n"
		"\n"
		"OGRJustification\n"
		"OGR_Fld_GetJustify(OGRFieldDefnH hDefn)\n"
		"\n"
		"Get the justification for this field.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRFieldDefn::GetJustify().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to get justification from.\n"
		"\n"
		"the justification. \n"
		""},
	 { (char *)"FieldDefn_SetJustify", _wrap_FieldDefn_SetJustify, METH_VARARGS, (char *)"\n"
		"FieldDefn_SetJustify(FieldDefn self, OGRJustification justify)\n"
		"\n"
		"void\n"
		"OGR_Fld_SetJustify(OGRFieldDefnH hDefn, OGRJustification eJustify)\n"
		"\n"
		"Set the justification for this field.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRFieldDefn::SetJustify().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to set justification to.\n"
		"\n"
		"eJustify:  the new justification. \n"
		""},
	 { (char *)"FieldDefn_GetWidth", _wrap_FieldDefn_GetWidth, METH_VARARGS, (char *)"\n"
		"FieldDefn_GetWidth(FieldDefn self) -> int\n"
		"\n"
		"int OGR_Fld_GetWidth(OGRFieldDefnH\n"
		"hDefn)\n"
		"\n"
		"Get the formatting width for this field.\n"
		"\n"
		"This function is the same as the CPP method OGRFieldDefn::GetWidth().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to get width from.\n"
		"\n"
		"the width, zero means no specified width. \n"
		""},
	 { (char *)"FieldDefn_SetWidth", _wrap_FieldDefn_SetWidth, METH_VARARGS, (char *)"\n"
		"FieldDefn_SetWidth(FieldDefn self, int width)\n"
		"\n"
		"void OGR_Fld_SetWidth(OGRFieldDefnH\n"
		"hDefn, int nNewWidth)\n"
		"\n"
		"Set the formatting width for this field in characters.\n"
		"\n"
		"This function is the same as the CPP method OGRFieldDefn::SetWidth().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to set width to.\n"
		"\n"
		"nNewWidth:  the new width. \n"
		""},
	 { (char *)"FieldDefn_GetPrecision", _wrap_FieldDefn_GetPrecision, METH_VARARGS, (char *)"\n"
		"FieldDefn_GetPrecision(FieldDefn self) -> int\n"
		"\n"
		"int\n"
		"OGR_Fld_GetPrecision(OGRFieldDefnH hDefn)\n"
		"\n"
		"Get the formatting precision for this field. This should normally be\n"
		"zero for fields of types other than OFTReal.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRFieldDefn::GetPrecision().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to get precision from.\n"
		"\n"
		"the precision. \n"
		""},
	 { (char *)"FieldDefn_SetPrecision", _wrap_FieldDefn_SetPrecision, METH_VARARGS, (char *)"\n"
		"FieldDefn_SetPrecision(FieldDefn self, int precision)\n"
		"\n"
		"void\n"
		"OGR_Fld_SetPrecision(OGRFieldDefnH hDefn, int nPrecision)\n"
		"\n"
		"Set the formatting precision for this field in characters.\n"
		"\n"
		"This should normally be zero for fields of types other than OFTReal.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRFieldDefn::SetPrecision().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition to set precision to.\n"
		"\n"
		"nPrecision:  the new precision. \n"
		""},
	 { (char *)"FieldDefn_GetTypeName", _wrap_FieldDefn_GetTypeName, METH_VARARGS, (char *)"FieldDefn_GetTypeName(FieldDefn self) -> char"},
	 { (char *)"FieldDefn_GetFieldTypeName", _wrap_FieldDefn_GetFieldTypeName, METH_VARARGS, (char *)"FieldDefn_GetFieldTypeName(FieldDefn self, OGRFieldType type) -> char"},
	 { (char *)"FieldDefn_IsIgnored", _wrap_FieldDefn_IsIgnored, METH_VARARGS, (char *)"\n"
		"FieldDefn_IsIgnored(FieldDefn self) -> int\n"
		"\n"
		"int OGR_Fld_IsIgnored(OGRFieldDefnH\n"
		"hDefn)\n"
		"\n"
		"Return whether this field should be omitted when fetching features.\n"
		"\n"
		"This method is the same as the C++ method OGRFieldDefn::IsIgnored().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition\n"
		"\n"
		"ignore state \n"
		""},
	 { (char *)"FieldDefn_SetIgnored", _wrap_FieldDefn_SetIgnored, METH_VARARGS, (char *)"\n"
		"FieldDefn_SetIgnored(FieldDefn self, int bIgnored)\n"
		"\n"
		"void\n"
		"OGR_Fld_SetIgnored(OGRFieldDefnH hDefn, int ignore)\n"
		"\n"
		"Set whether this field should be omitted when fetching features.\n"
		"\n"
		"This method is the same as the C function OGRFieldDefn::SetIgnored().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hDefn:  handle to the field definition\n"
		"\n"
		"ignore:  ignore state \n"
		""},
	 { (char *)"FieldDefn_swigregister", FieldDefn_swigregister, METH_VARARGS, NULL},
	 { (char *)"CreateGeometryFromWkb", (PyCFunction) _wrap_CreateGeometryFromWkb, METH_VARARGS | METH_KEYWORDS, (char *)"CreateGeometryFromWkb(int len, SpatialReference reference = None) -> Geometry"},
	 { (char *)"CreateGeometryFromWkt", (PyCFunction) _wrap_CreateGeometryFromWkt, METH_VARARGS | METH_KEYWORDS, (char *)"CreateGeometryFromWkt(char val, SpatialReference reference = None) -> Geometry"},
	 { (char *)"CreateGeometryFromGML", _wrap_CreateGeometryFromGML, METH_VARARGS, (char *)"CreateGeometryFromGML(char input_string) -> Geometry"},
	 { (char *)"CreateGeometryFromJson", _wrap_CreateGeometryFromJson, METH_VARARGS, (char *)"CreateGeometryFromJson(char input_string) -> Geometry"},
	 { (char *)"BuildPolygonFromEdges", (PyCFunction) _wrap_BuildPolygonFromEdges, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"BuildPolygonFromEdges(Geometry hLineCollection, int bBestEffort = 0, int bAutoClose = 0, \n"
		"    double dfTolerance = 0) -> Geometry\n"
		""},
	 { (char *)"ApproximateArcAngles", (PyCFunction) _wrap_ApproximateArcAngles, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"ApproximateArcAngles(double dfCenterX, double dfCenterY, double dfZ, double dfPrimaryRadius, \n"
		"    double dfSecondaryAxis, \n"
		"    double dfRotation, double dfStartAngle, double dfEndAngle, \n"
		"    double dfMaxAngleStepSizeDegrees) -> Geometry\n"
		""},
	 { (char *)"ForceToPolygon", _wrap_ForceToPolygon, METH_VARARGS, (char *)"ForceToPolygon(Geometry geom_in) -> Geometry"},
	 { (char *)"ForceToMultiPolygon", _wrap_ForceToMultiPolygon, METH_VARARGS, (char *)"ForceToMultiPolygon(Geometry geom_in) -> Geometry"},
	 { (char *)"ForceToMultiPoint", _wrap_ForceToMultiPoint, METH_VARARGS, (char *)"ForceToMultiPoint(Geometry geom_in) -> Geometry"},
	 { (char *)"ForceToMultiLineString", _wrap_ForceToMultiLineString, METH_VARARGS, (char *)"ForceToMultiLineString(Geometry geom_in) -> Geometry"},
	 { (char *)"delete_Geometry", _wrap_delete_Geometry, METH_VARARGS, (char *)"delete_Geometry(Geometry self)"},
	 { (char *)"new_Geometry", (PyCFunction) _wrap_new_Geometry, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"new_Geometry(OGRwkbGeometryType type = wkbUnknown, char wkt = None, \n"
		"    int wkb = 0, char gml = None) -> Geometry\n"
		""},
	 { (char *)"Geometry_ExportToWkt", _wrap_Geometry_ExportToWkt, METH_VARARGS, (char *)"\n"
		"Geometry_ExportToWkt(Geometry self) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_G_ExportToWkt(OGRGeometryH hGeom, char **ppszSrcText)\n"
		"\n"
		"Convert a geometry into well known text format.\n"
		"\n"
		"This function relates to the SFCOM IWks::ExportToWKT() method.\n"
		"\n"
		"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.\n"
		"\n"
		"Currently OGRERR_NONE is always returned. \n"
		""},
	 { (char *)"Geometry_ExportToWkb", (PyCFunction) _wrap_Geometry_ExportToWkb, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Geometry_ExportToWkb(Geometry self, OGRwkbByteOrder byte_order = wkbXDR) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_G_ExportToWkb(OGRGeometryH hGeom, OGRwkbByteOrder eOrder, unsigned\n"
		"char *pabyDstBuffer)\n"
		"\n"
		"Convert a geometry into well known binary format.\n"
		"\n"
		"This function relates to the SFCOM IWks::ExportToWKB() method.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::exportToWkb().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to convert to a well know binary data\n"
		"from.\n"
		"\n"
		"eOrder:  One of wkbXDR or wkbNDR indicating MSB or LSB byte order\n"
		"respectively.\n"
		"\n"
		"pabyDstBuffer:  a buffer into which the binary representation is\n"
		"written. This buffer must be at least OGR_G_WkbSize() byte in size.\n"
		"\n"
		"Currently OGRERR_NONE is always returned. \n"
		""},
	 { (char *)"Geometry_ExportToGML", (PyCFunction) _wrap_Geometry_ExportToGML, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_ExportToGML(Geometry self, char options = None) -> retStringAndCPLFree"},
	 { (char *)"Geometry_ExportToKML", _wrap_Geometry_ExportToKML, METH_VARARGS, (char *)"Geometry_ExportToKML(Geometry self, char altitude_mode = None) -> retStringAndCPLFree"},
	 { (char *)"Geometry_ExportToJson", (PyCFunction) _wrap_Geometry_ExportToJson, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_ExportToJson(Geometry self, char options = None) -> retStringAndCPLFree"},
	 { (char *)"Geometry_AddPoint", (PyCFunction) _wrap_Geometry_AddPoint, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_AddPoint(Geometry self, double x, double y, double z = 0)"},
	 { (char *)"Geometry_AddPoint_2D", _wrap_Geometry_AddPoint_2D, METH_VARARGS, (char *)"Geometry_AddPoint_2D(Geometry self, double x, double y)"},
	 { (char *)"Geometry_AddGeometryDirectly", _wrap_Geometry_AddGeometryDirectly, METH_VARARGS, (char *)"Geometry_AddGeometryDirectly(Geometry self, Geometry other_disown) -> OGRErr"},
	 { (char *)"Geometry_AddGeometry", _wrap_Geometry_AddGeometry, METH_VARARGS, (char *)"Geometry_AddGeometry(Geometry self, Geometry other) -> OGRErr"},
	 { (char *)"Geometry_Clone", _wrap_Geometry_Clone, METH_VARARGS, (char *)"\n"
		"Geometry_Clone(Geometry self) -> Geometry\n"
		"\n"
		"OGRGeometryH OGR_G_Clone(OGRGeometryH\n"
		"hGeom)\n"
		"\n"
		"Make a copy of this object.\n"
		"\n"
		"This function relates to the SFCOM IGeometry::clone() method.\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::clone().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to clone from.\n"
		"\n"
		"an handle on the copy of the geometry with the spatial reference\n"
		"system as the original. \n"
		""},
	 { (char *)"Geometry_GetGeometryType", _wrap_Geometry_GetGeometryType, METH_VARARGS, (char *)"\n"
		"Geometry_GetGeometryType(Geometry self) -> OGRwkbGeometryType\n"
		"\n"
		"OGRwkbGeometryType\n"
		"OGR_G_GetGeometryType(OGRGeometryH hGeom)\n"
		"\n"
		"Fetch geometry type.\n"
		"\n"
		"Note that the geometry type may include the 2.5D flag. To get a 2D\n"
		"flattened version of the geometry type apply the wkbFlatten() macro to\n"
		"the return result.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::getGeometryType().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to get type from.\n"
		"\n"
		"the geometry type code. \n"
		""},
	 { (char *)"Geometry_GetGeometryName", _wrap_Geometry_GetGeometryName, METH_VARARGS, (char *)"\n"
		"Geometry_GetGeometryName(Geometry self) -> char\n"
		"\n"
		"const char*\n"
		"OGR_G_GetGeometryName(OGRGeometryH hGeom)\n"
		"\n"
		"Fetch WKT name for geometry type.\n"
		"\n"
		"There is no SFCOM analog to this function.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::getGeometryName().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to get name from.\n"
		"\n"
		"name used for this geometry type in well known text format. \n"
		""},
	 { (char *)"Geometry_Length", _wrap_Geometry_Length, METH_VARARGS, (char *)"Geometry_Length(Geometry self) -> double"},
	 { (char *)"Geometry_Area", _wrap_Geometry_Area, METH_VARARGS, (char *)"Geometry_Area(Geometry self) -> double"},
	 { (char *)"Geometry_GetArea", _wrap_Geometry_GetArea, METH_VARARGS, (char *)"Geometry_GetArea(Geometry self) -> double"},
	 { (char *)"Geometry_GetPointCount", _wrap_Geometry_GetPointCount, METH_VARARGS, (char *)"Geometry_GetPointCount(Geometry self) -> int"},
	 { (char *)"Geometry_GetPoints", (PyCFunction) _wrap_Geometry_GetPoints, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetPoints(Geometry self, int nCoordDimension = 0)"},
	 { (char *)"Geometry_GetX", (PyCFunction) _wrap_Geometry_GetX, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetX(Geometry self, int point = 0) -> double"},
	 { (char *)"Geometry_GetY", (PyCFunction) _wrap_Geometry_GetY, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetY(Geometry self, int point = 0) -> double"},
	 { (char *)"Geometry_GetZ", (PyCFunction) _wrap_Geometry_GetZ, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_GetZ(Geometry self, int point = 0) -> double"},
	 { (char *)"Geometry_GetPoint", _wrap_Geometry_GetPoint, METH_VARARGS, (char *)"Geometry_GetPoint(Geometry self, int iPoint = 0)"},
	 { (char *)"Geometry_GetPoint_2D", _wrap_Geometry_GetPoint_2D, METH_VARARGS, (char *)"Geometry_GetPoint_2D(Geometry self, int iPoint = 0)"},
	 { (char *)"Geometry_GetGeometryCount", _wrap_Geometry_GetGeometryCount, METH_VARARGS, (char *)"Geometry_GetGeometryCount(Geometry self) -> int"},
	 { (char *)"Geometry_SetPoint", (PyCFunction) _wrap_Geometry_SetPoint, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_SetPoint(Geometry self, int point, double x, double y, double z = 0)"},
	 { (char *)"Geometry_SetPoint_2D", (PyCFunction) _wrap_Geometry_SetPoint_2D, METH_VARARGS | METH_KEYWORDS, (char *)"Geometry_SetPoint_2D(Geometry self, int point, double x, double y)"},
	 { (char *)"Geometry_GetGeometryRef", _wrap_Geometry_GetGeometryRef, METH_VARARGS, (char *)"Geometry_GetGeometryRef(Geometry self, int geom) -> Geometry"},
	 { (char *)"Geometry_Simplify", _wrap_Geometry_Simplify, METH_VARARGS, (char *)"\n"
		"Geometry_Simplify(Geometry self, double tolerance) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_Simplify(OGRGeometryH hThis, double dTolerance)\n"
		"\n"
		"Compute a simplified geometry.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Simplify().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry.\n"
		"\n"
		"dTolerance:  the distance tolerance for the simplification.\n"
		"\n"
		"the simplified geometry or NULL if an error occurs.\n"
		"\n"
		"OGR 1.8.0 \n"
		""},
	 { (char *)"Geometry_SimplifyPreserveTopology", _wrap_Geometry_SimplifyPreserveTopology, METH_VARARGS, (char *)"\n"
		"Geometry_SimplifyPreserveTopology(Geometry self, double tolerance) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_SimplifyPreserveTopology(OGRGeometryH hThis, double dTolerance)\n"
		"\n"
		"Compute a simplified geometry.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRGeometry::SimplifyPreserveTopology().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry.\n"
		"\n"
		"dTolerance:  the distance tolerance for the simplification.\n"
		"\n"
		"the simplified geometry or NULL if an error occurs.\n"
		"\n"
		"OGR 1.9.0 \n"
		""},
	 { (char *)"Geometry_Boundary", _wrap_Geometry_Boundary, METH_VARARGS, (char *)"\n"
		"Geometry_Boundary(Geometry self) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_Boundary(OGRGeometryH hTarget)\n"
		"\n"
		"Compute boundary.\n"
		"\n"
		"A new geometry object is created and returned containing the boundary\n"
		"of the geometry on which the method is invoked.\n"
		"\n"
		"This function is the same as the C++ method OGR_G_Boundary().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hTarget:  The Geometry to calculate the boundary of.\n"
		"\n"
		"a handle to a newly allocated geometry now owned by the caller, or\n"
		"NULL on failure.\n"
		"\n"
		"OGR 1.8.0 \n"
		""},
	 { (char *)"Geometry_GetBoundary", _wrap_Geometry_GetBoundary, METH_VARARGS, (char *)"\n"
		"Geometry_GetBoundary(Geometry self) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_GetBoundary(OGRGeometryH hTarget)\n"
		"\n"
		"Compute boundary (deprecated).\n"
		"\n"
		"Deprecated See:   OGR_G_Boundary() \n"
		""},
	 { (char *)"Geometry_ConvexHull", _wrap_Geometry_ConvexHull, METH_VARARGS, (char *)"\n"
		"Geometry_ConvexHull(Geometry self) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_ConvexHull(OGRGeometryH hTarget)\n"
		"\n"
		"Compute convex hull.\n"
		"\n"
		"A new geometry object is created and returned containing the convex\n"
		"hull of the geometry on which the method is invoked.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::ConvexHull().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hTarget:  The Geometry to calculate the convex hull of.\n"
		"\n"
		"a handle to a newly allocated geometry now owned by the caller, or\n"
		"NULL on failure. \n"
		""},
	 { (char *)"Geometry_Buffer", (PyCFunction) _wrap_Geometry_Buffer, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
		"Geometry_Buffer(Geometry self, double distance, int quadsecs = 30) -> Geometry\n"
		"\n"
		"OGRGeometryH OGR_G_Buffer(OGRGeometryH\n"
		"hTarget, double dfDist, int nQuadSegs)\n"
		"\n"
		"Compute buffer of geometry.\n"
		"\n"
		"Builds a new geometry containing the buffer region around the geometry\n"
		"on which it is invoked. The buffer is a polygon containing the region\n"
		"within the buffer distance of the original geometry.\n"
		"\n"
		"Some buffer sections are properly described as curves, but are\n"
		"converted to approximate polygons. The nQuadSegs parameter can be used\n"
		"to control how many segements 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.\n"
		"\n"
		"nQuadSegs:  the number of segments used to approximate a 90 degree\n"
		"(quadrant) of curvature.\n"
		"\n"
		"the newly created geometry, or NULL if an error occurs. \n"
		""},
	 { (char *)"Geometry_Intersection", _wrap_Geometry_Intersection, METH_VARARGS, (char *)"\n"
		"Geometry_Intersection(Geometry self, Geometry other) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_Intersection(OGRGeometryH hThis, OGRGeometryH hOther)\n"
		"\n"
		"Compute intersection.\n"
		"\n"
		"Generates a new geometry which is the region of intersection of the\n"
		"two geometries operated on. The OGR_G_Intersects() function can be\n"
		"used to test if two geometries intersect.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRGeometry::Intersection().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry.\n"
		"\n"
		"hOther:  the other geometry.\n"
		"\n"
		"a new geometry representing the intersection or NULL if there is no\n"
		"intersection or an error occurs. \n"
		""},
	 { (char *)"Geometry_Union", _wrap_Geometry_Union, METH_VARARGS, (char *)"\n"
		"Geometry_Union(Geometry self, Geometry other) -> Geometry\n"
		"\n"
		"OGRGeometryH OGR_G_Union(OGRGeometryH\n"
		"hThis, OGRGeometryH hOther)\n"
		"\n"
		"Compute union.\n"
		"\n"
		"Generates a new geometry which is the region of union of the two\n"
		"geometries operated on.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Union().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry.\n"
		"\n"
		"hOther:  the other geometry.\n"
		"\n"
		"a new geometry representing the union or NULL if an error occurs. \n"
		""},
	 { (char *)"Geometry_UnionCascaded", _wrap_Geometry_UnionCascaded, METH_VARARGS, (char *)"\n"
		"Geometry_UnionCascaded(Geometry self) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_UnionCascaded(OGRGeometryH hThis)\n"
		"\n"
		"Compute union using cascading.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRGeometry::UnionCascaded().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry.\n"
		"\n"
		"a new geometry representing the union or NULL if an error occurs. \n"
		""},
	 { (char *)"Geometry_Difference", _wrap_Geometry_Difference, METH_VARARGS, (char *)"\n"
		"Geometry_Difference(Geometry self, Geometry other) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_Difference(OGRGeometryH hThis, OGRGeometryH hOther)\n"
		"\n"
		"Compute difference.\n"
		"\n"
		"Generates a new geometry which is the region of this geometry with the\n"
		"region of the other geometry removed.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Difference().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry.\n"
		"\n"
		"hOther:  the other geometry.\n"
		"\n"
		"a new geometry representing the difference or NULL if the difference\n"
		"is empty or an error occurs. \n"
		""},
	 { (char *)"Geometry_SymDifference", _wrap_Geometry_SymDifference, METH_VARARGS, (char *)"\n"
		"Geometry_SymDifference(Geometry self, Geometry other) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_SymDifference(OGRGeometryH hThis, OGRGeometryH hOther)\n"
		"\n"
		"Compute symmetric difference.\n"
		"\n"
		"Generates a new geometry which is the symmetric difference of this\n"
		"geometry and the other geometry.\n"
		"\n"
		"This function is the same as the C++ method\n"
		"OGRGeometry::SymmetricDifference().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry.\n"
		"\n"
		"hOther:  the other geometry.\n"
		"\n"
		"a new geometry representing the symmetric difference or NULL if the\n"
		"difference is empty or an error occurs.\n"
		"\n"
		"OGR 1.8.0 \n"
		""},
	 { (char *)"Geometry_SymmetricDifference", _wrap_Geometry_SymmetricDifference, METH_VARARGS, (char *)"\n"
		"Geometry_SymmetricDifference(Geometry self, Geometry other) -> Geometry\n"
		"\n"
		"OGRGeometryH\n"
		"OGR_G_SymmetricDifference(OGRGeometryH hThis, OGRGeometryH hOther)\n"
		"\n"
		"Compute symmetric difference (deprecated).\n"
		"\n"
		"Deprecated See:   OGR_G_SymmetricDifference() \n"
		""},
	 { (char *)"Geometry_Distance", _wrap_Geometry_Distance, METH_VARARGS, (char *)"\n"
		"Geometry_Distance(Geometry self, Geometry other) -> double\n"
		"\n"
		"double OGR_G_Distance(OGRGeometryH\n"
		"hFirst, OGRGeometryH hOther)\n"
		"\n"
		"Compute distance between two geometries.\n"
		"\n"
		"Returns the shortest distance between the two geometries.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Distance().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hFirst:  the first geometry to compare against.\n"
		"\n"
		"hOther:  the other geometry to compare against.\n"
		"\n"
		"the distance between the geometries or -1 if an error occurs. \n"
		""},
	 { (char *)"Geometry_Empty", _wrap_Geometry_Empty, METH_VARARGS, (char *)"\n"
		"Geometry_Empty(Geometry self)\n"
		"\n"
		"void OGR_G_Empty(OGRGeometryH hGeom)\n"
		"\n"
		"Clear geometry information. This restores the geometry to it's initial\n"
		"state after construction, and before assignment of actual geometry.\n"
		"\n"
		"This function relates to the SFCOM IGeometry::Empty() method.\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::empty().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to empty. \n"
		""},
	 { (char *)"Geometry_IsEmpty", _wrap_Geometry_IsEmpty, METH_VARARGS, (char *)"\n"
		"Geometry_IsEmpty(Geometry self) -> bool\n"
		"\n"
		"int OGR_G_IsEmpty(OGRGeometryH hGeom)\n"
		"\n"
		"Test if the geometry is empty.\n"
		"\n"
		"This method is the same as the CPP method OGRGeometry::IsEmpty().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  The Geometry to test.\n"
		"\n"
		"TRUE if the geometry has no points, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_IsValid", _wrap_Geometry_IsValid, METH_VARARGS, (char *)"\n"
		"Geometry_IsValid(Geometry self) -> bool\n"
		"\n"
		"int OGR_G_IsValid(OGRGeometryH hGeom)\n"
		"\n"
		"Test if the geometry is valid.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::IsValid().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always return FALSE.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  The Geometry to test.\n"
		"\n"
		"TRUE if the geometry has no points, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_IsSimple", _wrap_Geometry_IsSimple, METH_VARARGS, (char *)"\n"
		"Geometry_IsSimple(Geometry self) -> bool\n"
		"\n"
		"int OGR_G_IsSimple(OGRGeometryH\n"
		"hGeom)\n"
		"\n"
		"Returns TRUE if the geometry is simple.\n"
		"\n"
		"Returns TRUE if the geometry has no anomalous geometric points, such\n"
		"as self intersection or self tangency. The description of each\n"
		"instantiable geometric class will include the specific conditions that\n"
		"cause an instance of that class to be classified as not simple.\n"
		"\n"
		"This function is the same as the c++ method OGRGeometry::IsSimple()\n"
		"method.\n"
		"\n"
		"If OGR is built without the GEOS library, this function will always\n"
		"return FALSE.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  The Geometry to test.\n"
		"\n"
		"TRUE if object is simple, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_IsRing", _wrap_Geometry_IsRing, METH_VARARGS, (char *)"\n"
		"Geometry_IsRing(Geometry self) -> bool\n"
		"\n"
		"int OGR_G_IsRing(OGRGeometryH hGeom)\n"
		"\n"
		"Test if the geometry is a ring.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::IsRing().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always return FALSE.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  The Geometry to test.\n"
		"\n"
		"TRUE if the geometry has no points, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_Intersects", _wrap_Geometry_Intersects, METH_VARARGS, (char *)"\n"
		"Geometry_Intersects(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Intersects(OGRGeometryH\n"
		"hGeom, OGRGeometryH hOtherGeom)\n"
		"\n"
		"Do these features intersect?\n"
		"\n"
		"Currently this is not implemented in a rigerous fashion, and generally\n"
		"just tests whether the envelopes of the two features intersect.\n"
		"Eventually this will be made rigerous.\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::Intersects.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the first geometry.\n"
		"\n"
		"hOtherGeom:  handle on the other geometry to test against.\n"
		"\n"
		"TRUE if the geometries intersect, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_Intersect", _wrap_Geometry_Intersect, METH_VARARGS, (char *)"\n"
		"Geometry_Intersect(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Intersect(OGRGeometryH\n"
		"hGeom, OGRGeometryH hOtherGeom) \n"
		""},
	 { (char *)"Geometry_Equals", _wrap_Geometry_Equals, METH_VARARGS, (char *)"\n"
		"Geometry_Equals(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Equals(OGRGeometryH hGeom,\n"
		"OGRGeometryH hOther)\n"
		"\n"
		"Returns TRUE if two geometries are equivalent.\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::Equals()\n"
		"method.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the first geometry.\n"
		"\n"
		"hOther:  handle on the other geometry to test against.\n"
		"\n"
		"TRUE if equivalent or FALSE otherwise. \n"
		""},
	 { (char *)"Geometry_Equal", _wrap_Geometry_Equal, METH_VARARGS, (char *)"\n"
		"Geometry_Equal(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Equal(OGRGeometryH hGeom,\n"
		"OGRGeometryH hOther) \n"
		""},
	 { (char *)"Geometry_Disjoint", _wrap_Geometry_Disjoint, METH_VARARGS, (char *)"\n"
		"Geometry_Disjoint(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Disjoint(OGRGeometryH\n"
		"hThis, OGRGeometryH hOther)\n"
		"\n"
		"Test for disjointness.\n"
		"\n"
		"Tests if this geometry and the other geometry are disjoint.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Disjoint().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry to compare.\n"
		"\n"
		"hOther:  the other geometry to compare.\n"
		"\n"
		"TRUE if they are disjoint, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_Touches", _wrap_Geometry_Touches, METH_VARARGS, (char *)"\n"
		"Geometry_Touches(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Touches(OGRGeometryH hThis,\n"
		"OGRGeometryH hOther)\n"
		"\n"
		"Test for touching.\n"
		"\n"
		"Tests if this geometry and the other geometry are touching.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Touches().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry to compare.\n"
		"\n"
		"hOther:  the other geometry to compare.\n"
		"\n"
		"TRUE if they are touching, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_Crosses", _wrap_Geometry_Crosses, METH_VARARGS, (char *)"\n"
		"Geometry_Crosses(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Crosses(OGRGeometryH hThis,\n"
		"OGRGeometryH hOther)\n"
		"\n"
		"Test for crossing.\n"
		"\n"
		"Tests if this geometry and the other geometry are crossing.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Crosses().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry to compare.\n"
		"\n"
		"hOther:  the other geometry to compare.\n"
		"\n"
		"TRUE if they are crossing, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_Within", _wrap_Geometry_Within, METH_VARARGS, (char *)"\n"
		"Geometry_Within(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Within(OGRGeometryH hThis,\n"
		"OGRGeometryH hOther)\n"
		"\n"
		"Test for containment.\n"
		"\n"
		"Tests if this geometry is within the other geometry.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Within().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry to compare.\n"
		"\n"
		"hOther:  the other geometry to compare.\n"
		"\n"
		"TRUE if hThis is within hOther, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_Contains", _wrap_Geometry_Contains, METH_VARARGS, (char *)"\n"
		"Geometry_Contains(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Contains(OGRGeometryH\n"
		"hThis, OGRGeometryH hOther)\n"
		"\n"
		"Test for containment.\n"
		"\n"
		"Tests if this geometry contains the other geometry.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Contains().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry to compare.\n"
		"\n"
		"hOther:  the other geometry to compare.\n"
		"\n"
		"TRUE if hThis contains hOther geometry, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_Overlaps", _wrap_Geometry_Overlaps, METH_VARARGS, (char *)"\n"
		"Geometry_Overlaps(Geometry self, Geometry other) -> bool\n"
		"\n"
		"int OGR_G_Overlaps(OGRGeometryH\n"
		"hThis, OGRGeometryH hOther)\n"
		"\n"
		"Test for overlap.\n"
		"\n"
		"Tests if this geometry and the other geometry overlap, that is their\n"
		"intersection has a non-zero area.\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Overlaps().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hThis:  the geometry to compare.\n"
		"\n"
		"hOther:  the other geometry to compare.\n"
		"\n"
		"TRUE if they are overlapping, otherwise FALSE. \n"
		""},
	 { (char *)"Geometry_TransformTo", _wrap_Geometry_TransformTo, METH_VARARGS, (char *)"\n"
		"Geometry_TransformTo(Geometry self, SpatialReference reference) -> OGRErr\n"
		"\n"
		"OGRErr\n"
		"OGR_G_TransformTo(OGRGeometryH hGeom, OGRSpatialReferenceH hSRS)\n"
		"\n"
		"Transform geometry to new spatial reference system.\n"
		"\n"
		"This function will transform the coordinates of a geometry from their\n"
		"current spatial reference system to a new target spatial reference\n"
		"system. Normally this means reprojecting the vectors, but it could\n"
		"include datum shifts, and changes of units.\n"
		"\n"
		"This function will only work if the geometry already has an assigned\n"
		"spatial reference system, and if it is transformable to the target\n"
		"coordinate system.\n"
		"\n"
		"Because this function requires internal creation and initialization of\n"
		"an OGRCoordinateTransformation object it is significantly more\n"
		"expensive to use this function to transform many geometries than it is\n"
		"to create the OGRCoordinateTransformation in advance, and call\n"
		"transform() with that transformation. This function exists primarily\n"
		"for convenience when only transforming a single geometry.\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::transformTo.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to apply the transform to.\n"
		"\n"
		"hSRS:  handle on the spatial reference system to apply.\n"
		"\n"
		"OGRERR_NONE on success, or an error code. \n"
		""},
	 { (char *)"Geometry_Transform", _wrap_Geometry_Transform, METH_VARARGS, (char *)"\n"
		"Geometry_Transform(Geometry self, CoordinateTransformation trans) -> OGRErr\n"
		"\n"
		"OGRErr OGR_G_Transform(OGRGeometryH\n"
		"hGeom, OGRCoordinateTransformationH hTransform)\n"
		"\n"
		"Apply arbitrary coordinate transformation to geometry.\n"
		"\n"
		"This function will transform the coordinates of a geometry from their\n"
		"current spatial reference system to a new target spatial reference\n"
		"system. Normally this means reprojecting the vectors, but it could\n"
		"include datum shifts, and changes of units.\n"
		"\n"
		"Note that this function does not require that the geometry already\n"
		"have a spatial reference system. It will be assumed that they can be\n"
		"treated as having the source spatial reference system of the\n"
		"OGRCoordinateTransformation object, and the actual SRS of the geometry\n"
		"will be ignored. On successful completion the output\n"
		"OGRSpatialReference of the OGRCoordinateTransformation will be\n"
		"assigned to the geometry.\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::transform.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to apply the transform to.\n"
		"\n"
		"hTransform:  handle on the transformation to apply.\n"
		"\n"
		"OGRERR_NONE on success or an error code. \n"
		""},
	 { (char *)"Geometry_GetSpatialReference", _wrap_Geometry_GetSpatialReference, METH_VARARGS, (char *)"\n"
		"Geometry_GetSpatialReference(Geometry self) -> SpatialReference\n"
		"\n"
		"OGRSpatialReferenceH\n"
		"OGR_G_GetSpatialReference(OGRGeometryH hGeom)\n"
		"\n"
		"Returns spatial reference system for geometry.\n"
		"\n"
		"This function relates to the SFCOM IGeometry::get_SpatialReference()\n"
		"method.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::getSpatialReference().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to get spatial reference from.\n"
		"\n"
		"a reference to the spatial reference geometry. \n"
		""},
	 { (char *)"Geometry_AssignSpatialReference", _wrap_Geometry_AssignSpatialReference, METH_VARARGS, (char *)"\n"
		"Geometry_AssignSpatialReference(Geometry self, SpatialReference reference)\n"
		"\n"
		"void\n"
		"OGR_G_AssignSpatialReference(OGRGeometryH hGeom, OGRSpatialReferenceH\n"
		"hSRS)\n"
		"\n"
		"Assign spatial reference to this object.\n"
		"\n"
		"Any existing spatial reference is replaced, but under no circumstances\n"
		"does this result in the object being reprojected. It is just changing\n"
		"the interpretation of the existing geometry. Note that assigning a\n"
		"spatial reference increments the reference count on the\n"
		"OGRSpatialReference, but does not copy it.\n"
		"\n"
		"This is similar to the SFCOM IGeometry::put_SpatialReference() method.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::assignSpatialReference.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to apply the new spatial reference\n"
		"system.\n"
		"\n"
		"hSRS:  handle on the new spatial reference system to apply. \n"
		""},
	 { (char *)"Geometry_CloseRings", _wrap_Geometry_CloseRings, METH_VARARGS, (char *)"\n"
		"Geometry_CloseRings(Geometry self)\n"
		"\n"
		"void OGR_G_CloseRings(OGRGeometryH\n"
		"hGeom)\n"
		"\n"
		"Force rings to be closed.\n"
		"\n"
		"If this geometry, or any contained geometries has polygon rings that\n"
		"are not closed, they will be closed by adding the starting point at\n"
		"the end.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle to the geometry. \n"
		""},
	 { (char *)"Geometry_FlattenTo2D", _wrap_Geometry_FlattenTo2D, METH_VARARGS, (char *)"\n"
		"Geometry_FlattenTo2D(Geometry self)\n"
		"\n"
		"void\n"
		"OGR_G_FlattenTo2D(OGRGeometryH hGeom)\n"
		"\n"
		"Convert geometry to strictly 2D. In a sense this converts all Z\n"
		"coordinates to 0.0.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::flattenTo2D().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to convert. \n"
		""},
	 { (char *)"Geometry_Segmentize", _wrap_Geometry_Segmentize, METH_VARARGS, (char *)"\n"
		"Geometry_Segmentize(Geometry self, double dfMaxLength)\n"
		"\n"
		"void OGR_G_Segmentize(OGRGeometryH\n"
		"hGeom, double dfMaxLength)\n"
		"\n"
		"Modify the geometry such it has no segment longer then the given\n"
		"distance.\n"
		"\n"
		"Interpolated points will have Z and M values (if needed) set to 0.\n"
		"Distance computation is performed in 2d only\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::segmentize().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to segmentize\n"
		"\n"
		"dfMaxLength:  the maximum distance between 2 points after\n"
		"segmentization \n"
		""},
	 { (char *)"Geometry_GetEnvelope", _wrap_Geometry_GetEnvelope, METH_VARARGS, (char *)"\n"
		"Geometry_GetEnvelope(Geometry self)\n"
		"\n"
		"void\n"
		"OGR_G_GetEnvelope(OGRGeometryH hGeom, OGREnvelope *psEnvelope)\n"
		"\n"
		"Computes and returns the bounding envelope for this geometry in the\n"
		"passed psEnvelope structure.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::getEnvelope().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle of the geometry to get envelope from.\n"
		"\n"
		"psEnvelope:  the structure in which to place the results. \n"
		""},
	 { (char *)"Geometry_GetEnvelope3D", _wrap_Geometry_GetEnvelope3D, METH_VARARGS, (char *)"\n"
		"Geometry_GetEnvelope3D(Geometry self)\n"
		"\n"
		"void\n"
		"OGR_G_GetEnvelope3D(OGRGeometryH hGeom, OGREnvelope3D *psEnvelope)\n"
		"\n"
		"Computes and returns the bounding envelope (3D) for this geometry in\n"
		"the passed psEnvelope structure.\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::getEnvelope().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle of the geometry to get envelope from.\n"
		"\n"
		"psEnvelope:  the structure in which to place the results.\n"
		"\n"
		"OGR 1.9.0 \n"
		""},
	 { (char *)"Geometry_Centroid", _wrap_Geometry_Centroid, METH_VARARGS, (char *)"\n"
		"Geometry_Centroid(Geometry self) -> Geometry\n"
		"\n"
		"int OGR_G_Centroid(OGRGeometryH\n"
		"hGeom, OGRGeometryH hCentroidPoint)\n"
		"\n"
		"Compute the geometry centroid.\n"
		"\n"
		"The centroid location is applied to the passed in OGRPoint object. The\n"
		"centroid is not necessarily within the geometry.\n"
		"\n"
		"This method relates to the SFCOM ISurface::get_Centroid() method\n"
		"however the current implementation based on GEOS can operate on other\n"
		"geometry types such as multipoint, linestring, geometrycollection such\n"
		"as multipolygons. OGC SF SQL 1.1 defines the operation for surfaces\n"
		"(polygons). SQL/MM-Part 3 defines the operation for surfaces and\n"
		"multisurfaces (multipolygons).\n"
		"\n"
		"This function is the same as the C++ method OGRGeometry::Centroid().\n"
		"\n"
		"This function is built on the GEOS library, check it for the\n"
		"definition of the geometry operation. If OGR is built without the GEOS\n"
		"library, this function will always fail, issuing a CPLE_NotSupported\n"
		"error.\n"
		"\n"
		"OGRERR_NONE on success or OGRERR_FAILURE on error. \n"
		""},
	 { (char *)"Geometry_WkbSize", _wrap_Geometry_WkbSize, METH_VARARGS, (char *)"\n"
		"Geometry_WkbSize(Geometry self) -> int\n"
		"\n"
		"int OGR_G_WkbSize(OGRGeometryH hGeom)\n"
		"\n"
		"Returns size of related binary representation.\n"
		"\n"
		"This function returns the exact number of bytes required to hold the\n"
		"well known binary representation of this geometry object. Its\n"
		"computation may be slightly expensive for complex geometries.\n"
		"\n"
		"This function relates to the SFCOM IWks::WkbSize() method.\n"
		"\n"
		"This function is the same as the CPP method OGRGeometry::WkbSize().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to get the binary size from.\n"
		"\n"
		"size of binary representation in bytes. \n"
		""},
	 { (char *)"Geometry_GetCoordinateDimension", _wrap_Geometry_GetCoordinateDimension, METH_VARARGS, (char *)"\n"
		"Geometry_GetCoordinateDimension(Geometry self) -> int\n"
		"\n"
		"int\n"
		"OGR_G_GetCoordinateDimension(OGRGeometryH hGeom)\n"
		"\n"
		"Get the dimension of the coordinates in this geometry.\n"
		"\n"
		"This function corresponds to the SFCOM IGeometry::GetDimension()\n"
		"method.\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"
		"in practice this will return 2 or 3. It can also return 0 in the case\n"
		"of an empty point. \n"
		""},
	 { (char *)"Geometry_SetCoordinateDimension", _wrap_Geometry_SetCoordinateDimension, METH_VARARGS, (char *)"\n"
		"Geometry_SetCoordinateDimension(Geometry self, int dimension)\n"
		"\n"
		"void\n"
		"OGR_G_SetCoordinateDimension(OGRGeometryH hGeom, int nNewDimension)\n"
		"\n"
		"Set the coordinate dimension.\n"
		"\n"
		"This method sets the explicit coordinate dimension. Setting the\n"
		"coordinate dimension of a geometry to 2 should zero out any existing Z\n"
		"values. Setting the dimension of a geometry collection will not\n"
		"necessarily affect the children geometries.\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to set the dimension of the\n"
		"coordinates.\n"
		"\n"
		"nNewDimension:  New coordinate dimension value, either 2 or 3. \n"
		""},
	 { (char *)"Geometry_GetDimension", _wrap_Geometry_GetDimension, METH_VARARGS, (char *)"\n"
		"Geometry_GetDimension(Geometry self) -> int\n"
		"\n"
		"int\n"
		"OGR_G_GetDimension(OGRGeometryH hGeom)\n"
		"\n"
		"Get the dimension of this geometry.\n"
		"\n"
		"This function corresponds to the SFCOM IGeometry::GetDimension()\n"
		"method. It indicates the dimension of the geometry, but does not\n"
		"indicate the dimension of the underlying space (as indicated by\n"
		"OGR_G_GetCoordinateDimension() function).\n"
		"\n"
		"This function is the same as the CPP method\n"
		"OGRGeometry::getDimension().\n"
		"\n"
		"Parameters:\n"
		"-----------\n"
		"\n"
		"hGeom:  handle on the geometry to get the dimension from.\n"
		"\n"
		"0 for points, 1 for lines and 2 for surfaces. \n"
		""},
	 { (char *)"Geometry_swigregister", Geometry_swigregister, METH_VARARGS, NULL},
	 { (char *)"GetDriverCount", _wrap_GetDriverCount, METH_VARARGS, (char *)"GetDriverCount() -> int"},
	 { (char *)"GetOpenDSCount", _wrap_GetOpenDSCount, METH_VARARGS, (char *)"GetOpenDSCount() -> int"},
	 { (char *)"SetGenerate_DB2_V72_BYTE_ORDER", _wrap_SetGenerate_DB2_V72_BYTE_ORDER, METH_VARARGS, (char *)"SetGenerate_DB2_V72_BYTE_ORDER(int bGenerate_DB2_V72_BYTE_ORDER) -> OGRErr"},
	 { (char *)"RegisterAll", _wrap_RegisterAll, METH_VARARGS, (char *)"RegisterAll()"},
	 { (char *)"GeometryTypeToName", _wrap_GeometryTypeToName, METH_VARARGS, (char *)"GeometryTypeToName(OGRwkbGeometryType eType) -> char"},
	 { (char *)"GetFieldTypeName", _wrap_GetFieldTypeName, METH_VARARGS, (char *)"GetFieldTypeName(OGRFieldType type) -> char"},
	 { (char *)"GetOpenDS", _wrap_GetOpenDS, METH_VARARGS, (char *)"GetOpenDS(int ds_number) -> DataSource"},
	 { (char *)"Open", (PyCFunction) _wrap_Open, METH_VARARGS | METH_KEYWORDS, (char *)"Open(char utf8_path, int update = 0) -> DataSource"},
	 { (char *)"OpenShared", (PyCFunction) _wrap_OpenShared, METH_VARARGS | METH_KEYWORDS, (char *)"OpenShared(char utf8_path, int update = 0) -> DataSource"},
	 { (char *)"GetDriverByName", _wrap_GetDriverByName, METH_VARARGS, (char *)"GetDriverByName(char name) -> Driver"},
	 { (char *)"GetDriver", _wrap_GetDriver, METH_VARARGS, (char *)"GetDriver(int driver_number) -> Driver"},
	 { (char *)"GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, (char *)"GeneralCmdLineProcessor(char papszArgv, int nOptions = 0) -> char"},
	 { NULL, NULL, 0, NULL }
};


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

static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRDataSourceShadow = {"_p_OGRDataSourceShadow", "OGRDataSourceShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRDriverShadow = {"_p_OGRDriverShadow", "OGRDriverShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRFeatureDefnShadow = {"_p_OGRFeatureDefnShadow", "OGRFeatureDefnShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRFieldDefnShadow = {"_p_OGRFieldDefnShadow", "OGRFieldDefnShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_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_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_int = {"_p_int", "OGRFieldType *|int *|OGRwkbGeometryType *|OGRJustification *|OGRwkbByteOrder *|OGRErr *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_GIntBig,
  &_swigt__p_OGRDataSourceShadow,
  &_swigt__p_OGRDriverShadow,
  &_swigt__p_OGRFeatureDefnShadow,
  &_swigt__p_OGRFeatureShadow,
  &_swigt__p_OGRFieldDefnShadow,
  &_swigt__p_OGRGeometryShadow,
  &_swigt__p_OGRLayerShadow,
  &_swigt__p_OSRCoordinateTransformationShadow,
  &_swigt__p_OSRSpatialReferenceShadow,
  &_swigt__p_char,
  &_swigt__p_double,
  &_swigt__p_int,
  &_swigt__p_p_char,
  &_swigt__p_p_double,
  &_swigt__p_p_int,
};

static swig_cast_info _swigc__p_GIntBig[] = {  {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRDataSourceShadow[] = {  {&_swigt__p_OGRDataSourceShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRDriverShadow[] = {  {&_swigt__p_OGRDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRFeatureDefnShadow[] = {  {&_swigt__p_OGRFeatureDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRFeatureShadow[] = {  {&_swigt__p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRFieldDefnShadow[] = {  {&_swigt__p_OGRFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_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_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_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_double[] = {  {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_int[] = {  {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_GIntBig,
  _swigc__p_OGRDataSourceShadow,
  _swigc__p_OGRDriverShadow,
  _swigc__p_OGRFeatureDefnShadow,
  _swigc__p_OGRFeatureShadow,
  _swigc__p_OGRFieldDefnShadow,
  _swigc__p_OGRGeometryShadow,
  _swigc__p_OGRLayerShadow,
  _swigc__p_OSRCoordinateTransformationShadow,
  _swigc__p_OSRSpatialReferenceShadow,
  _swigc__p_char,
  _swigc__p_double,
  _swigc__p_int,
  _swigc__p_p_char,
  _swigc__p_p_double,
  _swigc__p_p_int,
};


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

static swig_const_info swig_const_table[] = {
{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 staticly 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 found, init;
  
  clientdata = clientdata;
  
  /* 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);
    module_head = &swig_module;
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    found=0;
    iter=module_head;
    do {
      if (iter==&swig_module) {
        found=1;
        break;
      }
      iter=iter->next;
    } while (iter!= module_head);
    
    /* if the is found in the list, then all is done and we may leave */
    if (found) return;
    /* otherwise we must add out module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }
  
  /* When multiple interpeters are used, a module could have already been initialized in
       a different interpreter, but not yet have a pointer in this interpreter.
       In this case, we do not want to continue adding types... everything should be
       set up already */
  if (init == 0) return;
  
  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *ret;
    swig_cast_info *cast;
    
#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
#endif
    
    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found type %s\n", type->name);
#endif
      if (swig_module.type_initial[i]->clientdata) {
        type->clientdata = swig_module.type_initial[i]->clientdata;
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
#endif
      }
    } else {
      type = swig_module.type_initial[i];
    }
    
    /* Insert casting types */
    cast = swig_module.cast_initial[i];
    while (cast->type) {
      /* Don't need to add information already in the list */
      ret = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
#ifdef SWIGRUNTIME_DEBUG
        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
#endif
      }
      if (ret) {
        if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
#endif
          cast->type = ret;
          ret = 0;
        } else {
          /* Check for casting already in the list */
          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
#ifdef SWIGRUNTIME_DEBUG
          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
#endif
          if (!ocast) ret = 0;
        }
      }
      
      if (!ret) {
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        if (type->cast) {
          type->cast->prev = cast;
          cast->next = type->cast;
        }
        type->cast = cast;
      }
      cast++;
    }
    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
  swig_module.types[i] = 0;
  
#ifdef SWIGRUNTIME_DEBUG
  printf("**** SWIG_InitializeModule: Cast List ******\n");
  for (i = 0; i < swig_module.size; ++i) {
    int j = 0;
    swig_cast_info *cast = swig_module.cast_initial[i];
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
    while (cast->type) {
      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
      cast++;
      ++j;
    }
    printf("---- Total casts: %d\n",j);
  }
  printf("**** SWIG_InitializeModule: Cast List ******\n");
#endif
}

/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
* of equivalent types.  It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
SWIGRUNTIME void
SWIG_PropagateClientData(void) {
  size_t i;
  swig_cast_info *equiv;
  static int init_run = 0;
  
  if (init_run) return;
  init_run = 1;
  
  for (i = 0; i < swig_module.size; i++) {
    if (swig_module.types[i]->clientdata) {
      equiv = swig_module.types[i]->cast;
      while (equiv) {
        if (!equiv->converter) {
          if (equiv->type && !equiv->type->clientdata)
          SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
        }
        equiv = equiv->next;
      }
    }
  }
}

#ifdef __cplusplus
#if 0
{
  /* c-mode */
#endif
}
#endif



#ifdef __cplusplus
extern "C" {
#endif
  
  /* Python-specific SWIG API */
#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
  
  /* -----------------------------------------------------------------------------
   * global variable support code.
   * ----------------------------------------------------------------------------- */
  
  typedef struct swig_globalvar {
    char       *name;                  /* Name of global variable */
    PyObject *(*get_attr)(void);       /* Return the current value */
    int       (*set_attr)(PyObject *); /* Set the value */
    struct swig_globalvar *next;
  } swig_globalvar;
  
  typedef struct swig_varlinkobject {
    PyObject_HEAD
    swig_globalvar *vars;
  } swig_varlinkobject;
  
  SWIGINTERN PyObject *
  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
#if PY_VERSION_HEX >= 0x03000000
    return PyUnicode_InternFromString("<Swig global variables>");
#else
    return PyString_FromString("<Swig global variables>");
#endif
  }
  
  SWIGINTERN PyObject *
  swig_varlink_str(swig_varlinkobject *v) {
#if PY_VERSION_HEX >= 0x03000000
    PyObject *str = PyUnicode_InternFromString("(");
    PyObject *tail;
    PyObject *joined;
    swig_globalvar *var;
    for (var = v->vars; var; var=var->next) {
      tail = PyUnicode_FromString(var->name);
      joined = PyUnicode_Concat(str, tail);
      Py_DecRef(str);
      Py_DecRef(tail);
      str = joined;
      if (var->next) {
        tail = PyUnicode_InternFromString(", ");
        joined = PyUnicode_Concat(str, tail);
        Py_DecRef(str);
        Py_DecRef(tail);
        str = joined;
      }
    }
    tail = PyUnicode_InternFromString(")");
    joined = PyUnicode_Concat(str, tail);
    Py_DecRef(str);
    Py_DecRef(tail);
    str = joined;
#else
    PyObject *str = PyString_FromString("(");
    swig_globalvar *var;
    for (var = v->vars; var; var=var->next) {
      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
      if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
    }
    PyString_ConcatAndDel(&str,PyString_FromString(")"));
#endif
    return str;
  }
  
  SWIGINTERN int
  swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
    char *tmp;
    PyObject *str = swig_varlink_str(v);
    fprintf(fp,"Swig global variables ");
    fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
    SWIG_Python_str_DelForPy3(tmp);
    Py_DECREF(str);
    return 0;
  }
  
  SWIGINTERN void
  swig_varlink_dealloc(swig_varlinkobject *v) {
    swig_globalvar *var = v->vars;
    while (var) {
      swig_globalvar *n = var->next;
      free(var->name);
      free(var);
      var = n;
    }
  }
  
  SWIGINTERN PyObject *
  swig_varlink_getattr(swig_varlinkobject *v, char *n) {
    PyObject *res = NULL;
    swig_globalvar *var = v->vars;
    while (var) {
      if (strcmp(var->name,n) == 0) {
        res = (*var->get_attr)();
        break;
      }
      var = var->next;
    }
    if (res == NULL && !PyErr_Occurred()) {
      PyErr_SetString(PyExc_NameError,"Unknown C global variable");
    }
    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_SetString(PyExc_NameError,"Unknown C global variable");
    }
    return res;
  }
  
  SWIGINTERN PyTypeObject*
  swig_varlink_type(void) {
    static char varlink__doc__[] = "Swig var link object";
    static PyTypeObject varlink_type;
    static int type_init = 0;  
    if (!type_init) {
      const PyTypeObject tmp
      = {
        /* PyObject header changed in Python 3 */
#if PY_VERSION_HEX >= 0x03000000
        PyVarObject_HEAD_INIT(&PyType_Type, 0)
#else
        PyObject_HEAD_INIT(NULL)
        0,                                  /* Number of items in variable part (ob_size) */
#endif
        (char *)"swigvarlink",              /* Type name (tp_name) */
        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
        0,                                  /* Itemsize (tp_itemsize) */
        (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */ 
        (printfunc) swig_varlink_print,     /* Print (tp_print) */
        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
        (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
        0,                                  /* tp_compare */
        (reprfunc) swig_varlink_repr,       /* tp_repr */
        0,                                  /* tp_as_number */
        0,                                  /* tp_as_sequence */
        0,                                  /* tp_as_mapping */
        0,                                  /* tp_hash */
        0,                                  /* tp_call */
        (reprfunc) swig_varlink_str,        /* tp_str */
        0,                                  /* tp_getattro */
        0,                                  /* tp_setattro */
        0,                                  /* tp_as_buffer */
        0,                                  /* tp_flags */
        varlink__doc__,                     /* tp_doc */
        0,                                  /* tp_traverse */
        0,                                  /* tp_clear */
        0,                                  /* tp_richcompare */
        0,                                  /* tp_weaklistoffset */
#if PY_VERSION_HEX >= 0x02020000
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
#endif
#if PY_VERSION_HEX >= 0x02030000
        0,                                  /* tp_del */
#endif
#ifdef COUNT_ALLOCS
        0,0,0,0                             /* tp_alloc -> tp_next */
#endif
      };
      varlink_type = tmp;
      /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
#if PY_VERSION_HEX < 0x03000000
      varlink_type.ob_type = &PyType_Type;
#endif
      type_init = 1;
    }
    return &varlink_type;
  }
  
  /* Create a variable linking object for use later */
  SWIGINTERN PyObject *
  SWIG_Python_newvarlink(void) {
    swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
    if (result) {
      result->vars = 0;
    }
    return ((PyObject*) result);
  }
  
  SWIGINTERN void 
  SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
    swig_varlinkobject *v = (swig_varlinkobject *) p;
    swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
    if (gv) {
      size_t size = strlen(name)+1;
      gv->name = (char *)malloc(size);
      if (gv->name) {
        strncpy(gv->name,name,size);
        gv->get_attr = get_attr;
        gv->set_attr = set_attr;
        gv->next = v->vars;
      }
    }
    v->vars = gv;
  }
  
  SWIGINTERN PyObject *
  SWIG_globals(void) {
    static PyObject *_SWIG_globals = 0; 
    if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();  
    return _SWIG_globals;
  }
  
  /* -----------------------------------------------------------------------------
   * constants/methods manipulation
   * ----------------------------------------------------------------------------- */
  
  /* Install Constants */
  SWIGINTERN void
  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
    PyObject *obj = 0;
    size_t i;
    for (i = 0; constants[i].type; ++i) {
      switch(constants[i].type) {
      case SWIG_PY_POINTER:
        obj = SWIG_NewPointerObj(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 && (c = strstr(c, "swig_ptr: "))) {
        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) {
          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;
            void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
            if (ptr) {
              strncpy(buff, methods[i].ml_doc, ldoc);
              buff += ldoc;
              strncpy(buff, "swig_ptr: ", 10);
              buff += 10;
              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
              methods[i].ml_doc = ndoc;
            }
          }
        }
      }
    }
  } 
  
#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------*
 *  Partial Init method
 * -----------------------------------------------------------------------------*/

#ifdef __cplusplus
extern "C"
#endif

SWIGEXPORT 
#if PY_VERSION_HEX >= 0x03000000
PyObject*
#else
void
#endif
SWIG_init(void) {
  PyObject *m, *d;  
#if PY_VERSION_HEX >= 0x03000000
  static struct PyModuleDef SWIG_module = {
    PyModuleDef_HEAD_INIT,
    (char *) SWIG_name,
    NULL,
    -1,
    SwigMethods,
    NULL,
    NULL,
    NULL,
    NULL
  };
#endif
  
  /* Fix SwigMethods to carry the callback ptrs when needed */
  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
  
#if PY_VERSION_HEX >= 0x03000000
  m = PyModule_Create(&SWIG_module);
#else
  m = Py_InitModule((char *) SWIG_name, SwigMethods);
#endif
  d = PyModule_GetDict(m);
  
  SWIG_InitializeModule(0);
  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, "wkbNone",SWIG_From_int(static_cast< int >(100)));
  SWIG_Python_SetConstant(d, "wkbLinearRing",SWIG_From_int(static_cast< int >(101)));
  SWIG_Python_SetConstant(d, "wkbPoint25D",SWIG_From_int(static_cast< int >(wkbPoint+wkb25DBit)));
  SWIG_Python_SetConstant(d, "wkbLineString25D",SWIG_From_int(static_cast< int >(wkbLineString+wkb25DBit)));
  SWIG_Python_SetConstant(d, "wkbPolygon25D",SWIG_From_int(static_cast< int >(wkbPolygon+wkb25DBit)));
  SWIG_Python_SetConstant(d, "wkbMultiPoint25D",SWIG_From_int(static_cast< int >(wkbMultiPoint+wkb25DBit)));
  SWIG_Python_SetConstant(d, "wkbMultiLineString25D",SWIG_From_int(static_cast< int >(wkbMultiLineString+wkb25DBit)));
  SWIG_Python_SetConstant(d, "wkbMultiPolygon25D",SWIG_From_int(static_cast< int >(wkbMultiPolygon+wkb25DBit)));
  SWIG_Python_SetConstant(d, "wkbGeometryCollection25D",SWIG_From_int(static_cast< int >(wkbGeometryCollection+wkb25DBit)));
  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, "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, "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_ALL_FLAG",SWIG_From_int(static_cast< int >(1+2+4)));
  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, "ODsCCreateLayer",SWIG_FromCharPtr("CreateLayer"));
  SWIG_Python_SetConstant(d, "ODsCDeleteLayer",SWIG_FromCharPtr("DeleteLayer"));
  SWIG_Python_SetConstant(d, "ODrCCreateDataSource",SWIG_FromCharPtr("CreateDataSource"));
  SWIG_Python_SetConstant(d, "ODrCDeleteDataSource",SWIG_FromCharPtr("DeleteDataSource"));
  
  
  if ( OGRGetDriverCount() == 0 ) {
    OGRRegisterAll();
  }
  
  
#if PY_VERSION_HEX >= 0x03000000
  return m;
#else
  return;
#endif
}

