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

#define SWIGPERL
#define SWIG_CASTRANK_MODE


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

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

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

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

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

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


/*
   Flags/methods for returning states.

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

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

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

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

   Now you can be more explicit:

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

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

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

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

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

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

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

       int food(double)
       int fooi(int);

   and you call

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

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

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

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

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


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

#ifdef __cplusplus
}
#endif

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



#ifdef __cplusplus
/* Needed on some windows machines---since MS plays funny games with the header files under C++ */
#include <math.h>
#include <stdlib.h>
extern "C" {
#endif
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

/* Add in functionality missing in older versions of Perl. Much of this is based on Devel-PPPort on cpan. */

/* Add PERL_REVISION, PERL_VERSION, PERL_SUBVERSION if missing */
#ifndef PERL_REVISION
#  if !defined(__PATCHLEVEL_H_INCLUDED__) && !(defined(PATCHLEVEL) && defined(SUBVERSION))
#    define PERL_PATCHLEVEL_H_IMPLICIT
#    include <patchlevel.h>
#  endif
#  if !(defined(PERL_VERSION) || (defined(SUBVERSION) && defined(PATCHLEVEL)))
#    include <could_not_find_Perl_patchlevel.h>
#  endif
#  ifndef PERL_REVISION
#    define PERL_REVISION       (5)
#    define PERL_VERSION        PATCHLEVEL
#    define PERL_SUBVERSION     SUBVERSION
#  endif
#endif

#if defined(WIN32) && defined(PERL_OBJECT) && !defined(PerlIO_exportFILE)
#define PerlIO_exportFILE(fh,fl) (FILE*)(fh)
#endif

#ifndef SvIOK_UV
# define SvIOK_UV(sv)       (SvIOK(sv) && (SvUVX(sv) == SvIVX(sv)))
#endif

#ifndef SvUOK
# define SvUOK(sv)           SvIOK_UV(sv)
#endif

#if ((PERL_VERSION < 4) || ((PERL_VERSION == 4) && (PERL_SUBVERSION <= 5)))
#  define PL_sv_undef               sv_undef
#  define PL_na	                    na
#  define PL_errgv                  errgv
#  define PL_sv_no                  sv_no
#  define PL_sv_yes                 sv_yes
#  define PL_markstack_ptr          markstack_ptr
#endif

#ifndef IVSIZE
#  ifdef LONGSIZE
#    define IVSIZE LONGSIZE
#  else
#    define IVSIZE 4 /* A bold guess, but the best we can make. */
#  endif
#endif

#ifndef INT2PTR
#  if (IVSIZE == PTRSIZE) && (UVSIZE == PTRSIZE)
#    define PTRV                  UV
#    define INT2PTR(any,d)        (any)(d)
#  else
#    if PTRSIZE == LONGSIZE
#      define PTRV                unsigned long
#    else
#      define PTRV                unsigned
#    endif
#    define INT2PTR(any,d)        (any)(PTRV)(d)
#  endif

#  define NUM2PTR(any,d)  (any)(PTRV)(d)
#  define PTR2IV(p)       INT2PTR(IV,p)
#  define PTR2UV(p)       INT2PTR(UV,p)
#  define PTR2NV(p)       NUM2PTR(NV,p)

#  if PTRSIZE == LONGSIZE
#    define PTR2ul(p)     (unsigned long)(p)
#  else
#    define PTR2ul(p)     INT2PTR(unsigned long,p)
#  endif
#endif /* !INT2PTR */

#ifndef SvPV_nolen
# define SvPV_nolen(x) SvPV(x,PL_na)
#endif

#ifndef get_sv
#  define get_sv perl_get_sv
#endif

#ifndef ERRSV
#  define ERRSV get_sv("@",FALSE)
#endif

#ifndef pTHX_
#define pTHX_
#endif   

#include <string.h>
#ifdef __cplusplus
}
#endif

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

SWIGINTERN const char*
SWIG_Perl_ErrorType(int code) {
  switch(code) {
  case SWIG_MemoryError:
    return "MemoryError";
  case SWIG_IOError:
    return "IOError";
  case SWIG_RuntimeError:
    return "RuntimeError";
  case SWIG_IndexError:
    return "IndexError";
  case SWIG_TypeError:
    return "TypeError";
  case SWIG_DivisionByZero:
    return "ZeroDivisionError";
  case SWIG_OverflowError:
    return "OverflowError";
  case SWIG_SyntaxError:
    return "SyntaxError";
  case SWIG_ValueError:
    return "ValueError";
  case SWIG_SystemError:
    return "SystemError";
  case SWIG_AttributeError:
    return "AttributeError";
  default:
    return "RuntimeError";
  }
}


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

#ifdef PERL_OBJECT
#define SWIG_PERL_OBJECT_DECL CPerlObj *SWIGUNUSEDPARM(pPerl),
#define SWIG_PERL_OBJECT_CALL pPerl,
#else
#define SWIG_PERL_OBJECT_DECL
#define SWIG_PERL_OBJECT_CALL
#endif

/* Common SWIG API */

/* for raw pointers */
#define SWIG_ConvertPtr(obj, pp, type, flags)           SWIG_Perl_ConvertPtr(SWIG_PERL_OBJECT_CALL obj, pp, type, flags)
#define SWIG_ConvertPtrAndOwn(obj, pp, type, flags,own) SWIG_Perl_ConvertPtrAndOwn(SWIG_PERL_OBJECT_CALL obj, pp, type, flags, own)
#define SWIG_NewPointerObj(p, type, flags)              SWIG_Perl_NewPointerObj(SWIG_PERL_OBJECT_CALL p, type, flags)

/* for raw packed data */
#define SWIG_ConvertPacked(obj, p, s, type)             SWIG_Perl_ConvertPacked(SWIG_PERL_OBJECT_CALL obj, p, s, type)
#define SWIG_NewPackedObj(p, s, type)	                SWIG_Perl_NewPackedObj(SWIG_PERL_OBJECT_CALL p, s, 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_ConvertPtr(obj, pptr, type, 0)
#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_NewPointerObj(ptr, type, 0)

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


/* Runtime API */

#define SWIG_GetModule(clientdata)                      SWIG_Perl_GetModule(clientdata)
#define SWIG_SetModule(clientdata, pointer)             SWIG_Perl_SetModule(pointer)


/* Error manipulation */

#define SWIG_ErrorType(code)                            SWIG_Perl_ErrorType(code)               
#define SWIG_Error(code, msg)            		sv_setpvf(get_sv("@", GV_ADD), "%s %s", SWIG_ErrorType(code), msg)
#define SWIG_fail                        		goto fail						    

/* Perl-specific SWIG API */

#define SWIG_MakePtr(sv, ptr, type, flags)              SWIG_Perl_MakePtr(SWIG_PERL_OBJECT_CALL sv, ptr, type, flags)
#define SWIG_MakePackedObj(sv, p, s, type)	        SWIG_Perl_MakePackedObj(SWIG_PERL_OBJECT_CALL sv, p, s, type)
#define SWIG_SetError(str)                              SWIG_Error(SWIG_RuntimeError, str)


#define SWIG_PERL_DECL_ARGS_1(arg1)                     (SWIG_PERL_OBJECT_DECL arg1)
#define SWIG_PERL_CALL_ARGS_1(arg1)                     (SWIG_PERL_OBJECT_CALL arg1)
#define SWIG_PERL_DECL_ARGS_2(arg1, arg2)               (SWIG_PERL_OBJECT_DECL arg1, arg2)
#define SWIG_PERL_CALL_ARGS_2(arg1, arg2)               (SWIG_PERL_OBJECT_CALL arg1, arg2)

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

/* For backward compatibility only */
#define SWIG_POINTER_EXCEPTION  0

#ifdef __cplusplus
extern "C" {
#endif

#define SWIG_OWNER   SWIG_POINTER_OWN
#define SWIG_SHADOW  SWIG_OWNER << 1

#define SWIG_MAYBE_PERL_OBJECT SWIG_PERL_OBJECT_DECL

/* SWIG Perl macros */

/* Macro to declare an XS function */
#ifndef XSPROTO
#   define XSPROTO(name) void name(pTHX_ CV* cv)
#endif

/* Macro to call an XS function */
#ifdef PERL_OBJECT 
#  define SWIG_CALLXS(_name) _name(cv,pPerl) 
#else 
#  ifndef MULTIPLICITY 
#    define SWIG_CALLXS(_name) _name(cv) 
#  else 
#    define SWIG_CALLXS(_name) _name(PERL_GET_THX, cv) 
#  endif 
#endif 

#ifdef PERL_OBJECT
#define MAGIC_PPERL  CPerlObj *pPerl = (CPerlObj *) this;

#ifdef __cplusplus
extern "C" {
#endif
typedef int (CPerlObj::*SwigMagicFunc)(SV *, MAGIC *);
#ifdef __cplusplus
}
#endif

#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)
#define SWIGCLASS_STATIC

#else /* PERL_OBJECT */

#define MAGIC_PPERL
#define SWIGCLASS_STATIC static SWIGUNUSED

#ifndef MULTIPLICITY
#define SWIG_MAGIC(a,b) (SV *a, MAGIC *b)

#ifdef __cplusplus
extern "C" {
#endif
typedef int (*SwigMagicFunc)(SV *, MAGIC *);
#ifdef __cplusplus
}
#endif

#else /* MULTIPLICITY */

#define SWIG_MAGIC(a,b) (struct interpreter *interp, SV *a, MAGIC *b)

#ifdef __cplusplus
extern "C" {
#endif
typedef int (*SwigMagicFunc)(struct interpreter *, SV *, MAGIC *);
#ifdef __cplusplus
}
#endif

#endif /* MULTIPLICITY */
#endif /* PERL_OBJECT */

#  ifdef PERL_OBJECT
#    define SWIG_croak_null() SWIG_Perl_croak_null(pPerl)
static void SWIG_Perl_croak_null(CPerlObj *pPerl)
#  else
static void SWIG_croak_null()
#  endif
{
  SV *err = get_sv("@", GV_ADD);
#  if (PERL_VERSION < 6)
  croak("%_", err);
#  else
  if (sv_isobject(err))
    croak(0);
  else
    croak("%s", SvPV_nolen(err));
#  endif
}


/* 
   Define how strict is the cast between strings and integers/doubles
   when overloading between these types occurs.
   
   The default is making it as strict as possible by using SWIG_AddCast
   when needed.
   
   You can use -DSWIG_PERL_NO_STRICT_STR2NUM at compilation time to
   disable the SWIG_AddCast, making the casting between string and
   numbers less strict.

   In the end, we try to solve the overloading between strings and
   numerical types in the more natural way, but if you can avoid it,
   well, avoid it using %rename, for example.
*/
#ifndef SWIG_PERL_NO_STRICT_STR2NUM
# ifndef SWIG_PERL_STRICT_STR2NUM
#  define SWIG_PERL_STRICT_STR2NUM
# endif
#endif
#ifdef SWIG_PERL_STRICT_STR2NUM
/* string takes precedence */
#define SWIG_Str2NumCast(x) SWIG_AddCast(x)  
#else
/* number takes precedence */
#define SWIG_Str2NumCast(x) x
#endif



#include <stdlib.h>

SWIGRUNTIME const char *
SWIG_Perl_TypeProxyName(const swig_type_info *type) {
  if (!type) return NULL;
  if (type->clientdata != NULL) {
    return (const char*) type->clientdata;
  } 
  else {
    return type->name;
  }
}

/* Identical to SWIG_TypeCheck, except for strcmp comparison */
SWIGRUNTIME swig_cast_info *
SWIG_TypeProxyCheck(const char *c, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (strcmp(SWIG_Perl_TypeProxyName(iter->type), 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;
}

/* Function for getting a pointer value */

SWIGRUNTIME int
SWIG_Perl_ConvertPtrAndOwn(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags, int *own) {
  swig_cast_info *tc;
  void *voidptr = (void *)0;
  SV *tsv = 0;

  if (own)
    *own = 0;

  /* If magical, apply more magic */
  if (SvGMAGICAL(sv))
    mg_get(sv);

  /* Check to see if this is an object */
  if (sv_isobject(sv)) {
    IV tmp = 0;
    tsv = (SV*) SvRV(sv);
    if ((SvTYPE(tsv) == SVt_PVHV)) {
      MAGIC *mg;
      if (SvMAGICAL(tsv)) {
        mg = mg_find(tsv,'P');
        if (mg) {
          sv = mg->mg_obj;
          if (sv_isobject(sv)) {
	    tsv = (SV*)SvRV(sv);
            tmp = SvIV(tsv);
          }
        }
      } else {
        return SWIG_ERROR;
      }
    } else {
      tmp = SvIV(tsv);
    }
    voidptr = INT2PTR(void *,tmp);
  } else if (! SvOK(sv)) {            /* Check for undef */
    *(ptr) = (void *) 0;
    return SWIG_OK;
  } else if (SvTYPE(sv) == SVt_RV) {  /* Check for NULL pointer */
    if (!SvROK(sv)) {
      /* In Perl 5.12 and later, SVt_RV == SVt_IV, so sv could be a valid integer value.  */
      if (SvIOK(sv)) {
        return SWIG_ERROR;
      } else {
        /* NULL pointer (reference to undef). */
        *(ptr) = (void *) 0;
        return SWIG_OK;
      }
    } else {
      return SWIG_ERROR;
    }
  } else {                            /* Don't know what it is */
    return SWIG_ERROR;
  }
  if (_t) {
    /* Now see if the types match */
    char *_c = HvNAME(SvSTASH(SvRV(sv)));
    tc = SWIG_TypeProxyCheck(_c,_t);
    if (!tc) {
      return SWIG_ERROR;
    }
    {
      int newmemory = 0;
      *ptr = SWIG_TypeCast(tc,voidptr,&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;
      }
    }
  } else {
    *ptr = voidptr;
  }

  /* 
   *  DISOWN implementation: we need a perl guru to check this one.
   */
  if (tsv && (flags & SWIG_POINTER_DISOWN)) {
    /* 
     *  almost copy paste code from below SWIG_POINTER_OWN setting
     */
    SV *obj = sv;
    HV *stash = SvSTASH(SvRV(obj));
    GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
    if (isGV(gv)) {
      HV *hv = GvHVn(gv);
      /*
       * To set ownership (see below), a newSViv(1) entry is added. 
       * Hence, to remove ownership, we delete the entry.
       */
      if (hv_exists_ent(hv, obj, 0)) {
	hv_delete_ent(hv, obj, 0, 0);
      }
    }
  }
  return SWIG_OK;
}

SWIGRUNTIME int
SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void **ptr, swig_type_info *_t, int flags) {
  return SWIG_Perl_ConvertPtrAndOwn(sv, ptr, _t, flags, 0);
}

SWIGRUNTIME void
SWIG_Perl_MakePtr(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, swig_type_info *t, int flags) {
  if (ptr && (flags & (SWIG_SHADOW | SWIG_POINTER_OWN))) {
    SV *self;
    SV *obj=newSV(0);
    HV *hash=newHV();
    HV *stash;
    sv_setref_pv(obj, SWIG_Perl_TypeProxyName(t), ptr);
    stash=SvSTASH(SvRV(obj));
    if (flags & SWIG_POINTER_OWN) {
      HV *hv;
      GV *gv = *(GV**)hv_fetch(stash, "OWNER", 5, TRUE);
      if (!isGV(gv))
        gv_init(gv, stash, "OWNER", 5, FALSE);
      hv=GvHVn(gv);
      hv_store_ent(hv, obj, newSViv(1), 0);
    }
    sv_magic((SV *)hash, (SV *)obj, 'P', Nullch, 0);
    SvREFCNT_dec(obj);
    self=newRV_noinc((SV *)hash);
    sv_setsv(sv, self);
    SvREFCNT_dec((SV *)self);
    sv_bless(sv, stash);
  }
  else {
    sv_setref_pv(sv, SWIG_Perl_TypeProxyName(t), ptr);
  }
}

SWIGRUNTIMEINLINE SV *
SWIG_Perl_NewPointerObj(SWIG_MAYBE_PERL_OBJECT void *ptr, swig_type_info *t, int flags) {
  SV *result = sv_newmortal();
  SWIG_MakePtr(result, ptr, t, flags);
  return result;
}

SWIGRUNTIME void
SWIG_Perl_MakePackedObj(SWIG_MAYBE_PERL_OBJECT SV *sv, void *ptr, int sz, swig_type_info *type) {
  char result[1024];
  char *r = result;
  if ((2*sz + 1 + strlen(SWIG_Perl_TypeProxyName(type))) > 1000) return;
  *(r++) = '_';
  r = SWIG_PackData(r,ptr,sz);
  strcpy(r,SWIG_Perl_TypeProxyName(type));
  sv_setpv(sv, result);
}

SWIGRUNTIME SV *
SWIG_Perl_NewPackedObj(SWIG_MAYBE_PERL_OBJECT void *ptr, int sz, swig_type_info *type) {
  SV *result = sv_newmortal();
  SWIG_Perl_MakePackedObj(result, ptr, sz, type);
  return result;
}

/* Convert a packed value value */
SWIGRUNTIME int
SWIG_Perl_ConvertPacked(SWIG_MAYBE_PERL_OBJECT SV *obj, void *ptr, int sz, swig_type_info *ty) {
  swig_cast_info *tc;
  const char  *c = 0;

  if ((!obj) || (!SvOK(obj))) return SWIG_ERROR;
  c = SvPV_nolen(obj);
  /* Pointer values must start with leading underscore */
  if (*c != '_') return SWIG_ERROR;
  c++;
  c = SWIG_UnpackData(c,ptr,sz);
  if (ty) {
    tc = SWIG_TypeCheck(c,ty);
    if (!tc) return SWIG_ERROR;
  }
  return SWIG_OK;
}


/* Macros for low-level exception handling */
#define SWIG_croak(x)    { SWIG_Error(SWIG_RuntimeError, x); SWIG_fail; }


typedef XSPROTO(SwigPerlWrapper);
typedef SwigPerlWrapper *SwigPerlWrapperPtr;

/* Structure for command table */
typedef struct {
  const char         *name;
  SwigPerlWrapperPtr  wrapper;
} swig_command_info;

/* Information for constant table */

#define SWIG_INT     1
#define SWIG_FLOAT   2
#define SWIG_STRING  3
#define SWIG_POINTER 4
#define SWIG_BINARY  5

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


/* Structure for variable table */
typedef struct {
  const char   *name;
  SwigMagicFunc   set;
  SwigMagicFunc   get;
  swig_type_info  **type;
} swig_variable_info;

/* Magic variable code */
#ifndef PERL_OBJECT
# ifdef __cplusplus
#  define swig_create_magic(s,a,b,c) _swig_create_magic(s,const_cast<char*>(a),b,c)
# else
#  define swig_create_magic(s,a,b,c) _swig_create_magic(s,(char*)(a),b,c)
# endif
# ifndef MULTIPLICITY
SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(SV *, MAGIC *), int (*get)(SV *,MAGIC *)) 
# else
SWIGRUNTIME void _swig_create_magic(SV *sv, char *name, int (*set)(struct interpreter*, SV *, MAGIC *), int (*get)(struct interpreter*, SV *,MAGIC *)) 
# endif
#else
#  define swig_create_magic(s,a,b,c) _swig_create_magic(pPerl,s,a,b,c)
SWIGRUNTIME void _swig_create_magic(CPerlObj *pPerl, SV *sv, const char *name, int (CPerlObj::*set)(SV *, MAGIC *), int (CPerlObj::*get)(SV *, MAGIC *)) 
#endif
{
  MAGIC *mg;
  sv_magic(sv,sv,'U',name,strlen(name));
  mg = mg_find(sv,'U');
  mg->mg_virtual = (MGVTBL *) malloc(sizeof(MGVTBL));
  mg->mg_virtual->svt_get = (SwigMagicFunc) get;
  mg->mg_virtual->svt_set = (SwigMagicFunc) set;
  mg->mg_virtual->svt_len = 0;
  mg->mg_virtual->svt_clear = 0;
  mg->mg_virtual->svt_free = 0;
}


SWIGRUNTIME swig_module_info *
SWIG_Perl_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
  static void *type_pointer = (void *)0;
  SV *pointer;

  /* first check if pointer already created */
  if (!type_pointer) {
    pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, FALSE | GV_ADDMULTI);
    if (pointer && SvOK(pointer)) {
      type_pointer = INT2PTR(swig_type_info **, SvIV(pointer));
    }
  }

  return (swig_module_info *) type_pointer;
}

SWIGRUNTIME void
SWIG_Perl_SetModule(swig_module_info *module) {
  SV *pointer;

  /* create a new pointer */
  pointer = get_sv("swig_runtime_data::type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, TRUE | GV_ADDMULTI);
  sv_setiv(pointer, PTR2IV(module));
}

#ifdef __cplusplus
}
#endif

/* Workaround perl5 global namespace pollution. Note that undefining library
 * functions like fopen will not solve the problem on all platforms as fopen
 * might be a macro on Windows but not necessarily on other operating systems. */
#ifdef do_open
  #undef do_open
#endif
#ifdef do_close
  #undef do_close
#endif
#ifdef do_exec
  #undef do_exec
#endif
#ifdef scalar
  #undef scalar
#endif
#ifdef list
  #undef list
#endif
#ifdef apply
  #undef apply
#endif
#ifdef convert
  #undef convert
#endif
#ifdef Error
  #undef Error
#endif
#ifdef form
  #undef form
#endif
#ifdef vform
  #undef vform
#endif
#ifdef LABEL
  #undef LABEL
#endif
#ifdef METHOD
  #undef METHOD
#endif
#ifdef Move
  #undef Move
#endif
#ifdef yylex
  #undef yylex
#endif
#ifdef yyparse
  #undef yyparse
#endif
#ifdef yyerror
  #undef yyerror
#endif
#ifdef invert
  #undef invert
#endif
#ifdef ref
  #undef ref
#endif
#ifdef read
  #undef read
#endif
#ifdef write
  #undef write
#endif
#ifdef eof
  #undef eof
#endif
#ifdef close
  #undef close
#endif
#ifdef rewind
  #undef rewind
#endif
#ifdef free
  #undef free
#endif
#ifdef malloc
  #undef malloc
#endif
#ifdef calloc
  #undef calloc
#endif
#ifdef Stat
  #undef Stat
#endif
#ifdef check
  #undef check
#endif
#ifdef seekdir
  #undef seekdir
#endif
#ifdef open
  #undef open
#endif
#ifdef readdir
  #undef readdir
#endif
#ifdef bind
  #undef bind
#endif
#ifdef access
  #undef access
#endif
#ifdef stat
  #undef stat
#endif

#ifdef bool
  /* Leave if macro is from C99 stdbool.h */
  #ifndef __bool_true_false_are_defined
    #undef bool
  #endif
#endif




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

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



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


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

#define SWIGTYPE_p_GDALMajorObjectShadow swig_types[0]
#define SWIGTYPE_p_GDALProgressFunc swig_types[1]
#define SWIGTYPE_p_GIntBig swig_types[2]
#define SWIGTYPE_p_OGRFeatureDefnShadow swig_types[3]
#define SWIGTYPE_p_OGRFeatureShadow swig_types[4]
#define SWIGTYPE_p_OGRFieldDefnShadow swig_types[5]
#define SWIGTYPE_p_OGRGeomFieldDefnShadow swig_types[6]
#define SWIGTYPE_p_OGRGeometryShadow swig_types[7]
#define SWIGTYPE_p_OGRLayerShadow swig_types[8]
#define SWIGTYPE_p_OGRStyleTableShadow swig_types[9]
#define SWIGTYPE_p_OSRCoordinateTransformationShadow swig_types[10]
#define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[11]
#define SWIGTYPE_p_char swig_types[12]
#define SWIGTYPE_p_double swig_types[13]
#define SWIGTYPE_p_f_double_p_q_const__char_p_void__int swig_types[14]
#define SWIGTYPE_p_float swig_types[15]
#define SWIGTYPE_p_int swig_types[16]
#define SWIGTYPE_p_p_GIntBig swig_types[17]
#define SWIGTYPE_p_p_char swig_types[18]
#define SWIGTYPE_p_p_double swig_types[19]
#define SWIGTYPE_p_p_int swig_types[20]
#define SWIGTYPE_p_p_p_char swig_types[21]
static swig_type_info *swig_types[23];
static swig_module_info swig_module = {swig_types, 22, 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) -------- */

#define SWIG_init    boot_Geo__OGR

#define SWIG_name   "Geo::OGRc::boot_Geo__OGR"
#define SWIG_prefix "Geo::OGRc::"

#define SWIGVERSION 0x020012 
#define SWIG_VERSION SWIGVERSION


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


#include <stdexcept>


#ifdef __cplusplus
extern "C"
#endif
#ifndef PERL_OBJECT
#ifndef MULTIPLICITY
SWIGEXPORT void SWIG_init (CV* cv);
#else
SWIGEXPORT void SWIG_init (pTHXo_ CV* cv);
#endif
#else
SWIGEXPORT void SWIG_init (CV *cv, CPerlObj *);
#endif


typedef char retStringAndCPLFree;


#include <iostream>
using namespace std;

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

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

typedef void GDALMajorObjectShadow;

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


SWIGINTERNINLINE SV *
SWIG_From_long  SWIG_PERL_DECL_ARGS_1(long value)
{
  SV *sv;
  if (value >= IV_MIN && value <= IV_MAX)
    sv = newSViv(value);
  else
    sv = newSVpvf("%ld", value);
  return sv_2mortal(sv);
}


SWIGINTERNINLINE SV *
SWIG_From_int  SWIG_PERL_DECL_ARGS_1(int value)
{    
  return SWIG_From_long  SWIG_PERL_CALL_ARGS_1(value);
}


SWIGINTERNINLINE SV *
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
{
  SV *obj = sv_newmortal();
  if (carray) {
    sv_setpvn(obj, carray, size);
  } else {
    sv_setsv(obj, &PL_sv_undef);
  }
  return obj;
}


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


    #ifndef SWIG
    typedef struct
    {
        SV *fct;
        SV *data;
    } SavedEnv;
    #endif
    int callback_d_cp_vp(double d, const char *cp, void *vp)
    {
        int count, ret;
        SavedEnv *env_ptr = (SavedEnv *)vp;
        dSP;
        ENTER;
        SAVETMPS;
        PUSHMARK(SP);
        XPUSHs(sv_2mortal(newSVnv(d)));
        XPUSHs(sv_2mortal(newSVpv(cp, 0)));
        if (env_ptr->data)
            XPUSHs(env_ptr->data);
        PUTBACK;
        count = call_sv(env_ptr->fct, G_SCALAR);
        SPAGAIN;
        if (count != 1) {
            fprintf(stderr, "The callback must return only one value.\n");
            return 0; /* interrupt */
        }
        ret = POPi;
        PUTBACK;
        FREETMPS;
        LEAVE;
        return ret;
    }
    #ifndef SWIG
    static SV *VSIStdoutSetRedirectionFct = &PL_sv_undef;
    #endif
    size_t callback_fwrite(const void *ptr, size_t size, size_t nmemb,
                           FILE *stream)
    {
        dSP;
        ENTER;
        SAVETMPS;
        PUSHMARK(SP);
        XPUSHs(sv_2mortal(newSVpv((const char*)ptr, size*nmemb)));
        PUTBACK;
        call_sv(VSIStdoutSetRedirectionFct, G_DISCARD);
        FREETMPS;
        LEAVE;
        return size*nmemb;
    }


    void do_confess(const char *error, int push_to_error_stack) {
        SV *sv = newSVpv(error, 0);
        if (push_to_error_stack) {
            AV* error_stack = get_av("Geo::GDAL::error", 0);
            av_push(error_stack, sv);
        } else {
            sv = sv_2mortal(sv);
        }
        dSP;
        ENTER;
        SAVETMPS;
        PUSHMARK(SP);
        XPUSHs( sv );
        PUTBACK;
        call_pv("Carp::confess", G_DISCARD);
        /*
        confess never returns, so these will not get executed:
        FREETMPS;
        LEAVE;
        */
    }
    #define OUT_OF_MEMORY "Out of memory."
    #define CALL_FAILED "Call failed. Possible reason is an index out of range, mathematical problem, or something else."
    #define NEED_DEF "A parameter which must be defined or not empty, is not."
    #define WRONG_CLASS "Object has a wrong class."
    #define NEED_REF "A parameter which must be a reference, is not."
    #define NEED_ARRAY_REF "A parameter/item which must be an array reference, is not."
    #define NEED_BINARY_DATA "A parameter which must be binary data, is not."
    #define NEED_CODE_REF "A parameter which must be an anonymous subroutine, is not."
    #define WRONG_ITEM_IN_ARRAY "An item in an array parameter has wrong type."
    #define ARRAY_TO_XML_FAILED "An array parameter cannot be converted to an XMLTree."


