/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (https://www.swig.org).
 * Version 4.2.0
 *
 * Do not make changes to this file unless you know what you are doing - modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */


#define SWIG_VERSION 0x040200
#define SWIGPYTHON
#define SED_HACKS
#define SWIG_PYTHON_THREADS
#define SWIG_PYTHON_DIRECTOR_NO_VTABLE

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#if __cplusplus >=201103L
# define SWIG_NULLPTR nullptr
#else
# define SWIG_NULLPTR NULL
#endif 


/* C99 and C++11 should provide snprintf, but define SWIG_NO_SNPRINTF
 * if you're missing it.
 */
#if ((defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L) || \
     (defined __cplusplus && __cplusplus >= 201103L) || \
     defined SWIG_HAVE_SNPRINTF) && \
    !defined SWIG_NO_SNPRINTF
# define SWIG_snprintf(O,S,F,A) snprintf(O,S,F,A)
# define SWIG_snprintf2(O,S,F,A,B) snprintf(O,S,F,A,B)
#else
/* Fallback versions ignore the buffer size, but most of our uses either have a
 * fixed maximum possible size or dynamically allocate a buffer that's large
 * enough.
 */
# define SWIG_snprintf(O,S,F,A) sprintf(O,F,A)
# define SWIG_snprintf2(O,S,F,A,B) sprintf(O,F,A,B)
#endif



#if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
/* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
# include <math.h>
#endif

#if !defined(PY_SSIZE_T_CLEAN) && !defined(SWIG_NO_PY_SSIZE_T_CLEAN)
#define PY_SSIZE_T_CLEAN
#endif

#if __GNUC__ >= 7
#pragma GCC diagnostic push
#if defined(__cplusplus) && __cplusplus >=201703L
#pragma GCC diagnostic ignored "-Wregister" /* For python-2.7 headers that use register */
#endif
#endif

#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
/* Use debug wrappers with the Python release dll */

#if defined(_MSC_VER) && _MSC_VER >= 1929
/* Workaround compilation errors when redefining _DEBUG in MSVC 2019 version 16.10 and later
 * See https://github.com/swig/swig/issues/2090 */
# include <corecrt.h>
#endif

# undef _DEBUG
# include <Python.h>
# define _DEBUG 1
#else
# include <Python.h>
#endif

#if __GNUC__ >= 7
#pragma GCC diagnostic pop
#endif

#include <stdio.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
#define SWIG_POINTER_NO_NULL       0x4
#define SWIG_POINTER_CLEAR         0x8
#define SWIG_POINTER_RELEASE       (SWIG_POINTER_CLEAR | SWIG_POINTER_DISOWN)

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


/*
   Flags/methods for returning states.

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

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

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

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

   Now you can be more explicit:

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

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

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

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

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

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

   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
   allows returning 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)
/* Runtime errors are < 0 */
#define SWIG_ERROR                 (-1)
/* Errors in range -1 to -99 are in swigerrors.swg (errors for all languages including those not using the runtime) */
/* Errors in range -100 to -199 are language specific errors defined in *errors.swg */
/* Errors < -200 are generic runtime specific errors */
#define SWIG_ERROR_RELEASE_NOT_OWNED (-200)

#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 temporary 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 object mask methods */
#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))

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


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

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

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

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

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

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

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

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

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

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

/*
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(const 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.  Choose the last
     name. It should be the most specific; a fully resolved name
     but not necessarily with default template parameters expanded. */
  if (!type) return NULL;
  if (type->str != NULL) {
    const char *last_name = type->str;
    const char *s;
    for (s = type->str; *s; s++)
      if (*s == '|') last_name = s+1;
    return last_name;
  }
  else
    return type->name;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

#ifdef __cplusplus
}
#endif

/* SWIG Errors applicable to all language modules, values are reserved from -1 to -99 */
#define  SWIG_UnknownError    	   -1
#define  SWIG_IOError        	   -2
#define  SWIG_RuntimeError   	   -3
#define  SWIG_IndexError     	   -4
#define  SWIG_TypeError      	   -5
#define  SWIG_DivisionByZero 	   -6
#define  SWIG_OverflowError  	   -7
#define  SWIG_SyntaxError    	   -8
#define  SWIG_ValueError     	   -9
#define  SWIG_SystemError    	   -10
#define  SWIG_AttributeError 	   -11
#define  SWIG_MemoryError    	   -12
#define  SWIG_NullReferenceError   -13


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

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

#endif

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

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

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


/* Wrapper around PyUnicode_AsUTF8AndSize - call Py_XDECREF on the returned pbytes when finished with the returned string */
SWIGINTERN const char *
SWIG_PyUnicode_AsUTF8AndSize(PyObject *str, Py_ssize_t *psize, PyObject **pbytes)
{
#if PY_VERSION_HEX >= 0x03030000
# if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030A0000
  *pbytes = NULL;
  return PyUnicode_AsUTF8AndSize(str, psize);
# else
   *pbytes = PyUnicode_AsUTF8String(str);
   const char *chars = *pbytes ? PyBytes_AsString(*pbytes) : NULL;
   if (chars && psize)
     *psize = PyBytes_Size(*pbytes);
  return chars;
# endif
#else
  char *chars = NULL;
  *pbytes = NULL;
  PyString_AsStringAndSize(str, &chars, psize);
  return chars;
#endif
}

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

#ifndef PyObject_DEL
# define PyObject_DEL PyObject_Del
#endif

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

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

#ifdef Py_LIMITED_API
# define PyTuple_GET_ITEM PyTuple_GetItem
/* Note that PyTuple_SetItem() has different semantics from PyTuple_SET_ITEM as it decref's the original tuple item, so in general they cannot be used
  interchangeably. However in SWIG-generated code PyTuple_SET_ITEM is only used with newly initialized tuples without any items and for them this does work. */
# define PyTuple_SET_ITEM PyTuple_SetItem
# define PyTuple_GET_SIZE PyTuple_Size
# define PyCFunction_GET_FLAGS PyCFunction_GetFlags
# define PyCFunction_GET_FUNCTION PyCFunction_GetFunction
# define PyCFunction_GET_SELF PyCFunction_GetSelf
# define PyList_GET_ITEM PyList_GetItem
# define PyList_SET_ITEM PyList_SetItem
# define PySliceObject PyObject
#endif

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

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


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

  if (PyErr_Occurred())
    PyErr_Fetch(&type, &value, &traceback);
  if (value) {
    PyObject *old_str = PyObject_Str(value);
    PyObject *bytes = NULL;
    const char *tmp = SWIG_PyUnicode_AsUTF8AndSize(old_str, NULL, &bytes);
    PyErr_Clear();
    Py_XINCREF(type);
    if (tmp)
      PyErr_Format(type, "%s %s", tmp, mesg);
    else
      PyErr_Format(type, "%s", mesg);
    Py_XDECREF(bytes);
    Py_DECREF(old_str);
    Py_DECREF(value);
  } else {
    PyErr_SetString(PyExc_RuntimeError, mesg);
  }
}

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

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

#if defined(SWIG_PYTHON_NO_THREADS)
#  if defined(SWIG_PYTHON_THREADS)
#    undef SWIG_PYTHON_THREADS
#  endif
#endif
#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
#  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
#    define SWIG_PYTHON_USE_GIL
#  endif
#  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
#      if PY_VERSION_HEX < 0x03070000
#        define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
#      else
#        define SWIG_PYTHON_INITIALIZE_THREADS
#      endif
#    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) { status = false; PyEval_RestoreThread(save); }}
         SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
         ~SWIG_Python_Thread_Allow() { end(); }
       };
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
#      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
#      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
#    else /* C code */
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
#      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
#      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
#    endif
#  else /* Old thread way, not implemented, user must provide it */
#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
#      define SWIG_PYTHON_INITIALIZE_THREADS
#    endif
#    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
#    endif
#    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
#      define SWIG_PYTHON_THREAD_END_BLOCK
#    endif
#    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
#    endif
#    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
#      define SWIG_PYTHON_THREAD_END_ALLOW
#    endif
#  endif
#else /* No thread support */
#  define SWIG_PYTHON_INITIALIZE_THREADS
#  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
#  define SWIG_PYTHON_THREAD_END_BLOCK
#  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
#  define SWIG_PYTHON_THREAD_END_ALLOW
#endif

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

#ifdef __cplusplus
extern "C" {
#endif

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

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

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

#ifdef __cplusplus
}
#endif


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

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

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

/* Common SWIG API */

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

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

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

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

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

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

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

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


/* Runtime API */

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

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


/* Runtime API implementation */

/* Error manipulation */

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

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

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

/* Set a constant value */

#if defined(SWIGPYTHON_BUILTIN)

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

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

#else

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

#endif

/* Append a value to the result obj */

SWIGINTERN PyObject*
SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
  if (!result) {
    result = obj;
  } else if (result == Py_None) {
    Py_DECREF(result);
    result = obj;
  } else {
    if (!PyList_Check(result)) {
      PyObject *o2 = result;
      result = PyList_New(1);
      if (result) {
        PyList_SET_ITEM(result, 0, o2);
      } else {
        Py_DECREF(obj);
        return o2;
      }
    }
    PyList_Append(result,obj);
    Py_DECREF(obj);
  }
  return result;
}

/* Unpack the argument tuple */

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

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

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

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

#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(PyObject *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(PyObject *o) {
  swig_varlinkobject *v = (swig_varlinkobject *) o;
#if PY_VERSION_HEX >= 0x03000000
  PyObject *str = PyUnicode_InternFromString("(");
  PyObject *tail;
  PyObject *joined;
  swig_globalvar *var;
  for (var = v->vars; var; var=var->next) {
    tail = PyUnicode_FromString(var->name);
    joined = PyUnicode_Concat(str, tail);
    Py_DecRef(str);
    Py_DecRef(tail);
    str = joined;
    if (var->next) {
        tail = PyUnicode_InternFromString(", ");
        joined = PyUnicode_Concat(str, tail);
        Py_DecRef(str);
        Py_DecRef(tail);
        str = joined;
    }
  }
  tail = PyUnicode_InternFromString(")");
  joined = PyUnicode_Concat(str, tail);
  Py_DecRef(str);
  Py_DecRef(tail);
  str = joined;
#else
  PyObject *str = PyString_FromString("(");
  swig_globalvar *var;
  for (var = v->vars; var; var=var->next) {
    PyString_ConcatAndDel(&str,PyString_FromString(var->name));
    if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
  }
  PyString_ConcatAndDel(&str,PyString_FromString(")"));
#endif
  return str;
}

SWIGINTERN void
swig_varlink_dealloc(PyObject *o) {
  swig_varlinkobject *v = (swig_varlinkobject *) o;
  swig_globalvar *var = v->vars;
  while (var) {
    swig_globalvar *n = var->next;
    free(var->name);
    free(var);
    var = n;
  }
}

SWIGINTERN PyObject *
swig_varlink_getattr(PyObject *o, char *n) {
  swig_varlinkobject *v = (swig_varlinkobject *) o;
  PyObject *res = NULL;
  swig_globalvar *var = v->vars;
  while (var) {
    if (strcmp(var->name,n) == 0) {
      res = (*var->get_attr)();
      break;
    }
    var = var->next;
  }
  if (res == NULL && !PyErr_Occurred()) {
    PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
  }
  return res;
}

SWIGINTERN int
swig_varlink_setattr(PyObject *o, char *n, PyObject *p) {
  swig_varlinkobject *v = (swig_varlinkobject *) o;
  int res = 1;
  swig_globalvar *var = v->vars;
  while (var) {
    if (strcmp(var->name,n) == 0) {
      res = (*var->set_attr)(p);
      break;
    }
    var = var->next;
  }
  if (res == 1 && !PyErr_Occurred()) {
    PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
  }
  return res;
}

SWIGINTERN PyTypeObject*
swig_varlink_type(void) {
  static char varlink__doc__[] = "Swig var link object";
#ifndef Py_LIMITED_API
  static PyTypeObject varlink_type;
  static int type_init = 0;
  if (!type_init) {
    const PyTypeObject tmp = {
#if PY_VERSION_HEX >= 0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                  /* ob_size */
#endif
      "swigvarlink",                      /* tp_name */
      sizeof(swig_varlinkobject),         /* tp_basicsize */
      0,                                  /* tp_itemsize */
      (destructor) swig_varlink_dealloc,  /* tp_dealloc */
#if PY_VERSION_HEX < 0x030800b4
      (printfunc)0,                       /*tp_print*/
#else
      (Py_ssize_t)0,                      /*tp_vectorcall_offset*/
#endif
      (getattrfunc) swig_varlink_getattr, /* tp_getattr */
      (setattrfunc) swig_varlink_setattr, /* tp_setattr */
      0,                                  /* tp_compare */
      (reprfunc) swig_varlink_repr,       /* tp_repr */
      0,                                  /* tp_as_number */
      0,                                  /* tp_as_sequence */
      0,                                  /* tp_as_mapping */
      0,                                  /* tp_hash */
      0,                                  /* tp_call */
      (reprfunc) swig_varlink_str,        /* tp_str */
      0,                                  /* tp_getattro */
      0,                                  /* tp_setattro */
      0,                                  /* tp_as_buffer */
      0,                                  /* tp_flags */
      varlink__doc__,                     /* tp_doc */
      0,                                  /* tp_traverse */
      0,                                  /* tp_clear */
      0,                                  /* tp_richcompare */
      0,                                  /* tp_weaklistoffset */
      0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
      0,                                  /* tp_del */
      0,                                  /* tp_version_tag */
#if PY_VERSION_HEX >= 0x03040000
      0,                                  /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
      0,                                  /* tp_vectorcall */
#endif
#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
      0,                                  /* tp_print */
#endif
#if PY_VERSION_HEX >= 0x030C0000
      0,                                  /* tp_watched */
#endif
#ifdef COUNT_ALLOCS
      0,                                  /* tp_allocs */
      0,                                  /* tp_frees */
      0,                                  /* tp_maxalloc */
      0,                                  /* tp_prev */
      0                                   /* tp_next */
#endif
    };
    varlink_type = tmp;
    type_init = 1;
    if (PyType_Ready(&varlink_type) < 0)
      return NULL;
  }
  return &varlink_type;
#else
  PyType_Slot slots[] = {
    { Py_tp_dealloc, (void *)swig_varlink_dealloc },
    { Py_tp_repr, (void *)swig_varlink_repr },
    { Py_tp_getattr, (void *)swig_varlink_getattr },
    { Py_tp_setattr, (void *)swig_varlink_setattr },
    { Py_tp_str, (void *)swig_varlink_str },
    { Py_tp_doc, (void *)varlink__doc__ },
    { 0, NULL }
  };
  PyType_Spec spec = {
    "swigvarlink",
    sizeof(swig_varlinkobject),
    0,
    Py_TPFLAGS_DEFAULT,
    slots
  };
  return (PyTypeObject *)PyType_FromSpec(&spec);
#endif
}

/* Create a variable linking object for use later */
SWIGINTERN PyObject *
SWIG_Python_newvarlink(void) {
  swig_varlinkobject *result = PyObject_New(swig_varlinkobject, swig_varlink_type());
  if (result) {
    result->vars = 0;
  }
  return ((PyObject*) result);
}

SWIGINTERN void 
SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
  swig_varlinkobject *v = (swig_varlinkobject *) p;
  swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
  if (gv) {
    size_t size = strlen(name)+1;
    gv->name = (char *)malloc(size);
    if (gv->name) {
      memcpy(gv->name, name, size);
      gv->get_attr = get_attr;
      gv->set_attr = set_attr;
      gv->next = v->vars;
    }
  }
  v->vars = gv;
}


static PyObject *Swig_Globals_global = NULL;
  
SWIGINTERN PyObject *
SWIG_globals(void) {
  if (Swig_Globals_global == NULL) {
    Swig_Globals_global = SWIG_newvarlink();
  }
  return Swig_Globals_global;
}

#ifdef __cplusplus
}
#endif

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

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

#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)

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

#ifdef __cplusplus
extern "C" {
#endif

/* The python void return value */

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

/* SwigPyClientData */

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

SWIGRUNTIMEINLINE int 
SWIG_Python_CheckImplicit(swig_type_info *ty)
{
  SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
  int fail = data ? data->implicitconv : 0;
  if (fail)
    PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors.");
  return fail;
}

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


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

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

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

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


#ifdef SWIGPYTHON_BUILTIN

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

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

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

#endif

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

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

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

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

SWIGRUNTIME PyObject *
SwigPyObject_repr(SwigPyObject *v)
{
  const char *name = SWIG_TypePrettyName(v->ty);
  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
  if (repr && v->next) {
    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
    if (nrep) {
# 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
    } else {
      Py_DecRef(repr);
      repr = NULL;
    }
  }
  return repr;
}

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

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

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


SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);

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

SWIGRUNTIMEINLINE int
SwigPyObject_Check(PyObject *op) {
  PyTypeObject *target_tp = SwigPyObject_type();
  PyTypeObject *op_type = Py_TYPE(op);
#ifdef SWIGPYTHON_BUILTIN
  if (PyType_IsSubtype(op_type, target_tp))
    return 1;
  return (strcmp(op_type->tp_name, "SwigPyObject") == 0);
#else
  if (op_type == target_tp)
    return 1;
# ifdef Py_LIMITED_API
  int cmp;
  PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__");
  if (!tp_name)
    return 0;
  cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyObject");
  Py_DECREF(tp_name);
  return cmp == 0;
# else
  return (strcmp(op_type->tp_name, "SwigPyObject") == 0);
# endif
#endif
}

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

static PyObject* Swig_Capsule_global = NULL;

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

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

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

      PyErr_Restore(type, value, traceback);

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

SWIGRUNTIME PyObject* 
SwigPyObject_append(PyObject* v, PyObject* next)
{
  SwigPyObject *sobj = (SwigPyObject *) v;
  if (!SwigPyObject_Check(next)) {
    PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
    return NULL;
  }
  ((SwigPyObject *)next)->next = sobj->next;
  sobj->next = next;
  Py_INCREF(next);
  return SWIG_Py_Void();
}

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

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

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

SWIGINTERN PyObject*
SwigPyObject_own(PyObject *v, PyObject *args)
{
  PyObject *val = 0;
  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
    return NULL;
  } else {
    SwigPyObject *sobj = (SwigPyObject *)v;
    PyObject *obj = PyBool_FromLong(sobj->own);
    if (val) {
      if (PyObject_IsTrue(val)) {
        Py_DECREF(SwigPyObject_acquire(v,args));
      } else {
        Py_DECREF(SwigPyObject_disown(v,args));
      }
    } 
    return obj;
  }
}

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

SWIGRUNTIME PyTypeObject*
SwigPyObject_TypeOnce(void) {
  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
#ifndef Py_LIMITED_API
  static PyNumberMethods SwigPyObject_as_number = {
    (binaryfunc)0, /*nb_add*/
    (binaryfunc)0, /*nb_subtract*/
    (binaryfunc)0, /*nb_multiply*/
    /* nb_divide removed in Python 3 */
#if PY_VERSION_HEX < 0x03000000
    (binaryfunc)0, /*nb_divide*/
#endif
    (binaryfunc)0, /*nb_remainder*/
    (binaryfunc)0, /*nb_divmod*/
    (ternaryfunc)0,/*nb_power*/
    (unaryfunc)0,  /*nb_negative*/
    (unaryfunc)0,  /*nb_positive*/
    (unaryfunc)0,  /*nb_absolute*/
    (inquiry)0,    /*nb_nonzero*/
    0,		   /*nb_invert*/
    0,		   /*nb_lshift*/
    0,		   /*nb_rshift*/
    0,		   /*nb_and*/
    0,		   /*nb_xor*/
    0,		   /*nb_or*/
#if PY_VERSION_HEX < 0x03000000
    0,   /*nb_coerce*/
#endif
    (unaryfunc)SwigPyObject_long, /*nb_int*/
#if PY_VERSION_HEX < 0x03000000
    (unaryfunc)SwigPyObject_long, /*nb_long*/
#else
    0, /*nb_reserved*/
#endif
    (unaryfunc)0,                 /*nb_float*/
#if PY_VERSION_HEX < 0x03000000
    (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
    (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
#endif
#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
#else
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
#endif
  };

  static PyTypeObject swigpyobject_type;
  static int type_init = 0;
  if (!type_init) {
    const PyTypeObject tmp = {
#if PY_VERSION_HEX >= 0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                    /* ob_size */
#endif
      "SwigPyObject",                       /* tp_name */
      sizeof(SwigPyObject),                 /* tp_basicsize */
      0,                                    /* tp_itemsize */
      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
#if PY_VERSION_HEX < 0x030800b4
      (printfunc)0,                         /*tp_print*/
#else
      (Py_ssize_t)0,                        /*tp_vectorcall_offset*/
#endif
      (getattrfunc)0,                       /* tp_getattr */
      (setattrfunc)0,                       /* tp_setattr */
#if PY_VERSION_HEX >= 0x03000000
      0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
#else
      (cmpfunc)SwigPyObject_compare,        /* tp_compare */
#endif
      (reprfunc)SwigPyObject_repr,          /* tp_repr */
      &SwigPyObject_as_number,              /* tp_as_number */
      0,                                    /* tp_as_sequence */
      0,                                    /* tp_as_mapping */
      (hashfunc)0,                          /* tp_hash */
      (ternaryfunc)0,                       /* tp_call */
      0,                                    /* tp_str */
      PyObject_GenericGetAttr,              /* tp_getattro */
      0,                                    /* tp_setattro */
      0,                                    /* tp_as_buffer */
      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
      swigobject_doc,                       /* tp_doc */
      0,                                    /* tp_traverse */
      0,                                    /* tp_clear */
      (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
      0,                                    /* tp_weaklistoffset */
      0,                                    /* tp_iter */
      0,                                    /* tp_iternext */
      swigobject_methods,                   /* tp_methods */
      0,                                    /* tp_members */
      0,                                    /* tp_getset */
      0,                                    /* tp_base */
      0,                                    /* tp_dict */
      0,                                    /* tp_descr_get */
      0,                                    /* tp_descr_set */
      0,                                    /* tp_dictoffset */
      0,                                    /* tp_init */
      0,                                    /* tp_alloc */
      0,                                    /* tp_new */
      0,                                    /* tp_free */
      0,                                    /* tp_is_gc */
      0,                                    /* tp_bases */
      0,                                    /* tp_mro */
      0,                                    /* tp_cache */
      0,                                    /* tp_subclasses */
      0,                                    /* tp_weaklist */
      0,                                    /* tp_del */
      0,                                    /* tp_version_tag */
#if PY_VERSION_HEX >= 0x03040000
      0,                                    /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
      0,                                    /* tp_vectorcall */
#endif
#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
      0,                                    /* tp_print */
#endif
#if PY_VERSION_HEX >= 0x030C0000
      0,                                    /* tp_watched */
#endif
#ifdef COUNT_ALLOCS
      0,                                    /* tp_allocs */
      0,                                    /* tp_frees */
      0,                                    /* tp_maxalloc */
      0,                                    /* tp_prev */
      0                                     /* tp_next */
#endif
    };
    swigpyobject_type = tmp;
    type_init = 1;
    if (PyType_Ready(&swigpyobject_type) != 0)
      return NULL;
  }
  return &swigpyobject_type;
#else
  PyType_Slot slots[] = {
    { Py_tp_dealloc, (void *)SwigPyObject_dealloc },
    { Py_tp_repr, (void *)SwigPyObject_repr },
    { Py_tp_getattro, (void *)PyObject_GenericGetAttr },
    { Py_tp_doc, (void *)swigobject_doc },
    { Py_tp_richcompare, (void *)SwigPyObject_richcompare },
    { Py_tp_methods, (void *)swigobject_methods },
    { Py_nb_int, (void *)SwigPyObject_long },
    { 0, NULL }
  };
  PyType_Spec spec = {
    "SwigPyObject",
    sizeof(SwigPyObject),
    0,
    Py_TPFLAGS_DEFAULT,
    slots
  };
  return (PyTypeObject *)PyType_FromSpec(&spec);
#endif
}

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;
#ifdef SWIGPYTHON_BUILTIN
    sobj->dict = 0;
#endif
    if (own == SWIG_POINTER_OWN) {
      /* Obtain a reference to the Python capsule wrapping the module information, so that the
       * module information is correctly destroyed after all SWIG python objects have been freed
       * by the GC (and corresponding destructors invoked) */
      Py_XINCREF(Swig_Capsule_global);
    }
  }
  return (PyObject *)sobj;
}

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

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

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

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

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

SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);

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

SWIGRUNTIMEINLINE int
SwigPyPacked_Check(PyObject *op) {
  PyTypeObject* op_type = Py_TYPE(op);
  if (op_type == SwigPyPacked_TypeOnce())
    return 1;
#ifdef Py_LIMITED_API
  int cmp;
  PyObject *tp_name = PyObject_GetAttrString((PyObject *)op_type, "__name__");
  if (!tp_name)
    return 0;
  cmp = PyUnicode_CompareWithASCIIString(tp_name, "SwigPyPacked");
  Py_DECREF(tp_name);
  return cmp == 0;
#else
  return (strcmp(op_type->tp_name, "SwigPyPacked") == 0);
#endif
}

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

SWIGRUNTIME PyTypeObject*
SwigPyPacked_TypeOnce(void) {
  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
#ifndef Py_LIMITED_API
  static PyTypeObject swigpypacked_type;
  static int type_init = 0;
  if (!type_init) {
    const PyTypeObject tmp = {
#if PY_VERSION_HEX>=0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                    /* ob_size */
#endif
      "SwigPyPacked",                       /* tp_name */
      sizeof(SwigPyPacked),                 /* tp_basicsize */
      0,                                    /* tp_itemsize */
      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
#if PY_VERSION_HEX < 0x030800b4
      (printfunc)0,                         /*tp_print*/
#else
      (Py_ssize_t)0,                        /*tp_vectorcall_offset*/
#endif
      (getattrfunc)0,                       /* tp_getattr */
      (setattrfunc)0,                       /* tp_setattr */
#if PY_VERSION_HEX>=0x03000000
      0, /* tp_reserved in 3.0.1 */
#else
      (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
#endif
      (reprfunc)SwigPyPacked_repr,          /* tp_repr */
      0,                                    /* tp_as_number */
      0,                                    /* tp_as_sequence */
      0,                                    /* tp_as_mapping */
      (hashfunc)0,                          /* tp_hash */
      (ternaryfunc)0,                       /* tp_call */
      (reprfunc)SwigPyPacked_str,           /* tp_str */
      PyObject_GenericGetAttr,              /* tp_getattro */
      0,                                    /* tp_setattro */
      0,                                    /* tp_as_buffer */
      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
      swigpacked_doc,                       /* tp_doc */
      0,                                    /* tp_traverse */
      0,                                    /* tp_clear */
      0,                                    /* tp_richcompare */
      0,                                    /* tp_weaklistoffset */
      0,                                    /* tp_iter */
      0,                                    /* tp_iternext */
      0,                                    /* tp_methods */
      0,                                    /* tp_members */
      0,                                    /* tp_getset */
      0,                                    /* tp_base */
      0,                                    /* tp_dict */
      0,                                    /* tp_descr_get */
      0,                                    /* tp_descr_set */
      0,                                    /* tp_dictoffset */
      0,                                    /* tp_init */
      0,                                    /* tp_alloc */
      0,                                    /* tp_new */
      0,                                    /* tp_free */
      0,                                    /* tp_is_gc */
      0,                                    /* tp_bases */
      0,                                    /* tp_mro */
      0,                                    /* tp_cache */
      0,                                    /* tp_subclasses */
      0,                                    /* tp_weaklist */
      0,                                    /* tp_del */
      0,                                    /* tp_version_tag */
#if PY_VERSION_HEX >= 0x03040000
      0,                                    /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
      0,                                    /* tp_vectorcall */
#endif
#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
      0,                                    /* tp_print */
#endif
#if PY_VERSION_HEX >= 0x030C0000
      0,                                    /* tp_watched */
#endif
#ifdef COUNT_ALLOCS
      0,                                    /* tp_allocs */
      0,                                    /* tp_frees */
      0,                                    /* tp_maxalloc */
      0,                                    /* tp_prev */
      0                                     /* tp_next */
#endif
    };
    swigpypacked_type = tmp;
    type_init = 1;
    if (PyType_Ready(&swigpypacked_type) != 0)
      return NULL;
  }
  return &swigpypacked_type;
#else
  PyType_Slot slots[] = {
    { Py_tp_dealloc, (void *)SwigPyPacked_dealloc },
    { Py_tp_repr, (void *)SwigPyPacked_repr },
    { Py_tp_str, (void *)SwigPyPacked_str },
    { Py_tp_getattro, (void *)PyObject_GenericGetAttr },
    { Py_tp_doc, (void *)swigpacked_doc },
    { 0, NULL }
  };
  PyType_Spec spec = {
    "SwigPyPacked",
    sizeof(SwigPyPacked),
    0,
    Py_TPFLAGS_DEFAULT,
    slots
  };
  return (PyTypeObject *)PyType_FromSpec(&spec);
#endif
}

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

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

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

static PyObject *Swig_This_global = NULL;

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

/* #define SWIG_PYTHON_SLOW_GETSET_THIS */

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

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

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

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

  obj = 0;

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

/* Acquire a pointer value */

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

/* Convert a pointer value */

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

  if (!obj)
    return SWIG_ERROR;
  if (obj == Py_None && !implicit_conv) {
    if (ptr)
      *ptr = 0;
    return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
  }

  res = SWIG_ERROR;

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

/* Convert a function ptr value */

SWIGRUNTIME int
SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
  if (!PyCFunction_Check(obj)) {
    return SWIG_ConvertPtr(obj, ptr, ty, 0);
  } else {
    void *vptr = 0;
    swig_cast_info *tc;

    /* here we get the method pointer for callbacks */
#ifndef Py_LIMITED_API
    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
#else
    PyObject* pystr_doc = PyObject_GetAttrString(obj, "__doc__");
    PyObject *bytes = NULL;
    const char *doc = pystr_doc ? SWIG_PyUnicode_AsUTF8AndSize(pystr_doc, NULL, &bytes) : 0;
#endif
    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
    if (desc)
      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
#ifdef Py_LIMITED_API
    Py_XDECREF(bytes);
    Py_XDECREF(pystr_doc);
#endif
    if (!desc)
      return SWIG_ERROR;
    tc = SWIG_TypeCheck(desc,ty);
    if (tc) {
      int newmemory = 0;
      *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
      assert(!newmemory); /* newmemory handling not yet implemented */
    } else {
      return SWIG_ERROR;
    }
    return SWIG_OK;
  }
}

/* Convert a packed pointer value */

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

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

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

SWIGRUNTIME PyObject* 
SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
{
  PyObject *inst = 0;
  PyObject *newraw = data->newraw;
  if (newraw) {
    inst = PyObject_Call(newraw, data->newargs, NULL);
    if (inst) {
#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
      PyObject **dictptr = _PyObject_GetDictPtr(inst);
      if (dictptr != NULL) {
        PyObject *dict = *dictptr;
        if (dict == NULL) {
          dict = PyDict_New();
          *dictptr = dict;
        }
        if (dict) {
          PyDict_SetItem(dict, SWIG_This(), swig_this);
        } else{
          Py_DECREF(inst);
          inst = 0;
        }
      }
#else
      if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
        Py_DECREF(inst);
        inst = 0;
      }
#endif
    }
  } else {
#if PY_VERSION_HEX >= 0x03000000
    PyObject *empty_args = PyTuple_New(0);
    if (empty_args) {
      PyObject *empty_kwargs = PyDict_New();
      if (empty_kwargs) {
#ifndef Py_LIMITED_API
        newfunc newfn = ((PyTypeObject *)data->newargs)->tp_new;
#else
        newfunc newfn = (newfunc)PyType_GetSlot((PyTypeObject *)data->newargs, Py_tp_new);
#endif
        inst = newfn((PyTypeObject *)data->newargs, empty_args, empty_kwargs);
        Py_DECREF(empty_kwargs);
        if (inst) {
          if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
            Py_DECREF(inst);
            inst = 0;
          } else {
            PyType_Modified(Py_TYPE(inst));
          }
        }
      }
      Py_DECREF(empty_args);
    }
#else
    PyObject *dict = PyDict_New();
    if (dict) {
      PyDict_SetItem(dict, SWIG_This(), swig_this);
      inst = PyInstance_NewRaw(data->newargs, dict);
      Py_DECREF(dict);
    }
#endif
  }
  return inst;
}

SWIGRUNTIME int
SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
{
#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  PyObject **dictptr = _PyObject_GetDictPtr(inst);
  if (dictptr != NULL) {
    PyObject *dict = *dictptr;
    if (dict == NULL) {
      dict = PyDict_New();
      *dictptr = dict;
    }
    if (dict) {
      return PyDict_SetItem(dict, SWIG_This(), swig_this);
    } else{
      return -1;
    }
  }
#endif
  return PyObject_SetAttr(inst, SWIG_This(), swig_this);
} 


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

/* Create a new pointer object */

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

  if (!ptr)
    return SWIG_Py_Void();

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

  assert(!(flags & SWIG_BUILTIN_TP_INIT));

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

/* Create a new packed object */

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

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

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

static PyObject *Swig_TypeCache_global = NULL;

/* The python cached type query */
SWIGRUNTIME PyObject *
SWIG_Python_TypeCache(void) {
  if (Swig_TypeCache_global == NULL) {
    Swig_TypeCache_global = PyDict_New();
  }
  return Swig_TypeCache_global;
}

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


static int interpreter_counter = 0; /* how many (sub-)interpreters are using swig_module's types */

SWIGRUNTIME void
SWIG_Python_DestroyModule(PyObject *obj)
{
  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
  swig_type_info **types = swig_module->types;
  size_t i;
  if (--interpreter_counter != 0) /* another sub-interpreter may still be using the swig_module's types */
    return;
  for (i =0; i < swig_module->size; ++i) {
    swig_type_info *ty = types[i];
    if (ty->owndata) {
      SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
      ty->clientdata = 0;
      if (data) SwigPyClientData_Del(data);
    }
  }
  Py_DECREF(SWIG_This());
  Swig_This_global = NULL;
  Py_DECREF(SWIG_globals());
  Swig_Globals_global = NULL;
  Py_DECREF(SWIG_Python_TypeCache());
  Swig_TypeCache_global = NULL;
  Swig_Capsule_global = NULL;
}

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

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

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

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

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

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


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

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

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

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

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


#ifdef __cplusplus
}
#endif



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

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



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


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

#define SWIGTYPE_p_ArrowArray swig_types[0]
#define SWIGTYPE_p_ArrowArrayStream swig_types[1]
#define SWIGTYPE_p_ArrowSchema swig_types[2]
#define SWIGTYPE_p_GDALDatasetShadow swig_types[3]
#define SWIGTYPE_p_GDALDriverShadow swig_types[4]
#define SWIGTYPE_p_GDALMajorObjectShadow swig_types[5]
#define SWIGTYPE_p_GDALProgressFunc swig_types[6]
#define SWIGTYPE_p_GIntBig swig_types[7]
#define SWIGTYPE_p_OGRCodedValue swig_types[8]
#define SWIGTYPE_p_OGRFeatureDefnShadow swig_types[9]
#define SWIGTYPE_p_OGRFeatureShadow swig_types[10]
#define SWIGTYPE_p_OGRFieldDefnShadow swig_types[11]
#define SWIGTYPE_p_OGRFieldDomainShadow swig_types[12]
#define SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow swig_types[13]
#define SWIGTYPE_p_OGRGeomFieldDefnShadow swig_types[14]
#define SWIGTYPE_p_OGRGeomTransformerShadow swig_types[15]
#define SWIGTYPE_p_OGRGeometryShadow swig_types[16]
#define SWIGTYPE_p_OGRLayerShadow swig_types[17]
#define SWIGTYPE_p_OGRPreparedGeometryShadow swig_types[18]
#define SWIGTYPE_p_OGRStyleTableShadow swig_types[19]
#define SWIGTYPE_p_OSRCoordinateTransformationShadow swig_types[20]
#define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[21]
#define SWIGTYPE_p_bool swig_types[22]
#define SWIGTYPE_p_char swig_types[23]
#define SWIGTYPE_p_double swig_types[24]
#define SWIGTYPE_p_f_double_p_q_const__char_p_void__int swig_types[25]
#define SWIGTYPE_p_float swig_types[26]
#define SWIGTYPE_p_int swig_types[27]
#define SWIGTYPE_p_p_GIntBig swig_types[28]
#define SWIGTYPE_p_p_OGRGeometryTypeCounter swig_types[29]
#define SWIGTYPE_p_p_OGRSpatialReferenceH swig_types[30]
#define SWIGTYPE_p_p_char swig_types[31]
#define SWIGTYPE_p_p_double swig_types[32]
#define SWIGTYPE_p_p_int swig_types[33]
#define SWIGTYPE_p_size_t swig_types[34]
static swig_type_info *swig_types[36];
static swig_module_info swig_module = {swig_types, 35, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)

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

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

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

#else
#  define SWIG_init    init_ogr

#endif
#define SWIG_name    "_ogr"

#ifdef __cplusplus
#include <utility>
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
  struct SwigSmartPointer {
    T *ptr;
    SwigSmartPointer(T *p) : ptr(p) { }
    ~SwigSmartPointer() { delete ptr; }
    SwigSmartPointer& operator=(SwigSmartPointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
    void reset(T *p) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = p; }
  } pointer;
  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
  SwigValueWrapper() : pointer(0) { }
  SwigValueWrapper& operator=(const T& t) { SwigSmartPointer tmp(new T(t)); pointer = tmp; return *this; }
#if __cplusplus >=201103L
  SwigValueWrapper& operator=(T&& t) { SwigSmartPointer tmp(new T(std::move(t))); pointer = tmp; return *this; }
  operator T&&() const { return std::move(*pointer.ptr); }
#else
  operator T&() const { return *pointer.ptr; }
#endif
  T *operator&() const { return pointer.ptr; }
  static void reset(SwigValueWrapper& t, T *p) { t.pointer.reset(p); }
};

/*
 * SwigValueInit() is a generic initialisation solution as the following approach:
 * 
 *       T c_result = T();
 * 
 * doesn't compile for all types for example:
 * 
 *       unsigned int c_result = unsigned int();
 */
template <typename T> T SwigValueInit() {
  return T();
}

#if __cplusplus >=201103L
# define SWIG_STD_MOVE(OBJ) std::move(OBJ)
#else
# define SWIG_STD_MOVE(OBJ) OBJ
#endif

#endif


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


#include <stdexcept>


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

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

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

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


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


typedef void* VoidPtrAsLong;


typedef char retStringAndCPLFree;


#include <iostream>
using namespace std;

#define CPL_SUPRESS_CPLUSPLUS

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

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

typedef void GDALMajorObjectShadow;
typedef void GDALDatasetShadow;

#ifdef DEBUG
typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
typedef struct OGRDriverHS OGRDriverShadow;
typedef struct OGRDataSourceHS OGRDataSourceShadow;
typedef struct OGRLayerHS OGRLayerShadow;
typedef struct OGRFeatureHS OGRFeatureShadow;
typedef struct OGRFeatureDefnHS OGRFeatureDefnShadow;
typedef struct OGRGeometryHS OGRGeometryShadow;
typedef struct OGRCoordinateTransformationHS OSRCoordinateTransformationShadow;
typedef struct OGRFieldDefnHS OGRFieldDefnShadow;
#else
typedef void OSRSpatialReferenceShadow;
typedef void OGRDriverShadow;
typedef void OGRDataSourceShadow;
typedef void OGRLayerShadow;
typedef void OGRFeatureShadow;
typedef void OGRFeatureDefnShadow;
typedef void OGRGeometryShadow;
typedef void OSRCoordinateTransformationShadow;
typedef void OGRFieldDefnShadow;
#endif

typedef struct OGRStyleTableHS OGRStyleTableShadow;
typedef struct OGRGeomFieldDefnHS OGRGeomFieldDefnShadow;
typedef struct OGRGeomTransformer OGRGeomTransformerShadow;
typedef struct _OGRPreparedGeometry OGRPreparedGeometryShadow;
typedef struct OGRFieldDomainHS OGRFieldDomainShadow;
typedef struct OGRGeomCoordinatePrecision OGRGeomCoordinatePrecisionShadow;


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


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


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


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


#define MODULE_NAME           "ogr"


#include "cpl_string.h"
#include "cpl_conv.h"

static int bUseExceptions=0;
static int bUserHasSpecifiedIfUsingExceptions = FALSE;
static thread_local int bUseExceptionsLocal = -1;

struct PythonBindingErrorHandlerContext
{
    std::string     osInitialMsg{};
    std::string     osFailureMsg{};
    CPLErrorNum     nLastCode = CPLE_None;
    bool            bMemoryError = false;
};

static void CPL_STDCALL
PythonBindingErrorHandler(CPLErr eclass, CPLErrorNum err_no, const char *msg )
{
  PythonBindingErrorHandlerContext* ctxt = static_cast<
      PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());

  /*
  ** Generally we want to suppress error reporting if we have exceptions
  ** enabled as the error message will be in the exception thrown in
  ** Python.
  */

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

  /*
  ** We do not want to interfere with non-failure messages since
  ** they won't be translated into exceptions.
  */
  else if (eclass != CE_Failure ) {
    CPLCallPreviousHandler(eclass, err_no, msg );
  }
  else {
    ctxt->nLastCode = err_no;
    try
    {
        if( ctxt->osFailureMsg.empty() ) {
          ctxt->osFailureMsg = msg;
          ctxt->osInitialMsg = ctxt->osFailureMsg;
        } else {
          if( ctxt->osFailureMsg.size() < 10000 ) {
            std::string osTmp(msg);
            osTmp += "\nMay be caused by: ";
            osTmp += ctxt->osFailureMsg;
            ctxt->osFailureMsg = std::move(osTmp);
            ctxt->osInitialMsg = ctxt->osFailureMsg;
          }
          else
          {
            std::string osTmp(msg);
            osTmp += "\n[...]\nMay be caused by: ";
            osTmp += ctxt->osInitialMsg;
            ctxt->osFailureMsg = std::move(osTmp);
          }
        }
    }
    catch( const std::exception& )
    {
        ctxt->bMemoryError = true;
    }
  }
}




static
int GetUseExceptions() {
  return bUseExceptionsLocal >= 0 ? bUseExceptionsLocal : bUseExceptions;
}

static int _GetExceptionsLocal()
{
  return bUseExceptionsLocal;
}

static void _SetExceptionsLocal(int bVal)
{
  bUseExceptionsLocal = bVal;
}

static
void _UseExceptions() {
  CPLErrorReset();
  bUserHasSpecifiedIfUsingExceptions = TRUE;
  if( !bUseExceptions )
  {
    bUseExceptions = 1;
  }
}

static
void _DontUseExceptions() {
  CPLErrorReset();
  bUserHasSpecifiedIfUsingExceptions = TRUE;
  if( bUseExceptions )
  {
    bUseExceptions = 0;
  }
}

static int _UserHasSpecifiedIfUsingExceptions()
{
    return bUserHasSpecifiedIfUsingExceptions || bUseExceptionsLocal >= 0;
}



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


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


#include <float.h>


#include <math.h>


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


SWIGINTERN int
SWIG_AsVal_long (PyObject *obj, long* val)
{
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(obj)) {
    if (val) *val = PyInt_AsLong(obj);
    return SWIG_OK;
  } else
#endif
  if (PyLong_Check(obj)) {
    long v = PyLong_AsLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      return SWIG_OverflowError;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    long v = PyInt_AsLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
      // Largest double not larger than LONG_MAX (not portably calculated easily)
      // Note that double(LONG_MAX) is stored in a double rounded up by one (for 64-bit long)
      // 0x7ffffffffffffc00LL == (int64_t)std::nextafter(double(__uint128_t(LONG_MAX)+1), double(0))
      const double long_max = sizeof(long) == 8 ? 0x7ffffffffffffc00LL : LONG_MAX;
      // No equivalent needed for 64-bit double(LONG_MIN) is exactly LONG_MIN
      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;
}


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

static int bReturnSame = 1;

void NeverCallMePlease() {
    bReturnSame = 0;
}

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

static void pushErrorHandler()
{
    CPLErrorReset();
    PythonBindingErrorHandlerContext* ctxt = new PythonBindingErrorHandlerContext();
    CPLPushErrorHandlerEx(PythonBindingErrorHandler, ctxt);
}

static void popErrorHandler()
{
    PythonBindingErrorHandlerContext* ctxt = static_cast<
      PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
    CPLPopErrorHandler();
    if( ctxt->bMemoryError )
    {
        CPLErrorSetState(
          CE_Failure, CPLE_OutOfMemory, "Out of memory");
    }
    else if( !ctxt->osFailureMsg.empty() )
    {
      CPLErrorSetState(
          CPLGetLastErrorType() == CE_Failure ? CE_Failure: CE_Warning,
          ctxt->nLastCode, ctxt->osFailureMsg.c_str());
    }
    delete ctxt;
}




/* Return a PyObject* from a NULL terminated C String */
static PyObject* GDALPythonObjectFromCStr(const char *pszStr) CPL_UNUSED;
static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
{
  const unsigned char* pszIter = (const unsigned char*) pszStr;
  while(*pszIter != 0)
  {
    if (*pszIter > 127)
    {
        PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "strict");
        if (pyObj != NULL && !PyErr_Occurred())
            return pyObj;
        PyErr_Clear();
        return PyBytes_FromString(pszStr);
    }
    pszIter ++;
  }
  return PyUnicode_FromString(pszStr);
}

/* Return a NULL terminated c String from a PyObject */
/* Result must be freed with GDALPythonFreeCStr */
static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
{
  *pbToFree = 0;
  if (PyUnicode_Check(pyObject))
  {
      char *pszStr;
      char *pszNewStr;
      Py_ssize_t nLen;
      PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
      if( pyUTF8Str == NULL )
        return NULL;
      PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
      pszNewStr = (char *) malloc(nLen+1);
      if( pszNewStr == NULL )
      {
          CPLError(CE_Failure, CPLE_OutOfMemory, "Failed to allocate %llu bytes",
                   (unsigned long long)(nLen + 1));
          Py_XDECREF(pyUTF8Str);
          return NULL;
      }
      memcpy(pszNewStr, pszStr, nLen+1);
      Py_XDECREF(pyUTF8Str);
      *pbToFree = 1;
      return pszNewStr;
  }
  else if( PyBytes_Check(pyObject) )
  {
      char* ret = PyBytes_AsString(pyObject);

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

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

static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree)
{
    PyObject* os = PyImport_ImportModule("os");
    if (os == NULL)
    {
        return NULL;
    }

    PyObject* pathLike = PyObject_GetAttrString(os, "PathLike");
    if (pathLike == NULL)
    {
        Py_DECREF(os);
        return NULL;
    }

    if (!PyObject_IsInstance(pyObject, pathLike))
    {
        Py_DECREF(pathLike);
        Py_DECREF(os);
        return NULL;
    }

    PyObject* str = PyObject_Str(pyObject);
    char* ret = NULL;
    if (str != NULL)
    {
        ret = GDALPythonObjectToCStr(str, pbToFree);
        Py_DECREF(str);
    }

    Py_DECREF(pathLike);
    Py_DECREF(os);

    return ret;
}


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




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

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


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

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

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

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

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

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

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

    SWIG_PYTHON_THREAD_BEGIN_BLOCK;

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

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

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

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

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

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

    Py_XDECREF(psResult);
    SWIG_PYTHON_THREAD_END_BLOCK;

    return bContinue;
}


#include "gdal.h"

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

/* Return string from Python obj. NOTE: obj must remain in scope in order
   to use the returned cptr (but only when alloc is set to SWIG_OLDOBJ) */
SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject *obj, char **cptr, size_t *psize, int *alloc)
{
#if PY_VERSION_HEX>=0x03000000
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
  if (PyBytes_Check(obj))
#else
  if (PyUnicode_Check(obj))
#endif
#else  
  if (PyString_Check(obj))
#endif
  {
    char *cstr; Py_ssize_t len;
    PyObject *bytes = NULL;
    int ret = SWIG_OK;
    if (alloc)
      *alloc = SWIG_OLDOBJ;
#if PY_VERSION_HEX>=0x03000000 && defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
      return SWIG_TypeError;
#else
    cstr = (char *)SWIG_PyUnicode_AsUTF8AndSize(obj, &len, &bytes);
    if (!cstr)
      return SWIG_TypeError;
    /* The returned string is only duplicated if the char * returned is not owned and memory managed by obj */
    if (bytes && cptr) {
      if (alloc) {
        cstr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
        *alloc = SWIG_NEWOBJ;
      } else {
        /* alloc must be set in order to clean up allocated memory */
        return SWIG_RuntimeError;
      }
    }
#endif
    if (cptr) *cptr = cstr;
    if (psize) *psize = len + 1;
    Py_XDECREF(bytes);
    return ret;
  } else {
#if defined(SWIG_PYTHON_2_UNICODE)
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
#endif
#if PY_VERSION_HEX<0x03000000
    if (PyUnicode_Check(obj)) {
      char *cstr; Py_ssize_t len;
      if (!alloc && cptr) {
        return SWIG_RuntimeError;
      }
      obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
      if (!obj)
        return SWIG_TypeError;
      if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
        if (cptr) {
          if (alloc) *alloc = SWIG_NEWOBJ;
          *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
        }
        if (psize) *psize = len + 1;

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

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




SWIGINTERN void GDALMajorObjectShadow_SetDescription(GDALMajorObjectShadow *self,char const *pszNewDesc){
    GDALSetDescription( self, pszNewDesc );
  }
SWIGINTERN char **GDALMajorObjectShadow_GetMetadataDomainList(GDALMajorObjectShadow *self){
    return GDALGetMetadataDomainList( self );
  }

static PyObject* CSLToList( char** stringarray, bool *pbErr )
{
  PyObject* res;
  if ( stringarray == NULL ) {
    res = Py_None;
    Py_INCREF( res );
  }
  else {
    int len = CSLCount( stringarray );
    res = PyList_New( len );
    if( !res ) {
      *pbErr = true;
      return res;
    }
    for ( int i = 0; i < len; ++i ) {
      PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
      PyList_SetItem(res, i, o );
    }
  }
  *pbErr = false;
  return res;
}

SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_Dict(GDALMajorObjectShadow *self,char const *pszDomain=""){
    return GDALGetMetadata( self, pszDomain );
  }

/* Return a PyObject* from a C String */
static PyObject* GDALPythonObjectFromCStrAndSize(const char *pszStr, size_t nLen)
{
  const unsigned char* pszIter = (const unsigned char*) pszStr;
  for( size_t i = 0; i < nLen; ++i)
  {
    if (pszIter[i] > 127)
    {
        PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, nLen, "strict");
        if (pyObj != NULL && !PyErr_Occurred())
            return pyObj;
        PyErr_Clear();
        return PyBytes_FromStringAndSize(pszStr, nLen);
    }
  }
  return PyUnicode_FromStringAndSize(pszStr, nLen);
}


static PyObject*
GetCSLStringAsPyDict( char **stringarray, bool bFreeCSL ) {
  PyObject* dict = PyDict_New();
  if ( stringarray != NULL ) {
    for (char** iter = stringarray; *iter; ++iter ) {
      const char* pszSep = strchr( *iter, '=' );
      if ( pszSep != NULL) {
        const char* keyptr = *iter;
        const char* valptr = pszSep + 1;
        PyObject *nm = GDALPythonObjectFromCStrAndSize( keyptr, (size_t)(pszSep - keyptr) );
        PyObject *val = GDALPythonObjectFromCStr( valptr );
        PyDict_SetItem(dict, nm, val );
        Py_DECREF(nm);
        Py_DECREF(val);
      }
    }
  }
  if( bFreeCSL )
    CSLDestroy(stringarray);
  return dict;
}

SWIGINTERN char **GDALMajorObjectShadow_GetMetadata_List(GDALMajorObjectShadow *self,char const *pszDomain=""){
    return GDALGetMetadata( self, pszDomain );
  }

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

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

  Py_ssize_t size = PySequence_Size(pySeq);
  if( size > (Py_ssize_t)(INT_MAX - 1) ) {
    PyErr_SetString(PyExc_TypeError, "too big sequence");
    *pbErr = TRUE;
    return NULL;
  }
  if( size == 0 ) {
    return NULL;
  }
  char** papszRet = (char**) VSICalloc((int)size + 1, sizeof(char*));
  if( !papszRet ) {
    PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    *pbErr = TRUE;
    return NULL;
  }
  for (int i = 0; i < (int)size; i++) {
    PyObject* pyObj = PySequence_GetItem(pySeq,i);
    if (PyUnicode_Check(pyObj))
    {
      char *pszStr;
      Py_ssize_t nLen;
      PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
      if( !pyUTF8Str )
      {
        Py_DECREF(pyObj);
        PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
        CSLDestroy(papszRet);
        *pbErr = TRUE;
        return NULL;
      }
      PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
      papszRet[i] = VSIStrdup(pszStr);
      Py_XDECREF(pyUTF8Str);
    }
    else if (PyBytes_Check(pyObj))
      papszRet[i] = VSIStrdup(PyBytes_AsString(pyObj));
    else
    {
        Py_DECREF(pyObj);
        PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
        CSLDestroy(papszRet);
        *pbErr = TRUE;
        return NULL;
    }
    Py_DECREF(pyObj);
    if( !papszRet[i] )
    {
        PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
        CSLDestroy(papszRet);
        *pbErr = TRUE;
        return NULL;
    }
  }
  return papszRet;
}


static char **CSLFromPyMapping( PyObject *pyObj, int *pbErr )

{
    char** retCSL = NULL;
    Py_ssize_t size = PyMapping_Length( pyObj );
    if ( size > 0 && size == (int)size) {
      PyObject *item_list = PyMapping_Items( pyObj );
      for( int i=0; i<(int)size; i++ ) {
        PyObject *it = PySequence_GetItem( item_list, i );

        PyObject *k, *v;
        if ( ! PyArg_ParseTuple( it, "OO", &k, &v ) ) {
          Py_DECREF(it);
          Py_DECREF(item_list);
          PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
          CSLDestroy(retCSL);
          *pbErr = TRUE;
          return NULL;
        }

        PyObject* kStr = PyObject_Str(k);
        if( PyErr_Occurred() )
        {
            Py_DECREF(it);
            Py_DECREF(item_list);
            CSLDestroy(retCSL);
            *pbErr = TRUE;
            return NULL;
        }

        PyObject* vStr;
        if( PyBytes_Check(v) )
        {
            vStr = v;
            Py_INCREF(vStr);
        }
        else
        {
            vStr = PyObject_Str(v);
            if( PyErr_Occurred() )
            {
                Py_DECREF(it);
                Py_DECREF(kStr);
                Py_DECREF(item_list);
                CSLDestroy(retCSL);
                *pbErr = TRUE;
                return NULL;
            }
        }

        int bFreeK, bFreeV;
        char* pszK = GDALPythonObjectToCStr(kStr, &bFreeK);
        char* pszV = GDALPythonObjectToCStr(vStr, &bFreeV);
        if( pszK == NULL || pszV == NULL )
        {
            GDALPythonFreeCStr(pszK, bFreeK);
            GDALPythonFreeCStr(pszV, bFreeV);
            Py_DECREF(kStr);
            Py_DECREF(vStr);
            Py_DECREF(it);
            Py_DECREF(item_list);
            PyErr_SetString(PyExc_TypeError,"Cannot get key/value as string");
            CSLDestroy(retCSL);
            *pbErr = TRUE;
            return NULL;
        }
        retCSL = CSLAddNameValue( retCSL, pszK, pszV );

        GDALPythonFreeCStr(pszK, bFreeK);
        GDALPythonFreeCStr(pszV, bFreeV);
        Py_DECREF(kStr);
        Py_DECREF(vStr);
        Py_DECREF(it);
      }
      Py_DECREF(item_list);
    }
    *pbErr = FALSE;
    return retCSL;
}

SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_0(GDALMajorObjectShadow *self,char **papszMetadata,char const *pszDomain=""){
    return GDALSetMetadata( self, papszMetadata, pszDomain );
  }
SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_1(GDALMajorObjectShadow *self,char *pszMetadataString,char const *pszDomain=""){
    char *tmpList[2];
    tmpList[0] = pszMetadataString;
    tmpList[1] = 0;
    return GDALSetMetadata( self, tmpList, pszDomain );
  }
SWIGINTERN char const *GDALMajorObjectShadow_GetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszDomain=""){
    return GDALGetMetadataItem( self, pszName, pszDomain);
  }
SWIGINTERN CPLErr GDALMajorObjectShadow_SetMetadataItem(GDALMajorObjectShadow *self,char const *pszName,char const *pszValue,char const *pszDomain=""){
    return GDALSetMetadataItem( self, pszName, pszValue, pszDomain);
  }

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

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

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

SWIGINTERN OGRStyleTableShadow *new_OGRStyleTableShadow(){
        return (OGRStyleTableShadow*) OGR_STBL_Create();
   }
SWIGINTERN void delete_OGRStyleTableShadow(OGRStyleTableShadow *self){
        OGR_STBL_Destroy( (OGRStyleTableH) self );
   }
SWIGINTERN int OGRStyleTableShadow_AddStyle(OGRStyleTableShadow *self,char const *pszName,char const *pszStyleString){
        return OGR_STBL_AddStyle( (OGRStyleTableH) self, pszName, pszStyleString);
   }
SWIGINTERN int OGRStyleTableShadow_LoadStyleTable(OGRStyleTableShadow *self,char const *utf8_path){
        return OGR_STBL_LoadStyleTable( (OGRStyleTableH) self, utf8_path );
   }
SWIGINTERN int OGRStyleTableShadow_SaveStyleTable(OGRStyleTableShadow *self,char const *utf8_path){
        return OGR_STBL_SaveStyleTable( (OGRStyleTableH) self, utf8_path );
   }
SWIGINTERN char const *OGRStyleTableShadow_Find(OGRStyleTableShadow *self,char const *pszName){
        return OGR_STBL_Find( (OGRStyleTableH) self, pszName );
   }
SWIGINTERN void OGRStyleTableShadow_ResetStyleStringReading(OGRStyleTableShadow *self){
        OGR_STBL_ResetStyleStringReading( (OGRStyleTableH) self );
   }
SWIGINTERN char const *OGRStyleTableShadow_GetNextStyle(OGRStyleTableShadow *self){
        return OGR_STBL_GetNextStyle( (OGRStyleTableH) self );
   }
SWIGINTERN char const *OGRStyleTableShadow_GetLastStyleName(OGRStyleTableShadow *self){
        return OGR_STBL_GetLastStyleName( (OGRStyleTableH) self );
   }
SWIGINTERN ArrowArray *new_ArrowArray(){
    return (struct ArrowArray* )calloc(1, sizeof(struct ArrowArray));
  }
SWIGINTERN void delete_ArrowArray(ArrowArray *self){
    if( self->release )
      self->release(self);
    free(self);
  }
SWIGINTERN VoidPtrAsLong ArrowArray__getPtr(ArrowArray *self){
    return self;
  }
SWIGINTERN GIntBig ArrowArray_GetChildrenCount(ArrowArray *self){
    return self->n_children;
  }
SWIGINTERN GIntBig ArrowArray_GetLength(ArrowArray *self){
    return self->length;
  }
SWIGINTERN ArrowSchema *new_ArrowSchema(){
    return (struct ArrowSchema* )calloc(1, sizeof(struct ArrowSchema));
  }
SWIGINTERN void delete_ArrowSchema(ArrowSchema *self){
    if( self->release )
      self->release(self);
    free(self);
  }
SWIGINTERN VoidPtrAsLong ArrowSchema__getPtr(ArrowSchema *self){
    return self;
  }
SWIGINTERN char const *ArrowSchema_GetName(ArrowSchema *self){
    return self->name;
  }
SWIGINTERN GIntBig ArrowSchema_GetChildrenCount(ArrowSchema *self){
    return self->n_children;
  }
SWIGINTERN ArrowSchema const *ArrowSchema_GetChild(ArrowSchema *self,int iChild){
    if( iChild < 0 || iChild >= self->n_children )
    {
        CPLError(CE_Failure, CPLE_AppDefined, "Wrong index");
        return NULL;
    }
    return self->children[iChild];
  }
SWIGINTERN void delete_ArrowArrayStream(ArrowArrayStream *self){
    if( self->release )
      self->release(self);
    free(self);
  }
SWIGINTERN ArrowSchema *ArrowArrayStream_GetSchema(ArrowArrayStream *self){
      struct ArrowSchema* schema = (struct ArrowSchema* )malloc(sizeof(struct ArrowSchema));
      if( self->get_schema(self, schema) == 0 )
      {
          return schema;
      }
      else
      {
          free(schema);
          return NULL;
      }
  }
SWIGINTERN ArrowArray *ArrowArrayStream_GetNextRecordBatch(ArrowArrayStream *self,char **options=NULL){
      struct ArrowArray* array = (struct ArrowArray* )malloc(sizeof(struct ArrowArray));
      if( self->get_next(self, array) == 0 && array->release != NULL )
      {
          return array;
      }
      else
      {
          free(array);
          return NULL;
      }
  }

static void ReleaseArrowArrayStreamPyCapsule(PyObject* capsule) {
    struct ArrowArrayStream* stream =
        (struct ArrowArrayStream*)PyCapsule_GetPointer(capsule, "arrow_array_stream");
    if (stream->release != NULL) {
        stream->release(stream);
    }
    CPLFree(stream);
}

static char** ParseArrowMetadata(const char *pabyMetadata)
{
    char** ret = NULL;
    int32_t nKVP;
    memcpy(&nKVP, pabyMetadata, sizeof(int32_t));
    pabyMetadata += sizeof(int32_t);
    for (int i = 0; i < nKVP; ++i)
    {
        int32_t nSizeKey;
        memcpy(&nSizeKey, pabyMetadata, sizeof(int32_t));
        pabyMetadata += sizeof(int32_t);
        std::string osKey;
        osKey.assign(pabyMetadata, nSizeKey);
        pabyMetadata += nSizeKey;

        int32_t nSizeValue;
        memcpy(&nSizeValue, pabyMetadata, sizeof(int32_t));
        pabyMetadata += sizeof(int32_t);
        std::string osValue;
        osValue.assign(pabyMetadata, nSizeValue);
        pabyMetadata += nSizeValue;

        ret = CSLSetNameValue(ret, osKey.c_str(), osValue.c_str());
    }

    return ret;
}

// Create output fields using CreateFieldFromArrowSchema()
static bool CreateFieldsFromArrowSchema(OGRLayerH hDstLayer,
                                        const struct ArrowSchema* schemaSrc,
                                        char** options)
{
    for (int i = 0; i < schemaSrc->n_children; ++i)
    {
        const char *metadata =
            schemaSrc->children[i]->metadata;
        if( metadata )
        {
            char** keyValues = ParseArrowMetadata(metadata);
            const char *ARROW_EXTENSION_NAME_KEY = "ARROW:extension:name";
            const char *EXTENSION_NAME_OGC_WKB = "ogc.wkb";
            const char *EXTENSION_NAME_GEOARROW_WKB = "geoarrow.wkb";
            const char* value = CSLFetchNameValue(keyValues, ARROW_EXTENSION_NAME_KEY);
            const bool bSkip = ( value && (EQUAL(value, EXTENSION_NAME_OGC_WKB) || EQUAL(value, EXTENSION_NAME_GEOARROW_WKB)) );
            CSLDestroy(keyValues);
            if( bSkip )
                continue;
        }

        const char *pszFieldName =
            schemaSrc->children[i]->name;
        if (!EQUAL(pszFieldName, "OGC_FID") &&
            !EQUAL(pszFieldName, "wkb_geometry") &&
            !OGR_L_CreateFieldFromArrowSchema(
                hDstLayer, schemaSrc->children[i], options))
        {
            CPLError(CE_Failure, CPLE_AppDefined,
                     "Cannot create field %s",
                     pszFieldName);
            return false;
        }
    }
    return true;
}


SWIGINTERN GDALDatasetShadow *OGRLayerShadow_GetDataset(OGRLayerShadow *self){
      return OGR_L_GetDataset(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_Rename(OGRLayerShadow *self,char const *new_name){
    return OGR_L_Rename( self, new_name);
  }


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

SWIGINTERN int OGRLayerShadow_GetRefCount(OGRLayerShadow *self){
    return OGR_L_GetRefCount(self);
  }
SWIGINTERN void OGRLayerShadow_SetSpatialFilter__SWIG_0(OGRLayerShadow *self,OGRGeometryShadow *filter){
    OGR_L_SetSpatialFilter (self, filter);
  }
SWIGINTERN void OGRLayerShadow_SetSpatialFilterRect__SWIG_0(OGRLayerShadow *self,double minx,double miny,double maxx,double maxy){
    OGR_L_SetSpatialFilterRect(self, minx, miny, maxx, maxy);
  }
SWIGINTERN void OGRLayerShadow_SetSpatialFilter__SWIG_1(OGRLayerShadow *self,int iGeomField,OGRGeometryShadow *filter){
    OGR_L_SetSpatialFilterEx (self, iGeomField, filter);
  }
SWIGINTERN void OGRLayerShadow_SetSpatialFilterRect__SWIG_1(OGRLayerShadow *self,int iGeomField,double minx,double miny,double maxx,double maxy){
    OGR_L_SetSpatialFilterRectEx(self, iGeomField, minx, miny, maxx, maxy);
  }
SWIGINTERN OGRGeometryShadow *OGRLayerShadow_GetSpatialFilter(OGRLayerShadow *self){
    return (OGRGeometryShadow *) OGR_L_GetSpatialFilter(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetAttributeFilter(OGRLayerShadow *self,char *filter_string){
    return OGR_L_SetAttributeFilter((OGRLayerShadow*)self, filter_string);
  }
SWIGINTERN void OGRLayerShadow_ResetReading(OGRLayerShadow *self){
    OGR_L_ResetReading(self);
  }
SWIGINTERN char const *OGRLayerShadow_GetName(OGRLayerShadow *self){
    return OGR_L_GetName(self);
  }
SWIGINTERN OGRwkbGeometryType OGRLayerShadow_GetGeomType(OGRLayerShadow *self){
    return (OGRwkbGeometryType) OGR_L_GetGeomType(self);
  }
SWIGINTERN char const *OGRLayerShadow_GetGeometryColumn(OGRLayerShadow *self){
    return OGR_L_GetGeometryColumn(self);
  }
SWIGINTERN char const *OGRLayerShadow_GetFIDColumn(OGRLayerShadow *self){
    return OGR_L_GetFIDColumn(self);
  }
SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetFeature(OGRLayerShadow *self,GIntBig fid){
    return (OGRFeatureShadow*) OGR_L_GetFeature(self, fid);
  }
SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetNextFeature(OGRLayerShadow *self){
    return (OGRFeatureShadow*) OGR_L_GetNextFeature(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetNextByIndex(OGRLayerShadow *self,GIntBig new_index){
    return OGR_L_SetNextByIndex(self, new_index);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
    return OGR_L_SetFeature(self, feature);
  }
SWIGINTERN OGRErr OGRLayerShadow_CreateFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
    return OGR_L_CreateFeature(self, feature);
  }
SWIGINTERN OGRErr OGRLayerShadow_UpsertFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
    return OGR_L_UpsertFeature(self, feature);
  }

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


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

SWIGINTERN OGRErr OGRLayerShadow_UpdateFeature(OGRLayerShadow *self,OGRFeatureShadow *feature,int nUpdatedFieldsCount,int const *panUpdatedFieldsIdx,int nUpdatedGeomFieldsCount,int const *panUpdatedGeomFieldsIdx,bool bUpdateStyleString){
    return OGR_L_UpdateFeature(self, feature,
                               nUpdatedFieldsCount,
                               panUpdatedFieldsIdx,
                               nUpdatedGeomFieldsCount,
                               panUpdatedGeomFieldsIdx,
                               bUpdateStyleString);
  }
SWIGINTERN OGRErr OGRLayerShadow_DeleteFeature(OGRLayerShadow *self,GIntBig fid){
    return OGR_L_DeleteFeature(self, fid);
  }
SWIGINTERN OGRErr OGRLayerShadow_SyncToDisk(OGRLayerShadow *self){
    return OGR_L_SyncToDisk(self);
  }
SWIGINTERN OGRFeatureDefnShadow *OGRLayerShadow_GetLayerDefn(OGRLayerShadow *self){
    auto defn = (OGRFeatureDefnShadow*) OGR_L_GetLayerDefn(self);
    if (defn)
        OGR_FD_Reference(defn);
    return defn;
  }
SWIGINTERN GIntBig OGRLayerShadow_GetFeatureCount(OGRLayerShadow *self,int force=1){
    return OGR_L_GetFeatureCount(self, force);
  }

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

SWIGINTERN void OGRLayerShadow_GetExtent(OGRLayerShadow *self,double argout[4],int *isvalid=NULL,int force=1,int can_return_null=0,int geom_field=0){
    OGRErr eErr = OGR_L_GetExtentEx(self, geom_field, (OGREnvelope*)argout, force);
    if (can_return_null)
        *isvalid = (eErr == 0);
    else
        *isvalid = TRUE;
    return;
  }
SWIGINTERN void OGRLayerShadow_GetExtent3D(OGRLayerShadow *self,double argout[6],int *isvalid=NULL,int force=1,int can_return_null=0,int geom_field=0){
    OGRErr eErr = OGR_L_GetExtent3D(self, geom_field, (OGREnvelope3D*)argout, force);
    if (can_return_null)
        *isvalid = (eErr == 0);
    else
        *isvalid = TRUE;
    return;
  }
SWIGINTERN bool OGRLayerShadow_TestCapability(OGRLayerShadow *self,char const *cap){
    return (OGR_L_TestCapability(self, cap) > 0);
  }

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

SWIGINTERN OGRErr OGRLayerShadow_CreateField(OGRLayerShadow *self,OGRFieldDefnShadow *field_def,int approx_ok=1){
    return OGR_L_CreateField(self, field_def, approx_ok);
  }
SWIGINTERN OGRErr OGRLayerShadow_DeleteField(OGRLayerShadow *self,int iField){
    return OGR_L_DeleteField(self, iField);
  }
SWIGINTERN OGRErr OGRLayerShadow_ReorderField(OGRLayerShadow *self,int iOldFieldPos,int iNewFieldPos){
    return OGR_L_ReorderField(self, iOldFieldPos, iNewFieldPos);
  }
SWIGINTERN OGRErr OGRLayerShadow_ReorderFields(OGRLayerShadow *self,int nList,int *pList){
    if (nList != OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)))
    {
      CPLError(CE_Failure, CPLE_IllegalArg,
               "List should have %d elements",
               OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)));
      return 6;
    }
    return OGR_L_ReorderFields(self, pList);
  }
SWIGINTERN OGRErr OGRLayerShadow_AlterFieldDefn(OGRLayerShadow *self,int iField,OGRFieldDefnShadow *field_def,int nFlags){
    return OGR_L_AlterFieldDefn(self, iField, field_def, nFlags);
  }
SWIGINTERN OGRErr OGRLayerShadow_AlterGeomFieldDefn(OGRLayerShadow *self,int iGeomField,OGRGeomFieldDefnShadow const *field_def,int nFlags){
    return OGR_L_AlterGeomFieldDefn(self, iGeomField, const_cast<OGRGeomFieldDefnShadow*>(field_def), nFlags);
  }
SWIGINTERN OGRErr OGRLayerShadow_CreateGeomField(OGRLayerShadow *self,OGRGeomFieldDefnShadow *field_def,int approx_ok=1){
    return OGR_L_CreateGeomField(self, field_def, approx_ok);
  }
SWIGINTERN OGRErr OGRLayerShadow_StartTransaction(OGRLayerShadow *self){
    return OGR_L_StartTransaction(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_CommitTransaction(OGRLayerShadow *self){
    return OGR_L_CommitTransaction(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_RollbackTransaction(OGRLayerShadow *self){
    return OGR_L_RollbackTransaction(self);
  }
SWIGINTERN int OGRLayerShadow_FindFieldIndex(OGRLayerShadow *self,char const *pszFieldName,int bExactMatch){
    return OGR_L_FindFieldIndex(self, pszFieldName, bExactMatch );
  }
SWIGINTERN OSRSpatialReferenceShadow *OGRLayerShadow_GetSpatialRef(OGRLayerShadow *self){
    OGRSpatialReferenceH ref =  OGR_L_GetSpatialRef(self);
    if( ref )
        OSRReference(ref);
    return (OSRSpatialReferenceShadow*) ref;
  }
SWIGINTERN GIntBig OGRLayerShadow_GetFeaturesRead(OGRLayerShadow *self){
    return OGR_L_GetFeaturesRead(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetIgnoredFields(OGRLayerShadow *self,char const **options){
    return OGR_L_SetIgnoredFields( self, options );
  }
SWIGINTERN OGRErr OGRLayerShadow_Intersection(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Intersection( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Union(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Union( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_SymDifference(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_SymDifference( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Identity(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Identity( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Update(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Update( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Clip(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Clip( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Erase(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Erase( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRStyleTableShadow *OGRLayerShadow_GetStyleTable(OGRLayerShadow *self){
    return (OGRStyleTableShadow*) OGR_L_GetStyleTable(self);
  }
SWIGINTERN void OGRLayerShadow_SetStyleTable(OGRLayerShadow *self,OGRStyleTableShadow *table){
    if( table != NULL )
        OGR_L_SetStyleTable(self, (OGRStyleTableH) table);
  }
SWIGINTERN PyObject *OGRLayerShadow_ExportArrowArrayStreamPyCapsule(OGRLayerShadow *self,char **options=NULL){
        struct ArrowArrayStream* stream =
            (struct ArrowArrayStream*)CPLMalloc(sizeof(struct ArrowArrayStream));

        const int success = OGR_L_GetArrowStream(self, stream, options);

        PyObject* ret;
        SWIG_PYTHON_THREAD_BEGIN_BLOCK;
        if( success )
        {
            ret = PyCapsule_New(stream, "arrow_array_stream", ReleaseArrowArrayStreamPyCapsule);
        }
        else
        {
            CPLFree(stream);
            Py_INCREF(Py_None);
            ret = Py_None;
        }

        SWIG_PYTHON_THREAD_END_BLOCK;

        return ret;
    }
SWIGINTERN ArrowArrayStream *OGRLayerShadow_GetArrowStream(OGRLayerShadow *self,char **options=NULL){
      struct ArrowArrayStream* stream = (struct ArrowArrayStream* )malloc(sizeof(struct ArrowArrayStream));
      if( OGR_L_GetArrowStream(self, stream, options) )
          return stream;
      else
      {
          free(stream);
          return NULL;
      }
  }
SWIGINTERN void OGRLayerShadow_IsArrowSchemaSupported(OGRLayerShadow *self,ArrowSchema const *schema,bool *pbRet,char **errorMsg,char **options=NULL){
        *pbRet = OGR_L_IsArrowSchemaSupported(self, schema, options, errorMsg);
    }
SWIGINTERN OGRErr OGRLayerShadow_CreateFieldFromArrowSchema(OGRLayerShadow *self,ArrowSchema const *schema,char **options=NULL){
        return OGR_L_CreateFieldFromArrowSchema(self, schema, options) ? 0 : 6;
    }
SWIGINTERN OGRErr OGRLayerShadow_WriteArrowBatch(OGRLayerShadow *self,ArrowSchema const *schema,ArrowArray *array,char **options=NULL){
        return OGR_L_WriteArrowBatch(self, schema, array, options) ? 0 : 6;
    }
SWIGINTERN OGRErr OGRLayerShadow_WriteArrowStreamCapsule(OGRLayerShadow *self,PyObject *capsule,int createFieldsFromSchema,char **options=NULL){
        ArrowArrayStream* stream = (ArrowArrayStream*)PyCapsule_GetPointer(capsule, "arrow_array_stream");
        if( !stream )
        {
            CPLError(CE_Failure, CPLE_AppDefined, "PyCapsule_GetPointer(capsule, \"arrow_array_stream\") failed");
            return 6;
        }
        if( stream->release == NULL )
        {
            CPLError(CE_Failure, CPLE_AppDefined, "stream->release == NULL");
            return 6;
        }

        ArrowSchema schema;
        if( stream->get_schema(stream, &schema) != 0 )
        {
            stream->release(stream);
            return 6;
        }

        if( createFieldsFromSchema == TRUE ||
            (createFieldsFromSchema == -1 && OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)) == 0) )
        {
            if( !CreateFieldsFromArrowSchema(self, &schema, options) )
            {
                schema.release(&schema);
                stream->release(stream);
                return 6;
            }
        }

        while( true )
        {
            ArrowArray array;
            if( stream->get_next(stream, &array) == 0 )
            {
                if( array.release == NULL )
                    break;
                if( !OGR_L_WriteArrowBatch(self, &schema, &array, options) )
                {
                    if( array.release )
                        array.release(&array);
                    schema.release(&schema);
                    stream->release(stream);
                    return 6;
                }
                if( array.release )
                    array.release(&array);
            }
            else
            {
                CPLError(CE_Failure, CPLE_AppDefined, "stream->get_next(stream, &array) failed");
                schema.release(&schema);
                stream->release(stream);
                return 6;
            }
        }
        schema.release(&schema);
        stream->release(stream);
        return 0;
    }
SWIGINTERN OGRErr OGRLayerShadow_WriteArrowSchemaAndArrowArrayCapsule(OGRLayerShadow *self,PyObject *schemaCapsule,PyObject *arrayCapsule,int createFieldsFromSchema,char **options=NULL){
        ArrowSchema* schema = (ArrowSchema*)PyCapsule_GetPointer(schemaCapsule, "arrow_schema");
        if( !schema )
        {
            CPLError(CE_Failure, CPLE_AppDefined, "PyCapsule_GetPointer(schemaCapsule, \"arrow_schema\") failed");
            return 6;
        }
        if( schema->release == NULL )
        {
            CPLError(CE_Failure, CPLE_AppDefined, "schema->release == NULL");
            return 6;
        }

        if( createFieldsFromSchema == TRUE ||
            (createFieldsFromSchema == -1 && OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)) == 0) )
        {
            if( !CreateFieldsFromArrowSchema(self, schema, options) )
            {
                schema->release(schema);
                return 6;
            }
        }

        ArrowArray* array = (ArrowArray*)PyCapsule_GetPointer(arrayCapsule, "arrow_array");
        if( !array )
        {
            CPLError(CE_Failure, CPLE_AppDefined, "PyCapsule_GetPointer(arrayCapsule, \"arrow_array\") failed");
            schema->release(schema);
            return 6;
        }
        if( array->release == NULL )
        {
            CPLError(CE_Failure, CPLE_AppDefined, "array->release == NULL");
            schema->release(schema);
            return 6;
        }

        OGRErr eErr = 0;
        if( !OGR_L_WriteArrowBatch(self, schema, array, options) )
        {
            eErr = 6;
        }

        if( schema->release )
            schema->release(schema);
        if( array->release )
            array->release(array);
        return eErr;
    }
SWIGINTERN void OGRLayerShadow_GetGeometryTypes(OGRLayerShadow *self,OGRGeometryTypeCounter **ppRet,int *pnEntryCount,int geom_field=0,int flags=0,GDALProgressFunc callback=NULL,void *callback_data=NULL){
        *ppRet = OGR_L_GetGeometryTypes(self, geom_field, flags, pnEntryCount, callback, callback_data);
    }
SWIGINTERN void OGRLayerShadow_GetSupportedSRSList(OGRLayerShadow *self,OGRSpatialReferenceH **ppRet,int *pnEntryCount,int geom_field=0){
        *ppRet = OGR_L_GetSupportedSRSList(self, geom_field, pnEntryCount);
    }
SWIGINTERN OGRErr OGRLayerShadow_SetActiveSRS(OGRLayerShadow *self,int geom_field,OSRSpatialReferenceShadow *srs){
        return OGR_L_SetActiveSRS(self, geom_field, srs);
    }
SWIGINTERN void delete_OGRFeatureShadow(OGRFeatureShadow *self){
    OGR_F_Destroy(self);
  }
SWIGINTERN OGRFeatureShadow *new_OGRFeatureShadow(OGRFeatureDefnShadow *feature_def){
      return (OGRFeatureShadow*) OGR_F_Create( feature_def );
  }
SWIGINTERN OGRFeatureDefnShadow *OGRFeatureShadow_GetDefnRef(OGRFeatureShadow *self){
    return (OGRFeatureDefnShadow*) OGR_F_GetDefnRef(self);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeometry(OGRFeatureShadow *self,OGRGeometryShadow *geom){
    return OGR_F_SetGeometry(self, geom);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeometryDirectly(OGRFeatureShadow *self,OGRGeometryShadow *geom){
    return OGR_F_SetGeometryDirectly(self, geom);
  }
SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeometryRef(OGRFeatureShadow *self){
    return (OGRGeometryShadow*) OGR_F_GetGeometryRef(self);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeomField__SWIG_0(OGRFeatureShadow *self,int iField,OGRGeometryShadow *geom){
    return OGR_F_SetGeomField(self, iField, geom);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeomField__SWIG_1(OGRFeatureShadow *self,char const *field_name,OGRGeometryShadow *geom){
      int iField = OGR_F_GetGeomFieldIndex(self, field_name);
      if (iField == -1)
      {
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
          return 6;
      }
      else
          return OGR_F_SetGeomField(self, iField, geom);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeomFieldDirectly__SWIG_0(OGRFeatureShadow *self,int iField,OGRGeometryShadow *geom){
    return OGR_F_SetGeomFieldDirectly(self, iField, geom);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeomFieldDirectly__SWIG_1(OGRFeatureShadow *self,char const *field_name,OGRGeometryShadow *geom){
      int iField = OGR_F_GetGeomFieldIndex(self, field_name);
      if (iField == -1)
      {
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
          return 6;
      }
      else
          return OGR_F_SetGeomFieldDirectly(self, iField, geom);
  }
SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeomFieldRef__SWIG_0(OGRFeatureShadow *self,int iField){
    return (OGRGeometryShadow*) OGR_F_GetGeomFieldRef(self, iField);
  }
SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeomFieldRef__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetGeomFieldIndex(self, field_name);
      if (i == -1)
      {
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
          return NULL;
      }
      else
          return (OGRGeometryShadow*) OGR_F_GetGeomFieldRef(self, i);
  }
SWIGINTERN OGRFeatureShadow *OGRFeatureShadow_Clone(OGRFeatureShadow *self){
    return (OGRFeatureShadow*) OGR_F_Clone(self);
  }
SWIGINTERN bool OGRFeatureShadow_Equal(OGRFeatureShadow *self,OGRFeatureShadow *feature){
    return (OGR_F_Equal(self, feature) > 0);
  }
SWIGINTERN int OGRFeatureShadow_GetFieldCount(OGRFeatureShadow *self){
    return OGR_F_GetFieldCount(self);
  }
SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_0(OGRFeatureShadow *self,int id){
    return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, id);
  }
SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, i);
      return NULL;
  }
SWIGINTERN int OGRFeatureShadow_GetGeomFieldCount(OGRFeatureShadow *self){
    return OGR_F_GetGeomFieldCount(self);
  }
SWIGINTERN OGRGeomFieldDefnShadow *OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_0(OGRFeatureShadow *self,int id){
      return (OGRGeomFieldDefnShadow *) OGR_F_GetGeomFieldDefnRef(self, id);
  }
SWIGINTERN OGRGeomFieldDefnShadow *OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetGeomFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          return (OGRGeomFieldDefnShadow *) OGR_F_GetGeomFieldDefnRef(self, i);
      return NULL;
  }
SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_0(OGRFeatureShadow *self,int id){
    return OGR_F_GetFieldAsString(self, id);
  }
SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
      {
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
          return NULL;
      }
      else
      {
          return OGR_F_GetFieldAsString(self, i);
      }
  }
SWIGINTERN char const *OGRFeatureShadow_GetFieldAsISO8601DateTime__SWIG_0(OGRFeatureShadow *self,int id,char **options=0){
    return OGR_F_GetFieldAsISO8601DateTime(self, id, options);
  }
SWIGINTERN char const *OGRFeatureShadow_GetFieldAsISO8601DateTime__SWIG_1(OGRFeatureShadow *self,char const *field_name,char **options=0){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          return OGR_F_GetFieldAsISO8601DateTime(self, i, options);
      return NULL;
  }
SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_0(OGRFeatureShadow *self,int id){
    return OGR_F_GetFieldAsInteger(self, id);
  }
SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  return OGR_F_GetFieldAsInteger(self, i);
      return 0;
  }
SWIGINTERN GIntBig OGRFeatureShadow_GetFieldAsInteger64__SWIG_0(OGRFeatureShadow *self,int id){
    return OGR_F_GetFieldAsInteger64(self, id);
  }
SWIGINTERN GIntBig OGRFeatureShadow_GetFieldAsInteger64__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          return OGR_F_GetFieldAsInteger64(self, i);
      return 0;
  }
SWIGINTERN double OGRFeatureShadow_GetFieldAsDouble__SWIG_0(OGRFeatureShadow *self,int id){
    return OGR_F_GetFieldAsDouble(self, id);
  }

  #define SWIG_From_double   PyFloat_FromDouble 

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

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

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

/* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
#ifndef SWIG_isfinite
/* isfinite() is a macro for C99 */
# if defined(isfinite)
#  define SWIG_isfinite(X) (isfinite(X))
# elif defined(__cplusplus) && __cplusplus >= 201103L
/* Use a template so that this works whether isfinite() is std::isfinite() or
 * in the global namespace.  The reality seems to vary between compiler
 * versions.
 *
 * Make sure namespace std exists to avoid compiler warnings.
 *
 * extern "C++" is required as this fragment can end up inside an extern "C" { } block
 */
namespace std { }
extern "C++" template<typename T>
inline int SWIG_isfinite_func(T x) {
  using namespace std;
  return isfinite(x);
}
#  define SWIG_isfinite(X) (SWIG_isfinite_func(X))
# elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
#  define SWIG_isfinite(X) (__builtin_isfinite(X))
# elif defined(_MSC_VER)
#  define SWIG_isfinite(X) (_finite(X))
# elif defined(__sun) && defined(__SVR4)
#  include <ieeefp.h>
#  define SWIG_isfinite(X) (finite(X))
# endif
#endif


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


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

SWIGINTERN void OGRFeatureShadow_SetField__SWIG_4(OGRFeatureShadow *self,int id,int year,int month,int day,int hour,int minute,float second,int tzflag){
    OGR_F_SetFieldDateTimeEx(self, id, year, month, day,
                             hour, minute, second,
                             tzflag);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_5(OGRFeatureShadow *self,char const *field_name,int year,int month,int day,int hour,int minute,float second,int tzflag){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  OGR_F_SetFieldDateTimeEx(self, i, year, month, day,
				 hour, minute, second,
				 tzflag);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldIntegerList(OGRFeatureShadow *self,int id,int nList,int *pList){
      OGR_F_SetFieldIntegerList(self, id, nList, pList);
  }

static GIntBig*
CreateCGIntBigListFromSequence( PyObject* pySeq, int* pnSize ) {
  /* check if is List */
  if ( !PySequence_Check(pySeq) ) {
    PyErr_SetString(PyExc_TypeError, "not a sequence");
    *pnSize = -1;
    return NULL;
  }
  Py_ssize_t size = PySequence_Size(pySeq);
  if( size > (Py_ssize_t)INT_MAX ) {
    PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    *pnSize = -1;
    return NULL;
  }
  if( (size_t)size > SIZE_MAX / sizeof(GIntBig) ) {
    PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    *pnSize = -1;
    return NULL;
  }
  *pnSize = (int)size;
  GIntBig* ret = (GIntBig*) malloc((*pnSize)*sizeof(GIntBig));
  if( !ret ) {
    PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    *pnSize = -1;
    return NULL;
  }
  for( int i = 0; i<*pnSize; i++ ) {
    PyObject *o = PySequence_GetItem(pySeq,i);
    if ( !PyArg_Parse(o,"L",&ret[i]) ) {
        PyErr_SetString(PyExc_TypeError, "not an integer");
        Py_DECREF(o);
        free(ret);
        *pnSize = -1;
        return NULL;
    }
    Py_DECREF(o);
  }
  return ret;
}

SWIGINTERN void OGRFeatureShadow_SetFieldInteger64List(OGRFeatureShadow *self,int id,int nList,GIntBig *pList){
      OGR_F_SetFieldInteger64List(self, id, nList, pList);
  }

static double*
CreateCDoubleListFromSequence( PyObject* pySeq, int* pnSize ) {
  /* check if is List */
  if ( !PySequence_Check(pySeq) ) {
    PyErr_SetString(PyExc_TypeError, "not a sequence");
    *pnSize = -1;
    return NULL;
  }
  Py_ssize_t size = PySequence_Size(pySeq);
  if( size > (Py_ssize_t)INT_MAX ) {
    PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    *pnSize = -1;
    return NULL;
  }
  if( (size_t)size > SIZE_MAX / sizeof(double) ) {
    PyErr_SetString(PyExc_RuntimeError, "too big sequence");
    *pnSize = -1;
    return NULL;
  }
  *pnSize = (int)size;
  double* ret = (double*) malloc((*pnSize)*sizeof(double));
  if( !ret ) {
    PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
    *pnSize = -1;
    return NULL;
  }
  for( int i = 0; i<*pnSize; i++ ) {
    PyObject *o = PySequence_GetItem(pySeq,i);
    if ( !PyArg_Parse(o,"d",&ret[i]) ) {
        PyErr_SetString(PyExc_TypeError, "not an number");
        Py_DECREF(o);
        free(ret);
        *pnSize = -1;
        return NULL;
    }
    Py_DECREF(o);
  }
  return ret;
}

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

static bool
GetBufferAsCharPtrIntSize( PyObject* input, int *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
  {
    if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
    {
      if( view->len > INT_MAX ) {
        PyBuffer_Release(view);
        PyErr_SetString(PyExc_RuntimeError, "too large buffer (>2GB)" );
        return false;
      }
      *viewIsValid = true;
      *nLen = (int) view->len;
      *pBuf = (char*) view->buf;
      return true;
    }
    else
    {
      PyErr_Clear();
    }
  }
  if (PyUnicode_Check(input))
  {
    size_t safeLen = 0;
    int ret;
    try {
      ret = SWIG_AsCharPtrAndSize(input, pBuf, &safeLen, alloc);
    }
    catch( const std::exception& )
    {
      PyErr_SetString(PyExc_MemoryError, "out of memory");
      return false;
    }
    if (!SWIG_IsOK(ret)) {
      PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
      return false;
    }

    if (safeLen) safeLen--;
    if( safeLen > INT_MAX ) {
      PyErr_SetString(PyExc_RuntimeError, "too large buffer (>2GB)" );
      return false;
    }
    *nLen = (int) safeLen;
    return true;
  }
  else
  {
    PyErr_SetString(PyExc_RuntimeError, "not a unicode string, bytes, bytearray or memoryview");
    return false;
  }
}

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

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

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

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


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

SWIGINTERN void delete_OGRFieldDefnShadow(OGRFieldDefnShadow *self){
    OGR_Fld_Destroy(self);
  }
SWIGINTERN OGRFieldDefnShadow *new_OGRFieldDefnShadow(char const *name_null_ok="unnamed",OGRFieldType field_type=OFTString){
    if (ValidateOGRFieldType(field_type))
        return (OGRFieldDefnShadow*) OGR_Fld_Create(name_null_ok, field_type);
    else
        return NULL;
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetName(OGRFieldDefnShadow *self){
    return OGR_Fld_GetNameRef(self);
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetNameRef(OGRFieldDefnShadow *self){
    return OGR_Fld_GetNameRef(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetName(OGRFieldDefnShadow *self,char const *name){
    OGR_Fld_SetName(self, name);
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetAlternativeName(OGRFieldDefnShadow *self){
    return OGR_Fld_GetAlternativeNameRef(self);
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetAlternativeNameRef(OGRFieldDefnShadow *self){
    return OGR_Fld_GetAlternativeNameRef(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetAlternativeName(OGRFieldDefnShadow *self,char const *alternativeName){
    OGR_Fld_SetAlternativeName(self, alternativeName);
  }
SWIGINTERN OGRFieldType OGRFieldDefnShadow_GetType(OGRFieldDefnShadow *self){
    return OGR_Fld_GetType(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetType(OGRFieldDefnShadow *self,OGRFieldType type){
    if (ValidateOGRFieldType(type))
        OGR_Fld_SetType(self, type);
  }
SWIGINTERN OGRFieldSubType OGRFieldDefnShadow_GetSubType(OGRFieldDefnShadow *self){
    return OGR_Fld_GetSubType(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetSubType(OGRFieldDefnShadow *self,OGRFieldSubType type){
    if (ValidateOGRFieldSubType(type))
        OGR_Fld_SetSubType(self, type);
  }
SWIGINTERN OGRJustification OGRFieldDefnShadow_GetJustify(OGRFieldDefnShadow *self){
    return OGR_Fld_GetJustify(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetJustify(OGRFieldDefnShadow *self,OGRJustification justify){
    OGR_Fld_SetJustify(self, justify);
  }
SWIGINTERN int OGRFieldDefnShadow_GetWidth(OGRFieldDefnShadow *self){
    return OGR_Fld_GetWidth(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetWidth(OGRFieldDefnShadow *self,int width){
    OGR_Fld_SetWidth(self, width);
  }
SWIGINTERN int OGRFieldDefnShadow_GetPrecision(OGRFieldDefnShadow *self){
    return OGR_Fld_GetPrecision(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetPrecision(OGRFieldDefnShadow *self,int precision){
    OGR_Fld_SetPrecision(self, precision);
  }
SWIGINTERN int OGRFieldDefnShadow_GetTZFlag(OGRFieldDefnShadow *self){
    return OGR_Fld_GetTZFlag(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetTZFlag(OGRFieldDefnShadow *self,int tzflag){
    OGR_Fld_SetTZFlag(self, tzflag);
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetTypeName(OGRFieldDefnShadow *self){
      return OGR_GetFieldTypeName(OGR_Fld_GetType(self));
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetFieldTypeName(OGRFieldDefnShadow *self,OGRFieldType type){
    return OGR_GetFieldTypeName(type);
  }
SWIGINTERN int OGRFieldDefnShadow_IsIgnored(OGRFieldDefnShadow *self){
    return OGR_Fld_IsIgnored( self );
  }
SWIGINTERN void OGRFieldDefnShadow_SetIgnored(OGRFieldDefnShadow *self,int bIgnored){
    OGR_Fld_SetIgnored( self, bIgnored );
  }
SWIGINTERN int OGRFieldDefnShadow_IsNullable(OGRFieldDefnShadow *self){
    return OGR_Fld_IsNullable( self );
  }
SWIGINTERN void OGRFieldDefnShadow_SetNullable(OGRFieldDefnShadow *self,int bNullable){
    OGR_Fld_SetNullable( self, bNullable );
  }
SWIGINTERN int OGRFieldDefnShadow_IsUnique(OGRFieldDefnShadow *self){
    return OGR_Fld_IsUnique( self );
  }
SWIGINTERN void OGRFieldDefnShadow_SetUnique(OGRFieldDefnShadow *self,int bUnique){
    OGR_Fld_SetUnique( self, bUnique );
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetDefault(OGRFieldDefnShadow *self){
    return OGR_Fld_GetDefault( self );
  }
SWIGINTERN void OGRFieldDefnShadow_SetDefault(OGRFieldDefnShadow *self,char const *pszValue){
    OGR_Fld_SetDefault( self, pszValue );
  }
SWIGINTERN int OGRFieldDefnShadow_IsDefaultDriverSpecific(OGRFieldDefnShadow *self){
    return OGR_Fld_IsDefaultDriverSpecific( self );
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetDomainName(OGRFieldDefnShadow *self){
    return OGR_Fld_GetDomainName(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetDomainName(OGRFieldDefnShadow *self,char const *name){
    OGR_Fld_SetDomainName( self, name );
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetComment(OGRFieldDefnShadow *self){
    return OGR_Fld_GetComment(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetComment(OGRFieldDefnShadow *self,char const *comment){
    OGR_Fld_SetComment( self, comment );
  }
SWIGINTERN void delete_OGRGeomFieldDefnShadow(OGRGeomFieldDefnShadow *self){
    OGR_GFld_Destroy(self);
  }
SWIGINTERN OGRGeomFieldDefnShadow *new_OGRGeomFieldDefnShadow(char const *name_null_ok="",OGRwkbGeometryType field_type=wkbUnknown){
    if( ValidateOGRGeometryType(field_type) )
        return (OGRGeomFieldDefnShadow*) OGR_GFld_Create(name_null_ok, field_type);
    else
        return NULL;
  }
SWIGINTERN char const *OGRGeomFieldDefnShadow_GetName(OGRGeomFieldDefnShadow *self){
    return OGR_GFld_GetNameRef(self);
  }
SWIGINTERN char const *OGRGeomFieldDefnShadow_GetNameRef(OGRGeomFieldDefnShadow *self){
    return OGR_GFld_GetNameRef(self);
  }
SWIGINTERN void OGRGeomFieldDefnShadow_SetName(OGRGeomFieldDefnShadow *self,char const *name){
    OGR_GFld_SetName(self, name);
  }
SWIGINTERN OGRwkbGeometryType OGRGeomFieldDefnShadow_GetType(OGRGeomFieldDefnShadow *self){
    return OGR_GFld_GetType(self);
  }
SWIGINTERN void OGRGeomFieldDefnShadow_SetType(OGRGeomFieldDefnShadow *self,OGRwkbGeometryType type){
    if( ValidateOGRGeometryType(type) )
        OGR_GFld_SetType(self, type);
  }
SWIGINTERN OSRSpatialReferenceShadow *OGRGeomFieldDefnShadow_GetSpatialRef(OGRGeomFieldDefnShadow *self){
    OGRSpatialReferenceH ref =  OGR_GFld_GetSpatialRef(self);
    if( ref )
        OSRReference(ref);
    return (OSRSpatialReferenceShadow*) ref;
  }
SWIGINTERN void OGRGeomFieldDefnShadow_SetSpatialRef(OGRGeomFieldDefnShadow *self,OSRSpatialReferenceShadow *srs){
     OGR_GFld_SetSpatialRef( self, (OGRSpatialReferenceH)srs );
  }
SWIGINTERN int OGRGeomFieldDefnShadow_IsIgnored(OGRGeomFieldDefnShadow *self){
    return OGR_GFld_IsIgnored( self );
  }
SWIGINTERN void OGRGeomFieldDefnShadow_SetIgnored(OGRGeomFieldDefnShadow *self,int bIgnored){
    OGR_GFld_SetIgnored( self, bIgnored );
  }
SWIGINTERN int OGRGeomFieldDefnShadow_IsNullable(OGRGeomFieldDefnShadow *self){
    return OGR_GFld_IsNullable( self );
  }
SWIGINTERN void OGRGeomFieldDefnShadow_SetNullable(OGRGeomFieldDefnShadow *self,int bNullable){
    return OGR_GFld_SetNullable( self, bNullable );
  }
SWIGINTERN OGRGeomCoordinatePrecisionShadow *OGRGeomFieldDefnShadow_GetCoordinatePrecision(OGRGeomFieldDefnShadow *self){
    return OGR_GFld_GetCoordinatePrecision(self);
  }
SWIGINTERN void OGRGeomFieldDefnShadow_SetCoordinatePrecision(OGRGeomFieldDefnShadow *self,OGRGeomCoordinatePrecisionShadow *coordPrec){
    OGR_GFld_SetCoordinatePrecision(self, coordPrec);
  }

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



static bool
GetBufferAsCharPtrSizetSize( PyObject* input, size_t *nLen, char **pBuf, int *alloc, bool *viewIsValid, Py_buffer *view ) {
  {
    if (PyObject_GetBuffer(input, view, PyBUF_SIMPLE) == 0)
    {
      *viewIsValid = true;
      *nLen = view->len;
      *pBuf = (char*) view->buf;
      return true;
    }
    else
    {
      PyErr_Clear();
    }
  }
  if (PyUnicode_Check(input))
  {
    size_t safeLen = 0;
    int ret;
    try {
      ret = SWIG_AsCharPtrAndSize(input, pBuf, &safeLen, alloc);
    }
    catch( const std::exception& )
    {
      PyErr_SetString(PyExc_MemoryError, "out of memory");
      return false;
    }
    if (!SWIG_IsOK(ret)) {
      PyErr_SetString(PyExc_RuntimeError, "invalid Unicode string" );
      return false;
    }

    if (safeLen) safeLen--;
    *nLen = safeLen;
    return true;
  }
  else
  {
    PyErr_SetString(PyExc_RuntimeError, "not a unicode string, bytes, bytearray or memoryview");
    return false;
  }
}


SWIGINTERN int
SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
{
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(obj)) {
    long v = PyInt_AsLong(obj);
    if (v >= 0) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      return SWIG_OverflowError;
    }
  } else
#endif
  if (PyLong_Check(obj)) {
    unsigned long v = PyLong_AsUnsignedLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      return SWIG_OverflowError;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    unsigned long v = PyLong_AsUnsignedLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
      // Largest double not larger than ULONG_MAX (not portably calculated easily)
      // Note that double(ULONG_MAX) is stored in a double rounded up by one (for 64-bit unsigned long)
      // 0xfffffffffffff800ULL == (uint64_t)std::nextafter(double(__uint128_t(ULONG_MAX)+1), double(0))
      const double ulong_max = sizeof(unsigned long) == 8 ? 0xfffffffffffff800ULL : ULONG_MAX;
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ulong_max)) {
	if (val) *val = (unsigned long)(d);
	return res;
      }
    }
  }
#endif
  return SWIG_TypeError;
}


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


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


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


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



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



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



  OGRGeometryShadow *CreateGeometryFromEsriJson( const char * input_string ) {
    OGRGeometryShadow* geom = (OGRGeometryShadow*)OGR_G_CreateGeometryFromEsriJson(input_string);
    return geom;
  }



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

  OGRGeometryH hPolygon = NULL;

  OGRErr eErr;

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

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

  return (OGRGeometryShadow* )hPolygon;
  }


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

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


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


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


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


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


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


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

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

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

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

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

    OGR_G_GetPoint( self, iPoint, argout+0, argout+1, NULL );
  }
SWIGINTERN int OGRGeometryShadow_GetGeometryCount(OGRGeometryShadow *self){
    return OGR_G_GetGeometryCount(self);
  }
SWIGINTERN void OGRGeometryShadow_SetPoint(OGRGeometryShadow *self,int point,double x,double y,double z=0){
    OGR_G_SetPoint(self, point, x, y, z);
  }
SWIGINTERN void OGRGeometryShadow_SetPointM(OGRGeometryShadow *self,int point,double x,double y,double m){
      OGR_G_SetPointM(self, point, x, y, m);
  }
SWIGINTERN void OGRGeometryShadow_SetPointZM(OGRGeometryShadow *self,int point,double x,double y,double z,double m){
      OGR_G_SetPointZM(self, point, x, y, z, m);
  }
SWIGINTERN void OGRGeometryShadow_SetPoint_2D(OGRGeometryShadow *self,int point,double x,double y){
    OGR_G_SetPoint_2D(self, point, x, y);
  }
SWIGINTERN void OGRGeometryShadow_SwapXY(OGRGeometryShadow *self){
    OGR_G_SwapXY(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetGeometryRef(OGRGeometryShadow *self,int geom){
    return (OGRGeometryShadow*) OGR_G_GetGeometryRef(self, geom);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Simplify(OGRGeometryShadow *self,double tolerance){
    return (OGRGeometryShadow*) OGR_G_Simplify(self, tolerance);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SimplifyPreserveTopology(OGRGeometryShadow *self,double tolerance){
    return (OGRGeometryShadow*) OGR_G_SimplifyPreserveTopology(self, tolerance);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_DelaunayTriangulation(OGRGeometryShadow *self,double dfTolerance=0.0,int bOnlyEdges=FALSE){
    return (OGRGeometryShadow*) OGR_G_DelaunayTriangulation(self, dfTolerance, bOnlyEdges);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Polygonize(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Polygonize(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Boundary(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Boundary(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetBoundary(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Boundary(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_ConvexHull(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_ConvexHull(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_ConcaveHull(OGRGeometryShadow *self,double ratio,bool allowHoles){
    return (OGRGeometryShadow*) OGR_G_ConcaveHull(self, ratio, allowHoles);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_MakeValid(OGRGeometryShadow *self,char **options=NULL){
    return (OGRGeometryShadow*) OGR_G_MakeValidEx(self, options);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SetPrecision(OGRGeometryShadow *self,double gridSize,int flags=0){
    return (OGRGeometryShadow*) OGR_G_SetPrecision(self, gridSize, flags);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Normalize(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Normalize(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_RemoveLowerDimensionSubGeoms(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_RemoveLowerDimensionSubGeoms(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Buffer__SWIG_0(OGRGeometryShadow *self,double distance,int quadsecs=30){
    return (OGRGeometryShadow*) OGR_G_Buffer( self, distance, quadsecs );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Buffer__SWIG_1(OGRGeometryShadow *self,double distance,char **options){
    return (OGRGeometryShadow*) OGR_G_BufferEx( self, distance, options );
  }
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_UnaryUnion(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_UnaryUnion( self );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Difference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_Difference( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymmetricDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
  }
SWIGINTERN double OGRGeometryShadow_Distance(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_Distance(self, other);
  }
SWIGINTERN double OGRGeometryShadow_Distance3D(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_Distance3D(self, other);
  }
SWIGINTERN void OGRGeometryShadow_Empty(OGRGeometryShadow *self){
    OGR_G_Empty(self);
  }
SWIGINTERN bool OGRGeometryShadow_IsEmpty(OGRGeometryShadow *self){
    return (OGR_G_IsEmpty(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_IsValid(OGRGeometryShadow *self){
    return (OGR_G_IsValid(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_IsSimple(OGRGeometryShadow *self){
    return (OGR_G_IsSimple(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_IsRing(OGRGeometryShadow *self){
    return (OGR_G_IsRing(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Intersects(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Intersects(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Intersect(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Intersects(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Equals(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Equals(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Equal(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Equals(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Disjoint(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Disjoint(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Touches(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Touches(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Crosses(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Crosses(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Within(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Within(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Contains(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Contains(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Overlaps(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Overlaps(self, other) > 0);
  }
SWIGINTERN OGRErr OGRGeometryShadow_TransformTo(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
    return OGR_G_TransformTo(self, reference);
  }
SWIGINTERN OGRErr OGRGeometryShadow_Transform__SWIG_0(OGRGeometryShadow *self,OSRCoordinateTransformationShadow *trans){
    return OGR_G_Transform(self, trans);
  }
SWIGINTERN OSRSpatialReferenceShadow *OGRGeometryShadow_GetSpatialReference(OGRGeometryShadow *self){
    OGRSpatialReferenceH ref =  OGR_G_GetSpatialReference(self);
    if( ref )
        OSRReference(ref);
    return (OSRSpatialReferenceShadow*) ref;
  }
SWIGINTERN void OGRGeometryShadow_AssignSpatialReference(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
    OGR_G_AssignSpatialReference(self, reference);
  }
SWIGINTERN void OGRGeometryShadow_CloseRings(OGRGeometryShadow *self){
    OGR_G_CloseRings(self);
  }
SWIGINTERN void OGRGeometryShadow_FlattenTo2D(OGRGeometryShadow *self){
    OGR_G_FlattenTo2D(self);
  }
SWIGINTERN void OGRGeometryShadow_Segmentize(OGRGeometryShadow *self,double dfMaxLength){
    OGR_G_Segmentize(self, dfMaxLength);
  }
SWIGINTERN void OGRGeometryShadow_GetEnvelope(OGRGeometryShadow *self,double argout[4]){
    OGR_G_GetEnvelope(self, (OGREnvelope*)argout);
  }
SWIGINTERN void OGRGeometryShadow_GetEnvelope3D(OGRGeometryShadow *self,double argout[6]){
    OGR_G_GetEnvelope3D(self, (OGREnvelope3D*)argout);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Centroid(OGRGeometryShadow *self){
    OGRGeometryShadow *pt = (OGRGeometryShadow*) OGR_G_CreateGeometry( wkbPoint );
    OGR_G_Centroid( self, pt );
    return pt;
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_PointOnSurface(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_PointOnSurface( self );
  }
SWIGINTERN size_t OGRGeometryShadow_WkbSize(OGRGeometryShadow *self){
    return OGR_G_WkbSizeEx(self);
  }

  #define SWIG_From_long   PyInt_FromLong 


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


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


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

SWIGINTERN int OGRGeometryShadow_GetCoordinateDimension(OGRGeometryShadow *self){
    return OGR_G_GetCoordinateDimension(self);
  }
SWIGINTERN int OGRGeometryShadow_CoordinateDimension(OGRGeometryShadow *self){
    return OGR_G_CoordinateDimension(self);
  }
SWIGINTERN int OGRGeometryShadow_Is3D(OGRGeometryShadow *self){
      return OGR_G_Is3D(self);
  }
SWIGINTERN int OGRGeometryShadow_IsMeasured(OGRGeometryShadow *self){
      return OGR_G_IsMeasured(self);
  }
SWIGINTERN void OGRGeometryShadow_SetCoordinateDimension(OGRGeometryShadow *self,int dimension){
    OGR_G_SetCoordinateDimension(self, dimension);
  }
SWIGINTERN void OGRGeometryShadow_Set3D(OGRGeometryShadow *self,int b3D){
      OGR_G_Set3D(self, b3D);
  }
SWIGINTERN void OGRGeometryShadow_SetMeasured(OGRGeometryShadow *self,int bMeasured){
      OGR_G_SetMeasured(self, bMeasured);
  }
SWIGINTERN int OGRGeometryShadow_GetDimension(OGRGeometryShadow *self){
    return OGR_G_GetDimension(self);
  }
SWIGINTERN int OGRGeometryShadow_HasCurveGeometry(OGRGeometryShadow *self,int bLookForCircular=FALSE){
        return OGR_G_HasCurveGeometry(self, bLookForCircular);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetLinearGeometry(OGRGeometryShadow *self,double dfMaxAngleStepSizeDegrees=0.0,char **options=NULL){
    return (OGRGeometryShadow* )OGR_G_GetLinearGeometry(self, dfMaxAngleStepSizeDegrees, options);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetCurveGeometry(OGRGeometryShadow *self,char **options=NULL){
    return (OGRGeometryShadow* )OGR_G_GetCurveGeometry(self, options);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Value(OGRGeometryShadow *self,double dfDistance){
    return OGR_G_Value(self, dfDistance);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Transform__SWIG_1(OGRGeometryShadow *self,OGRGeomTransformerShadow *transformer){
    return (OGRGeometryShadow*)OGR_GeomTransformer_Transform(transformer, self);
  }
SWIGINTERN OGRPreparedGeometryShadow *OGRGeometryShadow_CreatePreparedGeometry(OGRGeometryShadow *self){
    return (OGRPreparedGeometryShadow*)OGRCreatePreparedGeometry(self);
  }
SWIGINTERN void delete_OGRPreparedGeometryShadow(OGRPreparedGeometryShadow *self){
    OGRDestroyPreparedGeometry( self );
  }
SWIGINTERN bool OGRPreparedGeometryShadow_Intersects(OGRPreparedGeometryShadow *self,OGRGeometryShadow const *otherGeom){
    return OGRPreparedGeometryIntersects(self, (OGRGeometryH)otherGeom);
  }
SWIGINTERN bool OGRPreparedGeometryShadow_Contains(OGRPreparedGeometryShadow *self,OGRGeometryShadow const *otherGeom){
    return OGRPreparedGeometryContains(self, (OGRGeometryH)otherGeom);
  }
SWIGINTERN OGRGeomTransformerShadow *new_OGRGeomTransformerShadow(OSRCoordinateTransformationShadow *ct,char **options=NULL){
    return OGR_GeomTransformer_Create(ct, options);
  }
SWIGINTERN void delete_OGRGeomTransformerShadow(OGRGeomTransformerShadow *self){
    OGR_GeomTransformer_Destroy( self );
  }
SWIGINTERN OGRGeometryShadow *OGRGeomTransformerShadow_Transform(OGRGeomTransformerShadow *self,OGRGeometryShadow *src_geom){
    return (OGRGeometryShadow*)OGR_GeomTransformer_Transform(self, src_geom);
  }
SWIGINTERN void delete_OGRFieldDomainShadow(OGRFieldDomainShadow *self){
    OGR_FldDomain_Destroy(self);
  }
SWIGINTERN char const *OGRFieldDomainShadow_GetName(OGRFieldDomainShadow *self){
    return OGR_FldDomain_GetName(self);
  }
SWIGINTERN char const *OGRFieldDomainShadow_GetDescription(OGRFieldDomainShadow *self){
    return OGR_FldDomain_GetDescription(self);
  }
SWIGINTERN OGRFieldType OGRFieldDomainShadow_GetFieldType(OGRFieldDomainShadow *self){
    return OGR_FldDomain_GetFieldType(self);
  }
SWIGINTERN OGRFieldSubType OGRFieldDomainShadow_GetFieldSubType(OGRFieldDomainShadow *self){
    return OGR_FldDomain_GetFieldSubType(self);
  }
SWIGINTERN OGRFieldDomainType OGRFieldDomainShadow_GetDomainType(OGRFieldDomainShadow *self){
    return OGR_FldDomain_GetDomainType(self);
  }
SWIGINTERN OGRFieldDomainSplitPolicy OGRFieldDomainShadow_GetSplitPolicy(OGRFieldDomainShadow *self){
    return OGR_FldDomain_GetSplitPolicy(self);
  }
SWIGINTERN void OGRFieldDomainShadow_SetSplitPolicy(OGRFieldDomainShadow *self,OGRFieldDomainSplitPolicy policy){
    OGR_FldDomain_SetSplitPolicy(self, policy);
  }
SWIGINTERN OGRFieldDomainMergePolicy OGRFieldDomainShadow_GetMergePolicy(OGRFieldDomainShadow *self){
    return OGR_FldDomain_GetMergePolicy(self);
  }
SWIGINTERN void OGRFieldDomainShadow_SetMergePolicy(OGRFieldDomainShadow *self,OGRFieldDomainMergePolicy policy){
    OGR_FldDomain_SetMergePolicy(self, policy);
  }
SWIGINTERN OGRCodedValue const *OGRFieldDomainShadow_GetEnumeration(OGRFieldDomainShadow *self){
    return OGR_CodedFldDomain_GetEnumeration(self);
  }
SWIGINTERN double OGRFieldDomainShadow_GetMinAsDouble(OGRFieldDomainShadow *self){
      const OGRField* psVal = OGR_RangeFldDomain_GetMin(self, NULL);
      if( psVal == NULL || OGR_RawField_IsUnset(psVal) )
          return CPLAtof("-inf");
      const OGRFieldType eType = OGR_FldDomain_GetFieldType(self);
      if( eType == OFTInteger )
          return psVal->Integer;
      if( eType == OFTInteger64 )
          return (double)psVal->Integer64;
      if( eType == OFTReal )
          return psVal->Real;
      return CPLAtof("-inf");
  }
SWIGINTERN char const *OGRFieldDomainShadow_GetMinAsString(OGRFieldDomainShadow *self){
    const OGRField* psVal = OGR_RangeFldDomain_GetMin(self, NULL);
      if( psVal == NULL || OGR_RawField_IsUnset(psVal) )
          return NULL;
      const OGRFieldType eType = OGR_FldDomain_GetFieldType(self);
      if( eType == OFTInteger )
          return CPLSPrintf("%d", psVal->Integer);
      if( eType == OFTInteger64 )
          return CPLSPrintf(CPL_FRMT_GIB, psVal->Integer64);
      if( eType == OFTReal )
          return CPLSPrintf("%.18g", psVal->Real);
      if( eType == OFTDateTime )
          return CPLSPrintf("%04d-%02d-%02dT%02d:%02d:%02d",
                     psVal->Date.Year,
                     psVal->Date.Month,
                     psVal->Date.Day,
                     psVal->Date.Hour,
                     psVal->Date.Minute,
                     static_cast<int>(psVal->Date.Second + 0.5));
     return NULL;
  }
SWIGINTERN bool OGRFieldDomainShadow_IsMinInclusive(OGRFieldDomainShadow *self){
      bool isInclusive = false;
      (void)OGR_RangeFldDomain_GetMin(self, &isInclusive);
      return isInclusive;
  }
SWIGINTERN double OGRFieldDomainShadow_GetMaxAsDouble(OGRFieldDomainShadow *self){
      const OGRField* psVal = OGR_RangeFldDomain_GetMax(self, NULL);
      if( psVal == NULL || OGR_RawField_IsUnset(psVal) )
          return CPLAtof("inf");
      const OGRFieldType eType = OGR_FldDomain_GetFieldType(self);
      if( eType == OFTInteger )
          return psVal->Integer;
      if( eType == OFTInteger64 )
          return (double)psVal->Integer64;
      if( eType == OFTReal )
          return psVal->Real;
      return CPLAtof("inf");
  }
SWIGINTERN char const *OGRFieldDomainShadow_GetMaxAsString(OGRFieldDomainShadow *self){
    const OGRField* psVal = OGR_RangeFldDomain_GetMax(self, NULL);
      if( psVal == NULL || OGR_RawField_IsUnset(psVal) )
          return NULL;
      const OGRFieldType eType = OGR_FldDomain_GetFieldType(self);
      if( eType == OFTInteger )
          return CPLSPrintf("%d", psVal->Integer);
      if( eType == OFTInteger64 )
          return CPLSPrintf(CPL_FRMT_GIB, psVal->Integer64);
      if( eType == OFTReal )
          return CPLSPrintf("%.18g", psVal->Real);
      if( eType == OFTDateTime )
          return CPLSPrintf("%04d-%02d-%02dT%02d:%02d:%02d",
                     psVal->Date.Year,
                     psVal->Date.Month,
                     psVal->Date.Day,
                     psVal->Date.Hour,
                     psVal->Date.Minute,
                     static_cast<int>(psVal->Date.Second + 0.5));
     return NULL;
  }
SWIGINTERN bool OGRFieldDomainShadow_IsMaxInclusive(OGRFieldDomainShadow *self){
      bool isInclusive = false;
      (void)OGR_RangeFldDomain_GetMax(self, &isInclusive);
      return isInclusive;
  }
SWIGINTERN char const *OGRFieldDomainShadow_GetGlob(OGRFieldDomainShadow *self){
      return OGR_GlobFldDomain_GetGlob(self);
  }

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


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


static
OGRFieldDomainShadow* CreateRangeFieldDomainDateTime( const char *name,
                                              const char* description,
                                              const char* min,
                                              bool minIsInclusive,
                                              const char* max,
                                              double maxIsInclusive) {
  OGRField sMin;
  OGRField sMax;
  if( !OGRParseXMLDateTime(min, &sMin))
  {
    CPLError(CE_Failure, CPLE_AppDefined,
             "Invalid min: %s",
             min);
    return NULL;
  }
  if( !OGRParseXMLDateTime(max, &sMax))
  {
    CPLError(CE_Failure, CPLE_AppDefined,
             "Invalid max: %s",
             max);
    return NULL;
  }
  return (OGRFieldDomainShadow*) OGR_RangeFldDomain_Create( name,
                                                            description,
                                                            OFTDateTime,
                                                            OFSTNone,
                                                            &sMin,
                                                            minIsInclusive,
                                                            &sMax,
                                                            maxIsInclusive );
}


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

SWIGINTERN void delete_OGRGeomCoordinatePrecisionShadow(OGRGeomCoordinatePrecisionShadow *self){
    OGRGeomCoordinatePrecisionDestroy(self);
  }
SWIGINTERN void OGRGeomCoordinatePrecisionShadow_Set(OGRGeomCoordinatePrecisionShadow *self,double xyResolution,double zResolution,double mResolution){
      OGRGeomCoordinatePrecisionSet(self, xyResolution, zResolution, mResolution);
  }
SWIGINTERN void OGRGeomCoordinatePrecisionShadow_SetFromMeter(OGRGeomCoordinatePrecisionShadow *self,OSRSpatialReferenceShadow *srs,double xyMeterResolution,double zMeterResolution,double mResolution){
      OGRGeomCoordinatePrecisionSetFromMeter(self, srs, xyMeterResolution, zMeterResolution, mResolution);
  }
SWIGINTERN double OGRGeomCoordinatePrecisionShadow_GetXYResolution(OGRGeomCoordinatePrecisionShadow *self){
    return OGRGeomCoordinatePrecisionGetXYResolution(self);
  }
SWIGINTERN double OGRGeomCoordinatePrecisionShadow_GetZResolution(OGRGeomCoordinatePrecisionShadow *self){
    return OGRGeomCoordinatePrecisionGetZResolution(self);
  }
SWIGINTERN double OGRGeomCoordinatePrecisionShadow_GetMResolution(OGRGeomCoordinatePrecisionShadow *self){
    return OGRGeomCoordinatePrecisionGetMResolution(self);
  }
SWIGINTERN char **OGRGeomCoordinatePrecisionShadow_GetFormats(OGRGeomCoordinatePrecisionShadow *self){
    return OGRGeomCoordinatePrecisionGetFormats(self);
  }
SWIGINTERN char **OGRGeomCoordinatePrecisionShadow_GetFormatSpecificOptions(OGRGeomCoordinatePrecisionShadow *self,char const *formatName){
    return OGRGeomCoordinatePrecisionGetFormatSpecificOptions(self, formatName);
  }
SWIGINTERN void OGRGeomCoordinatePrecisionShadow_SetFormatSpecificOptions(OGRGeomCoordinatePrecisionShadow *self,char const *formatName,char **formatSpecificOptions){
    OGRGeomCoordinatePrecisionSetFormatSpecificOptions(self, formatName, formatSpecificOptions);
  }

static
OGRGeomCoordinatePrecisionShadow* CreateGeomCoordinatePrecision() {
  return OGRGeomCoordinatePrecisionCreate();
}


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

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

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

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


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


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


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


  OGRDataSourceShadow* OpenShared( const char *utf8_path, int update =0 ) {
    CPLErrorReset();
    int nOpenFlags = GDAL_OF_VECTOR | GDAL_OF_SHARED;
    if( update )
      nOpenFlags |= GDAL_OF_UPDATE;
#ifdef SWIGPYTHON
    if( GetUseExceptions() )
      nOpenFlags |= GDAL_OF_VERBOSE_ERROR;
#endif
    OGRDataSourceShadow* ds = (OGRDataSourceShadow*)GDALOpenEx( utf8_path, nOpenFlags, NULL,
                                      NULL, NULL );
#ifndef SWIGPYTHON
    if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
    {
        OGRReleaseDataSource(ds);
        ds = NULL;
    }
#endif
    return ds;
  }


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

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


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

    if( papszArgv == NULL )
        return NULL;

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

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

    if( bReloadDrivers )
    {
        GDALAllRegister();
    }

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


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

#ifdef __cplusplus
extern "C" {
#endif
SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetUseExceptions", 0, 0, 0)) SWIG_fail;
  {
#ifdef SED_HACKS
    if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
#endif
    result = GetUseExceptions();
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__GetExceptionsLocal(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "_GetExceptionsLocal", 0, 0, 0)) SWIG_fail;
  {
#ifdef SED_HACKS
    if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
#endif
    result = (int)_GetExceptionsLocal();
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__SetExceptionsLocal(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_SetExceptionsLocal" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
#ifdef SED_HACKS
    if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
#endif
    _SetExceptionsLocal(arg1);
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__UseExceptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "_UseExceptions", 0, 0, 0)) SWIG_fail;
  _UseExceptions();
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__DontUseExceptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "_DontUseExceptions", 0, 0, 0)) SWIG_fail;
  _DontUseExceptions();
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap__UserHasSpecifiedIfUsingExceptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "_UserHasSpecifiedIfUsingExceptions", 0, 0, 0)) SWIG_fail;
  {
#ifdef SED_HACKS
    if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
#endif
    result = (int)_UserHasSpecifiedIfUsingExceptions();
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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


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


SWIGINTERN PyObject *_wrap_MajorObject_GetMetadataDomainList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadataDomainList" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALMajorObjectShadow_GetMetadataDomainList(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_Dict(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
  char *arg2 = (char *) "" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_Dict", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  if (swig_obj[1]) {
    res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_Dict" "', argument " "2"" of type '" "char const *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALMajorObjectShadow_GetMetadata_Dict(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **dict */
    resultobj = GetCSLStringAsPyDict(result, false);
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_GetMetadata_List(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
  char *arg2 = (char *) "" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "MajorObject_GetMetadata_List", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_GetMetadata_List" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  if (swig_obj[1]) {
    res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MajorObject_GetMetadata_List" "', argument " "2"" of type '" "char const *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)GDALMajorObjectShadow_GetMetadata_List(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **options -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_MajorObject_SetMetadata__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  char *arg3 = (char *) "" ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  CPLErr result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_GDALMajorObjectShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MajorObject_SetMetadata" "', argument " "1"" of type '" "GDALMajorObjectShadow *""'"); 
  }
  arg1 = reinterpret_cast< GDALMajorObjectShadow * >(argp1);
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  if (swig_obj[2]) {
    res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MajorObject_SetMetadata" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_0(arg1,arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


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


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


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


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


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

SWIGINTERN PyObject *_wrap_GetGEOSVersionMajor(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetGEOSVersionMajor", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GetGEOSVersionMajor();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetGEOSVersionMinor(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetGEOSVersionMinor", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GetGEOSVersionMinor();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetGEOSVersionMicro(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetGEOSVersionMicro", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)GetGEOSVersionMicro();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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


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


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


SWIGINTERN PyObject *_wrap_StyleTable_LoadStyleTable(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "StyleTable_LoadStyleTable", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_LoadStyleTable" "', argument " "1"" of type '" "OGRStyleTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRStyleTableShadow_LoadStyleTable(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_StyleTable_SaveStyleTable(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "StyleTable_SaveStyleTable", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRStyleTableShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "StyleTable_SaveStyleTable" "', argument " "1"" of type '" "OGRStyleTableShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRStyleTableShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRStyleTableShadow_SaveStyleTable(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


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


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


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


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


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

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

SWIGINTERN PyObject *_wrap_new_ArrowArray(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  ArrowArray *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "new_ArrowArray", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (ArrowArray *)new_ArrowArray();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowArray, SWIG_POINTER_NEW |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_ArrowArray(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  ArrowArray *arg1 = (ArrowArray *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArray, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ArrowArray" "', argument " "1"" of type '" "ArrowArray *""'"); 
  }
  arg1 = reinterpret_cast< ArrowArray * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_ArrowArray(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ArrowArray__getPtr(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  ArrowArray *arg1 = (ArrowArray *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  VoidPtrAsLong result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArray, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowArray__getPtr" "', argument " "1"" of type '" "ArrowArray *""'"); 
  }
  arg1 = reinterpret_cast< ArrowArray * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (VoidPtrAsLong)ArrowArray__getPtr(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromVoidPtr(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ArrowArray_GetChildrenCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  ArrowArray *arg1 = (ArrowArray *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GIntBig result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArray, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowArray_GetChildrenCount" "', argument " "1"" of type '" "ArrowArray *""'"); 
  }
  arg1 = reinterpret_cast< ArrowArray * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = ArrowArray_GetChildrenCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ArrowArray_GetLength(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  ArrowArray *arg1 = (ArrowArray *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GIntBig result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArray, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowArray_GetLength" "', argument " "1"" of type '" "ArrowArray *""'"); 
  }
  arg1 = reinterpret_cast< ArrowArray * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = ArrowArray_GetLength(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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

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

SWIGINTERN PyObject *_wrap_new_ArrowSchema(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  ArrowSchema *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "new_ArrowSchema", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (ArrowSchema *)new_ArrowSchema();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowSchema, SWIG_POINTER_NEW |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_ArrowSchema(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  ArrowSchema *arg1 = (ArrowSchema *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowSchema, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ArrowSchema" "', argument " "1"" of type '" "ArrowSchema *""'"); 
  }
  arg1 = reinterpret_cast< ArrowSchema * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_ArrowSchema(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ArrowSchema__getPtr(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  ArrowSchema *arg1 = (ArrowSchema *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  VoidPtrAsLong result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowSchema, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowSchema__getPtr" "', argument " "1"" of type '" "ArrowSchema *""'"); 
  }
  arg1 = reinterpret_cast< ArrowSchema * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (VoidPtrAsLong)ArrowSchema__getPtr(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromVoidPtr(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ArrowSchema_GetName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  ArrowSchema *arg1 = (ArrowSchema *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowSchema, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowSchema_GetName" "', argument " "1"" of type '" "ArrowSchema *""'"); 
  }
  arg1 = reinterpret_cast< ArrowSchema * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)ArrowSchema_GetName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ArrowSchema_GetChildrenCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  ArrowSchema *arg1 = (ArrowSchema *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GIntBig result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowSchema, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowSchema_GetChildrenCount" "', argument " "1"" of type '" "ArrowSchema *""'"); 
  }
  arg1 = reinterpret_cast< ArrowSchema * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = ArrowSchema_GetChildrenCount(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ArrowSchema_GetChild(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  ArrowSchema *arg1 = (ArrowSchema *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  ArrowSchema *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ArrowSchema_GetChild", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowSchema, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowSchema_GetChild" "', argument " "1"" of type '" "ArrowSchema *""'"); 
  }
  arg1 = reinterpret_cast< ArrowSchema * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ArrowSchema_GetChild" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (ArrowSchema *)ArrowSchema_GetChild(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowSchema, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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

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

SWIGINTERN PyObject *_wrap_delete_ArrowArrayStream(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  ArrowArrayStream *arg1 = (ArrowArrayStream *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArrayStream, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ArrowArrayStream" "', argument " "1"" of type '" "ArrowArrayStream *""'"); 
  }
  arg1 = reinterpret_cast< ArrowArrayStream * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_ArrowArrayStream(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ArrowArrayStream_GetSchema(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  ArrowArrayStream *arg1 = (ArrowArrayStream *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  ArrowSchema *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArrayStream, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowArrayStream_GetSchema" "', argument " "1"" of type '" "ArrowArrayStream *""'"); 
  }
  arg1 = reinterpret_cast< ArrowArrayStream * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (ArrowSchema *)ArrowArrayStream_GetSchema(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowSchema, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ArrowArrayStream_GetNextRecordBatch(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  ArrowArrayStream *arg1 = (ArrowArrayStream *) 0 ;
  char **arg2 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  ArrowArray *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ArrowArrayStream_GetNextRecordBatch", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_ArrowArrayStream, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrowArrayStream_GetNextRecordBatch" "', argument " "1"" of type '" "ArrowArrayStream *""'"); 
  }
  arg1 = reinterpret_cast< ArrowArrayStream * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (ArrowArray *)ArrowArrayStream_GetNextRecordBatch(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowArray, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


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

SWIGINTERN PyObject *_wrap_Layer_GetDataset(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GDALDatasetShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetDataset" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (GDALDatasetShadow *)OGRLayerShadow_GetDataset(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_Rename(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  OGRErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Layer_Rename", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Rename" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Rename" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_Rename(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilter__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetSpatialFilter" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRLayerShadow_SetSpatialFilter__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilterRect__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  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 ;
  
  (void)self;
  if ((nobjs < 5) || (nobjs > 5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilterRect" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetSpatialFilterRect" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_SetSpatialFilterRect" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_SetSpatialFilterRect" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_SetSpatialFilterRect" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRLayerShadow_SetSpatialFilterRect__SWIG_0(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilter__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 ;
  OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  
  (void)self;
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilter" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetSpatialFilter" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_SetSpatialFilter" "', argument " "3"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRLayerShadow_SetSpatialFilter__SWIG_1(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Layer_SetSpatialFilterRect__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  
  (void)self;
  if ((nobjs < 6) || (nobjs > 6)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetSpatialFilterRect" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetSpatialFilterRect" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_SetSpatialFilterRect" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_SetSpatialFilterRect" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Layer_SetSpatialFilterRect" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Layer_SetSpatialFilterRect" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRLayerShadow_SetSpatialFilterRect__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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


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


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


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


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


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


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


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


SWIGINTERN PyObject *_wrap_Layer_GetFeature(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  GIntBig arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  OGRFeatureShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Layer_GetFeature", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFeatureShadow *)OGRLayerShadow_GetFeature(arg1,SWIG_STD_MOVE(arg2));
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Layer_SetNextByIndex(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  GIntBig arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  OGRErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Layer_SetNextByIndex", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetNextByIndex" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_SetNextByIndex(arg1,SWIG_STD_MOVE(arg2));
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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


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


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


SWIGINTERN PyObject *_wrap_Layer_UpdateFeature(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
  int arg3 ;
  int *arg4 = (int *) 0 ;
  int arg5 ;
  int *arg6 = (int *) 0 ;
  bool arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool val7 ;
  int ecode7 = 0 ;
  PyObject *swig_obj[5] ;
  OGRErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Layer_UpdateFeature", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_UpdateFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_UpdateFeature" "', argument " "2"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
  {
    /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    arg4 = CreateCIntListFromSequence(swig_obj[2], &arg3);
    if( arg3 < 0 ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    arg6 = CreateCIntListFromSequence(swig_obj[3], &arg5);
    if( arg5 < 0 ) {
      SWIG_fail;
    }
  }
  ecode7 = SWIG_AsVal_bool(swig_obj[4], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Layer_UpdateFeature" "', argument " "7"" of type '" "bool""'");
  } 
  arg7 = static_cast< bool >(val7);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_UpdateFeature(arg1,arg2,arg3,(int const *)arg4,arg5,(int const *)arg6,arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg4);
  }
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg6);
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg4);
  }
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg6);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_DeleteFeature(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  GIntBig arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  OGRErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Layer_DeleteFeature", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_DeleteFeature" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_DeleteFeature(arg1,SWIG_STD_MOVE(arg2));
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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


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


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


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


SWIGINTERN PyObject *_wrap_Layer_GetExtent3D(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  double *arg2 = (double *) (double *)0 ;
  int *arg3 = (int *) NULL ;
  int arg4 = (int) 1 ;
  int arg5 = (int) 0 ;
  int arg6 = (int) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double argout2[6] ;
  int isvalid2 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"force",  (char *)"can_return_null",  (char *)"geom_field",  NULL 
  };
  
  {
    /* %typemap(in,numinputs=0) (double argout2[6], int* isvalid2) */
    arg2 = argout2;
    arg3 = &isvalid2;
  }
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOO:Layer_GetExtent3D", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetExtent3D" "', 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_GetExtent3D" "', 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_GetExtent3D" "', argument " "5"" of type '" "int""'");
    } 
    arg5 = static_cast< int >(val5);
  }
  if (obj3) {
    ecode6 = SWIG_AsVal_int(obj3, &val6);
    if (!SWIG_IsOK(ecode6)) {
      SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Layer_GetExtent3D" "', argument " "6"" of type '" "int""'");
    } 
    arg6 = static_cast< int >(val6);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRLayerShadow_GetExtent3D(arg1,arg2,arg3,arg4,arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double argout[6], int* isvalid)  */
    PyObject *r;
    if ( !*arg3 ) {
      Py_INCREF(Py_None);
      r = Py_None;
    }
    else {
      r = CreateTupleFromDoubleArray(arg2, 6);
    }
#if 0x040200 >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,r);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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


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


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


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


SWIGINTERN PyObject *_wrap_Layer_ReorderFields(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 ;
  int *arg3 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  OGRErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Layer_ReorderFields", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ReorderFields" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
    if( arg2 < 0 ) {
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_ReorderFields(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg3);
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg3);
  }
  return NULL;
}


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


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


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


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


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


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


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


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


SWIGINTERN PyObject *_wrap_Layer_GetFeaturesRead(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GIntBig result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetFeaturesRead" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = OGRLayerShadow_GetFeaturesRead(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SetIgnoredFields(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  OGRErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Layer_SetIgnoredFields", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetIgnoredFields" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  {
    /* %typemap(in) char **dict */
    arg2 = NULL;
    if ( PySequence_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPySequence(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[1] ) ) {
      int bErr = FALSE;
      arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_SetIgnoredFields(arg1,(char const **)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_Intersection(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"method_layer",  (char *)"result_layer",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  OGRErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Intersection", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Intersection" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Intersection" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Intersection" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
  if (obj3) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj4) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
      {
        if( PyLong_AsLong(obj4) == 0 )
        {
          obj4 = Py_None;
        }
      }
      
      if (obj4 && obj4 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj4)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj4;
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj5) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj5 ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_Intersection(arg1,arg2,arg3,arg4,SWIG_STD_MOVE(arg5),arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_Union(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"method_layer",  (char *)"result_layer",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  OGRErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Union", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Union" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Union" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Union" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
  if (obj3) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj4) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
      {
        if( PyLong_AsLong(obj4) == 0 )
        {
          obj4 = Py_None;
        }
      }
      
      if (obj4 && obj4 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj4)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj4;
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj5) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj5 ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_Union(arg1,arg2,arg3,arg4,SWIG_STD_MOVE(arg5),arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SymDifference(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"method_layer",  (char *)"result_layer",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  OGRErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_SymDifference", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SymDifference" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SymDifference" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_SymDifference" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
  if (obj3) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj4) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
      {
        if( PyLong_AsLong(obj4) == 0 )
        {
          obj4 = Py_None;
        }
      }
      
      if (obj4 && obj4 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj4)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj4;
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj5) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj5 ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_SymDifference(arg1,arg2,arg3,arg4,SWIG_STD_MOVE(arg5),arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_Identity(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"method_layer",  (char *)"result_layer",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  OGRErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Identity", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Identity" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Identity" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Identity" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
  if (obj3) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj4) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
      {
        if( PyLong_AsLong(obj4) == 0 )
        {
          obj4 = Py_None;
        }
      }
      
      if (obj4 && obj4 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj4)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj4;
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj5) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj5 ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_Identity(arg1,arg2,arg3,arg4,SWIG_STD_MOVE(arg5),arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_Update(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"method_layer",  (char *)"result_layer",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  OGRErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Update", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Update" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Update" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Update" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
  if (obj3) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj4) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
      {
        if( PyLong_AsLong(obj4) == 0 )
        {
          obj4 = Py_None;
        }
      }
      
      if (obj4 && obj4 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj4)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj4;
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj5) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj5 ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_Update(arg1,arg2,arg3,arg4,SWIG_STD_MOVE(arg5),arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_Clip(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"method_layer",  (char *)"result_layer",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  OGRErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Clip", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Clip" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Clip" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Clip" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
  if (obj3) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj4) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
      {
        if( PyLong_AsLong(obj4) == 0 )
        {
          obj4 = Py_None;
        }
      }
      
      if (obj4 && obj4 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj4)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj4;
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj5) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj5 ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_Clip(arg1,arg2,arg3,arg4,SWIG_STD_MOVE(arg5),arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_Erase(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  PyObject * obj5 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"method_layer",  (char *)"result_layer",  (char *)"options",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  OGRErr result;
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg6 = psProgressInfo;
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOO|OOO:Layer_Erase", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_Erase" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_Erase" "', argument " "2"" of type '" "OGRLayerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRLayerShadow * >(argp2);
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_Erase" "', argument " "3"" of type '" "OGRLayerShadow *""'"); 
  }
  arg3 = reinterpret_cast< OGRLayerShadow * >(argp3);
  if (obj3) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj3 ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(obj3, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  if (obj4) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj4) || PyInt_Check(obj4) )
      {
        if( PyLong_AsLong(obj4) == 0 )
        {
          obj4 = Py_None;
        }
      }
      
      if (obj4 && obj4 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj4,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg5 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj4)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj4;
          arg5 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj5) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj5 ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_Erase(arg1,arg2,arg3,arg4,SWIG_STD_MOVE(arg5),arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


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


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


SWIGINTERN PyObject *_wrap_Layer_ExportArrowArrayStreamPyCapsule(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char **arg2 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  PyObject *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Layer_ExportArrowArrayStreamPyCapsule", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_ExportArrowArrayStreamPyCapsule" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (PyObject *)OGRLayerShadow_ExportArrowArrayStreamPyCapsule(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = result;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_GetArrowStream(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char **arg2 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  ArrowArrayStream *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Layer_GetArrowStream", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_GetArrowStream" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (ArrowArrayStream *)OGRLayerShadow_GetArrowStream(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ArrowArrayStream, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_IsArrowSchemaSupported(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  ArrowSchema *arg2 = (ArrowSchema *) 0 ;
  bool *arg3 = (bool *) 0 ;
  char **arg4 = (char **) 0 ;
  char **arg5 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  bool ret3 ;
  char *errorMsg3 ;
  PyObject *swig_obj[3] ;
  
  {
    /* %typemap(in,numinputs=0) (bool* pbRet, char **errorMsg3) */
    arg3 = &ret3;
    arg4 = &errorMsg3;
  }
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Layer_IsArrowSchemaSupported", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_IsArrowSchemaSupported" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ArrowSchema, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_IsArrowSchemaSupported" "', argument " "2"" of type '" "ArrowSchema const *""'"); 
  }
  arg2 = reinterpret_cast< ArrowSchema * >(argp2);
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg5 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRLayerShadow_IsArrowSchemaSupported(arg1,(ArrowSchema const *)arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (bool* pbRet, char **errorMsg)*/
    Py_DECREF(resultobj);
    resultobj = PyTuple_New(2);
    PyTuple_SetItem(resultobj, 0, PyBool_FromLong(*arg3));
    if( *arg4 )
    {
      PyTuple_SetItem(resultobj, 1, PyUnicode_FromString(*arg4));
      VSIFree(*arg4);
    }
    else
    {
      PyTuple_SetItem(resultobj, 1, Py_None);
      Py_INCREF(Py_None);
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_CreateFieldFromArrowSchema(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  ArrowSchema *arg2 = (ArrowSchema *) 0 ;
  char **arg3 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[3] ;
  OGRErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Layer_CreateFieldFromArrowSchema", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_CreateFieldFromArrowSchema" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ArrowSchema, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_CreateFieldFromArrowSchema" "', argument " "2"" of type '" "ArrowSchema const *""'"); 
  }
  arg2 = reinterpret_cast< ArrowSchema * >(argp2);
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_CreateFieldFromArrowSchema(arg1,(ArrowSchema const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_WriteArrowBatch(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  ArrowSchema *arg2 = (ArrowSchema *) 0 ;
  ArrowArray *arg3 = (ArrowArray *) 0 ;
  char **arg4 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[4] ;
  OGRErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Layer_WriteArrowBatch", 3, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_WriteArrowBatch" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ArrowSchema, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_WriteArrowBatch" "', argument " "2"" of type '" "ArrowSchema const *""'"); 
  }
  arg2 = reinterpret_cast< ArrowSchema * >(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_ArrowArray, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_WriteArrowBatch" "', argument " "3"" of type '" "ArrowArray *""'"); 
  }
  arg3 = reinterpret_cast< ArrowArray * >(argp3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( swig_obj[3] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(swig_obj[3], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[3] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_WriteArrowBatch(arg1,(ArrowSchema const *)arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_WriteArrowStreamCapsule(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  int arg3 ;
  char **arg4 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[4] ;
  OGRErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Layer_WriteArrowStreamCapsule", 3, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_WriteArrowStreamCapsule" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  arg2 = swig_obj[1];
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_WriteArrowStreamCapsule" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  if (swig_obj[3]) {
    {
      /* %typemap(in) char **dict */
      arg4 = NULL;
      if ( PySequence_Check( swig_obj[3] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPySequence(swig_obj[3], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[3] ) ) {
        int bErr = FALSE;
        arg4 = CSLFromPyMapping(swig_obj[3], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_WriteArrowStreamCapsule(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg4 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_WriteArrowSchemaAndArrowArrayCapsule(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  int arg4 ;
  char **arg5 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[5] ;
  OGRErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Layer_WriteArrowSchemaAndArrowArrayCapsule", 4, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_WriteArrowSchemaAndArrowArrayCapsule" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Layer_WriteArrowSchemaAndArrowArrayCapsule" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  if (swig_obj[4]) {
    {
      /* %typemap(in) char **dict */
      arg5 = NULL;
      if ( PySequence_Check( swig_obj[4] ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPySequence(swig_obj[4], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[4] ) ) {
        int bErr = FALSE;
        arg5 = CSLFromPyMapping(swig_obj[4], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_WriteArrowSchemaAndArrowArrayCapsule(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg5 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_GetGeometryTypes(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRGeometryTypeCounter **arg2 = (OGRGeometryTypeCounter **) 0 ;
  int *arg3 = (int *) 0 ;
  int arg4 = (int) 0 ;
  int arg5 = (int) 0 ;
  GDALProgressFunc arg6 = (GDALProgressFunc) NULL ;
  void *arg7 = (void *) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  OGRGeometryTypeCounter *pRet2 = NULL ;
  int nEntryCount2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  PyObject * obj4 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"geom_field",  (char *)"flags",  (char *)"callback",  (char *)"callback_data",  NULL 
  };
  
  /* %typemap(arginit) ( const char* callback_data=NULL)  */
  PyProgressData *psProgressInfo;
  psProgressInfo = (PyProgressData *) CPLCalloc(1,sizeof(PyProgressData));
  psProgressInfo->nLastReported = -1;
  psProgressInfo->psPyCallback = NULL;
  psProgressInfo->psPyCallbackData = NULL;
  arg7 = psProgressInfo;
  {
    /* %typemap(in,numinputs=0) (OGRGeometryTypeCounter** ppRet, int* pnEntryCount) */
    arg2 = &pRet2;
    arg3 = &nEntryCount2;
  }
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OOOO:Layer_GetGeometryTypes", kwnames, &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_GetGeometryTypes" "', 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_GetGeometryTypes" "', 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_GetGeometryTypes" "', argument " "5"" of type '" "int""'");
    } 
    arg5 = static_cast< int >(val5);
  }
  if (obj3) {
    {
      /* %typemap(in) (GDALProgressFunc callback = NULL) */
      /* callback_func typemap */
      
      /* In some cases 0 is passed instead of None. */
      /* See https://github.com/OSGeo/gdal/pull/219 */
      if ( PyLong_Check(obj3) || PyInt_Check(obj3) )
      {
        if( PyLong_AsLong(obj3) == 0 )
        {
          obj3 = Py_None;
        }
      }
      
      if (obj3 && obj3 != Py_None ) {
        void* cbfunction = NULL;
        CPL_IGNORE_RET_VAL(SWIG_ConvertPtr( obj3,
            (void**)&cbfunction,
            SWIGTYPE_p_f_double_p_q_const__char_p_void__int,
            SWIG_POINTER_EXCEPTION | 0 ));
        
        if ( cbfunction == GDALTermProgress ) {
          arg6 = GDALTermProgress;
        } else {
          if (!PyCallable_Check(obj3)) {
            PyErr_SetString( PyExc_RuntimeError,
              "Object given is not a Python function" );
            SWIG_fail;
          }
          psProgressInfo->psPyCallback = obj3;
          arg6 = PyProgressProxy;
        }
        
      }
      
    }
  }
  if (obj4) {
    {
      /* %typemap(in) ( void* callback_data=NULL)  */
      psProgressInfo->psPyCallbackData = obj4 ;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRLayerShadow_GetGeometryTypes(arg1,arg2,arg3,arg4,arg5,SWIG_STD_MOVE(arg6),arg7);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout)  (OGRGeometryTypeCounter** ppRet, int* pnEntryCount) */
    Py_DECREF(resultobj);
    int nEntryCount = *(arg3);
    OGRGeometryTypeCounter* pRet = *(arg2);
    if( pRet == NULL )
    {
      PyErr_SetString( PyExc_RuntimeError, CPLGetLastErrorMsg() );
      SWIG_fail;
    }
    resultobj = PyDict_New();
    for(int i = 0; i < nEntryCount; ++ i)
    {
      PyObject *key = PyInt_FromLong( (int)(pRet[i].eGeomType) );
      PyObject *val = PyLong_FromLongLong( pRet[i].nCount );
      PyDict_SetItem(resultobj, key, val );
      Py_DECREF(key);
      Py_DECREF(val);
    }
  }
  {
    /* %typemap(freearg)  (OGRGeometryTypeCounter** ppRet, int* pnEntryCount) */
    VSIFree(*arg2);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg)  (OGRGeometryTypeCounter** ppRet, int* pnEntryCount) */
    VSIFree(*arg2);
  }
  {
    /* %typemap(freearg) ( void* callback_data=NULL)  */
    
    CPLFree(psProgressInfo);
    
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_GetSupportedSRSList(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRSpatialReferenceH **arg2 = (OGRSpatialReferenceH **) 0 ;
  int *arg3 = (int *) 0 ;
  int arg4 = (int) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  OGRSpatialReferenceH *pRet2 = NULL ;
  int nEntryCount2 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"geom_field",  NULL 
  };
  
  {
    /* %typemap(in,numinputs=0) (OGRSpatialReferenceH** ppRet, int* pnEntryCount) */
    arg2 = &pRet2;
    arg3 = &nEntryCount2;
  }
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Layer_GetSupportedSRSList", 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_GetSupportedSRSList" "', 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_GetSupportedSRSList" "', argument " "4"" of type '" "int""'");
    } 
    arg4 = static_cast< int >(val4);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRLayerShadow_GetSupportedSRSList(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout)  (OGRSpatialReferenceH** ppRet, int* pnEntryCount) */
    Py_DECREF(resultobj);
    int nEntryCount = *(arg3);
    OGRSpatialReferenceH* pRet = *(arg2);
    if( nEntryCount == 0)
    {
      Py_INCREF(Py_None);
      resultobj = Py_None;
    }
    else
    {
      resultobj = PyList_New(nEntryCount);
      if( !resultobj ) {
        SWIG_fail;
      }
      for(int i = 0; i < nEntryCount; ++ i)
      {
        OSRReference(pRet[i]);
        PyList_SetItem(resultobj, i, SWIG_NewPointerObj(
            SWIG_as_voidptr(pRet[i]),SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN) );
      }
    }
  }
  {
    /* %typemap(freearg)  (OGRSpatialReferenceH** ppRet, int* pnEntryCount) */
    OSRFreeSRSArray(*arg2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg)  (OGRSpatialReferenceH** ppRet, int* pnEntryCount) */
    OSRFreeSRSArray(*arg2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Layer_SetActiveSRS(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 ;
  OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  OGRErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Layer_SetActiveSRS", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetActiveSRS" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Layer_SetActiveSRS" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Layer_SetActiveSRS" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'"); 
  }
  arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRLayerShadow_SetActiveSRS(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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

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


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


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


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


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


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


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


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


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


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


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


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


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


SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldRef__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeomFieldRef__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


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


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


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


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


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


SWIGINTERN PyObject *_wrap_Feature_GetFieldDefnRef__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  OGRFieldDefnShadow *result = 0 ;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


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


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


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


SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldDefnRef__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  OGRGeomFieldDefnShadow *result = 0 ;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldDefnRef" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeomFieldDefnShadow *)OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


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


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


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsString__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  char *result = 0 ;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsISO8601DateTime__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  char **arg3 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  char *result = 0 ;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsISO8601DateTime" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsISO8601DateTime" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFeatureShadow_GetFieldAsISO8601DateTime__SWIG_0(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsISO8601DateTime__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char **arg3 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  char *result = 0 ;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsISO8601DateTime" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFeatureShadow_GetFieldAsISO8601DateTime__SWIG_1(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsISO8601DateTime(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsISO8601DateTime", 0, 3, argv))) SWIG_fail;
  --argc;
  if ((argc >= 2) && (argc <= 3)) {
    int _v = 0;
    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) {
        if (argc <= 2) {
          return _wrap_Feature_GetFieldAsISO8601DateTime__SWIG_0(self, argc, argv);
        }
        {
          /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
          /* Note: we exclude explicitly strings, because they can be considered as a sequence of characters, */
          /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
          /* (see #4816) */
          _v = ((PyMapping_Check(argv[2]) || PySequence_Check(argv[2]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0)) ) ? 1 : 0;
        }
        if (_v) {
          return _wrap_Feature_GetFieldAsISO8601DateTime__SWIG_0(self, argc, argv);
        }
      }
    }
  }
  if ((argc >= 2) && (argc <= 3)) {
    int _v = 0;
    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) {
        if (argc <= 2) {
          return _wrap_Feature_GetFieldAsISO8601DateTime__SWIG_1(self, argc, argv);
        }
        {
          /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
          /* Note: we exclude explicitly strings, because they can be considered as a sequence of characters, */
          /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
          /* (see #4816) */
          _v = ((PyMapping_Check(argv[2]) || PySequence_Check(argv[2]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0)) ) ? 1 : 0;
        }
        if (_v) {
          return _wrap_Feature_GetFieldAsISO8601DateTime__SWIG_1(self, argc, argv);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Feature_GetFieldAsISO8601DateTime'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRFeatureShadow::GetFieldAsISO8601DateTime(int,char **)\n"
    "    OGRFeatureShadow::GetFieldAsISO8601DateTime(char const *,char **)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsInteger" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  int result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger64__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  GIntBig result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger64" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsInteger64" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = OGRFeatureShadow_GetFieldAsInteger64__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsInteger64__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  GIntBig result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsInteger64" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = OGRFeatureShadow_GetFieldAsInteger64__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromLongLong(result);
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDouble" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsDouble" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsDouble__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  double result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsDouble" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


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


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


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


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


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


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


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


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


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


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


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


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsStringList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Feature_GetFieldAsStringList", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsStringList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldAsStringList" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)OGRFeatureShadow_GetFieldAsStringList(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **options -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_GetFieldAsBinary__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int *arg3 = (int *) 0 ;
  char **arg4 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  int nLen3 = 0 ;
  char *pBuf3 = 0 ;
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen3, char **pBuf3 ) */
    arg3 = &nLen3;
    arg4 = &pBuf3;
  }
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldAsBinary" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRFeatureShadow_GetFieldAsBinary__SWIG_1(arg1,(char const *)arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(argout) (int *nLen, char **pBuf ) */
    Py_XDECREF(resultobj);
    resultobj = PyByteArray_FromStringAndSize( *arg4, *arg3 );
  }
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) (int *nLen, char **pBuf ) */
    VSIFree( *arg4 );
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) (int *nLen, char **pBuf ) */
    VSIFree( *arg4 );
  }
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_IsFieldSet__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  bool result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSet" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_IsFieldSet" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_IsFieldSet__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  bool result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSet" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_IsFieldNull__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  bool result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_IsFieldNull" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRFeatureShadow_IsFieldNull__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_IsFieldNull__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  bool result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRFeatureShadow_IsFieldNull__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_IsFieldSetAndNotNull__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  bool result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSetAndNotNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_IsFieldSetAndNotNull" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRFeatureShadow_IsFieldSetAndNotNull__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_IsFieldSetAndNotNull__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  bool result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_IsFieldSetAndNotNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRFeatureShadow_IsFieldSetAndNotNull__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_GetFieldIndex(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Feature_GetFieldIndex", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldIndex" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureShadow_GetFieldIndex(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetGeomFieldIndex(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Feature_GetGeomFieldIndex", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetGeomFieldIndex" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureShadow_GetGeomFieldIndex(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFID(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  GIntBig result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFID" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = OGRFeatureShadow_GetFID(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    resultobj = PyLong_FromLongLong(result);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFID(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  GIntBig arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  OGRErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetFID", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFID" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    arg2 = (GIntBig)PyLong_AsLongLong(swig_obj[1]);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRFeatureShadow_SetFID(arg1,SWIG_STD_MOVE(arg2));
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_DumpReadableAsString(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char **arg2 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  retStringAndCPLFree *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Feature_DumpReadableAsString", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_DumpReadableAsString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)OGRFeatureShadow_DumpReadableAsString(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_UnsetField__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_UnsetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_UnsetField" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_UnsetField__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_UnsetField__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_UnsetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_UnsetField__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_SetFieldNull__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldNull" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetFieldNull__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFieldNull__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldNull" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetFieldNull__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  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 ;
  
  (void)self;
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in) (tostring argin) */
    str3 = PyObject_Str( swig_obj[2] );
    if ( str3 == 0 ) {
      PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
      SWIG_fail;
    }
    
    arg3 = GDALPythonObjectToCStr(str3, &bToFree3);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetField__SWIG_0(arg1,arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str3 != NULL)
    {
      Py_DECREF(str3);
    }
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str3 != NULL)
    {
      Py_DECREF(str3);
    }
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject *str3 = 0 ;
  int bToFree3 = 0 ;
  
  (void)self;
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    /* %typemap(in) (tostring argin) */
    str3 = PyObject_Str( swig_obj[2] );
    if ( str3 == 0 ) {
      PyErr_SetString( PyExc_RuntimeError, "Unable to format argument as string");
      SWIG_fail;
    }
    
    arg3 = GDALPythonObjectToCStr(str3, &bToFree3);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetField__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str3 != NULL)
    {
      Py_DECREF(str3);
    }
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  {
    /* %typemap(freearg) (tostring argin) */
    if ( str3 != NULL)
    {
      Py_DECREF(str3);
    }
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFieldInteger64(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  GIntBig arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[3] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldInteger64", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldInteger64" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldInteger64" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    arg3 = (GIntBig)PyLong_AsLongLong(swig_obj[2]);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetFieldInteger64(arg1,arg2,SWIG_STD_MOVE(arg3));
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_2(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  
  (void)self;
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetField__SWIG_2(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_3(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  
  (void)self;
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetField__SWIG_3(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_4(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  float arg8 ;
  int arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  float val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  
  (void)self;
  if ((nobjs < 9) || (nobjs > 9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Feature_SetField" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Feature_SetField" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Feature_SetField" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_int(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Feature_SetField" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  ecode8 = SWIG_AsVal_float(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Feature_SetField" "', argument " "8"" of type '" "float""'");
  } 
  arg8 = static_cast< float >(val8);
  ecode9 = SWIG_AsVal_int(swig_obj[8], &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Feature_SetField" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetField__SWIG_4(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetField__SWIG_5(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  float arg8 ;
  int arg9 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  float val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  
  (void)self;
  if ((nobjs < 9) || (nobjs > 9)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetField" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetField" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Feature_SetField" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = static_cast< int >(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Feature_SetField" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = static_cast< int >(val5);
  ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "Feature_SetField" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = static_cast< int >(val6);
  ecode7 = SWIG_AsVal_int(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "Feature_SetField" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = static_cast< int >(val7);
  ecode8 = SWIG_AsVal_float(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "Feature_SetField" "', argument " "8"" of type '" "float""'");
  } 
  arg8 = static_cast< float >(val8);
  ecode9 = SWIG_AsVal_int(swig_obj[8], &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Feature_SetField" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = static_cast< int >(val9);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetField__SWIG_5(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_SetFieldIntegerList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  int *arg4 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[3] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldIntegerList", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldIntegerList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldIntegerList" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    arg4 = CreateCIntListFromSequence(swig_obj[2], &arg3);
    if( arg3 < 0 ) {
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetFieldIntegerList(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg4);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg4);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFieldInteger64List(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  GIntBig *arg4 = (GIntBig *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[3] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldInteger64List", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldInteger64List" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldInteger64List" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in,numinputs=1) (int nList, GIntBig* pList)*/
    arg4 = CreateCGIntBigListFromSequence(swig_obj[2], &arg3);
    if( arg3 < 0 ) {
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetFieldInteger64List(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (int nList, GIntBig* pList) */
    free(arg4);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, GIntBig* pList) */
    free(arg4);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFieldDoubleList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  double *arg4 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[3] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldDoubleList", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldDoubleList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldDoubleList" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in,numinputs=1) (int nList, double* pList)*/
    arg4 = CreateCDoubleListFromSequence(swig_obj[2], &arg3);
    if( arg3 < 0 ) {
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetFieldDoubleList(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (int nList, double* pList) */
    free(arg4);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, double* pList) */
    free(arg4);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_SetFieldStringList(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  char **arg3 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[3] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldStringList", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldStringList" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldStringList" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in) char **dict */
    arg3 = NULL;
    if ( PySequence_Check( swig_obj[2] ) ) {
      int bErr = FALSE;
      arg3 = CSLFromPySequence(swig_obj[2], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[2] ) ) {
      int bErr = FALSE;
      arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetFieldStringList(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature__SetFieldBinary(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int alloc3 = 0 ;
  bool viewIsValid3 = false ;
  Py_buffer view3 ;
  PyObject *swig_obj[3] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Feature__SetFieldBinary", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature__SetFieldBinary" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature__SetFieldBinary" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    char* ptr = NULL;
    if( !GetBufferAsCharPtrIntSize(swig_obj[2], &arg3, &ptr, &alloc3, &viewIsValid3, &view3) ) {
      SWIG_fail;
    }
    arg4 = (char *)ptr;
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow__SetFieldBinary(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if( viewIsValid3 ) {
      PyBuffer_Release(&view3);
    }
    else if (ReturnSame(alloc3) == SWIG_NEWOBJ ) {
      delete[] arg4;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if( viewIsValid3 ) {
      PyBuffer_Release(&view3);
    }
    else if (ReturnSame(alloc3) == SWIG_NEWOBJ ) {
      delete[] arg4;
    }
  }
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Feature_SetFieldBinaryFromHexString__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  
  (void)self;
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  return NULL;
}


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


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


SWIGINTERN PyObject *_wrap_Feature_SetFromWithMap(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
  int arg3 ;
  int arg4 ;
  int *arg5 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[4] ;
  OGRErr result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetFromWithMap", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFromWithMap" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetFromWithMap" "', argument " "2"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRFeatureShadow * >(argp2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature_SetFromWithMap" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = static_cast< int >(val3);
  {
    /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    arg5 = CreateCIntListFromSequence(swig_obj[3], &arg4);
    if( arg4 < 0 ) {
      SWIG_fail;
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRFeatureShadow_SetFromWithMap(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg5);
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (int nList, int* pList) */
    free(arg5);
  }
  return NULL;
}


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


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


SWIGINTERN PyObject *_wrap_Feature_GetFieldType__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  OGRFieldType result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldType" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldType" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Feature_GetFieldType__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  OGRFieldType result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_GetFieldType" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_1(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


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


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


SWIGINTERN PyObject *_wrap_Feature_FillUnsetWithDefault(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 = (int) FALSE ;
  char **arg3 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[3] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Feature_FillUnsetWithDefault", 1, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_FillUnsetWithDefault" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  if (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_FillUnsetWithDefault" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFeatureShadow_FillUnsetWithDefault(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


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


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


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


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


SWIGINTERN PyObject *_wrap_Feature_SetFieldString(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int bToFree3 = 0 ;
  PyObject *swig_obj[3] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Feature_SetFieldString", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Feature_SetFieldString" "', argument " "1"" of type '" "OGRFeatureShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldString" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[2]) || PyBytes_Check(swig_obj[2]))
    {
      arg3 = GDALPythonObjectToCStr( swig_obj[2], &bToFree3 );
    }
    else
    {
      arg3 = GDALPythonPathToCStr(swig_obj[2], &bToFree3);
      
    }
    if (arg3 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    OGRFeatureShadow_SetFieldString(arg1,arg2,(char const *)arg3);
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg3, bToFree3);
  }
  return NULL;
}


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

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

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


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


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


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


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


SWIGINTERN PyObject *_wrap_FeatureDefn_GetFieldIndex(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_GetFieldIndex", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetFieldIndex" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureDefnShadow_GetFieldIndex(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


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


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


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


SWIGINTERN PyObject *_wrap_FeatureDefn_GetGeomFieldIndex(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int bToFree2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "FeatureDefn_GetGeomFieldIndex", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFeatureDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FeatureDefn_GetGeomFieldIndex" "', argument " "1"" of type '" "OGRFeatureDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1);
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(swig_obj[1]) || PyBytes_Check(swig_obj[1]))
    {
      arg2 = GDALPythonObjectToCStr( swig_obj[1], &bToFree2 );
    }
    else
    {
      arg2 = GDALPythonPathToCStr(swig_obj[1], &bToFree2);
      
    }
    if (arg2 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFeatureDefnShadow_GetGeomFieldIndex(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg2, bToFree2);
  }
  return NULL;
}


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


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


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


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


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


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


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


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


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


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


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

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

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


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


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


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


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


SWIGINTERN PyObject *_wrap_FieldDefn_GetAlternativeName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetAlternativeName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDefnShadow_GetAlternativeName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_GetAlternativeNameRef(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetAlternativeNameRef" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDefnShadow_GetAlternativeNameRef(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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


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


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


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


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


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


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


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


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


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


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


SWIGINTERN PyObject *_wrap_FieldDefn_GetTZFlag(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetTZFlag" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFieldDefnShadow_GetTZFlag(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_SetTZFlag(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetTZFlag", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetTZFlag" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetTZFlag" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFieldDefnShadow_SetTZFlag(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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


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


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


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


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


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


SWIGINTERN PyObject *_wrap_FieldDefn_IsUnique(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_IsUnique" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRFieldDefnShadow_IsUnique(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDefn_SetUnique(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "FieldDefn_SetUnique", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_SetUnique" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDefn_SetUnique" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFieldDefnShadow_SetUnique(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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


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


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


SWIGINTERN PyObject *_wrap_FieldDefn_GetDomainName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetDomainName" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDefnShadow_GetDomainName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_FieldDefn_GetComment(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDefn_GetComment" "', argument " "1"" of type '" "OGRFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDefnShadow_GetComment(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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


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

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

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


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


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


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


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


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


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


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


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


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


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


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


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


SWIGINTERN PyObject *_wrap_GeomFieldDefn_GetCoordinatePrecision(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRGeomCoordinatePrecisionShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_GetCoordinatePrecision" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeomCoordinatePrecisionShadow *)OGRGeomFieldDefnShadow_GetCoordinatePrecision(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomFieldDefn_SetCoordinatePrecision(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  OGRGeomCoordinatePrecisionShadow *arg2 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GeomFieldDefn_SetCoordinatePrecision", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomFieldDefn_SetCoordinatePrecision" "', argument " "1"" of type '" "OGRGeomFieldDefnShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomFieldDefnShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomFieldDefn_SetCoordinatePrecision" "', argument " "2"" of type '" "OGRGeomCoordinatePrecisionShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeomFieldDefnShadow_SetCoordinatePrecision(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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

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

SWIGINTERN PyObject *_wrap_CreateGeometryFromWkb(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  size_t arg1 ;
  char *arg2 = (char *) 0 ;
  OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
  int alloc1 = 0 ;
  bool viewIsValid1 = false ;
  Py_buffer view1 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char * kwnames[] = {
    (char *)"len",  (char *)"reference",  NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:CreateGeometryFromWkb", kwnames, &obj0, &obj1)) SWIG_fail;
  {
    /* %typemap(in,numinputs=1) (size_t nLen, char *pBuf ) */
    char* ptr = NULL;
    if( !GetBufferAsCharPtrSizetSize(obj0, &arg1, &ptr, &alloc1, &viewIsValid1, &view1) ) {
      SWIG_fail;
    }
    arg2 = (char *)ptr;
  }
  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);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)CreateGeometryFromWkb(SWIG_STD_MOVE(arg1),arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (size_t *nLen, char *pBuf ) */
    if( viewIsValid1 ) {
      PyBuffer_Release(&view1);
    }
    else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
      delete[] arg2;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (size_t *nLen, char *pBuf ) */
    if( viewIsValid1 ) {
      PyBuffer_Release(&view1);
    }
    else if (ReturnSame(alloc1) == SWIG_NEWOBJ ) {
      delete[] arg2;
    }
  }
  return NULL;
}


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


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


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


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


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


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


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


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


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


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


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


SWIGINTERN PyObject *_wrap_ForceTo(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRwkbGeometryType arg2 ;
  char **arg3 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[3] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "ForceTo", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ForceTo" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ForceTo" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
  } 
  arg2 = static_cast< OGRwkbGeometryType >(val2);
  if (swig_obj[2]) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[2] ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)ForceTo(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_new_Geometry(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRwkbGeometryType arg1 = (OGRwkbGeometryType) wkbUnknown ;
  char *arg2 = (char *) 0 ;
  int arg3 = (int) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int alloc3 = 0 ;
  bool viewIsValid3 = false ;
  Py_buffer view3 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  char * kwnames[] = {
    (char *)"type",  (char *)"wkt",  (char *)"wkb",  (char *)"gml",  NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|OOOO:new_Geometry", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  if (obj0) {
    ecode1 = SWIG_AsVal_int(obj0, &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Geometry" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
    } 
    arg1 = static_cast< OGRwkbGeometryType >(val1);
  }
  if (obj1) {
    res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Geometry" "', argument " "2"" of type '" "char *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  if (obj2) {
    {
      /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
      char* ptr = NULL;
      if( !GetBufferAsCharPtrIntSize(obj2, &arg3, &ptr, &alloc3, &viewIsValid3, &view3) ) {
        SWIG_fail;
      }
      arg4 = (char *)ptr;
    }
  }
  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);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)new_OGRGeometryShadow(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_NEW |  0 );
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if( viewIsValid3 ) {
      PyBuffer_Release(&view3);
    }
    else if (ReturnSame(alloc3) == SWIG_NEWOBJ ) {
      delete[] arg4;
    }
  }
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) (int *nLen, char *pBuf ) */
    if( viewIsValid3 ) {
      PyBuffer_Release(&view3);
    }
    else if (ReturnSame(alloc3) == SWIG_NEWOBJ ) {
      delete[] arg4;
    }
  }
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return NULL;
}


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


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


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


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


SWIGINTERN PyObject *_wrap_Geometry_ExportToGML(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  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 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_ExportToGML", kwnames, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToGML" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( obj1 ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(obj1, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj1 ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(obj1, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToGML(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Geometry_ExportToJson(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  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 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_ExportToJson", kwnames, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ExportToJson" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( obj1 ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(obj1, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj1 ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(obj1, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToJson(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) (retStringAndCPLFree*) */
    Py_XDECREF(resultobj);
    if(result)
    {
      resultobj = GDALPythonObjectFromCStr( (const char *)result);
      CPLFree(result);
    }
    else
    {
      resultobj = Py_None;
      Py_INCREF(resultobj);
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


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


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


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


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


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


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


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


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


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


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


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


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


SWIGINTERN PyObject *_wrap_Geometry_GeodesicLength(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GeodesicLength" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRGeometryShadow_GeodesicLength(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GeodesicArea(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GeodesicArea" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRGeometryShadow_GeodesicArea(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_IsClockwise(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsClockwise" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_IsClockwise(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


SWIGINTERN PyObject *_wrap_Geometry_Simplify(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Simplify", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Simplify" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Simplify" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Simplify(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SimplifyPreserveTopology(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_SimplifyPreserveTopology", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SimplifyPreserveTopology" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SimplifyPreserveTopology" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_SimplifyPreserveTopology(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_DelaunayTriangulation(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 = (double) 0.0 ;
  int arg3 = (int) FALSE ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"dfTolerance",  (char *)"bOnlyEdges",  NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Geometry_DelaunayTriangulation", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_DelaunayTriangulation" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_double(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_DelaunayTriangulation" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
  }
  if (obj2) {
    ecode3 = SWIG_AsVal_int(obj2, &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_DelaunayTriangulation" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_DelaunayTriangulation(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Polygonize(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Polygonize" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Polygonize(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Boundary(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Boundary" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Boundary(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetBoundary(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetBoundary" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_GetBoundary(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_ConvexHull(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ConvexHull" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_ConvexHull(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_ConcaveHull(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  bool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  bool val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_ConcaveHull", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_ConcaveHull" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_ConcaveHull" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_ConcaveHull" "', argument " "3"" of type '" "bool""'");
  } 
  arg3 = static_cast< bool >(val3);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_ConcaveHull(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_MakeValid(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char **arg2 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_MakeValid", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_MakeValid" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_MakeValid(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SetPrecision(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  int arg3 = (int) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_SetPrecision", 2, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPrecision" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPrecision" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (swig_obj[2]) {
    ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPrecision" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_SetPrecision(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Normalize(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Normalize" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Normalize(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_RemoveLowerDimensionSubGeoms(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_RemoveLowerDimensionSubGeoms" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_RemoveLowerDimensionSubGeoms(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Buffer__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  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 ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Buffer" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Buffer" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  if (swig_obj[2]) {
    ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_Buffer" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Buffer__SWIG_0(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Buffer__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  char **arg3 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Buffer" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Buffer" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    /* %typemap(in) char **dict */
    arg3 = NULL;
    if ( PySequence_Check( swig_obj[2] ) ) {
      int bErr = FALSE;
      arg3 = CSLFromPySequence(swig_obj[2], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[2] ) ) {
      int bErr = FALSE;
      arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Buffer__SWIG_1(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Buffer(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Geometry_Buffer", 0, 3, argv))) SWIG_fail;
  --argc;
  if ((argc >= 2) && (argc <= 3)) {
    int _v = 0;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        if (argc <= 2) {
          return _wrap_Geometry_Buffer__SWIG_0(self, argc, argv);
        }
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_Geometry_Buffer__SWIG_0(self, argc, argv);
        }
      }
    }
  }
  if (argc == 3) {
    int _v = 0;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          /* %typecheck(SWIG_TYPECHECK_POINTER) (char **dict) */
          /* Note: we exclude explicitly strings, because they can be considered as a sequence of characters, */
          /* which is not desirable since it makes it impossible to define bindings such as SetMetadata(string) and SetMetadata(array_of_string) */
          /* (see #4816) */
          _v = ((PyMapping_Check(argv[2]) || PySequence_Check(argv[2]) ) && !SWIG_CheckState(SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0)) ) ? 1 : 0;
        }
        if (_v) {
          return _wrap_Geometry_Buffer__SWIG_1(self, argc, argv);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Geometry_Buffer'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRGeometryShadow::Buffer(double,int)\n"
    "    OGRGeometryShadow::Buffer(double,char **)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Geometry_Intersection(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Intersection", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersection" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersection" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Intersection(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Union(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Union", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Union" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Union" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Union(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_UnionCascaded(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_UnionCascaded" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_UnionCascaded(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_UnaryUnion(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_UnaryUnion" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_UnaryUnion(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Difference(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Difference", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Difference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Difference" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Difference(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SymDifference(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_SymDifference", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SymDifference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_SymDifference" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_SymDifference(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SymmetricDifference(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_SymmetricDifference", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SymmetricDifference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_SymmetricDifference" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_SymmetricDifference(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Distance(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  double result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Distance", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Distance" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Distance" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRGeometryShadow_Distance(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Distance3D(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  double result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Distance3D", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Distance3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Distance3D" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRGeometryShadow_Distance3D(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Empty(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Empty" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_Empty(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_IsEmpty(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsEmpty" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_IsEmpty(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_IsValid(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsValid" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_IsValid(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_IsSimple(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsSimple" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_IsSimple(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_IsRing(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsRing" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_IsRing(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Intersects(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Intersects", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersects" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersects" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Intersects(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Intersect(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Intersect", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Intersect" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Intersect" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Intersect(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Equals(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Equals", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Equals" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Equals" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Equals(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Equal(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Equal", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Equal" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Equal" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Equal(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Disjoint(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Disjoint", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Disjoint" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Disjoint" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Disjoint(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Touches(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Touches", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Touches" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Touches" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Touches(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Crosses(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Crosses", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Crosses" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Crosses" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Crosses(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Within(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Within", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Within" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Within" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Within(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Contains(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Contains", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Contains" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Contains" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Contains(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Overlaps(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Overlaps", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Overlaps" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Overlaps" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRGeometryShadow_Overlaps(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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


SWIGINTERN PyObject *_wrap_Geometry_Transform__SWIG_0(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OSRCoordinateTransformationShadow *arg2 = (OSRCoordinateTransformationShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  OGRErr result;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Transform" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Transform" "', argument " "2"" of type '" "OSRCoordinateTransformationShadow *""'"); 
  }
  arg2 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRGeometryShadow_Transform__SWIG_0(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetSpatialReference(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OSRSpatialReferenceShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetSpatialReference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OSRSpatialReferenceShadow *)OGRGeometryShadow_GetSpatialReference(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_AssignSpatialReference(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_AssignSpatialReference", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AssignSpatialReference" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_AssignSpatialReference" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
  }
  arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_AssignSpatialReference(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_CloseRings(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_CloseRings" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_CloseRings(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_FlattenTo2D(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_FlattenTo2D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_FlattenTo2D(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Segmentize(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Segmentize", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Segmentize" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Segmentize" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_Segmentize(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetEnvelope(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double *arg2 = (double *) (double *)0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double argout2[4] ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (double argout2[ANY]) */
    memset(argout2, 0, sizeof(argout2));
    arg2 = argout2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetEnvelope" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_GetEnvelope(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double argout[ANY]) */
    PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,out);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetEnvelope3D(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double *arg2 = (double *) (double *)0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double argout2[6] ;
  PyObject *swig_obj[1] ;
  
  {
    /* %typemap(in,numinputs=0) (double argout2[ANY]) */
    memset(argout2, 0, sizeof(argout2));
    arg2 = argout2;
  }
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetEnvelope3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_GetEnvelope3D(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  {
    /* %typemap(argout) (double argout[ANY]) */
    PyObject *out = CreateTupleFromDoubleArray( arg2, 6 );
#if SWIG_VERSION >= 0x040300
    resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
#else
    resultobj = SWIG_Python_AppendOutput(resultobj,out);
#endif
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Centroid(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Centroid" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Centroid(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_PointOnSurface(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_PointOnSurface" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_PointOnSurface(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_WkbSize(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  size_t result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_WkbSize" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = OGRGeometryShadow_WkbSize(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_size_t(static_cast< size_t >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetCoordinateDimension(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetCoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGeometryShadow_GetCoordinateDimension(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_CoordinateDimension(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_CoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGeometryShadow_CoordinateDimension(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Is3D(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Is3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGeometryShadow_Is3D(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_IsMeasured(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_IsMeasured" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGeometryShadow_IsMeasured(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SetCoordinateDimension(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_SetCoordinateDimension", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetCoordinateDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetCoordinateDimension" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_SetCoordinateDimension(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Set3D(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Set3D", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Set3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Set3D" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_Set3D(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_SetMeasured(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_SetMeasured", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetMeasured" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetMeasured" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeometryShadow_SetMeasured(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetDimension(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetDimension" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGeometryShadow_GetDimension(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_HasCurveGeometry(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) FALSE ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_HasCurveGeometry", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_HasCurveGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_HasCurveGeometry" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGeometryShadow_HasCurveGeometry(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetLinearGeometry(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 = (double) 0.0 ;
  char **arg3 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"dfMaxAngleStepSizeDegrees",  (char *)"options",  NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:Geometry_GetLinearGeometry", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetLinearGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    ecode2 = SWIG_AsVal_double(obj1, &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetLinearGeometry" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
  }
  if (obj2) {
    {
      /* %typemap(in) char **dict */
      arg3 = NULL;
      if ( PySequence_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPySequence(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj2 ) ) {
        int bErr = FALSE;
        arg3 = CSLFromPyMapping(obj2, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_GetLinearGeometry(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_GetCurveGeometry(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char **arg2 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  char * kwnames[] = {
    (char *)"self",  (char *)"options",  NULL 
  };
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Geometry_GetCurveGeometry", kwnames, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetCurveGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  if (obj1) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( obj1 ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(obj1, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( obj1 ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(obj1, &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_GetCurveGeometry(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Value(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "Geometry_Value", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Value" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Value" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Value(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Transform__SWIG_1(PyObject *self, Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeomTransformerShadow *arg2 = (OGRGeomTransformerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Transform" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeomTransformerShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Geometry_Transform" "', argument " "2"" of type '" "OGRGeomTransformerShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeomTransformerShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeometryShadow_Transform__SWIG_1(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Geometry_Transform(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[3] = {
    0
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "Geometry_Transform", 0, 2, argv))) SWIG_fail;
  --argc;
  if (argc == 2) {
    int _v = 0;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Geometry_Transform__SWIG_0(self, argc, argv);
      }
    }
  }
  if (argc == 2) {
    int _v = 0;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      void *vptr = 0;
      int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OGRGeomTransformerShadow, 0);
      _v = SWIG_CheckState(res);
      if (_v) {
        return _wrap_Geometry_Transform__SWIG_1(self, argc, argv);
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'Geometry_Transform'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    OGRGeometryShadow::Transform(OSRCoordinateTransformationShadow *)\n"
    "    OGRGeometryShadow::Transform(OGRGeomTransformerShadow *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_Geometry_CreatePreparedGeometry(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRPreparedGeometryShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_CreatePreparedGeometry" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRPreparedGeometryShadow *)OGRGeometryShadow_CreatePreparedGeometry(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRPreparedGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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

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

SWIGINTERN PyObject *_wrap_delete_PreparedGeometry(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRPreparedGeometryShadow *arg1 = (OGRPreparedGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRPreparedGeometryShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PreparedGeometry" "', argument " "1"" of type '" "OGRPreparedGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRPreparedGeometryShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_OGRPreparedGeometryShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PreparedGeometry_Intersects(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRPreparedGeometryShadow *arg1 = (OGRPreparedGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "PreparedGeometry_Intersects", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRPreparedGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PreparedGeometry_Intersects" "', argument " "1"" of type '" "OGRPreparedGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRPreparedGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PreparedGeometry_Intersects" "', argument " "2"" of type '" "OGRGeometryShadow const *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRPreparedGeometryShadow_Intersects(arg1,(OGRGeometryShadow const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_PreparedGeometry_Contains(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRPreparedGeometryShadow *arg1 = (OGRPreparedGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  bool result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "PreparedGeometry_Contains", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRPreparedGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PreparedGeometry_Contains" "', argument " "1"" of type '" "OGRPreparedGeometryShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRPreparedGeometryShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PreparedGeometry_Contains" "', argument " "2"" of type '" "OGRGeometryShadow const *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRPreparedGeometryShadow_Contains(arg1,(OGRGeometryShadow const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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

SWIGINTERN PyObject *_wrap_new_GeomTransformer(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
  char **arg2 = (char **) NULL ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  OGRGeomTransformerShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "new_GeomTransformer", 1, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GeomTransformer" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'"); 
  }
  arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
  if (swig_obj[1]) {
    {
      /* %typemap(in) char **dict */
      arg2 = NULL;
      if ( PySequence_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPySequence(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else if ( PyMapping_Check( swig_obj[1] ) ) {
        int bErr = FALSE;
        arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
        if ( bErr )
        {
          SWIG_fail;
        }
      }
      else {
        PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
        SWIG_fail;
      }
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeomTransformerShadow *)new_OGRGeomTransformerShadow(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomTransformerShadow, SWIG_POINTER_NEW |  0 );
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg2 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GeomTransformer(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeomTransformerShadow *arg1 = (OGRGeomTransformerShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomTransformerShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GeomTransformer" "', argument " "1"" of type '" "OGRGeomTransformerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomTransformerShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_OGRGeomTransformerShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomTransformer_Transform(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeomTransformerShadow *arg1 = (OGRGeomTransformerShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  OGRGeometryShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GeomTransformer_Transform", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomTransformerShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomTransformer_Transform" "', argument " "1"" of type '" "OGRGeomTransformerShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomTransformerShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomTransformer_Transform" "', argument " "2"" of type '" "OGRGeometryShadow *""'"); 
  }
  arg2 = reinterpret_cast< OGRGeometryShadow * >(argp2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeometryShadow *)OGRGeomTransformerShadow_Transform(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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

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

SWIGINTERN PyObject *_wrap_delete_FieldDomain(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FieldDomain" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_OGRFieldDomainShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_GetName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetName" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDomainShadow_GetName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_GetDescription(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetDescription" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDomainShadow_GetDescription(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_GetFieldType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRFieldType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetFieldType" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldType)OGRFieldDomainShadow_GetFieldType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_GetFieldSubType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRFieldSubType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetFieldSubType" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldSubType)OGRFieldDomainShadow_GetFieldSubType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_GetDomainType(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRFieldDomainType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetDomainType" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDomainType)OGRFieldDomainShadow_GetDomainType(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_GetSplitPolicy(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRFieldDomainSplitPolicy result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetSplitPolicy" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDomainSplitPolicy)OGRFieldDomainShadow_GetSplitPolicy(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_SetSplitPolicy(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  OGRFieldDomainSplitPolicy arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "FieldDomain_SetSplitPolicy", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_SetSplitPolicy" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDomain_SetSplitPolicy" "', argument " "2"" of type '" "OGRFieldDomainSplitPolicy""'");
  } 
  arg2 = static_cast< OGRFieldDomainSplitPolicy >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFieldDomainShadow_SetSplitPolicy(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_GetMergePolicy(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRFieldDomainMergePolicy result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMergePolicy" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDomainMergePolicy)OGRFieldDomainShadow_GetMergePolicy(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_SetMergePolicy(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  OGRFieldDomainMergePolicy arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "FieldDomain_SetMergePolicy", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_SetMergePolicy" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FieldDomain_SetMergePolicy" "', argument " "2"" of type '" "OGRFieldDomainMergePolicy""'");
  } 
  arg2 = static_cast< OGRFieldDomainMergePolicy >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRFieldDomainShadow_SetMergePolicy(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_GetEnumeration(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRCodedValue *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetEnumeration" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRCodedValue *)OGRFieldDomainShadow_GetEnumeration(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRCodedValue* */
    if( result == NULL )
    {
      PyErr_SetString( PyExc_RuntimeError, CPLGetLastErrorMsg() );
      SWIG_fail;
    }
    PyObject *dict = PyDict_New();
    for( int i = 0; (result)[i].pszCode != NULL; i++ )
    {
      if( (result)[i].pszValue )
      {
        PyObject* val = GDALPythonObjectFromCStr((result)[i].pszValue);
        PyDict_SetItemString(dict, (result)[i].pszCode, val);
        Py_DECREF(val);
      }
      else
      {
        PyDict_SetItemString(dict, (result)[i].pszCode, Py_None);
      }
    }
    resultobj = dict;
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_GetMinAsDouble(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMinAsDouble" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRFieldDomainShadow_GetMinAsDouble(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_GetMinAsString(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMinAsString" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDomainShadow_GetMinAsString(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_IsMinInclusive(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_IsMinInclusive" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRFieldDomainShadow_IsMinInclusive(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_GetMaxAsDouble(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMaxAsDouble" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRFieldDomainShadow_GetMaxAsDouble(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_GetMaxAsString(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetMaxAsString" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDomainShadow_GetMaxAsString(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_IsMaxInclusive(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  bool result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_IsMaxInclusive" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (bool)OGRFieldDomainShadow_IsMaxInclusive(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_bool(static_cast< bool >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_FieldDomain_GetGlob(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldDomainShadow *arg1 = (OGRFieldDomainShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FieldDomain_GetGlob" "', argument " "1"" of type '" "OGRFieldDomainShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRFieldDomainShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRFieldDomainShadow_GetGlob(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


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

SWIGINTERN PyObject *_wrap_CreateCodedFieldDomain(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRFieldType arg3 ;
  OGRFieldSubType arg4 ;
  OGRCodedValue *arg5 = (OGRCodedValue *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[5] ;
  OGRFieldDomainShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "CreateCodedFieldDomain", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateCodedFieldDomain" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateCodedFieldDomain" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CreateCodedFieldDomain" "', argument " "3"" of type '" "OGRFieldType""'");
  } 
  arg3 = static_cast< OGRFieldType >(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CreateCodedFieldDomain" "', argument " "4"" of type '" "OGRFieldSubType""'");
  } 
  arg4 = static_cast< OGRFieldSubType >(val4);
  {
    /* %typemap(in) OGRCodedValue* enumeration */
    arg5 = NULL;
    
    if (swig_obj[4] == NULL || !PyMapping_Check(swig_obj[4])) {
      SWIG_exception_fail(SWIG_ValueError,"Expected dict.");
    }
    Py_ssize_t size = PyMapping_Length( swig_obj[4] );
    arg5 = (OGRCodedValue*)VSICalloc(size+1, sizeof(OGRCodedValue) );
    if( !arg5 ) {
      PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
      SWIG_fail;
    }
    
    PyObject *item_list = PyMapping_Items( swig_obj[4] );
    if( item_list == NULL )
    {
      PyErr_SetString(PyExc_TypeError,"Cannot retrieve items");
      SWIG_fail;
    }
    
    for( Py_ssize_t i=0; i<size; i++ ) {
      PyObject *it = PySequence_GetItem( item_list, i );
      if( it == NULL )
      {
        Py_DECREF(item_list);
        PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
        SWIG_fail;
      }
      
      PyObject *k, *v;
      if ( ! PyArg_ParseTuple( it, "OO", &k, &v ) ) {
        Py_DECREF(it);
        Py_DECREF(item_list);
        PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
        SWIG_fail;
      }
      
      PyObject* kStr = PyObject_Str(k);
      if( PyErr_Occurred() )
      {
        Py_DECREF(it);
        Py_DECREF(item_list);
        SWIG_fail;
      }
      
      PyObject* vStr = v != Py_None ? PyObject_Str(v) : Py_None;
      if( v == Py_None )
      Py_INCREF(Py_None);
      if( PyErr_Occurred() )
      {
        Py_DECREF(it);
        Py_DECREF(kStr);
        Py_DECREF(item_list);
        SWIG_fail;
      }
      
      int bFreeK, bFreeV;
      char* pszK = GDALPythonObjectToCStr(kStr, &bFreeK);
      char* pszV = vStr != Py_None ? GDALPythonObjectToCStr(vStr, &bFreeV) : NULL;
      if( pszK == NULL || (pszV == NULL && vStr != Py_None) )
      {
        GDALPythonFreeCStr(pszK, bFreeK);
        if( pszV )
        GDALPythonFreeCStr(pszV, bFreeV);
        Py_DECREF(kStr);
        Py_DECREF(vStr);
        Py_DECREF(it);
        Py_DECREF(item_list);
        PyErr_SetString(PyExc_TypeError,"Cannot get key/value as string");
        SWIG_fail;
      }
      (arg5)[i].pszCode = CPLStrdup(pszK);
      (arg5)[i].pszValue = pszV ? CPLStrdup(pszV) : NULL;
      
      GDALPythonFreeCStr(pszK, bFreeK);
      if( pszV )
      GDALPythonFreeCStr(pszV, bFreeV);
      Py_DECREF(kStr);
      Py_DECREF(vStr);
      Py_DECREF(it);
    }
    Py_DECREF(item_list);
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDomainShadow *)CreateCodedFieldDomain((char const *)arg1,(char const *)arg2,arg3,arg4,(OGRCodedValue const *)arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) OGRCodedValue* */
    if( arg5 )
    {
      for( size_t i = 0; (arg5)[i].pszCode != NULL; ++i )
      {
        CPLFree((arg5)[i].pszCode);
        CPLFree((arg5)[i].pszValue);
      }
    }
    CPLFree( arg5 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) OGRCodedValue* */
    if( arg5 )
    {
      for( size_t i = 0; (arg5)[i].pszCode != NULL; ++i )
      {
        CPLFree((arg5)[i].pszCode);
        CPLFree((arg5)[i].pszValue);
      }
    }
    CPLFree( arg5 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_CreateRangeFieldDomain(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRFieldType arg3 ;
  OGRFieldSubType arg4 ;
  double arg5 ;
  bool arg6 ;
  double arg7 ;
  double arg8 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  bool val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  PyObject *swig_obj[8] ;
  OGRFieldDomainShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "CreateRangeFieldDomain", 8, 8, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateRangeFieldDomain" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateRangeFieldDomain" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CreateRangeFieldDomain" "', argument " "3"" of type '" "OGRFieldType""'");
  } 
  arg3 = static_cast< OGRFieldType >(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CreateRangeFieldDomain" "', argument " "4"" of type '" "OGRFieldSubType""'");
  } 
  arg4 = static_cast< OGRFieldSubType >(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CreateRangeFieldDomain" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  ecode6 = SWIG_AsVal_bool(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CreateRangeFieldDomain" "', argument " "6"" of type '" "bool""'");
  } 
  arg6 = static_cast< bool >(val6);
  ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CreateRangeFieldDomain" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = static_cast< double >(val7);
  ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "CreateRangeFieldDomain" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = static_cast< double >(val8);
  {
    if (!arg1) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDomainShadow *)CreateRangeFieldDomain((char const *)arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_CreateRangeFieldDomainDateTime(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  bool arg4 ;
  char *arg5 = (char *) 0 ;
  double arg6 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  bool val4 ;
  int ecode4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  PyObject *swig_obj[6] ;
  OGRFieldDomainShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "CreateRangeFieldDomainDateTime", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = reinterpret_cast< char * >(buf3);
  ecode4 = SWIG_AsVal_bool(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "4"" of type '" "bool""'");
  } 
  arg4 = static_cast< bool >(val4);
  res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = reinterpret_cast< char * >(buf5);
  ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CreateRangeFieldDomainDateTime" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = static_cast< double >(val6);
  {
    if (!arg1) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDomainShadow *)CreateRangeFieldDomainDateTime((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4,(char const *)arg5,arg6);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_CreateGlobFieldDomain(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRFieldType arg3 ;
  OGRFieldSubType arg4 ;
  char *arg5 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  PyObject *swig_obj[5] ;
  OGRFieldDomainShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "CreateGlobFieldDomain", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGlobFieldDomain" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateGlobFieldDomain" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CreateGlobFieldDomain" "', argument " "3"" of type '" "OGRFieldType""'");
  } 
  arg3 = static_cast< OGRFieldType >(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CreateGlobFieldDomain" "', argument " "4"" of type '" "OGRFieldSubType""'");
  } 
  arg4 = static_cast< OGRFieldSubType >(val4);
  res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "CreateGlobFieldDomain" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = reinterpret_cast< char * >(buf5);
  {
    if (!arg1) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    if (!arg5) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRFieldDomainShadow *)CreateGlobFieldDomain((char const *)arg1,(char const *)arg2,arg3,arg4,(char const *)arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDomainShadow, SWIG_POINTER_OWN |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_GeomCoordinatePrecision(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GeomCoordinatePrecision" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      delete_OGRGeomCoordinatePrecisionShadow(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_Set(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GeomCoordinatePrecision_Set", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_Set" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeomCoordinatePrecision_Set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = static_cast< double >(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GeomCoordinatePrecision_Set" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GeomCoordinatePrecision_Set" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeomCoordinatePrecisionShadow_Set(arg1,arg2,arg3,arg4);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_SetFromMeter(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject *swig_obj[5] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GeomCoordinatePrecision_SetFromMeter", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_SetFromMeter" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomCoordinatePrecision_SetFromMeter" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
  }
  arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GeomCoordinatePrecision_SetFromMeter" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = static_cast< double >(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "GeomCoordinatePrecision_SetFromMeter" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = static_cast< double >(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "GeomCoordinatePrecision_SetFromMeter" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = static_cast< double >(val5);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeomCoordinatePrecisionShadow_SetFromMeter(arg1,arg2,arg3,arg4,arg5);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_GetXYResolution(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_GetXYResolution" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRGeomCoordinatePrecisionShadow_GetXYResolution(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_GetZResolution(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_GetZResolution" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRGeomCoordinatePrecisionShadow_GetZResolution(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_GetMResolution(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_GetMResolution" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (double)OGRGeomCoordinatePrecisionShadow_GetMResolution(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_double(static_cast< double >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_GetFormats(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char **result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_GetFormats" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)OGRGeomCoordinatePrecisionShadow_GetFormats(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_GetFormatSpecificOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GeomCoordinatePrecision_GetFormatSpecificOptions", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_GetFormatSpecificOptions" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomCoordinatePrecision_GetFormatSpecificOptions" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char **)OGRGeomCoordinatePrecisionShadow_GetFormatSpecificOptions(arg1,(char const *)arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **dict */
    resultobj = GetCSLStringAsPyDict(result, false);
  }
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeomCoordinatePrecision_SetFormatSpecificOptions(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeomCoordinatePrecisionShadow *arg1 = (OGRGeomCoordinatePrecisionShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char **arg3 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[3] ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GeomCoordinatePrecision_SetFormatSpecificOptions", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GeomCoordinatePrecision_SetFormatSpecificOptions" "', argument " "1"" of type '" "OGRGeomCoordinatePrecisionShadow *""'"); 
  }
  arg1 = reinterpret_cast< OGRGeomCoordinatePrecisionShadow * >(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GeomCoordinatePrecision_SetFormatSpecificOptions" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = reinterpret_cast< char * >(buf2);
  {
    /* %typemap(in) char **dict */
    arg3 = NULL;
    if ( PySequence_Check( swig_obj[2] ) ) {
      int bErr = FALSE;
      arg3 = CSLFromPySequence(swig_obj[2], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[2] ) ) {
      int bErr = FALSE;
      arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRGeomCoordinatePrecisionShadow_SetFormatSpecificOptions(arg1,(char const *)arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg3 );
  }
  return NULL;
}


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

SWIGINTERN PyObject *_wrap_CreateGeomCoordinatePrecision(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRGeomCoordinatePrecisionShadow *result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "CreateGeomCoordinatePrecision", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRGeomCoordinatePrecisionShadow *)CreateGeomCoordinatePrecision();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomCoordinatePrecisionShadow, SWIG_POINTER_OWN |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetDriverCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetDriverCount", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGetDriverCount();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetOpenDSCount(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetOpenDSCount", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGetOpenDSCount();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SetGenerate_DB2_V72_BYTE_ORDER(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRErr result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetGenerate_DB2_V72_BYTE_ORDER" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRErr)OGRSetGenerate_DB2_V72_BYTE_ORDER(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) OGRErr */
    if ( result != 0 && GetUseExceptions()) {
      const char* pszMessage = CPLGetLastErrorMsg();
      if( pszMessage[0] != '\0' )
      PyErr_SetString( PyExc_RuntimeError, pszMessage );
      else
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
      SWIG_fail;
    }
  }
  {
    /* %typemap(ret) OGRErr */
    if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
      resultobj = PyInt_FromLong( result );
    }
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_RegisterAll(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "RegisterAll", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRRegisterAll();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeometryTypeToName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GeometryTypeToName" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGRGeometryTypeToName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetFieldTypeName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetFieldTypeName" "', argument " "1"" of type '" "OGRFieldType""'");
  } 
  arg1 = static_cast< OGRFieldType >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGR_GetFieldTypeName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetFieldSubTypeName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRFieldSubType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetFieldSubTypeName" "', argument " "1"" of type '" "OGRFieldSubType""'");
  } 
  arg1 = static_cast< OGRFieldSubType >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (char *)OGR_GetFieldSubTypeName(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_FromCharPtr((const char *)result);
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_Flatten(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRwkbGeometryType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_Flatten" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)OGR_GT_Flatten(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_SetZ(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRwkbGeometryType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_SetZ" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)OGR_GT_SetZ(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_SetM(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRwkbGeometryType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_SetM" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)OGR_GT_SetM(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_SetModifier(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRwkbGeometryType arg1 ;
  int arg2 ;
  int arg3 = (int) FALSE ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  OGRwkbGeometryType result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GT_SetModifier", 2, 3, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_SetModifier" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GT_SetModifier" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = static_cast< int >(val2);
  if (swig_obj[2]) {
    ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "GT_SetModifier" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = static_cast< int >(val3);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)GT_SetModifier(arg1,arg2,arg3);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_HasZ(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_HasZ" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGR_GT_HasZ(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_HasM(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_HasM" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGR_GT_HasM(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_IsSubClassOf(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRwkbGeometryType arg1 ;
  OGRwkbGeometryType arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GT_IsSubClassOf", 2, 2, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_IsSubClassOf" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GT_IsSubClassOf" "', argument " "2"" of type '" "OGRwkbGeometryType""'");
  } 
  arg2 = static_cast< OGRwkbGeometryType >(val2);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGR_GT_IsSubClassOf(arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_IsCurve(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_IsCurve" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGR_GT_IsCurve(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_IsSurface(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_IsSurface" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGR_GT_IsSurface(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_IsNonLinear(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_IsNonLinear" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGR_GT_IsNonLinear(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_GetCollection(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRwkbGeometryType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_GetCollection" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)OGR_GT_GetCollection(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_GetCurve(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRwkbGeometryType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_GetCurve" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)OGR_GT_GetCurve(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GT_GetLinear(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  OGRwkbGeometryType arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRwkbGeometryType result;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_GetLinear" "', argument " "1"" of type '" "OGRwkbGeometryType""'");
  } 
  arg1 = static_cast< OGRwkbGeometryType >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRwkbGeometryType)OGR_GT_GetLinear(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_SetNonLinearGeometriesEnabledFlag(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetNonLinearGeometriesEnabledFlag" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      OGRSetNonLinearGeometriesEnabledFlag(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_Py_Void();
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetNonLinearGeometriesEnabledFlag(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int result;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GetNonLinearGeometriesEnabledFlag", 0, 0, 0)) SWIG_fail;
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (int)OGRGetNonLinearGeometriesEnabledFlag();
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetOpenDS(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRDataSourceShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetOpenDS" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRDataSourceShadow *)GetOpenDS(arg1);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_Open(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  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 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:Open", kwnames, &obj0, &obj1)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
    {
      arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      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);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRDataSourceShadow *)Open((char const *)arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if( result == NULL && bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
    if( result != NULL && bLocalUseExceptions ) {
#ifdef SED_HACKS
      bLocalUseExceptionsCode = FALSE;
#endif
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_OpenShared(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  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 ;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|O:OpenShared", kwnames, &obj0, &obj1)) SWIG_fail;
  {
    /* %typemap(in) (const char *utf8_path) */
    if (PyUnicode_Check(obj0) || PyBytes_Check(obj0))
    {
      arg1 = GDALPythonObjectToCStr( obj0, &bToFree1 );
    }
    else
    {
      arg1 = GDALPythonPathToCStr(obj0, &bToFree1);
      
    }
    if (arg1 == NULL)
    {
      PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
      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);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    {
      SWIG_PYTHON_THREAD_BEGIN_ALLOW;
      result = (OGRDataSourceShadow *)OpenShared((char const *)arg1,arg2);
      SWIG_PYTHON_THREAD_END_ALLOW;
    }
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if( result == NULL && bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
    if( result != NULL && bLocalUseExceptions ) {
#ifdef SED_HACKS
      bLocalUseExceptionsCode = FALSE;
#endif
    }
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDatasetShadow, SWIG_POINTER_OWN |  0 );
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) (const char *utf8_path) */
    GDALPythonFreeCStr(arg1, bToFree1);
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetDriverByName(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRDriverShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = reinterpret_cast< char * >(buf1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    result = (OGRDriverShadow *)GetDriverByName((char const *)arg1);
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
  return NULL;
}


SWIGINTERN PyObject *_wrap_GetDriver(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  OGRDriverShadow *result = 0 ;
  
  (void)self;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GetDriver" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = static_cast< int >(val1);
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    result = (OGRDriverShadow *)GetDriver(arg1);
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_GDALDriverShadow, 0 |  0 );
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_GeneralCmdLineProcessor(PyObject *self, PyObject *args) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  char **arg1 = (char **) 0 ;
  int arg2 = (int) 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  char **result = 0 ;
  
  (void)self;
  if (!SWIG_Python_UnpackTuple(args, "GeneralCmdLineProcessor", 1, 2, swig_obj)) SWIG_fail;
  {
    /* %typemap(in) char **dict */
    arg1 = NULL;
    if ( PySequence_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPySequence(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else if ( PyMapping_Check( swig_obj[0] ) ) {
      int bErr = FALSE;
      arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
      if ( bErr )
      {
        SWIG_fail;
      }
    }
    else {
      PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
      SWIG_fail;
    }
  }
  if (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GeneralCmdLineProcessor" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    result = (char **)GeneralCmdLineProcessor(arg1,arg2);
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  {
    /* %typemap(out) char **CSL -> ( string ) */
    bool bErr = false;
    resultobj = CSLToList(result, &bErr);
    CSLDestroy(result);
    if( bErr ) {
      SWIG_fail;
    }
  }
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  {
    /* %typemap(freearg) char **dict */
    CSLDestroy( arg1 );
  }
  return NULL;
}


SWIGINTERN PyObject *_wrap_TermProgress_nocb(PyObject *self, PyObject *args, PyObject *kwargs) {
  PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
  double arg1 ;
  char *arg2 = (char *) NULL ;
  void *arg3 = (void *) NULL ;
  double val1 ;
  int ecode1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  char * kwnames[] = {
    (char *)"dfProgress",  (char *)"pszMessage",  (char *)"pData",  NULL 
  };
  int result;
  
  (void)self;
  if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|OO:TermProgress_nocb", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(obj0, &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "TermProgress_nocb" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = static_cast< double >(val1);
  if (obj1) {
    res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "TermProgress_nocb" "', argument " "2"" of type '" "char const *""'");
    }
    arg2 = reinterpret_cast< char * >(buf2);
  }
  if (obj2) {
    res3 = SWIG_ConvertPtr(obj2,SWIG_as_voidptrptr(&arg3), 0, 0);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "TermProgress_nocb" "', argument " "3"" of type '" "void *""'"); 
    }
  }
  {
    const int bLocalUseExceptions = GetUseExceptions();
    if ( bLocalUseExceptions ) {
      pushErrorHandler();
    }
    result = (int)GDALTermProgress_nocb(arg1,(char const *)arg2,arg3);
    if ( bLocalUseExceptions ) {
      popErrorHandler();
    }
#ifndef SED_HACKS
    if ( bLocalUseExceptions ) {
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
      }
    }
#endif
  }
  resultobj = SWIG_From_int(static_cast< int >(result));
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, CPLGetLastErrorMsg() ); return NULL; } }
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
  return NULL;
}


static PyMethodDef SwigMethods[] = {
	 { "GetUseExceptions", _wrap_GetUseExceptions, METH_NOARGS, "GetUseExceptions() -> int"},
	 { "_GetExceptionsLocal", _wrap__GetExceptionsLocal, METH_NOARGS, "_GetExceptionsLocal() -> int"},
	 { "_SetExceptionsLocal", _wrap__SetExceptionsLocal, METH_O, "_SetExceptionsLocal(int bVal)"},
	 { "_UseExceptions", _wrap__UseExceptions, METH_NOARGS, "_UseExceptions()"},
	 { "_DontUseExceptions", _wrap__DontUseExceptions, METH_NOARGS, "_DontUseExceptions()"},
	 { "_UserHasSpecifiedIfUsingExceptions", _wrap__UserHasSpecifiedIfUsingExceptions, METH_NOARGS, "_UserHasSpecifiedIfUsingExceptions() -> int"},
	 { "MajorObject_GetDescription", _wrap_MajorObject_GetDescription, METH_O, "MajorObject_GetDescription(MajorObject self) -> char const *"},
	 { "MajorObject_SetDescription", _wrap_MajorObject_SetDescription, METH_VARARGS, "MajorObject_SetDescription(MajorObject self, char const * pszNewDesc)"},
	 { "MajorObject_GetMetadataDomainList", _wrap_MajorObject_GetMetadataDomainList, METH_O, "MajorObject_GetMetadataDomainList(MajorObject self) -> char **"},
	 { "MajorObject_GetMetadata_Dict", _wrap_MajorObject_GetMetadata_Dict, METH_VARARGS, "MajorObject_GetMetadata_Dict(MajorObject self, char const * pszDomain=\"\") -> char **"},
	 { "MajorObject_GetMetadata_List", _wrap_MajorObject_GetMetadata_List, METH_VARARGS, "MajorObject_GetMetadata_List(MajorObject self, char const * pszDomain=\"\") -> char **"},
	 { "MajorObject_SetMetadata", _wrap_MajorObject_SetMetadata, METH_VARARGS, "\n"
		"MajorObject_SetMetadata(MajorObject self, char ** papszMetadata, char const * pszDomain=\"\") -> CPLErr\n"
		"MajorObject_SetMetadata(MajorObject self, char * pszMetadataString, char const * pszDomain=\"\") -> CPLErr\n"
		""},
	 { "MajorObject_GetMetadataItem", _wrap_MajorObject_GetMetadataItem, METH_VARARGS, "MajorObject_GetMetadataItem(MajorObject self, char const * pszName, char const * pszDomain=\"\") -> char const *"},
	 { "MajorObject_SetMetadataItem", _wrap_MajorObject_SetMetadataItem, METH_VARARGS, "MajorObject_SetMetadataItem(MajorObject self, char const * pszName, char const * pszValue, char const * pszDomain=\"\") -> CPLErr"},
	 { "MajorObject_swigregister", MajorObject_swigregister, METH_O, NULL},
	 { "GetGEOSVersionMajor", _wrap_GetGEOSVersionMajor, METH_NOARGS, "GetGEOSVersionMajor() -> int"},
	 { "GetGEOSVersionMinor", _wrap_GetGEOSVersionMinor, METH_NOARGS, "GetGEOSVersionMinor() -> int"},
	 { "GetGEOSVersionMicro", _wrap_GetGEOSVersionMicro, METH_NOARGS, "GetGEOSVersionMicro() -> int"},
	 { "new_StyleTable", _wrap_new_StyleTable, METH_NOARGS, "new_StyleTable() -> StyleTable"},
	 { "delete_StyleTable", _wrap_delete_StyleTable, METH_O, "delete_StyleTable(StyleTable self)"},
	 { "StyleTable_AddStyle", _wrap_StyleTable_AddStyle, METH_VARARGS, "StyleTable_AddStyle(StyleTable self, char const * pszName, char const * pszStyleString) -> int"},
	 { "StyleTable_LoadStyleTable", _wrap_StyleTable_LoadStyleTable, METH_VARARGS, "StyleTable_LoadStyleTable(StyleTable self, char const * utf8_path) -> int"},
	 { "StyleTable_SaveStyleTable", _wrap_StyleTable_SaveStyleTable, METH_VARARGS, "StyleTable_SaveStyleTable(StyleTable self, char const * utf8_path) -> int"},
	 { "StyleTable_Find", _wrap_StyleTable_Find, METH_VARARGS, "StyleTable_Find(StyleTable self, char const * pszName) -> char const *"},
	 { "StyleTable_ResetStyleStringReading", _wrap_StyleTable_ResetStyleStringReading, METH_O, "StyleTable_ResetStyleStringReading(StyleTable self)"},
	 { "StyleTable_GetNextStyle", _wrap_StyleTable_GetNextStyle, METH_O, "StyleTable_GetNextStyle(StyleTable self) -> char const *"},
	 { "StyleTable_GetLastStyleName", _wrap_StyleTable_GetLastStyleName, METH_O, "StyleTable_GetLastStyleName(StyleTable self) -> char const *"},
	 { "StyleTable_swigregister", StyleTable_swigregister, METH_O, NULL},
	 { "StyleTable_swiginit", StyleTable_swiginit, METH_VARARGS, NULL},
	 { "new_ArrowArray", _wrap_new_ArrowArray, METH_NOARGS, "new_ArrowArray() -> ArrowArray"},
	 { "delete_ArrowArray", _wrap_delete_ArrowArray, METH_O, "delete_ArrowArray(ArrowArray self)"},
	 { "ArrowArray__getPtr", _wrap_ArrowArray__getPtr, METH_O, "ArrowArray__getPtr(ArrowArray self) -> VoidPtrAsLong"},
	 { "ArrowArray_GetChildrenCount", _wrap_ArrowArray_GetChildrenCount, METH_O, "ArrowArray_GetChildrenCount(ArrowArray self) -> GIntBig"},
	 { "ArrowArray_GetLength", _wrap_ArrowArray_GetLength, METH_O, "ArrowArray_GetLength(ArrowArray self) -> GIntBig"},
	 { "ArrowArray_swigregister", ArrowArray_swigregister, METH_O, NULL},
	 { "ArrowArray_swiginit", ArrowArray_swiginit, METH_VARARGS, NULL},
	 { "new_ArrowSchema", _wrap_new_ArrowSchema, METH_NOARGS, "new_ArrowSchema() -> ArrowSchema"},
	 { "delete_ArrowSchema", _wrap_delete_ArrowSchema, METH_O, "delete_ArrowSchema(ArrowSchema self)"},
	 { "ArrowSchema__getPtr", _wrap_ArrowSchema__getPtr, METH_O, "ArrowSchema__getPtr(ArrowSchema self) -> VoidPtrAsLong"},
	 { "ArrowSchema_GetName", _wrap_ArrowSchema_GetName, METH_O, "ArrowSchema_GetName(ArrowSchema self) -> char const *"},
	 { "ArrowSchema_GetChildrenCount", _wrap_ArrowSchema_GetChildrenCount, METH_O, "ArrowSchema_GetChildrenCount(ArrowSchema self) -> GIntBig"},
	 { "ArrowSchema_GetChild", _wrap_ArrowSchema_GetChild, METH_VARARGS, "ArrowSchema_GetChild(ArrowSchema self, int iChild) -> ArrowSchema"},
	 { "ArrowSchema_swigregister", ArrowSchema_swigregister, METH_O, NULL},
	 { "ArrowSchema_swiginit", ArrowSchema_swiginit, METH_VARARGS, NULL},
	 { "delete_ArrowArrayStream", _wrap_delete_ArrowArrayStream, METH_O, "delete_ArrowArrayStream(ArrowArrayStream self)"},
	 { "ArrowArrayStream_GetSchema", _wrap_ArrowArrayStream_GetSchema, METH_O, "ArrowArrayStream_GetSchema(ArrowArrayStream self) -> ArrowSchema"},
	 { "ArrowArrayStream_GetNextRecordBatch", _wrap_ArrowArrayStream_GetNextRecordBatch, METH_VARARGS, "ArrowArrayStream_GetNextRecordBatch(ArrowArrayStream self, char ** options=None) -> ArrowArray"},
	 { "ArrowArrayStream_swigregister", ArrowArrayStream_swigregister, METH_O, NULL},
	 { "Layer_GetDataset", _wrap_Layer_GetDataset, METH_O, "\n"
		"Layer_GetDataset(Layer self) -> GDALDatasetShadow *\n"
		"\n"
		"Return the dataset associated with this layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_GetDataset`\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Dataset:\n"
		"    Dataset or None\n"
		"\n"
		""},
	 { "Layer_Rename", _wrap_Layer_Rename, METH_VARARGS, "Layer_Rename(Layer self, char const * new_name) -> OGRErr"},
	 { "Layer_GetRefCount", _wrap_Layer_GetRefCount, METH_O, "\n"
		"Layer_GetRefCount(Layer self) -> int\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_GetRefCount`\n"
		"\n"
		""},
	 { "Layer_SetSpatialFilter", _wrap_Layer_SetSpatialFilter, METH_VARARGS, "\n"
		"Layer_SetSpatialFilter(Layer self, Geometry filter)\n"
		"Layer_SetSpatialFilter(Layer self, int iGeomField, Geometry filter)\n"
		"\n"
		"Set a new spatial filter.\n"
		"\n"
		"For more details:\n"
		"\n"
		"- :cpp:func:`OGR_L_SetSpatialFilter`\n"
		"- :cpp:func:`OGR_L_SetSpatialFilterEx`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"iGeomField: int, optional\n"
		"    index of the geometry field on which the spatial filter operates.\n"
		"filter: Geometry\n"
		"    The geometry to use as a filtering region. None may\n"
		"    be passed indicating that the current spatial filter should be\n"
		"    cleared, but no new one instituted.\n"
		"\n"
		""},
	 { "Layer_SetSpatialFilterRect", _wrap_Layer_SetSpatialFilterRect, METH_VARARGS, "\n"
		"Layer_SetSpatialFilterRect(Layer self, double minx, double miny, double maxx, double maxy)\n"
		"Layer_SetSpatialFilterRect(Layer self, int iGeomField, double minx, double miny, double maxx, double maxy)\n"
		"\n"
		"Set a new rectangular spatial filter.\n"
		"\n"
		"For more details:\n"
		"\n"
		"- :cpp:func:`OGR_L_SetSpatialFilterRect`\n"
		"- :cpp:func:`OGR_L_SetSpatialFilterRectEx`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"iGeomField: int, optional\n"
		"    index of the geometry field on which the spatial filter operates.\n"
		"minx: float\n"
		"    the minimum X coordinate for the rectangular region.\n"
		"miny: float\n"
		"    the minimum Y coordinate for the rectangular region.\n"
		"maxx: float\n"
		"    the maximum X coordinate for the rectangular region.\n"
		"maxy: float\n"
		"    the maximum Y coordinate for the rectangular region.\n"
		"\n"
		""},
	 { "Layer_GetSpatialFilter", _wrap_Layer_GetSpatialFilter, METH_O, "\n"
		"Layer_GetSpatialFilter(Layer self) -> Geometry\n"
		"\n"
		"This function returns the current spatial filter for this layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_GetSpatialFilter`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    The spatial filter geometry.\n"
		"\n"
		""},
	 { "Layer_SetAttributeFilter", _wrap_Layer_SetAttributeFilter, METH_VARARGS, "\n"
		"Layer_SetAttributeFilter(Layer self, char * filter_string) -> OGRErr\n"
		"\n"
		"Set a new attribute query.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_SetAttributeFilter`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"filter_string: str\n"
		"    query in restricted SQL WHERE format, or None to clear the\n"
		"    current query.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` if successfully installed,\n"
		"    or an error code if the query expression is in error,\n"
		"    or some other failure occurs.\n"
		"\n"
		""},
	 { "Layer_ResetReading", _wrap_Layer_ResetReading, METH_O, "\n"
		"Layer_ResetReading(Layer self)\n"
		"\n"
		"Reset feature reading to start on the first feature.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_ResetReading`\n"
		"\n"
		""},
	 { "Layer_GetName", _wrap_Layer_GetName, METH_O, "\n"
		"Layer_GetName(Layer self) -> char const *\n"
		"\n"
		"Return the layer name.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_GetName`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str:\n"
		"    The layer name\n"
		"\n"
		""},
	 { "Layer_GetGeomType", _wrap_Layer_GetGeomType, METH_O, "\n"
		"Layer_GetGeomType(Layer self) -> OGRwkbGeometryType\n"
		"\n"
		"Return the layer geometry type.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_GetGeomType`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    The geometry type code. The types can be found with\n"
		"    'osgeo.ogr.wkb' prefix. For example :py:const:`osgeo.ogr.wkbPolygon`.\n"
		"\n"
		""},
	 { "Layer_GetGeometryColumn", _wrap_Layer_GetGeometryColumn, METH_O, "\n"
		"Layer_GetGeometryColumn(Layer self) -> char const *\n"
		"\n"
		"This method returns the name of the underlying database column being\n"
		"used as the geometry column, or '' if not supported.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_GetGeometryColumn`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str:\n"
		"    geometry column name.\n"
		"\n"
		""},
	 { "Layer_GetFIDColumn", _wrap_Layer_GetFIDColumn, METH_O, "\n"
		"Layer_GetFIDColumn(Layer self) -> char const *\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"
		"For more details: :cpp:func:`OGR_L_GetFIDColumn`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str:\n"
		"    fid column name.\n"
		"\n"
		""},
	 { "Layer_GetFeature", _wrap_Layer_GetFeature, METH_VARARGS, "\n"
		"Layer_GetFeature(Layer self, GIntBig fid) -> Feature\n"
		"\n"
		"Fetch a feature by its identifier.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_GetFeature`\n"
		"\n"
		"Use :py:func:`TestCapability` with (:py:const:`osgeo.ogr.OLCRandomRead`)\n"
		"to establish if this layer supports efficient random access reading via\n"
		":py:func:`GetFeature`; However, the call should always work if the feature exists.\n"
		"\n"
		"Sequential reads (with :py:func:`GetNextFeature`) are generally\n"
		"considered interrupted by a :py:func:`GetFeature` call.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fid: int\n"
		"    The feature id of the feature to read.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Feature:\n"
		"    A new feature now owned by the caller, or None on failure.\n"
		"    The returned feature should be deleted with :py:func:`Destroy`.\n"
		"\n"
		""},
	 { "Layer_GetNextFeature", _wrap_Layer_GetNextFeature, METH_O, "\n"
		"Layer_GetNextFeature(Layer self) -> Feature\n"
		"\n"
		"Fetch the next available feature from this layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_GetNextFeature`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Feature:\n"
		"    A feature or None if no more features are available.\n"
		"\n"
		""},
	 { "Layer_SetNextByIndex", _wrap_Layer_SetNextByIndex, METH_VARARGS, "\n"
		"Layer_SetNextByIndex(Layer self, GIntBig new_index) -> OGRErr\n"
		"\n"
		"Move read cursor to the nIndex'th feature in the current resultset.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_SetNextByIndex`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"new_index: int\n"
		"    The index indicating how many steps into the result set to seek.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` on success or an error code.\n"
		"\n"
		""},
	 { "Layer_SetFeature", _wrap_Layer_SetFeature, METH_VARARGS, "\n"
		"Layer_SetFeature(Layer self, Feature feature) -> OGRErr\n"
		"\n"
		"Rewrite an existing feature.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_SetFeature`\n"
		"\n"
		"To set a feature, but create it if it doesn't exist see :py:meth:`.Layer.UpsertFeature`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"feature: Feature\n"
		"    The feature to write.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` if the operation works,\n"
		"    otherwise an appropriate error code\n"
		"    (e.g :py:const:`osgeo.ogr.OGRERR_NON_EXISTING_FEATURE` if the\n"
		"    feature does not exist).\n"
		"\n"
		""},
	 { "Layer_CreateFeature", _wrap_Layer_CreateFeature, METH_VARARGS, "\n"
		"Layer_CreateFeature(Layer self, Feature feature) -> OGRErr\n"
		"\n"
		"Create and write a new feature within a layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_CreateFeature`\n"
		"\n"
		"To create a feature, but set it if it exists see :py:meth:`.Layer.UpsertFeature`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"feature: Feature\n"
		"    The feature to write to disk.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
		"\n"
		""},
	 { "Layer_UpsertFeature", _wrap_Layer_UpsertFeature, METH_VARARGS, "\n"
		"Layer_UpsertFeature(Layer self, Feature feature) -> OGRErr\n"
		"\n"
		"Rewrite an existing feature or create a new feature within a layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_UpsertFeature`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"feature: Feature\n"
		"    The feature to write to disk.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
		"\n"
		""},
	 { "Layer_UpdateFeature", _wrap_Layer_UpdateFeature, METH_VARARGS, "Layer_UpdateFeature(Layer self, Feature feature, int nUpdatedFieldsCount, int nUpdatedGeomFieldsCount, bool bUpdateStyleString) -> OGRErr"},
	 { "Layer_DeleteFeature", _wrap_Layer_DeleteFeature, METH_VARARGS, "\n"
		"Layer_DeleteFeature(Layer self, GIntBig fid) -> OGRErr\n"
		"\n"
		"Delete feature from layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_DeleteFeature`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fid: int\n"
		"    The feature id to be deleted from the layer\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` if the operation works,\n"
		"    otherwise an appropriate error code\n"
		"    (e.g :py:const:`osgeo.ogr.OGRERR_NON_EXISTING_FEATURE`)\n"
		"    if the feature does not exist.\n"
		"\n"
		""},
	 { "Layer_SyncToDisk", _wrap_Layer_SyncToDisk, METH_O, "\n"
		"Layer_SyncToDisk(Layer self) -> OGRErr\n"
		"\n"
		"Flush pending changes to disk.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_SyncToDisk`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` if no error occurs\n"
		"    (even if nothing is done) or an error code.\n"
		"\n"
		""},
	 { "Layer_GetLayerDefn", _wrap_Layer_GetLayerDefn, METH_O, "\n"
		"Layer_GetLayerDefn(Layer self) -> FeatureDefn\n"
		"\n"
		"Fetch the schema information for this layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_GetLayerDefn`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"FeatureDefn:\n"
		"    The feature definition.\n"
		"\n"
		""},
	 { "Layer_GetFeatureCount", (PyCFunction)(void(*)(void))_wrap_Layer_GetFeatureCount, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_GetFeatureCount(Layer self, int force=1) -> GIntBig\n"
		"\n"
		"Fetch the feature count in this layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_GetFeatureCount`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"force: int\n"
		"    Flag indicating whether the count should be computed even if\n"
		"    it is expensive.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    Feature count, -1 if count not known.\n"
		"\n"
		""},
	 { "Layer_GetExtent", (PyCFunction)(void(*)(void))_wrap_Layer_GetExtent, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_GetExtent(Layer self, int force=1, int can_return_null=0, int geom_field=0)\n"
		"\n"
		"Fetch the extent of this layer.\n"
		"\n"
		"For more details:\n"
		"\n"
		"- :cpp:func:`OGR_L_GetExtent`\n"
		"- :cpp:func:`OGR_L_GetExtentEx`\n"
		"\n"
		".. warning:: Check the return order of the bounds.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"force: int, default=False\n"
		"    Flag indicating whether the extent should be computed even if\n"
		"    it is expensive.\n"
		"can_return_null: int, default=False\n"
		"    Whether None can be returned in the response.\n"
		"geom_field: int, default=0\n"
		"    The index of the geometry field on which to compute the extent.\n"
		"    Can be iterated over using :py:func:`range` and :py:func:`GetGeomFieldCount`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"minx: float\n"
		"maxx: float\n"
		"miny: float\n"
		"maxy: float\n"
		"\n"
		""},
	 { "Layer_GetExtent3D", (PyCFunction)(void(*)(void))_wrap_Layer_GetExtent3D, METH_VARARGS|METH_KEYWORDS, "Layer_GetExtent3D(Layer self, int force=1, int can_return_null=0, int geom_field=0)"},
	 { "Layer_TestCapability", _wrap_Layer_TestCapability, METH_VARARGS, "\n"
		"Layer_TestCapability(Layer self, char const * cap) -> bool\n"
		"\n"
		"Test if this layer supported the named capability.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_TestCapability`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"cap: str\n"
		"    The name of the capability to test. These can\n"
		"    be found in the `osgeo.ogr` namespace. For example,\n"
		"    :py:const:`osgeo.ogr.OLCRandomRead`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    True if the layer has the requested capability, or False otherwise.\n"
		"    Will return False for any unrecognized capabilities.\n"
		"\n"
		""},
	 { "Layer_CreateField", (PyCFunction)(void(*)(void))_wrap_Layer_CreateField, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_CreateField(Layer self, FieldDefn field_def, int approx_ok=1) -> OGRErr\n"
		"\n"
		"Create a new field on a layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_CreateField`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"field_def: FieldDefn\n"
		"    The field definition to write to disk.\n"
		"approx_ok: bool, default=True\n"
		"    If True, the field may be created in a slightly different\n"
		"    form depending on the limitations of the format driver.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
		"\n"
		""},
	 { "Layer_DeleteField", _wrap_Layer_DeleteField, METH_VARARGS, "\n"
		"Layer_DeleteField(Layer self, int iField) -> OGRErr\n"
		"\n"
		"Delete an existing field on a layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_DeleteField`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"iField: int\n"
		"    index of the field to delete.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
		"\n"
		""},
	 { "Layer_ReorderField", _wrap_Layer_ReorderField, METH_VARARGS, "\n"
		"Layer_ReorderField(Layer self, int iOldFieldPos, int iNewFieldPos) -> OGRErr\n"
		"\n"
		"Reorder an existing field on a layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_ReorderField`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"iOldFieldPos: int\n"
		"    previous position of the field to move. Must be in the\n"
		"    range [0,GetFieldCount()-1].\n"
		"iNewFieldPos: int\n"
		"    new position of the field to move. Must be in the range\n"
		"    [0,GetFieldCount()-1].\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
		"\n"
		""},
	 { "Layer_ReorderFields", _wrap_Layer_ReorderFields, METH_VARARGS, "\n"
		"Layer_ReorderFields(Layer self, int nList) -> OGRErr\n"
		"\n"
		"Reorder all the fields of a layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_ReorderFields`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"nList: list[int]\n"
		"    A list of GetLayerDefn().GetFieldCount()\n"
		"    elements which is a permutation of\n"
		"    [0, GetLayerDefn().GetFieldCount()-1].\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
		"\n"
		""},
	 { "Layer_AlterFieldDefn", _wrap_Layer_AlterFieldDefn, METH_VARARGS, "\n"
		"Layer_AlterFieldDefn(Layer self, int iField, FieldDefn field_def, int nFlags) -> OGRErr\n"
		"\n"
		"Alter the definition of an existing field on a layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_AlterFieldDefn`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"iField: int\n"
		"    index of the field whose definition must be altered.\n"
		"field_def: FieldDefn\n"
		"    new field definition\n"
		"nFlags: int\n"
		"    Combination of\n"
		"    :py:const:`osgeo.ogr.ALTER_NAME_FLAG`,\n"
		"    :py:const:`osgeo.ogr.ALTER_TYPE_FLAG`,\n"
		"    :py:const:`osgeo.ogr.ALTER_WIDTH_PRECISION_FLAG`,\n"
		"    :py:const:`osgeo.ogr.ALTER_NULLABLE_FLAG` and\n"
		"    :py:const:`osgeo.ogr.ALTER_DEFAULT_FLAG`\n"
		"    to indicate which of the name and/or type and/or width and precision\n"
		"    fields and/or nullability from the new field definition must be taken\n"
		"    into account.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
		"\n"
		""},
	 { "Layer_AlterGeomFieldDefn", _wrap_Layer_AlterGeomFieldDefn, METH_VARARGS, "Layer_AlterGeomFieldDefn(Layer self, int iGeomField, GeomFieldDefn field_def, int nFlags) -> OGRErr"},
	 { "Layer_CreateGeomField", (PyCFunction)(void(*)(void))_wrap_Layer_CreateGeomField, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_CreateGeomField(Layer self, GeomFieldDefn field_def, int approx_ok=1) -> OGRErr\n"
		"\n"
		"Create a new geometry field on a layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_CreateGeomField`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"field_def: GeomFieldDefn\n"
		"    The geometry field definition to write to disk.\n"
		"approx_ok: bool, default=True\n"
		"    If True, the field may be created in a slightly different\n"
		"    form depending on the limitations of the format driver.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
		"\n"
		""},
	 { "Layer_StartTransaction", _wrap_Layer_StartTransaction, METH_O, "\n"
		"Layer_StartTransaction(Layer self) -> OGRErr\n"
		"\n"
		"For datasources which support transactions, this creates a transaction.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_StartTransaction`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
		"\n"
		""},
	 { "Layer_CommitTransaction", _wrap_Layer_CommitTransaction, METH_O, "\n"
		"Layer_CommitTransaction(Layer self) -> OGRErr\n"
		"\n"
		"For datasources which support transactions, this commits a transaction.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_CommitTransaction`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
		"\n"
		""},
	 { "Layer_RollbackTransaction", _wrap_Layer_RollbackTransaction, METH_O, "\n"
		"Layer_RollbackTransaction(Layer self) -> OGRErr\n"
		"\n"
		"Roll back a datasource to its state before the start of the current transaction.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_RollbackTransaction`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` on success.\n"
		"\n"
		""},
	 { "Layer_FindFieldIndex", _wrap_Layer_FindFieldIndex, METH_VARARGS, "\n"
		"Layer_FindFieldIndex(Layer self, char const * pszFieldName, int bExactMatch) -> int\n"
		"\n"
		"Find the index of field in a layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_FindFieldIndex`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    field index, or -1 if the field doesn't exist\n"
		"\n"
		""},
	 { "Layer_GetSpatialRef", _wrap_Layer_GetSpatialRef, METH_O, "\n"
		"Layer_GetSpatialRef(Layer self) -> SpatialReference\n"
		"\n"
		"Fetch the spatial reference system for this layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_GetSpatialRef`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"SpatialReference:\n"
		"    spatial reference, or None if there isn't one.\n"
		"\n"
		""},
	 { "Layer_GetFeaturesRead", _wrap_Layer_GetFeaturesRead, METH_O, "\n"
		"Layer_GetFeaturesRead(Layer self) -> GIntBig\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_GetFeaturesRead`\n"
		"\n"
		""},
	 { "Layer_SetIgnoredFields", _wrap_Layer_SetIgnoredFields, METH_VARARGS, "\n"
		"Layer_SetIgnoredFields(Layer self, char const ** options) -> OGRErr\n"
		"\n"
		"Set which fields can be omitted when retrieving features from the\n"
		"layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_SetIgnoredFields`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"options: list[str]\n"
		"    A list of field names.\n"
		"    If an empty list is passed, the ignored list is cleared.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` if all field names have been resolved\n"
		"    (even if the driver does not support this method)\n"
		"\n"
		""},
	 { "Layer_Intersection", (PyCFunction)(void(*)(void))_wrap_Layer_Intersection, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_Intersection(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
		"\n"
		"Intersection of two layers.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_Intersection`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"method_layer: Layer\n"
		"    the method layer. Should not be None.\n"
		"result_layer: Layer\n"
		"    the layer where the features resulting from the\n"
		"    operation are inserted. Should not be None.\n"
		"options: list[str], optional\n"
		"    List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
		"callback: Callable, optional\n"
		"    a GDALProgressFunc() compatible callback function for\n"
		"    reporting progress or None.\n"
		"callback_data:\n"
		"    Argument to be passed to 'callback'. May be None.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int:\n"
		"    An error code if there was an error or the execution was interrupted,\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
		"\n"
		""},
	 { "Layer_Union", (PyCFunction)(void(*)(void))_wrap_Layer_Union, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_Union(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
		"\n"
		"Union of two layers.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_Union`\n"
		"\n"
		"The first geometry field is always used.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"method_layer: Layer\n"
		"    the method layer. Should not be None.\n"
		"result_layer: Layer\n"
		"    the layer where the features resulting from the\n"
		"    operation are inserted. Should not be None.\n"
		"options: list[str], optional\n"
		"    List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
		"callback: Callable, optional\n"
		"    a GDALProgressFunc() compatible callback function for\n"
		"    reporting progress or None.\n"
		"callback_data:\n"
		"    Argument to be passed to 'callback'. May be None.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int:\n"
		"    An error code if there was an error or the execution was interrupted,\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
		"\n"
		""},
	 { "Layer_SymDifference", (PyCFunction)(void(*)(void))_wrap_Layer_SymDifference, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_SymDifference(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
		"\n"
		"Symmetrical difference of two layers.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_SymDifference`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"method_layer: Layer\n"
		"    the method layer. Should not be None.\n"
		"result_layer: Layer\n"
		"    the layer where the features resulting from the\n"
		"    operation are inserted. Should not be None.\n"
		"options: list[str], optional\n"
		"    List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
		"callback: Callable, optional\n"
		"    a GDALProgressFunc() compatible callback function for\n"
		"    reporting progress or None.\n"
		"callback_data:\n"
		"    Argument to be passed to 'callback'. May be None.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int:\n"
		"    An error code if there was an error or the execution was interrupted,\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
		"\n"
		""},
	 { "Layer_Identity", (PyCFunction)(void(*)(void))_wrap_Layer_Identity, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_Identity(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
		"\n"
		"Identify the features of this layer with the ones from the identity layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_Identity`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"method_layer: Layer\n"
		"    the method layer. Should not be None.\n"
		"result_layer: Layer\n"
		"    the layer where the features resulting from the\n"
		"    operation are inserted. Should not be None.\n"
		"options: list[str], optional\n"
		"    List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
		"callback: Callable, optional\n"
		"    a GDALProgressFunc() compatible callback function for\n"
		"    reporting progress or None.\n"
		"callback_data:\n"
		"    Argument to be passed to 'callback'. May be None.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int:\n"
		"    An error code if there was an error or the execution was interrupted,\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
		"\n"
		""},
	 { "Layer_Update", (PyCFunction)(void(*)(void))_wrap_Layer_Update, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_Update(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
		"\n"
		"Update this layer with features from the update layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_Update`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"method_layer: Layer\n"
		"    the method layer. Should not be None.\n"
		"result_layer: Layer\n"
		"    the layer where the features resulting from the\n"
		"    operation are inserted. Should not be None.\n"
		"options: list[str], optional\n"
		"    List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
		"callback: Callable, optional\n"
		"    a GDALProgressFunc() compatible callback function for\n"
		"    reporting progress or None.\n"
		"callback_data:\n"
		"    Argument to be passed to 'callback'. May be None.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int:\n"
		"    An error code if there was an error or the execution was interrupted,\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
		"\n"
		""},
	 { "Layer_Clip", (PyCFunction)(void(*)(void))_wrap_Layer_Clip, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_Clip(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
		"\n"
		"Clip off areas that are not covered by the method layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_Clip`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"method_layer: Layer\n"
		"    the method layer. Should not be None.\n"
		"result_layer: Layer\n"
		"    the layer where the features resulting from the\n"
		"    operation are inserted. Should not be None.\n"
		"options: list[str], optional\n"
		"    List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
		"callback: Callable, optional\n"
		"    a GDALProgressFunc() compatible callback function for\n"
		"    reporting progress or None.\n"
		"callback_data:\n"
		"    Argument to be passed to 'callback'. May be None.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int:\n"
		"    An error code if there was an error or the execution was interrupted,\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
		"\n"
		""},
	 { "Layer_Erase", (PyCFunction)(void(*)(void))_wrap_Layer_Erase, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_Erase(Layer self, Layer method_layer, Layer result_layer, char ** options=None, GDALProgressFunc callback=0, void * callback_data=None) -> OGRErr\n"
		"\n"
		"Remove areas that are covered by the method layer.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_Erase`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"method_layer: Layer\n"
		"    the method layer. Should not be None.\n"
		"result_layer: Layer\n"
		"    the layer where the features resulting from the\n"
		"    operation are inserted. Should not be None.\n"
		"options: list[str], optional\n"
		"    List of options (empty list is allowed). For example [\"PROMOTE_TO_MULTI=YES\"].\n"
		"callback: Callable, optional\n"
		"    a GDALProgressFunc() compatible callback function for\n"
		"    reporting progress or None.\n"
		"callback_data:\n"
		"    Argument to be passed to 'callback'. May be None.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int:\n"
		"    An error code if there was an error or the execution was interrupted,\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` otherwise.\n"
		"\n"
		""},
	 { "Layer_GetStyleTable", _wrap_Layer_GetStyleTable, METH_O, "\n"
		"Layer_GetStyleTable(Layer self) -> StyleTable\n"
		"\n"
		"Get style table.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_GetStyleTable`\n"
		"\n"
		""},
	 { "Layer_SetStyleTable", _wrap_Layer_SetStyleTable, METH_VARARGS, "\n"
		"Layer_SetStyleTable(Layer self, StyleTable table)\n"
		"\n"
		"Set style table.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_SetStyleTable`\n"
		"\n"
		""},
	 { "Layer_ExportArrowArrayStreamPyCapsule", _wrap_Layer_ExportArrowArrayStreamPyCapsule, METH_VARARGS, "Layer_ExportArrowArrayStreamPyCapsule(Layer self, char ** options=None) -> PyObject *"},
	 { "Layer_GetArrowStream", _wrap_Layer_GetArrowStream, METH_VARARGS, "Layer_GetArrowStream(Layer self, char ** options=None) -> ArrowArrayStream"},
	 { "Layer_IsArrowSchemaSupported", _wrap_Layer_IsArrowSchemaSupported, METH_VARARGS, "Layer_IsArrowSchemaSupported(Layer self, ArrowSchema schema, char ** options=None)"},
	 { "Layer_CreateFieldFromArrowSchema", _wrap_Layer_CreateFieldFromArrowSchema, METH_VARARGS, "Layer_CreateFieldFromArrowSchema(Layer self, ArrowSchema schema, char ** options=None) -> OGRErr"},
	 { "Layer_WriteArrowBatch", _wrap_Layer_WriteArrowBatch, METH_VARARGS, "Layer_WriteArrowBatch(Layer self, ArrowSchema schema, ArrowArray array, char ** options=None) -> OGRErr"},
	 { "Layer_WriteArrowStreamCapsule", _wrap_Layer_WriteArrowStreamCapsule, METH_VARARGS, "Layer_WriteArrowStreamCapsule(Layer self, PyObject * capsule, int createFieldsFromSchema, char ** options=None) -> OGRErr"},
	 { "Layer_WriteArrowSchemaAndArrowArrayCapsule", _wrap_Layer_WriteArrowSchemaAndArrowArrayCapsule, METH_VARARGS, "Layer_WriteArrowSchemaAndArrowArrayCapsule(Layer self, PyObject * schemaCapsule, PyObject * arrayCapsule, int createFieldsFromSchema, char ** options=None) -> OGRErr"},
	 { "Layer_GetGeometryTypes", (PyCFunction)(void(*)(void))_wrap_Layer_GetGeometryTypes, METH_VARARGS|METH_KEYWORDS, "\n"
		"Layer_GetGeometryTypes(Layer self, int geom_field=0, int flags=0, GDALProgressFunc callback=0, void * callback_data=None)\n"
		"\n"
		"Get actual geometry types found in features.\n"
		"\n"
		"For more details: :cpp:func:`OGR_L_GetGeometryTypes`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"geom_field: int, optional\n"
		"    index of the geometry field\n"
		"flags: int, optional\n"
		"    0, or a combination of :py:const:`osgeo.ogr.GGT_COUNT_NOT_NEEDED`,\n"
		"    :py:const:`osgeo.ogr.GGT_STOP_IF_MIXED` and\n"
		"    :py:const:`osgeo.ogr.GGT_GEOMCOLLECTIONZ_TINZ`\n"
		"callback: Callable, optional\n"
		"    a GDALProgressFunc() compatible callback function for\n"
		"    cancellation or None.\n"
		"callback_data:\n"
		"    Argument to be passed to 'callback'. May be None.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"dict:\n"
		"    A dictionary whose keys are :py:const:`osgeo.ogr.wkbXXXX` constants and\n"
		"    values the corresponding number of geometries of that type in the layer.\n"
		"\n"
		""},
	 { "Layer_GetSupportedSRSList", (PyCFunction)(void(*)(void))_wrap_Layer_GetSupportedSRSList, METH_VARARGS|METH_KEYWORDS, "Layer_GetSupportedSRSList(Layer self, int geom_field=0)"},
	 { "Layer_SetActiveSRS", _wrap_Layer_SetActiveSRS, METH_VARARGS, "Layer_SetActiveSRS(Layer self, int geom_field, SpatialReference srs) -> OGRErr"},
	 { "Layer_swigregister", Layer_swigregister, METH_O, NULL},
	 { "delete_Feature", _wrap_delete_Feature, METH_O, "delete_Feature(Feature self)"},
	 { "new_Feature", (PyCFunction)(void(*)(void))_wrap_new_Feature, METH_VARARGS|METH_KEYWORDS, "\n"
		"new_Feature(FeatureDefn feature_def) -> Feature\n"
		"\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"feature_def:\n"
		"    :py:class:`FeatureDefn` to which the feature will adhere.\n"
		"\n"
		""},
	 { "Feature_GetDefnRef", _wrap_Feature_GetDefnRef, METH_O, "\n"
		"Feature_GetDefnRef(Feature self) -> FeatureDefn\n"
		"\n"
		"\n"
		"Fetch the :py:class:`FeatureDefn` associated with this Feature.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetDefnRef()`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"FeatureDefn\n"
		"\n"
		""},
	 { "Feature_SetGeometry", _wrap_Feature_SetGeometry, METH_VARARGS, "\n"
		"Feature_SetGeometry(Feature self, Geometry geom) -> OGRErr\n"
		"\n"
		"\n"
		"Set feature geometry.\n"
		"\n"
		"This function updates the features geometry, and operates exactly as\n"
		":py:meth:`SetGeometryDirectly`, except that this function does not assume\n"
		"ownership of the passed geometry, but instead makes a copy of it.\n"
		"\n"
		"See :cpp:func:`OGRFeature::SetGeometry`.\n"
		"\n"
		"This method has only an effect on the in-memory feature object. If\n"
		"this object comes from a layer and the modifications must be\n"
		"serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
		"afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
		"used afterwards.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"geom : Geometry\n"
		"    new geometry to apply to feature.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`OGRERR_NONE` if successful, or\n"
		"    :py:const:`OGR_UNSUPPORTED_GEOMETRY_TYPE` if the geometry type is illegal for\n"
		"    the :py:class:`FeatureDefn` (checking not yet implemented).\n"
		"\n"
		""},
	 { "Feature_SetGeometryDirectly", _wrap_Feature_SetGeometryDirectly, METH_VARARGS, "Feature_SetGeometryDirectly(Feature self, Geometry geom) -> OGRErr"},
	 { "Feature_GetGeometryRef", _wrap_Feature_GetGeometryRef, METH_O, "\n"
		"Feature_GetGeometryRef(Feature self) -> Geometry\n"
		"\n"
		"Return the feature geometry\n"
		"\n"
		"The lifetime of the returned geometry is bound to the one of its belonging\n"
		"feature.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetGeometryRef`\n"
		"\n"
		"The :py:func:`Feature.geometry` method is also available as an alias of :py:func:`Feature.GetGeometryRef`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    the geometry, or None.\n"
		"\n"
		""},
	 { "Feature_SetGeomField", _wrap_Feature_SetGeomField, METH_VARARGS, "\n"
		"Feature_SetGeomField(Feature self, int iField, Geometry geom) -> OGRErr\n"
		"Feature_SetGeomField(Feature self, char const * field_name, Geometry geom) -> OGRErr\n"
		"\n"
		"\n"
		"Set feature geometry of a specified geometry field.\n"
		"\n"
		"This function updates the features geometry, and operates exactly as\n"
		":py:meth:`SetGeomFieldDirectly`, except that this function does not assume\n"
		"ownership of the passed geometry, but instead makes a copy of it.\n"
		"\n"
		"See :cpp:func:`OGRFeature::SetGeomField`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Geometry field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"geom : Geometry\n"
		"    handle to the new geometry to apply to feature.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`OGRERR_NONE` if successful, or\n"
		"    :py:const:`OGR_UNSUPPORTED_GEOMETRY_TYPE` if the geometry type is illegal for\n"
		"    the :py:class:`FeatureDefn` (checking not yet implemented).\n"
		"\n"
		""},
	 { "Feature_SetGeomFieldDirectly", _wrap_Feature_SetGeomFieldDirectly, METH_VARARGS, "\n"
		"Feature_SetGeomFieldDirectly(Feature self, int iField, Geometry geom) -> OGRErr\n"
		"Feature_SetGeomFieldDirectly(Feature self, char const * field_name, Geometry geom) -> OGRErr\n"
		""},
	 { "Feature_GetGeomFieldRef", _wrap_Feature_GetGeomFieldRef, METH_VARARGS, "\n"
		"Feature_GetGeomFieldRef(Feature self, int iField) -> Geometry\n"
		"Feature_GetGeomFieldRef(Feature self, char const * field_name) -> Geometry\n"
		"\n"
		"\n"
		"Fetch a feature :py:class:`Geometry`.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetGeomFieldRef`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"Geometry\n"
		"\n"
		"\n"
		""},
	 { "Feature_Clone", _wrap_Feature_Clone, METH_O, "\n"
		"Feature_Clone(Feature self) -> Feature\n"
		"\n"
		"Duplicate a Feature.\n"
		"See :cpp:func:`OGRFeature::Clone`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Feature\n"
		"\n"
		""},
	 { "Feature_Equal", _wrap_Feature_Equal, METH_VARARGS, "\n"
		"Feature_Equal(Feature self, Feature feature) -> bool\n"
		"\n"
		"\n"
		"Test if two features are the same.\n"
		"\n"
		"Two features are considered equal if they reference the\n"
		"same :py:class:`FeatureDefn`, have the same field values, and the same geometry\n"
		"(as tested by :py:func:`Geometry.Equal`) as well as the same feature id.\n"
		"\n"
		"See :cpp:func:`OGRFeature::Equal`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"feature : Feature\n"
		"    feature to test this one against\n"
		"\n"
		"Returns\n"
		"--------\n"
		"bool\n"
		"\n"
		""},
	 { "Feature_GetFieldCount", _wrap_Feature_GetFieldCount, METH_O, "\n"
		"Feature_GetFieldCount(Feature self) -> int\n"
		"\n"
		"\n"
		"Fetch number of fields on this feature This will always be the same as\n"
		"the field count for the :py:class:`FeatureDefn`.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetFieldCount`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    count of fields.\n"
		"\n"
		""},
	 { "Feature_GetFieldDefnRef", _wrap_Feature_GetFieldDefnRef, METH_VARARGS, "\n"
		"Feature_GetFieldDefnRef(Feature self, int id) -> FieldDefn\n"
		"Feature_GetFieldDefnRef(Feature self, char const * field_name) -> FieldDefn\n"
		"\n"
		"\n"
		"Fetch definition for this field.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetFieldDefnRef`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"FieldDefn\n"
		"    a reference to the field definition. This reference should\n"
		"    not be modified.\n"
		"\n"
		""},
	 { "Feature_GetGeomFieldCount", _wrap_Feature_GetGeomFieldCount, METH_O, "\n"
		"Feature_GetGeomFieldCount(Feature self) -> int\n"
		"\n"
		"\n"
		"Fetch number of geometry fields on this feature This will always be\n"
		"the same as the geometry field count for the :py:class:`FeatureDefn`.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetGeomFieldCount`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    count of geometry fields.\n"
		"\n"
		""},
	 { "Feature_GetGeomFieldDefnRef", _wrap_Feature_GetGeomFieldDefnRef, METH_VARARGS, "\n"
		"Feature_GetGeomFieldDefnRef(Feature self, int id) -> GeomFieldDefn\n"
		"Feature_GetGeomFieldDefnRef(Feature self, char const * field_name) -> GeomFieldDefn\n"
		"\n"
		"\n"
		"Fetch definition for this geometry field.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetGeomFieldDefnRef`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"GeomFieldDefn:\n"
		"    a reference to the field definition.\n"
		"    Should not be deleted or modified.\n"
		"\n"
		""},
	 { "Feature_GetFieldAsString", _wrap_Feature_GetFieldAsString, METH_VARARGS, "\n"
		"Feature_GetFieldAsString(Feature self, int id) -> char const\n"
		"Feature_GetFieldAsString(Feature self, char const * field_name) -> char const *\n"
		"\n"
		"\n"
		":py:const:`OFTReal` and :py:const:`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"
		"See :cpp:func:`OGRFeature::GetFieldAsString`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str:\n"
		"    the field value.\n"
		"\n"
		""},
	 { "Feature_GetFieldAsISO8601DateTime", _wrap_Feature_GetFieldAsISO8601DateTime, METH_VARARGS, "\n"
		"Feature_GetFieldAsISO8601DateTime(Feature self, int id, char ** options=None) -> char const\n"
		"Feature_GetFieldAsISO8601DateTime(Feature self, char const * field_name, char ** options=None) -> char const *\n"
		"\n"
		"\n"
		"Fetch :py:const:`OFTDateTime` field value as a ISO8601 representation.\n"
		"\n"
		"Return a string like 'YYYY-MM-DDTHH:MM:SS(.sss)?(Z|([+|-]HH:MM))?'\n"
		"Milliseconds are omitted if equal to zero.\n"
		"Other field types, or errors will result in a return of an empty string.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetFieldAsISO8601DateTime`.\n"
		"\n"
		".. versionadded:: 3.7\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"options : dict / str\n"
		"    Not currently used.\n"
		"\n"
		""},
	 { "Feature_GetFieldAsInteger", _wrap_Feature_GetFieldAsInteger, METH_VARARGS, "\n"
		"Feature_GetFieldAsInteger(Feature self, int id) -> int\n"
		"Feature_GetFieldAsInteger(Feature self, char const * field_name) -> int\n"
		"\n"
		"\n"
		"Fetch field value as a 32-bit integer.\n"
		"\n"
		":py:const:`OFTString` features will be translated using atoi().\n"
		":py:const:`OFTReal` fields will be cast to integer. Other field types, or\n"
		"errors will result in a return value of zero.\n"
		"\n"
		"See :cpp:func:`GetFieldAsInteger`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    the field value.\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> defn = ogr.FeatureDefn()\n"
		">>> defn.AddFieldDefn(ogr.FieldDefn('my_int', ogr.OFTInteger64))\n"
		">>> feature = ogr.Feature(defn)\n"
		">>> feature['my_int'] = 2**32 + 1\n"
		">>> feature.GetFieldAsInteger('my_int')\n"
		"Warning 1: Integer overflow occurred when trying to return 64bit integer. Use GetFieldAsInteger64() instead\n"
		"2147483647\n"
		">>> feature.GetFieldAsInteger64('my_int')\n"
		"4294967297\n"
		">>> feature.GetField('my_int')\n"
		"4294967297\n"
		"\n"
		""},
	 { "Feature_GetFieldAsInteger64", _wrap_Feature_GetFieldAsInteger64, METH_VARARGS, "\n"
		"Feature_GetFieldAsInteger64(Feature self, int id) -> GIntBig\n"
		"Feature_GetFieldAsInteger64(Feature self, char const * field_name) -> GIntBig\n"
		"\n"
		"\n"
		"Fetch field value as integer 64 bit.\n"
		"\n"
		":py:const:`OFTInteger` are promoted to 64 bit. :py:const:`OFTString` features\n"
		"will be translated using :cpp:func:`CPLAtoGIntBig`. :py:const:`OFTReal` fields\n"
		"will be cast to integer. Other field types, or errors will result in a return\n"
		"value of zero.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetFieldAsInteger64`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    the field value.\n"
		"\n"
		""},
	 { "Feature_GetFieldAsDouble", _wrap_Feature_GetFieldAsDouble, METH_VARARGS, "\n"
		"Feature_GetFieldAsDouble(Feature self, int id) -> double\n"
		"Feature_GetFieldAsDouble(Feature self, char const * field_name) -> double\n"
		"\n"
		"Fetch field value as a double.\n"
		"\n"
		":py:const:`OFTString` features will be translated using :cpp:func:`CPLAtof`. :py:const:`OFTInteger`\n"
		"fields will be cast to double. Other field types, or errors will\n"
		"result in a return value of zero.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetFieldAsDouble`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"float:\n"
		"    the field value.\n"
		"\n"
		""},
	 { "Feature_GetFieldAsDateTime", _wrap_Feature_GetFieldAsDateTime, METH_VARARGS, "\n"
		"Feature_GetFieldAsDateTime(Feature self, int id)\n"
		"Feature_GetFieldAsDateTime(Feature self, char const * field_name)\n"
		"\n"
		"\n"
		"Fetch field value as date and time.\n"
		"\n"
		"Currently this method only works for :py:const:`OFTDate`, :py:const:`OFTTime`\n"
		"and :py:const:`OFTDateTime` fields.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetFieldAsDateTime`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"list\n"
		"    list containing [ year, month, day, hour, minute, second, timezone flag ]\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> from datetime import datetime\n"
		">>> from zoneinfo import ZoneInfo\n"
		">>> defn = ogr.FeatureDefn()\n"
		">>> defn.AddFieldDefn(ogr.FieldDefn('unknown', ogr.OFTDateTime))\n"
		">>> defn.AddFieldDefn(ogr.FieldDefn('local', ogr.OFTDateTime))\n"
		">>> defn.AddFieldDefn(ogr.FieldDefn('utc', ogr.OFTDateTime))\n"
		">>> feature = ogr.Feature(defn)\n"
		">>> feature['unknown'] = datetime.now()\n"
		">>> feature['local'] = datetime.now(ZoneInfo('Canada/Eastern'))\n"
		">>> feature['utc'] = datetime.now(ZoneInfo('UTC'))\n"
		">>> feature.GetFieldAsDateTime('unknown')\n"
		"[2024, 3, 15, 20, 34, 52.594173431396484, 0]\n"
		">>> feature.GetFieldAsDateTime('local')\n"
		"[2024, 3, 15, 20, 34, 52.59502410888672, 84]\n"
		">>> feature.GetFieldAsDateTime('utc')\n"
		"[2024, 3, 16, 0, 34, 52.59580993652344, 100]\n"
		"\n"
		"See Also\n"
		"--------\n"
		":py:func:`Feature.GetFieldAsISO8601DateTime`\n"
		"\n"
		""},
	 { "Feature_GetFieldAsIntegerList", _wrap_Feature_GetFieldAsIntegerList, METH_VARARGS, "\n"
		"Feature_GetFieldAsIntegerList(Feature self, int id)\n"
		"Feature_GetFieldAsIntegerList(Feature self, char const * field_name)\n"
		"\n"
		"\n"
		"Fetch field value as a list of integers.\n"
		"\n"
		"Currently this function only works for :py:const:`OFTIntegerList` fields.\n"
		"\n"
		"This function is the same as the C++ method\n"
		":cpp:func:`OGRFeature::GetFieldAsIntegerList`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"list:\n"
		"    the field value.\n"
		"\n"
		""},
	 { "Feature_GetFieldAsInteger64List", _wrap_Feature_GetFieldAsInteger64List, METH_VARARGS, "\n"
		"Feature_GetFieldAsInteger64List(Feature self, int id)\n"
		"\n"
		"Fetch field value as a list of 64 bit integers.\n"
		"\n"
		"Currently this function only works for :py:const:`OFTInteger64List` fields.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetFieldAsInteger64List`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"list:\n"
		"    the field value.\n"
		"\n"
		""},
	 { "Feature_GetFieldAsDoubleList", _wrap_Feature_GetFieldAsDoubleList, METH_VARARGS, "\n"
		"Feature_GetFieldAsDoubleList(Feature self, int id)\n"
		"Feature_GetFieldAsDoubleList(Feature self, char const * field_name)\n"
		"\n"
		"\n"
		"Fetch field value as a list of doubles.\n"
		"\n"
		"Currently this function only works for :py:const:`OFTRealList` fields.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetFieldAsDoubleList`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"list\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> defn = ogr.FeatureDefn()\n"
		">>> defn.AddFieldDefn(ogr.FieldDefn('list', ogr.OFTRealList))\n"
		">>> feature = ogr.Feature(defn)\n"
		">>> feature['list'] = [1.1, 2.2, 3.3]\n"
		">>> feature.GetFieldAsDoubleList('list')\n"
		"[1.1, 2.2, 3.3]\n"
		"\n"
		""},
	 { "Feature_GetFieldAsStringList", _wrap_Feature_GetFieldAsStringList, METH_VARARGS, "\n"
		"Feature_GetFieldAsStringList(Feature self, int id) -> char **\n"
		"\n"
		"\n"
		"Fetch field value as a list of strings.\n"
		"\n"
		"Currently this method only works for :py:const:`OFTStringList` fields.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetFieldAsStringList`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"list:\n"
		"    the field value.\n"
		"\n"
		""},
	 { "Feature_GetFieldAsBinary", _wrap_Feature_GetFieldAsBinary, METH_VARARGS, "\n"
		"Feature_GetFieldAsBinary(Feature self, int id) -> OGRErr\n"
		"Feature_GetFieldAsBinary(Feature self, char const * field_name) -> OGRErr\n"
		"\n"
		"\n"
		"Fetch field value as binary.\n"
		"\n"
		"This method only works for :py:const:`OFTBinary` and :py:const:`OFTString` fields.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetFieldAsBinary`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"bytearray\n"
		"\n"
		""},
	 { "Feature_IsFieldSet", _wrap_Feature_IsFieldSet, METH_VARARGS, "\n"
		"Feature_IsFieldSet(Feature self, int id) -> bool\n"
		"Feature_IsFieldSet(Feature self, char const * field_name) -> bool\n"
		"\n"
		"\n"
		"Test if a field has ever been assigned a value or not.\n"
		"\n"
		"See :cpp:func:`OGRFeature::IsFieldSet`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"bool:\n"
		"    ``True`` if the field has been set, otherwise ``False``.\n"
		"\n"
		""},
	 { "Feature_IsFieldNull", _wrap_Feature_IsFieldNull, METH_VARARGS, "\n"
		"Feature_IsFieldNull(Feature self, int id) -> bool\n"
		"Feature_IsFieldNull(Feature self, char const * field_name) -> bool\n"
		"\n"
		"\n"
		"Test if a field is null.\n"
		"\n"
		"See :cpp:func:OGRFeature::`IsFieldNull`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"bool:\n"
		"    ``True`` if the field is null, otherwise ``False``\n"
		"\n"
		""},
	 { "Feature_IsFieldSetAndNotNull", _wrap_Feature_IsFieldSetAndNotNull, METH_VARARGS, "\n"
		"Feature_IsFieldSetAndNotNull(Feature self, int id) -> bool\n"
		"Feature_IsFieldSetAndNotNull(Feature self, char const * field_name) -> bool\n"
		"\n"
		"\n"
		"Test if a field is set and not null.\n"
		"\n"
		"See :cpp:func:`OGRFeature::IsFieldSetAndNotNull`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"bool:\n"
		"    ``True`` if the field is set and not null, otherwise ``False``.\n"
		"\n"
		""},
	 { "Feature_GetFieldIndex", _wrap_Feature_GetFieldIndex, METH_VARARGS, "\n"
		"Feature_GetFieldIndex(Feature self, char const * field_name) -> int\n"
		"\n"
		"\n"
		"Fetch the field index given field name.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetFieldIndex`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"field_name:\n"
		"    the name of the field to search for.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    the field index, or -1 if no matching field is found.\n"
		"\n"
		""},
	 { "Feature_GetGeomFieldIndex", _wrap_Feature_GetGeomFieldIndex, METH_VARARGS, "\n"
		"Feature_GetGeomFieldIndex(Feature self, char const * field_name) -> int\n"
		"\n"
		"\n"
		"Fetch the geometry field index given geometry field name.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetGeomFieldIndex`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"field_name:\n"
		"    the name of the geometry field to search for.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    the geometry field index, or -1 if no matching geometry field is found.\n"
		"\n"
		""},
	 { "Feature_GetFID", _wrap_Feature_GetFID, METH_O, "\n"
		"Feature_GetFID(Feature self) -> GIntBig\n"
		"\n"
		"\n"
		"Get feature identifier.\n"
		"See :cpp:func:`OGRFeature::GetFID`\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int:\n"
		"    feature id or :py:const:`NullFID` if none has been assigned.\n"
		"\n"
		""},
	 { "Feature_SetFID", _wrap_Feature_SetFID, METH_VARARGS, "\n"
		"Feature_SetFID(Feature self, GIntBig fid) -> OGRErr\n"
		"\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 :py:const:NullFID` (-1)\n"
		"indicating that the feature id is unknown.\n"
		"\n"
		"See :cpp:func:`OGRFeature::SetFID`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fid:\n"
		"    the new feature identifier value to assign.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`OGRERR_NONE` on success, or some other value on failure.\n"
		"\n"
		""},
	 { "Feature_DumpReadable", _wrap_Feature_DumpReadable, METH_O, "\n"
		"Feature_DumpReadable(Feature self)\n"
		"\n"
		"\n"
		"Print this feature in a human readable form.\n"
		"\n"
		"This dumps the attributes and geometry. It doesn't include\n"
		"definition information other than field types and names nor does it\n"
		"report the geometry spatial reference system.\n"
		"\n"
		"See :cpp:func:`OGRFeature::DumpReadable`.\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> with gdal.OpenEx('data/poly.shp') as ds:\n"
		"...     lyr = ds.GetLayer(0)\n"
		"...     feature = lyr.GetNextFeature()\n"
		"...     feature.DumpReadable()\n"
		"...\n"
		"OGRFeature(poly):0\n"
		"  AREA (Real) = 215229.266\n"
		"  EAS_ID (Integer64) = 168\n"
		"  PRFEDEA (String) = 35043411\n"
		"  POLYGON ((479819.84375 4765180.5,479690.1875 4765259.5,479647.0 4765369.5,479730.375 4765400.5,480039.03125 4765539.5,480035.34375 4765558.5,480159.78125 4765610.5,480202.28125 4765482.0,480365.0 4765015.5,480389.6875 4764950.0,480133.96875 4764856.5,480080.28125 4764979.5,480082.96875 4765049.5,480088.8125 4765139.5,480059.90625 4765239.5,480019.71875 4765319.5,479980.21875 4765409.5,479909.875 4765370.0,479859.875 4765270.0,479819.84375 4765180.5))\n"
		"\n"
		""},
	 { "Feature_DumpReadableAsString", _wrap_Feature_DumpReadableAsString, METH_VARARGS, "\n"
		"Feature_DumpReadableAsString(Feature self, char ** options=None) -> retStringAndCPLFree *\n"
		"\n"
		"\n"
		"Return feature information in a human-readable form.\n"
		"Returns the text printed by :py:func:`Feature.DumpReadable`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"str\n"
		"\n"
		""},
	 { "Feature_UnsetField", _wrap_Feature_UnsetField, METH_VARARGS, "\n"
		"Feature_UnsetField(Feature self, int id)\n"
		"Feature_UnsetField(Feature self, char const * field_name)\n"
		"\n"
		"\n"
		"Clear a field, marking it as unset.\n"
		"\n"
		"See :cpp:func:`OGRFeature::UnsetField`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		""},
	 { "Feature_SetFieldNull", _wrap_Feature_SetFieldNull, METH_VARARGS, "\n"
		"Feature_SetFieldNull(Feature self, int id)\n"
		"Feature_SetFieldNull(Feature self, char const * field_name)\n"
		"\n"
		"\n"
		"Clear a field, marking it as null.\n"
		"\n"
		"See :cpp:func:`OGRFeature::SetFieldNull`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"\n"
		""},
	 { "Feature_SetFieldInteger64", _wrap_Feature_SetFieldInteger64, METH_VARARGS, "Feature_SetFieldInteger64(Feature self, int id, GIntBig value)"},
	 { "Feature_SetField", _wrap_Feature_SetField, METH_VARARGS, "\n"
		"Feature_SetField(Feature self, int id, char const * value)\n"
		"Feature_SetField(Feature self, char const * field_name, char const * value)\n"
		"Feature_SetField(Feature self, int id, double value)\n"
		"Feature_SetField(Feature self, char const * field_name, double value)\n"
		"Feature_SetField(Feature self, int id, int year, int month, int day, int hour, int minute, float second, int tzflag)\n"
		"Feature_SetField(Feature self, char const * field_name, int year, int month, int day, int hour, int minute, float second, int tzflag)\n"
		""},
	 { "Feature_SetFieldIntegerList", _wrap_Feature_SetFieldIntegerList, METH_VARARGS, "\n"
		"Feature_SetFieldIntegerList(Feature self, int id, int nList)\n"
		"void\n"
		"\n"
		"Set field to list of integer values.\n"
		"\n"
		"This function currently on has an effect of :py:const:`OFTIntegerList`,\n"
		":py:const:`OFTInteger64List`, :py:const:`OFTRealList` fields.\n"
		"\n"
		"See :cpp:func:`OGRFeature::SetField`.\n"
		"\n"
		"This method has only an effect on the in-memory feature object. If\n"
		"this object comes from a layer and the modifications must be\n"
		"serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
		"afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
		"used afterwards.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"id : int\n"
		"    the field to set, from 0 to :py:meth:`GetFieldCount`-1.\n"
		"nList : list\n"
		"    the values to assign.\n"
		"\n"
		""},
	 { "Feature_SetFieldInteger64List", _wrap_Feature_SetFieldInteger64List, METH_VARARGS, "\n"
		"Feature_SetFieldInteger64List(Feature self, int id, int nList)\n"
		"void\n"
		"\n"
		"Set field to list of 64 bit integer values.\n"
		"\n"
		"This function currently on has an effect of :py:const:`OFTIntegerList`,\n"
		":py:const:`OFTInteger64List`, :py:const:`OFTRealList` fields.\n"
		"\n"
		"See :cpp:func:`OGRFeature::SetField`.\n"
		"\n"
		"This method has only an effect on the in-memory feature object. If\n"
		"this object comes from a layer and the modifications must be\n"
		"serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
		"afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
		"used afterwards.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"id : int\n"
		"    the field to set, from 0 to :py:meth:`GetFieldCount`-1.\n"
		"nList : list\n"
		"    the values to assign.\n"
		"\n"
		""},
	 { "Feature_SetFieldDoubleList", _wrap_Feature_SetFieldDoubleList, METH_VARARGS, "\n"
		"Feature_SetFieldDoubleList(Feature self, int id, int nList)\n"
		"\n"
		"\n"
		"Set field to list of double values.\n"
		"\n"
		"This function currently on has an effect of :py:const:`OFTIntegerList`,\n"
		":py:const:`OFTInteger64List`, :py:const:`OFTRealList` fields.\n"
		"\n"
		"See :cpp:func:`OGRFeature::SetField`.\n"
		"\n"
		"This method has only an effect on the in-memory feature object. If\n"
		"this object comes from a layer and the modifications must be\n"
		"serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
		"afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
		"used afterwards.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"id : int\n"
		"    the field to set, from 0 to :py:meth:`GetFieldCount`-1.\n"
		"nList : list\n"
		"    the values to assign.\n"
		"\n"
		""},
	 { "Feature_SetFieldStringList", _wrap_Feature_SetFieldStringList, METH_VARARGS, "\n"
		"Feature_SetFieldStringList(Feature self, int id, char ** pList)\n"
		"\n"
		"\n"
		"Set field to list of strings value.\n"
		"\n"
		"This function currently only has an effect of :py:const:`OFTStringList` fields.\n"
		"\n"
		"See :cpp:func:`OGRFeature::SetField`.\n"
		"\n"
		"This method has only an effect on the in-memory feature object. If\n"
		"this object comes from a layer and the modifications must be\n"
		"serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
		"afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
		"used afterwards.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"value:\n"
		"    the value to assign.\n"
		"\n"
		""},
	 { "Feature__SetFieldBinary", _wrap_Feature__SetFieldBinary, METH_VARARGS, "Feature__SetFieldBinary(Feature self, int id, int nLen)"},
	 { "Feature_SetFieldBinaryFromHexString", _wrap_Feature_SetFieldBinaryFromHexString, METH_VARARGS, "\n"
		"Feature_SetFieldBinaryFromHexString(Feature self, int id, char const * pszValue)\n"
		"Feature_SetFieldBinaryFromHexString(Feature self, char const * field_name, char const * pszValue)\n"
		""},
	 { "Feature_SetFrom", (PyCFunction)(void(*)(void))_wrap_Feature_SetFrom, METH_VARARGS|METH_KEYWORDS, "\n"
		"Feature_SetFrom(Feature self, Feature other, int forgiving=1) -> OGRErr\n"
		"\n"
		"Set one feature from another.\n"
		"\n"
		"Overwrite the contents of this feature from the geometry and\n"
		"attributes of another. The other feature does not need to have the\n"
		"same :py:class:`FeatureDefn`. 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"
		"See :cpp:func:`OGRFeature::SetFrom`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"other : Feature\n"
		"    feature from which geometry and field values will be copied.\n"
		"forgiving : bool, default = True\n"
		"    ``True`` if the operation should continue despite lacking\n"
		"    output fields matching some of the source fields.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`OGRERR_NONE` if the operation succeeds, even if some values are not\n"
		"    transferred, otherwise an error code.\n"
		"\n"
		""},
	 { "Feature_SetFromWithMap", _wrap_Feature_SetFromWithMap, METH_VARARGS, "\n"
		"Feature_SetFromWithMap(Feature self, Feature other, int forgiving, int nList) -> OGRErr\n"
		"\n"
		"\n"
		"Set one feature from another.\n"
		"\n"
		"Overwrite the contents of this feature from the geometry and\n"
		"attributes of another. The other feature does not need to have the\n"
		"same :py:class:`FeatureDefn`. 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 :py:meth: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"
		"See :cpp:func:`OGRFeature::SetFrom`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"other : Feature\n"
		"    handle to the feature from which geometry, and field\n"
		"    values will be copied.\n"
		"forgiving : bool\n"
		"    ``True`` if the operation should continue despite lacking\n"
		"    output fields matching some of the source fields.\n"
		"nList : list\n"
		"    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"
		"Returns\n"
		"--------\n"
		"OGRErr:\n"
		"    :py:const:`OGRERR_NONE` if the operation succeeds, even if some values are not\n"
		"    transferred, otherwise an error code.\n"
		"\n"
		""},
	 { "Feature_GetStyleString", _wrap_Feature_GetStyleString, METH_O, "\n"
		"Feature_GetStyleString(Feature self) -> char const *\n"
		"\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 :source_file:`ogr/ogr_featurestyle.h` for services available to parse\n"
		"it.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetStyleString`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str or None\n"
		"\n"
		""},
	 { "Feature_SetStyleString", _wrap_Feature_SetStyleString, METH_VARARGS, "\n"
		"Feature_SetStyleString(Feature self, char const * the_string)\n"
		"\n"
		"\n"
		"Set feature style string.\n"
		"\n"
		"See :cpp:func:`OGRFeature::SetStyleString`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"the_string : str\n"
		"    the style string to apply to this feature\n"
		"\n"
		""},
	 { "Feature_GetFieldType", _wrap_Feature_GetFieldType, METH_VARARGS, "\n"
		"Feature_GetFieldType(Feature self, int id) -> OGRFieldType\n"
		"Feature_GetFieldType(Feature self, char const * field_name) -> OGRFieldType\n"
		"\n"
		"\n"
		"Return the type of the given field.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int\n"
		"    field type code (e.g., :py:const:`OFTInteger`)\n"
		"\n"
		""},
	 { "Feature_Validate", _wrap_Feature_Validate, METH_VARARGS, "\n"
		"Feature_Validate(Feature self, int flags=OGR_F_VAL_ALL, int bEmitError=TRUE) -> int\n"
		"\n"
		"\n"
		"Validate that a feature meets constraints of its schema.\n"
		"\n"
		"The scope of test is specified with the ``flags`` parameter.\n"
		"\n"
		"Regarding :py:const:`OGR_F_VAL_WIDTH`, the test is done assuming the string\n"
		"width must be interpreted as the number of UTF-8 characters. Some drivers might\n"
		"interpret the width as the number of bytes instead. So this test is rather\n"
		"conservative (if it fails, then it will fail for all interpretations).\n"
		"\n"
		"See :cpp:func:`OGRFeature::Validate`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"flags : int, default = :py:const:`F_VAL_ALL`\n"
		"    One ore more of :py:const:`OGR_F_VAL_NULL`,\n"
		"    :py:const:`OGR_F_VAL_GEOM_TYPE`, py:const:`OGR_F_VAL_WIDTH` and\n"
		"    :py:const:`OGR_F_VAL_ALLOW_NULL_WHEN_DEFAULT` combined with\n"
		"    the with ``|`` operator\n"
		"bEmitError : bool, default = True\n"
		"    TRUE if a CPLError() must be emitted when a check fails\n"
		"\n"
		"Returns\n"
		"-------\n"
		"int:\n"
		"    TRUE if all enabled validation tests pass.\n"
		"\n"
		""},
	 { "Feature_FillUnsetWithDefault", _wrap_Feature_FillUnsetWithDefault, METH_VARARGS, "\n"
		"Feature_FillUnsetWithDefault(Feature self, int bNotNullableOnly=FALSE, char ** options=None)\n"
		"\n"
		"\n"
		"Fill unset fields with default values that might be defined.\n"
		"\n"
		"See :cpp:func:`OGRFeature::FillUnsetWithDefault`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"bNotNullableOnly : bool\n"
		"    if we should fill only unset fields with a not-null\n"
		"    constraint.\n"
		"options : dict\n"
		"    unused currently.\n"
		"\n"
		""},
	 { "Feature_GetNativeData", _wrap_Feature_GetNativeData, METH_O, "\n"
		"Feature_GetNativeData(Feature self) -> char const *\n"
		"\n"
		"\n"
		"Returns the native data for the feature.\n"
		"\n"
		"The native data is the representation in a \"natural\" form that comes\n"
		"from the driver that created this feature, or that is aimed at an\n"
		"output driver. The native data may be in different format, which is\n"
		"indicated by :py:func:`GetNativeMediaType`.\n"
		"\n"
		"Note that most drivers do not support storing the native data in the\n"
		"feature object, and if they do, generally the ``NATIVE_DATA`` open option\n"
		"must be passed at dataset opening.\n"
		"\n"
		"The \"native data\" does not imply it is something more performant or\n"
		"powerful than what can be obtained with the rest of the API, but it\n"
		"may be useful in round-tripping scenarios where some characteristics\n"
		"of the underlying format are not captured otherwise by the OGR\n"
		"abstraction.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetNativeData` and :ref:`rfc-60`.\n"
		"\n"
		"Returns\n"
		"-------\n"
		"str:\n"
		"    a string with the native data, or ``None``.\n"
		"\n"
		""},
	 { "Feature_GetNativeMediaType", _wrap_Feature_GetNativeMediaType, METH_O, "\n"
		"Feature_GetNativeMediaType(Feature self) -> char const *\n"
		"\n"
		"\n"
		"Returns the native media type for the feature.\n"
		"\n"
		"The native media type is the identifier for the format of the native\n"
		"data. It follows the IANA RFC 2045\n"
		"(see https://en.wikipedia.org/wiki/Media_type), e.g.\n"
		"\"application/vnd.geo+json\" for JSon.\n"
		"\n"
		"See :cpp:func:`OGRFeature::GetNativeMediaType` and :ref:`rfc-60`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str:\n"
		"    a string with the native media type, or ``None``.\n"
		"\n"
		""},
	 { "Feature_SetNativeData", _wrap_Feature_SetNativeData, METH_VARARGS, "\n"
		"Feature_SetNativeData(Feature self, char const * nativeData)\n"
		"\n"
		"\n"
		"Sets the native data for the feature.\n"
		"\n"
		"The native data is the representation in a \"natural\" form that comes\n"
		"from the driver that created this feature, or that is aimed at an\n"
		"output driver. The native data may be in different format, which is\n"
		"indicated by :py:meth:`GetNativeMediaType`.\n"
		"\n"
		"See :cpp:func:`OGRFeature::SetNativeData` and :ref:`rfc-60`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"nativeData : str\n"
		"    a string with the native data, or ``None``\n"
		"\n"
		""},
	 { "Feature_SetNativeMediaType", _wrap_Feature_SetNativeMediaType, METH_VARARGS, "\n"
		"Feature_SetNativeMediaType(Feature self, char const * nativeMediaType)\n"
		"\n"
		"\n"
		"Sets the native media type for the feature.\n"
		"\n"
		"The native media type is the identifier for the format of the native\n"
		"data. It follows the IANA RFC 2045\n"
		"(see https://en.wikipedia.org/wiki/Media_type), e.g.\n"
		"\"application/vnd.geo+json\" for JSon.\n"
		"\n"
		"See :cpp:func:`OGRFeature::SetNativeMediaType` and :ref:`rfc-60`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"nativeMediaType : str\n"
		"    a string with the native media type, or ``None``\n"
		"\n"
		""},
	 { "Feature_SetFieldString", _wrap_Feature_SetFieldString, METH_VARARGS, "\n"
		"Feature_SetFieldString(Feature self, int id, char const * value)\n"
		"\n"
		"\n"
		"Set field to string value.\n"
		"\n"
		":py:const:`OFTInteger` fields will be set based on an atoi() conversion of the\n"
		"string. :py:const:`OFTInteger64` fields will be set based on an :cpp:func:`CPLAtoGIntBig`\n"
		"conversion of the string. :py:const:`OFTReal` fields will be set based on an\n"
		":cpp:func:`CPLAtof` conversion of the string. Other field types may be\n"
		"unaffected.\n"
		"\n"
		"See :cpp:func:`OGRFeature::SetField`.\n"
		"\n"
		"This method has only an effect on the in-memory feature object. If\n"
		"this object comes from a layer and the modifications must be\n"
		"serialized back to the datasource, :py:meth:`Layer.SetFeature` must be used\n"
		"afterwards. Or if this is a new feature, :py:meth:`Layer.CreateFeature` must be\n"
		"used afterwards.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"fld_index : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"value:\n"
		"    the value to assign.\n"
		"\n"
		""},
	 { "Feature_swigregister", Feature_swigregister, METH_O, NULL},
	 { "Feature_swiginit", Feature_swiginit, METH_VARARGS, NULL},
	 { "delete_FeatureDefn", _wrap_delete_FeatureDefn, METH_O, "delete_FeatureDefn(FeatureDefn self)"},
	 { "new_FeatureDefn", (PyCFunction)(void(*)(void))_wrap_new_FeatureDefn, METH_VARARGS|METH_KEYWORDS, "\n"
		"new_FeatureDefn(char const * name_null_ok=None) -> FeatureDefn\n"
		"\n"
		"\n"
		"Create a new feature definition object to hold the field definitions.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"name_null_ok : str, optional\n"
		"    Name for the :py:class:`FeatureDefn`.\n"
		"\n"
		""},
	 { "FeatureDefn_GetName", _wrap_FeatureDefn_GetName, METH_O, "\n"
		"FeatureDefn_GetName(FeatureDefn self) -> char const *\n"
		"\n"
		"\n"
		"Get name of the :py:class:`FeatureDefn`.\n"
		"\n"
		"See :cpp:func:`OGRFeatureDefn::GetName`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str:\n"
		"    the name\n"
		"\n"
		""},
	 { "FeatureDefn_GetFieldCount", _wrap_FeatureDefn_GetFieldCount, METH_O, "\n"
		"FeatureDefn_GetFieldCount(FeatureDefn self) -> int\n"
		"\n"
		"\n"
		"Fetch number of fields on the passed feature definition.\n"
		"\n"
		"See :cpp:func:`OGRFeatureDefn::GetFieldCount`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    count of fields.\n"
		"\n"
		""},
	 { "FeatureDefn_GetFieldDefn", _wrap_FeatureDefn_GetFieldDefn, METH_VARARGS, "\n"
		"FeatureDefn_GetFieldDefn(FeatureDefn self, int i) -> FieldDefn\n"
		"\n"
		"\n"
		"Fetch field definition of the passed feature definition.\n"
		"\n"
		"See :cpp:func:`OGRFeatureDefn::GetFieldDefn`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"i : int / str\n"
		"    Field name or 0-based numeric index. For repeated\n"
		"    access, use of the numeric index avoids a lookup\n"
		"    step.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"FieldDefn:\n"
		"    internal field definition object or ``None`` if the field does not\n"
		"    exist. This object should not be modified by the application.\n"
		"\n"
		""},
	 { "FeatureDefn_GetFieldIndex", _wrap_FeatureDefn_GetFieldIndex, METH_VARARGS, "\n"
		"FeatureDefn_GetFieldIndex(FeatureDefn self, char const * field_name) -> int\n"
		"\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"
		"See :cpp:func:`OGRFeatureDefn::GetFieldIndex`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"field_name : str\n"
		"    the field name to search for.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    the field index, or -1 if no match found.\n"
		"\n"
		""},
	 { "FeatureDefn_AddFieldDefn", _wrap_FeatureDefn_AddFieldDefn, METH_VARARGS, "\n"
		"FeatureDefn_AddFieldDefn(FeatureDefn self, FieldDefn defn)\n"
		"\n"
		"\n"
		"Add a new field definition.\n"
		"\n"
		"To add a new field definition to a layer definition, do not use this\n"
		"function directly, but use :py:meth:`Layer.CreateField` instead.\n"
		"\n"
		"This function should only be called while there are no :py:class:`Feature`\n"
		"objects in existence based on this :py:class:`FeatureDefn`. The\n"
		":py:class:`FieldDefn` passed in is copied.\n"
		"\n"
		"See :cpp:func:`OGRFeatureDefn::AddFieldDefn`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"defn : FieldDefn\n"
		"    the new field definition.\n"
		"\n"
		""},
	 { "FeatureDefn_GetGeomFieldCount", _wrap_FeatureDefn_GetGeomFieldCount, METH_O, "\n"
		"FeatureDefn_GetGeomFieldCount(FeatureDefn self) -> int\n"
		"\n"
		"\n"
		"Fetch number of geometry fields on the passed feature definition.\n"
		"\n"
		"See :cpp:func:`OGRFeatureDefn::GetGeomFieldCount`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    count of geometry fields.\n"
		"\n"
		""},
	 { "FeatureDefn_GetGeomFieldDefn", _wrap_FeatureDefn_GetGeomFieldDefn, METH_VARARGS, "\n"
		"FeatureDefn_GetGeomFieldDefn(FeatureDefn self, int i) -> GeomFieldDefn\n"
		"\n"
		"\n"
		"Fetch geometry field definition of the passed feature definition.\n"
		"\n"
		"See :cpp:func:`OGRFeatureDefn::GetGeomFieldDefn`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"i : int\n"
		"    the geometry field to fetch, between 0 and GetGeomFieldCount() - 1.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"GeomFieldDefn:\n"
		"    an internal field definition object or ``None`` if invalid\n"
		"    index. This object should not be modified by the application.\n"
		"\n"
		""},
	 { "FeatureDefn_GetGeomFieldIndex", _wrap_FeatureDefn_GetGeomFieldIndex, METH_VARARGS, "\n"
		"FeatureDefn_GetGeomFieldIndex(FeatureDefn self, char const * field_name) -> int\n"
		"\n"
		"\n"
		"Find geometry field by name.\n"
		"\n"
		"The geometry field index of the first geometry field matching the\n"
		"passed field name (case insensitively) is returned.\n"
		"\n"
		"See :cpp:func:`OGRFeatureDefn::GetGeomFieldIndex`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"field_name : str\n"
		"    the geometry field name to search for.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    the geometry field index, or -1 if no match found.\n"
		"\n"
		""},
	 { "FeatureDefn_AddGeomFieldDefn", _wrap_FeatureDefn_AddGeomFieldDefn, METH_VARARGS, "\n"
		"FeatureDefn_AddGeomFieldDefn(FeatureDefn self, GeomFieldDefn defn)\n"
		"\n"
		"\n"
		"Add a new geometry field definition.\n"
		"\n"
		"To add a new field definition to a layer definition, do not use this\n"
		"function directly, but use :py:meth:`Layer.CreateGeomField` instead.\n"
		"\n"
		"This function should only be called while there are no :py:class:`Feature`\n"
		"objects in existence based on this :py:class:`FeatureDefn`. The\n"
		":py:class:`GeomFieldDefn` passed in is copied.\n"
		"\n"
		"See :cpp:Func:`OGRFeatureDefn::AddGeomFieldDefn`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"defn : GeomFieldDefn\n"
		"    new geometry field definition.\n"
		"\n"
		""},
	 { "FeatureDefn_DeleteGeomFieldDefn", _wrap_FeatureDefn_DeleteGeomFieldDefn, METH_VARARGS, "\n"
		"FeatureDefn_DeleteGeomFieldDefn(FeatureDefn self, int idx) -> OGRErr\n"
		"\n"
		"\n"
		"Delete an existing geometry field definition.\n"
		"\n"
		"To delete an existing geometry field definition from a layer\n"
		"definition, do not use this function directly, but use\n"
		":py:meth:`Layer.DeleteGeomField` instead ( not implemented yet).\n"
		"\n"
		"This function should only be called while there are no :py:class:`Feature`\n"
		"objects in existence based on this :py:class:`FeatureDefn`.\n"
		"\n"
		"See :cpp:func:`OGRFeatureDefn::DeleteGeomFieldDefn`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"idx : int\n"
		"    the index of the geometry field definition.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`OGRERR_NONE` in case of success.\n"
		"\n"
		""},
	 { "FeatureDefn_GetGeomType", _wrap_FeatureDefn_GetGeomType, METH_O, "\n"
		"FeatureDefn_GetGeomType(FeatureDefn self) -> OGRwkbGeometryType\n"
		"\n"
		"\n"
		"Fetch the geometry base type of the passed feature definition.\n"
		"\n"
		"This is equivalent to ``GetGeomFieldDefn(0).GetType()``.\n"
		"\n"
		"See :cpp:func:`OGRFeatureDefn::GetGeomType`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int :\n"
		"    the base type for all geometry related to this definition.\n"
		"\n"
		""},
	 { "FeatureDefn_SetGeomType", _wrap_FeatureDefn_SetGeomType, METH_VARARGS, "\n"
		"FeatureDefn_SetGeomType(FeatureDefn self, OGRwkbGeometryType geom_type)\n"
		"\n"
		"\n"
		"Assign the base geometry type for the passed layer (the same as the\n"
		"feature definition).\n"
		"\n"
		"This is equivalent to ``GetGeomFieldDefn(0).SetType()``.\n"
		"\n"
		"All geometry objects using this type must be of the defined type or a\n"
		"derived type. The default upon creation is :py:const:`wkbUnknown` which allows for\n"
		"any geometry type. The geometry type should generally not be changed\n"
		"after any :py:class:`Feature` objects have been created against this definition.\n"
		"\n"
		"See :cpp:func:`OGRFeatureDefn::SetGeomType`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"geom_type : int\n"
		"    the new type to assign.\n"
		"\n"
		""},
	 { "FeatureDefn_GetReferenceCount", _wrap_FeatureDefn_GetReferenceCount, METH_O, "\n"
		"FeatureDefn_GetReferenceCount(FeatureDefn self) -> int\n"
		"\n"
		"\n"
		"Fetch current reference count.\n"
		"\n"
		"See :cpp:func:`OGRFeatureDefn::GetReferenceCount`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    the current reference count.\n"
		"\n"
		""},
	 { "FeatureDefn_IsGeometryIgnored", _wrap_FeatureDefn_IsGeometryIgnored, METH_O, "\n"
		"FeatureDefn_IsGeometryIgnored(FeatureDefn self) -> int\n"
		"\n"
		"\n"
		"Determine whether the geometry can be omitted when fetching features.\n"
		"\n"
		"Equivalent to ``GetGeomFieldDefn(0).IsIgnored()``.\n"
		"\n"
		"See :cpp:func:`OGRFeatureDefn::IsGeometryIgnored`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    ignore state\n"
		"\n"
		""},
	 { "FeatureDefn_SetGeometryIgnored", _wrap_FeatureDefn_SetGeometryIgnored, METH_VARARGS, "\n"
		"FeatureDefn_SetGeometryIgnored(FeatureDefn self, int bIgnored)\n"
		"\n"
		"\n"
		"Set whether the geometry can be omitted when fetching features.\n"
		"\n"
		"This is equivalent to ``GetGeomFieldDefn(0).SetIgnored()``.\n"
		"\n"
		"See :cpp:func:`OGRFeatureDefn::SetGeometryIgnored`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"bignored : bool\n"
		"    ignore state\n"
		"\n"
		""},
	 { "FeatureDefn_IsStyleIgnored", _wrap_FeatureDefn_IsStyleIgnored, METH_O, "\n"
		"FeatureDefn_IsStyleIgnored(FeatureDefn self) -> int\n"
		"\n"
		"\n"
		"Determine whether the style can be omitted when fetching features.\n"
		"\n"
		"See :cpp:func:`OGRFeatureDefn::IsStyleIgnored`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    ignore state\n"
		"\n"
		""},
	 { "FeatureDefn_SetStyleIgnored", _wrap_FeatureDefn_SetStyleIgnored, METH_VARARGS, "\n"
		"FeatureDefn_SetStyleIgnored(FeatureDefn self, int bIgnored)\n"
		"\n"
		"\n"
		"Set whether the style can be omitted when fetching features.\n"
		"\n"
		"See :cpp:func:`OGRFeatureDefn::SetStyleIgnored`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"bignored : bool\n"
		"    ignore state\n"
		"\n"
		""},
	 { "FeatureDefn_IsSame", _wrap_FeatureDefn_IsSame, METH_VARARGS, "\n"
		"FeatureDefn_IsSame(FeatureDefn self, FeatureDefn other_defn) -> int\n"
		"\n"
		"\n"
		"Test if the feature definition is identical to the other one.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"other_defn : FeatureDefn\n"
		"    other feature definition to compare to.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    1 if the feature definition is identical to the other one.\n"
		"\n"
		""},
	 { "FeatureDefn_swigregister", FeatureDefn_swigregister, METH_O, NULL},
	 { "FeatureDefn_swiginit", FeatureDefn_swiginit, METH_VARARGS, NULL},
	 { "delete_FieldDefn", _wrap_delete_FieldDefn, METH_O, "delete_FieldDefn(FieldDefn self)"},
	 { "new_FieldDefn", (PyCFunction)(void(*)(void))_wrap_new_FieldDefn, METH_VARARGS|METH_KEYWORDS, "\n"
		"new_FieldDefn(char const * name_null_ok=\"unnamed\", OGRFieldType field_type=OFTString) -> FieldDefn\n"
		"\n"
		"Python proxy of an :cpp:class:`OGRFieldDefn`.\n"
		"\n"
		""},
	 { "FieldDefn_GetName", _wrap_FieldDefn_GetName, METH_O, "FieldDefn_GetName(FieldDefn self) -> char const *"},
	 { "FieldDefn_GetNameRef", _wrap_FieldDefn_GetNameRef, METH_O, "\n"
		"FieldDefn_GetNameRef(FieldDefn self) -> char const *\n"
		"\n"
		"\n"
		"Fetch name of this field.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::GetNameRef`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str:\n"
		"    the name of the field definition.\n"
		"\n"
		""},
	 { "FieldDefn_SetName", _wrap_FieldDefn_SetName, METH_VARARGS, "\n"
		"FieldDefn_SetName(FieldDefn self, char const * name)\n"
		"\n"
		"\n"
		"Reset the name of this field.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::SetName`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"name : str\n"
		"    the new name to apply\n"
		"\n"
		""},
	 { "FieldDefn_GetAlternativeName", _wrap_FieldDefn_GetAlternativeName, METH_O, "FieldDefn_GetAlternativeName(FieldDefn self) -> char const *"},
	 { "FieldDefn_GetAlternativeNameRef", _wrap_FieldDefn_GetAlternativeNameRef, METH_O, "\n"
		"FieldDefn_GetAlternativeNameRef(FieldDefn self) -> char const *\n"
		"\n"
		"\n"
		"Fetch the alternative name (or \"alias\") for this field.\n"
		"\n"
		"The alternative name is an optional attribute for a field which can\n"
		"provide a more user-friendly, descriptive name of a field which is not\n"
		"subject to the usual naming constraints defined by the data provider.\n"
		"\n"
		"This is a metadata style attribute only: the alternative name cannot\n"
		"be used in place of the actual field name during SQL queries or other\n"
		"field name dependent API calls.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::GetAlternativeNameRef`.\n"
		"\n"
		".. versionadded:: 3.2\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str:\n"
		"    the alternative name of the field definition.\n"
		"\n"
		""},
	 { "FieldDefn_SetAlternativeName", _wrap_FieldDefn_SetAlternativeName, METH_VARARGS, "\n"
		"FieldDefn_SetAlternativeName(FieldDefn self, char const * alternativeName)\n"
		"\n"
		"\n"
		"Reset the alternative name (or \"alias\") for this field.\n"
		"\n"
		"The alternative name is an optional attribute for a field which can\n"
		"provide a more user-friendly, descriptive name of a field which is not\n"
		"subject to the usual naming constraints defined by the data provider.\n"
		"\n"
		"This is a metadata style attribute only: the alternative name cannot\n"
		"be used in place of the actual field name during SQL queries or other\n"
		"field name dependent API calls.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::SetAlternativeName`.\n"
		"\n"
		".. versionadded:: 3.2\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"alternativeName : str\n"
		"    the new alternative name to apply.\n"
		"\n"
		""},
	 { "FieldDefn_GetType", _wrap_FieldDefn_GetType, METH_O, "\n"
		"FieldDefn_GetType(FieldDefn self) -> OGRFieldType\n"
		"\n"
		"\n"
		"Fetch type of this field.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::GetType`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int\n"
		"    field type code, e.g. :py:const:`OFTInteger`\n"
		"\n"
		""},
	 { "FieldDefn_SetType", _wrap_FieldDefn_SetType, METH_VARARGS, "\n"
		"FieldDefn_SetType(FieldDefn self, OGRFieldType type)\n"
		"\n"
		"\n"
		"Set the type of this field.\n"
		"\n"
		"This should never be done to a :py:class:`FieldDefn` that is already part of\n"
		"an :py:class:`FeatureDefn`.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::SetType`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"type : int\n"
		"    the new field type.\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> f = ogr.FieldDefn()\n"
		">>> f.SetType(ogr.OFTReal)\n"
		"\n"
		""},
	 { "FieldDefn_GetSubType", _wrap_FieldDefn_GetSubType, METH_O, "\n"
		"FieldDefn_GetSubType(FieldDefn self) -> OGRFieldSubType\n"
		"\n"
		"\n"
		"Fetch subtype of this field.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::GetSubType`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int\n"
		"    field subtype code, default = :py:const:`OFSTNone`\n"
		"\n"
		""},
	 { "FieldDefn_SetSubType", _wrap_FieldDefn_SetSubType, METH_VARARGS, "\n"
		"FieldDefn_SetSubType(FieldDefn self, OGRFieldSubType type)\n"
		"\n"
		"\n"
		"Set the subtype of this field.\n"
		"\n"
		"This should never be done to a :py:class:`FieldDefn` that is already part of\n"
		"an :py:class:FeatureDefn`.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::SetSubType`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"type :\n"
		"    the new field subtype.\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> f = ogr.FieldDefn()\n"
		">>> f.SetType(ogr.OFTReal)\n"
		">>> f.SetSubType(ogr.OFSTJSON)\n"
		"Warning 1: Type and subtype of field definition are not compatible. Resetting to OFSTNone\n"
		">>> f.SetSubType(ogr.OFSTFloat32)\n"
		"\n"
		""},
	 { "FieldDefn_GetJustify", _wrap_FieldDefn_GetJustify, METH_O, "\n"
		"FieldDefn_GetJustify(FieldDefn self) -> OGRJustification\n"
		"\n"
		"\n"
		"Get the justification for this field.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::GetJustify`.\n"
		"\n"
		"Note: no driver is know to use the concept of field justification.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"OGRJustification:\n"
		"    the justification.\n"
		"\n"
		""},
	 { "FieldDefn_SetJustify", _wrap_FieldDefn_SetJustify, METH_VARARGS, "\n"
		"FieldDefn_SetJustify(FieldDefn self, OGRJustification justify)\n"
		"\n"
		"\n"
		"Set the justification for this field.\n"
		"\n"
		"Note: no driver is know to use the concept of field justification.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::SetJustify`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"justify : int\n"
		"    the new justification\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> f = ogr.FieldDefn('desc', ogr.OFTString)\n"
		">>> f.SetJustify(ogr.OJRight)\n"
		"\n"
		""},
	 { "FieldDefn_GetWidth", _wrap_FieldDefn_GetWidth, METH_O, "\n"
		"FieldDefn_GetWidth(FieldDefn self) -> int\n"
		"\n"
		"\n"
		"Get the formatting width for this field.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::GetWidth`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    the width, zero means no specified width.\n"
		"\n"
		""},
	 { "FieldDefn_SetWidth", _wrap_FieldDefn_SetWidth, METH_VARARGS, "\n"
		"FieldDefn_SetWidth(FieldDefn self, int width)\n"
		"\n"
		"\n"
		"Set the formatting width for this field in characters.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::SetWidth`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"width : int\n"
		"    the new width\n"
		"\n"
		""},
	 { "FieldDefn_GetPrecision", _wrap_FieldDefn_GetPrecision, METH_O, "\n"
		"FieldDefn_GetPrecision(FieldDefn self) -> int\n"
		"\n"
		"\n"
		"Get the formatting precision for this field.\n"
		"\n"
		"This should normally be zero for fields of types other than :py:const:`OFTReal`.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::GetPrecision`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    the precision.\n"
		"\n"
		""},
	 { "FieldDefn_SetPrecision", _wrap_FieldDefn_SetPrecision, METH_VARARGS, "\n"
		"FieldDefn_SetPrecision(FieldDefn self, int precision)\n"
		"\n"
		"\n"
		"Set the formatting precision for this field in characters.\n"
		"\n"
		"This should normally be zero for fields of types other than :py:const:`OFTReal`.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::SetPrecision`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"precision : int\n"
		"    the new precision.\n"
		"\n"
		""},
	 { "FieldDefn_GetTZFlag", _wrap_FieldDefn_GetTZFlag, METH_O, "FieldDefn_GetTZFlag(FieldDefn self) -> int"},
	 { "FieldDefn_SetTZFlag", _wrap_FieldDefn_SetTZFlag, METH_VARARGS, "FieldDefn_SetTZFlag(FieldDefn self, int tzflag)"},
	 { "FieldDefn_GetTypeName", _wrap_FieldDefn_GetTypeName, METH_O, "FieldDefn_GetTypeName(FieldDefn self) -> char const *"},
	 { "FieldDefn_GetFieldTypeName", _wrap_FieldDefn_GetFieldTypeName, METH_VARARGS, "FieldDefn_GetFieldTypeName(FieldDefn self, OGRFieldType type) -> char const *"},
	 { "FieldDefn_IsIgnored", _wrap_FieldDefn_IsIgnored, METH_O, "\n"
		"FieldDefn_IsIgnored(FieldDefn self) -> int\n"
		"\n"
		"\n"
		"Return whether this field should be omitted when fetching features.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::IsIgnored`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    ignore state\n"
		"\n"
		""},
	 { "FieldDefn_SetIgnored", _wrap_FieldDefn_SetIgnored, METH_VARARGS, "\n"
		"FieldDefn_SetIgnored(FieldDefn self, int bIgnored)\n"
		"\n"
		"\n"
		"Set whether this field should be omitted when fetching features.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::SetIgnored`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"bignored : bool\n"
		"    ignore state\n"
		"\n"
		""},
	 { "FieldDefn_IsNullable", _wrap_FieldDefn_IsNullable, METH_O, "\n"
		"FieldDefn_IsNullable(FieldDefn self) -> int\n"
		"\n"
		"\n"
		"Return whether this field can receive null values.\n"
		"\n"
		"By default, fields are nullable.\n"
		"\n"
		"Even if this method returns FALSE (i.e not-nullable field), it doesn't\n"
		"mean that :py:meth:`Feature.IsFieldSet` will necessary return TRUE, as\n"
		"fields can be temporary unset and null/not-null validation is usually\n"
		"done when :py:meth:`Layer.CreateFeature`/:py:meth:`Layer.SetFeature` is called.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::IsNullable`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    TRUE if the field is authorized to be null.\n"
		"\n"
		""},
	 { "FieldDefn_SetNullable", _wrap_FieldDefn_SetNullable, METH_VARARGS, "\n"
		"FieldDefn_SetNullable(FieldDefn self, int bNullable)\n"
		"\n"
		"\n"
		"Set whether this field can receive null values.\n"
		"\n"
		"By default, fields are nullable, so this method is generally called\n"
		"with ``False`` to set a not-null constraint.\n"
		"\n"
		"Drivers that support writing not-null constraint will advertise the\n"
		"``GDAL_DCAP_NOTNULL_FIELDS`` driver metadata item.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::SetNullable`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"bNullable : bool\n"
		"    ``False`` if the field must have a not-null constraint.\n"
		"\n"
		""},
	 { "FieldDefn_IsUnique", _wrap_FieldDefn_IsUnique, METH_O, "\n"
		"FieldDefn_IsUnique(FieldDefn self) -> int\n"
		"\n"
		"\n"
		"Return whether this field has a unique constraint.\n"
		"\n"
		"By default, fields have no unique constraint.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::IsUnique`.\n"
		"\n"
		".. versionadded:: 3.2\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    TRUE if the field has a unique constraint.\n"
		"\n"
		""},
	 { "FieldDefn_SetUnique", _wrap_FieldDefn_SetUnique, METH_VARARGS, "\n"
		"FieldDefn_SetUnique(FieldDefn self, int bUnique)\n"
		"\n"
		"\n"
		"Set whether this field has a unique constraint.\n"
		"\n"
		"By default, fields have no unique constraint, so this method is\n"
		"generally called with TRUE to set a unique constraint.\n"
		"\n"
		"Drivers that support writing unique constraint will advertise the\n"
		"``GDAL_DCAP_UNIQUE_FIELDS`` driver metadata item.\n"
		"\n"
		"Note that once a :py:class:`FieldDefn` has been added to a layer definition with\n"
		":py:meth:`Layer.AddFieldDefn`, its setter methods should not be called on the\n"
		"object returned with ``GetLayerDefn().GetFieldDefn()``. Instead,\n"
		":py:meth:`Layer::AlterFieldDefn` should be called on a new instance of\n"
		":py:class:`FieldDefn`, for drivers that support :py:meth:`Layer.AlterFieldDefn`.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::SetUnique`.\n"
		"\n"
		".. versionadded:: 3.2\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"bUnique : bool\n"
		"    ``True`` if the field must have a unique constraint\n"
		"\n"
		""},
	 { "FieldDefn_GetDefault", _wrap_FieldDefn_GetDefault, METH_O, "\n"
		"FieldDefn_GetDefault(FieldDefn self) -> char const *\n"
		"\n"
		"\n"
		"Get default field value.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::GetDefault`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str:\n"
		"    default field value or ``None``.\n"
		"\n"
		""},
	 { "FieldDefn_SetDefault", _wrap_FieldDefn_SetDefault, METH_VARARGS, "\n"
		"FieldDefn_SetDefault(FieldDefn self, char const * pszValue)\n"
		"\n"
		"\n"
		"Set default field value.\n"
		"\n"
		"The default field value is taken into account by drivers (generally\n"
		"those with a SQL interface) that support it at field creation time.\n"
		"OGR will generally not automatically set the default field value to\n"
		"null fields by itself when calling OGRFeature::CreateFeature() /\n"
		"OGRFeature::SetFeature(), but will let the low-level layers to do the\n"
		"job. So retrieving the feature from the layer is recommended.\n"
		"\n"
		"The accepted values are NULL, a numeric value, a literal value\n"
		"enclosed between single quote characters (and inner single quote\n"
		"characters escaped by repetition of the single quote character),\n"
		"CURRENT_TIMESTAMP, CURRENT_TIME, CURRENT_DATE or a driver specific\n"
		"expression (that might be ignored by other drivers). For a datetime\n"
		"literal value, format should be 'YYYY/MM/DD HH:MM:SS[.sss]'\n"
		"(considered as UTC time).\n"
		"\n"
		"Drivers that support writing DEFAULT clauses will advertise the\n"
		"GDAL_DCAP_DEFAULT_FIELDS driver metadata item.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::SetDefault`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"pszValue : str\n"
		"    new default field value or NULL pointer.\n"
		"\n"
		""},
	 { "FieldDefn_IsDefaultDriverSpecific", _wrap_FieldDefn_IsDefaultDriverSpecific, METH_O, "\n"
		"FieldDefn_IsDefaultDriverSpecific(FieldDefn self) -> int\n"
		"\n"
		"\n"
		"Returns whether the default value is driver specific.\n"
		"\n"
		"Driver specific default values are those that are not NULL, a numeric\n"
		"value, a literal value enclosed between single quote characters,\n"
		"CURRENT_TIMESTAMP, CURRENT_TIME, CURRENT_DATE or datetime literal\n"
		"value.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::IsDefaultDriverSpecific`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    TRUE if the default value is driver specific.\n"
		"\n"
		""},
	 { "FieldDefn_GetDomainName", _wrap_FieldDefn_GetDomainName, METH_O, "\n"
		"FieldDefn_GetDomainName(FieldDefn self) -> char const *\n"
		"\n"
		"\n"
		"Return the name of the field domain for this field.\n"
		"\n"
		"By default an empty string is returned.\n"
		"\n"
		"Field domains ( :py:class:`FieldDomain` class) are attached at the :py:class:`Dataset` level and should be retrieved with :py:meth:`Dataset.GetFieldDomain`.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::GetDomainName`.\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str:\n"
		"    the field domain name, or an empty string if there is none.\n"
		"\n"
		""},
	 { "FieldDefn_SetDomainName", _wrap_FieldDefn_SetDomainName, METH_VARARGS, "\n"
		"FieldDefn_SetDomainName(FieldDefn self, char const * name)\n"
		"\n"
		"\n"
		"Set the name of the field domain for this field.\n"
		"\n"
		"Field domains ( :py:class:`FieldDomain`) are attached at the :py:class:`Dataset` level.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::SetDomainName`.\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"name : str\n"
		"    Field domain name.\n"
		"\n"
		""},
	 { "FieldDefn_GetComment", _wrap_FieldDefn_GetComment, METH_O, "FieldDefn_GetComment(FieldDefn self) -> char const *"},
	 { "FieldDefn_SetComment", _wrap_FieldDefn_SetComment, METH_VARARGS, "FieldDefn_SetComment(FieldDefn self, char const * comment)"},
	 { "FieldDefn_swigregister", FieldDefn_swigregister, METH_O, NULL},
	 { "FieldDefn_swiginit", FieldDefn_swiginit, METH_VARARGS, NULL},
	 { "delete_GeomFieldDefn", _wrap_delete_GeomFieldDefn, METH_O, "delete_GeomFieldDefn(GeomFieldDefn self)"},
	 { "new_GeomFieldDefn", (PyCFunction)(void(*)(void))_wrap_new_GeomFieldDefn, METH_VARARGS|METH_KEYWORDS, "new_GeomFieldDefn(char const * name_null_ok=\"\", OGRwkbGeometryType field_type=wkbUnknown) -> GeomFieldDefn"},
	 { "GeomFieldDefn_GetName", _wrap_GeomFieldDefn_GetName, METH_O, "GeomFieldDefn_GetName(GeomFieldDefn self) -> char const *"},
	 { "GeomFieldDefn_GetNameRef", _wrap_GeomFieldDefn_GetNameRef, METH_O, "GeomFieldDefn_GetNameRef(GeomFieldDefn self) -> char const *"},
	 { "GeomFieldDefn_SetName", _wrap_GeomFieldDefn_SetName, METH_VARARGS, "GeomFieldDefn_SetName(GeomFieldDefn self, char const * name)"},
	 { "GeomFieldDefn_GetType", _wrap_GeomFieldDefn_GetType, METH_O, "GeomFieldDefn_GetType(GeomFieldDefn self) -> OGRwkbGeometryType"},
	 { "GeomFieldDefn_SetType", _wrap_GeomFieldDefn_SetType, METH_VARARGS, "GeomFieldDefn_SetType(GeomFieldDefn self, OGRwkbGeometryType type)"},
	 { "GeomFieldDefn_GetSpatialRef", _wrap_GeomFieldDefn_GetSpatialRef, METH_O, "GeomFieldDefn_GetSpatialRef(GeomFieldDefn self) -> SpatialReference"},
	 { "GeomFieldDefn_SetSpatialRef", _wrap_GeomFieldDefn_SetSpatialRef, METH_VARARGS, "GeomFieldDefn_SetSpatialRef(GeomFieldDefn self, SpatialReference srs)"},
	 { "GeomFieldDefn_IsIgnored", _wrap_GeomFieldDefn_IsIgnored, METH_O, "GeomFieldDefn_IsIgnored(GeomFieldDefn self) -> int"},
	 { "GeomFieldDefn_SetIgnored", _wrap_GeomFieldDefn_SetIgnored, METH_VARARGS, "GeomFieldDefn_SetIgnored(GeomFieldDefn self, int bIgnored)"},
	 { "GeomFieldDefn_IsNullable", _wrap_GeomFieldDefn_IsNullable, METH_O, "GeomFieldDefn_IsNullable(GeomFieldDefn self) -> int"},
	 { "GeomFieldDefn_SetNullable", _wrap_GeomFieldDefn_SetNullable, METH_VARARGS, "GeomFieldDefn_SetNullable(GeomFieldDefn self, int bNullable)"},
	 { "GeomFieldDefn_GetCoordinatePrecision", _wrap_GeomFieldDefn_GetCoordinatePrecision, METH_O, "GeomFieldDefn_GetCoordinatePrecision(GeomFieldDefn self) -> GeomCoordinatePrecision"},
	 { "GeomFieldDefn_SetCoordinatePrecision", _wrap_GeomFieldDefn_SetCoordinatePrecision, METH_VARARGS, "GeomFieldDefn_SetCoordinatePrecision(GeomFieldDefn self, GeomCoordinatePrecision coordPrec)"},
	 { "GeomFieldDefn_swigregister", GeomFieldDefn_swigregister, METH_O, NULL},
	 { "GeomFieldDefn_swiginit", GeomFieldDefn_swiginit, METH_VARARGS, NULL},
	 { "CreateGeometryFromWkb", (PyCFunction)(void(*)(void))_wrap_CreateGeometryFromWkb, METH_VARARGS|METH_KEYWORDS, "CreateGeometryFromWkb(size_t len, SpatialReference reference=None) -> Geometry"},
	 { "CreateGeometryFromWkt", (PyCFunction)(void(*)(void))_wrap_CreateGeometryFromWkt, METH_VARARGS|METH_KEYWORDS, "CreateGeometryFromWkt(char ** val, SpatialReference reference=None) -> Geometry"},
	 { "CreateGeometryFromGML", _wrap_CreateGeometryFromGML, METH_O, "CreateGeometryFromGML(char const * input_string) -> Geometry"},
	 { "CreateGeometryFromJson", _wrap_CreateGeometryFromJson, METH_O, "CreateGeometryFromJson(char const * input_string) -> Geometry"},
	 { "CreateGeometryFromEsriJson", _wrap_CreateGeometryFromEsriJson, METH_O, "CreateGeometryFromEsriJson(char const * input_string) -> Geometry"},
	 { "BuildPolygonFromEdges", (PyCFunction)(void(*)(void))_wrap_BuildPolygonFromEdges, METH_VARARGS|METH_KEYWORDS, "BuildPolygonFromEdges(Geometry hLineCollection, int bBestEffort=0, int bAutoClose=0, double dfTolerance=0) -> Geometry"},
	 { "ApproximateArcAngles", (PyCFunction)(void(*)(void))_wrap_ApproximateArcAngles, METH_VARARGS|METH_KEYWORDS, "ApproximateArcAngles(double dfCenterX, double dfCenterY, double dfZ, double dfPrimaryRadius, double dfSecondaryAxis, double dfRotation, double dfStartAngle, double dfEndAngle, double dfMaxAngleStepSizeDegrees) -> Geometry"},
	 { "ForceToPolygon", _wrap_ForceToPolygon, METH_O, "ForceToPolygon(Geometry geom_in) -> Geometry"},
	 { "ForceToLineString", _wrap_ForceToLineString, METH_O, "ForceToLineString(Geometry geom_in) -> Geometry"},
	 { "ForceToMultiPolygon", _wrap_ForceToMultiPolygon, METH_O, "ForceToMultiPolygon(Geometry geom_in) -> Geometry"},
	 { "ForceToMultiPoint", _wrap_ForceToMultiPoint, METH_O, "ForceToMultiPoint(Geometry geom_in) -> Geometry"},
	 { "ForceToMultiLineString", _wrap_ForceToMultiLineString, METH_O, "ForceToMultiLineString(Geometry geom_in) -> Geometry"},
	 { "ForceTo", _wrap_ForceTo, METH_VARARGS, "ForceTo(Geometry geom_in, OGRwkbGeometryType eTargetType, char ** options=None) -> Geometry"},
	 { "delete_Geometry", _wrap_delete_Geometry, METH_O, "delete_Geometry(Geometry self)"},
	 { "new_Geometry", (PyCFunction)(void(*)(void))_wrap_new_Geometry, METH_VARARGS|METH_KEYWORDS, "new_Geometry(OGRwkbGeometryType type=wkbUnknown, char * wkt=None, int wkb=0, char * gml=None) -> Geometry"},
	 { "Geometry_ExportToWkt", _wrap_Geometry_ExportToWkt, METH_O, "\n"
		"Geometry_ExportToWkt(Geometry self) -> OGRErr\n"
		"\n"
		"Convert a geometry into well known text format.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_ExportToWkt`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str\n"
		"\n"
		""},
	 { "Geometry_ExportToIsoWkt", _wrap_Geometry_ExportToIsoWkt, METH_O, "\n"
		"Geometry_ExportToIsoWkt(Geometry self) -> OGRErr\n"
		"\n"
		"Convert a geometry into SFSQL 1.2 / ISO SQL/MM Part 3 well known text\n"
		"format.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_ExportToIsoWkt`\n"
		"\n"
		".. versionadded:: 2.0\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str\n"
		"\n"
		""},
	 { "Geometry_ExportToWkb", (PyCFunction)(void(*)(void))_wrap_Geometry_ExportToWkb, METH_VARARGS|METH_KEYWORDS, "\n"
		"Geometry_ExportToWkb(Geometry self, OGRwkbByteOrder byte_order=wkbNDR) -> OGRErr\n"
		"\n"
		"Convert a geometry well known binary format.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_ExportToWkb`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"byte_order: osgeo.ogr.wkbXDR | osgeo.ogr.wkbNDR, default=osgeo.ogr.wkbNDR\n"
		"    One of wkbXDR or wkbNDR indicating MSB or LSB byte order respectively.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"bytes\n"
		"\n"
		""},
	 { "Geometry_ExportToIsoWkb", (PyCFunction)(void(*)(void))_wrap_Geometry_ExportToIsoWkb, METH_VARARGS|METH_KEYWORDS, "\n"
		"Geometry_ExportToIsoWkb(Geometry self, OGRwkbByteOrder byte_order=wkbNDR) -> OGRErr\n"
		"\n"
		"Convert a geometry into SFSQL 1.2 / ISO SQL/MM Part 3 well known\n"
		"binary format.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_ExportToIsoWkb`\n"
		"\n"
		".. versionadded:: 2.0\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"byte_order: osgeo.ogr.wkbXDR | osgeo.ogr.wkbNDR, default=osgeo.ogr.wkbNDR\n"
		"    One of wkbXDR or wkbNDR indicating MSB or LSB byte order respectively.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"bytes\n"
		"\n"
		""},
	 { "Geometry_ExportToGML", (PyCFunction)(void(*)(void))_wrap_Geometry_ExportToGML, METH_VARARGS|METH_KEYWORDS, "Geometry_ExportToGML(Geometry self, char ** options=None) -> retStringAndCPLFree *"},
	 { "Geometry_ExportToKML", _wrap_Geometry_ExportToKML, METH_VARARGS, "Geometry_ExportToKML(Geometry self, char const * altitude_mode=None) -> retStringAndCPLFree *"},
	 { "Geometry_ExportToJson", (PyCFunction)(void(*)(void))_wrap_Geometry_ExportToJson, METH_VARARGS|METH_KEYWORDS, "Geometry_ExportToJson(Geometry self, char ** options=None) -> retStringAndCPLFree *"},
	 { "Geometry_AddPoint", (PyCFunction)(void(*)(void))_wrap_Geometry_AddPoint, METH_VARARGS|METH_KEYWORDS, "Geometry_AddPoint(Geometry self, double x, double y, double z=0)"},
	 { "Geometry_AddPointM", (PyCFunction)(void(*)(void))_wrap_Geometry_AddPointM, METH_VARARGS|METH_KEYWORDS, "Geometry_AddPointM(Geometry self, double x, double y, double m)"},
	 { "Geometry_AddPointZM", (PyCFunction)(void(*)(void))_wrap_Geometry_AddPointZM, METH_VARARGS|METH_KEYWORDS, "Geometry_AddPointZM(Geometry self, double x, double y, double z, double m)"},
	 { "Geometry_AddPoint_2D", _wrap_Geometry_AddPoint_2D, METH_VARARGS, "Geometry_AddPoint_2D(Geometry self, double x, double y)"},
	 { "Geometry_AddGeometryDirectly", _wrap_Geometry_AddGeometryDirectly, METH_VARARGS, "Geometry_AddGeometryDirectly(Geometry self, Geometry other_disown) -> OGRErr"},
	 { "Geometry_AddGeometry", _wrap_Geometry_AddGeometry, METH_VARARGS, "Geometry_AddGeometry(Geometry self, Geometry other) -> OGRErr"},
	 { "Geometry_RemoveGeometry", _wrap_Geometry_RemoveGeometry, METH_VARARGS, "Geometry_RemoveGeometry(Geometry self, int iSubGeom) -> OGRErr"},
	 { "Geometry_Clone", _wrap_Geometry_Clone, METH_O, "\n"
		"Geometry_Clone(Geometry self) -> Geometry\n"
		"\n"
		"Make a copy of this object.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Clone`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    The copy of the geometry with the same spatial reference system\n"
		"    as the original.\n"
		"\n"
		""},
	 { "Geometry_GetGeometryType", _wrap_Geometry_GetGeometryType, METH_O, "\n"
		"Geometry_GetGeometryType(Geometry self) -> OGRwkbGeometryType\n"
		"\n"
		"Fetch geometry type.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_GetGeometryType`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    The geometry type code. The types can be found with\n"
		"    'osgeo.ogr.wkb' prefix. For example :py:const:`osgeo.ogr.wkbPolygon`.\n"
		"\n"
		""},
	 { "Geometry_GetGeometryName", _wrap_Geometry_GetGeometryName, METH_O, "\n"
		"Geometry_GetGeometryName(Geometry self) -> char const *\n"
		"\n"
		"Fetch WKT name for geometry type.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_GetGeometryName`\n"
		"\n"
		"geometry to get name from.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str\n"
		"\n"
		""},
	 { "Geometry_Length", _wrap_Geometry_Length, METH_O, "\n"
		"Geometry_Length(Geometry self) -> double\n"
		"\n"
		"Compute geometry length.\n"
		"\n"
		"The returned length is a 2D Cartesian (planar) area in units of the\n"
		"spatial reference system in use, so potentially 'degrees' for a\n"
		"geometry expressed in a geographic SRS.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Length`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"float:\n"
		"    the length of the geometry in units of the spatial reference\n"
		"    system in use, or 0.0 for unsupported geometry types.\n"
		"\n"
		"\n"
		""},
	 { "Geometry_Area", _wrap_Geometry_Area, METH_O, "\n"
		"Geometry_Area(Geometry self) -> double\n"
		"\n"
		"Compute geometry area.\n"
		"\n"
		"The returned area is a 2D Cartesian (planar) area in square units of the\n"
		"spatial reference system in use, so potentially 'square degrees' for a\n"
		"geometry expressed in a geographic SRS.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Area`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"float:\n"
		"    the area of the geometry in square units of the spatial reference\n"
		"    system in use, or 0.0 for unsupported geometry types.\n"
		"\n"
		"\n"
		""},
	 { "Geometry_GeodesicLength", _wrap_Geometry_GeodesicLength, METH_O, "\n"
		"Geometry_GeodesicLength(Geometry self) -> double\n"
		"\n"
		"Compute geometry length, considered as a curve on the underlying\n"
		"ellipsoid of the SRS attached to the geometry.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_GeodesicLength`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"float:\n"
		"    the area in meters, or a negative value for unsupported geometry types.\n"
		"\n"
		"\n"
		""},
	 { "Geometry_GeodesicArea", _wrap_Geometry_GeodesicArea, METH_O, "\n"
		"Geometry_GeodesicArea(Geometry self) -> double\n"
		"\n"
		"Compute geometry area, considered as a surface on the underlying\n"
		"ellipsoid of the SRS attached to the geometry.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_GeodesicArea`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"float:\n"
		"    the area in square meters, or a negative value for unsupported geometry types.\n"
		"\n"
		"\n"
		""},
	 { "Geometry_IsClockwise", _wrap_Geometry_IsClockwise, METH_O, "Geometry_IsClockwise(Geometry self) -> bool"},
	 { "Geometry_GetArea", _wrap_Geometry_GetArea, METH_O, "Geometry_GetArea(Geometry self) -> double"},
	 { "Geometry_GetPointCount", _wrap_Geometry_GetPointCount, METH_O, "Geometry_GetPointCount(Geometry self) -> int"},
	 { "Geometry_GetPoints", (PyCFunction)(void(*)(void))_wrap_Geometry_GetPoints, METH_VARARGS|METH_KEYWORDS, "Geometry_GetPoints(Geometry self, int nCoordDimension=0)"},
	 { "Geometry_GetX", (PyCFunction)(void(*)(void))_wrap_Geometry_GetX, METH_VARARGS|METH_KEYWORDS, "Geometry_GetX(Geometry self, int point=0) -> double"},
	 { "Geometry_GetY", (PyCFunction)(void(*)(void))_wrap_Geometry_GetY, METH_VARARGS|METH_KEYWORDS, "Geometry_GetY(Geometry self, int point=0) -> double"},
	 { "Geometry_GetZ", (PyCFunction)(void(*)(void))_wrap_Geometry_GetZ, METH_VARARGS|METH_KEYWORDS, "Geometry_GetZ(Geometry self, int point=0) -> double"},
	 { "Geometry_GetM", (PyCFunction)(void(*)(void))_wrap_Geometry_GetM, METH_VARARGS|METH_KEYWORDS, "Geometry_GetM(Geometry self, int point=0) -> double"},
	 { "Geometry_GetPoint", _wrap_Geometry_GetPoint, METH_VARARGS, "Geometry_GetPoint(Geometry self, int iPoint=0)"},
	 { "Geometry_GetPointZM", _wrap_Geometry_GetPointZM, METH_VARARGS, "Geometry_GetPointZM(Geometry self, int iPoint=0)"},
	 { "Geometry_GetPoint_2D", _wrap_Geometry_GetPoint_2D, METH_VARARGS, "Geometry_GetPoint_2D(Geometry self, int iPoint=0)"},
	 { "Geometry_GetGeometryCount", _wrap_Geometry_GetGeometryCount, METH_O, "Geometry_GetGeometryCount(Geometry self) -> int"},
	 { "Geometry_SetPoint", (PyCFunction)(void(*)(void))_wrap_Geometry_SetPoint, METH_VARARGS|METH_KEYWORDS, "Geometry_SetPoint(Geometry self, int point, double x, double y, double z=0)"},
	 { "Geometry_SetPointM", (PyCFunction)(void(*)(void))_wrap_Geometry_SetPointM, METH_VARARGS|METH_KEYWORDS, "Geometry_SetPointM(Geometry self, int point, double x, double y, double m)"},
	 { "Geometry_SetPointZM", (PyCFunction)(void(*)(void))_wrap_Geometry_SetPointZM, METH_VARARGS|METH_KEYWORDS, "Geometry_SetPointZM(Geometry self, int point, double x, double y, double z, double m)"},
	 { "Geometry_SetPoint_2D", (PyCFunction)(void(*)(void))_wrap_Geometry_SetPoint_2D, METH_VARARGS|METH_KEYWORDS, "Geometry_SetPoint_2D(Geometry self, int point, double x, double y)"},
	 { "Geometry_SwapXY", _wrap_Geometry_SwapXY, METH_O, "\n"
		"Geometry_SwapXY(Geometry self)\n"
		"\n"
		"Swap x and y coordinates.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_SwapXY`\n"
		"\n"
		".. versionadded:: 2.3.0\n"
		"\n"
		"\n"
		""},
	 { "Geometry_GetGeometryRef", _wrap_Geometry_GetGeometryRef, METH_VARARGS, "Geometry_GetGeometryRef(Geometry self, int geom) -> Geometry"},
	 { "Geometry_Simplify", _wrap_Geometry_Simplify, METH_VARARGS, "\n"
		"Geometry_Simplify(Geometry self, double tolerance) -> Geometry\n"
		"\n"
		"Compute a simplified geometry.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Simplify`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"tolerance: float\n"
		"    The distance tolerance for the simplification.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    The simplified geometry or None if an error occurs.\n"
		"\n"
		""},
	 { "Geometry_SimplifyPreserveTopology", _wrap_Geometry_SimplifyPreserveTopology, METH_VARARGS, "\n"
		"Geometry_SimplifyPreserveTopology(Geometry self, double tolerance) -> Geometry\n"
		"\n"
		"Simplify the geometry while preserving topology.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_SimplifyPreserveTopology`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"tolerance: float\n"
		"    The distance tolerance for the simplification.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    The simplified geometry or None if an error occurs.\n"
		"\n"
		""},
	 { "Geometry_DelaunayTriangulation", (PyCFunction)(void(*)(void))_wrap_Geometry_DelaunayTriangulation, METH_VARARGS|METH_KEYWORDS, "\n"
		"Geometry_DelaunayTriangulation(Geometry self, double dfTolerance=0.0, int bOnlyEdges=FALSE) -> Geometry\n"
		"\n"
		"Return a Delaunay triangulation of the vertices of the geometry.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_DelaunayTriangulation`\n"
		"\n"
		".. versionadded:: 2.1\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"dfTolerance: float\n"
		"    optional snapping tolerance to use for improved robustness\n"
		"bOnlyEdges: bool\n"
		"    If True, will return a MULTILINESTRING, otherwise it will\n"
		"    return a GEOMETRYCOLLECTION containing triangular POLYGONs.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    The geometry resulting from the Delaunay triangulation or None if an\n"
		"    error occurs.\n"
		"\n"
		""},
	 { "Geometry_Polygonize", _wrap_Geometry_Polygonize, METH_O, "\n"
		"Geometry_Polygonize(Geometry self) -> Geometry\n"
		"\n"
		"Polygonizes a set of sparse edges.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Polygonize`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    A new geometry or None on failure.\n"
		"\n"
		""},
	 { "Geometry_Boundary", _wrap_Geometry_Boundary, METH_O, "\n"
		"Geometry_Boundary(Geometry self) -> Geometry\n"
		"\n"
		"Compute boundary.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Boundary`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    A new geometry or None on failure.\n"
		"\n"
		""},
	 { "Geometry_GetBoundary", _wrap_Geometry_GetBoundary, METH_O, "\n"
		"Geometry_GetBoundary(Geometry self) -> Geometry\n"
		"\n"
		"Compute boundary (deprecated)\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_GetBoundary`\n"
		"\n"
		"..warning:: Deprecated\n"
		"\n"
		"See: :cpp:func:`OGR_G_Boundary`\n"
		"\n"
		""},
	 { "Geometry_ConvexHull", _wrap_Geometry_ConvexHull, METH_O, "\n"
		"Geometry_ConvexHull(Geometry self) -> Geometry\n"
		"\n"
		"Compute convex hull.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_ConvexHull`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    a handle to A newly allocated geometry now owned by the caller, or\n"
		"    None on failure.\n"
		"\n"
		""},
	 { "Geometry_ConcaveHull", _wrap_Geometry_ConcaveHull, METH_VARARGS, "Geometry_ConcaveHull(Geometry self, double ratio, bool allowHoles) -> Geometry"},
	 { "Geometry_MakeValid", _wrap_Geometry_MakeValid, METH_VARARGS, "\n"
		"Geometry_MakeValid(Geometry self, char ** options=None) -> Geometry\n"
		"\n"
		"Attempts to make an invalid geometry valid without losing vertices.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_MakeValidEx`\n"
		"\n"
		".. versionadded:: 3.0\n"
		".. versionadded:: 3.4 options\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"options: list[str], optional\n"
		"    papszOptions to be passed in. For example: [\"METHOD=STRUCTURE\"].\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    A newly allocated geometry now owned by the caller, or None on\n"
		"    failure.\n"
		"\n"
		""},
	 { "Geometry_SetPrecision", _wrap_Geometry_SetPrecision, METH_VARARGS, "Geometry_SetPrecision(Geometry self, double gridSize, int flags=0) -> Geometry"},
	 { "Geometry_Normalize", _wrap_Geometry_Normalize, METH_O, "\n"
		"Geometry_Normalize(Geometry self) -> Geometry\n"
		"\n"
		"Attempts to bring geometry into normalized/canonical form.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Normalize`\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    A newly allocated geometry now owned by the caller, or None on\n"
		"    failure.\n"
		"\n"
		""},
	 { "Geometry_RemoveLowerDimensionSubGeoms", _wrap_Geometry_RemoveLowerDimensionSubGeoms, METH_O, "Geometry_RemoveLowerDimensionSubGeoms(Geometry self) -> Geometry"},
	 { "Geometry_Buffer", _wrap_Geometry_Buffer, METH_VARARGS, "\n"
		"Geometry_Buffer(Geometry self, double distance, int quadsecs=30) -> Geometry\n"
		"Geometry_Buffer(Geometry self, double distance, char ** options) -> Geometry\n"
		"\n"
		"Compute buffer of geometry.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Buffer`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"distance: float\n"
		"    The buffer distance to be applied. Should be expressed into\n"
		"    the same unit as the coordinates of the geometry.\n"
		"quadsecs: int, default=30\n"
		"    The number of segments used to approximate a 90 degree\n"
		"    (quadrant) of curvature.\n"
		"options: list/dict\n"
		"    An optional list of options to control the buffer output.\n"
		"    See :cpp:func:`OGR_G_BufferEx`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    The newly created geometry or None if an error occurs.\n"
		"\n"
		""},
	 { "Geometry_Intersection", _wrap_Geometry_Intersection, METH_VARARGS, "\n"
		"Geometry_Intersection(Geometry self, Geometry other) -> Geometry\n"
		"\n"
		"Compute intersection.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Intersection`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"other: Geometry\n"
		"    The other geometry.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    A new geometry representing the intersection or None if there is no\n"
		"    intersection or an error occurs.\n"
		"\n"
		""},
	 { "Geometry_Union", _wrap_Geometry_Union, METH_VARARGS, "\n"
		"Geometry_Union(Geometry self, Geometry other) -> Geometry\n"
		"\n"
		"Compute union.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Union`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"other: Geometry\n"
		"    The other geometry.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    A new geometry representing the union or None if an error occurs.\n"
		"\n"
		""},
	 { "Geometry_UnionCascaded", _wrap_Geometry_UnionCascaded, METH_O, "\n"
		"Geometry_UnionCascaded(Geometry self) -> Geometry\n"
		"\n"
		"Compute union using cascading.\n"
		"\n"
		"For more deails: :cpp:func:`OGR_G_UnionCascaded`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    A new geometry representing the union or None if an error occurs.\n"
		"\n"
		""},
	 { "Geometry_UnaryUnion", _wrap_Geometry_UnaryUnion, METH_O, "Geometry_UnaryUnion(Geometry self) -> Geometry"},
	 { "Geometry_Difference", _wrap_Geometry_Difference, METH_VARARGS, "\n"
		"Geometry_Difference(Geometry self, Geometry other) -> Geometry\n"
		"\n"
		"Compute difference.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Difference`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"other: Geometry\n"
		"    The other geometry.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    A new geometry representing the difference or None if the difference\n"
		"    is empty or an error occurs.\n"
		"\n"
		""},
	 { "Geometry_SymDifference", _wrap_Geometry_SymDifference, METH_VARARGS, "\n"
		"Geometry_SymDifference(Geometry self, Geometry other) -> Geometry\n"
		"\n"
		"Compute symmetric difference.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_SymDifference`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"other:\n"
		"    the other geometry.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    A new geometry representing the symmetric difference or None if the\n"
		"    difference is empty or an error occurs.\n"
		"\n"
		""},
	 { "Geometry_SymmetricDifference", _wrap_Geometry_SymmetricDifference, METH_VARARGS, "\n"
		"Geometry_SymmetricDifference(Geometry self, Geometry other) -> Geometry\n"
		"\n"
		"Compute symmetric difference (deprecated)\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_SymmetricDifference`\n"
		"\n"
		".. warning:: Deprecated\n"
		"\n"
		"\n"
		""},
	 { "Geometry_Distance", _wrap_Geometry_Distance, METH_VARARGS, "\n"
		"Geometry_Distance(Geometry self, Geometry other) -> double\n"
		"\n"
		"Compute distance between two geometries.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Distance`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"other: Geometry\n"
		"    The other geometry to compare against.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"float:\n"
		"    The distance between the geometries or -1 if an error occurs.\n"
		"\n"
		""},
	 { "Geometry_Distance3D", _wrap_Geometry_Distance3D, METH_VARARGS, "\n"
		"Geometry_Distance3D(Geometry self, Geometry other) -> double\n"
		"\n"
		"Returns the 3D distance between two geometries.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Distance3D`\n"
		"\n"
		".. versionadded:: 2.2\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"other: Geometry\n"
		"    The other geometry to compare against.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"float:\n"
		"    The distance between the geometries or -1 if an error occurs.\n"
		"\n"
		""},
	 { "Geometry_Empty", _wrap_Geometry_Empty, METH_O, "\n"
		"Geometry_Empty(Geometry self)\n"
		"\n"
		"Clear geometry information.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Empty`\n"
		"\n"
		""},
	 { "Geometry_IsEmpty", _wrap_Geometry_IsEmpty, METH_O, "\n"
		"Geometry_IsEmpty(Geometry self) -> bool\n"
		"\n"
		"Test if the geometry is empty.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_IsEmpty`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    True if the geometry has no points, otherwise False.\n"
		"\n"
		""},
	 { "Geometry_IsValid", _wrap_Geometry_IsValid, METH_O, "\n"
		"Geometry_IsValid(Geometry self) -> bool\n"
		"\n"
		"Test if the geometry is valid.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_IsValid`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    True if the geometry has no points, otherwise False.\n"
		"\n"
		""},
	 { "Geometry_IsSimple", _wrap_Geometry_IsSimple, METH_O, "\n"
		"Geometry_IsSimple(Geometry self) -> bool\n"
		"\n"
		"Returns True if the geometry is simple.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_IsSimple`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    True if object is simple, otherwise False.\n"
		"\n"
		""},
	 { "Geometry_IsRing", _wrap_Geometry_IsRing, METH_O, "\n"
		"Geometry_IsRing(Geometry self) -> bool\n"
		"\n"
		"Test if the geometry is a ring.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_IsRing`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    True if the geometry has no points, otherwise False.\n"
		"\n"
		""},
	 { "Geometry_Intersects", _wrap_Geometry_Intersects, METH_VARARGS, "\n"
		"Geometry_Intersects(Geometry self, Geometry other) -> bool\n"
		"\n"
		"Determines whether two geometries intersect.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Intersects`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"other: Geometry\n"
		"    The other geometry to test against.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    True if the geometries intersect, otherwise False.\n"
		"\n"
		""},
	 { "Geometry_Intersect", _wrap_Geometry_Intersect, METH_VARARGS, "Geometry_Intersect(Geometry self, Geometry other) -> bool"},
	 { "Geometry_Equals", _wrap_Geometry_Equals, METH_VARARGS, "\n"
		"Geometry_Equals(Geometry self, Geometry other) -> bool\n"
		"\n"
		"Returns True if two geometries are equivalent.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Equals`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"other: Geometry\n"
		"    The other geometry to test against.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    True if equivalent or False otherwise.\n"
		"\n"
		""},
	 { "Geometry_Equal", _wrap_Geometry_Equal, METH_VARARGS, "Geometry_Equal(Geometry self, Geometry other) -> bool"},
	 { "Geometry_Disjoint", _wrap_Geometry_Disjoint, METH_VARARGS, "\n"
		"Geometry_Disjoint(Geometry self, Geometry other) -> bool\n"
		"\n"
		"Test for disjointness.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Disjoint`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"other: Geometry\n"
		"    The other geometry to compare.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    True if they are disjoint, otherwise False.\n"
		"\n"
		""},
	 { "Geometry_Touches", _wrap_Geometry_Touches, METH_VARARGS, "\n"
		"Geometry_Touches(Geometry self, Geometry other) -> bool\n"
		"\n"
		"Test for touching.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Touches`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"other:\n"
		"    the other geometry to compare.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    True if they are touching, otherwise False.\n"
		"\n"
		""},
	 { "Geometry_Crosses", _wrap_Geometry_Crosses, METH_VARARGS, "\n"
		"Geometry_Crosses(Geometry self, Geometry other) -> bool\n"
		"\n"
		"Test for crossing.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Crosses`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"other: Geometry\n"
		"    the other geometry to compare.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    True if they are crossing, otherwise False.\n"
		"\n"
		""},
	 { "Geometry_Within", _wrap_Geometry_Within, METH_VARARGS, "\n"
		"Geometry_Within(Geometry self, Geometry other) -> bool\n"
		"\n"
		"Test for containment.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Within`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"other: Geometry\n"
		"    the other geometry to compare.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    True if this is within other, otherwise False.\n"
		"\n"
		""},
	 { "Geometry_Contains", _wrap_Geometry_Contains, METH_VARARGS, "\n"
		"Geometry_Contains(Geometry self, Geometry other) -> bool\n"
		"\n"
		"Test for containment.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Contains`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"other: Geometry\n"
		"    the other geometry to compare.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    True if this contains the other geometry, otherwise False.\n"
		"\n"
		""},
	 { "Geometry_Overlaps", _wrap_Geometry_Overlaps, METH_VARARGS, "\n"
		"Geometry_Overlaps(Geometry self, Geometry other) -> bool\n"
		"\n"
		"Test for overlap.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Overlaps`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"other: Geometry\n"
		"    the other geometry to compare.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    True if they are overlapping, otherwise False.\n"
		"\n"
		""},
	 { "Geometry_TransformTo", _wrap_Geometry_TransformTo, METH_VARARGS, "\n"
		"Geometry_TransformTo(Geometry self, SpatialReference reference) -> OGRErr\n"
		"\n"
		"Transform geometry to new spatial reference system.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_TransformTo`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"reference: SpatialReference\n"
		"   The spatial reference system to apply.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    :py:const:`osgeo.ogr.OGRERR_NONE` on success, or an error code.\n"
		"\n"
		""},
	 { "Geometry_GetSpatialReference", _wrap_Geometry_GetSpatialReference, METH_O, "\n"
		"Geometry_GetSpatialReference(Geometry self) -> SpatialReference\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_GetSpatialReference`\n"
		"\n"
		"Returns spatial reference system for geometry.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"SpatialReference\n"
		"\n"
		""},
	 { "Geometry_AssignSpatialReference", _wrap_Geometry_AssignSpatialReference, METH_VARARGS, "\n"
		"Geometry_AssignSpatialReference(Geometry self, SpatialReference reference)\n"
		"\n"
		"Assign spatial reference to this object.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_AssignSpatialReference`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"reference: SpatialReference\n"
		"    The new spatial reference system to apply.\n"
		"\n"
		""},
	 { "Geometry_CloseRings", _wrap_Geometry_CloseRings, METH_O, "\n"
		"Geometry_CloseRings(Geometry self)\n"
		"\n"
		"Force rings to be closed.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_CloseRings`\n"
		"\n"
		""},
	 { "Geometry_FlattenTo2D", _wrap_Geometry_FlattenTo2D, METH_O, "\n"
		"Geometry_FlattenTo2D(Geometry self)\n"
		"\n"
		"Convert geometry to strictly 2D.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_FlattenTo2D`\n"
		"\n"
		""},
	 { "Geometry_Segmentize", _wrap_Geometry_Segmentize, METH_VARARGS, "\n"
		"Geometry_Segmentize(Geometry self, double dfMaxLength)\n"
		"\n"
		"Modify the geometry such it has no segment longer then the given\n"
		"distance.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Segmentize`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"dfMaxLength: float\n"
		"    the maximum distance between 2 points after segmentization\n"
		"\n"
		""},
	 { "Geometry_GetEnvelope", _wrap_Geometry_GetEnvelope, METH_O, "\n"
		"Geometry_GetEnvelope(Geometry self)\n"
		"\n"
		"Computes and returns the bounding envelope for this geometry in the\n"
		"passed psEnvelope structure.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_GetEnvelope`\n"
		"\n"
		".. warning:: Check the return order of the bounds.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"minx: float\n"
		"maxx: float\n"
		"miny: float\n"
		"maxy: float\n"
		"\n"
		""},
	 { "Geometry_GetEnvelope3D", _wrap_Geometry_GetEnvelope3D, METH_O, "\n"
		"Geometry_GetEnvelope3D(Geometry self)\n"
		"\n"
		"Computes and returns the bounding envelope (3D) for this geometry in\n"
		"the passed psEnvelope structure.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_GetEnvelope3D`\n"
		"\n"
		".. warning:: Check the return order of the bounds.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"minx: float\n"
		"maxx: float\n"
		"miny: float\n"
		"maxy: float\n"
		"minz: float\n"
		"maxz: float\n"
		"\n"
		""},
	 { "Geometry_Centroid", _wrap_Geometry_Centroid, METH_O, "\n"
		"Geometry_Centroid(Geometry self) -> Geometry\n"
		"\n"
		"Compute the geometry centroid.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Centroid`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry\n"
		"\n"
		""},
	 { "Geometry_PointOnSurface", _wrap_Geometry_PointOnSurface, METH_O, "\n"
		"Geometry_PointOnSurface(Geometry self) -> Geometry\n"
		"\n"
		"Returns a point guaranteed to lie on the surface.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_PointOnSurface`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    A point guaranteed to lie on the surface or None if an error occurred.\n"
		"\n"
		""},
	 { "Geometry_WkbSize", _wrap_Geometry_WkbSize, METH_O, "\n"
		"Geometry_WkbSize(Geometry self) -> size_t\n"
		"\n"
		"Returns size of related binary representation.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_WkbSize`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int\n"
		"\n"
		""},
	 { "Geometry_GetCoordinateDimension", _wrap_Geometry_GetCoordinateDimension, METH_O, "\n"
		"Geometry_GetCoordinateDimension(Geometry self) -> int\n"
		"\n"
		"Get the dimension of the coordinates in this geometry.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_GetCoordinateDimension`\n"
		"\n"
		".. warning:: Deprecated. Use :py:func:`CoordinateDimension`,\n"
		"    :py:func:`Is3D`, or :py:func:`IsMeasured`.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    This will return 2 or 3.\n"
		"\n"
		""},
	 { "Geometry_CoordinateDimension", _wrap_Geometry_CoordinateDimension, METH_O, "\n"
		"Geometry_CoordinateDimension(Geometry self) -> int\n"
		"\n"
		"Get the dimension of the coordinates in this geometry.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_CoordinateDimension`\n"
		"\n"
		".. versionadded:: 2.1\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    This will return 2 for XY, 3 for XYZ and XYM, and 4 for XYZM data.\n"
		"\n"
		""},
	 { "Geometry_Is3D", _wrap_Geometry_Is3D, METH_O, "\n"
		"Geometry_Is3D(Geometry self) -> int\n"
		"\n"
		"See whether this geometry has Z coordinates.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Is3D`\n"
		"\n"
		".. versionadded:: 2.1\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    True if the geometry has Z coordinates.\n"
		"\n"
		""},
	 { "Geometry_IsMeasured", _wrap_Geometry_IsMeasured, METH_O, "\n"
		"Geometry_IsMeasured(Geometry self) -> int\n"
		"\n"
		"See whether this geometry is measured.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_IsMeasured`\n"
		"\n"
		".. versionadded:: 2.1\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    True if the geometry has M coordinates.\n"
		"\n"
		""},
	 { "Geometry_SetCoordinateDimension", _wrap_Geometry_SetCoordinateDimension, METH_VARARGS, "\n"
		"Geometry_SetCoordinateDimension(Geometry self, int dimension)\n"
		"\n"
		"Set the coordinate dimension.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_SetCoordinateDimension`\n"
		"\n"
		".. warning:: Deprecated. Use :py:func:`Set3D` or :py:func:`SetMeasured`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"dimension: int\n"
		"    New coordinate dimension value, either 2 or 3.\n"
		"\n"
		""},
	 { "Geometry_Set3D", _wrap_Geometry_Set3D, METH_VARARGS, "\n"
		"Geometry_Set3D(Geometry self, int b3D)\n"
		"\n"
		"Add or remove the Z coordinate dimension.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Set3D`\n"
		"\n"
		".. versionadded:: 2.1\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"bIs3D: bool\n"
		"    Should the geometry have a Z dimension, either True or False.\n"
		"\n"
		""},
	 { "Geometry_SetMeasured", _wrap_Geometry_SetMeasured, METH_VARARGS, "\n"
		"Geometry_SetMeasured(Geometry self, int bMeasured)\n"
		"\n"
		"Add or remove the M coordinate dimension.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_SetMeasured`\n"
		"\n"
		".. versionadded:: 2.1\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"bIsMeasured: bool\n"
		"    Should the geometry have a M dimension, either True or False.\n"
		"\n"
		""},
	 { "Geometry_GetDimension", _wrap_Geometry_GetDimension, METH_O, "\n"
		"Geometry_GetDimension(Geometry self) -> int\n"
		"\n"
		"Get the dimension of this geometry.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_GetDimension`\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int:\n"
		"    0 for points, 1 for lines, and 2 for surfaces.\n"
		"\n"
		""},
	 { "Geometry_HasCurveGeometry", _wrap_Geometry_HasCurveGeometry, METH_VARARGS, "Geometry_HasCurveGeometry(Geometry self, int bLookForCircular=FALSE) -> int"},
	 { "Geometry_GetLinearGeometry", (PyCFunction)(void(*)(void))_wrap_Geometry_GetLinearGeometry, METH_VARARGS|METH_KEYWORDS, "Geometry_GetLinearGeometry(Geometry self, double dfMaxAngleStepSizeDegrees=0.0, char ** options=None) -> Geometry"},
	 { "Geometry_GetCurveGeometry", (PyCFunction)(void(*)(void))_wrap_Geometry_GetCurveGeometry, METH_VARARGS|METH_KEYWORDS, "Geometry_GetCurveGeometry(Geometry self, char ** options=None) -> Geometry"},
	 { "Geometry_Value", _wrap_Geometry_Value, METH_VARARGS, "Geometry_Value(Geometry self, double dfDistance) -> Geometry"},
	 { "Geometry_Transform", _wrap_Geometry_Transform, METH_VARARGS, "\n"
		"Geometry_Transform(Geometry self, CoordinateTransformation trans) -> OGRErr\n"
		"Geometry_Transform(Geometry self, GeomTransformer transformer) -> Geometry\n"
		"\n"
		"Apply arbitrary coordinate transformation to geometry.\n"
		"\n"
		"For more details: :cpp:func:`OGR_G_Transform`\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"trans: CoordinateTransform\n"
		"    The transformation to apply.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"Geometry:\n"
		"    The transformed geometry.\n"
		"\n"
		""},
	 { "Geometry_CreatePreparedGeometry", _wrap_Geometry_CreatePreparedGeometry, METH_O, "Geometry_CreatePreparedGeometry(Geometry self) -> PreparedGeometry"},
	 { "Geometry_swigregister", Geometry_swigregister, METH_O, NULL},
	 { "Geometry_swiginit", Geometry_swiginit, METH_VARARGS, NULL},
	 { "delete_PreparedGeometry", _wrap_delete_PreparedGeometry, METH_O, "delete_PreparedGeometry(PreparedGeometry self)"},
	 { "PreparedGeometry_Intersects", _wrap_PreparedGeometry_Intersects, METH_VARARGS, "PreparedGeometry_Intersects(PreparedGeometry self, Geometry otherGeom) -> bool"},
	 { "PreparedGeometry_Contains", _wrap_PreparedGeometry_Contains, METH_VARARGS, "PreparedGeometry_Contains(PreparedGeometry self, Geometry otherGeom) -> bool"},
	 { "PreparedGeometry_swigregister", PreparedGeometry_swigregister, METH_O, NULL},
	 { "new_GeomTransformer", _wrap_new_GeomTransformer, METH_VARARGS, "new_GeomTransformer(CoordinateTransformation ct, char ** options=None) -> GeomTransformer"},
	 { "delete_GeomTransformer", _wrap_delete_GeomTransformer, METH_O, "delete_GeomTransformer(GeomTransformer self)"},
	 { "GeomTransformer_Transform", _wrap_GeomTransformer_Transform, METH_VARARGS, "GeomTransformer_Transform(GeomTransformer self, Geometry src_geom) -> Geometry"},
	 { "GeomTransformer_swigregister", GeomTransformer_swigregister, METH_O, NULL},
	 { "GeomTransformer_swiginit", GeomTransformer_swiginit, METH_VARARGS, NULL},
	 { "delete_FieldDomain", _wrap_delete_FieldDomain, METH_O, "delete_FieldDomain(FieldDomain self)"},
	 { "FieldDomain_GetName", _wrap_FieldDomain_GetName, METH_O, "\n"
		"FieldDomain_GetName(FieldDomain self) -> char const *\n"
		"\n"
		"\n"
		"Get the name of the field domain.\n"
		"\n"
		"See :cpp:func:`OGRFieldDomain::GetName`.\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str\n"
		"    the field domain name.\n"
		"\n"
		""},
	 { "FieldDomain_GetDescription", _wrap_FieldDomain_GetDescription, METH_O, "\n"
		"FieldDomain_GetDescription(FieldDomain self) -> char const *\n"
		"\n"
		"\n"
		"Get the description of the field domain.\n"
		"\n"
		"See :cpp:func:`OGRFieldDomain::GetDescription`.\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str\n"
		"    the field domain description (might be empty string).\n"
		"\n"
		""},
	 { "FieldDomain_GetFieldType", _wrap_FieldDomain_GetFieldType, METH_O, "\n"
		"FieldDomain_GetFieldType(FieldDomain self) -> OGRFieldType\n"
		"\n"
		"\n"
		"Get the field type of the field domain.\n"
		"\n"
		"See :cpp:func:`OGRFieldDomain::GetFieldType`.\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int\n"
		"    the field type of the field domain.\n"
		"\n"
		""},
	 { "FieldDomain_GetFieldSubType", _wrap_FieldDomain_GetFieldSubType, METH_O, "\n"
		"FieldDomain_GetFieldSubType(FieldDomain self) -> OGRFieldSubType\n"
		"\n"
		"\n"
		"Get the field subtype of the field domain.\n"
		"\n"
		"See :cpp:func:`OGRFieldDomain::GetFieldSubType`.\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int\n"
		"    the field subtype of the field domain.\n"
		"\n"
		""},
	 { "FieldDomain_GetDomainType", _wrap_FieldDomain_GetDomainType, METH_O, "\n"
		"FieldDomain_GetDomainType(FieldDomain self) -> OGRFieldDomainType\n"
		"\n"
		"\n"
		"Get the type of the field domain.\n"
		"\n"
		"See :cpp:func:`OGRFieldDomain::GetDomainType`.\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int\n"
		"    the type of the field domain.\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> d = ogr.CreateCodedFieldDomain('my_code', None, ogr.OFTInteger, ogr.OFSTNone, { 1 : 'owned', 2 : 'leased' })\n"
		">>> d.GetDomainType() == ogr.OFDT_CODED\n"
		"True\n"
		"\n"
		"\n"
		""},
	 { "FieldDomain_GetSplitPolicy", _wrap_FieldDomain_GetSplitPolicy, METH_O, "\n"
		"FieldDomain_GetSplitPolicy(FieldDomain self) -> OGRFieldDomainSplitPolicy\n"
		"\n"
		"\n"
		"Get the split policy of the field domain.\n"
		"\n"
		"See :cpp:func:`OGRFieldDomain::GetSplitPolicy`.\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int\n"
		"    the split policy of the field domain (default = :py:const:`OFDSP_DEFAULT_VALUE`)\n"
		"\n"
		""},
	 { "FieldDomain_SetSplitPolicy", _wrap_FieldDomain_SetSplitPolicy, METH_VARARGS, "\n"
		"FieldDomain_SetSplitPolicy(FieldDomain self, OGRFieldDomainSplitPolicy policy)\n"
		"\n"
		"\n"
		"Set the split policy of the field domain.\n"
		"\n"
		"See :cpp:func:`OGRFieldDomain::SetSplitPolicy`.\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"policy : int\n"
		"    the split policy code of the field domain.\n"
		"\n"
		""},
	 { "FieldDomain_GetMergePolicy", _wrap_FieldDomain_GetMergePolicy, METH_O, "\n"
		"FieldDomain_GetMergePolicy(FieldDomain self) -> OGRFieldDomainMergePolicy\n"
		"\n"
		"\n"
		"Get the merge policy of the field domain.\n"
		"\n"
		"See :cpp:func:`OGRFieldDomain::GetMergePolicy`.\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Returns\n"
		"--------\n"
		"int\n"
		"    the merge policy of the field domain (default = :py:const:`OFDMP_DEFAULT_VALUE`)\n"
		"\n"
		""},
	 { "FieldDomain_SetMergePolicy", _wrap_FieldDomain_SetMergePolicy, METH_VARARGS, "\n"
		"FieldDomain_SetMergePolicy(FieldDomain self, OGRFieldDomainMergePolicy policy)\n"
		"\n"
		"\n"
		"Set the merge policy of the field domain.\n"
		"\n"
		"See :cpp:func:`OGRFieldDomain::SetMergePolicy`.\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"policy : int\n"
		"    the merge policy code of the field domain.\n"
		"\n"
		""},
	 { "FieldDomain_GetEnumeration", _wrap_FieldDomain_GetEnumeration, METH_O, "\n"
		"FieldDomain_GetEnumeration(FieldDomain self) -> OGRCodedValue const *\n"
		"\n"
		"\n"
		"Get the enumeration as a mapping of codes to values.\n"
		"\n"
		"See :cpp:func:`OGRCodedFieldDomain::GetEnumeration`.\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Returns\n"
		"--------\n"
		"dict\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> d = ogr.CreateCodedFieldDomain('my_domain', None, ogr.OFTInteger, ogr.OFSTNone, { 1 : 'owned', 2 : 'leased' })\n"
		">>> d.GetEnumeration()\n"
		"{'1': 'owned', '2': 'leased'}\n"
		"\n"
		"\n"
		""},
	 { "FieldDomain_GetMinAsDouble", _wrap_FieldDomain_GetMinAsDouble, METH_O, "\n"
		"FieldDomain_GetMinAsDouble(FieldDomain self) -> double\n"
		"\n"
		"\n"
		"Get the minimum value of a range domain.\n"
		"\n"
		"See :cpp:func:`OGRRangeFieldDomain::GetMin()`\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Returns\n"
		"--------\n"
		"float\n"
		"    the minimum value of the range\n"
		"\n"
		""},
	 { "FieldDomain_GetMinAsString", _wrap_FieldDomain_GetMinAsString, METH_O, "\n"
		"FieldDomain_GetMinAsString(FieldDomain self) -> char const *\n"
		"\n"
		"\n"
		"Get the minimum value of a range domain.\n"
		"\n"
		"See :cpp:func:`OGRRangeFieldDomain::GetMin()`\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str\n"
		"    the minimum value of the range\n"
		"\n"
		""},
	 { "FieldDomain_IsMinInclusive", _wrap_FieldDomain_IsMinInclusive, METH_O, "FieldDomain_IsMinInclusive(FieldDomain self) -> bool"},
	 { "FieldDomain_GetMaxAsDouble", _wrap_FieldDomain_GetMaxAsDouble, METH_O, "\n"
		"FieldDomain_GetMaxAsDouble(FieldDomain self) -> double\n"
		"\n"
		"\n"
		"Get the maximum value of a range domain.\n"
		"\n"
		"See :cpp:func:`OGRRangeFieldDomain::GetMax()`\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Returns\n"
		"--------\n"
		"float\n"
		"    the maximum value of the range\n"
		"\n"
		""},
	 { "FieldDomain_GetMaxAsString", _wrap_FieldDomain_GetMaxAsString, METH_O, "\n"
		"FieldDomain_GetMaxAsString(FieldDomain self) -> char const *\n"
		"\n"
		"\n"
		"Get the maximum value of a range domain.\n"
		"\n"
		"See :cpp:func:`OGRRangeFieldDomain::GetMax()`\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str\n"
		"    the maximum value of the range\n"
		"\n"
		""},
	 { "FieldDomain_IsMaxInclusive", _wrap_FieldDomain_IsMaxInclusive, METH_O, "FieldDomain_IsMaxInclusive(FieldDomain self) -> bool"},
	 { "FieldDomain_GetGlob", _wrap_FieldDomain_GetGlob, METH_O, "\n"
		"FieldDomain_GetGlob(FieldDomain self) -> char const *\n"
		"\n"
		"\n"
		"Get the glob expression.\n"
		"\n"
		"See :cpp:func:`OGRGlobFieldDomain::GetGlob`.\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str\n"
		"    the glob expression, or ``None`` in case of error\n"
		"\n"
		""},
	 { "FieldDomain_swigregister", FieldDomain_swigregister, METH_O, NULL},
	 { "CreateCodedFieldDomain", _wrap_CreateCodedFieldDomain, METH_VARARGS, "\n"
		"CreateCodedFieldDomain(char const * name, char const * description, OGRFieldType type, OGRFieldSubType subtype, OGRCodedValue const * enumeration) -> FieldDomain\n"
		"\n"
		"\n"
		"Creates a new coded field domain.\n"
		"\n"
		"See :cpp:func:`OGRCodedFieldDomain::OGRCodedFieldDomain`.\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"name : str\n"
		"    Domain name. Should not be ``None``.\n"
		"description : str, optional\n"
		"    Domain description (can be ``None``)\n"
		"type : int\n"
		"    Field type.\n"
		"subtype : int\n"
		"    Field subtype.\n"
		"enumeration : dict\n"
		"    Enumeration as a dictionary of (code : value) pairs. Should not be ``None``.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"FieldDomain\n"
		"\n"
		""},
	 { "CreateRangeFieldDomain", _wrap_CreateRangeFieldDomain, METH_VARARGS, "\n"
		"CreateRangeFieldDomain(char const * name, char const * description, OGRFieldType type, OGRFieldSubType subtype, double min, bool minIsInclusive, double max, double maxIsInclusive) -> FieldDomain\n"
		"\n"
		"Creates a new range field domain.\n"
		"\n"
		"See :cpp:func:`OGRRangeFieldDomain::OGRRangeFieldDomain`.\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"name : str\n"
		"    Domain name. Should not be ``None``.\n"
		"description : str, optional\n"
		"    Domain description (can be ``None``)\n"
		"type : int\n"
		"    Field type. Generally numeric. Potentially :py:const:`OFTDateTime`.\n"
		"subtype : int\n"
		"    Field subtype.\n"
		"min : float, optional\n"
		"    Minimum value (can be ``None``).\n"
		"minIsInclusive : bool\n"
		"    Whether the minimum value is included in the range.\n"
		"max : float, optional\n"
		"    Maximum value (can be ``None``).\n"
		"maxIsInclusive : bool\n"
		"    Whether the maximum value is included in the range.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"FieldDomain\n"
		"\n"
		""},
	 { "CreateRangeFieldDomainDateTime", _wrap_CreateRangeFieldDomainDateTime, METH_VARARGS, "CreateRangeFieldDomainDateTime(char const * name, char const * description, char const * min, bool minIsInclusive, char const * max, double maxIsInclusive) -> FieldDomain"},
	 { "CreateGlobFieldDomain", _wrap_CreateGlobFieldDomain, METH_VARARGS, "\n"
		"CreateGlobFieldDomain(char const * name, char const * description, OGRFieldType type, OGRFieldSubType subtype, char const * glob) -> FieldDomain\n"
		"\n"
		"\n"
		"Creates a new glob field domain.\n"
		"\n"
		"See :cpp:func:`OGRGlobFieldDomain::OGRGlobFieldDomain`\n"
		"\n"
		".. versionadded:: 3.3\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"name : str\n"
		"    Domain name. Should not be ``None``.\n"
		"description : str, optional\n"
		"    Domain description (can be ``None``)\n"
		"type : int\n"
		"    Field type.\n"
		"subtype : int\n"
		"    Field subtype.\n"
		"glob : str\n"
		"    Glob expression. Should not be ``None``.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"FieldDomain\n"
		"\n"
		""},
	 { "delete_GeomCoordinatePrecision", _wrap_delete_GeomCoordinatePrecision, METH_O, "delete_GeomCoordinatePrecision(GeomCoordinatePrecision self)"},
	 { "GeomCoordinatePrecision_Set", _wrap_GeomCoordinatePrecision_Set, METH_VARARGS, "GeomCoordinatePrecision_Set(GeomCoordinatePrecision self, double xyResolution, double zResolution, double mResolution)"},
	 { "GeomCoordinatePrecision_SetFromMeter", _wrap_GeomCoordinatePrecision_SetFromMeter, METH_VARARGS, "GeomCoordinatePrecision_SetFromMeter(GeomCoordinatePrecision self, SpatialReference srs, double xyMeterResolution, double zMeterResolution, double mResolution)"},
	 { "GeomCoordinatePrecision_GetXYResolution", _wrap_GeomCoordinatePrecision_GetXYResolution, METH_O, "GeomCoordinatePrecision_GetXYResolution(GeomCoordinatePrecision self) -> double"},
	 { "GeomCoordinatePrecision_GetZResolution", _wrap_GeomCoordinatePrecision_GetZResolution, METH_O, "GeomCoordinatePrecision_GetZResolution(GeomCoordinatePrecision self) -> double"},
	 { "GeomCoordinatePrecision_GetMResolution", _wrap_GeomCoordinatePrecision_GetMResolution, METH_O, "GeomCoordinatePrecision_GetMResolution(GeomCoordinatePrecision self) -> double"},
	 { "GeomCoordinatePrecision_GetFormats", _wrap_GeomCoordinatePrecision_GetFormats, METH_O, "GeomCoordinatePrecision_GetFormats(GeomCoordinatePrecision self) -> char **"},
	 { "GeomCoordinatePrecision_GetFormatSpecificOptions", _wrap_GeomCoordinatePrecision_GetFormatSpecificOptions, METH_VARARGS, "GeomCoordinatePrecision_GetFormatSpecificOptions(GeomCoordinatePrecision self, char const * formatName) -> char **"},
	 { "GeomCoordinatePrecision_SetFormatSpecificOptions", _wrap_GeomCoordinatePrecision_SetFormatSpecificOptions, METH_VARARGS, "GeomCoordinatePrecision_SetFormatSpecificOptions(GeomCoordinatePrecision self, char const * formatName, char ** formatSpecificOptions)"},
	 { "GeomCoordinatePrecision_swigregister", GeomCoordinatePrecision_swigregister, METH_O, NULL},
	 { "CreateGeomCoordinatePrecision", _wrap_CreateGeomCoordinatePrecision, METH_NOARGS, "CreateGeomCoordinatePrecision() -> GeomCoordinatePrecision"},
	 { "GetDriverCount", _wrap_GetDriverCount, METH_NOARGS, "GetDriverCount() -> int"},
	 { "GetOpenDSCount", _wrap_GetOpenDSCount, METH_NOARGS, "GetOpenDSCount() -> int"},
	 { "SetGenerate_DB2_V72_BYTE_ORDER", _wrap_SetGenerate_DB2_V72_BYTE_ORDER, METH_O, "SetGenerate_DB2_V72_BYTE_ORDER(int bGenerate_DB2_V72_BYTE_ORDER) -> OGRErr"},
	 { "RegisterAll", _wrap_RegisterAll, METH_NOARGS, "RegisterAll()"},
	 { "GeometryTypeToName", _wrap_GeometryTypeToName, METH_O, "GeometryTypeToName(OGRwkbGeometryType eType) -> char const *"},
	 { "GetFieldTypeName", _wrap_GetFieldTypeName, METH_O, "\n"
		"GetFieldTypeName(OGRFieldType type) -> char const *\n"
		"\n"
		"Fetch human readable name for a field type.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::GetFieldTypeName`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"type : int\n"
		"    the field type code to get name for\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str\n"
		"    the name\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> ogr.GetFieldTypeName(0)\n"
		"'Integer'\n"
		"\n"
		">>> ogr.GetFieldTypeName(ogr.OFTReal)\n"
		"'Real'\n"
		"\n"
		""},
	 { "GetFieldSubTypeName", _wrap_GetFieldSubTypeName, METH_O, "\n"
		"GetFieldSubTypeName(OGRFieldSubType type) -> char const *\n"
		"\n"
		"\n"
		"Fetch human readable name for a field subtype.\n"
		"\n"
		"See :cpp:func:`OGRFieldDefn::GetFieldSubTypeName`.\n"
		"\n"
		"Parameters\n"
		"-----------\n"
		"type : int\n"
		"    the field subtype to get name for.\n"
		"\n"
		"Returns\n"
		"--------\n"
		"str\n"
		"    the name.\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> ogr.GetFieldSubTypeName(1)\n"
		"'Boolean'\n"
		"\n"
		">>> ogr.GetFieldSubTypeName(ogr.OFSTInt16)\n"
		"'Int16'\n"
		"\n"
		"\n"
		""},
	 { "GT_Flatten", _wrap_GT_Flatten, METH_O, "GT_Flatten(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { "GT_SetZ", _wrap_GT_SetZ, METH_O, "GT_SetZ(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { "GT_SetM", _wrap_GT_SetM, METH_O, "GT_SetM(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { "GT_SetModifier", _wrap_GT_SetModifier, METH_VARARGS, "GT_SetModifier(OGRwkbGeometryType eType, int bSetZ, int bSetM=FALSE) -> OGRwkbGeometryType"},
	 { "GT_HasZ", _wrap_GT_HasZ, METH_O, "GT_HasZ(OGRwkbGeometryType eType) -> int"},
	 { "GT_HasM", _wrap_GT_HasM, METH_O, "GT_HasM(OGRwkbGeometryType eType) -> int"},
	 { "GT_IsSubClassOf", _wrap_GT_IsSubClassOf, METH_VARARGS, "GT_IsSubClassOf(OGRwkbGeometryType eType, OGRwkbGeometryType eSuperType) -> int"},
	 { "GT_IsCurve", _wrap_GT_IsCurve, METH_O, "GT_IsCurve(OGRwkbGeometryType arg1) -> int"},
	 { "GT_IsSurface", _wrap_GT_IsSurface, METH_O, "GT_IsSurface(OGRwkbGeometryType arg1) -> int"},
	 { "GT_IsNonLinear", _wrap_GT_IsNonLinear, METH_O, "GT_IsNonLinear(OGRwkbGeometryType arg1) -> int"},
	 { "GT_GetCollection", _wrap_GT_GetCollection, METH_O, "GT_GetCollection(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { "GT_GetCurve", _wrap_GT_GetCurve, METH_O, "GT_GetCurve(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { "GT_GetLinear", _wrap_GT_GetLinear, METH_O, "GT_GetLinear(OGRwkbGeometryType eType) -> OGRwkbGeometryType"},
	 { "SetNonLinearGeometriesEnabledFlag", _wrap_SetNonLinearGeometriesEnabledFlag, METH_O, "SetNonLinearGeometriesEnabledFlag(int bFlag)"},
	 { "GetNonLinearGeometriesEnabledFlag", _wrap_GetNonLinearGeometriesEnabledFlag, METH_NOARGS, "GetNonLinearGeometriesEnabledFlag() -> int"},
	 { "GetOpenDS", _wrap_GetOpenDS, METH_O, "GetOpenDS(int ds_number) -> OGRDataSourceShadow *"},
	 { "Open", (PyCFunction)(void(*)(void))_wrap_Open, METH_VARARGS|METH_KEYWORDS, "\n"
		"Open(char const * utf8_path, int update=0) -> OGRDataSourceShadow *\n"
		"\n"
		"\n"
		"Open a vector file as a :py:class:`gdal.Dataset`.\n"
		"Equivalent to calling :py:func:`gdal.OpenEx` with the\n"
		":py:const:`gdal.OF_VECTOR` flag.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"utf8_path : str\n"
		"    name of the file to open\n"
		"\n"
		"Returns\n"
		"-------\n"
		"gdal.Dataset, or ``None`` on failure\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> from osgeo import ogr\n"
		">>> ogr.GetDriverByName('ESRI Shapefile').GetDescription()\n"
		"'ESRI Shapefile'\n"
		">>> ogr.GetDriverByName('GTiff')\n"
		">>>\n"
		"\n"
		""},
	 { "OpenShared", (PyCFunction)(void(*)(void))_wrap_OpenShared, METH_VARARGS|METH_KEYWORDS, "\n"
		"OpenShared(char const * utf8_path, int update=0) -> OGRDataSourceShadow *\n"
		"\n"
		"\n"
		"Open a vector file as a :py:class:`gdal.Dataset`. If the file has already been\n"
		"opened in the current thread, return a reference to the already-opened\n"
		":py:class:`gdal.Dataset`. Equivalent to calling :py:func:`gdal.OpenEx` with the\n"
		":py:const:`gdal.OF_VECTOR` and :py:const:`gdal.OF_SHARED` flags.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"utf8_path : str\n"
		"    name of the file to open\n"
		"\n"
		"Returns\n"
		"-------\n"
		"gdal.Dataset, or ``None`` on failure\n"
		"\n"
		"\n"
		""},
	 { "GetDriverByName", _wrap_GetDriverByName, METH_O, "\n"
		"GetDriverByName(char const * name) -> OGRDriverShadow *\n"
		"\n"
		"\n"
		"Get a vector driver. Like :py:func:`gdal.GetDriverByName`, but\n"
		"only returns drivers that handle vector data.\n"
		"\n"
		"Parameters\n"
		"----------\n"
		"name : str\n"
		"    name of the driver to fetch\n"
		"\n"
		"Returns\n"
		"-------\n"
		"gdal.Driver\n"
		"\n"
		"Examples\n"
		"--------\n"
		">>> ogr.GetDriverByName('ESRI Shapefile').GetDescription()\n"
		"'ESRI Shapefile'\n"
		"\n"
		">>> ogr.GetDriverByName('GTiff')\n"
		">>>\n"
		"\n"
		""},
	 { "GetDriver", _wrap_GetDriver, METH_O, "GetDriver(int driver_number) -> OGRDriverShadow *"},
	 { "GeneralCmdLineProcessor", _wrap_GeneralCmdLineProcessor, METH_VARARGS, "GeneralCmdLineProcessor(char ** papszArgv, int nOptions=0) -> char **"},
	 { "TermProgress_nocb", (PyCFunction)(void(*)(void))_wrap_TermProgress_nocb, METH_VARARGS|METH_KEYWORDS, "TermProgress_nocb(double dfProgress, char const * pszMessage=None, void * pData=None) -> int"},
	 { NULL, NULL, 0, NULL }
};


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

static void *_p_OGRLayerShadowTo_p_GDALMajorObjectShadow(void *x, int *SWIGUNUSEDPARM(newmemory)) {
    return (void *)((GDALMajorObjectShadow *)  ((OGRLayerShadow *) x));
}
static swig_type_info _swigt__p_ArrowArray = {"_p_ArrowArray", "ArrowArray *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ArrowArrayStream = {"_p_ArrowArrayStream", "ArrowArrayStream *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ArrowSchema = {"_p_ArrowSchema", "ArrowSchema *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALDatasetShadow = {"_p_GDALDatasetShadow", "OGRDataSourceShadow *|GDALDatasetShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALDriverShadow = {"_p_GDALDriverShadow", "OGRDriverShadow *|GDALDriverShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALMajorObjectShadow = {"_p_GDALMajorObjectShadow", "GDALMajorObjectShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GDALProgressFunc = {"_p_GDALProgressFunc", "GDALProgressFunc *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRCodedValue = {"_p_OGRCodedValue", "OGRCodedValue *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRFeatureDefnShadow = {"_p_OGRFeatureDefnShadow", "OGRFeatureDefnShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRFieldDefnShadow = {"_p_OGRFieldDefnShadow", "OGRFieldDefnShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRFieldDomainShadow = {"_p_OGRFieldDomainShadow", "OGRFieldDomainShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRGeomCoordinatePrecisionShadow = {"_p_OGRGeomCoordinatePrecisionShadow", "OGRGeomCoordinatePrecisionShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRGeomFieldDefnShadow = {"_p_OGRGeomFieldDefnShadow", "OGRGeomFieldDefnShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRGeomTransformerShadow = {"_p_OGRGeomTransformerShadow", "OGRGeomTransformerShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRGeometryShadow = {"_p_OGRGeometryShadow", "OGRGeometryShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRPreparedGeometryShadow = {"_p_OGRPreparedGeometryShadow", "OGRPreparedGeometryShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRStyleTableShadow = {"_p_OGRStyleTableShadow", "OGRStyleTableShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_bool = {"_p_bool", "bool *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "retStringAndCPLFree *|char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_double_p_q_const__char_p_void__int = {"_p_f_double_p_q_const__char_p_void__int", "int (*)(double,char const *,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "CPLErr *|OGRAxisOrientation *|OGRErr *|OGRFieldDomainMergePolicy *|OGRFieldDomainSplitPolicy *|OGRFieldDomainType *|OGRFieldSubType *|OGRFieldType *|OGRJustification *|OGRwkbByteOrder *|OGRwkbGeometryType *|OSRAxisMappingStrategy *|int *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_GIntBig = {"_p_p_GIntBig", "GIntBig **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_OGRGeometryTypeCounter = {"_p_p_OGRGeometryTypeCounter", "OGRGeometryTypeCounter **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_OGRSpatialReferenceH = {"_p_p_OGRSpatialReferenceH", "OGRSpatialReferenceH **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_ArrowArray,
  &_swigt__p_ArrowArrayStream,
  &_swigt__p_ArrowSchema,
  &_swigt__p_GDALDatasetShadow,
  &_swigt__p_GDALDriverShadow,
  &_swigt__p_GDALMajorObjectShadow,
  &_swigt__p_GDALProgressFunc,
  &_swigt__p_GIntBig,
  &_swigt__p_OGRCodedValue,
  &_swigt__p_OGRFeatureDefnShadow,
  &_swigt__p_OGRFeatureShadow,
  &_swigt__p_OGRFieldDefnShadow,
  &_swigt__p_OGRFieldDomainShadow,
  &_swigt__p_OGRGeomCoordinatePrecisionShadow,
  &_swigt__p_OGRGeomFieldDefnShadow,
  &_swigt__p_OGRGeomTransformerShadow,
  &_swigt__p_OGRGeometryShadow,
  &_swigt__p_OGRLayerShadow,
  &_swigt__p_OGRPreparedGeometryShadow,
  &_swigt__p_OGRStyleTableShadow,
  &_swigt__p_OSRCoordinateTransformationShadow,
  &_swigt__p_OSRSpatialReferenceShadow,
  &_swigt__p_bool,
  &_swigt__p_char,
  &_swigt__p_double,
  &_swigt__p_f_double_p_q_const__char_p_void__int,
  &_swigt__p_float,
  &_swigt__p_int,
  &_swigt__p_p_GIntBig,
  &_swigt__p_p_OGRGeometryTypeCounter,
  &_swigt__p_p_OGRSpatialReferenceH,
  &_swigt__p_p_char,
  &_swigt__p_p_double,
  &_swigt__p_p_int,
  &_swigt__p_size_t,
};

static swig_cast_info _swigc__p_ArrowArray[] = {  {&_swigt__p_ArrowArray, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ArrowArrayStream[] = {  {&_swigt__p_ArrowArrayStream, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ArrowSchema[] = {  {&_swigt__p_ArrowSchema, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALDatasetShadow[] = {  {&_swigt__p_GDALDatasetShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALDriverShadow[] = {  {&_swigt__p_GDALDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALMajorObjectShadow[] = {  {&_swigt__p_GDALMajorObjectShadow, 0, 0, 0},  {&_swigt__p_OGRLayerShadow, _p_OGRLayerShadowTo_p_GDALMajorObjectShadow, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GDALProgressFunc[] = {  {&_swigt__p_GDALProgressFunc, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GIntBig[] = {  {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRCodedValue[] = {  {&_swigt__p_OGRCodedValue, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRFeatureDefnShadow[] = {  {&_swigt__p_OGRFeatureDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRFeatureShadow[] = {  {&_swigt__p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRFieldDefnShadow[] = {  {&_swigt__p_OGRFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRFieldDomainShadow[] = {  {&_swigt__p_OGRFieldDomainShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRGeomCoordinatePrecisionShadow[] = {  {&_swigt__p_OGRGeomCoordinatePrecisionShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRGeomFieldDefnShadow[] = {  {&_swigt__p_OGRGeomFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRGeomTransformerShadow[] = {  {&_swigt__p_OGRGeomTransformerShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRGeometryShadow[] = {  {&_swigt__p_OGRGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRLayerShadow[] = {  {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRPreparedGeometryShadow[] = {  {&_swigt__p_OGRPreparedGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRStyleTableShadow[] = {  {&_swigt__p_OGRStyleTableShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = {  {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_bool[] = {  {&_swigt__p_bool, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_double_p_q_const__char_p_void__int[] = {  {&_swigt__p_f_double_p_q_const__char_p_void__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_float[] = {  {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_GIntBig[] = {  {&_swigt__p_p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_OGRGeometryTypeCounter[] = {  {&_swigt__p_p_OGRGeometryTypeCounter, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_OGRSpatialReferenceH[] = {  {&_swigt__p_p_OGRSpatialReferenceH, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_double[] = {  {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_int[] = {  {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_size_t[] = {  {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_ArrowArray,
  _swigc__p_ArrowArrayStream,
  _swigc__p_ArrowSchema,
  _swigc__p_GDALDatasetShadow,
  _swigc__p_GDALDriverShadow,
  _swigc__p_GDALMajorObjectShadow,
  _swigc__p_GDALProgressFunc,
  _swigc__p_GIntBig,
  _swigc__p_OGRCodedValue,
  _swigc__p_OGRFeatureDefnShadow,
  _swigc__p_OGRFeatureShadow,
  _swigc__p_OGRFieldDefnShadow,
  _swigc__p_OGRFieldDomainShadow,
  _swigc__p_OGRGeomCoordinatePrecisionShadow,
  _swigc__p_OGRGeomFieldDefnShadow,
  _swigc__p_OGRGeomTransformerShadow,
  _swigc__p_OGRGeometryShadow,
  _swigc__p_OGRLayerShadow,
  _swigc__p_OGRPreparedGeometryShadow,
  _swigc__p_OGRStyleTableShadow,
  _swigc__p_OSRCoordinateTransformationShadow,
  _swigc__p_OSRSpatialReferenceShadow,
  _swigc__p_bool,
  _swigc__p_char,
  _swigc__p_double,
  _swigc__p_f_double_p_q_const__char_p_void__int,
  _swigc__p_float,
  _swigc__p_int,
  _swigc__p_p_GIntBig,
  _swigc__p_p_OGRGeometryTypeCounter,
  _swigc__p_p_OGRSpatialReferenceH,
  _swigc__p_p_char,
  _swigc__p_p_double,
  _swigc__p_p_int,
  _swigc__p_size_t,
};


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

static swig_const_info swig_const_table[] = {
{ SWIG_PY_POINTER, "TermProgress", 0, 0, (void *)((int (*)(double,char const *,void *))(GDALTermProgress)), &SWIGTYPE_p_f_double_p_q_const__char_p_void__int },
{0, 0, 0, 0.0, 0, 0}};

#ifdef __cplusplus
}
#endif
/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is tough by the requirement that no dynamic
 * memory is used. Also, since swig_type_info structures store pointers to
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization.
 * The idea is that swig generates all the structures that are needed.
 * The runtime then collects these partially filled structures.
 * The SWIG_InitializeModule function takes these initial arrays out of
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.
 *
 * The generated swig_type_info structures are assigned statically to an initial
 * array. We just loop through that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast linked list. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns. So to actually build the cast linked list,
 * we find the array of casts associated with the type, and loop through it
 * adding the casts to the list. The one last trick we need to do is making
 * sure the type pointer in the swig_cast_info struct is correct.
 *
 * First off, we lookup the cast->type name to see if it is already loaded.
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the linked list (because the cast->type) pointer will
 *     be correct.
 * ----------------------------------------------------------------------------- */

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

#if 0
#define SWIGRUNTIME_DEBUG
#endif

#ifndef SWIG_INIT_CLIENT_DATA_TYPE
#define SWIG_INIT_CLIENT_DATA_TYPE void *
#endif

SWIGRUNTIME void
SWIG_InitializeModule(SWIG_INIT_CLIENT_DATA_TYPE clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int init;
  
  /* check to see if the circular list has been setup, if not, set it up */
  if (swig_module.next==0) {
    /* Initialize the swig_module */
    swig_module.type_initial = swig_type_initial;
    swig_module.cast_initial = swig_cast_initial;
    swig_module.next = &swig_module;
    init = 1;
  } else {
    init = 0;
  }
  
  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (!module_head) {
    /* This is the first module loaded for this interpreter */
    /* so set the swig module into the interpreter */
    SWIG_SetModule(clientdata, &swig_module);
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    iter=module_head;
    do {
      if (iter==&swig_module) {
        /* Our module is already in the list, so there's nothing more to do. */
        return;
      }
      iter=iter->next;
    } while (iter!= module_head);
    
    /* otherwise we must add our module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }
  
  /* When multiple interpreters are used, a module could have already been initialized in
       a different interpreter, but not yet have a pointer in this interpreter.
       In this case, we do not want to continue adding types... everything should be
       set up already */
  if (init == 0) return;
  
  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *ret;
    swig_cast_info *cast;
    
#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
#endif
    
    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found type %s\n", type->name);
#endif
      if (swig_module.type_initial[i]->clientdata) {
        type->clientdata = swig_module.type_initial[i]->clientdata;
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
#endif
      }
    } else {
      type = swig_module.type_initial[i];
    }
    
    /* Insert casting types */
    cast = swig_module.cast_initial[i];
    while (cast->type) {
      /* Don't need to add information already in the list */
      ret = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
#ifdef SWIGRUNTIME_DEBUG
        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
#endif
      }
      if (ret) {
        if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
#endif
          cast->type = ret;
          ret = 0;
        } else {
          /* Check for casting already in the list */
          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
#ifdef SWIGRUNTIME_DEBUG
          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
#endif
          if (!ocast) ret = 0;
        }
      }
      
      if (!ret) {
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        if (type->cast) {
          type->cast->prev = cast;
          cast->next = type->cast;
        }
        type->cast = cast;
      }
      cast++;
    }
    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
  swig_module.types[i] = 0;
  
#ifdef SWIGRUNTIME_DEBUG
  printf("**** SWIG_InitializeModule: Cast List ******\n");
  for (i = 0; i < swig_module.size; ++i) {
    int j = 0;
    swig_cast_info *cast = swig_module.cast_initial[i];
    printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
    while (cast->type) {
      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
      cast++;
      ++j;
    }
    printf("---- Total casts: %d\n",j);
  }
  printf("**** SWIG_InitializeModule: Cast List ******\n");
#endif
}

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

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



#ifdef __cplusplus
extern "C" {
#endif
  
  /* -----------------------------------------------------------------------------
   * constants/methods manipulation
   * ----------------------------------------------------------------------------- */
  
  /* Install Constants */
  SWIGINTERN void
  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
    PyObject *obj = 0;
    size_t i;
    for (i = 0; constants[i].type; ++i) {
      switch(constants[i].type) {
      case SWIG_PY_POINTER:
        obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
        break;
      case SWIG_PY_BINARY:
        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
        break;
      default:
        obj = 0;
        break;
      }
      if (obj) {
        PyDict_SetItemString(d, constants[i].name, obj);
        Py_DECREF(obj);
      }
    }
  }
  
  /* -----------------------------------------------------------------------------
   * Patch %callback methods' docstrings to hold the callback ptrs
   * -----------------------------------------------------------------------------*/
  
  SWIGINTERN void
  SWIG_Python_FixMethods(PyMethodDef *methods, const swig_const_info *const_table, swig_type_info **types, swig_type_info **types_initial) {
    size_t i;
    for (i = 0; methods[i].ml_name; ++i) {
      const char *c = methods[i].ml_doc;
      if (!c) continue;
      c = strstr(c, "swig_ptr: ");
      if (c) {
        int j;
        const swig_const_info *ci = 0;
        const char *name = c + 10;
        for (j = 0; const_table[j].type; ++j) {
          if (strncmp(const_table[j].name, name, 
              strlen(const_table[j].name)) == 0) {
            ci = &(const_table[j]);
            break;
          }
        }
        if (ci) {
          void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
          if (ptr) {
            size_t shift = (ci->ptype) - types;
            swig_type_info *ty = types_initial[shift];
            size_t ldoc = (c - methods[i].ml_doc);
            size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
            char *ndoc = (char*)malloc(ldoc + lptr + 10);
            if (ndoc) {
              char *buff = ndoc;
              memcpy(buff, methods[i].ml_doc, ldoc);
              buff += ldoc;
              memcpy(buff, "swig_ptr: ", 10);
              buff += 10;
              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
              methods[i].ml_doc = ndoc;
            }
          }
        }
      }
    }
  } 
  
#ifdef __cplusplus
}
#endif




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

#ifdef __cplusplus
extern "C"
#endif

SWIGEXPORT 
#if PY_VERSION_HEX >= 0x03000000
PyObject*
#else
void
#endif
SWIG_init(void) {
  PyObject *m, *d, *md, *globals;
  
#if PY_VERSION_HEX >= 0x03000000
  static struct PyModuleDef SWIG_module = {
    PyModuleDef_HEAD_INIT,
    SWIG_name,
    NULL,
    -1,
    SwigMethods,
    NULL,
    NULL,
    NULL,
    NULL
  };
#endif
  
#if defined(SWIGPYTHON_BUILTIN)
  static SwigPyClientData SwigPyObject_clientdata = {
    0, 0, 0, 0, 0, 0, 0
  };
  static PyGetSetDef this_getset_def = {
    (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
  };
  static SwigPyGetSet thisown_getset_closure = {
    SwigPyObject_own,
    SwigPyObject_own
  };
  static PyGetSetDef thisown_getset_def = {
    (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
  };
  PyTypeObject *builtin_pytype;
  int builtin_base_count;
  swig_type_info *builtin_basetype;
  PyObject *tuple;
  PyGetSetDescrObject *static_getset;
  PyTypeObject *metatype;
  PyTypeObject *swigpyobject;
  SwigPyClientData *cd;
  PyObject *public_interface, *public_symbol;
  PyObject *this_descr;
  PyObject *thisown_descr;
  PyObject *self = 0;
  int i;
  
  (void)builtin_pytype;
  (void)builtin_base_count;
  (void)builtin_basetype;
  (void)tuple;
  (void)static_getset;
  (void)self;
  
  /* Metaclass is used to implement static member variables */
  metatype = SwigPyObjectType();
  assert(metatype);
#endif
  
  (void)globals;
  
  /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
  SWIG_This();
  SWIG_Python_TypeCache();
  SwigPyPacked_type();
#ifndef SWIGPYTHON_BUILTIN
  SwigPyObject_type();
#endif
  
  /* Fix SwigMethods to carry the callback ptrs when needed */
  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
  
#if PY_VERSION_HEX >= 0x03000000
  m = PyModule_Create(&SWIG_module);
#else
  m = Py_InitModule(SWIG_name, SwigMethods);
#endif
  
  md = d = PyModule_GetDict(m);
  (void)md;
  
  SWIG_InitializeModule(0);
  
#ifdef SWIGPYTHON_BUILTIN
  swigpyobject = SwigPyObject_TypeOnce();
  
  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
  assert(SwigPyObject_stype);
  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  if (!cd) {
    SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
    SwigPyObject_clientdata.pytype = swigpyobject;
  } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
    PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
# if PY_VERSION_HEX >= 0x03000000
    return NULL;
# else
    return;
# endif
  }
  
  /* All objects have a 'this' attribute */
  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
  (void)this_descr;
  
  /* All objects have a 'thisown' attribute */
  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
  (void)thisown_descr;
  
  public_interface = PyList_New(0);
  public_symbol = 0;
  (void)public_symbol;
  
  PyDict_SetItemString(md, "__all__", public_interface);
  Py_DECREF(public_interface);
  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
  for (i = 0; swig_const_table[i].name != 0; ++i)
  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
#endif
  
  SWIG_InstallConstants(d,swig_const_table);
  
  SWIG_Python_SetConstant(d, "wkb25DBit",SWIG_From_int(static_cast< int >(0x80000000)));
  SWIG_Python_SetConstant(d, "wkb25Bit",SWIG_From_int(static_cast< int >(0x80000000)));
  SWIG_Python_SetConstant(d, "wkbUnknown",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "wkbPoint",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "wkbLineString",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "wkbPolygon",SWIG_From_int(static_cast< int >(3)));
  SWIG_Python_SetConstant(d, "wkbMultiPoint",SWIG_From_int(static_cast< int >(4)));
  SWIG_Python_SetConstant(d, "wkbMultiLineString",SWIG_From_int(static_cast< int >(5)));
  SWIG_Python_SetConstant(d, "wkbMultiPolygon",SWIG_From_int(static_cast< int >(6)));
  SWIG_Python_SetConstant(d, "wkbGeometryCollection",SWIG_From_int(static_cast< int >(7)));
  SWIG_Python_SetConstant(d, "wkbCircularString",SWIG_From_int(static_cast< int >(8)));
  SWIG_Python_SetConstant(d, "wkbCompoundCurve",SWIG_From_int(static_cast< int >(9)));
  SWIG_Python_SetConstant(d, "wkbCurvePolygon",SWIG_From_int(static_cast< int >(10)));
  SWIG_Python_SetConstant(d, "wkbMultiCurve",SWIG_From_int(static_cast< int >(11)));
  SWIG_Python_SetConstant(d, "wkbMultiSurface",SWIG_From_int(static_cast< int >(12)));
  SWIG_Python_SetConstant(d, "wkbCurve",SWIG_From_int(static_cast< int >(13)));
  SWIG_Python_SetConstant(d, "wkbSurface",SWIG_From_int(static_cast< int >(14)));
  SWIG_Python_SetConstant(d, "wkbPolyhedralSurface",SWIG_From_int(static_cast< int >(15)));
  SWIG_Python_SetConstant(d, "wkbTIN",SWIG_From_int(static_cast< int >(16)));
  SWIG_Python_SetConstant(d, "wkbTriangle",SWIG_From_int(static_cast< int >(17)));
  SWIG_Python_SetConstant(d, "wkbNone",SWIG_From_int(static_cast< int >(100)));
  SWIG_Python_SetConstant(d, "wkbLinearRing",SWIG_From_int(static_cast< int >(101)));
  SWIG_Python_SetConstant(d, "wkbCircularStringZ",SWIG_From_int(static_cast< int >(1008)));
  SWIG_Python_SetConstant(d, "wkbCompoundCurveZ",SWIG_From_int(static_cast< int >(1009)));
  SWIG_Python_SetConstant(d, "wkbCurvePolygonZ",SWIG_From_int(static_cast< int >(1010)));
  SWIG_Python_SetConstant(d, "wkbMultiCurveZ",SWIG_From_int(static_cast< int >(1011)));
  SWIG_Python_SetConstant(d, "wkbMultiSurfaceZ",SWIG_From_int(static_cast< int >(1012)));
  SWIG_Python_SetConstant(d, "wkbCurveZ",SWIG_From_int(static_cast< int >(1013)));
  SWIG_Python_SetConstant(d, "wkbSurfaceZ",SWIG_From_int(static_cast< int >(1014)));
  SWIG_Python_SetConstant(d, "wkbPolyhedralSurfaceZ",SWIG_From_int(static_cast< int >(1015)));
  SWIG_Python_SetConstant(d, "wkbTINZ",SWIG_From_int(static_cast< int >(1016)));
  SWIG_Python_SetConstant(d, "wkbTriangleZ",SWIG_From_int(static_cast< int >(1017)));
  SWIG_Python_SetConstant(d, "wkbPointM",SWIG_From_int(static_cast< int >(2001)));
  SWIG_Python_SetConstant(d, "wkbLineStringM",SWIG_From_int(static_cast< int >(2002)));
  SWIG_Python_SetConstant(d, "wkbPolygonM",SWIG_From_int(static_cast< int >(2003)));
  SWIG_Python_SetConstant(d, "wkbMultiPointM",SWIG_From_int(static_cast< int >(2004)));
  SWIG_Python_SetConstant(d, "wkbMultiLineStringM",SWIG_From_int(static_cast< int >(2005)));
  SWIG_Python_SetConstant(d, "wkbMultiPolygonM",SWIG_From_int(static_cast< int >(2006)));
  SWIG_Python_SetConstant(d, "wkbGeometryCollectionM",SWIG_From_int(static_cast< int >(2007)));
  SWIG_Python_SetConstant(d, "wkbCircularStringM",SWIG_From_int(static_cast< int >(2008)));
  SWIG_Python_SetConstant(d, "wkbCompoundCurveM",SWIG_From_int(static_cast< int >(2009)));
  SWIG_Python_SetConstant(d, "wkbCurvePolygonM",SWIG_From_int(static_cast< int >(2010)));
  SWIG_Python_SetConstant(d, "wkbMultiCurveM",SWIG_From_int(static_cast< int >(2011)));
  SWIG_Python_SetConstant(d, "wkbMultiSurfaceM",SWIG_From_int(static_cast< int >(2012)));
  SWIG_Python_SetConstant(d, "wkbCurveM",SWIG_From_int(static_cast< int >(2013)));
  SWIG_Python_SetConstant(d, "wkbSurfaceM",SWIG_From_int(static_cast< int >(2014)));
  SWIG_Python_SetConstant(d, "wkbPolyhedralSurfaceM",SWIG_From_int(static_cast< int >(2015)));
  SWIG_Python_SetConstant(d, "wkbTINM",SWIG_From_int(static_cast< int >(2016)));
  SWIG_Python_SetConstant(d, "wkbTriangleM",SWIG_From_int(static_cast< int >(2017)));
  SWIG_Python_SetConstant(d, "wkbPointZM",SWIG_From_int(static_cast< int >(3001)));
  SWIG_Python_SetConstant(d, "wkbLineStringZM",SWIG_From_int(static_cast< int >(3002)));
  SWIG_Python_SetConstant(d, "wkbPolygonZM",SWIG_From_int(static_cast< int >(3003)));
  SWIG_Python_SetConstant(d, "wkbMultiPointZM",SWIG_From_int(static_cast< int >(3004)));
  SWIG_Python_SetConstant(d, "wkbMultiLineStringZM",SWIG_From_int(static_cast< int >(3005)));
  SWIG_Python_SetConstant(d, "wkbMultiPolygonZM",SWIG_From_int(static_cast< int >(3006)));
  SWIG_Python_SetConstant(d, "wkbGeometryCollectionZM",SWIG_From_int(static_cast< int >(3007)));
  SWIG_Python_SetConstant(d, "wkbCircularStringZM",SWIG_From_int(static_cast< int >(3008)));
  SWIG_Python_SetConstant(d, "wkbCompoundCurveZM",SWIG_From_int(static_cast< int >(3009)));
  SWIG_Python_SetConstant(d, "wkbCurvePolygonZM",SWIG_From_int(static_cast< int >(3010)));
  SWIG_Python_SetConstant(d, "wkbMultiCurveZM",SWIG_From_int(static_cast< int >(3011)));
  SWIG_Python_SetConstant(d, "wkbMultiSurfaceZM",SWIG_From_int(static_cast< int >(3012)));
  SWIG_Python_SetConstant(d, "wkbCurveZM",SWIG_From_int(static_cast< int >(3013)));
  SWIG_Python_SetConstant(d, "wkbSurfaceZM",SWIG_From_int(static_cast< int >(3014)));
  SWIG_Python_SetConstant(d, "wkbPolyhedralSurfaceZM",SWIG_From_int(static_cast< int >(3015)));
  SWIG_Python_SetConstant(d, "wkbTINZM",SWIG_From_int(static_cast< int >(3016)));
  SWIG_Python_SetConstant(d, "wkbTriangleZM",SWIG_From_int(static_cast< int >(3017)));
  SWIG_Python_SetConstant(d, "wkbPoint25D",SWIG_From_int(static_cast< int >(0x80000001)));
  SWIG_Python_SetConstant(d, "wkbLineString25D",SWIG_From_int(static_cast< int >(0x80000002)));
  SWIG_Python_SetConstant(d, "wkbPolygon25D",SWIG_From_int(static_cast< int >(0x80000003)));
  SWIG_Python_SetConstant(d, "wkbMultiPoint25D",SWIG_From_int(static_cast< int >(0x80000004)));
  SWIG_Python_SetConstant(d, "wkbMultiLineString25D",SWIG_From_int(static_cast< int >(0x80000005)));
  SWIG_Python_SetConstant(d, "wkbMultiPolygon25D",SWIG_From_int(static_cast< int >(0x80000006)));
  SWIG_Python_SetConstant(d, "wkbGeometryCollection25D",SWIG_From_int(static_cast< int >(0x80000007)));
  SWIG_Python_SetConstant(d, "OFTInteger",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "OFTIntegerList",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "OFTReal",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "OFTRealList",SWIG_From_int(static_cast< int >(3)));
  SWIG_Python_SetConstant(d, "OFTString",SWIG_From_int(static_cast< int >(4)));
  SWIG_Python_SetConstant(d, "OFTStringList",SWIG_From_int(static_cast< int >(5)));
  SWIG_Python_SetConstant(d, "OFTWideString",SWIG_From_int(static_cast< int >(6)));
  SWIG_Python_SetConstant(d, "OFTWideStringList",SWIG_From_int(static_cast< int >(7)));
  SWIG_Python_SetConstant(d, "OFTBinary",SWIG_From_int(static_cast< int >(8)));
  SWIG_Python_SetConstant(d, "OFTDate",SWIG_From_int(static_cast< int >(9)));
  SWIG_Python_SetConstant(d, "OFTTime",SWIG_From_int(static_cast< int >(10)));
  SWIG_Python_SetConstant(d, "OFTDateTime",SWIG_From_int(static_cast< int >(11)));
  SWIG_Python_SetConstant(d, "OFTInteger64",SWIG_From_int(static_cast< int >(12)));
  SWIG_Python_SetConstant(d, "OFTInteger64List",SWIG_From_int(static_cast< int >(13)));
  SWIG_Python_SetConstant(d, "OFSTNone",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "OFSTBoolean",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "OFSTInt16",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "OFSTFloat32",SWIG_From_int(static_cast< int >(3)));
  SWIG_Python_SetConstant(d, "OFSTJSON",SWIG_From_int(static_cast< int >(4)));
  SWIG_Python_SetConstant(d, "OFSTUUID",SWIG_From_int(static_cast< int >(5)));
  SWIG_Python_SetConstant(d, "OJUndefined",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "OJLeft",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "OJRight",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "OFDT_CODED",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "OFDT_RANGE",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "OFDT_GLOB",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "OFDSP_DEFAULT_VALUE",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "OFDSP_DUPLICATE",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "OFDSP_GEOMETRY_RATIO",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "OFDMP_DEFAULT_VALUE",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "OFDMP_SUM",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "OFDMP_GEOMETRY_WEIGHTED",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "wkbXDR",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "wkbNDR",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "NullFID",SWIG_From_int(static_cast< int >(-1)));
  SWIG_Python_SetConstant(d, "ALTER_NAME_FLAG",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "ALTER_TYPE_FLAG",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "ALTER_WIDTH_PRECISION_FLAG",SWIG_From_int(static_cast< int >(4)));
  SWIG_Python_SetConstant(d, "ALTER_NULLABLE_FLAG",SWIG_From_int(static_cast< int >(8)));
  SWIG_Python_SetConstant(d, "ALTER__FLAG",SWIG_From_int(static_cast< int >(8)));
  SWIG_Python_SetConstant(d, "ALTER_DEFAULT_FLAG",SWIG_From_int(static_cast< int >(16)));
  SWIG_Python_SetConstant(d, "ALTER_UNIQUE_FLAG",SWIG_From_int(static_cast< int >(32)));
  SWIG_Python_SetConstant(d, "ALTER_DOMAIN_FLAG",SWIG_From_int(static_cast< int >(64)));
  SWIG_Python_SetConstant(d, "ALTER_ALTERNATIVE_NAME_FLAG",SWIG_From_int(static_cast< int >(128)));
  SWIG_Python_SetConstant(d, "ALTER_COMMENT_FLAG",SWIG_From_int(static_cast< int >(256)));
  SWIG_Python_SetConstant(d, "ALTER_ALL_FLAG",SWIG_From_int(static_cast< int >(1+2+4+8+16+32+64+128+256)));
  SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_NAME_FLAG",SWIG_From_int(static_cast< int >(4096)));
  SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_TYPE_FLAG",SWIG_From_int(static_cast< int >(8192)));
  SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_NULLABLE_FLAG",SWIG_From_int(static_cast< int >(16384)));
  SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_SRS_FLAG",SWIG_From_int(static_cast< int >(32768)));
  SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_SRS_COORD_EPOCH_FLAG",SWIG_From_int(static_cast< int >(65536)));
  SWIG_Python_SetConstant(d, "ALTER_GEOM_FIELD_DEFN_ALL_FLAG",SWIG_From_int(static_cast< int >(4096+8192+16384+32768+65536)));
  SWIG_Python_SetConstant(d, "F_VAL_NULL",SWIG_From_int(static_cast< int >(0x00000001)));
  SWIG_Python_SetConstant(d, "F_VAL_GEOM_TYPE",SWIG_From_int(static_cast< int >(0x00000002)));
  SWIG_Python_SetConstant(d, "F_VAL_WIDTH",SWIG_From_int(static_cast< int >(0x00000004)));
  SWIG_Python_SetConstant(d, "F_VAL_ALLOW_NULL_WHEN_DEFAULT",SWIG_From_int(static_cast< int >(0x00000008)));
  SWIG_Python_SetConstant(d, "F_VAL_ALL",SWIG_From_int(static_cast< int >(0xFFFFFFFF)));
  SWIG_Python_SetConstant(d, "TZFLAG_UNKNOWN",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "TZFLAG_LOCALTIME",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "TZFLAG_MIXED_TZ",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "TZFLAG_UTC",SWIG_From_int(static_cast< int >(100)));
  SWIG_Python_SetConstant(d, "GGT_COUNT_NOT_NEEDED",SWIG_From_int(static_cast< int >(0x1)));
  SWIG_Python_SetConstant(d, "GGT_STOP_IF_MIXED",SWIG_From_int(static_cast< int >(0x2)));
  SWIG_Python_SetConstant(d, "GGT_GEOMCOLLECTIONZ_TINZ",SWIG_From_int(static_cast< int >(0x4)));
  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, "OLCFastGetExtent3D",SWIG_FromCharPtr("FastGetExtent3D"));
  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, "OLCAlterGeomFieldDefn",SWIG_FromCharPtr("AlterGeomFieldDefn"));
  SWIG_Python_SetConstant(d, "OLCTransactions",SWIG_FromCharPtr("Transactions"));
  SWIG_Python_SetConstant(d, "OLCDeleteFeature",SWIG_FromCharPtr("DeleteFeature"));
  SWIG_Python_SetConstant(d, "OLCUpsertFeature",SWIG_FromCharPtr("UpsertFeature"));
  SWIG_Python_SetConstant(d, "OLCUpdateFeature",SWIG_FromCharPtr("UpdateFeature"));
  SWIG_Python_SetConstant(d, "OLCFastSetNextByIndex",SWIG_FromCharPtr("FastSetNextByIndex"));
  SWIG_Python_SetConstant(d, "OLCStringsAsUTF8",SWIG_FromCharPtr("StringsAsUTF8"));
  SWIG_Python_SetConstant(d, "OLCIgnoreFields",SWIG_FromCharPtr("IgnoreFields"));
  SWIG_Python_SetConstant(d, "OLCCreateGeomField",SWIG_FromCharPtr("CreateGeomField"));
  SWIG_Python_SetConstant(d, "OLCCurveGeometries",SWIG_FromCharPtr("CurveGeometries"));
  SWIG_Python_SetConstant(d, "OLCMeasuredGeometries",SWIG_FromCharPtr("MeasuredGeometries"));
  SWIG_Python_SetConstant(d, "OLCZGeometries",SWIG_FromCharPtr("ZGeometries"));
  SWIG_Python_SetConstant(d, "OLCRename",SWIG_FromCharPtr("Rename"));
  SWIG_Python_SetConstant(d, "OLCFastGetArrowStream",SWIG_FromCharPtr("FastGetArrowStream"));
  SWIG_Python_SetConstant(d, "OLCFastWriteArrowBatch",SWIG_FromCharPtr("FastWriteArrowBatch"));
  SWIG_Python_SetConstant(d, "ODsCCreateLayer",SWIG_FromCharPtr("CreateLayer"));
  SWIG_Python_SetConstant(d, "ODsCDeleteLayer",SWIG_FromCharPtr("DeleteLayer"));
  SWIG_Python_SetConstant(d, "ODsCCreateGeomFieldAfterCreateLayer",SWIG_FromCharPtr("CreateGeomFieldAfterCreateLayer"));
  SWIG_Python_SetConstant(d, "ODsCCurveGeometries",SWIG_FromCharPtr("CurveGeometries"));
  SWIG_Python_SetConstant(d, "ODsCTransactions",SWIG_FromCharPtr("Transactions"));
  SWIG_Python_SetConstant(d, "ODsCEmulatedTransactions",SWIG_FromCharPtr("EmulatedTransactions"));
  SWIG_Python_SetConstant(d, "ODsCMeasuredGeometries",SWIG_FromCharPtr("MeasuredGeometries"));
  SWIG_Python_SetConstant(d, "ODsCZGeometries",SWIG_FromCharPtr("ZGeometries"));
  SWIG_Python_SetConstant(d, "ODsCRandomLayerRead",SWIG_FromCharPtr("RandomLayerRead"));
  SWIG_Python_SetConstant(d, "ODsCRandomLayerWrite",SWIG_FromCharPtr("RandomLayerWrite "));
  SWIG_Python_SetConstant(d, "ODsCAddFieldDomain",SWIG_FromCharPtr("AddFieldDomain"));
  SWIG_Python_SetConstant(d, "ODsCDeleteFieldDomain",SWIG_FromCharPtr("DeleteFieldDomain"));
  SWIG_Python_SetConstant(d, "ODsCUpdateFieldDomain",SWIG_FromCharPtr("UpdateFieldDomain"));
  SWIG_Python_SetConstant(d, "ODrCCreateDataSource",SWIG_FromCharPtr("CreateDataSource"));
  SWIG_Python_SetConstant(d, "ODrCDeleteDataSource",SWIG_FromCharPtr("DeleteDataSource"));
  SWIG_Python_SetConstant(d, "OLMD_FID64",SWIG_FromCharPtr("OLMD_FID64"));
  SWIG_Python_SetConstant(d, "GEOS_PREC_NO_TOPO",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "GEOS_PREC_KEEP_COLLAPSED",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "OGRERR_NONE",SWIG_From_int(static_cast< int >(0)));
  SWIG_Python_SetConstant(d, "OGRERR_NOT_ENOUGH_DATA",SWIG_From_int(static_cast< int >(1)));
  SWIG_Python_SetConstant(d, "OGRERR_NOT_ENOUGH_MEMORY",SWIG_From_int(static_cast< int >(2)));
  SWIG_Python_SetConstant(d, "OGRERR_UNSUPPORTED_GEOMETRY_TYPE",SWIG_From_int(static_cast< int >(3)));
  SWIG_Python_SetConstant(d, "OGRERR_UNSUPPORTED_OPERATION",SWIG_From_int(static_cast< int >(4)));
  SWIG_Python_SetConstant(d, "OGRERR_CORRUPT_DATA",SWIG_From_int(static_cast< int >(5)));
  SWIG_Python_SetConstant(d, "OGRERR_FAILURE",SWIG_From_int(static_cast< int >(6)));
  SWIG_Python_SetConstant(d, "OGRERR_UNSUPPORTED_SRS",SWIG_From_int(static_cast< int >(7)));
  SWIG_Python_SetConstant(d, "OGRERR_INVALID_HANDLE",SWIG_From_int(static_cast< int >(8)));
  SWIG_Python_SetConstant(d, "OGRERR_NON_EXISTING_FEATURE",SWIG_From_int(static_cast< int >(9)));
  
  
  if ( OGRGetDriverCount() == 0 ) {
    OGRRegisterAll();
  }
  // Will be turned on for GDAL 4.0
  // UseExceptions();
  
  
  
  
  /* Initialize threading */
  SWIG_PYTHON_INITIALIZE_THREADS;
#if PY_VERSION_HEX >= 0x03000000
  return m;
#else
  return;
#endif
}