void VeryQuietErrorHandler(CPLErr eclass, int code, const char *msg ) {
  /* 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 defined(SWIGPERL)
    AV* error_stack = get_av("Geo::GDAL::error", 0);
    SV *error = newSVpv(msg, 0);
    av_push(error_stack, error);
#endif
  if (eclass == CE_Fatal ) {
    CPLDefaultErrorHandler(eclass, code, msg );
  }
}


void UseExceptions() {
  CPLSetErrorHandler( (CPLErrorHandler) VeryQuietErrorHandler );
}

void DontUseExceptions() {
  CPLSetErrorHandler( CPLDefaultErrorHandler );
}

SWIGINTERN OGRStyleTableShadow *new_OGRStyleTableShadow(){
        return (OGRStyleTableShadow*) OGR_STBL_Create();
   }
SWIGINTERN void delete_OGRStyleTableShadow(OGRStyleTableShadow *self){
        OGR_STBL_Destroy( (OGRStyleTableH) self );
   }

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


SWIGINTERN int
SWIG_AsCharPtrAndSize(SV *obj, char** cptr, size_t* psize, int *alloc)
{
  if (SvMAGICAL(obj)) {
     SV *tmp = sv_newmortal();
     SvSetSV(tmp, obj);
     obj = tmp;
  }
  if (SvPOK(obj)) {
    STRLEN len = 0;
    char *cstr = SvPV(obj, len); 
    size_t size = len + 1;
    if (cptr)  {
      if (alloc) {
	if (*alloc == SWIG_NEWOBJ) {
	  *cptr = reinterpret_cast< char* >(memcpy((new char[size]), cstr, sizeof(char)*(size)));
	} else {
	  *cptr = cstr;
	  *alloc = SWIG_OLDOBJ;
	}
      }
    }
    if (psize) *psize = size;
    return SWIG_OK;
  } else {
    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    if (pchar_descriptor) {
      char* vptr = 0; 
      if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) {
	if (cptr) *cptr = vptr;
	if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0;
	if (alloc) *alloc = SWIG_OLDOBJ;
	return SWIG_OK;
      }
    }
  }
  return SWIG_TypeError;
}




SWIGINTERN int OGRStyleTableShadow_AddStyle(OGRStyleTableShadow *self,char const *pszName,char const *pszStyleString){
        return OGR_STBL_AddStyle( (OGRStyleTableH) self, pszName, pszStyleString);
   }

    char *sv_to_utf8_string(SV *sv, U8 **tmpbuf) {
        /* if tmpbuf, only tmpbuf is freed; if not, ret is freed*/
        char *ret;
        if (SvOK(sv)) {
            STRLEN len;
            ret = SvPV(sv, len);
            if (!SvUTF8(sv)) {
                if (tmpbuf) {
                    *tmpbuf = bytes_to_utf8((const U8*)ret, &len);
                    ret = (char *)(*tmpbuf);
                } else {
                    ret = (char *)bytes_to_utf8((const U8*)ret, &len);
                }
            } else {
                if (!tmpbuf)
                    ret = strdup(ret);
            }
        } else {
            ret = (char*)""; /* avoid "Use of uninitialized value in subroutine entry" errors */
            if (!tmpbuf)
                ret = strdup(ret);
        }
        return ret;
    }
    
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 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 int
SWIG_AsVal_double SWIG_PERL_DECL_ARGS_2(SV *obj, double *val)
{
  if (SvNIOK(obj)) {
    if (val) *val = SvNV(obj);
    return SWIG_OK;
  } else if (SvIOK(obj)) {
    if (val) *val = (double) SvIV(obj);
    return SWIG_AddCast(SWIG_OK);
  } else {
    const char *nptr = SvPV_nolen(obj);
    if (nptr) {
      char *endptr;
      double v;
      errno = 0;
      v = strtod(nptr, &endptr);
      if (errno == ERANGE) {
	errno = 0;
	return SWIG_OverflowError;
      } else {
	if (*endptr == '\0') {
	  if (val) *val = v;
	  return SWIG_Str2NumCast(SWIG_OK);
	}
      }
    }
  }
  return SWIG_TypeError;
}

SWIGINTERN void OGRLayerShadow_SetSpatialFilterRect__SWIG_0(OGRLayerShadow *self,double minx,double miny,double maxx,double maxy){
    OGR_L_SetSpatialFilterRect(self, minx, miny, maxx, maxy);
  }

#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


#include <float.h>


#include <math.h>


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


SWIGINTERN int
SWIG_AsVal_long SWIG_PERL_DECL_ARGS_2(SV *obj, long* val)
{
  if (SvUOK(obj)) {
    UV v = SvUV(obj);
    if (v <= LONG_MAX) {
      if (val) *val = v;
      return SWIG_OK;
    }
    return SWIG_OverflowError;
  } else if (SvIOK(obj)) {
    IV v = SvIV(obj);
    if (v >= LONG_MIN && v <= LONG_MAX) {
      if(val) *val = v;
      return SWIG_OK;
    }
    return SWIG_OverflowError;
  } else {
    int dispatch = 0;
    const char *nptr = SvPV_nolen(obj);
    if (nptr) {
      char *endptr;
      long v;
      errno = 0;
      v = strtol(nptr, &endptr,0);
      if (errno == ERANGE) {
	errno = 0;
	return SWIG_OverflowError;
      } else {
	if (*endptr == '\0') {
	  if (val) *val = v;
	  return SWIG_Str2NumCast(SWIG_OK);
	}
      }
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(obj,&d));
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
	if (val) *val = (long)(d);
	return res;
      }
    }
  }
  return SWIG_TypeError;
}


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

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


#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 void OGRLayerShadow_ResetReading(OGRLayerShadow *self){
    OGR_L_ResetReading(self);
  }
SWIGINTERN char const *OGRLayerShadow_GetName(OGRLayerShadow *self){
    return OGR_L_GetName(self);
  }
SWIGINTERN OGRwkbGeometryType OGRLayerShadow_GetGeomType(OGRLayerShadow *self){
    return (OGRwkbGeometryType) OGR_L_GetGeomType(self);
  }
SWIGINTERN char const *OGRLayerShadow_GetGeometryColumn(OGRLayerShadow *self){
    return OGR_L_GetGeometryColumn(self);
  }
SWIGINTERN char const *OGRLayerShadow_GetFIDColumn(OGRLayerShadow *self){
    return OGR_L_GetFIDColumn(self);
  }
SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetFeature(OGRLayerShadow *self,GIntBig fid){
    return (OGRFeatureShadow*) OGR_L_GetFeature(self, fid);
  }
SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetNextFeature(OGRLayerShadow *self){
    return (OGRFeatureShadow*) OGR_L_GetNextFeature(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetNextByIndex(OGRLayerShadow *self,GIntBig new_index){
    return OGR_L_SetNextByIndex(self, new_index);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
    return OGR_L_SetFeature(self, feature);
  }
SWIGINTERN OGRErr OGRLayerShadow_CreateFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
    return OGR_L_CreateFeature(self, feature);
  }
SWIGINTERN OGRErr OGRLayerShadow_DeleteFeature(OGRLayerShadow *self,GIntBig fid){
    return OGR_L_DeleteFeature(self, fid);
  }
SWIGINTERN OGRErr OGRLayerShadow_SyncToDisk(OGRLayerShadow *self){
    return OGR_L_SyncToDisk(self);
  }
SWIGINTERN OGRFeatureDefnShadow *OGRLayerShadow_GetLayerDefn(OGRLayerShadow *self){
    return (OGRFeatureDefnShadow*) OGR_L_GetLayerDefn(self);
  }
SWIGINTERN GIntBig OGRLayerShadow_GetFeatureCount(OGRLayerShadow *self,int force=1){
    return OGR_L_GetFeatureCount(self, force);
  }

    static SV *
        CreateArrayFromDoubleArray( double *first, unsigned int size ) {
        AV *av = (AV*)sv_2mortal((SV*)newAV());
        for( unsigned int i=0; i<size; i++ ) {
            av_store(av,i,newSVnv(*first));
            ++first;
        }
        return sv_2mortal(newRV((SV*)av));
    }
    
SWIGINTERN OGRErr OGRLayerShadow_GetExtent(OGRLayerShadow *self,double argout[4],int force=1){



    return OGR_L_GetExtent(self, (OGREnvelope*)argout, force);
  }
SWIGINTERN bool OGRLayerShadow_TestCapability(OGRLayerShadow *self,char const *cap){
    return (OGR_L_TestCapability(self, cap) > 0);
  }

SWIGINTERNINLINE SV *
SWIG_From_bool  SWIG_PERL_DECL_ARGS_1(bool value)
{
  return boolSV(value);
}

SWIGINTERN OGRErr OGRLayerShadow_CreateField(OGRLayerShadow *self,OGRFieldDefnShadow *field_def,int approx_ok=1){
    return OGR_L_CreateField(self, field_def, approx_ok);
  }
SWIGINTERN OGRErr OGRLayerShadow_DeleteField(OGRLayerShadow *self,int iField){
    return OGR_L_DeleteField(self, iField);
  }
SWIGINTERN OGRErr OGRLayerShadow_ReorderField(OGRLayerShadow *self,int iOldFieldPos,int iNewFieldPos){
    return OGR_L_ReorderField(self, iOldFieldPos, iNewFieldPos);
  }
SWIGINTERN OGRErr OGRLayerShadow_ReorderFields(OGRLayerShadow *self,int nList,int *pList){
    if (nList != OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)))
    {
      CPLError(CE_Failure, CPLE_IllegalArg,
               "List should have %d elements",
               OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)));
      return OGRERR_FAILURE;
    }
    return OGR_L_ReorderFields(self, pList);
  }
SWIGINTERN OGRErr OGRLayerShadow_AlterFieldDefn(OGRLayerShadow *self,int iField,OGRFieldDefnShadow *field_def,int nFlags){
    return OGR_L_AlterFieldDefn(self, iField, field_def, nFlags);
  }
SWIGINTERN OGRErr OGRLayerShadow_CreateGeomField(OGRLayerShadow *self,OGRGeomFieldDefnShadow *field_def,int approx_ok=1){
    return OGR_L_CreateGeomField(self, field_def, approx_ok);
  }
SWIGINTERN OGRErr OGRLayerShadow_StartTransaction(OGRLayerShadow *self){
    return OGR_L_StartTransaction(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_CommitTransaction(OGRLayerShadow *self){
    return OGR_L_CommitTransaction(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_RollbackTransaction(OGRLayerShadow *self){
    return OGR_L_RollbackTransaction(self);
  }
SWIGINTERN int OGRLayerShadow_FindFieldIndex(OGRLayerShadow *self,char const *pszFieldName,int bExactMatch){
    return OGR_L_FindFieldIndex(self, pszFieldName, bExactMatch );
  }
SWIGINTERN OSRSpatialReferenceShadow *OGRLayerShadow_GetSpatialRef(OGRLayerShadow *self){
    OGRSpatialReferenceH ref =  OGR_L_GetSpatialRef(self);
    if( ref )
        OSRReference(ref);
    return (OSRSpatialReferenceShadow*) ref;
  }
SWIGINTERN GIntBig OGRLayerShadow_GetFeaturesRead(OGRLayerShadow *self){
    return OGR_L_GetFeaturesRead(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetIgnoredFields(OGRLayerShadow *self,char const **options){
    return OGR_L_SetIgnoredFields( self, options );
  }
SWIGINTERN OGRErr OGRLayerShadow_Intersection(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Intersection( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Union(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Union( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_SymDifference(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_SymDifference( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Identity(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Identity( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Update(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Update( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Clip(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Clip( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Erase(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Erase( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRStyleTableShadow *OGRLayerShadow_GetStyleTable(OGRLayerShadow *self){
    return (OGRStyleTableShadow*) OGR_L_GetStyleTable(self);
  }
SWIGINTERN void OGRLayerShadow_SetStyleTable(OGRLayerShadow *self,OGRStyleTableShadow *table){
    if( table != NULL )
        OGR_L_SetStyleTable(self, (OGRStyleTableH) table);
  }
SWIGINTERN void delete_OGRFeatureShadow(OGRFeatureShadow *self){
    OGR_F_Destroy(self);
  }
SWIGINTERN OGRFeatureShadow *new_OGRFeatureShadow(OGRFeatureDefnShadow *feature_def){
      return (OGRFeatureShadow*) OGR_F_Create( feature_def );
  }
SWIGINTERN OGRFeatureDefnShadow *OGRFeatureShadow_GetDefnRef(OGRFeatureShadow *self){
    return (OGRFeatureDefnShadow*) OGR_F_GetDefnRef(self);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeometry(OGRFeatureShadow *self,OGRGeometryShadow *geom){
    return OGR_F_SetGeometry(self, geom);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeometryDirectly(OGRFeatureShadow *self,OGRGeometryShadow *geom){
    return OGR_F_SetGeometryDirectly(self, geom);
  }
SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeometryRef(OGRFeatureShadow *self){
    return (OGRGeometryShadow*) OGR_F_GetGeometryRef(self);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeomField__SWIG_0(OGRFeatureShadow *self,int iField,OGRGeometryShadow *geom){
    return OGR_F_SetGeomField(self, iField, geom);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeomField__SWIG_1(OGRFeatureShadow *self,char const *name,OGRGeometryShadow *geom){
      int iField = OGR_F_GetGeomFieldIndex(self, name);
      if (iField == -1)
      {
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
          return OGRERR_FAILURE;
      }
      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 *name,OGRGeometryShadow *geom){
      int iField = OGR_F_GetGeomFieldIndex(self, name);
      if (iField == -1)
      {
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
          return OGRERR_FAILURE;
      }
      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 *name){
      int i = OGR_F_GetGeomFieldIndex(self, name);
      if (i == -1)
      {
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, 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 *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, 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 *name){
      int i = OGR_F_GetGeomFieldIndex(self, name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
          return (OGRGeomFieldDefnShadow *) OGR_F_GetGeomFieldDefnRef(self, i);
      return NULL;
  }
SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_0(OGRFeatureShadow *self,int id){
    return (const char *) OGR_F_GetFieldAsString(self, id);
  }
SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_1(OGRFeatureShadow *self,char const *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
	  return (const char *) OGR_F_GetFieldAsString(self, i);
      return NULL;
  }
SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_0(OGRFeatureShadow *self,int id){
    return OGR_F_GetFieldAsInteger(self, id);
  }
SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_1(OGRFeatureShadow *self,char const *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, 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 *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, 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);
  }

SWIGINTERNINLINE SV *
SWIG_From_double  SWIG_PERL_DECL_ARGS_1(double value)
{
  return sv_2mortal(newSVnv(value));
}

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

SWIGINTERNINLINE SV *
SWIG_From_float  SWIG_PERL_DECL_ARGS_1(float value)
{    
  return SWIG_From_double  SWIG_PERL_CALL_ARGS_1(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 *name,int *pnYear,int *pnMonth,int *pnDay,int *pnHour,int *pnMinute,float *pfSecond,int *pnTZFlag){
      int id = OGR_F_GetFieldIndex(self, name);
      if (id == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
	  OGR_F_GetFieldAsDateTimeEx(self, id, pnYear, pnMonth, pnDay,
			       pnHour, pnMinute, pfSecond,
			       pnTZFlag);
  }

    static SV *
        CreateArrayFromIntArray( int *first, unsigned int size ) {
        AV *av = (AV*)sv_2mortal((SV*)newAV());
        for( unsigned int i=0; i<size; i++ ) {
            av_store(av,i,newSViv(*first));
            ++first;
        }
        return sv_2mortal(newRV((SV*)av));
    }
    
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 *name,int *nLen,int const **pList){
      int id = OGR_F_GetFieldIndex(self, name);
      if (id == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
          *pList = OGR_F_GetFieldAsIntegerList(self, id, nLen);
  }

#define LENGTH_OF_GIntBig_AS_STRING 30
    static SV *
        CreateArrayFromGIntBigArray( GIntBig *first, unsigned int size ) {
        AV *av = (AV*)sv_2mortal((SV*)newAV());
        for( unsigned int i=0; i<size; i++ ) {
            char s[LENGTH_OF_GIntBig_AS_STRING];
            snprintf(s, LENGTH_OF_GIntBig_AS_STRING-1, CPL_FRMT_GIB, *first);
            av_store(av,i,newSVpv(s, 0));
            ++first;
        }
        return sv_2mortal(newRV((SV*)av));
    }
    
SWIGINTERN void OGRFeatureShadow_GetFieldAsInteger64List__SWIG_0(OGRFeatureShadow *self,int id,int *nLen,GIntBig const **pList){
      *pList = OGR_F_GetFieldAsInteger64List(self, id, nLen);
  }
SWIGINTERN void OGRFeatureShadow_GetFieldAsInteger64List__SWIG_1(OGRFeatureShadow *self,char const *name,int *nLen,GIntBig const **pList){
      int id = OGR_F_GetFieldIndex(self, name);
      if (id == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
          *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 *name,int *nLen,double const **pList){
      int id = OGR_F_GetFieldIndex(self, name);
      if (id == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
          *pList = OGR_F_GetFieldAsDoubleList(self, id, nLen);
  }

    static SV *
        CreateArrayFromStringArray( char **first ) {
        AV *av = (AV*)sv_2mortal((SV*)newAV());
        for( unsigned int i = 0; *first != NULL; i++ ) {
            SV *sv = newSVpv(*first, strlen(*first));
            SvUTF8_on(sv); /* expecting UTF-8 from GDAL */
            av_store(av,i,sv);
            ++first;
        }
        return sv_2mortal(newRV((SV*)av));
    }
    
SWIGINTERN void OGRFeatureShadow_GetFieldAsStringList__SWIG_0(OGRFeatureShadow *self,int id,char ***pList){
      *pList = OGR_F_GetFieldAsStringList(self, id);
  }
SWIGINTERN void OGRFeatureShadow_GetFieldAsStringList__SWIG_1(OGRFeatureShadow *self,char const *name,char ***pList){
      int id = OGR_F_GetFieldIndex(self, name);
      if (id == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
          *pList = OGR_F_GetFieldAsStringList(self, id);
  }
SWIGINTERN OGRErr OGRFeatureShadow_GetFieldAsBinary__SWIG_0(OGRFeatureShadow *self,int id,int *nLen,char **pBuf){
    GByte* pabyBlob = OGR_F_GetFieldAsBinary(self, id, nLen);
    *pBuf = (char*)malloc(*nLen);
    memcpy(*pBuf, pabyBlob, *nLen);
    return OGRERR_NONE;
  }
SWIGINTERN OGRErr OGRFeatureShadow_GetFieldAsBinary__SWIG_1(OGRFeatureShadow *self,char const *name,int *nLen,char **pBuf){
      int id = OGR_F_GetFieldIndex(self, name);
      if (id == -1)
      {
        CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
        return OGRERR_FAILURE;
      }
      else
      {
        GByte* pabyBlob = OGR_F_GetFieldAsBinary(self, id, nLen);
        *pBuf = (char*)malloc(*nLen);
        memcpy(*pBuf, pabyBlob, *nLen);
        return OGRERR_NONE;
      }
  }
SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_0(OGRFeatureShadow *self,int id){
    return (OGR_F_IsFieldSet(self, id) > 0);
  }
SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_1(OGRFeatureShadow *self,char const *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
	  return (OGR_F_IsFieldSet(self, i) > 0);
      return false;
  }
SWIGINTERN int OGRFeatureShadow_GetFieldIndex__SWIG_0(OGRFeatureShadow *self,int i){
      if (i < 0 || i >= OGR_F_GetFieldCount(self))
          CPLError(CE_Failure, 1, FIELD_INDEX_ERROR_TMPL, i);
      return i;
  }
SWIGINTERN int OGRFeatureShadow_GetFieldIndex__SWIG_1(OGRFeatureShadow *self,char const *name){
      // Perl bindings let Swig handle overloaded methods. Thus they need to behave similarly.
      int i = OGR_F_GetFieldIndex(self, name);
      if (i < 0)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      return i;
  }
SWIGINTERN int OGRFeatureShadow_GetGeomFieldIndex__SWIG_0(OGRFeatureShadow *self,int i){
      if (i < 0 || i >= OGR_F_GetGeomFieldCount(self))
          CPLError(CE_Failure, 1, FIELD_INDEX_ERROR_TMPL, i);
      return i;
  }
SWIGINTERN int OGRFeatureShadow_GetGeomFieldIndex__SWIG_1(OGRFeatureShadow *self,char const *name){
      // Perl bindings let Swig handle overloaded methods. Thus they need to behave similarly.
      int i = OGR_F_GetGeomFieldIndex(self, name);
      if (i < 0)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      return i;
  }
SWIGINTERN GIntBig OGRFeatureShadow_GetFID(OGRFeatureShadow *self){
    return OGR_F_GetFID(self);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetFID(OGRFeatureShadow *self,GIntBig fid){
    return OGR_F_SetFID(self, fid);
  }
SWIGINTERN void OGRFeatureShadow_DumpReadable(OGRFeatureShadow *self){
    OGR_F_DumpReadable(self, NULL);
  }
SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_0(OGRFeatureShadow *self,int id){
    OGR_F_UnsetField(self, id);
  }
SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_1(OGRFeatureShadow *self,char const *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
          OGR_F_UnsetField(self, i);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_0(OGRFeatureShadow *self,int id,char const *value){
    OGR_F_SetFieldString(self, id, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_1(OGRFeatureShadow *self,char const *name,char const *value){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, 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,int value){
    OGR_F_SetFieldInteger(self, id, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_3(OGRFeatureShadow *self,char const *name,int value){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
	  OGR_F_SetFieldInteger(self, i, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_4(OGRFeatureShadow *self,int id,double value){
    OGR_F_SetFieldDouble(self, id, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_5(OGRFeatureShadow *self,char const *name,double value){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
	  OGR_F_SetFieldDouble(self, i, value);
  }

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


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


SWIGINTERN int
SWIG_AsVal_float SWIG_PERL_DECL_ARGS_2(SV * obj, float *val)
{
  double v;
  int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(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_6(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_7(OGRFeatureShadow *self,char const *name,int year,int month,int day,int hour,int minute,float second,int tzflag){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
	  OGR_F_SetFieldDateTimeEx(self, i, year, month, day,
				 hour, minute, second,
				 tzflag);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldIntegerList__SWIG_0(OGRFeatureShadow *self,int id,int nList,int *pList){
      OGR_F_SetFieldIntegerList(self, id, nList, pList);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldIntegerList__SWIG_1(OGRFeatureShadow *self,char const *name,int nList,int *pList){
      int id = OGR_F_GetFieldIndex(self, name);
      if (id == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
       	  OGR_F_SetFieldIntegerList(self, id, nList, pList);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldInteger64List__SWIG_0(OGRFeatureShadow *self,int id,int nList,GIntBig *pList){
      OGR_F_SetFieldInteger64List(self, id, nList, pList);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldInteger64List__SWIG_1(OGRFeatureShadow *self,char const *name,int nList,GIntBig *pList){
      int id = OGR_F_GetFieldIndex(self, name);
      if (id == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
          OGR_F_SetFieldInteger64List(self, id, nList, pList);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldDoubleList__SWIG_0(OGRFeatureShadow *self,int id,int nList,double *pList){
      OGR_F_SetFieldDoubleList(self, id, nList, pList);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldDoubleList__SWIG_1(OGRFeatureShadow *self,char const *name,int nList,double *pList){
      int id = OGR_F_GetFieldIndex(self, name);
      if (id == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
          OGR_F_SetFieldDoubleList(self, id, nList, pList);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldStringList__SWIG_0(OGRFeatureShadow *self,int id,char **pList){
      OGR_F_SetFieldStringList(self, id, pList);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldStringList__SWIG_1(OGRFeatureShadow *self,char const *name,char **pList){
      int id = OGR_F_GetFieldIndex(self, name);
      if (id == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
          OGR_F_SetFieldStringList(self, id, pList);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldBinary__SWIG_0(OGRFeatureShadow *self,int i,int nBytes,GByte *pabyBuf){
      OGR_F_SetFieldBinary(self, i, nBytes, pabyBuf);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldBinary__SWIG_1(OGRFeatureShadow *self,char const *name,int nBytes,GByte *pabyBuf){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
          OGR_F_SetFieldBinary(self, i, nBytes, pabyBuf);
  }
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 *name,char const *pszValue){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, 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 OGRERR_FAILURE;
    }
    return OGR_F_SetFromWithMap(self, other, forgiving, pList);
  }
SWIGINTERN char const *OGRFeatureShadow_GetStyleString(OGRFeatureShadow *self){
    return (const char*) OGR_F_GetStyleString(self);
  }
SWIGINTERN void OGRFeatureShadow_SetStyleString(OGRFeatureShadow *self,char const *the_string){
    OGR_F_SetStyleString(self, the_string);
  }
SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_0(OGRFeatureShadow *self,int id){
      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 *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1) {
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, 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);
  }

    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 wkbNone:
            /*case wkbLinearRing:*/
            case wkbCircularStringZ:
            case wkbCompoundCurveZ:
            case wkbCurvePolygonZ:
            case wkbMultiCurveZ:
            case wkbMultiSurfaceZ:
            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 wkbPointZM:
            case wkbLineStringZM:
            case wkbPolygonZM:
            case wkbMultiPointZM:
            case wkbMultiLineStringZM:
            case wkbMultiPolygonZM:
            case wkbGeometryCollectionZM:
            case wkbCircularStringZM:
            case wkbCompoundCurveZM:
            case wkbCurvePolygonZM:
            case wkbMultiCurveZM:
            case wkbMultiSurfaceZM:
                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__SWIG_0(OGRFeatureDefnShadow *self,int i){
      if (i < 0 || i >= OGR_FD_GetFieldCount(self))
          CPLError(CE_Failure, 1, FIELD_INDEX_ERROR_TMPL, i);
      return i;
  }
SWIGINTERN int OGRFeatureDefnShadow_GetFieldIndex__SWIG_1(OGRFeatureDefnShadow *self,char const *name){
      // Do not issue an error if the field doesn't exist. It is intended to be silent
      return OGR_FD_GetFieldIndex(self, 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__SWIG_0(OGRFeatureDefnShadow *self,int i){
    return (OGRGeomFieldDefnShadow*) OGR_FD_GetGeomFieldDefn(self, i);
  }
SWIGINTERN OGRGeomFieldDefnShadow *OGRFeatureDefnShadow_GetGeomFieldDefn__SWIG_1(OGRFeatureDefnShadow *self,char const *name){
      int iField = OGR_FD_GetGeomFieldIndex(self, name);
      if (iField == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, name);
      else
          return (OGRGeomFieldDefnShadow*) OGR_FD_GetGeomFieldDefn(self, iField);
      return NULL;
  }
SWIGINTERN int OGRFeatureDefnShadow_GetGeomFieldIndex__SWIG_0(OGRFeatureDefnShadow *self,int i){
      if (i < 0 || i >= OGR_FD_GetGeomFieldCount(self))
          CPLError(CE_Failure, 1, FIELD_INDEX_ERROR_TMPL, i);
      return i;
  }
SWIGINTERN int OGRFeatureDefnShadow_GetGeomFieldIndex__SWIG_1(OGRFeatureDefnShadow *self,char const *name){
      // Do not issue an error if the field doesn't exist. It is intended to be silent
      return OGR_FD_GetGeomFieldIndex(self, name);
  }
SWIGINTERN void OGRFeatureDefnShadow_AddGeomFieldDefn(OGRFeatureDefnShadow *self,OGRGeomFieldDefnShadow *defn){
    OGR_FD_AddGeomFieldDefn(self, defn);
  }
SWIGINTERN OGRErr OGRFeatureDefnShadow_DeleteGeomFieldDefn(OGRFeatureDefnShadow *self,int idx){
    return OGR_FD_DeleteGeomFieldDefn(self, idx);
  }
SWIGINTERN OGRwkbGeometryType OGRFeatureDefnShadow_GetGeomType(OGRFeatureDefnShadow *self){
    return (OGRwkbGeometryType) OGR_FD_GetGeomType(self);
  }
SWIGINTERN void OGRFeatureDefnShadow_SetGeomType(OGRFeatureDefnShadow *self,OGRwkbGeometryType geom_type){
    if( ValidateOGRGeometryType(geom_type) )
        OGR_FD_SetGeomType(self, geom_type);
  }
SWIGINTERN int OGRFeatureDefnShadow_GetReferenceCount(OGRFeatureDefnShadow *self){
    return OGR_FD_GetReferenceCount(self);
  }
SWIGINTERN int OGRFeatureDefnShadow_IsGeometryIgnored(OGRFeatureDefnShadow *self){
    return OGR_FD_IsGeometryIgnored(self);
  }
SWIGINTERN void OGRFeatureDefnShadow_SetGeometryIgnored(OGRFeatureDefnShadow *self,int bIgnored){
    return OGR_FD_SetGeometryIgnored(self,bIgnored);
  }
SWIGINTERN int OGRFeatureDefnShadow_IsStyleIgnored(OGRFeatureDefnShadow *self){
    return OGR_FD_IsStyleIgnored(self);
  }
SWIGINTERN void OGRFeatureDefnShadow_SetStyleIgnored(OGRFeatureDefnShadow *self,int bIgnored){
    return OGR_FD_SetStyleIgnored(self,bIgnored);
  }
SWIGINTERN int OGRFeatureDefnShadow_IsSame(OGRFeatureDefnShadow *self,OGRFeatureDefnShadow *other_defn){
    return OGR_FD_IsSame(self, other_defn);
  }

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


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

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

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



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



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



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



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

  OGRGeometryH hPolygon = NULL;

  OGRErr eErr;

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

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

  return (OGRGeometryShadow* )hPolygon;
  }


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

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


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


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


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


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


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


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

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

  }
SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkt(OGRGeometryShadow *self,char **argout){
    return OGR_G_ExportToWkt(self, argout);
  }
SWIGINTERN OGRErr OGRGeometryShadow_ExportToIsoWkt(OGRGeometryShadow *self,char **argout){
    return OGR_G_ExportToIsoWkt(self, argout);
  }
SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkb(OGRGeometryShadow *self,int *nLen,char **pBuf,OGRwkbByteOrder byte_order=wkbXDR){
    *nLen = OGR_G_WkbSize( self );
    *pBuf = (char *) malloc( *nLen );
    return OGR_G_ExportToWkb(self, byte_order, (unsigned char*) *pBuf );
  }
SWIGINTERN OGRErr OGRGeometryShadow_ExportToIsoWkb(OGRGeometryShadow *self,int *nLen,char **pBuf,OGRwkbByteOrder byte_order=wkbXDR){
    *nLen = OGR_G_WkbSize( self );
    *pBuf = (char *) malloc( *nLen );
    return OGR_G_ExportToIsoWkb(self, byte_order, (unsigned char*) *pBuf );
  }
SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToGML(OGRGeometryShadow *self,char **options=0){
    return (retStringAndCPLFree*) OGR_G_ExportToGMLEx(self, options);
  }
SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToKML(OGRGeometryShadow *self,char const *altitude_mode=NULL){
    return (retStringAndCPLFree *) OGR_G_ExportToKML(self, altitude_mode);
  }
SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToJson(OGRGeometryShadow *self,char **options=0){
    return (retStringAndCPLFree *) OGR_G_ExportToJsonEx(self, options);
  }
SWIGINTERN void OGRGeometryShadow_AddPoint(OGRGeometryShadow *self,double x,double y,double z=0){
    OGR_G_AddPoint( self, x, y, z );
  }
SWIGINTERN void OGRGeometryShadow_AddPointM(OGRGeometryShadow *self,double x,double y,double m){
      OGR_G_AddPointM( self, x, y, m );
  }
SWIGINTERN void OGRGeometryShadow_AddPointZM(OGRGeometryShadow *self,double x,double y,double z,double m){
      OGR_G_AddPointZM( self, x, y, z, m );
  }
SWIGINTERN void OGRGeometryShadow_AddPoint_2D(OGRGeometryShadow *self,double x,double y){
    OGR_G_AddPoint_2D( self, x, y );
  }
SWIGINTERN OGRErr OGRGeometryShadow_AddGeometryDirectly(OGRGeometryShadow *self,OGRGeometryShadow *other_disown){
    return OGR_G_AddGeometryDirectly( self, other_disown );
  }
SWIGINTERN OGRErr OGRGeometryShadow_AddGeometry(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_AddGeometry( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Clone(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Clone(self);
  }
SWIGINTERN OGRwkbGeometryType OGRGeometryShadow_GetGeometryType(OGRGeometryShadow *self){
    return (OGRwkbGeometryType) OGR_G_GetGeometryType(self);
  }
SWIGINTERN char const *OGRGeometryShadow_GetGeometryName(OGRGeometryShadow *self){
    return (const char *) OGR_G_GetGeometryName(self);
  }
SWIGINTERN double OGRGeometryShadow_Length(OGRGeometryShadow *self){
    return OGR_G_Length(self);
  }
SWIGINTERN double OGRGeometryShadow_Area(OGRGeometryShadow *self){
    return OGR_G_Area(self);
  }
SWIGINTERN double OGRGeometryShadow_GetArea(OGRGeometryShadow *self){
    return OGR_G_Area(self);
  }
SWIGINTERN int OGRGeometryShadow_GetPointCount(OGRGeometryShadow *self){
    return OGR_G_GetPointCount(self);
  }
SWIGINTERN 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 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_Boundary(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Boundary(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetBoundary(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Boundary(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_ConvexHull(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_ConvexHull(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Buffer(OGRGeometryShadow *self,double distance,int quadsecs=30){
    return (OGRGeometryShadow*) OGR_G_Buffer( self, distance, quadsecs );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Intersection(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_Intersection( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Union(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_Union( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_UnionCascaded(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_UnionCascaded( self );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Difference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_Difference( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymmetricDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
  }
SWIGINTERN double OGRGeometryShadow_Distance(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_Distance(self, other);
  }
SWIGINTERN void OGRGeometryShadow_Empty(OGRGeometryShadow *self){
    OGR_G_Empty(self);
  }
SWIGINTERN bool OGRGeometryShadow_IsEmpty(OGRGeometryShadow *self){
    return (OGR_G_IsEmpty(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_IsValid(OGRGeometryShadow *self){
    return (OGR_G_IsValid(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_IsSimple(OGRGeometryShadow *self){
    return (OGR_G_IsSimple(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_IsRing(OGRGeometryShadow *self){
    return (OGR_G_IsRing(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Intersects(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Intersects(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Intersect(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Intersects(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Equals(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Equals(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Equal(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Equals(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Disjoint(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Disjoint(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Touches(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Touches(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Crosses(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Crosses(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Within(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Within(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Contains(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Contains(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Overlaps(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Overlaps(self, other) > 0);
  }
SWIGINTERN OGRErr OGRGeometryShadow_TransformTo(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
    return OGR_G_TransformTo(self, reference);
  }
SWIGINTERN OGRErr OGRGeometryShadow_Transform(OGRGeometryShadow *self,OSRCoordinateTransformationShadow *trans){
    return OGR_G_Transform(self, trans);
  }
SWIGINTERN OSRSpatialReferenceShadow *OGRGeometryShadow_GetSpatialReference(OGRGeometryShadow *self){
    OGRSpatialReferenceH ref =  OGR_G_GetSpatialReference(self);
    if( ref )
        OSRReference(ref);
    return (OSRSpatialReferenceShadow*) ref;
  }
SWIGINTERN void OGRGeometryShadow_AssignSpatialReference(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
    OGR_G_AssignSpatialReference(self, reference);
  }
SWIGINTERN void OGRGeometryShadow_CloseRings(OGRGeometryShadow *self){
    OGR_G_CloseRings(self);
  }
SWIGINTERN void OGRGeometryShadow_FlattenTo2D(OGRGeometryShadow *self){
    OGR_G_FlattenTo2D(self);
  }
SWIGINTERN void OGRGeometryShadow_Segmentize(OGRGeometryShadow *self,double dfMaxLength){
    OGR_G_Segmentize(self, dfMaxLength);
  }
SWIGINTERN void OGRGeometryShadow_GetEnvelope(OGRGeometryShadow *self,double argout[4]){
    OGR_G_GetEnvelope(self, (OGREnvelope*)argout);
  }
SWIGINTERN void OGRGeometryShadow_GetEnvelope3D(OGRGeometryShadow *self,double argout[6]){
    OGR_G_GetEnvelope3D(self, (OGREnvelope3D*)argout);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Centroid(OGRGeometryShadow *self){
    OGRGeometryShadow *pt = (OGRGeometryShadow*) OGR_G_CreateGeometry( wkbPoint );
    OGR_G_Centroid( self, pt );
    return pt;
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_PointOnSurface(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_PointOnSurface( self );
  }
SWIGINTERN int OGRGeometryShadow_WkbSize(OGRGeometryShadow *self){
    return OGR_G_WkbSize(self);
  }
SWIGINTERN int OGRGeometryShadow_GetCoordinateDimension(OGRGeometryShadow *self){
    return OGR_G_GetCoordinateDimension(self);
  }
SWIGINTERN int OGRGeometryShadow_CoordinateDimension(OGRGeometryShadow *self){
    return OGR_G_CoordinateDimension(self);
  }
SWIGINTERN int OGRGeometryShadow_Is3D(OGRGeometryShadow *self){
      return OGR_G_Is3D(self);
  }
SWIGINTERN int OGRGeometryShadow_IsMeasured(OGRGeometryShadow *self){
      return OGR_G_IsMeasured(self);
  }
SWIGINTERN void OGRGeometryShadow_SetCoordinateDimension(OGRGeometryShadow *self,int dimension){
    OGR_G_SetCoordinateDimension(self, dimension);
  }
SWIGINTERN void OGRGeometryShadow_Set3D(OGRGeometryShadow *self,int b3D){
      OGR_G_Set3D(self, b3D);
  }
SWIGINTERN void OGRGeometryShadow_SetMeasured(OGRGeometryShadow *self,int bMeasured){
      OGR_G_SetMeasured(self, bMeasured);
  }
SWIGINTERN int OGRGeometryShadow_GetDimension(OGRGeometryShadow *self){
    return OGR_G_GetDimension(self);
  }
SWIGINTERN int OGRGeometryShadow_HasCurveGeometry(OGRGeometryShadow *self,int bLookForCircular=FALSE){
        return OGR_G_HasCurveGeometry(self, bLookForCircular);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetLinearGeometry(OGRGeometryShadow *self,double dfMaxAngleStepSizeDegrees=0.0,char **options=NULL){
    return (OGRGeometryShadow* )OGR_G_GetLinearGeometry(self, dfMaxAngleStepSizeDegrees, options);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetCurveGeometry(OGRGeometryShadow *self,char **options=NULL){
    return (OGRGeometryShadow* )OGR_G_GetCurveGeometry(self, options);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Value(OGRGeometryShadow *self,double dfDistance){
    return OGR_G_Value(self, dfDistance);
  }
SWIGINTERN void OGRGeometryShadow_Move(OGRGeometryShadow *self,double dx,double dy,double dz=0){
        int n = OGR_G_GetGeometryCount(self);
        if (n > 0) {
            int i;
            for (i = 0; i < n; i++) {
                OGRGeometryShadow *g = (OGRGeometryShadow*)OGR_G_GetGeometryRef(self, i);
                OGRGeometryShadow_Move(g, dx, dy, dz);
            }
        } else {
            int i;
            int d = OGR_G_GetCoordinateDimension(self);
            for (i = 0; i < OGR_G_GetPointCount(self); i++) {
                if (d == 0) {
                } else {
                    double x = OGR_G_GetX(self, i);
                    double y = OGR_G_GetY(self, i);
                    if (d == 2) {
                        OGR_G_SetPoint_2D(self, i, x+dx, y+dy);
                    } else {
                        double z = OGR_G_GetZ(self, i);
                        OGR_G_SetPoint(self, i, x+dx, y+dy, z+dz);
                    }
                }
            }
        }
    }

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


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

#ifdef __cplusplus
extern "C" {
#endif

#ifdef PERL_OBJECT
#define MAGIC_CLASS _wrap_Geo__OGR_var::
class _wrap_Geo__OGR_var : public CPerlObj {
public:
#else
#define MAGIC_CLASS
#endif
SWIGCLASS_STATIC int swig_magic_readonly(pTHX_ SV *SWIGUNUSEDPARM(sv), MAGIC *SWIGUNUSEDPARM(mg)) {
    MAGIC_PPERL
    croak("Value is read-only.");
    return 0;
}


#ifdef PERL_OBJECT
};
#endif

#ifdef __cplusplus
}
#endif

#ifdef __cplusplus
extern "C" {
#endif
XS(_wrap_UseExceptions) {
  {
    int argvi = 0;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: UseExceptions();");
    }
    UseExceptions();
    ST(argvi) = sv_newmortal();
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_DontUseExceptions) {
  {
    int argvi = 0;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: DontUseExceptions();");
    }
    DontUseExceptions();
    ST(argvi) = sv_newmortal();
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_new_StyleTable) {
  {
    int argvi = 0;
    OGRStyleTableShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: new_StyleTable();");
    }
    {
      CPLErrorReset();
      result = (OGRStyleTableShadow *)new_OGRStyleTableShadow();
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRStyleTableShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_delete_StyleTable) {
  {
    OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_StyleTable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      delete_OGRStyleTableShadow(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StyleTable_AddStyle) {
  {
    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 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: StyleTable_AddStyle(self,pszName,pszStyleString);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRStyleTableShadow_AddStyle(arg1,(char const *)arg2,(char const *)arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_StyleTable_LoadStyleTable) {
  {
    OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    {
      /* %typemap(default) const char * utf8_path */
      arg2 = (char *)"";
    }
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: StyleTable_LoadStyleTable(self,utf8_path);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    if (items > 1) {
      {
        /* %typemap(in,numinputs=1) (const char* utf8_path) (U8 *tmpbuf2) */
        arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
      }
    }
    {
      CPLErrorReset();
      result = (int)OGRStyleTableShadow_LoadStyleTable(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    {
      /* %typemap(freearg) (const char* utf8_path) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* utf8_path) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_StyleTable_SaveStyleTable) {
  {
    OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    {
      /* %typemap(default) const char * utf8_path */
      arg2 = (char *)"";
    }
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: StyleTable_SaveStyleTable(self,utf8_path);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    if (items > 1) {
      {
        /* %typemap(in,numinputs=1) (const char* utf8_path) (U8 *tmpbuf2) */
        arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
      }
    }
    {
      CPLErrorReset();
      result = (int)OGRStyleTableShadow_SaveStyleTable(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    {
      /* %typemap(freearg) (const char* utf8_path) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* utf8_path) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_StyleTable_Find) {
  {
    OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 ;
    char *buf2 = 0 ;
    int alloc2 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: StyleTable_Find(self,pszName);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRStyleTableShadow_Find(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    XSRETURN(argvi);
  fail:
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    SWIG_croak_null();
  }
}


XS(_wrap_StyleTable_ResetStyleStringReading) {
  {
    OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StyleTable_ResetStyleStringReading(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      OGRStyleTableShadow_ResetStyleStringReading(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StyleTable_GetNextStyle) {
  {
    OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StyleTable_GetNextStyle(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRStyleTableShadow_GetNextStyle(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_StyleTable_GetLastStyleName) {
  {
    OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: StyleTable_GetLastStyleName(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRStyleTableShadow_GetLastStyleName(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_GetRefCount) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Layer_GetRefCount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRLayerShadow_GetRefCount(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_SetSpatialFilter__SWIG_0) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Layer_SetSpatialFilter(self,filter);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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);
    {
      CPLErrorReset();
      OGRLayerShadow_SetSpatialFilter__SWIG_0(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_SetSpatialFilterRect__SWIG_0) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    double arg2 ;
    double arg3 ;
    double arg4 ;
    double arg5 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    double val4 ;
    int ecode4 = 0 ;
    double val5 ;
    int ecode5 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Layer_SetSpatialFilterRect(self,minx,miny,maxx,maxy);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRLayerShadow_SetSpatialFilterRect__SWIG_0(arg1,arg2,arg3,arg4,arg5);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_SetSpatialFilter__SWIG_1) {
  {
    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 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Layer_SetSpatialFilter(self,iGeomField,filter);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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(ST(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);
    {
      CPLErrorReset();
      OGRLayerShadow_SetSpatialFilter__SWIG_1(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_SetSpatialFilter) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRLayerShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(1), &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRLayerShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Layer_SetSpatialFilter__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Layer_SetSpatialFilter__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Layer_SetSpatialFilter'");
  XSRETURN(0);
}


XS(_wrap_Layer_SetSpatialFilterRect__SWIG_1) {
  {
    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 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: Layer_SetSpatialFilterRect(self,iGeomField,minx,miny,maxx,maxy);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRLayerShadow_SetSpatialFilterRect__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_SetSpatialFilterRect) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 5) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRLayerShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 6) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRLayerShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Layer_SetSpatialFilterRect__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Layer_SetSpatialFilterRect__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Layer_SetSpatialFilterRect'");
  XSRETURN(0);
}


XS(_wrap_Layer_GetSpatialFilter) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Layer_GetSpatialFilter(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRLayerShadow_GetSpatialFilter(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_SetAttributeFilter) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 ;
    char *buf2 = 0 ;
    int alloc2 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Layer_SetAttributeFilter(self,filter_string);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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);
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_SetAttributeFilter(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    XSRETURN(argvi);
  fail:
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_ResetReading) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Layer_ResetReading(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      OGRLayerShadow_ResetReading(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_GetName) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Layer_GetName(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRLayerShadow_GetName(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_GetGeomType) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRwkbGeometryType result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Layer_GetGeomType(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRwkbGeometryType)OGRLayerShadow_GetGeomType(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_GetGeometryColumn) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Layer_GetGeometryColumn(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRLayerShadow_GetGeometryColumn(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_GetFIDColumn) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Layer_GetFIDColumn(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRLayerShadow_GetFIDColumn(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer__GetFeature) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    GIntBig arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRFeatureShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Layer__GetFeature(self,fid);");
    }
    res1 = SWIG_ConvertPtr(ST(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 = CPLAtoGIntBig(SvPV_nolen(ST(1)));
    }
    {
      CPLErrorReset();
      result = (OGRFeatureShadow *)OGRLayerShadow_GetFeature(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_GetNextFeature) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRFeatureShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Layer_GetNextFeature(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRFeatureShadow *)OGRLayerShadow_GetNextFeature(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_SetNextByIndex) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    GIntBig arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Layer_SetNextByIndex(self,new_index);");
    }
    res1 = SWIG_ConvertPtr(ST(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 = CPLAtoGIntBig(SvPV_nolen(ST(1)));
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_SetNextByIndex(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_SetFeature) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Layer_SetFeature(self,feature);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_SetFeature(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_CreateFeature) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Layer_CreateFeature(self,feature);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_CreateFeature(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_DeleteFeature) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    GIntBig arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Layer_DeleteFeature(self,fid);");
    }
    res1 = SWIG_ConvertPtr(ST(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 = CPLAtoGIntBig(SvPV_nolen(ST(1)));
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_DeleteFeature(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_SyncToDisk) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Layer_SyncToDisk(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_SyncToDisk(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_GetLayerDefn) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRFeatureDefnShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Layer_GetLayerDefn(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRFeatureDefnShadow *)OGRLayerShadow_GetLayerDefn(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_GetFeatureCount) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    int arg2 = (int) 1 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    GIntBig result;
    dXSARGS;
    
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: Layer_GetFeatureCount(self,force);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 (items > 1) {
      ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &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);
    }
    {
      CPLErrorReset();
      result = OGRLayerShadow_GetFeatureCount(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      char temp[256];
      sprintf(temp, ""CPL_FRMT_GIB"", result);
      ST(argvi) = sv_2mortal(newSVpv(temp, 0));
      argvi++;
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_GetExtent) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    double *arg2 ;
    int arg3 = (int) 1 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double argout2[4] ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (double argout2[ANY]) */
      arg2 = argout2;
    }
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: Layer_GetExtent(self,force);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 (items > 1) {
      ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val3);
      if (!SWIG_IsOK(ecode3)) {
        SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Layer_GetExtent" "', argument " "3"" of type '" "int""'");
      } 
      arg3 = static_cast< int >(val3);
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_GetExtent(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    {
      /* %typemap(argout) (double argout[ANY]) */
      if (GIMME_V == G_ARRAY) {
        /* return a list */
        int i;
        EXTEND(SP, argvi+4-items+1);
        for (i = 0; i < 4; i++)
        ST(argvi++) = sv_2mortal(newSVnv(arg2[i]));
      } else {
        ST(argvi) = CreateArrayFromDoubleArray( arg2, 4 );
        argvi++;
      }
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer__TestCapability) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 ;
    char *buf2 = 0 ;
    int alloc2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Layer__TestCapability(self,cap);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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);
    {
      /* %typemap(check) (const char *cap) */
      if (!arg2)
      do_confess(NEED_DEF, 1);
    }
    {
      CPLErrorReset();
      result = (bool)OGRLayerShadow_TestCapability(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    XSRETURN(argvi);
  fail:
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    SWIG_croak_null();
  }
}


XS(_wrap_Layer__CreateField) {
  {
    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 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 3)) {
      SWIG_croak("Usage: Layer__CreateField(self,field_def,approx_ok);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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(ST(1), &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 (items > 2) {
      ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &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.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_CreateField(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer__DeleteField) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Layer__DeleteField(self,iField);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_DeleteField(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_ReorderField) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Layer_ReorderField(self,iOldFieldPos,iNewFieldPos);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_ReorderField(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_ReorderFields) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    int arg2 ;
    int *arg3 = (int *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Layer_ReorderFields(self,nList,pList);");
    }
    res1 = SWIG_ConvertPtr(ST(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) */
      if (!(SvROK(ST(1)) && (SvTYPE(SvRV(ST(1)))==SVt_PVAV)))
      do_confess(NEED_ARRAY_REF, 1);
      AV *av = (AV*)(SvRV(ST(1)));
      arg2 = av_len(av)+1;
      arg3 = (int*)CPLMalloc(arg2*sizeof(int));
      if (arg3) {
        for( int i = 0; i<arg2; i++ ) {
          SV **sv = av_fetch(av, i, 0);
          arg3[i] =  SvIV(*sv);
        }
      } else
      SWIG_fail;
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_ReorderFields(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    {
      /* %typemap(freearg) (int nList, int* pList) */
      CPLFree((void*) arg3);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (int nList, int* pList) */
      CPLFree((void*) arg3);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Layer__AlterFieldDefn) {
  {
    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 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Layer__AlterFieldDefn(self,iField,field_def,nFlags);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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(ST(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_PERL_CALL_ARGS_2(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_AlterFieldDefn(arg1,arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_CreateGeomField) {
  {
    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 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 3)) {
      SWIG_croak("Usage: Layer_CreateGeomField(self,field_def,approx_ok);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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(ST(1), &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 (items > 2) {
      ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &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.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_CreateGeomField(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_StartTransaction) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Layer_StartTransaction(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_StartTransaction(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_CommitTransaction) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Layer_CommitTransaction(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_CommitTransaction(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_RollbackTransaction) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Layer_RollbackTransaction(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_RollbackTransaction(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_FindFieldIndex) {
  {
    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 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Layer_FindFieldIndex(self,pszFieldName,bExactMatch);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRLayerShadow_FindFieldIndex(arg1,(char const *)arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    
    XSRETURN(argvi);
  fail:
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_GetSpatialRef) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OSRSpatialReferenceShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Layer_GetSpatialRef(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OSRSpatialReferenceShadow *)OGRLayerShadow_GetSpatialRef(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_GetFeaturesRead) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    GIntBig result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Layer_GetFeaturesRead(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = OGRLayerShadow_GetFeaturesRead(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      char temp[256];
      sprintf(temp, ""CPL_FRMT_GIB"", result);
      ST(argvi) = sv_2mortal(newSVpv(temp, 0));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_SetIgnoredFields) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Layer_SetIgnoredFields(self,options);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OGRLayerShadow, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Layer_SetIgnoredFields" "', argument " "1"" of type '" "OGRLayerShadow *""'"); 
    }
    arg1 = reinterpret_cast< OGRLayerShadow * >(argp1);
    {
      /* %typemap(in) char **options */
      if (SvOK(ST(1))) {
        if (SvROK(ST(1))) {
          if (SvTYPE(SvRV(ST(1)))==SVt_PVAV) {
            AV *av = (AV*)(SvRV(ST(1)));
            for (int i = 0; i < av_len(av)+1; i++) {
              SV *sv = *(av_fetch(av, i, 0));
              char *tmp = sv_to_utf8_string(sv, NULL);
              arg2 = CSLAddString(arg2, tmp);
              free(tmp);
            }
          } else if (SvTYPE(SvRV(ST(1)))==SVt_PVHV) {
            HV *hv = (HV*)SvRV(ST(1));
            SV *sv;
            char *key;
            I32 klen;
            arg2 = NULL;
            hv_iterinit(hv);
            while(sv = hv_iternextsv(hv, &key, &klen)) {
              char *tmp = sv_to_utf8_string(sv, NULL);
              arg2 = CSLAddNameValue(arg2, key, tmp);
              free(tmp);
            }
          } else
          do_confess(NEED_REF, 1);
        } else
        do_confess(NEED_REF, 1);
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_SetIgnoredFields(arg1,(char const **)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    {
      /* %typemap(freearg) char **options */
      if (arg2) CSLDestroy( arg2 );
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) char **options */
      if (arg2) CSLDestroy( arg2 );
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_Intersection) {
  {
    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 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    /* %typemap(arginit, noblock=1) ( void* callback_data = NULL) */
    SavedEnv saved_env;
    saved_env.fct = NULL;
    saved_env.data = &PL_sv_undef;
    arg6 = (void *)(&saved_env);
    if ((items < 3) || (items > 6)) {
      SWIG_croak("Usage: Layer_Intersection(self,method_layer,result_layer,options,callback,callback_data);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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(ST(1), &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(ST(2), &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 (items > 3) {
      {
        /* %typemap(in) char **options */
        if (SvOK(ST(3))) {
          if (SvROK(ST(3))) {
            if (SvTYPE(SvRV(ST(3)))==SVt_PVAV) {
              AV *av = (AV*)(SvRV(ST(3)));
              for (int i = 0; i < av_len(av)+1; i++) {
                SV *sv = *(av_fetch(av, i, 0));
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg4 = CSLAddString(arg4, tmp);
                free(tmp);
              }
            } else if (SvTYPE(SvRV(ST(3)))==SVt_PVHV) {
              HV *hv = (HV*)SvRV(ST(3));
              SV *sv;
              char *key;
              I32 klen;
              arg4 = NULL;
              hv_iterinit(hv);
              while(sv = hv_iternextsv(hv, &key, &klen)) {
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg4 = CSLAddNameValue(arg4, key, tmp);
                free(tmp);
              }
            } else
            do_confess(NEED_REF, 1);
          } else
          do_confess(NEED_REF, 1);
        }
      }
    }
    if (items > 4) {
      {
        /* %typemap(in) (GDALProgressFunc callback = NULL) */
        if (SvOK(ST(4))) {
          if (SvROK(ST(4))) {
            if (SvTYPE(SvRV(ST(4))) != SVt_PVCV) {
              do_confess(NEED_CODE_REF, 1);
            } else {
              saved_env.fct = (SV *)ST(4);
              arg5 = &callback_d_cp_vp;
            }
          } else {
            do_confess(NEED_CODE_REF, 1);
          }
        }
      }
    }
    if (items > 5) {
      {
        /* %typemap(in) (void* callback_data=NULL) */
        if (SvOK(ST(5)))
        saved_env.data = (SV *)ST(5);
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_Intersection(arg1,arg2,arg3,arg4,arg5,arg6);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg4) CSLDestroy( arg4 );
    }
    
    XSRETURN(argvi);
  fail:
    
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg4) CSLDestroy( arg4 );
    }
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_Union) {
  {
    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 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    /* %typemap(arginit, noblock=1) ( void* callback_data = NULL) */
    SavedEnv saved_env;
    saved_env.fct = NULL;
    saved_env.data = &PL_sv_undef;
    arg6 = (void *)(&saved_env);
    if ((items < 3) || (items > 6)) {
      SWIG_croak("Usage: Layer_Union(self,method_layer,result_layer,options,callback,callback_data);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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(ST(1), &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(ST(2), &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 (items > 3) {
      {
        /* %typemap(in) char **options */
        if (SvOK(ST(3))) {
          if (SvROK(ST(3))) {
            if (SvTYPE(SvRV(ST(3)))==SVt_PVAV) {
              AV *av = (AV*)(SvRV(ST(3)));
              for (int i = 0; i < av_len(av)+1; i++) {
                SV *sv = *(av_fetch(av, i, 0));
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg4 = CSLAddString(arg4, tmp);
                free(tmp);
              }
            } else if (SvTYPE(SvRV(ST(3)))==SVt_PVHV) {
              HV *hv = (HV*)SvRV(ST(3));
              SV *sv;
              char *key;
              I32 klen;
              arg4 = NULL;
              hv_iterinit(hv);
              while(sv = hv_iternextsv(hv, &key, &klen)) {
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg4 = CSLAddNameValue(arg4, key, tmp);
                free(tmp);
              }
            } else
            do_confess(NEED_REF, 1);
          } else
          do_confess(NEED_REF, 1);
        }
      }
    }
    if (items > 4) {
      {
        /* %typemap(in) (GDALProgressFunc callback = NULL) */
        if (SvOK(ST(4))) {
          if (SvROK(ST(4))) {
            if (SvTYPE(SvRV(ST(4))) != SVt_PVCV) {
              do_confess(NEED_CODE_REF, 1);
            } else {
              saved_env.fct = (SV *)ST(4);
              arg5 = &callback_d_cp_vp;
            }
          } else {
            do_confess(NEED_CODE_REF, 1);
          }
        }
      }
    }
    if (items > 5) {
      {
        /* %typemap(in) (void* callback_data=NULL) */
        if (SvOK(ST(5)))
        saved_env.data = (SV *)ST(5);
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_Union(arg1,arg2,arg3,arg4,arg5,arg6);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg4) CSLDestroy( arg4 );
    }
    
    XSRETURN(argvi);
  fail:
    
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg4) CSLDestroy( arg4 );
    }
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_SymDifference) {
  {
    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 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    /* %typemap(arginit, noblock=1) ( void* callback_data = NULL) */
    SavedEnv saved_env;
    saved_env.fct = NULL;
    saved_env.data = &PL_sv_undef;
    arg6 = (void *)(&saved_env);
    if ((items < 3) || (items > 6)) {
      SWIG_croak("Usage: Layer_SymDifference(self,method_layer,result_layer,options,callback,callback_data);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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(ST(1), &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(ST(2), &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 (items > 3) {
      {
        /* %typemap(in) char **options */
        if (SvOK(ST(3))) {
          if (SvROK(ST(3))) {
            if (SvTYPE(SvRV(ST(3)))==SVt_PVAV) {
              AV *av = (AV*)(SvRV(ST(3)));
              for (int i = 0; i < av_len(av)+1; i++) {
                SV *sv = *(av_fetch(av, i, 0));
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg4 = CSLAddString(arg4, tmp);
                free(tmp);
              }
            } else if (SvTYPE(SvRV(ST(3)))==SVt_PVHV) {
              HV *hv = (HV*)SvRV(ST(3));
              SV *sv;
              char *key;
              I32 klen;
              arg4 = NULL;
              hv_iterinit(hv);
              while(sv = hv_iternextsv(hv, &key, &klen)) {
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg4 = CSLAddNameValue(arg4, key, tmp);
                free(tmp);
              }
            } else
            do_confess(NEED_REF, 1);
          } else
          do_confess(NEED_REF, 1);
        }
      }
    }
    if (items > 4) {
      {
        /* %typemap(in) (GDALProgressFunc callback = NULL) */
        if (SvOK(ST(4))) {
          if (SvROK(ST(4))) {
            if (SvTYPE(SvRV(ST(4))) != SVt_PVCV) {
              do_confess(NEED_CODE_REF, 1);
            } else {
              saved_env.fct = (SV *)ST(4);
              arg5 = &callback_d_cp_vp;
            }
          } else {
            do_confess(NEED_CODE_REF, 1);
          }
        }
      }
    }
    if (items > 5) {
      {
        /* %typemap(in) (void* callback_data=NULL) */
        if (SvOK(ST(5)))
        saved_env.data = (SV *)ST(5);
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_SymDifference(arg1,arg2,arg3,arg4,arg5,arg6);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg4) CSLDestroy( arg4 );
    }
    
    XSRETURN(argvi);
  fail:
    
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg4) CSLDestroy( arg4 );
    }
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_Identity) {
  {
    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 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    /* %typemap(arginit, noblock=1) ( void* callback_data = NULL) */
    SavedEnv saved_env;
    saved_env.fct = NULL;
    saved_env.data = &PL_sv_undef;
    arg6 = (void *)(&saved_env);
    if ((items < 3) || (items > 6)) {
      SWIG_croak("Usage: Layer_Identity(self,method_layer,result_layer,options,callback,callback_data);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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(ST(1), &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(ST(2), &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 (items > 3) {
      {
        /* %typemap(in) char **options */
        if (SvOK(ST(3))) {
          if (SvROK(ST(3))) {
            if (SvTYPE(SvRV(ST(3)))==SVt_PVAV) {
              AV *av = (AV*)(SvRV(ST(3)));
              for (int i = 0; i < av_len(av)+1; i++) {
                SV *sv = *(av_fetch(av, i, 0));
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg4 = CSLAddString(arg4, tmp);
                free(tmp);
              }
            } else if (SvTYPE(SvRV(ST(3)))==SVt_PVHV) {
              HV *hv = (HV*)SvRV(ST(3));
              SV *sv;
              char *key;
              I32 klen;
              arg4 = NULL;
              hv_iterinit(hv);
              while(sv = hv_iternextsv(hv, &key, &klen)) {
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg4 = CSLAddNameValue(arg4, key, tmp);
                free(tmp);
              }
            } else
            do_confess(NEED_REF, 1);
          } else
          do_confess(NEED_REF, 1);
        }
      }
    }
    if (items > 4) {
      {
        /* %typemap(in) (GDALProgressFunc callback = NULL) */
        if (SvOK(ST(4))) {
          if (SvROK(ST(4))) {
            if (SvTYPE(SvRV(ST(4))) != SVt_PVCV) {
              do_confess(NEED_CODE_REF, 1);
            } else {
              saved_env.fct = (SV *)ST(4);
              arg5 = &callback_d_cp_vp;
            }
          } else {
            do_confess(NEED_CODE_REF, 1);
          }
        }
      }
    }
    if (items > 5) {
      {
        /* %typemap(in) (void* callback_data=NULL) */
        if (SvOK(ST(5)))
        saved_env.data = (SV *)ST(5);
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_Identity(arg1,arg2,arg3,arg4,arg5,arg6);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg4) CSLDestroy( arg4 );
    }
    
    XSRETURN(argvi);
  fail:
    
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg4) CSLDestroy( arg4 );
    }
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_Update) {
  {
    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 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    /* %typemap(arginit, noblock=1) ( void* callback_data = NULL) */
    SavedEnv saved_env;
    saved_env.fct = NULL;
    saved_env.data = &PL_sv_undef;
    arg6 = (void *)(&saved_env);
    if ((items < 3) || (items > 6)) {
      SWIG_croak("Usage: Layer_Update(self,method_layer,result_layer,options,callback,callback_data);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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(ST(1), &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(ST(2), &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 (items > 3) {
      {
        /* %typemap(in) char **options */
        if (SvOK(ST(3))) {
          if (SvROK(ST(3))) {
            if (SvTYPE(SvRV(ST(3)))==SVt_PVAV) {
              AV *av = (AV*)(SvRV(ST(3)));
              for (int i = 0; i < av_len(av)+1; i++) {
                SV *sv = *(av_fetch(av, i, 0));
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg4 = CSLAddString(arg4, tmp);
                free(tmp);
              }
            } else if (SvTYPE(SvRV(ST(3)))==SVt_PVHV) {
              HV *hv = (HV*)SvRV(ST(3));
              SV *sv;
              char *key;
              I32 klen;
              arg4 = NULL;
              hv_iterinit(hv);
              while(sv = hv_iternextsv(hv, &key, &klen)) {
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg4 = CSLAddNameValue(arg4, key, tmp);
                free(tmp);
              }
            } else
            do_confess(NEED_REF, 1);
          } else
          do_confess(NEED_REF, 1);
        }
      }
    }
    if (items > 4) {
      {
        /* %typemap(in) (GDALProgressFunc callback = NULL) */
        if (SvOK(ST(4))) {
          if (SvROK(ST(4))) {
            if (SvTYPE(SvRV(ST(4))) != SVt_PVCV) {
              do_confess(NEED_CODE_REF, 1);
            } else {
              saved_env.fct = (SV *)ST(4);
              arg5 = &callback_d_cp_vp;
            }
          } else {
            do_confess(NEED_CODE_REF, 1);
          }
        }
      }
    }
    if (items > 5) {
      {
        /* %typemap(in) (void* callback_data=NULL) */
        if (SvOK(ST(5)))
        saved_env.data = (SV *)ST(5);
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_Update(arg1,arg2,arg3,arg4,arg5,arg6);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg4) CSLDestroy( arg4 );
    }
    
    XSRETURN(argvi);
  fail:
    
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg4) CSLDestroy( arg4 );
    }
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_Clip) {
  {
    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 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    /* %typemap(arginit, noblock=1) ( void* callback_data = NULL) */
    SavedEnv saved_env;
    saved_env.fct = NULL;
    saved_env.data = &PL_sv_undef;
    arg6 = (void *)(&saved_env);
    if ((items < 3) || (items > 6)) {
      SWIG_croak("Usage: Layer_Clip(self,method_layer,result_layer,options,callback,callback_data);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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(ST(1), &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(ST(2), &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 (items > 3) {
      {
        /* %typemap(in) char **options */
        if (SvOK(ST(3))) {
          if (SvROK(ST(3))) {
            if (SvTYPE(SvRV(ST(3)))==SVt_PVAV) {
              AV *av = (AV*)(SvRV(ST(3)));
              for (int i = 0; i < av_len(av)+1; i++) {
                SV *sv = *(av_fetch(av, i, 0));
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg4 = CSLAddString(arg4, tmp);
                free(tmp);
              }
            } else if (SvTYPE(SvRV(ST(3)))==SVt_PVHV) {
              HV *hv = (HV*)SvRV(ST(3));
              SV *sv;
              char *key;
              I32 klen;
              arg4 = NULL;
              hv_iterinit(hv);
              while(sv = hv_iternextsv(hv, &key, &klen)) {
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg4 = CSLAddNameValue(arg4, key, tmp);
                free(tmp);
              }
            } else
            do_confess(NEED_REF, 1);
          } else
          do_confess(NEED_REF, 1);
        }
      }
    }
    if (items > 4) {
      {
        /* %typemap(in) (GDALProgressFunc callback = NULL) */
        if (SvOK(ST(4))) {
          if (SvROK(ST(4))) {
            if (SvTYPE(SvRV(ST(4))) != SVt_PVCV) {
              do_confess(NEED_CODE_REF, 1);
            } else {
              saved_env.fct = (SV *)ST(4);
              arg5 = &callback_d_cp_vp;
            }
          } else {
            do_confess(NEED_CODE_REF, 1);
          }
        }
      }
    }
    if (items > 5) {
      {
        /* %typemap(in) (void* callback_data=NULL) */
        if (SvOK(ST(5)))
        saved_env.data = (SV *)ST(5);
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_Clip(arg1,arg2,arg3,arg4,arg5,arg6);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg4) CSLDestroy( arg4 );
    }
    
    XSRETURN(argvi);
  fail:
    
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg4) CSLDestroy( arg4 );
    }
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_Erase) {
  {
    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 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    /* %typemap(arginit, noblock=1) ( void* callback_data = NULL) */
    SavedEnv saved_env;
    saved_env.fct = NULL;
    saved_env.data = &PL_sv_undef;
    arg6 = (void *)(&saved_env);
    if ((items < 3) || (items > 6)) {
      SWIG_croak("Usage: Layer_Erase(self,method_layer,result_layer,options,callback,callback_data);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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(ST(1), &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(ST(2), &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 (items > 3) {
      {
        /* %typemap(in) char **options */
        if (SvOK(ST(3))) {
          if (SvROK(ST(3))) {
            if (SvTYPE(SvRV(ST(3)))==SVt_PVAV) {
              AV *av = (AV*)(SvRV(ST(3)));
              for (int i = 0; i < av_len(av)+1; i++) {
                SV *sv = *(av_fetch(av, i, 0));
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg4 = CSLAddString(arg4, tmp);
                free(tmp);
              }
            } else if (SvTYPE(SvRV(ST(3)))==SVt_PVHV) {
              HV *hv = (HV*)SvRV(ST(3));
              SV *sv;
              char *key;
              I32 klen;
              arg4 = NULL;
              hv_iterinit(hv);
              while(sv = hv_iternextsv(hv, &key, &klen)) {
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg4 = CSLAddNameValue(arg4, key, tmp);
                free(tmp);
              }
            } else
            do_confess(NEED_REF, 1);
          } else
          do_confess(NEED_REF, 1);
        }
      }
    }
    if (items > 4) {
      {
        /* %typemap(in) (GDALProgressFunc callback = NULL) */
        if (SvOK(ST(4))) {
          if (SvROK(ST(4))) {
            if (SvTYPE(SvRV(ST(4))) != SVt_PVCV) {
              do_confess(NEED_CODE_REF, 1);
            } else {
              saved_env.fct = (SV *)ST(4);
              arg5 = &callback_d_cp_vp;
            }
          } else {
            do_confess(NEED_CODE_REF, 1);
          }
        }
      }
    }
    if (items > 5) {
      {
        /* %typemap(in) (void* callback_data=NULL) */
        if (SvOK(ST(5)))
        saved_env.data = (SV *)ST(5);
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRLayerShadow_Erase(arg1,arg2,arg3,arg4,arg5,arg6);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg4) CSLDestroy( arg4 );
    }
    
    XSRETURN(argvi);
  fail:
    
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg4) CSLDestroy( arg4 );
    }
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_GetStyleTable) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRStyleTableShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Layer_GetStyleTable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRStyleTableShadow *)OGRLayerShadow_GetStyleTable(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRStyleTableShadow, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Layer_SetStyleTable) {
  {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRStyleTableShadow *arg2 = (OGRStyleTableShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Layer_SetStyleTable(self,table);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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);
    {
      CPLErrorReset();
      OGRLayerShadow_SetStyleTable(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Feature) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Feature(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      delete_OGRFeatureShadow(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Feature) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRFeatureShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: new_Feature(feature_def);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRFeatureShadow *)new_OGRFeatureShadow(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetDefnRef) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRFeatureDefnShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Feature_GetDefnRef(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRFeatureDefnShadow *)OGRFeatureShadow_GetDefnRef(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature__SetGeometry) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature__SetGeometry(self,geom);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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);
    {
      /* %typemap(check) (OGRGeometryShadow *geom) */
      if (!arg2)
      do_confess(NEED_DEF, 1);
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRFeatureShadow_SetGeometry(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetGeometryDirectly) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_SetGeometryDirectly(self,geom);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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 *""'");
    }
    {
      /* %typemap(check) (OGRGeometryShadow *geom) */
      if (!arg2)
      do_confess(NEED_DEF, 1);
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRFeatureShadow_SetGeometryDirectly(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetGeometryRef) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Feature_GetGeometryRef(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeometryRef(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetGeomField__SWIG_0) {
  {
    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 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature_SetGeomField(self,iField,geom);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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(ST(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);
    {
      CPLErrorReset();
      result = (OGRErr)OGRFeatureShadow_SetGeomField__SWIG_0(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetGeomField__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature_SetGeomField(self,name,geom);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    res3 = SWIG_ConvertPtr(ST(2), &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetGeomField" "', argument " "3"" of type '" "OGRGeometryShadow *""'"); 
    }
    arg3 = reinterpret_cast< OGRGeometryShadow * >(argp3);
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRFeatureShadow_SetGeomField__SWIG_1(arg1,(char const *)arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetGeomField) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_SetGeomField__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_SetGeomField__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_SetGeomField'");
  XSRETURN(0);
}


XS(_wrap_Feature_SetGeomFieldDirectly__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int res3 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature_SetGeomFieldDirectly(self,iField,geom);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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(ST(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 *""'");
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRFeatureShadow_SetGeomFieldDirectly__SWIG_0(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetGeomFieldDirectly__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int res3 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature_SetGeomFieldDirectly(self,name,geom);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    res3 = SWIG_ConvertPtr(ST(2), SWIG_as_voidptrptr(&arg3), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN |  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetGeomFieldDirectly" "', argument " "3"" of type '" "OGRGeometryShadow *""'");
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRFeatureShadow_SetGeomFieldDirectly__SWIG_1(arg1,(char const *)arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetGeomFieldDirectly) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(2), &vptr, SWIGTYPE_p_OGRGeometryShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_SetGeomFieldDirectly__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_SetGeomFieldDirectly__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_SetGeomFieldDirectly'");
  XSRETURN(0);
}


XS(_wrap_Feature_GetGeomFieldRef__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetGeomFieldRef(self,iField);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeomFieldRef__SWIG_0(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetGeomFieldRef__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetGeomFieldRef(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeomFieldRef__SWIG_1(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 | SWIG_SHADOW); argvi++ ;
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetGeomFieldRef) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetGeomFieldRef__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetGeomFieldRef__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_GetGeomFieldRef'");
  XSRETURN(0);
}


XS(_wrap_Feature_Clone) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRFeatureShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Feature_Clone(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRFeatureShadow *)OGRFeatureShadow_Clone(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_Equal) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_Equal(self,feature);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (bool)OGRFeatureShadow_Equal(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldCount) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Feature_GetFieldCount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRFeatureShadow_GetFieldCount(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldDefnRef__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    OGRFieldDefnShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldDefnRef(self,id);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_0(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldDefnRef__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    OGRFieldDefnShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldDefnRef(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 | SWIG_SHADOW); argvi++ ;
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldDefnRef) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldDefnRef__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldDefnRef__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_GetFieldDefnRef'");
  XSRETURN(0);
}


XS(_wrap_Feature_GetGeomFieldCount) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Feature_GetGeomFieldCount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRFeatureShadow_GetGeomFieldCount(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetGeomFieldDefnRef__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    OGRGeomFieldDefnShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetGeomFieldDefnRef(self,id);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeomFieldDefnShadow *)OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_0(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetGeomFieldDefnRef__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    OGRGeomFieldDefnShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetGeomFieldDefnRef(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRGeomFieldDefnShadow *)OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | SWIG_SHADOW); argvi++ ;
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetGeomFieldDefnRef) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetGeomFieldDefnRef__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetGeomFieldDefnRef__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_GetGeomFieldDefnRef'");
  XSRETURN(0);
}


XS(_wrap_Feature_GetFieldAsString__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsString(self,id);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_0(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsString__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsString(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_1(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsString) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsString__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsString__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_GetFieldAsString'");
  XSRETURN(0);
}


XS(_wrap_Feature_GetFieldAsInteger__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsInteger(self,id);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_0(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsInteger__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsInteger(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_1(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsInteger) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsInteger__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsInteger__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_GetFieldAsInteger'");
  XSRETURN(0);
}


XS(_wrap_Feature_GetFieldAsInteger64__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    GIntBig result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsInteger64(self,id);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = OGRFeatureShadow_GetFieldAsInteger64__SWIG_0(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      char temp[256];
      sprintf(temp, ""CPL_FRMT_GIB"", result);
      ST(argvi) = sv_2mortal(newSVpv(temp, 0));
      argvi++;
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsInteger64__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    GIntBig result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsInteger64(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = OGRFeatureShadow_GetFieldAsInteger64__SWIG_1(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      char temp[256];
      sprintf(temp, ""CPL_FRMT_GIB"", result);
      ST(argvi) = sv_2mortal(newSVpv(temp, 0));
      argvi++;
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsInteger64) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsInteger64__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsInteger64__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_GetFieldAsInteger64'");
  XSRETURN(0);
}


XS(_wrap_Feature_GetFieldAsDouble__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsDouble(self,id);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_0(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsDouble__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsDouble(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_1(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsDouble) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsDouble__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsDouble__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_GetFieldAsDouble'");
  XSRETURN(0);
}


XS(_wrap_Feature_GetFieldAsDateTime__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    int *arg3 = (int *) 0 ;
    int *arg4 = (int *) 0 ;
    int *arg5 = (int *) 0 ;
    int *arg6 = (int *) 0 ;
    int *arg7 = (int *) 0 ;
    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 ;
    int argvi = 0;
    dXSARGS;
    
    arg3 = &temp3;
    arg4 = &temp4;
    arg5 = &temp5;
    arg6 = &temp6;
    arg7 = &temp7;
    arg8 = &temp8;
    arg9 = &temp9;
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsDateTime(self,id);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFeatureShadow_GetFieldAsDateTime__SWIG_0(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    if (SWIG_IsTmpObj(res3)) {
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((*arg3)); argvi++  ;
    } else {
      int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0) : 0;
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags); argvi++  ;
    }
    if (SWIG_IsTmpObj(res4)) {
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((*arg4)); argvi++  ;
    } else {
      int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0) : 0;
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags); argvi++  ;
    }
    if (SWIG_IsTmpObj(res5)) {
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((*arg5)); argvi++  ;
    } else {
      int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0) : 0;
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags); argvi++  ;
    }
    if (SWIG_IsTmpObj(res6)) {
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((*arg6)); argvi++  ;
    } else {
      int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0) : 0;
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags); argvi++  ;
    }
    if (SWIG_IsTmpObj(res7)) {
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((*arg7)); argvi++  ;
    } else {
      int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0) : 0;
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags); argvi++  ;
    }
    if (SWIG_IsTmpObj(res8)) {
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_From_float  SWIG_PERL_CALL_ARGS_1((*arg8)); argvi++  ;
    } else {
      int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0) : 0;
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_float, new_flags); argvi++  ;
    }
    if (SWIG_IsTmpObj(res9)) {
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((*arg9)); argvi++  ;
    } else {
      int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0) : 0;
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags); argvi++  ;
    }
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsDateTime__SWIG_1) {
  {
    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 ;
    U8 *tmpbuf2 = NULL ;
    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 ;
    int argvi = 0;
    dXSARGS;
    
    arg3 = &temp3;
    arg4 = &temp4;
    arg5 = &temp5;
    arg6 = &temp6;
    arg7 = &temp7;
    arg8 = &temp8;
    arg9 = &temp9;
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsDateTime(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_GetFieldAsDateTime__SWIG_1(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    if (SWIG_IsTmpObj(res3)) {
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((*arg3)); argvi++  ;
    } else {
      int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0) : 0;
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags); argvi++  ;
    }
    if (SWIG_IsTmpObj(res4)) {
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((*arg4)); argvi++  ;
    } else {
      int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN | 0) : 0;
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_int, new_flags); argvi++  ;
    }
    if (SWIG_IsTmpObj(res5)) {
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((*arg5)); argvi++  ;
    } else {
      int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0) : 0;
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_int, new_flags); argvi++  ;
    }
    if (SWIG_IsTmpObj(res6)) {
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((*arg6)); argvi++  ;
    } else {
      int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0) : 0;
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_int, new_flags); argvi++  ;
    }
    if (SWIG_IsTmpObj(res7)) {
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((*arg7)); argvi++  ;
    } else {
      int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0) : 0;
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags); argvi++  ;
    }
    if (SWIG_IsTmpObj(res8)) {
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_From_float  SWIG_PERL_CALL_ARGS_1((*arg8)); argvi++  ;
    } else {
      int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0) : 0;
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_float, new_flags); argvi++  ;
    }
    if (SWIG_IsTmpObj(res9)) {
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1((*arg9)); argvi++  ;
    } else {
      int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0) : 0;
      if (argvi >= items) EXTEND(sp,1);  ST(argvi) = SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_int, new_flags); argvi++  ;
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsDateTime) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsDateTime__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsDateTime__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_GetFieldAsDateTime'");
  XSRETURN(0);
}


XS(_wrap_Feature_GetFieldAsIntegerList__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    int *arg3 = (int *) 0 ;
    int **arg4 = (int **) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int nLen3 ;
    int *pList3 ;
    int argvi = 0;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (int *nLen3, const int **pList3) */
      arg3 = &nLen3;
      arg4 = &pList3;
    }
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsIntegerList(self,id,pList);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFeatureShadow_GetFieldAsIntegerList__SWIG_0(arg1,arg2,arg3,(int const **)arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    {
      /* %typemap(argout) (int *nLen, const int **pList) */
      ST(argvi) = CreateArrayFromIntArray( *(arg4), *(arg3) );
      argvi++;
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsIntegerList__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int *arg3 = (int *) 0 ;
    int **arg4 = (int **) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int nLen3 ;
    int *pList3 ;
    int argvi = 0;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (int *nLen3, const int **pList3) */
      arg3 = &nLen3;
      arg4 = &pList3;
    }
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsIntegerList(self,name,pList);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_GetFieldAsIntegerList__SWIG_1(arg1,(char const *)arg2,arg3,(int const **)arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    {
      /* %typemap(argout) (int *nLen, const int **pList) */
      ST(argvi) = CreateArrayFromIntArray( *(arg4), *(arg3) );
      argvi++;
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsIntegerList) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsIntegerList__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsIntegerList__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_GetFieldAsIntegerList'");
  XSRETURN(0);
}


XS(_wrap_Feature_GetFieldAsInteger64List__SWIG_0) {
  {
    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 ;
    GIntBig *pList3 ;
    int argvi = 0;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (int *nLen3, const GIntBig **pList3) */
      arg3 = &nLen3;
      arg4 = &pList3;
    }
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsInteger64List(self,id,pList);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFeatureShadow_GetFieldAsInteger64List__SWIG_0(arg1,arg2,arg3,(GIntBig const **)arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    {
      /* %typemap(argout) (int *nLen, const GIntBig **pList) */
      ST(argvi) = CreateArrayFromGIntBigArray( *(arg4), *(arg3) );
      argvi++;
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsInteger64List__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int *arg3 = (int *) 0 ;
    GIntBig **arg4 = (GIntBig **) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int nLen3 ;
    GIntBig *pList3 ;
    int argvi = 0;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (int *nLen3, const GIntBig **pList3) */
      arg3 = &nLen3;
      arg4 = &pList3;
    }
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsInteger64List(self,name,pList);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      /* %typemap(in,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_GetFieldAsInteger64List__SWIG_1(arg1,(char const *)arg2,arg3,(GIntBig const **)arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    {
      /* %typemap(argout) (int *nLen, const GIntBig **pList) */
      ST(argvi) = CreateArrayFromGIntBigArray( *(arg4), *(arg3) );
      argvi++;
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsInteger64List) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsInteger64List__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsInteger64List__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_GetFieldAsInteger64List'");
  XSRETURN(0);
}


XS(_wrap_Feature_GetFieldAsDoubleList__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    int *arg3 = (int *) 0 ;
    double **arg4 = (double **) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int nLen3 ;
    double *pList3 ;
    int argvi = 0;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (int *nLen3, const double **pList3) */
      arg3 = &nLen3;
      arg4 = &pList3;
    }
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsDoubleList(self,id,pList);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFeatureShadow_GetFieldAsDoubleList__SWIG_0(arg1,arg2,arg3,(double const **)arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    {
      /* %typemap(argout) (int *nLen, const double **pList) */
      ST(argvi) = CreateArrayFromDoubleArray( *(arg4), *(arg3) );
      argvi++;
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsDoubleList__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int *arg3 = (int *) 0 ;
    double **arg4 = (double **) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int nLen3 ;
    double *pList3 ;
    int argvi = 0;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (int *nLen3, const double **pList3) */
      arg3 = &nLen3;
      arg4 = &pList3;
    }
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsDoubleList(self,name,pList);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_GetFieldAsDoubleList__SWIG_1(arg1,(char const *)arg2,arg3,(double const **)arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    {
      /* %typemap(argout) (int *nLen, const double **pList) */
      ST(argvi) = CreateArrayFromDoubleArray( *(arg4), *(arg3) );
      argvi++;
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsDoubleList) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsDoubleList__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsDoubleList__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_GetFieldAsDoubleList'");
  XSRETURN(0);
}


XS(_wrap_Feature_GetFieldAsStringList__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    char ***arg3 = (char ***) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    char **pList3 ;
    int argvi = 0;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (char ***pList3) */
      arg3 = &pList3;
    }
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsStringList(self,id);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFeatureShadow_GetFieldAsStringList__SWIG_0(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    {
      /* %typemap(argout) (char ***pList) */
      ST(argvi) = CreateArrayFromStringArray( *(arg3) );
      argvi++;
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsStringList__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char ***arg3 = (char ***) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    char **pList3 ;
    int argvi = 0;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (char ***pList3) */
      arg3 = &pList3;
    }
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsStringList(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      /* %typemap(in,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_GetFieldAsStringList__SWIG_1(arg1,(char const *)arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    {
      /* %typemap(argout) (char ***pList) */
      ST(argvi) = CreateArrayFromStringArray( *(arg3) );
      argvi++;
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsStringList) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsStringList__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsStringList__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_GetFieldAsStringList'");
  XSRETURN(0);
}


XS(_wrap_Feature_GetFieldAsBinary__SWIG_0) {
  {
    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 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (int *nLen3, char **pBuf3 ) */
      arg3 = &nLen3;
      arg4 = &pBuf3;
    }
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsBinary(self,id,pBuf);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRErr)OGRFeatureShadow_GetFieldAsBinary__SWIG_0(arg1,arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    {
      /* %typemap(argout) (int *nLen, char **pBuf ) */
      ST(argvi) = sv_2mortal(newSVpv( *arg4, *arg3 ));
      argvi++;
    }
    
    
    {
      /* %typemap(freearg) (int *nLen, char **pBuf ) */
      if( *arg3 ) {
        free( *arg4 );
      }
    }
    XSRETURN(argvi);
  fail:
    
    
    {
      /* %typemap(freearg) (int *nLen, char **pBuf ) */
      if( *arg3 ) {
        free( *arg4 );
      }
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsBinary__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int *arg3 = (int *) 0 ;
    char **arg4 = (char **) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int nLen3 = 0 ;
    char *pBuf3 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (int *nLen3, char **pBuf3 ) */
      arg3 = &nLen3;
      arg4 = &pBuf3;
    }
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldAsBinary(self,name,pBuf);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRFeatureShadow_GetFieldAsBinary__SWIG_1(arg1,(char const *)arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    {
      /* %typemap(argout) (int *nLen, char **pBuf ) */
      ST(argvi) = sv_2mortal(newSVpv( *arg4, *arg3 ));
      argvi++;
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    {
      /* %typemap(freearg) (int *nLen, char **pBuf ) */
      if( *arg3 ) {
        free( *arg4 );
      }
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    {
      /* %typemap(freearg) (int *nLen, char **pBuf ) */
      if( *arg3 ) {
        free( *arg4 );
      }
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldAsBinary) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsBinary__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldAsBinary__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_GetFieldAsBinary'");
  XSRETURN(0);
}


XS(_wrap_Feature_IsFieldSet__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_IsFieldSet(self,id);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_0(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_IsFieldSet__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_IsFieldSet(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_1(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_IsFieldSet) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_IsFieldSet__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_IsFieldSet__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_IsFieldSet'");
  XSRETURN(0);
}


XS(_wrap_Feature_GetFieldIndex__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldIndex(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetFieldIndex" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      CPLErrorReset();
      result = (int)OGRFeatureShadow_GetFieldIndex__SWIG_0(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldIndex__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldIndex(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = (int)OGRFeatureShadow_GetFieldIndex__SWIG_1(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldIndex) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldIndex__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldIndex__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_GetFieldIndex'");
  XSRETURN(0);
}


XS(_wrap_Feature_GetGeomFieldIndex__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetGeomFieldIndex(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_GetGeomFieldIndex" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      CPLErrorReset();
      result = (int)OGRFeatureShadow_GetGeomFieldIndex__SWIG_0(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetGeomFieldIndex__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetGeomFieldIndex(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = (int)OGRFeatureShadow_GetGeomFieldIndex__SWIG_1(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetGeomFieldIndex) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetGeomFieldIndex__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetGeomFieldIndex__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_GetGeomFieldIndex'");
  XSRETURN(0);
}


XS(_wrap_Feature_GetFID) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    GIntBig result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Feature_GetFID(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = OGRFeatureShadow_GetFID(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      char temp[256];
      sprintf(temp, ""CPL_FRMT_GIB"", result);
      ST(argvi) = sv_2mortal(newSVpv(temp, 0));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetFID) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    GIntBig arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_SetFID(self,fid);");
    }
    res1 = SWIG_ConvertPtr(ST(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 = CPLAtoGIntBig(SvPV_nolen(ST(1)));
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRFeatureShadow_SetFID(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_DumpReadable) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Feature_DumpReadable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      OGRFeatureShadow_DumpReadable(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature__UnsetField__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature__UnsetField(self,id);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFeatureShadow_UnsetField__SWIG_0(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature__UnsetField__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature__UnsetField(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_UnsetField__SWIG_1(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature__UnsetField) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature__UnsetField__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature__UnsetField__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature__UnsetField'");
  XSRETURN(0);
}


XS(_wrap_Feature__SetField__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    char *arg3 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    U8 *tmpbuf3 = NULL ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature__SetField(self,id,value);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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) */
      arg3 = sv_to_utf8_string(ST(2), &tmpbuf3);
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_SetField__SWIG_0(arg1,arg2,(char const *)arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    {
      /* %typemap(freearg) (tostring argin) */
      if (tmpbuf3) free(tmpbuf3);
    }
    XSRETURN(argvi);
  fail:
    
    
    {
      /* %typemap(freearg) (tostring argin) */
      if (tmpbuf3) free(tmpbuf3);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature__SetField__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *arg3 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    U8 *tmpbuf3 = NULL ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature__SetField(self,name,value);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      /* %typemap(in) (tostring argin) */
      arg3 = sv_to_utf8_string(ST(2), &tmpbuf3);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_SetField__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    {
      /* %typemap(freearg) (tostring argin) */
      if (tmpbuf3) free(tmpbuf3);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    {
      /* %typemap(freearg) (tostring argin) */
      if (tmpbuf3) free(tmpbuf3);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetFieldInteger64) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    GIntBig arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature_SetFieldInteger64(self,id,value);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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 = CPLAtoGIntBig(SvPV_nolen(ST(2)));
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_SetFieldInteger64(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature__SetField__SWIG_2) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature__SetField(self,id,value);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFeatureShadow_SetField__SWIG_2(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature__SetField__SWIG_3) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature__SetField(self,name,value);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_SetField__SWIG_3(arg1,(char const *)arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature__SetField__SWIG_4) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    double arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature__SetField(self,id,value);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFeatureShadow_SetField__SWIG_4(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature__SetField__SWIG_5) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    double arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature__SetField(self,name,value);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Feature__SetField" "', argument " "3"" of type '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_SetField__SWIG_5(arg1,(char const *)arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature__SetField__SWIG_6) {
  {
    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 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: Feature__SetField(self,id,year,month,day,hour,minute,second,tzflag);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFeatureShadow_SetField__SWIG_6(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature__SetField__SWIG_7) {
  {
    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 ;
    U8 *tmpbuf2 = NULL ;
    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 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: Feature__SetField(self,name,year,month,day,hour,minute,second,tzflag);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "Feature__SetField" "', argument " "9"" of type '" "int""'");
    } 
    arg9 = static_cast< int >(val9);
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_SetField__SWIG_7(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature__SetField) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          /* %typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) (tostring argin) */
          _v = 1;
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_3;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 3;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_3:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          /* %typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) (tostring argin) */
          _v = 1;
        }
      }
      if (!_v) goto check_4;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 4;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_4:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_5;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 5;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_5:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_6;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 6;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_6:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_float SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_7;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 7;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_7:
    
    if (items == 9) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(3), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(4), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(5), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(6), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_float SWIG_PERL_CALL_ARGS_2(ST(7), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(8), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_8;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 8;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_8:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature__SetField__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature__SetField__SWIG_2); return;
    case 3:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature__SetField__SWIG_4); return;
    case 4:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature__SetField__SWIG_1); return;
    case 5:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature__SetField__SWIG_3); return;
    case 6:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature__SetField__SWIG_5); return;
    case 7:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature__SetField__SWIG_6); return;
    case 8:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature__SetField__SWIG_7); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature__SetField'");
  XSRETURN(0);
}


XS(_wrap_Feature_SetFieldIntegerList__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    int *arg4 = (int *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature_SetFieldIntegerList(self,id,nList,pList);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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) */
      if (!(SvROK(ST(2)) && (SvTYPE(SvRV(ST(2)))==SVt_PVAV)))
      do_confess(NEED_ARRAY_REF, 1);
      AV *av = (AV*)(SvRV(ST(2)));
      arg3 = av_len(av)+1;
      arg4 = (int*)CPLMalloc(arg3*sizeof(int));
      if (arg4) {
        for( int i = 0; i<arg3; i++ ) {
          SV **sv = av_fetch(av, i, 0);
          arg4[i] =  SvIV(*sv);
        }
      } else
      SWIG_fail;
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_SetFieldIntegerList__SWIG_0(arg1,arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    {
      /* %typemap(freearg) (int nList, int* pList) */
      CPLFree((void*) arg4);
    }
    XSRETURN(argvi);
  fail:
    
    
    {
      /* %typemap(freearg) (int nList, int* pList) */
      CPLFree((void*) arg4);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetFieldIntegerList__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int arg3 ;
    int *arg4 = (int *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature_SetFieldIntegerList(self,name,nList,pList);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      /* %typemap(in,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      /* %typemap(in,numinputs=1) (int nList, int* pList) */
      if (!(SvROK(ST(2)) && (SvTYPE(SvRV(ST(2)))==SVt_PVAV)))
      do_confess(NEED_ARRAY_REF, 1);
      AV *av = (AV*)(SvRV(ST(2)));
      arg3 = av_len(av)+1;
      arg4 = (int*)CPLMalloc(arg3*sizeof(int));
      if (arg4) {
        for( int i = 0; i<arg3; i++ ) {
          SV **sv = av_fetch(av, i, 0);
          arg4[i] =  SvIV(*sv);
        }
      } else
      SWIG_fail;
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_SetFieldIntegerList__SWIG_1(arg1,(char const *)arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    {
      /* %typemap(freearg) (int nList, int* pList) */
      CPLFree((void*) arg4);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    {
      /* %typemap(freearg) (int nList, int* pList) */
      CPLFree((void*) arg4);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetFieldIntegerList) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          /* %typemap(typecheck, precedence=SWIG_TYPECHECK_INTEGER) int nList, GUIntBig* pList */
          _v = 1;
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (items > 3) {
        {
          {
            /* %typemap(typecheck, precedence=SWIG_TYPECHECK_INTEGER) int nList, int* pList */
            _v = 1;
          }
        }
        if (!_v) goto check_1;
        _ranki += _v*_pi;
        _rankm += _pi;
        _pi *= SWIG_MAXCASTRANK;
      }
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          /* %typemap(typecheck, precedence=SWIG_TYPECHECK_INTEGER) int nList, GUIntBig* pList */
          _v = 1;
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (items > 3) {
        {
          {
            /* %typemap(typecheck, precedence=SWIG_TYPECHECK_INTEGER) int nList, int* pList */
            _v = 1;
          }
        }
        if (!_v) goto check_2;
        _ranki += _v*_pi;
        _rankm += _pi;
        _pi *= SWIG_MAXCASTRANK;
      }
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_SetFieldIntegerList__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_SetFieldIntegerList__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_SetFieldIntegerList'");
  XSRETURN(0);
}


XS(_wrap_Feature_SetFieldInteger64List__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    GIntBig *arg4 = (GIntBig *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature_SetFieldInteger64List(self,id,nList,pList);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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) */
      if (!(SvROK(ST(2)) && (SvTYPE(SvRV(ST(2)))==SVt_PVAV)))
      do_confess(NEED_ARRAY_REF, 1);
      AV *av = (AV*)(SvRV(ST(2)));
      arg3 = av_len(av)+1;
      arg4 = (GIntBig*)CPLMalloc(arg3*sizeof(GIntBig));
      if (arg4) {
        for( int i = 0; i<arg3; i++ ) {
          SV **sv = av_fetch(av, i, 0);
          arg4[i] =  CPLAtoGIntBig(SvPV_nolen(*sv));
        }
      } else
      SWIG_fail;
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_SetFieldInteger64List__SWIG_0(arg1,arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    {
      /* %typemap(freearg) (int nList, GIntBig* pList) */
      CPLFree((void*) arg4);
    }
    XSRETURN(argvi);
  fail:
    
    
    {
      /* %typemap(freearg) (int nList, GIntBig* pList) */
      CPLFree((void*) arg4);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetFieldInteger64List__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int arg3 ;
    GIntBig *arg4 = (GIntBig *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature_SetFieldInteger64List(self,name,nList,pList);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      /* %typemap(in,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      /* %typemap(in,numinputs=1) (int nList, GIntBig* pList) */
      if (!(SvROK(ST(2)) && (SvTYPE(SvRV(ST(2)))==SVt_PVAV)))
      do_confess(NEED_ARRAY_REF, 1);
      AV *av = (AV*)(SvRV(ST(2)));
      arg3 = av_len(av)+1;
      arg4 = (GIntBig*)CPLMalloc(arg3*sizeof(GIntBig));
      if (arg4) {
        for( int i = 0; i<arg3; i++ ) {
          SV **sv = av_fetch(av, i, 0);
          arg4[i] =  CPLAtoGIntBig(SvPV_nolen(*sv));
        }
      } else
      SWIG_fail;
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_SetFieldInteger64List__SWIG_1(arg1,(char const *)arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    {
      /* %typemap(freearg) (int nList, GIntBig* pList) */
      CPLFree((void*) arg4);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    {
      /* %typemap(freearg) (int nList, GIntBig* pList) */
      CPLFree((void*) arg4);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetFieldInteger64List) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          /* %typemap(typecheck, precedence=SWIG_TYPECHECK_INTEGER) int nList, GUIntBig* pList */
          _v = 1;
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (items > 3) {
        {
          {
            /* %typemap(typecheck, precedence=SWIG_TYPECHECK_INTEGER) int nList, GIntBig* pList */
            _v = 1;
          }
        }
        if (!_v) goto check_1;
        _ranki += _v*_pi;
        _rankm += _pi;
        _pi *= SWIG_MAXCASTRANK;
      }
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          /* %typemap(typecheck, precedence=SWIG_TYPECHECK_INTEGER) int nList, GUIntBig* pList */
          _v = 1;
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (items > 3) {
        {
          {
            /* %typemap(typecheck, precedence=SWIG_TYPECHECK_INTEGER) int nList, GIntBig* pList */
            _v = 1;
          }
        }
        if (!_v) goto check_2;
        _ranki += _v*_pi;
        _rankm += _pi;
        _pi *= SWIG_MAXCASTRANK;
      }
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_SetFieldInteger64List__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_SetFieldInteger64List__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_SetFieldInteger64List'");
  XSRETURN(0);
}


XS(_wrap_Feature_SetFieldDoubleList__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    double *arg4 = (double *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature_SetFieldDoubleList(self,id,nList,pList);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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) */
      if (!(SvROK(ST(2)) && (SvTYPE(SvRV(ST(2)))==SVt_PVAV)))
      do_confess(NEED_ARRAY_REF, 1);
      AV *av = (AV*)(SvRV(ST(2)));
      arg3 = av_len(av)+1;
      arg4 = (double*)CPLMalloc(arg3*sizeof(double));
      if (arg4) {
        for( int i = 0; i<arg3; i++ ) {
          SV **sv = av_fetch(av, i, 0);
          arg4[i] =  SvNV(*sv);
        }
      } else
      SWIG_fail;
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_SetFieldDoubleList__SWIG_0(arg1,arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    {
      /* %typemap(freearg) (int nList, double* pList) */
      CPLFree((void*) arg4);
    }
    XSRETURN(argvi);
  fail:
    
    
    {
      /* %typemap(freearg) (int nList, double* pList) */
      CPLFree((void*) arg4);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetFieldDoubleList__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int arg3 ;
    double *arg4 = (double *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature_SetFieldDoubleList(self,name,nList,pList);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      /* %typemap(in,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      /* %typemap(in,numinputs=1) (int nList, double* pList) */
      if (!(SvROK(ST(2)) && (SvTYPE(SvRV(ST(2)))==SVt_PVAV)))
      do_confess(NEED_ARRAY_REF, 1);
      AV *av = (AV*)(SvRV(ST(2)));
      arg3 = av_len(av)+1;
      arg4 = (double*)CPLMalloc(arg3*sizeof(double));
      if (arg4) {
        for( int i = 0; i<arg3; i++ ) {
          SV **sv = av_fetch(av, i, 0);
          arg4[i] =  SvNV(*sv);
        }
      } else
      SWIG_fail;
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_SetFieldDoubleList__SWIG_1(arg1,(char const *)arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    {
      /* %typemap(freearg) (int nList, double* pList) */
      CPLFree((void*) arg4);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    {
      /* %typemap(freearg) (int nList, double* pList) */
      CPLFree((void*) arg4);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetFieldDoubleList) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          /* %typemap(typecheck, precedence=SWIG_TYPECHECK_INTEGER) int nList, GUIntBig* pList */
          _v = 1;
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (items > 3) {
        {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
        }
        if (!_v) goto check_1;
        _ranki += _v*_pi;
        _rankm += _pi;
        _pi *= SWIG_MAXCASTRANK;
      }
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          /* %typemap(typecheck, precedence=SWIG_TYPECHECK_INTEGER) int nList, GUIntBig* pList */
          _v = 1;
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (items > 3) {
        {
          void *vptr = 0;
          int res = SWIG_ConvertPtr(ST(3), &vptr, SWIGTYPE_p_double, 0);
          _v = SWIG_CheckState(res);
        }
        if (!_v) goto check_2;
        _ranki += _v*_pi;
        _rankm += _pi;
        _pi *= SWIG_MAXCASTRANK;
      }
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_SetFieldDoubleList__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_SetFieldDoubleList__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_SetFieldDoubleList'");
  XSRETURN(0);
}


XS(_wrap_Feature_SetFieldStringList__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    char **arg3 = (char **) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature_SetFieldStringList(self,id,pList);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Feature_SetFieldStringList" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      /* %typemap(in) char **options */
      if (SvOK(ST(2))) {
        if (SvROK(ST(2))) {
          if (SvTYPE(SvRV(ST(2)))==SVt_PVAV) {
            AV *av = (AV*)(SvRV(ST(2)));
            for (int i = 0; i < av_len(av)+1; i++) {
              SV *sv = *(av_fetch(av, i, 0));
              char *tmp = sv_to_utf8_string(sv, NULL);
              arg3 = CSLAddString(arg3, tmp);
              free(tmp);
            }
          } else if (SvTYPE(SvRV(ST(2)))==SVt_PVHV) {
            HV *hv = (HV*)SvRV(ST(2));
            SV *sv;
            char *key;
            I32 klen;
            arg3 = NULL;
            hv_iterinit(hv);
            while(sv = hv_iternextsv(hv, &key, &klen)) {
              char *tmp = sv_to_utf8_string(sv, NULL);
              arg3 = CSLAddNameValue(arg3, key, tmp);
              free(tmp);
            }
          } else
          do_confess(NEED_REF, 1);
        } else
        do_confess(NEED_REF, 1);
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_SetFieldStringList__SWIG_0(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg3) CSLDestroy( arg3 );
    }
    XSRETURN(argvi);
  fail:
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg3) CSLDestroy( arg3 );
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetFieldStringList__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char **arg3 = (char **) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature_SetFieldStringList(self,name,pList);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      /* %typemap(in,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      /* %typemap(in) char **options */
      if (SvOK(ST(2))) {
        if (SvROK(ST(2))) {
          if (SvTYPE(SvRV(ST(2)))==SVt_PVAV) {
            AV *av = (AV*)(SvRV(ST(2)));
            for (int i = 0; i < av_len(av)+1; i++) {
              SV *sv = *(av_fetch(av, i, 0));
              char *tmp = sv_to_utf8_string(sv, NULL);
              arg3 = CSLAddString(arg3, tmp);
              free(tmp);
            }
          } else if (SvTYPE(SvRV(ST(2)))==SVt_PVHV) {
            HV *hv = (HV*)SvRV(ST(2));
            SV *sv;
            char *key;
            I32 klen;
            arg3 = NULL;
            hv_iterinit(hv);
            while(sv = hv_iternextsv(hv, &key, &klen)) {
              char *tmp = sv_to_utf8_string(sv, NULL);
              arg3 = CSLAddNameValue(arg3, key, tmp);
              free(tmp);
            }
          } else
          do_confess(NEED_REF, 1);
        } else
        do_confess(NEED_REF, 1);
      }
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_SetFieldStringList__SWIG_1(arg1,(char const *)arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    {
      /* %typemap(freearg) char **options */
      if (arg3) CSLDestroy( arg3 );
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    {
      /* %typemap(freearg) char **options */
      if (arg3) CSLDestroy( arg3 );
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetFieldStringList) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          /* %typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) char **options */
          _v = 1;
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          /* %typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) char **options */
          _v = 1;
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_SetFieldStringList__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_SetFieldStringList__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_SetFieldStringList'");
  XSRETURN(0);
}


XS(_wrap_Feature_SetFieldBinary__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    GByte *arg4 = (GByte *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature_SetFieldBinary(self,i,nBytes,pabyBuf);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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 nBytes, GByte* pabyBuf) */
      arg3 = SvCUR(ST(2));
      arg4 = (GByte*)SvPV_nolen(ST(2));
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_SetFieldBinary__SWIG_0(arg1,arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetFieldBinary__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int arg3 ;
    GByte *arg4 = (GByte *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature_SetFieldBinary(self,name,nBytes,pabyBuf);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      /* %typemap(in,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      /* %typemap(in,numinputs=1) (int nBytes, GByte* pabyBuf) */
      arg3 = SvCUR(ST(2));
      arg4 = (GByte*)SvPV_nolen(ST(2));
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_SetFieldBinary__SWIG_1(arg1,(char const *)arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetFieldBinary) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          /* %typemap(typecheck, precedence=SWIG_TYPECHECK_INTEGER) int nBytes, GByte* pabyBuf */
          _v = 1;
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (items > 3) {
        {
          {
            /* %typemap(typecheck, precedence=SWIG_TYPECHECK_INTEGER) int nBytes, GByte* pabyBuf */
            _v = 1;
          }
        }
        if (!_v) goto check_1;
        _ranki += _v*_pi;
        _rankm += _pi;
        _pi *= SWIG_MAXCASTRANK;
      }
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          /* %typemap(typecheck, precedence=SWIG_TYPECHECK_INTEGER) int nBytes, GByte* pabyBuf */
          _v = 1;
        }
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (items > 3) {
        {
          {
            /* %typemap(typecheck, precedence=SWIG_TYPECHECK_INTEGER) int nBytes, GByte* pabyBuf */
            _v = 1;
          }
        }
        if (!_v) goto check_2;
        _ranki += _v*_pi;
        _rankm += _pi;
        _pi *= SWIG_MAXCASTRANK;
      }
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_SetFieldBinary__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_SetFieldBinary__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_SetFieldBinary'");
  XSRETURN(0);
}


XS(_wrap_Feature_SetFieldBinaryFromHexString__SWIG_0) {
  {
    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 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature_SetFieldBinaryFromHexString(self,id,pszValue);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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(ST(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);
    {
      CPLErrorReset();
      OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_0(arg1,arg2,(char const *)arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    
    
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetFieldBinaryFromHexString__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *arg3 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int res3 ;
    char *buf3 = 0 ;
    int alloc3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Feature_SetFieldBinaryFromHexString(self,name,pszValue);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    res3 = SWIG_AsCharPtrAndSize(ST(2), &buf3, NULL, &alloc3);
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Feature_SetFieldBinaryFromHexString" "', argument " "3"" of type '" "char const *""'");
    }
    arg3 = reinterpret_cast< char * >(buf3);
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetFieldBinaryFromHexString) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 3) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(2), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_SetFieldBinaryFromHexString__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_SetFieldBinaryFromHexString__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_SetFieldBinaryFromHexString'");
  XSRETURN(0);
}


XS(_wrap_Feature__SetFrom) {
  {
    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 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 3)) {
      SWIG_croak("Usage: Feature__SetFrom(self,other,forgiving);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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(ST(1), &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 (items > 2) {
      ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &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.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRFeatureShadow_SetFrom(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetFromWithMap) {
  {
    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 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Feature_SetFromWithMap(self,other,forgiving,nList,pList);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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_PERL_CALL_ARGS_2(ST(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) */
      if (!(SvROK(ST(3)) && (SvTYPE(SvRV(ST(3)))==SVt_PVAV)))
      do_confess(NEED_ARRAY_REF, 1);
      AV *av = (AV*)(SvRV(ST(3)));
      arg4 = av_len(av)+1;
      arg5 = (int*)CPLMalloc(arg4*sizeof(int));
      if (arg5) {
        for( int i = 0; i<arg4; i++ ) {
          SV **sv = av_fetch(av, i, 0);
          arg5[i] =  SvIV(*sv);
        }
      } else
      SWIG_fail;
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRFeatureShadow_SetFromWithMap(arg1,arg2,arg3,arg4,arg5);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    
    {
      /* %typemap(freearg) (int nList, int* pList) */
      CPLFree((void*) arg5);
    }
    XSRETURN(argvi);
  fail:
    
    
    
    {
      /* %typemap(freearg) (int nList, int* pList) */
      CPLFree((void*) arg5);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetStyleString) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Feature_GetStyleString(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRFeatureShadow_GetStyleString(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetStyleString) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 ;
    char *buf2 = 0 ;
    int alloc2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_SetStyleString(self,the_string);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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);
    {
      CPLErrorReset();
      OGRFeatureShadow_SetStyleString(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    XSRETURN(argvi);
  fail:
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldType__SWIG_0) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    OGRFieldType result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldType(self,id);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_0(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldType__SWIG_1) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    OGRFieldType result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_GetFieldType(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_1(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetFieldType) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldType__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_Feature_GetFieldType__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'Feature_GetFieldType'");
  XSRETURN(0);
}


XS(_wrap_Feature__Validate) {
  {
    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 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 3)) {
      SWIG_croak("Usage: Feature__Validate(self,flags,bEmitError);");
    }
    res1 = SWIG_ConvertPtr(ST(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 (items > 1) {
      ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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 (items > 2) {
      ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    }
    {
      CPLErrorReset();
      result = (int)OGRFeatureShadow_Validate(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_FillUnsetWithDefault) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 = (int) FALSE ;
    char **arg3 = (char **) NULL ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 3)) {
      SWIG_croak("Usage: Feature_FillUnsetWithDefault(self,bNotNullableOnly,options);");
    }
    res1 = SWIG_ConvertPtr(ST(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 (items > 1) {
      ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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 (items > 2) {
      {
        /* %typemap(in) char **options */
        if (SvOK(ST(2))) {
          if (SvROK(ST(2))) {
            if (SvTYPE(SvRV(ST(2)))==SVt_PVAV) {
              AV *av = (AV*)(SvRV(ST(2)));
              for (int i = 0; i < av_len(av)+1; i++) {
                SV *sv = *(av_fetch(av, i, 0));
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg3 = CSLAddString(arg3, tmp);
                free(tmp);
              }
            } else if (SvTYPE(SvRV(ST(2)))==SVt_PVHV) {
              HV *hv = (HV*)SvRV(ST(2));
              SV *sv;
              char *key;
              I32 klen;
              arg3 = NULL;
              hv_iterinit(hv);
              while(sv = hv_iternextsv(hv, &key, &klen)) {
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg3 = CSLAddNameValue(arg3, key, tmp);
                free(tmp);
              }
            } else
            do_confess(NEED_REF, 1);
          } else
          do_confess(NEED_REF, 1);
        }
      }
    }
    {
      CPLErrorReset();
      OGRFeatureShadow_FillUnsetWithDefault(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg3) CSLDestroy( arg3 );
    }
    XSRETURN(argvi);
  fail:
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg3) CSLDestroy( arg3 );
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetNativeData) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Feature_GetNativeData(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRFeatureShadow_GetNativeData(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_GetNativeMediaType) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Feature_GetNativeMediaType(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRFeatureShadow_GetNativeMediaType(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetNativeData) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 ;
    char *buf2 = 0 ;
    int alloc2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_SetNativeData(self,nativeData);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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);
    {
      CPLErrorReset();
      OGRFeatureShadow_SetNativeData(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    XSRETURN(argvi);
  fail:
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    SWIG_croak_null();
  }
}


XS(_wrap_Feature_SetNativeMediaType) {
  {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 ;
    char *buf2 = 0 ;
    int alloc2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Feature_SetNativeMediaType(self,nativeMediaType);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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);
    {
      CPLErrorReset();
      OGRFeatureShadow_SetNativeMediaType(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    XSRETURN(argvi);
  fail:
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FeatureDefn) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FeatureDefn(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      delete_OGRFeatureDefnShadow(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FeatureDefn) {
  {
    char *arg1 = (char *) NULL ;
    int res1 ;
    char *buf1 = 0 ;
    int alloc1 = 0 ;
    int argvi = 0;
    OGRFeatureDefnShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 1)) {
      SWIG_croak("Usage: new_FeatureDefn(name_null_ok);");
    }
    if (items > 0) {
      res1 = SWIG_AsCharPtrAndSize(ST(0), &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);
    }
    {
      CPLErrorReset();
      result = (OGRFeatureDefnShadow *)new_OGRFeatureDefnShadow((char const *)arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFeatureDefnShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    XSRETURN(argvi);
  fail:
    if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_GetName) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FeatureDefn_GetName(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRFeatureDefnShadow_GetName(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_GetFieldCount) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FeatureDefn_GetFieldCount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRFeatureDefnShadow_GetFieldCount(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_GetFieldDefn) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    OGRFieldDefnShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FeatureDefn_GetFieldDefn(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRFieldDefnShadow *)OGRFeatureDefnShadow_GetFieldDefn(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_GetFieldIndex__SWIG_0) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FeatureDefn_GetFieldIndex(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_GetFieldIndex" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      CPLErrorReset();
      result = (int)OGRFeatureDefnShadow_GetFieldIndex__SWIG_0(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_GetFieldIndex__SWIG_1) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FeatureDefn_GetFieldIndex(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = (int)OGRFeatureDefnShadow_GetFieldIndex__SWIG_1(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_GetFieldIndex) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureDefnShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureDefnShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FeatureDefn_GetFieldIndex__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FeatureDefn_GetFieldIndex__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'FeatureDefn_GetFieldIndex'");
  XSRETURN(0);
}


XS(_wrap_FeatureDefn_AddFieldDefn) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FeatureDefn_AddFieldDefn(self,defn);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureDefnShadow_AddFieldDefn(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_GetGeomFieldCount) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FeatureDefn_GetGeomFieldCount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRFeatureDefnShadow_GetGeomFieldCount(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_GetGeomFieldDefn__SWIG_0) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    OGRGeomFieldDefnShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FeatureDefn_GetGeomFieldDefn(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeomFieldDefnShadow *)OGRFeatureDefnShadow_GetGeomFieldDefn__SWIG_0(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_GetGeomFieldDefn__SWIG_1) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    OGRGeomFieldDefnShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FeatureDefn_GetGeomFieldDefn(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      /* %typemap(in,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRGeomFieldDefnShadow *)OGRFeatureDefnShadow_GetGeomFieldDefn__SWIG_1(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomFieldDefnShadow, 0 | SWIG_SHADOW); argvi++ ;
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_GetGeomFieldDefn) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureDefnShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureDefnShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FeatureDefn_GetGeomFieldDefn__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FeatureDefn_GetGeomFieldDefn__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'FeatureDefn_GetGeomFieldDefn'");
  XSRETURN(0);
}


XS(_wrap_FeatureDefn_GetGeomFieldIndex__SWIG_0) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FeatureDefn_GetGeomFieldIndex(self,i);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FeatureDefn_GetGeomFieldIndex" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    {
      CPLErrorReset();
      result = (int)OGRFeatureDefnShadow_GetGeomFieldIndex__SWIG_0(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_GetGeomFieldIndex__SWIG_1) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FeatureDefn_GetGeomFieldIndex(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      result = (int)OGRFeatureDefnShadow_GetGeomFieldIndex__SWIG_1(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_GetGeomFieldIndex) {
  dXSARGS;
  
  {
    unsigned long _index = 0;
    SWIG_TypeRank _rank = 0; 
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureDefnShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        {
          int res = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), NULL);
          _v = SWIG_CheckState(res);
        }
      }
      if (!_v) goto check_1;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 1;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_1:
    
    if (items == 2) {
      SWIG_TypeRank _ranki = 0;
      SWIG_TypeRank _rankm = 0;
      SWIG_TypeRank _pi = 1;
      int _v = 0;
      {
        void *vptr = 0;
        int res = SWIG_ConvertPtr(ST(0), &vptr, SWIGTYPE_p_OGRFeatureDefnShadow, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      {
        int res = SWIG_AsCharPtrAndSize(ST(1), 0, NULL, 0);
        _v = SWIG_CheckState(res);
      }
      if (!_v) goto check_2;
      _ranki += _v*_pi;
      _rankm += _pi;
      _pi *= SWIG_MAXCASTRANK;
      if (!_index || (_ranki < _rank)) {
        _rank = _ranki; _index = 2;
        if (_rank == _rankm) goto dispatch;
      }
    }
  check_2:
    
  dispatch:
    switch(_index) {
    case 1:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FeatureDefn_GetGeomFieldIndex__SWIG_0); return;
    case 2:
      PUSHMARK(MARK); SWIG_CALLXS(_wrap_FeatureDefn_GetGeomFieldIndex__SWIG_1); return;
    }
  }
  
  croak("No matching function for overloaded 'FeatureDefn_GetGeomFieldIndex'");
  XSRETURN(0);
}


XS(_wrap_FeatureDefn_AddGeomFieldDefn) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    OGRGeomFieldDefnShadow *arg2 = (OGRGeomFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FeatureDefn_AddGeomFieldDefn(self,defn);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      OGRFeatureDefnShadow_AddGeomFieldDefn(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_DeleteGeomFieldDefn) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FeatureDefn_DeleteGeomFieldDefn(self,idx);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRErr)OGRFeatureDefnShadow_DeleteGeomFieldDefn(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_GetGeomType) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRwkbGeometryType result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FeatureDefn_GetGeomType(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRwkbGeometryType)OGRFeatureDefnShadow_GetGeomType(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_SetGeomType) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    OGRwkbGeometryType arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FeatureDefn_SetGeomType(self,geom_type);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFeatureDefnShadow_SetGeomType(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_GetReferenceCount) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FeatureDefn_GetReferenceCount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRFeatureDefnShadow_GetReferenceCount(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_IsGeometryIgnored) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FeatureDefn_IsGeometryIgnored(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRFeatureDefnShadow_IsGeometryIgnored(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_SetGeometryIgnored) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FeatureDefn_SetGeometryIgnored(self,bIgnored);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFeatureDefnShadow_SetGeometryIgnored(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_IsStyleIgnored) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FeatureDefn_IsStyleIgnored(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRFeatureDefnShadow_IsStyleIgnored(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_SetStyleIgnored) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FeatureDefn_SetStyleIgnored(self,bIgnored);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFeatureDefnShadow_SetStyleIgnored(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FeatureDefn_IsSame) {
  {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    OGRFeatureDefnShadow *arg2 = (OGRFeatureDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FeatureDefn_IsSame(self,other_defn);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (int)OGRFeatureDefnShadow_IsSame(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_FieldDefn) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_FieldDefn(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      delete_OGRFieldDefnShadow(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_FieldDefn) {
  {
    char *arg1 = (char *) "unnamed" ;
    OGRFieldType arg2 = (OGRFieldType) OFTString ;
    int res1 ;
    char *buf1 = 0 ;
    int alloc1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    OGRFieldDefnShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 2)) {
      SWIG_croak("Usage: new_FieldDefn(name_null_ok,field_type);");
    }
    if (items > 0) {
      res1 = SWIG_AsCharPtrAndSize(ST(0), &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 (items > 1) {
      ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &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);
    }
    {
      CPLErrorReset();
      result = (OGRFieldDefnShadow *)new_OGRFieldDefnShadow((char const *)arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    
    XSRETURN(argvi);
  fail:
    if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_GetName) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FieldDefn_GetName(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRFieldDefnShadow_GetName(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_GetNameRef) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FieldDefn_GetNameRef(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRFieldDefnShadow_GetNameRef(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_SetName) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FieldDefn_SetName(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      /* %typemap(in,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRFieldDefnShadow_SetName(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_GetType) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRFieldType result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FieldDefn_GetType(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRFieldType)OGRFieldDefnShadow_GetType(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_SetType) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    OGRFieldType arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FieldDefn_SetType(self,type);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFieldDefnShadow_SetType(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_GetSubType) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRFieldSubType result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FieldDefn_GetSubType(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRFieldSubType)OGRFieldDefnShadow_GetSubType(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_SetSubType) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    OGRFieldSubType arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FieldDefn_SetSubType(self,type);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFieldDefnShadow_SetSubType(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_GetJustify) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRJustification result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FieldDefn_GetJustify(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRJustification)OGRFieldDefnShadow_GetJustify(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_SetJustify) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    OGRJustification arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FieldDefn_SetJustify(self,justify);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFieldDefnShadow_SetJustify(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_GetWidth) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FieldDefn_GetWidth(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRFieldDefnShadow_GetWidth(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_SetWidth) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FieldDefn_SetWidth(self,width);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFieldDefnShadow_SetWidth(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_GetPrecision) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FieldDefn_GetPrecision(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRFieldDefnShadow_GetPrecision(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_SetPrecision) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FieldDefn_SetPrecision(self,precision);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFieldDefnShadow_SetPrecision(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_GetTypeName) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FieldDefn_GetTypeName(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRFieldDefnShadow_GetTypeName(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_GetFieldTypeName) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    OGRFieldType arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FieldDefn_GetFieldTypeName(self,type);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRFieldDefnShadow_GetFieldTypeName(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_IsIgnored) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FieldDefn_IsIgnored(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRFieldDefnShadow_IsIgnored(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_SetIgnored) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FieldDefn_SetIgnored(self,bIgnored);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFieldDefnShadow_SetIgnored(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_IsNullable) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FieldDefn_IsNullable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRFieldDefnShadow_IsNullable(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_SetNullable) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FieldDefn_SetNullable(self,bNullable);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRFieldDefnShadow_SetNullable(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_GetDefault) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FieldDefn_GetDefault(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRFieldDefnShadow_GetDefault(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_SetDefault) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 ;
    char *buf2 = 0 ;
    int alloc2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: FieldDefn_SetDefault(self,pszValue);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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);
    {
      CPLErrorReset();
      OGRFieldDefnShadow_SetDefault(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    XSRETURN(argvi);
  fail:
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    SWIG_croak_null();
  }
}


XS(_wrap_FieldDefn_IsDefaultDriverSpecific) {
  {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: FieldDefn_IsDefaultDriverSpecific(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRFieldDefnShadow_IsDefaultDriverSpecific(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_delete_GeomFieldDefn) {
  {
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_GeomFieldDefn(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      delete_OGRGeomFieldDefnShadow(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_GeomFieldDefn) {
  {
    char *arg1 = (char *) "" ;
    OGRwkbGeometryType arg2 = (OGRwkbGeometryType) wkbUnknown ;
    int res1 ;
    char *buf1 = 0 ;
    int alloc1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    OGRGeomFieldDefnShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 2)) {
      SWIG_croak("Usage: new_GeomFieldDefn(name_null_ok,field_type);");
    }
    if (items > 0) {
      res1 = SWIG_AsCharPtrAndSize(ST(0), &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 (items > 1) {
      ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &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);
    }
    {
      CPLErrorReset();
      result = (OGRGeomFieldDefnShadow *)new_OGRGeomFieldDefnShadow((char const *)arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeomFieldDefnShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    
    XSRETURN(argvi);
  fail:
    if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    
    SWIG_croak_null();
  }
}


XS(_wrap_GeomFieldDefn_GetName) {
  {
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GeomFieldDefn_GetName(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRGeomFieldDefnShadow_GetName(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GeomFieldDefn_GetNameRef) {
  {
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GeomFieldDefn_GetNameRef(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRGeomFieldDefnShadow_GetNameRef(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GeomFieldDefn_SetName) {
  {
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    U8 *tmpbuf2 = NULL ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: GeomFieldDefn_SetName(self,name);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      /* %typemap(in,numinputs=1) (const char* name) */
      arg2 = sv_to_utf8_string(ST(1), &tmpbuf2);
    }
    {
      if (!arg2) {
        SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
      }
    }
    {
      CPLErrorReset();
      OGRGeomFieldDefnShadow_SetName(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (const char* name) */
      if (tmpbuf2) free(tmpbuf2);
    }
    SWIG_croak_null();
  }
}


XS(_wrap_GeomFieldDefn_GetType) {
  {
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRwkbGeometryType result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GeomFieldDefn_GetType(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRwkbGeometryType)OGRGeomFieldDefnShadow_GetType(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GeomFieldDefn_SetType) {
  {
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    OGRwkbGeometryType arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: GeomFieldDefn_SetType(self,type);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRGeomFieldDefnShadow_SetType(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_GeomFieldDefn_GetSpatialRef) {
  {
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OSRSpatialReferenceShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GeomFieldDefn_GetSpatialRef(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OSRSpatialReferenceShadow *)OGRGeomFieldDefnShadow_GetSpatialRef(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GeomFieldDefn_SetSpatialRef) {
  {
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: GeomFieldDefn_SetSpatialRef(self,srs);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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);
    {
      CPLErrorReset();
      OGRGeomFieldDefnShadow_SetSpatialRef(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_GeomFieldDefn_IsIgnored) {
  {
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GeomFieldDefn_IsIgnored(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRGeomFieldDefnShadow_IsIgnored(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GeomFieldDefn_SetIgnored) {
  {
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: GeomFieldDefn_SetIgnored(self,bIgnored);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRGeomFieldDefnShadow_SetIgnored(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_GeomFieldDefn_IsNullable) {
  {
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GeomFieldDefn_IsNullable(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRGeomFieldDefnShadow_IsNullable(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GeomFieldDefn_SetNullable) {
  {
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: GeomFieldDefn_SetNullable(self,bNullable);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRGeomFieldDefnShadow_SetNullable(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreateGeometryFromWkb) {
  {
    int arg1 ;
    char *arg2 = (char *) 0 ;
    OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
    void *argp3 = 0 ;
    int res3 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: CreateGeometryFromWkb(len,bin_string,reference);");
    }
    {
      /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
      if (SvOK(ST(0))) {
        SV *sv = ST(0);
        if (SvROK(sv) && SvTYPE(SvRV(sv)) < SVt_PVAV)
        sv = SvRV(sv);
        if (!SvPOK(sv))
        do_confess(NEED_BINARY_DATA, 1);
        STRLEN len = SvCUR(sv);
        arg2 = SvPV_nolen(sv);
        arg1 = len;
      } else {
        arg2 = NULL;
        arg1 = 0;
      }
    }
    if (items > 1) {
      res3 = SWIG_ConvertPtr(ST(1), &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);
    }
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)CreateGeometryFromWkb(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreateGeometryFromWkt) {
  {
    char **arg1 = (char **) 0 ;
    OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) NULL ;
    char *val1 ;
    U8 *tmpbuf1 = NULL ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: CreateGeometryFromWkt(val,reference);");
    }
    {
      /* %typemap(in) (char **ignorechange) */
      val1 = sv_to_utf8_string(ST(0), &tmpbuf1);
      arg1 = &val1;
    }
    if (items > 1) {
      res2 = SWIG_ConvertPtr(ST(1), &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);
    }
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)CreateGeometryFromWkt(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    {
      /* %typemap(freearg) (char **ignorechange) */
      if (tmpbuf1) free(tmpbuf1);
    }
    
    XSRETURN(argvi);
  fail:
    {
      /* %typemap(freearg) (char **ignorechange) */
      if (tmpbuf1) free(tmpbuf1);
    }
    
    SWIG_croak_null();
  }
}


XS(_wrap_CreateGeometryFromGML) {
  {
    char *arg1 = (char *) 0 ;
    int res1 ;
    char *buf1 = 0 ;
    int alloc1 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CreateGeometryFromGML(input_string);");
    }
    res1 = SWIG_AsCharPtrAndSize(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)CreateGeometryFromGML((char const *)arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    XSRETURN(argvi);
  fail:
    if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    SWIG_croak_null();
  }
}


XS(_wrap_CreateGeometryFromJson) {
  {
    char *arg1 = (char *) 0 ;
    int res1 ;
    char *buf1 = 0 ;
    int alloc1 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: CreateGeometryFromJson(input_string);");
    }
    res1 = SWIG_AsCharPtrAndSize(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)CreateGeometryFromJson((char const *)arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    XSRETURN(argvi);
  fail:
    if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
    SWIG_croak_null();
  }
}


XS(_wrap_BuildPolygonFromEdges) {
  {
    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 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 4)) {
      SWIG_croak("Usage: BuildPolygonFromEdges(hLineCollection,bBestEffort,bAutoClose,dfTolerance);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 (items > 1) {
      ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &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 (items > 2) {
      ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &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 (items > 3) {
      ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
      if (!SWIG_IsOK(ecode4)) {
        SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "BuildPolygonFromEdges" "', argument " "4"" of type '" "double""'");
      } 
      arg4 = static_cast< double >(val4);
    }
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)BuildPolygonFromEdges(arg1,arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ApproximateArcAngles) {
  {
    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 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 9) || (items > 9)) {
      SWIG_croak("Usage: ApproximateArcAngles(dfCenterX,dfCenterY,dfZ,dfPrimaryRadius,dfSecondaryAxis,dfRotation,dfStartAngle,dfEndAngle,dfMaxAngleStepSizeDegrees);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &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 SWIG_PERL_CALL_ARGS_2(ST(1), &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 SWIG_PERL_CALL_ARGS_2(ST(2), &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 SWIG_PERL_CALL_ARGS_2(ST(3), &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 SWIG_PERL_CALL_ARGS_2(ST(4), &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 SWIG_PERL_CALL_ARGS_2(ST(5), &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 SWIG_PERL_CALL_ARGS_2(ST(6), &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 SWIG_PERL_CALL_ARGS_2(ST(7), &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 SWIG_PERL_CALL_ARGS_2(ST(8), &val9);
    if (!SWIG_IsOK(ecode9)) {
      SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "ApproximateArcAngles" "', argument " "9"" of type '" "double""'");
    } 
    arg9 = static_cast< double >(val9);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)ApproximateArcAngles(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_ForceToPolygon) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ForceToPolygon(geom_in);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)ForceToPolygon(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ForceToLineString) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ForceToLineString(geom_in);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)ForceToLineString(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ForceToMultiPolygon) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ForceToMultiPolygon(geom_in);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)ForceToMultiPolygon(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ForceToMultiPoint) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ForceToMultiPoint(geom_in);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)ForceToMultiPoint(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ForceToMultiLineString) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: ForceToMultiLineString(geom_in);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)ForceToMultiLineString(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_ForceTo) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRwkbGeometryType arg2 ;
    char **arg3 = (char **) NULL ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 3)) {
      SWIG_croak("Usage: ForceTo(geom_in,eTargetType,options);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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 (items > 2) {
      {
        /* %typemap(in) char **options */
        if (SvOK(ST(2))) {
          if (SvROK(ST(2))) {
            if (SvTYPE(SvRV(ST(2)))==SVt_PVAV) {
              AV *av = (AV*)(SvRV(ST(2)));
              for (int i = 0; i < av_len(av)+1; i++) {
                SV *sv = *(av_fetch(av, i, 0));
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg3 = CSLAddString(arg3, tmp);
                free(tmp);
              }
            } else if (SvTYPE(SvRV(ST(2)))==SVt_PVHV) {
              HV *hv = (HV*)SvRV(ST(2));
              SV *sv;
              char *key;
              I32 klen;
              arg3 = NULL;
              hv_iterinit(hv);
              while(sv = hv_iternextsv(hv, &key, &klen)) {
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg3 = CSLAddNameValue(arg3, key, tmp);
                free(tmp);
              }
            } else
            do_confess(NEED_REF, 1);
          } else
          do_confess(NEED_REF, 1);
        }
      }
    }
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)ForceTo(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg3) CSLDestroy( arg3 );
    }
    XSRETURN(argvi);
  fail:
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg3) CSLDestroy( arg3 );
    }
    SWIG_croak_null();
  }
}


XS(_wrap_delete_Geometry) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: delete_Geometry(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      delete_OGRGeometryShadow(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_new_Geometry) {
  {
    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 res5 ;
    char *buf5 = 0 ;
    int alloc5 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 0) || (items > 4)) {
      SWIG_croak("Usage: new_Geometry(type,wkt,wkb,wkb_buf,gml);");
    }
    if (items > 0) {
      ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &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 (items > 1) {
      res2 = SWIG_AsCharPtrAndSize(ST(1), &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 (items > 2) {
      {
        /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
        if (SvOK(ST(2))) {
          SV *sv = ST(2);
          if (SvROK(sv) && SvTYPE(SvRV(sv)) < SVt_PVAV)
          sv = SvRV(sv);
          if (!SvPOK(sv))
          do_confess(NEED_BINARY_DATA, 1);
          STRLEN len = SvCUR(sv);
          arg4 = SvPV_nolen(sv);
          arg3 = len;
        } else {
          arg4 = NULL;
          arg3 = 0;
        }
      }
    }
    if (items > 3) {
      res5 = SWIG_AsCharPtrAndSize(ST(3), &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);
    }
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)new_OGRGeometryShadow(arg1,arg2,arg3,arg4,arg5);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
    XSRETURN(argvi);
  fail:
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_ExportToWkt) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    char *argout2 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (char **argout2) */
      arg2 = &argout2;
    }
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_ExportToWkt(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRErr)OGRGeometryShadow_ExportToWkt(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    {
      /* %typemap(argout) (char **argout) */
      ST(argvi) = sv_newmortal();
      if ( arg2 ) {
        sv_setpv(ST(argvi), *arg2);
        SvUTF8_on(ST(argvi)); /* expecting UTF-8 from GDAL */
      }
      argvi++;
    }
    
    {
      /* %typemap(freearg) (char **argout) */
      if ( *arg2 )
      CPLFree( *arg2 );
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (char **argout) */
      if ( *arg2 )
      CPLFree( *arg2 );
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_ExportToIsoWkt) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    char *argout2 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (char **argout2) */
      arg2 = &argout2;
    }
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_ExportToIsoWkt(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRErr)OGRGeometryShadow_ExportToIsoWkt(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    {
      /* %typemap(argout) (char **argout) */
      ST(argvi) = sv_newmortal();
      if ( arg2 ) {
        sv_setpv(ST(argvi), *arg2);
        SvUTF8_on(ST(argvi)); /* expecting UTF-8 from GDAL */
      }
      argvi++;
    }
    
    {
      /* %typemap(freearg) (char **argout) */
      if ( *arg2 )
      CPLFree( *arg2 );
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (char **argout) */
      if ( *arg2 )
      CPLFree( *arg2 );
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry__ExportToWkb) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int *arg2 = (int *) 0 ;
    char **arg3 = (char **) 0 ;
    OGRwkbByteOrder arg4 = (OGRwkbByteOrder) wkbXDR ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int nLen2 = 0 ;
    char *pBuf2 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (int *nLen2, char **pBuf2 ) */
      arg2 = &nLen2;
      arg3 = &pBuf2;
    }
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: Geometry__ExportToWkb(self,pBuf,byte_order);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 (items > 1) {
      ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &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);
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRGeometryShadow_ExportToWkb(arg1,arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    {
      /* %typemap(argout) (int *nLen, char **pBuf ) */
      ST(argvi) = sv_2mortal(newSVpv( *arg3, *arg2 ));
      argvi++;
    }
    
    {
      /* %typemap(freearg) (int *nLen, char **pBuf ) */
      if( *arg2 ) {
        free( *arg3 );
      }
    }
    
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (int *nLen, char **pBuf ) */
      if( *arg2 ) {
        free( *arg3 );
      }
    }
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_ExportToIsoWkb) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int *arg2 = (int *) 0 ;
    char **arg3 = (char **) 0 ;
    OGRwkbByteOrder arg4 = (OGRwkbByteOrder) wkbXDR ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int nLen2 = 0 ;
    char *pBuf2 = 0 ;
    int val4 ;
    int ecode4 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (int *nLen2, char **pBuf2 ) */
      arg2 = &nLen2;
      arg3 = &pBuf2;
    }
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: Geometry_ExportToIsoWkb(self,pBuf,byte_order);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 (items > 1) {
      ecode4 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &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);
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRGeometryShadow_ExportToIsoWkb(arg1,arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    {
      /* %typemap(argout) (int *nLen, char **pBuf ) */
      ST(argvi) = sv_2mortal(newSVpv( *arg3, *arg2 ));
      argvi++;
    }
    
    {
      /* %typemap(freearg) (int *nLen, char **pBuf ) */
      if( *arg2 ) {
        free( *arg3 );
      }
    }
    
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) (int *nLen, char **pBuf ) */
      if( *arg2 ) {
        free( *arg3 );
      }
    }
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_ExportToGML) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    retStringAndCPLFree *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: Geometry_ExportToGML(self,options);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 (items > 1) {
      {
        /* %typemap(in) char **options */
        if (SvOK(ST(1))) {
          if (SvROK(ST(1))) {
            if (SvTYPE(SvRV(ST(1)))==SVt_PVAV) {
              AV *av = (AV*)(SvRV(ST(1)));
              for (int i = 0; i < av_len(av)+1; i++) {
                SV *sv = *(av_fetch(av, i, 0));
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg2 = CSLAddString(arg2, tmp);
                free(tmp);
              }
            } else if (SvTYPE(SvRV(ST(1)))==SVt_PVHV) {
              HV *hv = (HV*)SvRV(ST(1));
              SV *sv;
              char *key;
              I32 klen;
              arg2 = NULL;
              hv_iterinit(hv);
              while(sv = hv_iternextsv(hv, &key, &klen)) {
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg2 = CSLAddNameValue(arg2, key, tmp);
                free(tmp);
              }
            } else
            do_confess(NEED_REF, 1);
          } else
          do_confess(NEED_REF, 1);
        }
      }
    }
    {
      CPLErrorReset();
      result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToGML(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    
    /* %typemap(out) (retStringAndCPLFree*) */
    if(result)
    {
      ST(argvi) = SWIG_FromCharPtr((const char *)result);
      CPLFree(result);
    }
    else
    {
      ST(argvi) = &PL_sv_undef;
    }
    argvi++ ;
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg2) CSLDestroy( arg2 );
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) char **options */
      if (arg2) CSLDestroy( arg2 );
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_ExportToKML) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    char *arg2 = (char *) NULL ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 ;
    char *buf2 = 0 ;
    int alloc2 = 0 ;
    int argvi = 0;
    retStringAndCPLFree *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: Geometry_ExportToKML(self,altitude_mode);");
    }
    res1 = SWIG_ConvertPtr(ST(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 (items > 1) {
      res2 = SWIG_AsCharPtrAndSize(ST(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);
    }
    {
      CPLErrorReset();
      result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToKML(arg1,(char const *)arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    
    /* %typemap(out) (retStringAndCPLFree*) */
    if(result)
    {
      ST(argvi) = SWIG_FromCharPtr((const char *)result);
      CPLFree(result);
    }
    else
    {
      ST(argvi) = &PL_sv_undef;
    }
    argvi++ ;
    
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    XSRETURN(argvi);
  fail:
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_ExportToJson) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    retStringAndCPLFree *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: Geometry_ExportToJson(self,options);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 (items > 1) {
      {
        /* %typemap(in) char **options */
        if (SvOK(ST(1))) {
          if (SvROK(ST(1))) {
            if (SvTYPE(SvRV(ST(1)))==SVt_PVAV) {
              AV *av = (AV*)(SvRV(ST(1)));
              for (int i = 0; i < av_len(av)+1; i++) {
                SV *sv = *(av_fetch(av, i, 0));
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg2 = CSLAddString(arg2, tmp);
                free(tmp);
              }
            } else if (SvTYPE(SvRV(ST(1)))==SVt_PVHV) {
              HV *hv = (HV*)SvRV(ST(1));
              SV *sv;
              char *key;
              I32 klen;
              arg2 = NULL;
              hv_iterinit(hv);
              while(sv = hv_iternextsv(hv, &key, &klen)) {
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg2 = CSLAddNameValue(arg2, key, tmp);
                free(tmp);
              }
            } else
            do_confess(NEED_REF, 1);
          } else
          do_confess(NEED_REF, 1);
        }
      }
    }
    {
      CPLErrorReset();
      result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToJson(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    
    /* %typemap(out) (retStringAndCPLFree*) */
    if(result)
    {
      ST(argvi) = SWIG_FromCharPtr((const char *)result);
      CPLFree(result);
    }
    else
    {
      ST(argvi) = &PL_sv_undef;
    }
    argvi++ ;
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg2) CSLDestroy( arg2 );
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) char **options */
      if (arg2) CSLDestroy( arg2 );
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_AddPoint_3D) {
  {
    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 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 4)) {
      SWIG_croak("Usage: Geometry_AddPoint_3D(self,x,y,z);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_AddPoint_3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
    }
    arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_AddPoint_3D" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_AddPoint_3D" "', argument " "3"" of type '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    if (items > 3) {
      ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
      if (!SWIG_IsOK(ecode4)) {
        SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_AddPoint_3D" "', argument " "4"" of type '" "double""'");
      } 
      arg4 = static_cast< double >(val4);
    }
    {
      CPLErrorReset();
      OGRGeometryShadow_AddPoint(arg1,arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_AddPointM) {
  {
    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 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Geometry_AddPointM(self,x,y,m);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 SWIG_PERL_CALL_ARGS_2(ST(1), &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 SWIG_PERL_CALL_ARGS_2(ST(2), &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 SWIG_PERL_CALL_ARGS_2(ST(3), &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);
    {
      CPLErrorReset();
      OGRGeometryShadow_AddPointM(arg1,arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_AddPointZM) {
  {
    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 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Geometry_AddPointZM(self,x,y,z,m);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 SWIG_PERL_CALL_ARGS_2(ST(1), &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 SWIG_PERL_CALL_ARGS_2(ST(2), &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 SWIG_PERL_CALL_ARGS_2(ST(3), &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 SWIG_PERL_CALL_ARGS_2(ST(4), &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);
    {
      CPLErrorReset();
      OGRGeometryShadow_AddPointZM(arg1,arg2,arg3,arg4,arg5);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_AddPoint_2D) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double arg2 ;
    double arg3 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    double val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: Geometry_AddPoint_2D(self,x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRGeometryShadow_AddPoint_2D(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_AddGeometryDirectly) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_AddGeometryDirectly(self,other_disown);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRGeometryShadow_AddGeometryDirectly(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_AddGeometry) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_AddGeometry(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRGeometryShadow_AddGeometry(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Clone) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_Clone(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_Clone(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetGeometryType) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRwkbGeometryType result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_GetGeometryType(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRwkbGeometryType)OGRGeometryShadow_GetGeometryType(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetGeometryName) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_GetGeometryName(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRGeometryShadow_GetGeometryName(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Length) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_Length(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (double)OGRGeometryShadow_Length(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Area) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_Area(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (double)OGRGeometryShadow_Area(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetArea) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_GetArea(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (double)OGRGeometryShadow_GetArea(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetPointCount) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_GetPointCount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRGeometryShadow_GetPointCount(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetX) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 = (int) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: Geometry_GetX(self,point);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 (items > 1) {
      ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &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);
    }
    {
      CPLErrorReset();
      result = (double)OGRGeometryShadow_GetX(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetY) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 = (int) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: Geometry_GetY(self,point);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 (items > 1) {
      ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &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);
    }
    {
      CPLErrorReset();
      result = (double)OGRGeometryShadow_GetY(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetZ) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 = (int) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: Geometry_GetZ(self,point);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 (items > 1) {
      ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &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);
    }
    {
      CPLErrorReset();
      result = (double)OGRGeometryShadow_GetZ(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetM) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 = (int) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: Geometry_GetM(self,point);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 (items > 1) {
      ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &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);
    }
    {
      CPLErrorReset();
      result = (double)OGRGeometryShadow_GetM(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetPoint_3D) {
  {
    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] ;
    int argvi = 0;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (double argout3[ANY]) */
      arg3 = argout3;
    }
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: Geometry_GetPoint_3D(self,iPoint);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_GetPoint_3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
    }
    arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
    if (items > 1) {
      ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
      if (!SWIG_IsOK(ecode2)) {
        SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_GetPoint_3D" "', argument " "2"" of type '" "int""'");
      } 
      arg2 = static_cast< int >(val2);
    }
    {
      CPLErrorReset();
      OGRGeometryShadow_GetPoint(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    {
      /* %typemap(argout) (double argout[ANY]) */
      if (GIMME_V == G_ARRAY) {
        /* return a list */
        int i;
        EXTEND(SP, argvi+3-items+1);
        for (i = 0; i < 3; i++)
        ST(argvi++) = sv_2mortal(newSVnv(arg3[i]));
      } else {
        ST(argvi) = CreateArrayFromDoubleArray( arg3, 3 );
        argvi++;
      }
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetPointZM) {
  {
    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] ;
    int argvi = 0;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (double argout3[ANY]) */
      arg3 = argout3;
    }
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: Geometry_GetPointZM(self,iPoint);");
    }
    res1 = SWIG_ConvertPtr(ST(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 (items > 1) {
      ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    }
    {
      CPLErrorReset();
      OGRGeometryShadow_GetPointZM(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    {
      /* %typemap(argout) (double argout[ANY]) */
      if (GIMME_V == G_ARRAY) {
        /* return a list */
        int i;
        EXTEND(SP, argvi+4-items+1);
        for (i = 0; i < 4; i++)
        ST(argvi++) = sv_2mortal(newSVnv(arg3[i]));
      } else {
        ST(argvi) = CreateArrayFromDoubleArray( arg3, 4 );
        argvi++;
      }
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetPoint_2D) {
  {
    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] ;
    int argvi = 0;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (double argout3[ANY]) */
      arg3 = argout3;
    }
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: Geometry_GetPoint_2D(self,iPoint);");
    }
    res1 = SWIG_ConvertPtr(ST(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 (items > 1) {
      ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    }
    {
      CPLErrorReset();
      OGRGeometryShadow_GetPoint_2D(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    {
      /* %typemap(argout) (double argout[ANY]) */
      if (GIMME_V == G_ARRAY) {
        /* return a list */
        int i;
        EXTEND(SP, argvi+2-items+1);
        for (i = 0; i < 2; i++)
        ST(argvi++) = sv_2mortal(newSVnv(arg3[i]));
      } else {
        ST(argvi) = CreateArrayFromDoubleArray( arg3, 2 );
        argvi++;
      }
    }
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetGeometryCount) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_GetGeometryCount(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRGeometryShadow_GetGeometryCount(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_SetPoint_3D) {
  {
    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 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 5)) {
      SWIG_croak("Usage: Geometry_SetPoint_3D(self,point,x,y,z);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_SetPoint_3D" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
    }
    arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_SetPoint_3D" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = static_cast< int >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_SetPoint_3D" "', argument " "3"" of type '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
    if (!SWIG_IsOK(ecode4)) {
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_SetPoint_3D" "', argument " "4"" of type '" "double""'");
    } 
    arg4 = static_cast< double >(val4);
    if (items > 4) {
      ecode5 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(4), &val5);
      if (!SWIG_IsOK(ecode5)) {
        SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Geometry_SetPoint_3D" "', argument " "5"" of type '" "double""'");
      } 
      arg5 = static_cast< double >(val5);
    }
    {
      CPLErrorReset();
      OGRGeometryShadow_SetPoint(arg1,arg2,arg3,arg4,arg5);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_SetPointM) {
  {
    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 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 5) || (items > 5)) {
      SWIG_croak("Usage: Geometry_SetPointM(self,point,x,y,m);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 SWIG_PERL_CALL_ARGS_2(ST(1), &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 SWIG_PERL_CALL_ARGS_2(ST(2), &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 SWIG_PERL_CALL_ARGS_2(ST(3), &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 SWIG_PERL_CALL_ARGS_2(ST(4), &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);
    {
      CPLErrorReset();
      OGRGeometryShadow_SetPointM(arg1,arg2,arg3,arg4,arg5);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_SetPointZM) {
  {
    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 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 6) || (items > 6)) {
      SWIG_croak("Usage: Geometry_SetPointZM(self,point,x,y,z,m);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 SWIG_PERL_CALL_ARGS_2(ST(1), &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 SWIG_PERL_CALL_ARGS_2(ST(2), &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 SWIG_PERL_CALL_ARGS_2(ST(3), &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 SWIG_PERL_CALL_ARGS_2(ST(4), &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 SWIG_PERL_CALL_ARGS_2(ST(5), &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);
    {
      CPLErrorReset();
      OGRGeometryShadow_SetPointZM(arg1,arg2,arg3,arg4,arg5,arg6);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_SetPoint_2D) {
  {
    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 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 4) || (items > 4)) {
      SWIG_croak("Usage: Geometry_SetPoint_2D(self,point,x,y);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 SWIG_PERL_CALL_ARGS_2(ST(1), &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 SWIG_PERL_CALL_ARGS_2(ST(2), &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 SWIG_PERL_CALL_ARGS_2(ST(3), &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);
    {
      CPLErrorReset();
      OGRGeometryShadow_SetPoint_2D(arg1,arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetGeometryRef) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_GetGeometryRef(self,geom);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_GetGeometryRef(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, 0 | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Simplify) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Simplify(self,tolerance);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_Simplify(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_SimplifyPreserveTopology) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_SimplifyPreserveTopology(self,tolerance);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_SimplifyPreserveTopology(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_DelaunayTriangulation) {
  {
    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 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 3)) {
      SWIG_croak("Usage: Geometry_DelaunayTriangulation(self,dfTolerance,bOnlyEdges);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 (items > 1) {
      ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &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 (items > 2) {
      ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(2), &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);
    }
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_DelaunayTriangulation(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Boundary) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_Boundary(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_Boundary(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetBoundary) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_GetBoundary(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_GetBoundary(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_ConvexHull) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_ConvexHull(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_ConvexHull(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Buffer) {
  {
    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 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 3)) {
      SWIG_croak("Usage: Geometry_Buffer(self,distance,quadsecs);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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 (items > 2) {
      ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    }
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_Buffer(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Intersection) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Intersection(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_Intersection(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Union) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Union(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_Union(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_UnionCascaded) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_UnionCascaded(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_UnionCascaded(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Difference) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Difference(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_Difference(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_SymDifference) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_SymDifference(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_SymDifference(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_SymmetricDifference) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_SymmetricDifference(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_SymmetricDifference(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Distance) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    double result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Distance(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (double)OGRGeometryShadow_Distance(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_double  SWIG_PERL_CALL_ARGS_1(static_cast< double >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Empty) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_Empty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      OGRGeometryShadow_Empty(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_IsEmpty) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_IsEmpty(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (bool)OGRGeometryShadow_IsEmpty(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_IsValid) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_IsValid(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (bool)OGRGeometryShadow_IsValid(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_IsSimple) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_IsSimple(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (bool)OGRGeometryShadow_IsSimple(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_IsRing) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_IsRing(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (bool)OGRGeometryShadow_IsRing(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Intersects) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Intersects(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (bool)OGRGeometryShadow_Intersects(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Intersect) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Intersect(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (bool)OGRGeometryShadow_Intersect(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Equals) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Equals(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (bool)OGRGeometryShadow_Equals(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Equal) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Equal(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (bool)OGRGeometryShadow_Equal(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Disjoint) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Disjoint(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (bool)OGRGeometryShadow_Disjoint(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Touches) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Touches(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (bool)OGRGeometryShadow_Touches(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Crosses) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Crosses(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (bool)OGRGeometryShadow_Crosses(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Within) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Within(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (bool)OGRGeometryShadow_Within(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Contains) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Contains(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (bool)OGRGeometryShadow_Contains(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Overlaps) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    bool result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Overlaps(self,other);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (bool)OGRGeometryShadow_Overlaps(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_bool  SWIG_PERL_CALL_ARGS_1(static_cast< bool >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_TransformTo) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_TransformTo(self,reference);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRGeometryShadow_TransformTo(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Transform) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OSRCoordinateTransformationShadow *arg2 = (OSRCoordinateTransformationShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Transform(self,trans);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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.");
      }
    }
    {
      CPLErrorReset();
      result = (OGRErr)OGRGeometryShadow_Transform(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetSpatialReference) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OSRSpatialReferenceShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_GetSpatialReference(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OSRSpatialReferenceShadow *)OGRGeometryShadow_GetSpatialReference(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_AssignSpatialReference) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    void *argp2 = 0 ;
    int res2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_AssignSpatialReference(self,reference);");
    }
    res1 = SWIG_ConvertPtr(ST(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(ST(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);
    {
      CPLErrorReset();
      OGRGeometryShadow_AssignSpatialReference(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_CloseRings) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_CloseRings(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      OGRGeometryShadow_CloseRings(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_FlattenTo2D) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_FlattenTo2D(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      OGRGeometryShadow_FlattenTo2D(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Segmentize) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Segmentize(self,dfMaxLength);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRGeometryShadow_Segmentize(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetEnvelope) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double *arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double argout2[4] ;
    int argvi = 0;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (double argout2[ANY]) */
      arg2 = argout2;
    }
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_GetEnvelope(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      OGRGeometryShadow_GetEnvelope(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    {
      /* %typemap(argout) (double argout[ANY]) */
      if (GIMME_V == G_ARRAY) {
        /* return a list */
        int i;
        EXTEND(SP, argvi+4-items+1);
        for (i = 0; i < 4; i++)
        ST(argvi++) = sv_2mortal(newSVnv(arg2[i]));
      } else {
        ST(argvi) = CreateArrayFromDoubleArray( arg2, 4 );
        argvi++;
      }
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetEnvelope3D) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double *arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double argout2[6] ;
    int argvi = 0;
    dXSARGS;
    
    {
      /* %typemap(in,numinputs=0) (double argout2[ANY]) */
      arg2 = argout2;
    }
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_GetEnvelope3D(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      OGRGeometryShadow_GetEnvelope3D(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    {
      /* %typemap(argout) (double argout[ANY]) */
      if (GIMME_V == G_ARRAY) {
        /* return a list */
        int i;
        EXTEND(SP, argvi+6-items+1);
        for (i = 0; i < 6; i++)
        ST(argvi++) = sv_2mortal(newSVnv(arg2[i]));
      } else {
        ST(argvi) = CreateArrayFromDoubleArray( arg2, 6 );
        argvi++;
      }
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Centroid) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_Centroid(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_Centroid(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_PointOnSurface) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_PointOnSurface(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_PointOnSurface(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_WkbSize) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_WkbSize(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRGeometryShadow_WkbSize(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetCoordinateDimension) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_GetCoordinateDimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRGeometryShadow_GetCoordinateDimension(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_CoordinateDimension) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_CoordinateDimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRGeometryShadow_CoordinateDimension(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Is3D) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_Is3D(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRGeometryShadow_Is3D(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_IsMeasured) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_IsMeasured(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRGeometryShadow_IsMeasured(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_SetCoordinateDimension) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_SetCoordinateDimension(self,dimension);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRGeometryShadow_SetCoordinateDimension(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Set3D) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Set3D(self,b3D);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRGeometryShadow_Set3D(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_SetMeasured) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_SetMeasured(self,bMeasured);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRGeometryShadow_SetMeasured(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetDimension) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: Geometry_GetDimension(self);");
    }
    res1 = SWIG_ConvertPtr(ST(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);
    {
      CPLErrorReset();
      result = (int)OGRGeometryShadow_GetDimension(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_HasCurveGeometry) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 = (int) FALSE ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: Geometry_HasCurveGeometry(self,bLookForCircular);");
    }
    res1 = SWIG_ConvertPtr(ST(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 (items > 1) {
      ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    }
    {
      CPLErrorReset();
      result = (int)OGRGeometryShadow_HasCurveGeometry(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetLinearGeometry) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double arg2 = (double) 0.0 ;
    char **arg3 = (char **) NULL ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 3)) {
      SWIG_croak("Usage: Geometry_GetLinearGeometry(self,dfMaxAngleStepSizeDegrees,options);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 (items > 1) {
      ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &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 (items > 2) {
      {
        /* %typemap(in) char **options */
        if (SvOK(ST(2))) {
          if (SvROK(ST(2))) {
            if (SvTYPE(SvRV(ST(2)))==SVt_PVAV) {
              AV *av = (AV*)(SvRV(ST(2)));
              for (int i = 0; i < av_len(av)+1; i++) {
                SV *sv = *(av_fetch(av, i, 0));
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg3 = CSLAddString(arg3, tmp);
                free(tmp);
              }
            } else if (SvTYPE(SvRV(ST(2)))==SVt_PVHV) {
              HV *hv = (HV*)SvRV(ST(2));
              SV *sv;
              char *key;
              I32 klen;
              arg3 = NULL;
              hv_iterinit(hv);
              while(sv = hv_iternextsv(hv, &key, &klen)) {
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg3 = CSLAddNameValue(arg3, key, tmp);
                free(tmp);
              }
            } else
            do_confess(NEED_REF, 1);
          } else
          do_confess(NEED_REF, 1);
        }
      }
    }
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_GetLinearGeometry(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg3) CSLDestroy( arg3 );
    }
    XSRETURN(argvi);
  fail:
    
    
    {
      /* %typemap(freearg) char **options */
      if (arg3) CSLDestroy( arg3 );
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_GetCurveGeometry) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    char **arg2 = (char **) NULL ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 2)) {
      SWIG_croak("Usage: Geometry_GetCurveGeometry(self,options);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &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 (items > 1) {
      {
        /* %typemap(in) char **options */
        if (SvOK(ST(1))) {
          if (SvROK(ST(1))) {
            if (SvTYPE(SvRV(ST(1)))==SVt_PVAV) {
              AV *av = (AV*)(SvRV(ST(1)));
              for (int i = 0; i < av_len(av)+1; i++) {
                SV *sv = *(av_fetch(av, i, 0));
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg2 = CSLAddString(arg2, tmp);
                free(tmp);
              }
            } else if (SvTYPE(SvRV(ST(1)))==SVt_PVHV) {
              HV *hv = (HV*)SvRV(ST(1));
              SV *sv;
              char *key;
              I32 klen;
              arg2 = NULL;
              hv_iterinit(hv);
              while(sv = hv_iternextsv(hv, &key, &klen)) {
                char *tmp = sv_to_utf8_string(sv, NULL);
                arg2 = CSLAddNameValue(arg2, key, tmp);
                free(tmp);
              }
            } else
            do_confess(NEED_REF, 1);
          } else
          do_confess(NEED_REF, 1);
        }
      }
    }
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_GetCurveGeometry(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    {
      /* %typemap(freearg) char **options */
      if (arg2) CSLDestroy( arg2 );
    }
    XSRETURN(argvi);
  fail:
    
    {
      /* %typemap(freearg) char **options */
      if (arg2) CSLDestroy( arg2 );
    }
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Value) {
  {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double arg2 ;
    void *argp1 = 0 ;
    int res1 = 0 ;
    double val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    OGRGeometryShadow *result = 0 ;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: Geometry_Value(self,dfDistance);");
    }
    res1 = SWIG_ConvertPtr(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRGeometryShadow *)OGRGeometryShadow_Value(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_OWNER | SWIG_SHADOW); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_Geometry_Move) {
  {
    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 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 3) || (items > 4)) {
      SWIG_croak("Usage: Geometry_Move(self,dx,dy,dz);");
    }
    res1 = SWIG_ConvertPtr(ST(0), &argp1,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Geometry_Move" "', argument " "1"" of type '" "OGRGeometryShadow *""'"); 
    }
    arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1);
    ecode2 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(1), &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Geometry_Move" "', argument " "2"" of type '" "double""'");
    } 
    arg2 = static_cast< double >(val2);
    ecode3 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(2), &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Geometry_Move" "', argument " "3"" of type '" "double""'");
    } 
    arg3 = static_cast< double >(val3);
    if (items > 3) {
      ecode4 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(3), &val4);
      if (!SWIG_IsOK(ecode4)) {
        SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Geometry_Move" "', argument " "4"" of type '" "double""'");
      } 
      arg4 = static_cast< double >(val4);
    }
    {
      CPLErrorReset();
      OGRGeometryShadow_Move(arg1,arg2,arg3,arg4);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_GetDriverCount) {
  {
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: GetDriverCount();");
    }
    {
      CPLErrorReset();
      result = (int)OGRGetDriverCount();
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_GetOpenDSCount) {
  {
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: GetOpenDSCount();");
    }
    {
      CPLErrorReset();
      result = (int)OGRGetOpenDSCount();
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_SetGenerate_DB2_V72_BYTE_ORDER) {
  {
    int arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    OGRErr result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SetGenerate_DB2_V72_BYTE_ORDER(bGenerate_DB2_V72_BYTE_ORDER);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRErr)OGRSetGenerate_DB2_V72_BYTE_ORDER(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) OGRErr */
      if ( result != 0 ) {
        const char *err = CPLGetLastErrorMsg();
        if (err and *err) do_confess(err, 0); /* this is usually better */
        do_confess( OGRErrMessages(result), 1 );
      }
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_RegisterAll) {
  {
    int argvi = 0;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: RegisterAll();");
    }
    {
      CPLErrorReset();
      OGRRegisterAll();
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_GeometryTypeToName) {
  {
    OGRwkbGeometryType arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GeometryTypeToName(eType);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGRGeometryTypeToName(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GetFieldTypeName) {
  {
    OGRFieldType arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GetFieldTypeName(type);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGR_GetFieldTypeName(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GetFieldSubTypeName) {
  {
    OGRFieldSubType arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    char *result = 0 ;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GetFieldSubTypeName(type);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (char *)OGR_GetFieldSubTypeName(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) const char * */
      ST(argvi) = newSVpv(result, 0);
      SvUTF8_on(ST(argvi)); /* expecting GDAL to give us UTF-8 */
      sv_2mortal(ST(argvi));
      argvi++;
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GT_Flatten) {
  {
    OGRwkbGeometryType arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    OGRwkbGeometryType result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GT_Flatten(eType);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRwkbGeometryType)OGR_GT_Flatten(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GT_SetZ) {
  {
    OGRwkbGeometryType arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    OGRwkbGeometryType result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GT_SetZ(eType);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRwkbGeometryType)OGR_GT_SetZ(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GT_SetM) {
  {
    OGRwkbGeometryType arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    OGRwkbGeometryType result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GT_SetM(eType);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRwkbGeometryType)OGR_GT_SetM(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GT_SetModifier) {
  {
    int arg1 ;
    int arg2 ;
    int arg3 ;
    int val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int val3 ;
    int ecode3 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 3) || (items > 3)) {
      SWIG_croak("Usage: GT_SetModifier(eType,bSetZ,bSetM);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(0), &val1);
    if (!SWIG_IsOK(ecode1)) {
      SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "GT_SetModifier" "', argument " "1"" of type '" "int""'");
    } 
    arg1 = static_cast< int >(val1);
    ecode2 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    ecode3 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (int)GT_SetModifier(arg1,arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    
    
    XSRETURN(argvi);
  fail:
    
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_GT_HasZ) {
  {
    OGRwkbGeometryType arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GT_HasZ(eType);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (int)OGR_GT_HasZ(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GT_HasM) {
  {
    OGRwkbGeometryType arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GT_HasM(eType);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (int)OGR_GT_HasM(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GT_IsSubClassOf) {
  {
    OGRwkbGeometryType arg1 ;
    OGRwkbGeometryType arg2 ;
    int val1 ;
    int ecode1 = 0 ;
    int val2 ;
    int ecode2 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 2) || (items > 2)) {
      SWIG_croak("Usage: GT_IsSubClassOf(eType,eSuperType);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (int)OGR_GT_IsSubClassOf(arg1,arg2);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    
    XSRETURN(argvi);
  fail:
    
    
    SWIG_croak_null();
  }
}


XS(_wrap_GT_IsCurve) {
  {
    OGRwkbGeometryType arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GT_IsCurve(OGRwkbGeometryType);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (int)OGR_GT_IsCurve(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GT_IsSurface) {
  {
    OGRwkbGeometryType arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GT_IsSurface(OGRwkbGeometryType);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (int)OGR_GT_IsSurface(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GT_IsNonLinear) {
  {
    OGRwkbGeometryType arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GT_IsNonLinear(OGRwkbGeometryType);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (int)OGR_GT_IsNonLinear(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GT_GetCollection) {
  {
    OGRwkbGeometryType arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    OGRwkbGeometryType result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GT_GetCollection(eType);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRwkbGeometryType)OGR_GT_GetCollection(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GT_GetCurve) {
  {
    OGRwkbGeometryType arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    OGRwkbGeometryType result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GT_GetCurve(eType);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRwkbGeometryType)OGR_GT_GetCurve(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GT_GetLinear) {
  {
    OGRwkbGeometryType arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    OGRwkbGeometryType result;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: GT_GetLinear(eType);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      result = (OGRwkbGeometryType)OGR_GT_GetLinear(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_SetNonLinearGeometriesEnabledFlag) {
  {
    int arg1 ;
    int val1 ;
    int ecode1 = 0 ;
    int argvi = 0;
    dXSARGS;
    
    if ((items < 1) || (items > 1)) {
      SWIG_croak("Usage: SetNonLinearGeometriesEnabledFlag(bFlag);");
    }
    ecode1 = SWIG_AsVal_int SWIG_PERL_CALL_ARGS_2(ST(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);
    {
      CPLErrorReset();
      OGRSetNonLinearGeometriesEnabledFlag(arg1);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    {
      /* %typemap(out) void */
    }
    
    XSRETURN(argvi);
  fail:
    
    SWIG_croak_null();
  }
}


XS(_wrap_GetNonLinearGeometriesEnabledFlag) {
  {
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 0) || (items > 0)) {
      SWIG_croak("Usage: GetNonLinearGeometriesEnabledFlag();");
    }
    {
      CPLErrorReset();
      result = (int)OGRGetNonLinearGeometriesEnabledFlag();
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    XSRETURN(argvi);
  fail:
    SWIG_croak_null();
  }
}


XS(_wrap_TermProgress_nocb) {
  {
    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 ;
    int argvi = 0;
    int result;
    dXSARGS;
    
    if ((items < 1) || (items > 3)) {
      SWIG_croak("Usage: TermProgress_nocb(dfProgress,pszMessage,pData);");
    }
    ecode1 = SWIG_AsVal_double SWIG_PERL_CALL_ARGS_2(ST(0), &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 (items > 1) {
      res2 = SWIG_AsCharPtrAndSize(ST(1), &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 (items > 2) {
      res3 = SWIG_ConvertPtr(ST(2),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 *""'"); 
      }
    }
    {
      CPLErrorReset();
      result = (int)GDALTermProgress_nocb(arg1,(char const *)arg2,arg3);
      CPLErr eclass = CPLGetLastErrorType();
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
        do_confess( CPLGetLastErrorMsg(), 0 );
        
        
        
        
        
      }
      
      
      /*
          Make warnings regular Perl warnings. This duplicates the warning
          message if DontUseExceptions() is in effect (it is not by default).
          */
      if ( eclass == CE_Warning ) {
        warn( CPLGetLastErrorMsg(), "%s" );
      }
      
      
    }
    ST(argvi) = SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(result)); argvi++ ;
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    
    XSRETURN(argvi);
  fail:
    
    if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
    
    SWIG_croak_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_GDALMajorObjectShadow = {"_p_GDALMajorObjectShadow", "GDALMajorObjectShadow *", 0, 0, (void*)"Geo::GDAL::MajorObject", 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_OGRFeatureDefnShadow = {"_p_OGRFeatureDefnShadow", "OGRFeatureDefnShadow *", 0, 0, (void*)"Geo::OGR::FeatureDefn", 0};
static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, (void*)"Geo::OGR::Feature", 0};
static swig_type_info _swigt__p_OGRFieldDefnShadow = {"_p_OGRFieldDefnShadow", "OGRFieldDefnShadow *", 0, 0, (void*)"Geo::OGR::FieldDefn", 0};
static swig_type_info _swigt__p_OGRGeomFieldDefnShadow = {"_p_OGRGeomFieldDefnShadow", "OGRGeomFieldDefnShadow *", 0, 0, (void*)"Geo::OGR::GeomFieldDefn", 0};
static swig_type_info _swigt__p_OGRGeometryShadow = {"_p_OGRGeometryShadow", "OGRGeometryShadow *", 0, 0, (void*)"Geo::OGR::Geometry", 0};
static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)"Geo::OGR::Layer", 0};
static swig_type_info _swigt__p_OGRStyleTableShadow = {"_p_OGRStyleTableShadow", "OGRStyleTableShadow *", 0, 0, (void*)"Geo::OGR::StyleTable", 0};
static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)"Geo::OSR::CoordinateTransformation", 0};
static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)"Geo::OSR::SpatialReference", 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_double_p_q_const__char_p_void__int = {"_p_f_double_p_q_const__char_p_void__int", "int (*)(double,char const *,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_float = {"_p_float", "float *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "OGRFieldSubType *|OGRFieldType *|int *|OGRwkbGeometryType *|OGRJustification *|OGRAxisOrientation *|OGRwkbByteOrder *|OGRErr *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_GIntBig = {"_p_p_GIntBig", "GIntBig **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_p_char = {"_p_p_p_char", "char ***", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_GDALMajorObjectShadow,
  &_swigt__p_GDALProgressFunc,
  &_swigt__p_GIntBig,
  &_swigt__p_OGRFeatureDefnShadow,
  &_swigt__p_OGRFeatureShadow,
  &_swigt__p_OGRFieldDefnShadow,
  &_swigt__p_OGRGeomFieldDefnShadow,
  &_swigt__p_OGRGeometryShadow,
  &_swigt__p_OGRLayerShadow,
  &_swigt__p_OGRStyleTableShadow,
  &_swigt__p_OSRCoordinateTransformationShadow,
  &_swigt__p_OSRSpatialReferenceShadow,
  &_swigt__p_char,
  &_swigt__p_double,
  &_swigt__p_f_double_p_q_const__char_p_void__int,
  &_swigt__p_float,
  &_swigt__p_int,
  &_swigt__p_p_GIntBig,
  &_swigt__p_p_char,
  &_swigt__p_p_double,
  &_swigt__p_p_int,
  &_swigt__p_p_p_char,
};

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_OGRFeatureDefnShadow[] = {  {&_swigt__p_OGRFeatureDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRFeatureShadow[] = {  {&_swigt__p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRFieldDefnShadow[] = {  {&_swigt__p_OGRFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRGeomFieldDefnShadow[] = {  {&_swigt__p_OGRGeomFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRGeometryShadow[] = {  {&_swigt__p_OGRGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRLayerShadow[] = {  {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRStyleTableShadow[] = {  {&_swigt__p_OGRStyleTableShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = {  {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_double_p_q_const__char_p_void__int[] = {  {&_swigt__p_f_double_p_q_const__char_p_void__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_float[] = {  {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_GIntBig[] = {  {&_swigt__p_p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_double[] = {  {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_int[] = {  {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_p_char[] = {  {&_swigt__p_p_p_char, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_GDALMajorObjectShadow,
  _swigc__p_GDALProgressFunc,
  _swigc__p_GIntBig,
  _swigc__p_OGRFeatureDefnShadow,
  _swigc__p_OGRFeatureShadow,
  _swigc__p_OGRFieldDefnShadow,
  _swigc__p_OGRGeomFieldDefnShadow,
  _swigc__p_OGRGeometryShadow,
  _swigc__p_OGRLayerShadow,
  _swigc__p_OGRStyleTableShadow,
  _swigc__p_OSRCoordinateTransformationShadow,
  _swigc__p_OSRSpatialReferenceShadow,
  _swigc__p_char,
  _swigc__p_double,
  _swigc__p_f_double_p_q_const__char_p_void__int,
  _swigc__p_float,
  _swigc__p_int,
  _swigc__p_p_GIntBig,
  _swigc__p_p_char,
  _swigc__p_p_double,
  _swigc__p_p_int,
  _swigc__p_p_p_char,
};


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

static swig_constant_info swig_constants[] = {
{0,0,0,0,0,0}
};
#ifdef __cplusplus
}
#endif
static swig_variable_info swig_variables[] = {
{0,0,0,0}
};
static swig_command_info swig_commands[] = {
{"Geo::OGRc::UseExceptions", _wrap_UseExceptions},
{"Geo::OGRc::DontUseExceptions", _wrap_DontUseExceptions},
{"Geo::OGRc::new_StyleTable", _wrap_new_StyleTable},
{"Geo::OGRc::delete_StyleTable", _wrap_delete_StyleTable},
{"Geo::OGRc::StyleTable_AddStyle", _wrap_StyleTable_AddStyle},
{"Geo::OGRc::StyleTable_LoadStyleTable", _wrap_StyleTable_LoadStyleTable},
{"Geo::OGRc::StyleTable_SaveStyleTable", _wrap_StyleTable_SaveStyleTable},
{"Geo::OGRc::StyleTable_Find", _wrap_StyleTable_Find},
{"Geo::OGRc::StyleTable_ResetStyleStringReading", _wrap_StyleTable_ResetStyleStringReading},
{"Geo::OGRc::StyleTable_GetNextStyle", _wrap_StyleTable_GetNextStyle},
{"Geo::OGRc::StyleTable_GetLastStyleName", _wrap_StyleTable_GetLastStyleName},
{"Geo::OGRc::Layer_GetRefCount", _wrap_Layer_GetRefCount},
{"Geo::OGRc::Layer_SetSpatialFilter", _wrap_Layer_SetSpatialFilter},
{"Geo::OGRc::Layer_SetSpatialFilterRect", _wrap_Layer_SetSpatialFilterRect},
{"Geo::OGRc::Layer_GetSpatialFilter", _wrap_Layer_GetSpatialFilter},
{"Geo::OGRc::Layer_SetAttributeFilter", _wrap_Layer_SetAttributeFilter},
{"Geo::OGRc::Layer_ResetReading", _wrap_Layer_ResetReading},
{"Geo::OGRc::Layer_GetName", _wrap_Layer_GetName},
{"Geo::OGRc::Layer_GetGeomType", _wrap_Layer_GetGeomType},
{"Geo::OGRc::Layer_GetGeometryColumn", _wrap_Layer_GetGeometryColumn},
{"Geo::OGRc::Layer_GetFIDColumn", _wrap_Layer_GetFIDColumn},
{"Geo::OGRc::Layer__GetFeature", _wrap_Layer__GetFeature},
{"Geo::OGRc::Layer_GetNextFeature", _wrap_Layer_GetNextFeature},
{"Geo::OGRc::Layer_SetNextByIndex", _wrap_Layer_SetNextByIndex},
{"Geo::OGRc::Layer_SetFeature", _wrap_Layer_SetFeature},
{"Geo::OGRc::Layer_CreateFeature", _wrap_Layer_CreateFeature},
{"Geo::OGRc::Layer_DeleteFeature", _wrap_Layer_DeleteFeature},
{"Geo::OGRc::Layer_SyncToDisk", _wrap_Layer_SyncToDisk},
{"Geo::OGRc::Layer_GetLayerDefn", _wrap_Layer_GetLayerDefn},
{"Geo::OGRc::Layer_GetFeatureCount", _wrap_Layer_GetFeatureCount},
{"Geo::OGRc::Layer_GetExtent", _wrap_Layer_GetExtent},
{"Geo::OGRc::Layer__TestCapability", _wrap_Layer__TestCapability},
{"Geo::OGRc::Layer__CreateField", _wrap_Layer__CreateField},
{"Geo::OGRc::Layer__DeleteField", _wrap_Layer__DeleteField},
{"Geo::OGRc::Layer_ReorderField", _wrap_Layer_ReorderField},
{"Geo::OGRc::Layer_ReorderFields", _wrap_Layer_ReorderFields},
{"Geo::OGRc::Layer__AlterFieldDefn", _wrap_Layer__AlterFieldDefn},
{"Geo::OGRc::Layer_CreateGeomField", _wrap_Layer_CreateGeomField},
{"Geo::OGRc::Layer_StartTransaction", _wrap_Layer_StartTransaction},
{"Geo::OGRc::Layer_CommitTransaction", _wrap_Layer_CommitTransaction},
{"Geo::OGRc::Layer_RollbackTransaction", _wrap_Layer_RollbackTransaction},
{"Geo::OGRc::Layer_FindFieldIndex", _wrap_Layer_FindFieldIndex},
{"Geo::OGRc::Layer_GetSpatialRef", _wrap_Layer_GetSpatialRef},
{"Geo::OGRc::Layer_GetFeaturesRead", _wrap_Layer_GetFeaturesRead},
{"Geo::OGRc::Layer_SetIgnoredFields", _wrap_Layer_SetIgnoredFields},
{"Geo::OGRc::Layer_Intersection", _wrap_Layer_Intersection},
{"Geo::OGRc::Layer_Union", _wrap_Layer_Union},
{"Geo::OGRc::Layer_SymDifference", _wrap_Layer_SymDifference},
{"Geo::OGRc::Layer_Identity", _wrap_Layer_Identity},
{"Geo::OGRc::Layer_Update", _wrap_Layer_Update},
{"Geo::OGRc::Layer_Clip", _wrap_Layer_Clip},
{"Geo::OGRc::Layer_Erase", _wrap_Layer_Erase},
{"Geo::OGRc::Layer_GetStyleTable", _wrap_Layer_GetStyleTable},
{"Geo::OGRc::Layer_SetStyleTable", _wrap_Layer_SetStyleTable},
{"Geo::OGRc::delete_Feature", _wrap_delete_Feature},
{"Geo::OGRc::new_Feature", _wrap_new_Feature},
{"Geo::OGRc::Feature_GetDefnRef", _wrap_Feature_GetDefnRef},
{"Geo::OGRc::Feature__SetGeometry", _wrap_Feature__SetGeometry},
{"Geo::OGRc::Feature_SetGeometryDirectly", _wrap_Feature_SetGeometryDirectly},
{"Geo::OGRc::Feature_GetGeometryRef", _wrap_Feature_GetGeometryRef},
{"Geo::OGRc::Feature_SetGeomField", _wrap_Feature_SetGeomField},
{"Geo::OGRc::Feature_SetGeomFieldDirectly", _wrap_Feature_SetGeomFieldDirectly},
{"Geo::OGRc::Feature_GetGeomFieldRef", _wrap_Feature_GetGeomFieldRef},
{"Geo::OGRc::Feature_Clone", _wrap_Feature_Clone},
{"Geo::OGRc::Feature_Equal", _wrap_Feature_Equal},
{"Geo::OGRc::Feature_GetFieldCount", _wrap_Feature_GetFieldCount},
{"Geo::OGRc::Feature_GetFieldDefnRef", _wrap_Feature_GetFieldDefnRef},
{"Geo::OGRc::Feature_GetGeomFieldCount", _wrap_Feature_GetGeomFieldCount},
{"Geo::OGRc::Feature_GetGeomFieldDefnRef", _wrap_Feature_GetGeomFieldDefnRef},
{"Geo::OGRc::Feature_GetFieldAsString", _wrap_Feature_GetFieldAsString},
{"Geo::OGRc::Feature_GetFieldAsInteger", _wrap_Feature_GetFieldAsInteger},
{"Geo::OGRc::Feature_GetFieldAsInteger64", _wrap_Feature_GetFieldAsInteger64},
{"Geo::OGRc::Feature_GetFieldAsDouble", _wrap_Feature_GetFieldAsDouble},
{"Geo::OGRc::Feature_GetFieldAsDateTime", _wrap_Feature_GetFieldAsDateTime},
{"Geo::OGRc::Feature_GetFieldAsIntegerList", _wrap_Feature_GetFieldAsIntegerList},
{"Geo::OGRc::Feature_GetFieldAsInteger64List", _wrap_Feature_GetFieldAsInteger64List},
{"Geo::OGRc::Feature_GetFieldAsDoubleList", _wrap_Feature_GetFieldAsDoubleList},
{"Geo::OGRc::Feature_GetFieldAsStringList", _wrap_Feature_GetFieldAsStringList},
{"Geo::OGRc::Feature_GetFieldAsBinary", _wrap_Feature_GetFieldAsBinary},
{"Geo::OGRc::Feature_IsFieldSet", _wrap_Feature_IsFieldSet},
{"Geo::OGRc::Feature_GetFieldIndex", _wrap_Feature_GetFieldIndex},
{"Geo::OGRc::Feature_GetGeomFieldIndex", _wrap_Feature_GetGeomFieldIndex},
{"Geo::OGRc::Feature_GetFID", _wrap_Feature_GetFID},
{"Geo::OGRc::Feature_SetFID", _wrap_Feature_SetFID},
{"Geo::OGRc::Feature_DumpReadable", _wrap_Feature_DumpReadable},
{"Geo::OGRc::Feature__UnsetField", _wrap_Feature__UnsetField},
{"Geo::OGRc::Feature_SetFieldInteger64", _wrap_Feature_SetFieldInteger64},
{"Geo::OGRc::Feature__SetField", _wrap_Feature__SetField},
{"Geo::OGRc::Feature_SetFieldIntegerList", _wrap_Feature_SetFieldIntegerList},
{"Geo::OGRc::Feature_SetFieldInteger64List", _wrap_Feature_SetFieldInteger64List},
{"Geo::OGRc::Feature_SetFieldDoubleList", _wrap_Feature_SetFieldDoubleList},
{"Geo::OGRc::Feature_SetFieldStringList", _wrap_Feature_SetFieldStringList},
{"Geo::OGRc::Feature_SetFieldBinary", _wrap_Feature_SetFieldBinary},
{"Geo::OGRc::Feature_SetFieldBinaryFromHexString", _wrap_Feature_SetFieldBinaryFromHexString},
{"Geo::OGRc::Feature__SetFrom", _wrap_Feature__SetFrom},
{"Geo::OGRc::Feature_SetFromWithMap", _wrap_Feature_SetFromWithMap},
{"Geo::OGRc::Feature_GetStyleString", _wrap_Feature_GetStyleString},
{"Geo::OGRc::Feature_SetStyleString", _wrap_Feature_SetStyleString},
{"Geo::OGRc::Feature_GetFieldType", _wrap_Feature_GetFieldType},
{"Geo::OGRc::Feature__Validate", _wrap_Feature__Validate},
{"Geo::OGRc::Feature_FillUnsetWithDefault", _wrap_Feature_FillUnsetWithDefault},
{"Geo::OGRc::Feature_GetNativeData", _wrap_Feature_GetNativeData},
{"Geo::OGRc::Feature_GetNativeMediaType", _wrap_Feature_GetNativeMediaType},
{"Geo::OGRc::Feature_SetNativeData", _wrap_Feature_SetNativeData},
{"Geo::OGRc::Feature_SetNativeMediaType", _wrap_Feature_SetNativeMediaType},
{"Geo::OGRc::delete_FeatureDefn", _wrap_delete_FeatureDefn},
{"Geo::OGRc::new_FeatureDefn", _wrap_new_FeatureDefn},
{"Geo::OGRc::FeatureDefn_GetName", _wrap_FeatureDefn_GetName},
{"Geo::OGRc::FeatureDefn_GetFieldCount", _wrap_FeatureDefn_GetFieldCount},
{"Geo::OGRc::FeatureDefn_GetFieldDefn", _wrap_FeatureDefn_GetFieldDefn},
{"Geo::OGRc::FeatureDefn_GetFieldIndex", _wrap_FeatureDefn_GetFieldIndex},
{"Geo::OGRc::FeatureDefn_AddFieldDefn", _wrap_FeatureDefn_AddFieldDefn},
{"Geo::OGRc::FeatureDefn_GetGeomFieldCount", _wrap_FeatureDefn_GetGeomFieldCount},
{"Geo::OGRc::FeatureDefn_GetGeomFieldDefn", _wrap_FeatureDefn_GetGeomFieldDefn},
{"Geo::OGRc::FeatureDefn_GetGeomFieldIndex", _wrap_FeatureDefn_GetGeomFieldIndex},
{"Geo::OGRc::FeatureDefn_AddGeomFieldDefn", _wrap_FeatureDefn_AddGeomFieldDefn},
{"Geo::OGRc::FeatureDefn_DeleteGeomFieldDefn", _wrap_FeatureDefn_DeleteGeomFieldDefn},
{"Geo::OGRc::FeatureDefn_GetGeomType", _wrap_FeatureDefn_GetGeomType},
{"Geo::OGRc::FeatureDefn_SetGeomType", _wrap_FeatureDefn_SetGeomType},
{"Geo::OGRc::FeatureDefn_GetReferenceCount", _wrap_FeatureDefn_GetReferenceCount},
{"Geo::OGRc::FeatureDefn_IsGeometryIgnored", _wrap_FeatureDefn_IsGeometryIgnored},
{"Geo::OGRc::FeatureDefn_SetGeometryIgnored", _wrap_FeatureDefn_SetGeometryIgnored},
{"Geo::OGRc::FeatureDefn_IsStyleIgnored", _wrap_FeatureDefn_IsStyleIgnored},
{"Geo::OGRc::FeatureDefn_SetStyleIgnored", _wrap_FeatureDefn_SetStyleIgnored},
{"Geo::OGRc::FeatureDefn_IsSame", _wrap_FeatureDefn_IsSame},
{"Geo::OGRc::delete_FieldDefn", _wrap_delete_FieldDefn},
{"Geo::OGRc::new_FieldDefn", _wrap_new_FieldDefn},
{"Geo::OGRc::FieldDefn_GetName", _wrap_FieldDefn_GetName},
{"Geo::OGRc::FieldDefn_GetNameRef", _wrap_FieldDefn_GetNameRef},
{"Geo::OGRc::FieldDefn_SetName", _wrap_FieldDefn_SetName},
{"Geo::OGRc::FieldDefn_GetType", _wrap_FieldDefn_GetType},
{"Geo::OGRc::FieldDefn_SetType", _wrap_FieldDefn_SetType},
{"Geo::OGRc::FieldDefn_GetSubType", _wrap_FieldDefn_GetSubType},
{"Geo::OGRc::FieldDefn_SetSubType", _wrap_FieldDefn_SetSubType},
{"Geo::OGRc::FieldDefn_GetJustify", _wrap_FieldDefn_GetJustify},
{"Geo::OGRc::FieldDefn_SetJustify", _wrap_FieldDefn_SetJustify},
{"Geo::OGRc::FieldDefn_GetWidth", _wrap_FieldDefn_GetWidth},
{"Geo::OGRc::FieldDefn_SetWidth", _wrap_FieldDefn_SetWidth},
{"Geo::OGRc::FieldDefn_GetPrecision", _wrap_FieldDefn_GetPrecision},
{"Geo::OGRc::FieldDefn_SetPrecision", _wrap_FieldDefn_SetPrecision},
{"Geo::OGRc::FieldDefn_GetTypeName", _wrap_FieldDefn_GetTypeName},
{"Geo::OGRc::FieldDefn_GetFieldTypeName", _wrap_FieldDefn_GetFieldTypeName},
{"Geo::OGRc::FieldDefn_IsIgnored", _wrap_FieldDefn_IsIgnored},
{"Geo::OGRc::FieldDefn_SetIgnored", _wrap_FieldDefn_SetIgnored},
{"Geo::OGRc::FieldDefn_IsNullable", _wrap_FieldDefn_IsNullable},
{"Geo::OGRc::FieldDefn_SetNullable", _wrap_FieldDefn_SetNullable},
{"Geo::OGRc::FieldDefn_GetDefault", _wrap_FieldDefn_GetDefault},
{"Geo::OGRc::FieldDefn_SetDefault", _wrap_FieldDefn_SetDefault},
{"Geo::OGRc::FieldDefn_IsDefaultDriverSpecific", _wrap_FieldDefn_IsDefaultDriverSpecific},
{"Geo::OGRc::delete_GeomFieldDefn", _wrap_delete_GeomFieldDefn},
{"Geo::OGRc::new_GeomFieldDefn", _wrap_new_GeomFieldDefn},
{"Geo::OGRc::GeomFieldDefn_GetName", _wrap_GeomFieldDefn_GetName},
{"Geo::OGRc::GeomFieldDefn_GetNameRef", _wrap_GeomFieldDefn_GetNameRef},
{"Geo::OGRc::GeomFieldDefn_SetName", _wrap_GeomFieldDefn_SetName},
{"Geo::OGRc::GeomFieldDefn_GetType", _wrap_GeomFieldDefn_GetType},
{"Geo::OGRc::GeomFieldDefn_SetType", _wrap_GeomFieldDefn_SetType},
{"Geo::OGRc::GeomFieldDefn_GetSpatialRef", _wrap_GeomFieldDefn_GetSpatialRef},
{"Geo::OGRc::GeomFieldDefn_SetSpatialRef", _wrap_GeomFieldDefn_SetSpatialRef},
{"Geo::OGRc::GeomFieldDefn_IsIgnored", _wrap_GeomFieldDefn_IsIgnored},
{"Geo::OGRc::GeomFieldDefn_SetIgnored", _wrap_GeomFieldDefn_SetIgnored},
{"Geo::OGRc::GeomFieldDefn_IsNullable", _wrap_GeomFieldDefn_IsNullable},
{"Geo::OGRc::GeomFieldDefn_SetNullable", _wrap_GeomFieldDefn_SetNullable},
{"Geo::OGRc::CreateGeometryFromWkb", _wrap_CreateGeometryFromWkb},
{"Geo::OGRc::CreateGeometryFromWkt", _wrap_CreateGeometryFromWkt},
{"Geo::OGRc::CreateGeometryFromGML", _wrap_CreateGeometryFromGML},
{"Geo::OGRc::CreateGeometryFromJson", _wrap_CreateGeometryFromJson},
{"Geo::OGRc::BuildPolygonFromEdges", _wrap_BuildPolygonFromEdges},
{"Geo::OGRc::ApproximateArcAngles", _wrap_ApproximateArcAngles},
{"Geo::OGRc::ForceToPolygon", _wrap_ForceToPolygon},
{"Geo::OGRc::ForceToLineString", _wrap_ForceToLineString},
{"Geo::OGRc::ForceToMultiPolygon", _wrap_ForceToMultiPolygon},
{"Geo::OGRc::ForceToMultiPoint", _wrap_ForceToMultiPoint},
{"Geo::OGRc::ForceToMultiLineString", _wrap_ForceToMultiLineString},
{"Geo::OGRc::ForceTo", _wrap_ForceTo},
{"Geo::OGRc::delete_Geometry", _wrap_delete_Geometry},
{"Geo::OGRc::new_Geometry", _wrap_new_Geometry},
{"Geo::OGRc::Geometry_ExportToWkt", _wrap_Geometry_ExportToWkt},
{"Geo::OGRc::Geometry_ExportToIsoWkt", _wrap_Geometry_ExportToIsoWkt},
{"Geo::OGRc::Geometry__ExportToWkb", _wrap_Geometry__ExportToWkb},
{"Geo::OGRc::Geometry_ExportToIsoWkb", _wrap_Geometry_ExportToIsoWkb},
{"Geo::OGRc::Geometry_ExportToGML", _wrap_Geometry_ExportToGML},
{"Geo::OGRc::Geometry_ExportToKML", _wrap_Geometry_ExportToKML},
{"Geo::OGRc::Geometry_ExportToJson", _wrap_Geometry_ExportToJson},
{"Geo::OGRc::Geometry_AddPoint_3D", _wrap_Geometry_AddPoint_3D},
{"Geo::OGRc::Geometry_AddPointM", _wrap_Geometry_AddPointM},
{"Geo::OGRc::Geometry_AddPointZM", _wrap_Geometry_AddPointZM},
{"Geo::OGRc::Geometry_AddPoint_2D", _wrap_Geometry_AddPoint_2D},
{"Geo::OGRc::Geometry_AddGeometryDirectly", _wrap_Geometry_AddGeometryDirectly},
{"Geo::OGRc::Geometry_AddGeometry", _wrap_Geometry_AddGeometry},
{"Geo::OGRc::Geometry_Clone", _wrap_Geometry_Clone},
{"Geo::OGRc::Geometry_GetGeometryType", _wrap_Geometry_GetGeometryType},
{"Geo::OGRc::Geometry_GetGeometryName", _wrap_Geometry_GetGeometryName},
{"Geo::OGRc::Geometry_Length", _wrap_Geometry_Length},
{"Geo::OGRc::Geometry_Area", _wrap_Geometry_Area},
{"Geo::OGRc::Geometry_GetArea", _wrap_Geometry_GetArea},
{"Geo::OGRc::Geometry_GetPointCount", _wrap_Geometry_GetPointCount},
{"Geo::OGRc::Geometry_GetX", _wrap_Geometry_GetX},
{"Geo::OGRc::Geometry_GetY", _wrap_Geometry_GetY},
{"Geo::OGRc::Geometry_GetZ", _wrap_Geometry_GetZ},
{"Geo::OGRc::Geometry_GetM", _wrap_Geometry_GetM},
{"Geo::OGRc::Geometry_GetPoint_3D", _wrap_Geometry_GetPoint_3D},
{"Geo::OGRc::Geometry_GetPointZM", _wrap_Geometry_GetPointZM},
{"Geo::OGRc::Geometry_GetPoint_2D", _wrap_Geometry_GetPoint_2D},
{"Geo::OGRc::Geometry_GetGeometryCount", _wrap_Geometry_GetGeometryCount},
{"Geo::OGRc::Geometry_SetPoint_3D", _wrap_Geometry_SetPoint_3D},
{"Geo::OGRc::Geometry_SetPointM", _wrap_Geometry_SetPointM},
{"Geo::OGRc::Geometry_SetPointZM", _wrap_Geometry_SetPointZM},
{"Geo::OGRc::Geometry_SetPoint_2D", _wrap_Geometry_SetPoint_2D},
{"Geo::OGRc::Geometry_GetGeometryRef", _wrap_Geometry_GetGeometryRef},
{"Geo::OGRc::Geometry_Simplify", _wrap_Geometry_Simplify},
{"Geo::OGRc::Geometry_SimplifyPreserveTopology", _wrap_Geometry_SimplifyPreserveTopology},
{"Geo::OGRc::Geometry_DelaunayTriangulation", _wrap_Geometry_DelaunayTriangulation},
{"Geo::OGRc::Geometry_Boundary", _wrap_Geometry_Boundary},
{"Geo::OGRc::Geometry_GetBoundary", _wrap_Geometry_GetBoundary},
{"Geo::OGRc::Geometry_ConvexHull", _wrap_Geometry_ConvexHull},
{"Geo::OGRc::Geometry_Buffer", _wrap_Geometry_Buffer},
{"Geo::OGRc::Geometry_Intersection", _wrap_Geometry_Intersection},
{"Geo::OGRc::Geometry_Union", _wrap_Geometry_Union},
{"Geo::OGRc::Geometry_UnionCascaded", _wrap_Geometry_UnionCascaded},
{"Geo::OGRc::Geometry_Difference", _wrap_Geometry_Difference},
{"Geo::OGRc::Geometry_SymDifference", _wrap_Geometry_SymDifference},
{"Geo::OGRc::Geometry_SymmetricDifference", _wrap_Geometry_SymmetricDifference},
{"Geo::OGRc::Geometry_Distance", _wrap_Geometry_Distance},
{"Geo::OGRc::Geometry_Empty", _wrap_Geometry_Empty},
{"Geo::OGRc::Geometry_IsEmpty", _wrap_Geometry_IsEmpty},
{"Geo::OGRc::Geometry_IsValid", _wrap_Geometry_IsValid},
{"Geo::OGRc::Geometry_IsSimple", _wrap_Geometry_IsSimple},
{"Geo::OGRc::Geometry_IsRing", _wrap_Geometry_IsRing},
{"Geo::OGRc::Geometry_Intersects", _wrap_Geometry_Intersects},
{"Geo::OGRc::Geometry_Intersect", _wrap_Geometry_Intersect},
{"Geo::OGRc::Geometry_Equals", _wrap_Geometry_Equals},
{"Geo::OGRc::Geometry_Equal", _wrap_Geometry_Equal},
{"Geo::OGRc::Geometry_Disjoint", _wrap_Geometry_Disjoint},
{"Geo::OGRc::Geometry_Touches", _wrap_Geometry_Touches},
{"Geo::OGRc::Geometry_Crosses", _wrap_Geometry_Crosses},
{"Geo::OGRc::Geometry_Within", _wrap_Geometry_Within},
{"Geo::OGRc::Geometry_Contains", _wrap_Geometry_Contains},
{"Geo::OGRc::Geometry_Overlaps", _wrap_Geometry_Overlaps},
{"Geo::OGRc::Geometry_TransformTo", _wrap_Geometry_TransformTo},
{"Geo::OGRc::Geometry_Transform", _wrap_Geometry_Transform},
{"Geo::OGRc::Geometry_GetSpatialReference", _wrap_Geometry_GetSpatialReference},
{"Geo::OGRc::Geometry_AssignSpatialReference", _wrap_Geometry_AssignSpatialReference},
{"Geo::OGRc::Geometry_CloseRings", _wrap_Geometry_CloseRings},
{"Geo::OGRc::Geometry_FlattenTo2D", _wrap_Geometry_FlattenTo2D},
{"Geo::OGRc::Geometry_Segmentize", _wrap_Geometry_Segmentize},
{"Geo::OGRc::Geometry_GetEnvelope", _wrap_Geometry_GetEnvelope},
{"Geo::OGRc::Geometry_GetEnvelope3D", _wrap_Geometry_GetEnvelope3D},
{"Geo::OGRc::Geometry_Centroid", _wrap_Geometry_Centroid},
{"Geo::OGRc::Geometry_PointOnSurface", _wrap_Geometry_PointOnSurface},
{"Geo::OGRc::Geometry_WkbSize", _wrap_Geometry_WkbSize},
{"Geo::OGRc::Geometry_GetCoordinateDimension", _wrap_Geometry_GetCoordinateDimension},
{"Geo::OGRc::Geometry_CoordinateDimension", _wrap_Geometry_CoordinateDimension},
{"Geo::OGRc::Geometry_Is3D", _wrap_Geometry_Is3D},
{"Geo::OGRc::Geometry_IsMeasured", _wrap_Geometry_IsMeasured},
{"Geo::OGRc::Geometry_SetCoordinateDimension", _wrap_Geometry_SetCoordinateDimension},
{"Geo::OGRc::Geometry_Set3D", _wrap_Geometry_Set3D},
{"Geo::OGRc::Geometry_SetMeasured", _wrap_Geometry_SetMeasured},
{"Geo::OGRc::Geometry_GetDimension", _wrap_Geometry_GetDimension},
{"Geo::OGRc::Geometry_HasCurveGeometry", _wrap_Geometry_HasCurveGeometry},
{"Geo::OGRc::Geometry_GetLinearGeometry", _wrap_Geometry_GetLinearGeometry},
{"Geo::OGRc::Geometry_GetCurveGeometry", _wrap_Geometry_GetCurveGeometry},
{"Geo::OGRc::Geometry_Value", _wrap_Geometry_Value},
{"Geo::OGRc::Geometry_Move", _wrap_Geometry_Move},
{"Geo::OGRc::GetDriverCount", _wrap_GetDriverCount},
{"Geo::OGRc::GetOpenDSCount", _wrap_GetOpenDSCount},
{"Geo::OGRc::SetGenerate_DB2_V72_BYTE_ORDER", _wrap_SetGenerate_DB2_V72_BYTE_ORDER},
{"Geo::OGRc::RegisterAll", _wrap_RegisterAll},
{"Geo::OGRc::GeometryTypeToName", _wrap_GeometryTypeToName},
{"Geo::OGRc::GetFieldTypeName", _wrap_GetFieldTypeName},
{"Geo::OGRc::GetFieldSubTypeName", _wrap_GetFieldSubTypeName},
{"Geo::OGRc::GT_Flatten", _wrap_GT_Flatten},
{"Geo::OGRc::GT_SetZ", _wrap_GT_SetZ},
{"Geo::OGRc::GT_SetM", _wrap_GT_SetM},
{"Geo::OGRc::GT_SetModifier", _wrap_GT_SetModifier},
{"Geo::OGRc::GT_HasZ", _wrap_GT_HasZ},
{"Geo::OGRc::GT_HasM", _wrap_GT_HasM},
{"Geo::OGRc::GT_IsSubClassOf", _wrap_GT_IsSubClassOf},
{"Geo::OGRc::GT_IsCurve", _wrap_GT_IsCurve},
{"Geo::OGRc::GT_IsSurface", _wrap_GT_IsSurface},
{"Geo::OGRc::GT_IsNonLinear", _wrap_GT_IsNonLinear},
{"Geo::OGRc::GT_GetCollection", _wrap_GT_GetCollection},
{"Geo::OGRc::GT_GetCurve", _wrap_GT_GetCurve},
{"Geo::OGRc::GT_GetLinear", _wrap_GT_GetLinear},
{"Geo::OGRc::SetNonLinearGeometriesEnabledFlag", _wrap_SetNonLinearGeometriesEnabledFlag},
{"Geo::OGRc::GetNonLinearGeometriesEnabledFlag", _wrap_GetNonLinearGeometriesEnabledFlag},
{"Geo::OGRc::TermProgress_nocb", _wrap_TermProgress_nocb},
{0,0}
};
/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is tough by the requirement that no dynamic
 * memory is used. Also, since swig_type_info structures store pointers to
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization.
 * The idea is that swig generates all the structures that are needed.
 * The runtime then collects these partially filled structures.
 * The SWIG_InitializeModule function takes these initial arrays out of
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.
 *
 * The generated swig_type_info structures are assigned staticly to an initial
 * array. We just loop through that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast linked list. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns. So to actually build the cast linked list,
 * we find the array of casts associated with the type, and loop through it
 * adding the casts to the list. The one last trick we need to do is making
 * sure the type pointer in the swig_cast_info struct is correct.
 *
 * First off, we lookup the cast->type name to see if it is already loaded.
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the linked list (because the cast->type) pointer will
 *     be correct.
 * ----------------------------------------------------------------------------- */

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

#if 0
#define SWIGRUNTIME_DEBUG
#endif


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

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

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



#ifdef __cplusplus
extern "C"
#endif

XS(SWIG_init) {
  dXSARGS;
  int i;
  
  SWIG_InitializeModule(0);
  
  /* Install commands */
  for (i = 0; swig_commands[i].name; i++) {
    /* Casts only needed for Perl < 5.10. */
#ifdef __cplusplus
    newXS(const_cast<char*>(swig_commands[i].name), swig_commands[i].wrapper, const_cast<char*>(__FILE__));
#else
    newXS((char*)swig_commands[i].name, swig_commands[i].wrapper, (char*)__FILE__);
#endif
  }
  
  /* Install variables */
  for (i = 0; swig_variables[i].name; i++) {
    SV *sv;
    sv = get_sv(swig_variables[i].name, TRUE | 0x2 | GV_ADDMULTI);
    if (swig_variables[i].type) {
      SWIG_MakePtr(sv,(void *)1, *swig_variables[i].type,0);
    } else {
      sv_setiv(sv,(IV) 0);
    }
    swig_create_magic(sv, swig_variables[i].name, swig_variables[i].set, swig_variables[i].get); 
  }
  
  /* Install constant */
  for (i = 0; swig_constants[i].type; i++) {
    SV *sv;
    sv = get_sv(swig_constants[i].name, TRUE | 0x2 | GV_ADDMULTI);
    switch(swig_constants[i].type) {
    case SWIG_INT:
      sv_setiv(sv, (IV) swig_constants[i].lvalue);
      break;
    case SWIG_FLOAT:
      sv_setnv(sv, (double) swig_constants[i].dvalue);
      break;
    case SWIG_STRING:
      sv_setpv(sv, (const char *) swig_constants[i].pvalue);
      break;
    case SWIG_POINTER:
      SWIG_MakePtr(sv, swig_constants[i].pvalue, *(swig_constants[i].ptype),0);
      break;
    case SWIG_BINARY:
      SWIG_MakePackedObj(sv, swig_constants[i].pvalue, swig_constants[i].lvalue, *(swig_constants[i].ptype));
      break;
    default:
      break;
    }
    SvREADONLY_on(sv);
  }
  
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkb25DBit", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0x80000000)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkb25Bit", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0x80000000)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbUnknown", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbPoint", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbLineString", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbPolygon", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiPoint", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(4)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiLineString", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(5)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiPolygon", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(6)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbGeometryCollection", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(7)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbCircularString", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(8)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbCompoundCurve", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(9)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbCurvePolygon", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(10)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiCurve", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(11)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiSurface", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(12)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbCurve", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(13)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbSurface", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(14)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbPolyhedralSurface", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(15)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbTIN", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(16)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbNone", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(100)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbLinearRing", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(101)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbCircularStringZ", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1008)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbCompoundCurveZ", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1009)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbCurvePolygonZ", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1010)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiCurveZ", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1011)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiSurfaceZ", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1012)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbCurveZ", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1013)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbSurfaceZ", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1014)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbPolyhedralSurfaceZ", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1015)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbTINZ", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1016)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbPointM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2001)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbLineStringM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2002)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbPolygonM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2003)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiPointM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2004)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiLineStringM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2005)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiPolygonM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2006)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbGeometryCollectionM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2007)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbCircularStringM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2008)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbCompoundCurveM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2009)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbCurvePolygonM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2010)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiCurveM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2011)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiSurfaceM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2012)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbCurveM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2013)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbSurfaceM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2014)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbPolyhedralSurfaceM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2015)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbTINM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2016)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbPointZM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3001)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbLineStringZM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3002)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbPolygonZM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3003)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiPointZM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3004)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiLineStringZM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3005)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiPolygonZM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3006)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbGeometryCollectionZM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3007)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbCircularStringZM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3008)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbCompoundCurveZM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3009)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbCurvePolygonZM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3010)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiCurveZM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3011)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiSurfaceZM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3012)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbCurveZM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3013)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbSurfaceZM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3014)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbPolyhedralSurfaceZM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3015)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbTINZM", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3016)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbPoint25D", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0x80000001)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbLineString25D", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0x80000002)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbPolygon25D", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0x80000003)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiPoint25D", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0x80000004)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiLineString25D", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0x80000005)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbMultiPolygon25D", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0x80000006)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbGeometryCollection25D", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0x80000007)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFTInteger", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFTIntegerList", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFTReal", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFTRealList", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFTString", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(4)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFTStringList", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(5)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFTWideString", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(6)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFTWideStringList", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(7)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFTBinary", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(8)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFTDate", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(9)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFTTime", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(10)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFTDateTime", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(11)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFTInteger64", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(12)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFTInteger64List", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(13)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFSTNone", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFSTBoolean", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFSTInt16", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OFSTFloat32", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(3)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OJUndefined", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OJLeft", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OJRight", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbXDR", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "wkbNDR", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "NullFID", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(-1)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ALTER_NAME_FLAG", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ALTER_TYPE_FLAG", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(2)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ALTER_WIDTH_PRECISION_FLAG", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(4)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ALTER_NULLABLE_FLAG", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(8)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ALTER_DEFAULT_FLAG", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(16)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ALTER_ALL_FLAG", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(1+2+4+8+16)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "F_VAL_NULL", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0x00000001)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "F_VAL_GEOM_TYPE", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0x00000002)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "F_VAL_WIDTH", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0x00000004)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "F_VAL_ALLOW_NULL_WHEN_DEFAULT", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0x00000008)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "F_VAL_ALL", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_From_int  SWIG_PERL_CALL_ARGS_1(static_cast< int >(0xFFFFFFFF)));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCRandomRead", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("RandomRead"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCSequentialWrite", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("SequentialWrite"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCRandomWrite", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("RandomWrite"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCFastSpatialFilter", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("FastSpatialFilter"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCFastFeatureCount", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("FastFeatureCount"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCFastGetExtent", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("FastGetExtent"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCCreateField", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("CreateField"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCDeleteField", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("DeleteField"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCReorderFields", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("ReorderFields"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCAlterFieldDefn", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("AlterFieldDefn"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCTransactions", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("Transactions"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCDeleteFeature", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("DeleteFeature"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCFastSetNextByIndex", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("FastSetNextByIndex"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCStringsAsUTF8", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("StringsAsUTF8"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCIgnoreFields", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("IgnoreFields"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCCreateGeomField", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("CreateGeomField"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCCurveGeometries", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("CurveGeometries"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLCMeasuredGeometries", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("MeasuredGeometries"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ODsCCreateLayer", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("CreateLayer"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ODsCDeleteLayer", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("DeleteLayer"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ODsCCreateGeomFieldAfterCreateLayer", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("CreateGeomFieldAfterCreateLayer"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ODsCCurveGeometries", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("CurveGeometries"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ODsCTransactions", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("Transactions"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ODsCEmulatedTransactions", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("EmulatedTransactions"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ODsCMeasuredGeometries", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("MeasuredGeometries"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ODrCCreateDataSource", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("CreateDataSource"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "ODrCDeleteDataSource", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("DeleteDataSource"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "OLMD_FID64", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_FromCharPtr("OLMD_FID64"));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  
  
  /*UseExceptions(); is set by GDAL module */
  if ( OGRGetDriverCount() == 0 ) {
    OGRRegisterAll();
  }
  
  
  SWIG_TypeClientData(SWIGTYPE_p_OGRStyleTableShadow, (void*) "Geo::OGR::StyleTable");
  SWIG_TypeClientData(SWIGTYPE_p_OGRLayerShadow, (void*) "Geo::OGR::Layer");
  SWIG_TypeClientData(SWIGTYPE_p_OGRFeatureShadow, (void*) "Geo::OGR::Feature");
  SWIG_TypeClientData(SWIGTYPE_p_OGRFeatureDefnShadow, (void*) "Geo::OGR::FeatureDefn");
  SWIG_TypeClientData(SWIGTYPE_p_OGRFieldDefnShadow, (void*) "Geo::OGR::FieldDefn");
  SWIG_TypeClientData(SWIGTYPE_p_OGRGeomFieldDefnShadow, (void*) "Geo::OGR::GeomFieldDefn");
  SWIG_TypeClientData(SWIGTYPE_p_OGRGeometryShadow, (void*) "Geo::OGR::Geometry");
  /*@SWIG:/home/rouault/install-swig-2.0.12/share/swig/2.0.12/perl5/perltypemaps.swg,65,%set_constant@*/ do {
    SV *sv = get_sv((char*) SWIG_prefix "TermProgress", TRUE | 0x2 | GV_ADDMULTI);
    sv_setsv(sv, SWIG_NewFunctionPtrObj((void *)(int (*)(double,char const *,void *))(GDALTermProgress), SWIGTYPE_p_f_double_p_q_const__char_p_void__int));
    SvREADONLY_on(sv);
  } while(0) /*@SWIG@*/;
  ST(0) = &PL_sv_yes;
  XSRETURN(1);
}

