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

#define SWIGPHP


#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, i.e. if you have problems
  with your compiler or such.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

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

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

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


/* 
   Flags/methods for returning states.
   
   The SWIG conversion methods, as ConvertPtr, return and integer 
   that tells if the conversion was successful or not. And if not,
   an error code can be returned (see swigerrors.swg for the codes).
   
   Use the following macros/flags to set or process the returning
   states.
   
   In old versions of SWIG, code such as the following was usually written:

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

   Now you can be more explicit:

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

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

    Type *ptr;
    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
      if (SWIG_IsNewObj(res) {
        ...
	delete *ptr;
      } else {
        ...
      }
    } else {
      // fail code
    }
    
   I.e., now SWIG_ConvertPtr can return new objects and you can
   identify the case and take care of the deallocation. Of course that
   also requires SWIG_ConvertPtr to return new result values, such as

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

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

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

       int food(double)
       int fooi(int);

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

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

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

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

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


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

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

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

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

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

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

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

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

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


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

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

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

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

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

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

/* 
   Set the clientdata field for a type
*/
SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  swig_cast_info *cast = ti->cast;
  /* if (ti->clientdata == clientdata) return; */
  ti->clientdata = clientdata;
  
  while (cast) {
    if (!cast->converter) {
      swig_type_info *tc = cast->type;
      if (!tc->clientdata) {
	SWIG_TypeClientData(tc, clientdata);
      }
    }    
    cast = cast->next;
  }
}
SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  SWIG_TypeClientData(ti, clientdata);
  ti->owndata = 1;
}
  
/*
  Search for a swig_type_info structure only by mangled name
  Search is a O(log #types)
  
  We start searching at module start, and finish searching when start == end.  
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info *start, 
                            swig_module_info *end, 
		            const char *name) {
  swig_module_info *iter = start;
  do {
    if (iter->size) {
      register size_t l = 0;
      register size_t r = iter->size - 1;
      do {
	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
	register size_t i = (l + r) >> 1; 
	const char *iname = iter->types[i]->name;
	if (iname) {
	  register int compare = strcmp(name, iname);
	  if (compare == 0) {	    
	    return iter->types[i];
	  } else if (compare < 0) {
	    if (i) {
	      r = i - 1;
	    } else {
	      break;
	    }
	  } else if (compare > 0) {
	    l = i + 1;
	  }
	} else {
	  break; /* should never happen */
	}
      } while (l <= r);
    }
    iter = iter->next;
  } while (iter != end);
  return 0;
}

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

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

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

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

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

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

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

#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------
 * See the LICENSE file for information on copyright, usage and redistribution
 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
 *
 * phprun.swg
 *
 * PHP runtime library
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#endif
#include "zend.h"
#include "zend_API.h"
#include "php.h"
#include "ext/standard/php_string.h"

#ifdef ZEND_RAW_FENTRY
/* ZEND_RAW_FENTRY was added somewhere between 5.2.0 and 5.2.3 */
# define SWIG_ZEND_NAMED_FE(ZN, N, A) ZEND_RAW_FENTRY((char*)#ZN, N, A, 0)
#else
/* This causes warnings from GCC >= 4.2 (assigning a string literal to char*).
 * But this seems to be unavoidable without directly assuming knowledge of
 * the structure, which changed between PHP4 and PHP5. */
# define SWIG_ZEND_NAMED_FE(ZN, N, A) ZEND_NAMED_FE(ZN, N, A)
#endif

#ifndef Z_SET_ISREF_P
// For PHP < 5.3
# define Z_SET_ISREF_P(z) (z)->is_ref = 1
#endif
#ifndef Z_SET_REFCOUNT_P
// For PHP < 5.3
# define Z_SET_REFCOUNT_P(z, rc) (z)->refcount = (rc)
#endif

#define SWIG_LONG_CONSTANT(N, V) zend_register_long_constant((char*)#N, sizeof(#N), V, CONST_CS | CONST_PERSISTENT, module_number TSRMLS_CC)
#define SWIG_DOUBLE_CONSTANT(N, V) zend_register_double_constant((char*)#N, sizeof(#N), V, CONST_CS | CONST_PERSISTENT, module_number TSRMLS_CC)
#define SWIG_STRING_CONSTANT(N, V) zend_register_stringl_constant((char*)#N, sizeof(#N), V, strlen(V), CONST_CS | CONST_PERSISTENT, module_number TSRMLS_CC)
#define SWIG_CHAR_CONSTANT(N, V) do {\
    static char swig_char = (V);\
    zend_register_stringl_constant((char*)#N, sizeof(#N), &swig_char, 1, CONST_CS | CONST_PERSISTENT, module_number TSRMLS_CC);\
} while (0)

/* These TSRMLS_ stuff should already be defined now, but with older php under
   redhat are not... */
#ifndef TSRMLS_D
#define TSRMLS_D
#endif
#ifndef TSRMLS_DC
#define TSRMLS_DC
#endif
#ifndef TSRMLS_C
#define TSRMLS_C
#endif
#ifndef TSRMLS_CC
#define TSRMLS_CC
#endif

#ifdef __cplusplus
}
#endif

/* But in fact SWIG_ConvertPtr is the native interface for getting typed
   pointer values out of zvals.  We need the TSRMLS_ macros for when we
   make PHP type calls later as we handle php resources */
#define SWIG_ConvertPtr(obj,pp,type,flags) SWIG_ZTS_ConvertPtr(obj,pp,type,flags TSRMLS_CC)


#define SWIG_fail goto fail

static const char *default_error_msg = "Unknown error occurred";
static int default_error_code = E_ERROR;

#define SWIG_PHP_Arg_Error_Msg(argnum,extramsg) "Error in argument " #argnum " "#extramsg

#define SWIG_PHP_Error(code,msg) do { SWIG_ErrorCode() = code; SWIG_ErrorMsg() = msg; SWIG_fail; } while (0)

#define SWIG_contract_assert(expr,msg) \
  if (!(expr) ) { zend_printf("Contract Assert Failed %s\n",msg ); } else

/* Standard SWIG API */
#define SWIG_GetModule(clientdata) SWIG_Php_GetModule()
#define SWIG_SetModule(clientdata, pointer) SWIG_Php_SetModule(pointer)

/* used to wrap returned objects in so we know whether they are newobject
   and need freeing, or not */
typedef struct {
  void * ptr;
  int newobject;
} swig_object_wrapper;

/* empty zend destructor for types without one */
static ZEND_RSRC_DTOR_FUNC(SWIG_landfill) { (void)rsrc; }

#define SWIG_SetPointerZval(a,b,c,d) SWIG_ZTS_SetPointerZval(a,b,c,d TSRMLS_CC)
#define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))

static void
SWIG_ZTS_SetPointerZval(zval *z, void *ptr, swig_type_info *type, int newobject TSRMLS_DC) {
  swig_object_wrapper *value=NULL;
  /*
   * First test for Null pointers.  Return those as PHP native NULL
   */
  if (!ptr ) {
    ZVAL_NULL(z);
    return;
  }
  if (type->clientdata) {
    if (! (*(int *)(type->clientdata)))
      zend_error(E_ERROR, "Type: %s failed to register with zend",type->name);
    value=(swig_object_wrapper *)emalloc(sizeof(swig_object_wrapper));
    value->ptr=ptr;
    value->newobject=newobject;
    if (newobject <= 1) {
      /* Just register the pointer as a resource. */
      ZEND_REGISTER_RESOURCE(z, value, *(int *)(type->clientdata));
    } else {
      /*
       * Wrap the resource in an object, the resource will be accessible
       * via the "_cPtr" member. This is currently only used by
       * directory typemaps.
       */
      value->newobject = 0;
      zval *resource;
      MAKE_STD_ZVAL(resource);
      ZEND_REGISTER_RESOURCE(resource, value, *(int *)(type->clientdata));
      zend_class_entry **ce = NULL;
      zval *classname;
      MAKE_STD_ZVAL(classname);
      /* _p_Foo -> Foo */
      ZVAL_STRING(classname, (char*)type->name+3, 1);
      /* class names are stored in lowercase */
      php_strtolower(Z_STRVAL_PP(&classname), Z_STRLEN_PP(&classname));
      if (zend_lookup_class(Z_STRVAL_P(classname), Z_STRLEN_P(classname), &ce TSRMLS_CC) != SUCCESS) {
        /* class does not exist */
        object_init(z);
      } else {
        object_init_ex(z, *ce);
      }
      Z_SET_REFCOUNT_P(z, 1);
      Z_SET_ISREF_P(z);
      zend_hash_update(HASH_OF(z), (char*)"_cPtr", sizeof("_cPtr"), (void*)&resource, sizeof(zval), NULL);
      FREE_ZVAL(classname);
    }
    return;
  }
  zend_error(E_ERROR, "Type: %s not registered with zend",type->name);
}

/* This pointer conversion routine takes the native pointer p (along with
   its type name) and converts it by calling appropriate casting functions
   according to ty.  The resultant pointer is returned, or NULL is returned
   if the pointer can't be cast.

   Sadly PHP has no API to find a type name from a type id, only from an
   instance of a resource of the type id, so we have to pass type_name as well.

   The two functions which might call this are:
   SWIG_ZTS_ConvertResourcePtr which gets the type name from the resource
   and the registered zend destructors for which we have one per type each
   with the type name hard wired in. */
static void *
SWIG_ZTS_ConvertResourceData(void * p, const char *type_name, swig_type_info *ty TSRMLS_DC) {
  swig_cast_info *tc;
  void *result = 0;

  if (!ty) {
    /* They don't care about the target type, so just pass on the pointer! */
    return p;
  }

  if (! type_name) {  
    /* can't convert p to ptr type ty if we don't know what type p is */
    return NULL;
  }

  /* convert and cast p from type_name to ptr as ty. */
  tc = SWIG_TypeCheck(type_name, ty);
  if (tc) {
    int newmemory = 0;
    result = SWIG_TypeCast(tc, p, &newmemory);
    assert(!newmemory); /* newmemory handling not yet implemented */
  }
  return result;
}

/* This function returns a pointer of type ty by extracting the pointer
   and type info from the resource in z.  z must be a resource.
   If it fails, NULL is returned.
   It uses SWIG_ZTS_ConvertResourceData to do the real work. */
static void *
SWIG_ZTS_ConvertResourcePtr(zval *z, swig_type_info *ty, int flags TSRMLS_DC) {
  swig_object_wrapper *value;
  void *p;
  int type;
  char *type_name;

  value = (swig_object_wrapper *) zend_list_find(z->value.lval, &type);
  if ( flags & SWIG_POINTER_DISOWN ) {
    value->newobject = 0;
  }
  p = value->ptr;
  if (type==-1) return NULL;

  type_name=zend_rsrc_list_get_rsrc_type(z->value.lval TSRMLS_CC);

  return SWIG_ZTS_ConvertResourceData(p, type_name, ty TSRMLS_CC);
}

/* We allow passing of a RESOURCE pointing to the object or an OBJECT whose
   _cPtr is a resource pointing to the object */
static int
SWIG_ZTS_ConvertPtr(zval *z, void **ptr, swig_type_info *ty, int flags TSRMLS_DC) {
  if (z == NULL) {
    *ptr = 0;
    return 0;
  }

  switch (z->type) {
    case IS_OBJECT: {
      zval ** _cPtr;
      if (zend_hash_find(HASH_OF(z),(char*)"_cPtr",sizeof("_cPtr"),(void**)&_cPtr)==SUCCESS) {
	if ((*_cPtr)->type==IS_RESOURCE) {
	  *ptr = SWIG_ZTS_ConvertResourcePtr(*_cPtr, ty, flags TSRMLS_CC);
	  return (*ptr == NULL ? -1 : 0);
	}
      }
      break;
    }
    case IS_RESOURCE:
      *ptr = SWIG_ZTS_ConvertResourcePtr(z, ty, flags TSRMLS_CC);
      return (*ptr == NULL ? -1 : 0);
    case IS_NULL:
      *ptr = 0;
      return 0;
  }

  return -1;
}

static char const_name[] = "swig_runtime_data_type_pointer";
static swig_module_info *SWIG_Php_GetModule() {
  zval *pointer;
  swig_module_info *ret = 0;

  MAKE_STD_ZVAL(pointer);

  TSRMLS_FETCH();

  if (zend_get_constant(const_name, sizeof(const_name), pointer TSRMLS_CC)) {
    if (pointer->type == IS_LONG) {
      ret = (swig_module_info *) pointer->value.lval;
    }
  } 
  FREE_ZVAL(pointer);
  return ret; 
}

static void SWIG_Php_SetModule(swig_module_info *pointer) {
  TSRMLS_FETCH();
  REGISTER_MAIN_LONG_CONSTANT(const_name, (long) pointer, 0);
}

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




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

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

/* header section */
ZEND_BEGIN_MODULE_GLOBALS(ogr)
const char *error_msg;
int error_code;
ZEND_END_MODULE_GLOBALS(ogr)
ZEND_DECLARE_MODULE_GLOBALS(ogr)
#ifdef ZTS
#define SWIG_ErrorMsg() TSRMG(ogr_globals_id, zend_ogr_globals *, error_msg )
#define SWIG_ErrorCode() TSRMG(ogr_globals_id, zend_ogr_globals *, error_code )
#else
#define SWIG_ErrorMsg() (ogr_globals.error_msg)
#define SWIG_ErrorCode() (ogr_globals.error_code)
#endif

static void ogr_init_globals(zend_ogr_globals *globals ) {
  globals->error_msg = default_error_msg;
  globals->error_code = default_error_code;
}
static void ogr_destroy_globals(zend_ogr_globals * globals) { (void)globals; }

static void SWIG_ResetError() {
  TSRMLS_FETCH();
  SWIG_ErrorMsg() = default_error_msg;
  SWIG_ErrorCode() = default_error_code;
}

ZEND_NAMED_FUNCTION(_wrap_swig_ogr_alter_newobject) {
  zval **args[2];
  swig_object_wrapper *value;
  int type;
  int thisown;

  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }

  value = (swig_object_wrapper *) zend_list_find((*args[0])->value.lval, &type);
  value->newobject = zval_is_true(*args[1]);

  return;
}
ZEND_NAMED_FUNCTION(_wrap_swig_ogr_get_newobject) {
  zval **args[1];
  swig_object_wrapper *value;
  int type;

  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }

  value = (swig_object_wrapper *) zend_list_find((*args[0])->value.lval, &type);
  RETVAL_LONG(value->newobject);

  return;
}
#define SWIG_name  "ogr"
#ifdef __cplusplus
extern "C" {
#endif
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_ogr.h"
#ifdef __cplusplus
}
#endif


#if PHP_MAJOR_VERSION < 5
# define SWIG_exception(code, msg) { zend_error(E_ERROR, msg); }
#else
# include "zend_exceptions.h"
# define SWIG_exception(code, msg) { zend_throw_exception(NULL, (char*)msg, code TSRMLS_CC); }
#endif


#include <stdexcept>


typedef char retStringAndCPLFree;


#include <iostream>
using namespace std;

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

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

SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_CreateDataSource(OGRDriverShadow *self,char const *name,char **options=0){
    OGRDataSourceShadow *ds = (OGRDataSourceShadow*) OGR_Dr_CreateDataSource( self, name, options);
    return ds;
  }
SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_CopyDataSource(OGRDriverShadow *self,OGRDataSourceShadow *copy_ds,char const *utf8_path,char **options=0){
    OGRDataSourceShadow *ds = (OGRDataSourceShadow*) OGR_Dr_CopyDataSource(self, copy_ds, utf8_path, options);
    return ds;
  }
SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_Open(OGRDriverShadow *self,char const *utf8_path,int update=0){
    OGRDataSourceShadow* ds = (OGRDataSourceShadow*) OGR_Dr_Open(self, utf8_path, update);
    return ds;
  }
SWIGINTERN int OGRDriverShadow_DeleteDataSource(OGRDriverShadow *self,char const *name){

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

static char *
OGRErrMessages( int rc ) {
  switch( rc ) {
  case 0:
    return "OGR Error 0: None";
  case 1:
    return "OGR Error 1: Not enough data";
  case 2:
    return "OGR Error 2: Unsupported geometry type";
  case 3:
    return "OGR Error 3: Unsupported operation";
  case 4:
    return "OGR Error 4: Corrupt data";
  case 5:
    return "OGR Error 5: General Error";
  case 6:
    return "OGR Error 6: Unsupported SRS";
  default:
    return "OGR Error: Unknown";
  }
}

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

    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_GetLayer(self, index);
    return layer;
  }
SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_GetLayerByName(OGRDataSourceShadow *self,char const *layer_name){
    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_GetLayerByName(self, layer_name);
    return layer;
  }
SWIGINTERN bool OGRDataSourceShadow_TestCapability(OGRDataSourceShadow *self,char const *cap){
    return (OGR_DS_TestCapability(self, cap) > 0);
  }
SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_ExecuteSQL(OGRDataSourceShadow *self,char const *statement,OGRGeometryShadow *spatialFilter=NULL,char const *dialect=""){
    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_ExecuteSQL((OGRDataSourceShadow*)self,
                                                      statement,
                                                      spatialFilter,
                                                      dialect);
    return layer;
  }
SWIGINTERN void OGRDataSourceShadow_ReleaseResultSet(OGRDataSourceShadow *self,OGRLayerShadow *layer){
    OGR_DS_ReleaseResultSet(self, layer);
  }
SWIGINTERN int OGRLayerShadow_GetRefCount(OGRLayerShadow *self){
    return OGR_L_GetRefCount(self);
  }
SWIGINTERN void OGRLayerShadow_SetSpatialFilter(OGRLayerShadow *self,OGRGeometryShadow *filter){
    OGR_L_SetSpatialFilter (self, filter);
  }
SWIGINTERN void OGRLayerShadow_SetSpatialFilterRect(OGRLayerShadow *self,double minx,double miny,double maxx,double maxy){
    OGR_L_SetSpatialFilterRect(self, minx, miny, maxx, maxy);                          
  }
SWIGINTERN OGRGeometryShadow *OGRLayerShadow_GetSpatialFilter(OGRLayerShadow *self){
    return (OGRGeometryShadow *) OGR_L_GetSpatialFilter(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetAttributeFilter(OGRLayerShadow *self,char *filter_string){
    return OGR_L_SetAttributeFilter((OGRLayerShadow*)self, filter_string);
  }
SWIGINTERN void OGRLayerShadow_ResetReading(OGRLayerShadow *self){
    OGR_L_ResetReading(self);
  }
SWIGINTERN char const *OGRLayerShadow_GetName(OGRLayerShadow *self){
    return OGR_L_GetName(self);
  }
SWIGINTERN OGRwkbGeometryType OGRLayerShadow_GetGeomType(OGRLayerShadow *self){
    return (OGRwkbGeometryType) OGR_L_GetGeomType(self);
  }
SWIGINTERN char const *OGRLayerShadow_GetGeometryColumn(OGRLayerShadow *self){
    return OGR_L_GetGeometryColumn(self);
  }
SWIGINTERN char const *OGRLayerShadow_GetFIDColumn(OGRLayerShadow *self){
    return OGR_L_GetFIDColumn(self);
  }
SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetFeature(OGRLayerShadow *self,long fid){
    return (OGRFeatureShadow*) OGR_L_GetFeature(self, fid);
  }
SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetNextFeature(OGRLayerShadow *self){
    return (OGRFeatureShadow*) OGR_L_GetNextFeature(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetNextByIndex(OGRLayerShadow *self,long new_index){
    return OGR_L_SetNextByIndex(self, new_index);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
    return OGR_L_SetFeature(self, feature);
  }
SWIGINTERN OGRErr OGRLayerShadow_CreateFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
    return OGR_L_CreateFeature(self, feature);
  }
SWIGINTERN OGRErr OGRLayerShadow_DeleteFeature(OGRLayerShadow *self,long fid){
    return OGR_L_DeleteFeature(self, fid);
  }
SWIGINTERN OGRErr OGRLayerShadow_SyncToDisk(OGRLayerShadow *self){
    return OGR_L_SyncToDisk(self);
  }
SWIGINTERN OGRFeatureDefnShadow *OGRLayerShadow_GetLayerDefn(OGRLayerShadow *self){
    return (OGRFeatureDefnShadow*) OGR_L_GetLayerDefn(self);
  }
SWIGINTERN int OGRLayerShadow_GetFeatureCount(OGRLayerShadow *self,int force=1){
    return OGR_L_GetFeatureCount(self, force);
  }

  zval *
  CreateTupleFromDoubleArray( double *first, unsigned int size ) {
    zval *tmp;
    MAKE_STD_ZVAL(tmp);
    array_init(tmp);
    for( unsigned int i=0; i<size; i++ ) {
      add_next_index_double( tmp, *first );
      ++first;
    }
    return tmp;
 }


static void
t_output_helper( zval **target, zval *o) {
  if ( (*target)->type == IS_ARRAY ) {
    /* it's already an array, just append */
    add_next_index_zval( *target, o );
    return;
  }
  if ( (*target)->type == IS_NULL ) {
    REPLACE_ZVAL_VALUE(target,o,1);
    FREE_ZVAL(o);
    return;
  }
  zval *tmp;
  ALLOC_INIT_ZVAL(tmp);
  *tmp = **target;
  zval_copy_ctor(tmp);
  array_init(*target);
  add_next_index_zval( *target, tmp);
  add_next_index_zval( *target, o);

}

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);
  }
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_StartTransaction(OGRLayerShadow *self){
    return OGR_L_StartTransaction(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_CommitTransaction(OGRLayerShadow *self){
    return OGR_L_CommitTransaction(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_RollbackTransaction(OGRLayerShadow *self){
    return OGR_L_RollbackTransaction(self);
  }
SWIGINTERN OSRSpatialReferenceShadow *OGRLayerShadow_GetSpatialRef(OGRLayerShadow *self){
    OGRSpatialReferenceH ref =  OGR_L_GetSpatialRef(self);
    if( ref )
        OSRReference(ref);
    return (OSRSpatialReferenceShadow*) ref;
  }
SWIGINTERN GIntBig OGRLayerShadow_GetFeaturesRead(OGRLayerShadow *self){
    return OGR_L_GetFeaturesRead(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetIgnoredFields(OGRLayerShadow *self,char const **options){
    return OGR_L_SetIgnoredFields( self, options );
  }
SWIGINTERN void delete_OGRFeatureShadow(OGRFeatureShadow *self){
    OGR_F_Destroy(self);
  }
SWIGINTERN OGRFeatureShadow *new_OGRFeatureShadow(OGRFeatureDefnShadow *feature_def){
      return (OGRFeatureShadow*) OGR_F_Create( feature_def );
  }
SWIGINTERN OGRFeatureDefnShadow *OGRFeatureShadow_GetDefnRef(OGRFeatureShadow *self){
    return (OGRFeatureDefnShadow*) OGR_F_GetDefnRef(self);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeometry(OGRFeatureShadow *self,OGRGeometryShadow *geom){
    return OGR_F_SetGeometry(self, geom);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeometryDirectly(OGRFeatureShadow *self,OGRGeometryShadow *geom){
    return OGR_F_SetGeometryDirectly(self, geom);
  }
SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeometryRef(OGRFeatureShadow *self){
    return (OGRGeometryShadow*) OGR_F_GetGeometryRef(self);
  }
SWIGINTERN OGRFeatureShadow *OGRFeatureShadow_Clone(OGRFeatureShadow *self){
    return (OGRFeatureShadow*) OGR_F_Clone(self);
  }
SWIGINTERN bool OGRFeatureShadow_Equal(OGRFeatureShadow *self,OGRFeatureShadow *feature){
    return (OGR_F_Equal(self, feature) > 0);
  }
SWIGINTERN int OGRFeatureShadow_GetFieldCount(OGRFeatureShadow *self){
    return OGR_F_GetFieldCount(self);
  }
SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_0(OGRFeatureShadow *self,int id){
    return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, id);
  }
SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_1(OGRFeatureShadow *self,char const *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, i);
      return NULL;
  }
SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_0(OGRFeatureShadow *self,int id){
    return (const char *) OGR_F_GetFieldAsString(self, id);
  }
SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_1(OGRFeatureShadow *self,char const *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  return (const char *) OGR_F_GetFieldAsString(self, i);
      return NULL;
  }
SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_0(OGRFeatureShadow *self,int id){
    return OGR_F_GetFieldAsInteger(self, id);
  }
SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_1(OGRFeatureShadow *self,char const *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  return OGR_F_GetFieldAsInteger(self, i);
      return 0;
  }
SWIGINTERN double OGRFeatureShadow_GetFieldAsDouble__SWIG_0(OGRFeatureShadow *self,int id){
    return OGR_F_GetFieldAsDouble(self, id);
  }
SWIGINTERN double OGRFeatureShadow_GetFieldAsDouble__SWIG_1(OGRFeatureShadow *self,char const *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  return OGR_F_GetFieldAsDouble(self, i);
      return 0;
  }
SWIGINTERN void OGRFeatureShadow_GetFieldAsDateTime(OGRFeatureShadow *self,int id,int *pnYear,int *pnMonth,int *pnDay,int *pnHour,int *pnMinute,int *pnSecond,int *pnTZFlag){
      OGR_F_GetFieldAsDateTime(self, id, pnYear, pnMonth, pnDay,
			       pnHour, pnMinute, pnSecond,
			       pnTZFlag);
  }
SWIGINTERN void OGRFeatureShadow_GetFieldAsIntegerList(OGRFeatureShadow *self,int id,int *nLen,int const **pList){
      *pList = OGR_F_GetFieldAsIntegerList(self, id, nLen);
  }
SWIGINTERN void OGRFeatureShadow_GetFieldAsDoubleList(OGRFeatureShadow *self,int id,int *nLen,double const **pList){
      *pList = OGR_F_GetFieldAsDoubleList(self, id, nLen);
  }
SWIGINTERN void OGRFeatureShadow_GetFieldAsStringList(OGRFeatureShadow *self,int id,char ***pList){
      *pList = OGR_F_GetFieldAsStringList(self, id);
  }
SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_0(OGRFeatureShadow *self,int id){
    return (OGR_F_IsFieldSet(self, id) > 0);
  }
SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_1(OGRFeatureShadow *self,char const *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  return (OGR_F_IsFieldSet(self, i) > 0);
      return false;
  }
SWIGINTERN int OGRFeatureShadow_GetFieldIndex(OGRFeatureShadow *self,char const *name){
      return OGR_F_GetFieldIndex(self, name);
  }
SWIGINTERN int OGRFeatureShadow_GetFID(OGRFeatureShadow *self){
    return OGR_F_GetFID(self);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetFID(OGRFeatureShadow *self,int fid){
    return OGR_F_SetFID(self, fid);
  }
SWIGINTERN void OGRFeatureShadow_DumpReadable(OGRFeatureShadow *self){
    OGR_F_DumpReadable(self, NULL);
  }
SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_0(OGRFeatureShadow *self,int id){
    OGR_F_UnsetField(self, id);
  }
SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_1(OGRFeatureShadow *self,char const *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  OGR_F_UnsetField(self, i);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_0(OGRFeatureShadow *self,int id,char const *value){
    OGR_F_SetFieldString(self, id, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_1(OGRFeatureShadow *self,char const *name,char const *value){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  OGR_F_SetFieldString(self, i, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_2(OGRFeatureShadow *self,int id,int value){
    OGR_F_SetFieldInteger(self, id, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_3(OGRFeatureShadow *self,char const *name,int value){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  OGR_F_SetFieldInteger(self, i, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_4(OGRFeatureShadow *self,int id,double value){
    OGR_F_SetFieldDouble(self, id, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_5(OGRFeatureShadow *self,char const *name,double value){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  OGR_F_SetFieldDouble(self, i, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_6(OGRFeatureShadow *self,int id,int year,int month,int day,int hour,int minute,int second,int tzflag){
    OGR_F_SetFieldDateTime(self, id, year, month, day,
                             hour, minute, second, 
                             tzflag);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_7(OGRFeatureShadow *self,char const *name,int year,int month,int day,int hour,int minute,int second,int tzflag){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1)
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
      else
	  OGR_F_SetFieldDateTime(self, i, year, month, day,
				 hour, minute, second, 
				 tzflag);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldIntegerList(OGRFeatureShadow *self,int id,int nList,int *pList){
      OGR_F_SetFieldIntegerList(self, id, nList, pList);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldDoubleList(OGRFeatureShadow *self,int id,int nList,double *pList){
      OGR_F_SetFieldDoubleList(self, id, nList, pList);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldStringList(OGRFeatureShadow *self,int id,char **pList){
      OGR_F_SetFieldStringList(self, id, pList);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetFrom(OGRFeatureShadow *self,OGRFeatureShadow *other,int forgiving=1){
    return OGR_F_SetFrom(self, other, forgiving);
  }
SWIGINTERN char const *OGRFeatureShadow_GetStyleString(OGRFeatureShadow *self){
    return (const char*) OGR_F_GetStyleString(self);
  }
SWIGINTERN void OGRFeatureShadow_SetStyleString(OGRFeatureShadow *self,char const *the_string){
    OGR_F_SetStyleString(self, the_string);
  }
SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_0(OGRFeatureShadow *self,int id){
    return (OGRFieldType) OGR_Fld_GetType( OGR_F_GetFieldDefnRef( self, id));
  }
SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_1(OGRFeatureShadow *self,char const *name){
      int i = OGR_F_GetFieldIndex(self, name);
      if (i == -1) {
	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
	  return (OGRFieldType)0;
      } else
	  return (OGRFieldType) OGR_Fld_GetType( 
	      OGR_F_GetFieldDefnRef( self,  i )
	      );
  }
SWIGINTERN void delete_OGRFeatureDefnShadow(OGRFeatureDefnShadow *self){
    /*OGR_FD_Destroy(self);*/
    OGR_FD_Release( OGRFeatureDefnH(self) );
  }
SWIGINTERN OGRFeatureDefnShadow *new_OGRFeatureDefnShadow(char const *name_null_ok=NULL){
    OGRFeatureDefnH h = OGR_FD_Create(name_null_ok);
    OGR_FD_Reference(h);
    return (OGRFeatureDefnShadow* )h;
  }
SWIGINTERN char const *OGRFeatureDefnShadow_GetName(OGRFeatureDefnShadow *self){
    return OGR_FD_GetName(self);
  }
SWIGINTERN int OGRFeatureDefnShadow_GetFieldCount(OGRFeatureDefnShadow *self){
    return OGR_FD_GetFieldCount(self);
  }
SWIGINTERN OGRFieldDefnShadow *OGRFeatureDefnShadow_GetFieldDefn(OGRFeatureDefnShadow *self,int i){
    return (OGRFieldDefnShadow*) OGR_FD_GetFieldDefn(self, i);
  }
SWIGINTERN int OGRFeatureDefnShadow_GetFieldIndex(OGRFeatureDefnShadow *self,char const *name){
      return OGR_FD_GetFieldIndex(self, name);
  }
SWIGINTERN void OGRFeatureDefnShadow_AddFieldDefn(OGRFeatureDefnShadow *self,OGRFieldDefnShadow *defn){
    OGR_FD_AddFieldDefn(self, defn);
  }
SWIGINTERN OGRwkbGeometryType OGRFeatureDefnShadow_GetGeomType(OGRFeatureDefnShadow *self){
    return (OGRwkbGeometryType) OGR_FD_GetGeomType(self);
  }
SWIGINTERN void OGRFeatureDefnShadow_SetGeomType(OGRFeatureDefnShadow *self,OGRwkbGeometryType geom_type){
    OGR_FD_SetGeomType(self, geom_type);
  }
SWIGINTERN int OGRFeatureDefnShadow_GetReferenceCount(OGRFeatureDefnShadow *self){
    return OGR_FD_GetReferenceCount(self);
  }
SWIGINTERN int OGRFeatureDefnShadow_IsGeometryIgnored(OGRFeatureDefnShadow *self){
    return OGR_FD_IsGeometryIgnored(self);
  }
SWIGINTERN void OGRFeatureDefnShadow_SetGeometryIgnored(OGRFeatureDefnShadow *self,int bIgnored){
    return OGR_FD_SetGeometryIgnored(self,bIgnored);
  }
SWIGINTERN int OGRFeatureDefnShadow_IsStyleIgnored(OGRFeatureDefnShadow *self){
    return OGR_FD_IsStyleIgnored(self);
  }
SWIGINTERN void OGRFeatureDefnShadow_SetStyleIgnored(OGRFeatureDefnShadow *self,int bIgnored){
    return OGR_FD_SetStyleIgnored(self,bIgnored);
  }

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

SWIGINTERN void delete_OGRFieldDefnShadow(OGRFieldDefnShadow *self){
    OGR_Fld_Destroy(self);
  }
SWIGINTERN OGRFieldDefnShadow *new_OGRFieldDefnShadow(char const *name_null_ok="unnamed",OGRFieldType field_type=OFTString){
    if (ValidateOGRFieldType(field_type))
        return (OGRFieldDefnShadow*) OGR_Fld_Create(name_null_ok, field_type);
    else
        return NULL;
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetName(OGRFieldDefnShadow *self){
    return (const char *) OGR_Fld_GetNameRef(self);
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetNameRef(OGRFieldDefnShadow *self){
    return (const char *) OGR_Fld_GetNameRef(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetName(OGRFieldDefnShadow *self,char const *name){
    OGR_Fld_SetName(self, name);
  }
SWIGINTERN OGRFieldType OGRFieldDefnShadow_GetType(OGRFieldDefnShadow *self){
    return OGR_Fld_GetType(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetType(OGRFieldDefnShadow *self,OGRFieldType type){
    if (ValidateOGRFieldType(type))
        OGR_Fld_SetType(self, type);
  }
SWIGINTERN OGRJustification OGRFieldDefnShadow_GetJustify(OGRFieldDefnShadow *self){
    return OGR_Fld_GetJustify(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetJustify(OGRFieldDefnShadow *self,OGRJustification justify){
    OGR_Fld_SetJustify(self, justify);
  }
SWIGINTERN int OGRFieldDefnShadow_GetWidth(OGRFieldDefnShadow *self){
    return OGR_Fld_GetWidth(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetWidth(OGRFieldDefnShadow *self,int width){
    OGR_Fld_SetWidth(self, width);
  }
SWIGINTERN int OGRFieldDefnShadow_GetPrecision(OGRFieldDefnShadow *self){
    return OGR_Fld_GetPrecision(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetPrecision(OGRFieldDefnShadow *self,int precision){
    OGR_Fld_SetPrecision(self, precision);
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetTypeName(OGRFieldDefnShadow *self){
      return OGR_GetFieldTypeName(OGR_Fld_GetType(self));
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetFieldTypeName(OGRFieldDefnShadow *self,OGRFieldType type){
    return OGR_GetFieldTypeName(type);
  }
SWIGINTERN int OGRFieldDefnShadow_IsIgnored(OGRFieldDefnShadow *self){
    return OGR_Fld_IsIgnored( self );
  }
SWIGINTERN void OGRFieldDefnShadow_SetIgnored(OGRFieldDefnShadow *self,int bIgnored){
    return OGR_Fld_SetIgnored( self, bIgnored );
  }

  OGRGeometryShadow* CreateGeometryFromWkb( int len, char *bin_string, 
                                            OSRSpatialReferenceShadow *reference=NULL ) {
    OGRGeometryShadow *geom;
    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 ) {
    OGRGeometryShadow *geom;
    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 hPolygon;
  }


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


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


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


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


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

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

  }
SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkt(OGRGeometryShadow *self,char **argout){
    return OGR_G_ExportToWkt(self, argout);
  }
SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkb(OGRGeometryShadow *self,int *nLen,char **pBuf,OGRwkbByteOrder byte_order=wkbXDR){
    *nLen = OGR_G_WkbSize( self );
    *pBuf = (char *) malloc( *nLen * sizeof(unsigned char) );
    return OGR_G_ExportToWkb(self, byte_order, (unsigned char*) *pBuf );
  }
SWIGINTERN char const *OGRGeometryShadow_ExportToGML(OGRGeometryShadow *self){
    return (const char *) OGR_G_ExportToGML(self);
  }
SWIGINTERN char const *OGRGeometryShadow_ExportToKML(OGRGeometryShadow *self,char const *altitude_mode=NULL){
    return (const char *) OGR_G_ExportToKML(self, altitude_mode);
  }
SWIGINTERN char const *OGRGeometryShadow_ExportToJson(OGRGeometryShadow *self){
    return (const char *) OGR_G_ExportToJson(self);
  }
SWIGINTERN void OGRGeometryShadow_AddPoint(OGRGeometryShadow *self,double x,double y,double z=0){
    OGR_G_AddPoint( self, x, y, z );
  }
SWIGINTERN void OGRGeometryShadow_AddPoint_2D(OGRGeometryShadow *self,double x,double y){
    OGR_G_AddPoint_2D( self, x, y );
  }
SWIGINTERN OGRErr OGRGeometryShadow_AddGeometryDirectly(OGRGeometryShadow *self,OGRGeometryShadow *other_disown){
    return OGR_G_AddGeometryDirectly( self, other_disown );
  }
SWIGINTERN OGRErr OGRGeometryShadow_AddGeometry(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_AddGeometry( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Clone(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Clone(self);
  }
SWIGINTERN OGRwkbGeometryType OGRGeometryShadow_GetGeometryType(OGRGeometryShadow *self){
    return (OGRwkbGeometryType) OGR_G_GetGeometryType(self);
  }
SWIGINTERN char const *OGRGeometryShadow_GetGeometryName(OGRGeometryShadow *self){
    return (const char *) OGR_G_GetGeometryName(self);
  }
SWIGINTERN double OGRGeometryShadow_Length(OGRGeometryShadow *self){
    return OGR_G_Length(self);
  }
SWIGINTERN double OGRGeometryShadow_Area(OGRGeometryShadow *self){
    return OGR_G_Area(self);
  }
SWIGINTERN double OGRGeometryShadow_GetArea(OGRGeometryShadow *self){
    return OGR_G_Area(self);
  }
SWIGINTERN int OGRGeometryShadow_GetPointCount(OGRGeometryShadow *self){
    return OGR_G_GetPointCount(self);
  }
SWIGINTERN 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 void OGRGeometryShadow_GetPoint(OGRGeometryShadow *self,int iPoint=0,double argout[3]=NULL){

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

    OGR_G_GetPoint( self, iPoint, argout+0, argout+1, NULL );
  }
SWIGINTERN int OGRGeometryShadow_GetGeometryCount(OGRGeometryShadow *self){
    return OGR_G_GetGeometryCount(self);
  }
SWIGINTERN void OGRGeometryShadow_SetPoint(OGRGeometryShadow *self,int point,double x,double y,double z=0){
    OGR_G_SetPoint(self, point, x, y, z);
  }
SWIGINTERN void OGRGeometryShadow_SetPoint_2D(OGRGeometryShadow *self,int point,double x,double y){
    OGR_G_SetPoint_2D(self, point, x, y);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetGeometryRef(OGRGeometryShadow *self,int geom){
    return (OGRGeometryShadow*) OGR_G_GetGeometryRef(self, geom);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Simplify(OGRGeometryShadow *self,double tolerance){
    return (OGRGeometryShadow*) OGR_G_Simplify(self, tolerance);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_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 OGRGeometryShadow *OGRGeometryShadow_Centroid(OGRGeometryShadow *self){
    OGRGeometryShadow *pt = (OGRGeometryShadow*) OGR_G_CreateGeometry( wkbPoint );
    OGR_G_Centroid( self, pt );
    return pt;
  }
SWIGINTERN int OGRGeometryShadow_WkbSize(OGRGeometryShadow *self){
    return OGR_G_WkbSize(self);
  }
SWIGINTERN int OGRGeometryShadow_GetCoordinateDimension(OGRGeometryShadow *self){
    return OGR_G_GetCoordinateDimension(self);
  }
SWIGINTERN void OGRGeometryShadow_SetCoordinateDimension(OGRGeometryShadow *self,int dimension){
    OGR_G_SetCoordinateDimension(self, dimension);
  }
SWIGINTERN int OGRGeometryShadow_GetDimension(OGRGeometryShadow *self){
    return OGR_G_GetDimension(self);
  }

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

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

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

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


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


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


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


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

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


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

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

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


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

static swig_type_info _swigt__int = {"_int", "int", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRDataSourceShadow = {"_p_OGRDataSourceShadow", "OGRDataSourceShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRDriverShadow = {"_p_OGRDriverShadow", "OGRDriverShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRFeatureDefnShadow = {"_p_OGRFeatureDefnShadow", "OGRFeatureDefnShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRFieldDefnShadow = {"_p_OGRFieldDefnShadow", "OGRFieldDefnShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRGeometryShadow = {"_p_OGRGeometryShadow", "OGRGeometryShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "OGRFieldType *|int *|OGRwkbGeometryType *|OGRJustification *|OGRwkbByteOrder *|OGRErr *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_OGRGeometryShadow = {"_p_p_OGRGeometryShadow", "OGRGeometryShadow **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_OGRLayerShadow = {"_p_p_OGRLayerShadow", "OGRLayerShadow **", 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__int,
  &_swigt__p_GIntBig,
  &_swigt__p_OGRDataSourceShadow,
  &_swigt__p_OGRDriverShadow,
  &_swigt__p_OGRFeatureDefnShadow,
  &_swigt__p_OGRFeatureShadow,
  &_swigt__p_OGRFieldDefnShadow,
  &_swigt__p_OGRGeometryShadow,
  &_swigt__p_OGRLayerShadow,
  &_swigt__p_OSRCoordinateTransformationShadow,
  &_swigt__p_OSRSpatialReferenceShadow,
  &_swigt__p_char,
  &_swigt__p_double,
  &_swigt__p_int,
  &_swigt__p_p_OGRGeometryShadow,
  &_swigt__p_p_OGRLayerShadow,
  &_swigt__p_p_char,
  &_swigt__p_p_double,
  &_swigt__p_p_int,
  &_swigt__p_p_p_char,
};

static swig_cast_info _swigc__int[] = {  {&_swigt__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_GIntBig[] = {  {&_swigt__p_GIntBig, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRDataSourceShadow[] = {  {&_swigt__p_OGRDataSourceShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRDriverShadow[] = {  {&_swigt__p_OGRDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRFeatureDefnShadow[] = {  {&_swigt__p_OGRFeatureDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRFeatureShadow[] = {  {&_swigt__p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRFieldDefnShadow[] = {  {&_swigt__p_OGRFieldDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRGeometryShadow[] = {  {&_swigt__p_OGRGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OGRLayerShadow[] = {  {&_swigt__p_OGRLayerShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = {  {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_OGRGeometryShadow[] = {  {&_swigt__p_p_OGRGeometryShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_OGRLayerShadow[] = {  {&_swigt__p_p_OGRLayerShadow, 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__int,
  _swigc__p_GIntBig,
  _swigc__p_OGRDataSourceShadow,
  _swigc__p_OGRDriverShadow,
  _swigc__p_OGRFeatureDefnShadow,
  _swigc__p_OGRFeatureShadow,
  _swigc__p_OGRFieldDefnShadow,
  _swigc__p_OGRGeometryShadow,
  _swigc__p_OGRLayerShadow,
  _swigc__p_OSRCoordinateTransformationShadow,
  _swigc__p_OSRSpatialReferenceShadow,
  _swigc__p_char,
  _swigc__p_double,
  _swigc__p_int,
  _swigc__p_p_OGRGeometryShadow,
  _swigc__p_p_OGRLayerShadow,
  _swigc__p_p_char,
  _swigc__p_p_double,
  _swigc__p_p_int,
  _swigc__p_p_p_char,
};


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

/* end header section */
/* vdecl subsection */
static int le_swig__p_GIntBig=0; /* handle for _p_GIntBig */
static int le_swig__p_double=0; /* handle for _p_double */
static int le_swig__p_p_double=0; /* handle for _p_p_double */
static int le_swig__p_p_char=0; /* handle for _p_p_char */
static int le_swig__p_char=0; /* handle for _p_char */
static int le_swig__p_p_p_char=0; /* handle for _p_p_p_char */
static int le_swig__p_OGRFeatureShadow=0; /* handle for Feature */
static int le_swig__p_OGRGeometryShadow=0; /* handle for Geometry */
static int le_swig__p_OSRSpatialReferenceShadow=0; /* handle for SpatialReference */
static int le_swig__p_OGRDataSourceShadow=0; /* handle for DataSource */
static int le_swig__p_p_OGRGeometryShadow=0; /* handle for _p_p_OGRGeometryShadow */
static int le_swig__int=0; /* handle for _int */
static int le_swig__p_int=0; /* handle for _p_int */
static int le_swig__p_OGRFieldDefnShadow=0; /* handle for FieldDefn */
static int le_swig__p_OGRFeatureDefnShadow=0; /* handle for FeatureDefn */
static int le_swig__p_p_OGRLayerShadow=0; /* handle for _p_p_OGRLayerShadow */
static int le_swig__p_OGRLayerShadow=0; /* handle for Layer */
static int le_swig__p_OGRDriverShadow=0; /* handle for Driver */
static int le_swig__p_p_int=0; /* handle for _p_p_int */
static int le_swig__p_OSRCoordinateTransformationShadow=0; /* handle for CoordinateTransformation */
/* end vdecl subsection */
/* wrapper section */
ZEND_NAMED_FUNCTION(_wrap_Driver_name_get) {
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  zval **args[1];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDriverShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Driver_name_get. Expected SWIGTYPE_p_OGRDriverShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (char *)OGRDriverShadow_name_get(arg1);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Driver_CreateDataSource) {
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char **arg3 = (char **) 0 ;
  zval **args[3];
  int arg_count;
  OGRDataSourceShadow *result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<2 || arg_count>3 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDriverShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Driver_CreateDataSource. Expected SWIGTYPE_p_OGRDriverShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  if(arg_count > 2) {
    {
      /* %typemap(in) char **options */
      zend_error(E_ERROR,"Typemap (in) char **options not properly defined");
      //  int size = PySequence_Size(args[2]);
      //  for (int i = 0; i < size; i++) {
      //    char *pszItem = NULL;
      //    if ( ! PyArg_Parse( PySequence_GetItem(args[2],i), "s", &pszItem ) ) {
      //      PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
      //      SWIG_fail;
      //    }
      //    arg3 = CSLAddString( arg3, pszItem );
      //  }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRDataSourceShadow *)OGRDriverShadow_CreateDataSource(arg1,(char const *)arg2,arg3);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRDataSourceShadow, 1);
  
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg3 );
  }
  return;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg3 );
  }
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Driver_CopyDataSource) {
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  OGRDataSourceShadow *arg2 = (OGRDataSourceShadow *) 0 ;
  char *arg3 = (char *) 0 ;
  char **arg4 = (char **) 0 ;
  zval **args[4];
  int arg_count;
  OGRDataSourceShadow *result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<3 || arg_count>4 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDriverShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Driver_CopyDataSource. Expected SWIGTYPE_p_OGRDriverShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Driver_CopyDataSource. Expected SWIGTYPE_p_OGRDataSourceShadow");
    }
  }
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[2])->type==IS_NULL) {
    arg3 = (char *) 0;
  } else {
    convert_to_string_ex(args[2]);
    arg3 = (char *) Z_STRVAL_PP(args[2]);
  }
  /*@SWIG@*/;
  
  if(arg_count > 3) {
    {
      /* %typemap(in) char **options */
      zend_error(E_ERROR,"Typemap (in) char **options not properly defined");
      //  int size = PySequence_Size(args[3]);
      //  for (int i = 0; i < size; i++) {
      //    char *pszItem = NULL;
      //    if ( ! PyArg_Parse( PySequence_GetItem(args[3],i), "s", &pszItem ) ) {
      //      PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
      //      SWIG_fail;
      //    }
      //    arg4 = CSLAddString( arg4, pszItem );
      //  }
    }
  }
  result = (OGRDataSourceShadow *)OGRDriverShadow_CopyDataSource(arg1,arg2,(char const *)arg3,arg4);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRDataSourceShadow, 1);
  
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  return;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Driver_Open) {
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 = (int) 0 ;
  zval **args[3];
  int arg_count;
  OGRDataSourceShadow *result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<2 || arg_count>3 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDriverShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Driver_Open. Expected SWIGTYPE_p_OGRDriverShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  if(arg_count > 2) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[2]);
    arg3 = (int) Z_LVAL_PP(args[2]);
    /*@SWIG@*/;
    
  }
  result = (OGRDataSourceShadow *)OGRDriverShadow_Open(arg1,(char const *)arg2,arg3);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRDataSourceShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Driver_DeleteDataSource) {
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  zval **args[2];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDriverShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Driver_DeleteDataSource. Expected SWIGTYPE_p_OGRDriverShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (int)OGRDriverShadow_DeleteDataSource(arg1,(char const *)arg2);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Driver_TestCapability) {
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDriverShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Driver_TestCapability. Expected SWIGTYPE_p_OGRDriverShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (bool)OGRDriverShadow_TestCapability(arg1,(char const *)arg2);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Driver_GetName) {
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  zval **args[1];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDriverShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Driver_GetName. Expected SWIGTYPE_p_OGRDriverShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (char *)OGRDriverShadow_GetName(arg1);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Driver_Register) {
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  zval **args[1];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDriverShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Driver_Register. Expected SWIGTYPE_p_OGRDriverShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  OGRDriverShadow_Register(arg1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Driver_Deregister) {
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  zval **args[1];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDriverShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Driver_Deregister. Expected SWIGTYPE_p_OGRDriverShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  OGRDriverShadow_Deregister(arg1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_name_get) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  zval **args[1];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_name_get. Expected SWIGTYPE_p_OGRDataSourceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (char *)OGRDataSourceShadow_name_get(arg1);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_DataSource(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (OGRDataSourceShadow *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_OGRDataSourceShadow TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "OGRDataSourceShadow resource already free'd");
  delete_OGRDataSourceShadow(arg1);
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_GetRefCount) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_GetRefCount. Expected SWIGTYPE_p_OGRDataSourceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRDataSourceShadow_GetRefCount(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_GetSummaryRefCount) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_GetSummaryRefCount. Expected SWIGTYPE_p_OGRDataSourceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRDataSourceShadow_GetSummaryRefCount(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_GetLayerCount) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_GetLayerCount. Expected SWIGTYPE_p_OGRDataSourceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRDataSourceShadow_GetLayerCount(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_GetDriver) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  zval **args[1];
  OGRDriverShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_GetDriver. Expected SWIGTYPE_p_OGRDataSourceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRDriverShadow *)OGRDataSourceShadow_GetDriver(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRDriverShadow, 0);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_GetName) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  zval **args[1];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_GetName. Expected SWIGTYPE_p_OGRDataSourceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (char *)OGRDataSourceShadow_GetName(arg1);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_DeleteLayer) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  int arg2 ;
  zval **args[2];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_DeleteLayer. Expected SWIGTYPE_p_OGRDataSourceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = (OGRErr)OGRDataSourceShadow_DeleteLayer(arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_CreateLayer) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
  OGRwkbGeometryType arg4 = (OGRwkbGeometryType) wkbUnknown ;
  char **arg5 = (char **) 0 ;
  zval **args[5];
  int arg_count;
  OGRLayerShadow *result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<2 || arg_count>5 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_CreateLayer. Expected SWIGTYPE_p_OGRDataSourceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  if(arg_count > 2) {
    {
      if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
        SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of DataSource_CreateLayer. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
      }
    }
  }
  if(arg_count > 3) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[3]);
    arg4 = (OGRwkbGeometryType) Z_LVAL_PP(args[3]);
    /*@SWIG@*/;
    
  }
  if(arg_count > 4) {
    {
      /* %typemap(in) char **options */
      zend_error(E_ERROR,"Typemap (in) char **options not properly defined");
      //  int size = PySequence_Size(args[4]);
      //  for (int i = 0; i < size; i++) {
      //    char *pszItem = NULL;
      //    if ( ! PyArg_Parse( PySequence_GetItem(args[4],i), "s", &pszItem ) ) {
      //      PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
      //      SWIG_fail;
      //    }
      //    arg5 = CSLAddString( arg5, pszItem );
      //  }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRLayerShadow *)OGRDataSourceShadow_CreateLayer(arg1,(char const *)arg2,arg3,arg4,arg5);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRLayerShadow, 0);
  
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg5 );
  }
  return;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg5 );
  }
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_CopyLayer) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  char *arg3 = (char *) 0 ;
  char **arg4 = (char **) 0 ;
  zval **args[4];
  int arg_count;
  OGRLayerShadow *result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<3 || arg_count>4 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_CopyLayer. Expected SWIGTYPE_p_OGRDataSourceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of DataSource_CopyLayer. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[2])->type==IS_NULL) {
    arg3 = (char *) 0;
  } else {
    convert_to_string_ex(args[2]);
    arg3 = (char *) Z_STRVAL_PP(args[2]);
  }
  /*@SWIG@*/;
  
  if(arg_count > 3) {
    {
      /* %typemap(in) char **options */
      zend_error(E_ERROR,"Typemap (in) char **options not properly defined");
      //  int size = PySequence_Size(args[3]);
      //  for (int i = 0; i < size; i++) {
      //    char *pszItem = NULL;
      //    if ( ! PyArg_Parse( PySequence_GetItem(args[3],i), "s", &pszItem ) ) {
      //      PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
      //      SWIG_fail;
      //    }
      //    arg4 = CSLAddString( arg4, pszItem );
      //  }
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRLayerShadow *)OGRDataSourceShadow_CopyLayer(arg1,arg2,(char const *)arg3,arg4);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRLayerShadow, 0);
  
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  return;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg4 );
  }
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_GetLayerByIndex) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  int arg2 = (int) 0 ;
  zval **args[2];
  int arg_count;
  OGRLayerShadow *result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_GetLayerByIndex. Expected SWIGTYPE_p_OGRDataSourceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[1]);
    arg2 = (int) Z_LVAL_PP(args[1]);
    /*@SWIG@*/;
    
  }
  result = (OGRLayerShadow *)OGRDataSourceShadow_GetLayerByIndex(arg1,arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRLayerShadow, 0);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_GetLayerByName) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  zval **args[2];
  OGRLayerShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_GetLayerByName. Expected SWIGTYPE_p_OGRDataSourceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  result = (OGRLayerShadow *)OGRDataSourceShadow_GetLayerByName(arg1,(char const *)arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRLayerShadow, 0);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_TestCapability) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_TestCapability. Expected SWIGTYPE_p_OGRDataSourceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (bool)OGRDataSourceShadow_TestCapability(arg1,(char const *)arg2);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_ExecuteSQL) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRGeometryShadow *arg3 = (OGRGeometryShadow *) NULL ;
  char *arg4 = (char *) "" ;
  zval **args[4];
  int arg_count;
  OGRLayerShadow *result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<2 || arg_count>4 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_ExecuteSQL. Expected SWIGTYPE_p_OGRDataSourceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  if(arg_count > 2) {
    {
      if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
        SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of DataSource_ExecuteSQL. Expected SWIGTYPE_p_OGRGeometryShadow");
      }
    }
  }
  if(arg_count > 3) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
    if ((*args[3])->type==IS_NULL) {
      arg4 = (char *) 0;
    } else {
      convert_to_string_ex(args[3]);
      arg4 = (char *) Z_STRVAL_PP(args[3]);
    }
    /*@SWIG@*/;
    
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRLayerShadow *)OGRDataSourceShadow_ExecuteSQL(arg1,(char const *)arg2,arg3,(char const *)arg4);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRLayerShadow, 0);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_ReleaseResultSet) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_ReleaseResultSet. Expected SWIGTYPE_p_OGRDataSourceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRLayerShadow, SWIG_POINTER_DISOWN ) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of DataSource_ReleaseResultSet. Expected SWIGTYPE_p_p_OGRLayerShadow");
    }
  }
  OGRDataSourceShadow_ReleaseResultSet(arg1,arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetRefCount) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetRefCount. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRLayerShadow_GetRefCount(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_SetSpatialFilter) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_SetSpatialFilter. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Layer_SetSpatialFilter. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  OGRLayerShadow_SetSpatialFilter(arg1,arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_SetSpatialFilterRect) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  zval **args[5];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_SetSpatialFilterRect. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  OGRLayerShadow_SetSpatialFilterRect(arg1,arg2,arg3,arg4,arg5);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetSpatialFilter) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  zval **args[1];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetSpatialFilter. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRGeometryShadow *)OGRLayerShadow_GetSpatialFilter(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 0);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_SetAttributeFilter) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  zval **args[2];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_SetAttributeFilter. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  result = (OGRErr)OGRLayerShadow_SetAttributeFilter(arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_ResetReading) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  zval **args[1];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_ResetReading. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  OGRLayerShadow_ResetReading(arg1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetName) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  zval **args[1];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetName. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (char *)OGRLayerShadow_GetName(arg1);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetGeomType) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  zval **args[1];
  OGRwkbGeometryType result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetGeomType. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRwkbGeometryType)OGRLayerShadow_GetGeomType(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetGeometryColumn) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  zval **args[1];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetGeometryColumn. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (char *)OGRLayerShadow_GetGeometryColumn(arg1);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetFIDColumn) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  zval **args[1];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetFIDColumn. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (char *)OGRLayerShadow_GetFIDColumn(arg1);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetFeature) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  long arg2 ;
  zval **args[2];
  OGRFeatureShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetFeature. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (long) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = (OGRFeatureShadow *)OGRLayerShadow_GetFeature(arg1,arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFeatureShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetNextFeature) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  zval **args[1];
  OGRFeatureShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetNextFeature. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRFeatureShadow *)OGRLayerShadow_GetNextFeature(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFeatureShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_SetNextByIndex) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  long arg2 ;
  zval **args[2];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_SetNextByIndex. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (long) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = (OGRErr)OGRLayerShadow_SetNextByIndex(arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_SetFeature) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
  zval **args[2];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_SetFeature. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Layer_SetFeature. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRErr)OGRLayerShadow_SetFeature(arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_CreateFeature) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
  zval **args[2];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_CreateFeature. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Layer_CreateFeature. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRErr)OGRLayerShadow_CreateFeature(arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_DeleteFeature) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  long arg2 ;
  zval **args[2];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_DeleteFeature. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (long) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = (OGRErr)OGRLayerShadow_DeleteFeature(arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_SyncToDisk) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  zval **args[1];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_SyncToDisk. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRErr)OGRLayerShadow_SyncToDisk(arg1);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetLayerDefn) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  zval **args[1];
  OGRFeatureDefnShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetLayerDefn. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRFeatureDefnShadow *)OGRLayerShadow_GetLayerDefn(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFeatureDefnShadow, 0);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetFeatureCount) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 = (int) 1 ;
  zval **args[2];
  int arg_count;
  int result;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetFeatureCount. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[1]);
    arg2 = (int) Z_LVAL_PP(args[1]);
    /*@SWIG@*/;
    
  }
  result = (int)OGRLayerShadow_GetFeatureCount(arg1,arg2);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetExtent) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  double *arg2 ;
  int arg3 = (int) 1 ;
  double argout2[4] ;
  zval **args[2];
  int arg_count;
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (double argout2[ANY]) */
    arg2 = argout2;
  }
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetExtent. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[1]);
    arg3 = (int) Z_LVAL_PP(args[1]);
    /*@SWIG@*/;
    
  }
  result = (OGRErr)OGRLayerShadow_GetExtent(arg1,arg2,arg3);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(argout) (double argout[ANY]) */
    zval *t = CreateTupleFromDoubleArray( arg2, 4 );
    t_output_helper( &return_value, t );
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_TestCapability) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_TestCapability. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (bool)OGRLayerShadow_TestCapability(arg1,(char const *)arg2);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_CreateField) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
  int arg3 = (int) 1 ;
  zval **args[3];
  int arg_count;
  OGRErr result;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<2 || arg_count>3 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_CreateField. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Layer_CreateField. Expected SWIGTYPE_p_OGRFieldDefnShadow");
    }
  }
  if(arg_count > 2) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[2]);
    arg3 = (int) Z_LVAL_PP(args[2]);
    /*@SWIG@*/;
    
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRErr)OGRLayerShadow_CreateField(arg1,arg2,arg3);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_StartTransaction) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  zval **args[1];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_StartTransaction. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRErr)OGRLayerShadow_StartTransaction(arg1);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_CommitTransaction) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  zval **args[1];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_CommitTransaction. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRErr)OGRLayerShadow_CommitTransaction(arg1);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_RollbackTransaction) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  zval **args[1];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_RollbackTransaction. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRErr)OGRLayerShadow_RollbackTransaction(arg1);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetSpatialRef) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  zval **args[1];
  OSRSpatialReferenceShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetSpatialRef. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OSRSpatialReferenceShadow *)OGRLayerShadow_GetSpatialRef(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetFeaturesRead) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  zval **args[1];
  GIntBig result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetFeaturesRead. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = OGRLayerShadow_GetFeaturesRead(arg1);
  {
    GIntBig * resultobj = new GIntBig((const GIntBig &) result);
    SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_GIntBig, 1);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_SetIgnoredFields) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  zval **args[2];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_SetIgnoredFields. Expected SWIGTYPE_p_OGRLayerShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    /* %typemap(in) char **options */
    zend_error(E_ERROR,"Typemap (in) char **options not properly defined");
    //  int size = PySequence_Size(args[1]);
    //  for (int i = 0; i < size; i++) {
    //    char *pszItem = NULL;
    //    if ( ! PyArg_Parse( PySequence_GetItem(args[1],i), "s", &pszItem ) ) {
    //      PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    //      SWIG_fail;
    //    }
    //    arg2 = CSLAddString( arg2, pszItem );
    //  }
  }
  result = (OGRErr)OGRLayerShadow_SetIgnoredFields(arg1,(char const **)arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg2 );
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg2 );
  }
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_Feature(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (OGRFeatureShadow *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_OGRFeatureShadow TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "OGRFeatureShadow resource already free'd");
  delete_OGRFeatureShadow(arg1);
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_new_Feature) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  zval **args[1];
  OGRFeatureShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of new_Feature. Expected SWIGTYPE_p_OGRFeatureDefnShadow");
    }
  }
  {
    if (!arg1) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRFeatureShadow *)new_OGRFeatureShadow(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFeatureShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetDefnRef) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  zval **args[1];
  OGRFeatureDefnShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetDefnRef. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRFeatureDefnShadow *)OGRFeatureShadow_GetDefnRef(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFeatureDefnShadow, 0);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetGeometry) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetGeometry. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Feature_SetGeometry. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  result = (OGRErr)OGRFeatureShadow_SetGeometry(arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetGeometryDirectly) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetGeometryDirectly. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN ) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Feature_SetGeometryDirectly. Expected SWIGTYPE_p_p_OGRGeometryShadow");
    }
  }
  result = (OGRErr)OGRFeatureShadow_SetGeometryDirectly(arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetGeometryRef) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  zval **args[1];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetGeometryRef. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeometryRef(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 0);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_c_Clone) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  zval **args[1];
  OGRFeatureShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_c_Clone. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRFeatureShadow *)OGRFeatureShadow_Clone(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFeatureShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_Equal) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_Equal. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Feature_Equal. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (bool)OGRFeatureShadow_Equal(arg1,arg2);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldCount) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldCount. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRFeatureShadow_GetFieldCount(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldDefnRef__SWIG_0) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  zval **args[2];
  OGRFieldDefnShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldDefnRef. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_0(arg1,arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFieldDefnShadow, 0);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldDefnRef__SWIG_1) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  zval **args[2];
  OGRFieldDefnShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldDefnRef. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFieldDefnShadow, 0);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldDefnRef) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        return _wrap_Feature_GetFieldDefnRef__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_STRING); 
      if (_v) {
        return _wrap_Feature_GetFieldDefnRef__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Feature_GetFieldDefnRef'";
  zend_error(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsString__SWIG_0) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  zval **args[2];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldAsString. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_0(arg1,arg2);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsString__SWIG_1) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  zval **args[2];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldAsString. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_1(arg1,(char const *)arg2);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsString) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        return _wrap_Feature_GetFieldAsString__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_STRING); 
      if (_v) {
        return _wrap_Feature_GetFieldAsString__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Feature_GetFieldAsString'";
  zend_error(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsInteger__SWIG_0) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  zval **args[2];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldAsInteger. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_0(arg1,arg2);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsInteger__SWIG_1) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  zval **args[2];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldAsInteger. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_1(arg1,(char const *)arg2);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsInteger) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        return _wrap_Feature_GetFieldAsInteger__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_STRING); 
      if (_v) {
        return _wrap_Feature_GetFieldAsInteger__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Feature_GetFieldAsInteger'";
  zend_error(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsDouble__SWIG_0) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  zval **args[2];
  double result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldAsDouble. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_0(arg1,arg2);
  {
    ZVAL_DOUBLE(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsDouble__SWIG_1) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  zval **args[2];
  double result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldAsDouble. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_1(arg1,(char const *)arg2);
  {
    ZVAL_DOUBLE(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsDouble) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        return _wrap_Feature_GetFieldAsDouble__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_STRING); 
      if (_v) {
        return _wrap_Feature_GetFieldAsDouble__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Feature_GetFieldAsDouble'";
  zend_error(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsDateTime) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int *arg3 = (int *) 0 ;
  int *arg4 = (int *) 0 ;
  int *arg5 = (int *) 0 ;
  int *arg6 = (int *) 0 ;
  int *arg7 = (int *) 0 ;
  int *arg8 = (int *) 0 ;
  int *arg9 = (int *) 0 ;
  int temp3 ;
  int temp4 ;
  int temp5 ;
  int temp6 ;
  int temp7 ;
  int temp8 ;
  int temp9 ;
  zval **args[2];
  
  arg3 = &temp3;
  arg4 = &temp4;
  arg5 = &temp5;
  arg6 = &temp6;
  arg7 = &temp7;
  arg8 = &temp8;
  arg9 = &temp9;
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldAsDateTime. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  OGRFeatureShadow_GetFieldAsDateTime(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
  
  {
    zval *o;
    MAKE_STD_ZVAL(o);
    ZVAL_LONG(o,temp3);
    t_output_helper( &return_value, o );
  }
  {
    zval *o;
    MAKE_STD_ZVAL(o);
    ZVAL_LONG(o,temp4);
    t_output_helper( &return_value, o );
  }
  {
    zval *o;
    MAKE_STD_ZVAL(o);
    ZVAL_LONG(o,temp5);
    t_output_helper( &return_value, o );
  }
  {
    zval *o;
    MAKE_STD_ZVAL(o);
    ZVAL_LONG(o,temp6);
    t_output_helper( &return_value, o );
  }
  {
    zval *o;
    MAKE_STD_ZVAL(o);
    ZVAL_LONG(o,temp7);
    t_output_helper( &return_value, o );
  }
  {
    zval *o;
    MAKE_STD_ZVAL(o);
    ZVAL_LONG(o,temp8);
    t_output_helper( &return_value, o );
  }
  {
    zval *o;
    MAKE_STD_ZVAL(o);
    ZVAL_LONG(o,temp9);
    t_output_helper( &return_value, o );
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsIntegerList) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int *arg3 = (int *) 0 ;
  int **arg4 = (int **) 0 ;
  zval **args[4];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldAsIntegerList. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_int, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of Feature_GetFieldAsIntegerList. Expected SWIGTYPE_p_int");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[3], (void **) &arg4, SWIGTYPE_p_p_int, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 4 of Feature_GetFieldAsIntegerList. Expected SWIGTYPE_p_p_int");
    }
  }
  OGRFeatureShadow_GetFieldAsIntegerList(arg1,arg2,arg3,(int const **)arg4);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsDoubleList) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int *arg3 = (int *) 0 ;
  double **arg4 = (double **) 0 ;
  zval **args[4];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldAsDoubleList. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_int, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of Feature_GetFieldAsDoubleList. Expected SWIGTYPE_p_int");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[3], (void **) &arg4, SWIGTYPE_p_p_double, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 4 of Feature_GetFieldAsDoubleList. Expected SWIGTYPE_p_p_double");
    }
  }
  OGRFeatureShadow_GetFieldAsDoubleList(arg1,arg2,arg3,(double const **)arg4);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsStringList) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  char ***arg3 = (char ***) 0 ;
  zval **args[3];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldAsStringList. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_p_p_char, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of Feature_GetFieldAsStringList. Expected SWIGTYPE_p_p_p_char");
    }
  }
  OGRFeatureShadow_GetFieldAsStringList(arg1,arg2,arg3);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_IsFieldSet__SWIG_0) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_IsFieldSet. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_0(arg1,arg2);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_IsFieldSet__SWIG_1) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_IsFieldSet. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_1(arg1,(char const *)arg2);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_IsFieldSet) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        return _wrap_Feature_IsFieldSet__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_STRING); 
      if (_v) {
        return _wrap_Feature_IsFieldSet__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Feature_IsFieldSet'";
  zend_error(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldIndex) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  zval **args[2];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldIndex. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (int)OGRFeatureShadow_GetFieldIndex(arg1,(char const *)arg2);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFID) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFID. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRFeatureShadow_GetFID(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetFID) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  zval **args[2];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetFID. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = (OGRErr)OGRFeatureShadow_SetFID(arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_DumpReadable) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  zval **args[1];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_DumpReadable. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  OGRFeatureShadow_DumpReadable(arg1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_UnsetField__SWIG_0) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_UnsetField. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  OGRFeatureShadow_UnsetField__SWIG_0(arg1,arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_UnsetField__SWIG_1) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_UnsetField. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  OGRFeatureShadow_UnsetField__SWIG_1(arg1,(char const *)arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_UnsetField) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        return _wrap_Feature_UnsetField__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_STRING); 
      if (_v) {
        return _wrap_Feature_UnsetField__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Feature_UnsetField'";
  zend_error(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetField__SWIG_0) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  zval **args[3];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetField. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    /* %typemap(in) (tostring argin) */
    convert_to_string_ex(args[2]);
    arg3 = Z_STRVAL_PP( args[2] );
  }
  OGRFeatureShadow_SetField__SWIG_0(arg1,arg2,(char const *)arg3);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetField__SWIG_1) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  zval **args[3];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetField. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  {
    /* %typemap(in) (tostring argin) */
    convert_to_string_ex(args[2]);
    arg3 = Z_STRVAL_PP( args[2] );
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  OGRFeatureShadow_SetField__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetField__SWIG_2) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  zval **args[3];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetField. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  OGRFeatureShadow_SetField__SWIG_2(arg1,arg2,arg3);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetField__SWIG_3) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  zval **args[3];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetField. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  OGRFeatureShadow_SetField__SWIG_3(arg1,(char const *)arg2,arg3);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetField__SWIG_4) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  double arg3 ;
  zval **args[3];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetField. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  OGRFeatureShadow_SetField__SWIG_4(arg1,arg2,arg3);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetField__SWIG_5) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  double arg3 ;
  zval **args[3];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetField. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  OGRFeatureShadow_SetField__SWIG_5(arg1,(char const *)arg2,arg3);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetField__SWIG_6) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  int arg8 ;
  int arg9 ;
  zval **args[9];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 9 || zend_get_parameters_array_ex(9, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetField. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[4]);
  arg5 = (int) Z_LVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[5]);
  arg6 = (int) Z_LVAL_PP(args[5]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[6]);
  arg7 = (int) Z_LVAL_PP(args[6]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[7]);
  arg8 = (int) Z_LVAL_PP(args[7]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[8]);
  arg9 = (int) Z_LVAL_PP(args[8]);
  /*@SWIG@*/;
  
  OGRFeatureShadow_SetField__SWIG_6(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetField__SWIG_7) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  int arg8 ;
  int arg9 ;
  zval **args[9];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 9 || zend_get_parameters_array_ex(9, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetField. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[3]);
  arg4 = (int) Z_LVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[4]);
  arg5 = (int) Z_LVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[5]);
  arg6 = (int) Z_LVAL_PP(args[5]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[6]);
  arg7 = (int) Z_LVAL_PP(args[6]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[7]);
  arg8 = (int) Z_LVAL_PP(args[7]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[8]);
  arg9 = (int) Z_LVAL_PP(args[8]);
  /*@SWIG@*/;
  
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  OGRFeatureShadow_SetField__SWIG_7(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetField) {
  int argc;
  zval **argv[9];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        {
          /* %typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) (tostring argin) */
          _v = 1;
        }
        if (_v) {
          return _wrap_Feature_SetField__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_DOUBLE); 
        if (_v) {
          return _wrap_Feature_SetField__SWIG_4(INTERNAL_FUNCTION_PARAM_PASSTHRU);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          return _wrap_Feature_SetField__SWIG_2(INTERNAL_FUNCTION_PARAM_PASSTHRU);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_STRING); 
      if (_v) {
        {
          /* %typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) (tostring argin) */
          _v = 1;
        }
        if (_v) {
          return _wrap_Feature_SetField__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_STRING); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_DOUBLE); 
        if (_v) {
          return _wrap_Feature_SetField__SWIG_5(INTERNAL_FUNCTION_PARAM_PASSTHRU);
        }
      }
    }
  }
  if (argc == 3) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_STRING); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          return _wrap_Feature_SetField__SWIG_3(INTERNAL_FUNCTION_PARAM_PASSTHRU);
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_LONG); 
            if (_v) {
              _v = (Z_TYPE_PP(argv[5]) == IS_LONG); 
              if (_v) {
                _v = (Z_TYPE_PP(argv[6]) == IS_LONG); 
                if (_v) {
                  _v = (Z_TYPE_PP(argv[7]) == IS_LONG); 
                  if (_v) {
                    _v = (Z_TYPE_PP(argv[8]) == IS_LONG); 
                    if (_v) {
                      return _wrap_Feature_SetField__SWIG_6(INTERNAL_FUNCTION_PARAM_PASSTHRU);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  if (argc == 9) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_STRING); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_LONG); 
        if (_v) {
          _v = (Z_TYPE_PP(argv[3]) == IS_LONG); 
          if (_v) {
            _v = (Z_TYPE_PP(argv[4]) == IS_LONG); 
            if (_v) {
              _v = (Z_TYPE_PP(argv[5]) == IS_LONG); 
              if (_v) {
                _v = (Z_TYPE_PP(argv[6]) == IS_LONG); 
                if (_v) {
                  _v = (Z_TYPE_PP(argv[7]) == IS_LONG); 
                  if (_v) {
                    _v = (Z_TYPE_PP(argv[8]) == IS_LONG); 
                    if (_v) {
                      return _wrap_Feature_SetField__SWIG_7(INTERNAL_FUNCTION_PARAM_PASSTHRU);
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Feature_SetField'";
  zend_error(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetFieldIntegerList) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  int *arg4 = (int *) 0 ;
  zval **args[3];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetFieldIntegerList. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    /* %typemap(in,numinputs=1) (int nList, int* pList)*/
    zend_error(E_ERROR,"Typemap (in,numinputs=1) (int nList, int*pList) not properly defined");
    /* check if is List */
    //  if ( !PySequence_Check(args[2]) ) {
    //    PyErr_SetString(PyExc_TypeError, "not a sequence");
    //    SWIG_fail;
    //  }
    //  arg3 = PySequence_Size(args[2]);
    //  arg4 = (int*) malloc(arg3*sizeof(int));
    //  for( int i = 0; i<arg3; i++ ) {
    //    PyObject *o = PySequence_GetItem(args[2],i);
    //    if ( !PyArg_Parse(o,"i",&arg4[i]) ) {
    //      SWIG_fail;
    //    }
    //  }
  }
  OGRFeatureShadow_SetFieldIntegerList(arg1,arg2,arg3,arg4);
  
  {
    /* %typemap(freearg) (int nList, int* pList) */
    if (arg4) {
      free((void*) arg4);
    }
  }
  return;
fail:
  {
    /* %typemap(freearg) (int nList, int* pList) */
    if (arg4) {
      free((void*) arg4);
    }
  }
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetFieldDoubleList) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  double *arg4 = (double *) 0 ;
  zval **args[4];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetFieldDoubleList. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[2]);
  arg3 = (int) Z_LVAL_PP(args[2]);
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[3], (void **) &arg4, SWIGTYPE_p_double, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 4 of Feature_SetFieldDoubleList. Expected SWIGTYPE_p_double");
    }
  }
  OGRFeatureShadow_SetFieldDoubleList(arg1,arg2,arg3,arg4);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetFieldStringList) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  char **arg3 = (char **) 0 ;
  zval **args[3];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetFieldStringList. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  {
    /* %typemap(in) char **options */
    zend_error(E_ERROR,"Typemap (in) char **options not properly defined");
    //  int size = PySequence_Size(args[2]);
    //  for (int i = 0; i < size; i++) {
    //    char *pszItem = NULL;
    //    if ( ! PyArg_Parse( PySequence_GetItem(args[2],i), "s", &pszItem ) ) {
    //      PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    //      SWIG_fail;
    //    }
    //    arg3 = CSLAddString( arg3, pszItem );
    //  }
  }
  OGRFeatureShadow_SetFieldStringList(arg1,arg2,arg3);
  
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg3 );
  }
  return;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg3 );
  }
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetFrom) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
  int arg3 = (int) 1 ;
  zval **args[3];
  int arg_count;
  OGRErr result;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<2 || arg_count>3 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetFrom. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Feature_SetFrom. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(arg_count > 2) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[2]);
    arg3 = (int) Z_LVAL_PP(args[2]);
    /*@SWIG@*/;
    
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRErr)OGRFeatureShadow_SetFrom(arg1,arg2,arg3);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetStyleString) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  zval **args[1];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetStyleString. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (char *)OGRFeatureShadow_GetStyleString(arg1);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetStyleString) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetStyleString. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  OGRFeatureShadow_SetStyleString(arg1,(char const *)arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldType__SWIG_0) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  zval **args[2];
  OGRFieldType result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldType. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_0(arg1,arg2);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldType__SWIG_1) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  zval **args[2];
  OGRFieldType result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldType. Expected SWIGTYPE_p_OGRFeatureShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_1(arg1,(char const *)arg2);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldType) {
  int argc;
  zval **argv[2];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_LONG); 
      if (_v) {
        return _wrap_Feature_GetFieldType__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
      }
    }
  }
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_STRING); 
      if (_v) {
        return _wrap_Feature_GetFieldType__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'Feature_GetFieldType'";
  zend_error(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_FeatureDefn(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (OGRFeatureDefnShadow *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_OGRFeatureDefnShadow TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "OGRFeatureDefnShadow resource already free'd");
  delete_OGRFeatureDefnShadow(arg1);
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_new_FeatureDefn) {
  char *arg1 = (char *) NULL ;
  zval **args[1];
  int arg_count;
  OGRFeatureDefnShadow *result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<0 || arg_count>1 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  if(arg_count > 0) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
    if ((*args[0])->type==IS_NULL) {
      arg1 = (char *) 0;
    } else {
      convert_to_string_ex(args[0]);
      arg1 = (char *) Z_STRVAL_PP(args[0]);
    }
    /*@SWIG@*/;
    
  }
  result = (OGRFeatureDefnShadow *)new_OGRFeatureDefnShadow((char const *)arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFeatureDefnShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_GetName) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  zval **args[1];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_GetName. Expected SWIGTYPE_p_OGRFeatureDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (char *)OGRFeatureDefnShadow_GetName(arg1);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_GetFieldCount) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_GetFieldCount. Expected SWIGTYPE_p_OGRFeatureDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRFeatureDefnShadow_GetFieldCount(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_GetFieldDefn) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int arg2 ;
  zval **args[2];
  OGRFieldDefnShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_GetFieldDefn. Expected SWIGTYPE_p_OGRFeatureDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = (OGRFieldDefnShadow *)OGRFeatureDefnShadow_GetFieldDefn(arg1,arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFieldDefnShadow, 0);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_GetFieldIndex) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  zval **args[2];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_GetFieldIndex. Expected SWIGTYPE_p_OGRFeatureDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (int)OGRFeatureDefnShadow_GetFieldIndex(arg1,(char const *)arg2);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_AddFieldDefn) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_AddFieldDefn. Expected SWIGTYPE_p_OGRFeatureDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of FeatureDefn_AddFieldDefn. Expected SWIGTYPE_p_OGRFieldDefnShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  OGRFeatureDefnShadow_AddFieldDefn(arg1,arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_GetGeomType) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  zval **args[1];
  OGRwkbGeometryType result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_GetGeomType. Expected SWIGTYPE_p_OGRFeatureDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRwkbGeometryType)OGRFeatureDefnShadow_GetGeomType(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_SetGeomType) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  OGRwkbGeometryType arg2 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_SetGeomType. Expected SWIGTYPE_p_OGRFeatureDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (OGRwkbGeometryType) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  OGRFeatureDefnShadow_SetGeomType(arg1,arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_GetReferenceCount) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_GetReferenceCount. Expected SWIGTYPE_p_OGRFeatureDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRFeatureDefnShadow_GetReferenceCount(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_IsGeometryIgnored) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_IsGeometryIgnored. Expected SWIGTYPE_p_OGRFeatureDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRFeatureDefnShadow_IsGeometryIgnored(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_SetGeometryIgnored) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int arg2 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_SetGeometryIgnored. Expected SWIGTYPE_p_OGRFeatureDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  OGRFeatureDefnShadow_SetGeometryIgnored(arg1,arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_IsStyleIgnored) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_IsStyleIgnored. Expected SWIGTYPE_p_OGRFeatureDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRFeatureDefnShadow_IsStyleIgnored(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_SetStyleIgnored) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int arg2 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_SetStyleIgnored. Expected SWIGTYPE_p_OGRFeatureDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  OGRFeatureDefnShadow_SetStyleIgnored(arg1,arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_FieldDefn(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (OGRFieldDefnShadow *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_OGRFieldDefnShadow TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "OGRFieldDefnShadow resource already free'd");
  delete_OGRFieldDefnShadow(arg1);
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_new_FieldDefn) {
  char *arg1 = (char *) "unnamed" ;
  OGRFieldType arg2 = (OGRFieldType) OFTString ;
  zval **args[2];
  int arg_count;
  OGRFieldDefnShadow *result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<0 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  if(arg_count > 0) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
    if ((*args[0])->type==IS_NULL) {
      arg1 = (char *) 0;
    } else {
      convert_to_string_ex(args[0]);
      arg1 = (char *) Z_STRVAL_PP(args[0]);
    }
    /*@SWIG@*/;
    
  }
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[1]);
    arg2 = (OGRFieldType) Z_LVAL_PP(args[1]);
    /*@SWIG@*/;
    
  }
  result = (OGRFieldDefnShadow *)new_OGRFieldDefnShadow((char const *)arg1,arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFieldDefnShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_GetName) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  zval **args[1];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_GetName. Expected SWIGTYPE_p_OGRFieldDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (char *)OGRFieldDefnShadow_GetName(arg1);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_GetNameRef) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  zval **args[1];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_GetNameRef. Expected SWIGTYPE_p_OGRFieldDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (char *)OGRFieldDefnShadow_GetNameRef(arg1);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_SetName) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_SetName. Expected SWIGTYPE_p_OGRFieldDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  OGRFieldDefnShadow_SetName(arg1,(char const *)arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_GetType) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  zval **args[1];
  OGRFieldType result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_GetType. Expected SWIGTYPE_p_OGRFieldDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRFieldType)OGRFieldDefnShadow_GetType(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_SetType) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  OGRFieldType arg2 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_SetType. Expected SWIGTYPE_p_OGRFieldDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (OGRFieldType) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  OGRFieldDefnShadow_SetType(arg1,arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_GetJustify) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  zval **args[1];
  OGRJustification result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_GetJustify. Expected SWIGTYPE_p_OGRFieldDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRJustification)OGRFieldDefnShadow_GetJustify(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_SetJustify) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  OGRJustification arg2 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_SetJustify. Expected SWIGTYPE_p_OGRFieldDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (OGRJustification) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  OGRFieldDefnShadow_SetJustify(arg1,arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_GetWidth) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_GetWidth. Expected SWIGTYPE_p_OGRFieldDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRFieldDefnShadow_GetWidth(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_SetWidth) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int arg2 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_SetWidth. Expected SWIGTYPE_p_OGRFieldDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  OGRFieldDefnShadow_SetWidth(arg1,arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_GetPrecision) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_GetPrecision. Expected SWIGTYPE_p_OGRFieldDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRFieldDefnShadow_GetPrecision(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_SetPrecision) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int arg2 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_SetPrecision. Expected SWIGTYPE_p_OGRFieldDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  OGRFieldDefnShadow_SetPrecision(arg1,arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_GetTypeName) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  zval **args[1];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_GetTypeName. Expected SWIGTYPE_p_OGRFieldDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (char *)OGRFieldDefnShadow_GetTypeName(arg1);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_GetFieldTypeName) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  OGRFieldType arg2 ;
  zval **args[2];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_GetFieldTypeName. Expected SWIGTYPE_p_OGRFieldDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (OGRFieldType) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = (char *)OGRFieldDefnShadow_GetFieldTypeName(arg1,arg2);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_IsIgnored) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_IsIgnored. Expected SWIGTYPE_p_OGRFieldDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRFieldDefnShadow_IsIgnored(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_SetIgnored) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int arg2 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_SetIgnored. Expected SWIGTYPE_p_OGRFieldDefnShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  OGRFieldDefnShadow_SetIgnored(arg1,arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_CreateGeometryFromWkb) {
  int arg1 ;
  char *arg2 = (char *) 0 ;
  OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
  zval **args[2];
  int arg_count;
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
    convert_to_string_ex(args[0]);
    arg2 = Z_STRVAL_PP(args[0]);
    arg1 = Z_STRLEN_PP(args[0]);
  }
  if(arg_count > 1) {
    {
      if(SWIG_ConvertPtr(*args[1], (void **) &arg3, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
        SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of CreateGeometryFromWkb. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
      }
    }
  }
  result = (OGRGeometryShadow *)CreateGeometryFromWkb(arg1,arg2,arg3);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_CreateGeometryFromWkt) {
  char **arg1 = (char **) 0 ;
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) NULL ;
  char *val1 ;
  zval **args[2];
  int arg_count;
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    /* %typemap(in) (char **ignorechange) */
    convert_to_string_ex( args[0] );
    arg1 = NULL;
  }
  if(arg_count > 1) {
    {
      if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
        SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of CreateGeometryFromWkt. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
      }
    }
  }
  result = (OGRGeometryShadow *)CreateGeometryFromWkt(arg1,arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_CreateGeometryFromGML) {
  char *arg1 = (char *) 0 ;
  zval **args[1];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[0])->type==IS_NULL) {
    arg1 = (char *) 0;
  } else {
    convert_to_string_ex(args[0]);
    arg1 = (char *) Z_STRVAL_PP(args[0]);
  }
  /*@SWIG@*/;
  
  result = (OGRGeometryShadow *)CreateGeometryFromGML((char const *)arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_CreateGeometryFromJson) {
  char *arg1 = (char *) 0 ;
  zval **args[1];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[0])->type==IS_NULL) {
    arg1 = (char *) 0;
  } else {
    convert_to_string_ex(args[0]);
    arg1 = (char *) Z_STRVAL_PP(args[0]);
  }
  /*@SWIG@*/;
  
  result = (OGRGeometryShadow *)CreateGeometryFromJson((char const *)arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_BuildPolygonFromEdges) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  int arg3 = (int) 0 ;
  double arg4 = (double) 0 ;
  zval **args[4];
  int arg_count;
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>4 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of BuildPolygonFromEdges. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[1]);
    arg2 = (int) Z_LVAL_PP(args[1]);
    /*@SWIG@*/;
    
  }
  if(arg_count > 2) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[2]);
    arg3 = (int) Z_LVAL_PP(args[2]);
    /*@SWIG@*/;
    
  }
  if(arg_count > 3) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
    convert_to_double_ex(args[3]);
    arg4 = (double) Z_DVAL_PP(args[3]);
    /*@SWIG@*/;
    
  }
  result = (OGRGeometryShadow *)BuildPolygonFromEdges(arg1,arg2,arg3,arg4);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_ApproximateArcAngles) {
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  double arg8 ;
  double arg9 ;
  zval **args[9];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 9 || zend_get_parameters_array_ex(9, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[0]);
  arg1 = (double) Z_DVAL_PP(args[0]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[6]);
  arg7 = (double) Z_DVAL_PP(args[6]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[7]);
  arg8 = (double) Z_DVAL_PP(args[7]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[8]);
  arg9 = (double) Z_DVAL_PP(args[8]);
  /*@SWIG@*/;
  
  result = (OGRGeometryShadow *)ApproximateArcAngles(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_ForceToPolygon) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ForceToPolygon. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  result = (OGRGeometryShadow *)ForceToPolygon(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_ForceToMultiPolygon) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ForceToMultiPolygon. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  result = (OGRGeometryShadow *)ForceToMultiPolygon(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_ForceToMultiPoint) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ForceToMultiPoint. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  result = (OGRGeometryShadow *)ForceToMultiPoint(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_ForceToMultiLineString) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of ForceToMultiLineString. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  result = (OGRGeometryShadow *)ForceToMultiLineString(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_Geometry(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
  swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
  void *ptr=value->ptr ;
  int newobject=value->newobject ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (OGRGeometryShadow *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_OGRGeometryShadow TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "OGRGeometryShadow resource already free'd");
  delete_OGRGeometryShadow(arg1);
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_new_Geometry) {
  OGRwkbGeometryType arg1 = (OGRwkbGeometryType) wkbUnknown ;
  char *arg2 = (char *) 0 ;
  int arg3 = (int) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  zval **args[4];
  int arg_count;
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<0 || arg_count>4 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  if(arg_count > 0) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[0]);
    arg1 = (OGRwkbGeometryType) Z_LVAL_PP(args[0]);
    /*@SWIG@*/;
    
  }
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
    if ((*args[1])->type==IS_NULL) {
      arg2 = (char *) 0;
    } else {
      convert_to_string_ex(args[1]);
      arg2 = (char *) Z_STRVAL_PP(args[1]);
    }
    /*@SWIG@*/;
    
  }
  if(arg_count > 2) {
    {
      /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */
      convert_to_string_ex(args[2]);
      arg4 = Z_STRVAL_PP(args[2]);
      arg3 = Z_STRLEN_PP(args[2]);
    }
  }
  if(arg_count > 3) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
    if ((*args[3])->type==IS_NULL) {
      arg5 = (char *) 0;
    } else {
      convert_to_string_ex(args[3]);
      arg5 = (char *) Z_STRVAL_PP(args[3]);
    }
    /*@SWIG@*/;
    
  }
  result = (OGRGeometryShadow *)new_OGRGeometryShadow(arg1,arg2,arg3,arg4,arg5);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_ExportToWkt) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  char *argout2 = 0 ;
  zval **args[1];
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (char **argout2) */
    arg2 = &argout2;
  }
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_ExportToWkt. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRErr)OGRGeometryShadow_ExportToWkt(arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(argout) (char **argout) */
    zval *t;
    MAKE_STD_ZVAL(t);
    if ( arg2 ) {
      ZVAL_STRING(t,*arg2,strlen(*arg2));
    }
    else {
      ZVAL_NULL(t);
    }
    t_output_helper(&return_value, t);
  }
  {
    /* %typemap(freearg) (char **argout) */
    if ( *arg2 )
    CPLFree( *arg2 );
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  {
    /* %typemap(freearg) (char **argout) */
    if ( *arg2 )
    CPLFree( *arg2 );
  }
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_ExportToWkb) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int *arg2 = (int *) 0 ;
  char **arg3 = (char **) 0 ;
  OGRwkbByteOrder arg4 = (OGRwkbByteOrder) wkbXDR ;
  int nLen2 = 0 ;
  char *pBuf2 = 0 ;
  zval **args[2];
  int arg_count;
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (int *nLen2, char **pBuf2 ) */
    arg2 = &nLen2;
    arg3 = &pBuf2;
  }
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_ExportToWkb. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[1]);
    arg4 = (OGRwkbByteOrder) Z_LVAL_PP(args[1]);
    /*@SWIG@*/;
    
  }
  result = (OGRErr)OGRGeometryShadow_ExportToWkb(arg1,arg2,arg3,arg4);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(argout) (int *nLen, char **pBuf ) */
    ZVAL_STRINGL( return_value, *arg3, *arg2, 1 );
  }
  {
    /* %typemap(freearg) (int *nLen, char **pBuf ) */
    if( *arg2 ) {
      free( *arg3 );
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  {
    /* %typemap(freearg) (int *nLen, char **pBuf ) */
    if( *arg2 ) {
      free( *arg3 );
    }
  }
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_ExportToGML) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_ExportToGML. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (char *)OGRGeometryShadow_ExportToGML(arg1);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_ExportToKML) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char *arg2 = (char *) NULL ;
  zval **args[2];
  int arg_count;
  char *result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_ExportToKML. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
    if ((*args[1])->type==IS_NULL) {
      arg2 = (char *) 0;
    } else {
      convert_to_string_ex(args[1]);
      arg2 = (char *) Z_STRVAL_PP(args[1]);
    }
    /*@SWIG@*/;
    
  }
  result = (char *)OGRGeometryShadow_ExportToKML(arg1,(char const *)arg2);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_ExportToJson) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_ExportToJson. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (char *)OGRGeometryShadow_ExportToJson(arg1);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_AddPoint) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 = (double) 0 ;
  zval **args[4];
  int arg_count;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<3 || arg_count>4 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_AddPoint. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  if(arg_count > 3) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
    convert_to_double_ex(args[3]);
    arg4 = (double) Z_DVAL_PP(args[3]);
    /*@SWIG@*/;
    
  }
  OGRGeometryShadow_AddPoint(arg1,arg2,arg3,arg4);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_AddPoint_2D) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  zval **args[3];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 3 || zend_get_parameters_array_ex(3, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_AddPoint_2D. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  OGRGeometryShadow_AddPoint_2D(arg1,arg2,arg3);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_AddGeometryDirectly) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_AddGeometryDirectly. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_DISOWN ) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_AddGeometryDirectly. Expected SWIGTYPE_p_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRErr)OGRGeometryShadow_AddGeometryDirectly(arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_AddGeometry) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_AddGeometry. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_AddGeometry. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRErr)OGRGeometryShadow_AddGeometry(arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_c_Clone) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_c_Clone. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRGeometryShadow *)OGRGeometryShadow_Clone(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetGeometryType) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  OGRwkbGeometryType result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetGeometryType. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRwkbGeometryType)OGRGeometryShadow_GetGeometryType(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetGeometryName) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetGeometryName. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (char *)OGRGeometryShadow_GetGeometryName(arg1);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Length) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Length. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (double)OGRGeometryShadow_Length(arg1);
  {
    ZVAL_DOUBLE(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Area) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Area. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (double)OGRGeometryShadow_Area(arg1);
  {
    ZVAL_DOUBLE(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetArea) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  double result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetArea. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (double)OGRGeometryShadow_GetArea(arg1);
  {
    ZVAL_DOUBLE(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetPointCount) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetPointCount. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRGeometryShadow_GetPointCount(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetX) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  zval **args[2];
  int arg_count;
  double result;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetX. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[1]);
    arg2 = (int) Z_LVAL_PP(args[1]);
    /*@SWIG@*/;
    
  }
  result = (double)OGRGeometryShadow_GetX(arg1,arg2);
  {
    ZVAL_DOUBLE(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetY) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  zval **args[2];
  int arg_count;
  double result;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetY. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[1]);
    arg2 = (int) Z_LVAL_PP(args[1]);
    /*@SWIG@*/;
    
  }
  result = (double)OGRGeometryShadow_GetY(arg1,arg2);
  {
    ZVAL_DOUBLE(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetZ) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  zval **args[2];
  int arg_count;
  double result;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetZ. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[1]);
    arg2 = (int) Z_LVAL_PP(args[1]);
    /*@SWIG@*/;
    
  }
  result = (double)OGRGeometryShadow_GetZ(arg1,arg2);
  {
    ZVAL_DOUBLE(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetPoint) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  double *arg3 = (double *) (double *)NULL ;
  double argout3[3] ;
  zval **args[2];
  int arg_count;
  
  {
    /* %typemap(in,numinputs=0) (double argout3[ANY]) */
    arg3 = argout3;
  }
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetPoint. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[1]);
    arg2 = (int) Z_LVAL_PP(args[1]);
    /*@SWIG@*/;
    
  }
  OGRGeometryShadow_GetPoint(arg1,arg2,arg3);
  
  {
    /* %typemap(argout) (double argout[ANY]) */
    zval *t = CreateTupleFromDoubleArray( arg3, 3 );
    t_output_helper( &return_value, t );
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetPoint_2D) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  double *arg3 = (double *) (double *)NULL ;
  double argout3[2] ;
  zval **args[2];
  int arg_count;
  
  {
    /* %typemap(in,numinputs=0) (double argout3[ANY]) */
    arg3 = argout3;
  }
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetPoint_2D. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[1]);
    arg2 = (int) Z_LVAL_PP(args[1]);
    /*@SWIG@*/;
    
  }
  OGRGeometryShadow_GetPoint_2D(arg1,arg2,arg3);
  
  {
    /* %typemap(argout) (double argout[ANY]) */
    zval *t = CreateTupleFromDoubleArray( arg3, 2 );
    t_output_helper( &return_value, t );
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetGeometryCount) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetGeometryCount. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRGeometryShadow_GetGeometryCount(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_SetPoint) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 = (double) 0 ;
  zval **args[5];
  int arg_count;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<4 || arg_count>5 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_SetPoint. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  if(arg_count > 4) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
    convert_to_double_ex(args[4]);
    arg5 = (double) Z_DVAL_PP(args[4]);
    /*@SWIG@*/;
    
  }
  OGRGeometryShadow_SetPoint(arg1,arg2,arg3,arg4,arg5);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_SetPoint_2D) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  zval **args[4];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_SetPoint_2D. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  OGRGeometryShadow_SetPoint_2D(arg1,arg2,arg3,arg4);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetGeometryRef) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  zval **args[2];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetGeometryRef. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = (OGRGeometryShadow *)OGRGeometryShadow_GetGeometryRef(arg1,arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 0);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Simplify) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  zval **args[2];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Simplify. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  result = (OGRGeometryShadow *)OGRGeometryShadow_Simplify(arg1,arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Boundary) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Boundary. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRGeometryShadow *)OGRGeometryShadow_Boundary(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetBoundary) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetBoundary. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRGeometryShadow *)OGRGeometryShadow_GetBoundary(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_ConvexHull) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_ConvexHull. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRGeometryShadow *)OGRGeometryShadow_ConvexHull(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Buffer) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  int arg3 = (int) 30 ;
  zval **args[3];
  int arg_count;
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<2 || arg_count>3 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Buffer. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  if(arg_count > 2) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[2]);
    arg3 = (int) Z_LVAL_PP(args[2]);
    /*@SWIG@*/;
    
  }
  result = (OGRGeometryShadow *)OGRGeometryShadow_Buffer(arg1,arg2,arg3);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Intersection) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Intersection. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Intersection. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRGeometryShadow *)OGRGeometryShadow_Intersection(arg1,arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Union) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Union. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Union. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRGeometryShadow *)OGRGeometryShadow_Union(arg1,arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_UnionCascaded) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_UnionCascaded. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRGeometryShadow *)OGRGeometryShadow_UnionCascaded(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Difference) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Difference. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Difference. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRGeometryShadow *)OGRGeometryShadow_Difference(arg1,arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_SymDifference) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_SymDifference. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_SymDifference. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRGeometryShadow *)OGRGeometryShadow_SymDifference(arg1,arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_SymmetricDifference) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_SymmetricDifference. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_SymmetricDifference. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRGeometryShadow *)OGRGeometryShadow_SymmetricDifference(arg1,arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Distance) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  double result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Distance. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Distance. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (double)OGRGeometryShadow_Distance(arg1,arg2);
  {
    ZVAL_DOUBLE(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_c_Empty) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_c_Empty. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  OGRGeometryShadow_Empty(arg1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_IsEmpty) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_IsEmpty. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (bool)OGRGeometryShadow_IsEmpty(arg1);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_IsValid) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_IsValid. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (bool)OGRGeometryShadow_IsValid(arg1);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_IsSimple) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_IsSimple. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (bool)OGRGeometryShadow_IsSimple(arg1);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_IsRing) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_IsRing. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (bool)OGRGeometryShadow_IsRing(arg1);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Intersects) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Intersects. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Intersects. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (bool)OGRGeometryShadow_Intersects(arg1,arg2);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Intersect) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Intersect. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Intersect. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (bool)OGRGeometryShadow_Intersect(arg1,arg2);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Equals) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Equals. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Equals. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (bool)OGRGeometryShadow_Equals(arg1,arg2);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Equal) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Equal. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Equal. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (bool)OGRGeometryShadow_Equal(arg1,arg2);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Disjoint) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Disjoint. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Disjoint. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (bool)OGRGeometryShadow_Disjoint(arg1,arg2);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Touches) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Touches. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Touches. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (bool)OGRGeometryShadow_Touches(arg1,arg2);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Crosses) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Crosses. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Crosses. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (bool)OGRGeometryShadow_Crosses(arg1,arg2);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Within) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Within. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Within. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (bool)OGRGeometryShadow_Within(arg1,arg2);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Contains) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Contains. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Contains. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (bool)OGRGeometryShadow_Contains(arg1,arg2);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Overlaps) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  zval **args[2];
  bool result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Overlaps. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Overlaps. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (bool)OGRGeometryShadow_Overlaps(arg1,arg2);
  {
    ZVAL_BOOL(return_value,(result)?1:0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_TransformTo) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
  zval **args[2];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_TransformTo. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_TransformTo. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRErr)OGRGeometryShadow_TransformTo(arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Transform) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OSRCoordinateTransformationShadow *arg2 = (OSRCoordinateTransformationShadow *) 0 ;
  zval **args[2];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Transform. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Transform. Expected SWIGTYPE_p_OSRCoordinateTransformationShadow");
    }
  }
  {
    if (!arg2) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRErr)OGRGeometryShadow_Transform(arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetSpatialReference) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  OSRSpatialReferenceShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetSpatialReference. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OSRSpatialReferenceShadow *)OGRGeometryShadow_GetSpatialReference(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_AssignSpatialReference) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_AssignSpatialReference. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_AssignSpatialReference. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  OGRGeometryShadow_AssignSpatialReference(arg1,arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_CloseRings) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_CloseRings. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  OGRGeometryShadow_CloseRings(arg1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_FlattenTo2D) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_FlattenTo2D. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  OGRGeometryShadow_FlattenTo2D(arg1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Segmentize) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Segmentize. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  OGRGeometryShadow_Segmentize(arg1,arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetEnvelope) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double *arg2 ;
  double argout2[4] ;
  zval **args[1];
  
  {
    /* %typemap(in,numinputs=0) (double argout2[ANY]) */
    arg2 = argout2;
  }
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetEnvelope. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  OGRGeometryShadow_GetEnvelope(arg1,arg2);
  
  {
    /* %typemap(argout) (double argout[ANY]) */
    zval *t = CreateTupleFromDoubleArray( arg2, 4 );
    t_output_helper( &return_value, t );
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Centroid) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  OGRGeometryShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Centroid. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRGeometryShadow *)OGRGeometryShadow_Centroid(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_WkbSize) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_WkbSize. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRGeometryShadow_WkbSize(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetCoordinateDimension) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetCoordinateDimension. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRGeometryShadow_GetCoordinateDimension(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_SetCoordinateDimension) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_SetCoordinateDimension. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  OGRGeometryShadow_SetCoordinateDimension(arg1,arg2);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetDimension) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  zval **args[1];
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetDimension. Expected SWIGTYPE_p_OGRGeometryShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (int)OGRGeometryShadow_GetDimension(arg1);
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_OGRGetDriverCount) {
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (int)OGRGetDriverCount();
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_OGRGetOpenDSCount) {
  int result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (int)OGRGetOpenDSCount();
  {
    ZVAL_LONG(return_value,result);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_OGRSetGenerate_DB2_V72_BYTE_ORDER) {
  int arg1 ;
  zval **args[1];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (int) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  result = (OGRErr)OGRSetGenerate_DB2_V72_BYTE_ORDER(arg1);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_OGRRegisterAll) {
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  OGRRegisterAll();
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_GeometryTypeToName) {
  OGRwkbGeometryType arg1 ;
  zval **args[1];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (OGRwkbGeometryType) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  result = (char *)OGRGeometryTypeToName(arg1);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_GetFieldTypeName) {
  OGRFieldType arg1 ;
  zval **args[1];
  char *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (OGRFieldType) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  result = (char *)OGR_GetFieldTypeName(arg1);
  {
    if(!result) {
      ZVAL_NULL(return_value);
    } else {
      ZVAL_STRING(return_value, (char *)result, 1);
    }
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_GetOpenDS) {
  int arg1 ;
  zval **args[1];
  OGRDataSourceShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (int) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  result = (OGRDataSourceShadow *)GetOpenDS(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRDataSourceShadow, 0);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Open) {
  char *arg1 = (char *) 0 ;
  int arg2 = (int) 0 ;
  zval **args[2];
  int arg_count;
  OGRDataSourceShadow *result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[0])->type==IS_NULL) {
    arg1 = (char *) 0;
  } else {
    convert_to_string_ex(args[0]);
    arg1 = (char *) Z_STRVAL_PP(args[0]);
  }
  /*@SWIG@*/;
  
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[1]);
    arg2 = (int) Z_LVAL_PP(args[1]);
    /*@SWIG@*/;
    
  }
  result = (OGRDataSourceShadow *)Open((char const *)arg1,arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRDataSourceShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_OpenShared) {
  char *arg1 = (char *) 0 ;
  int arg2 = (int) 0 ;
  zval **args[2];
  int arg_count;
  OGRDataSourceShadow *result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[0])->type==IS_NULL) {
    arg1 = (char *) 0;
  } else {
    convert_to_string_ex(args[0]);
    arg1 = (char *) Z_STRVAL_PP(args[0]);
  }
  /*@SWIG@*/;
  
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[1]);
    arg2 = (int) Z_LVAL_PP(args[1]);
    /*@SWIG@*/;
    
  }
  result = (OGRDataSourceShadow *)OpenShared((char const *)arg1,arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRDataSourceShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_GetDriverByName) {
  char *arg1 = (char *) 0 ;
  zval **args[1];
  OGRDriverShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[0])->type==IS_NULL) {
    arg1 = (char *) 0;
  } else {
    convert_to_string_ex(args[0]);
    arg1 = (char *) Z_STRVAL_PP(args[0]);
  }
  /*@SWIG@*/;
  
  {
    if (!arg1) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRDriverShadow *)GetDriverByName((char const *)arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRDriverShadow, 0);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_GetDriver) {
  int arg1 ;
  zval **args[1];
  OGRDriverShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[0]);
  arg1 = (int) Z_LVAL_PP(args[0]);
  /*@SWIG@*/;
  
  result = (OGRDriverShadow *)GetDriver(arg1);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRDriverShadow, 0);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_GeneralCmdLineProcessor) {
  char **arg1 = (char **) 0 ;
  int arg2 = (int) 0 ;
  zval **args[2];
  int arg_count;
  char **result = 0 ;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    /* %typemap(in) char **options */
    zend_error(E_ERROR,"Typemap (in) char **options not properly defined");
    //  int size = PySequence_Size(args[0]);
    //  for (int i = 0; i < size; i++) {
    //    char *pszItem = NULL;
    //    if ( ! PyArg_Parse( PySequence_GetItem(args[0],i), "s", &pszItem ) ) {
    //      PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
    //      SWIG_fail;
    //    }
    //    arg1 = CSLAddString( arg1, pszItem );
    //  }
  }
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[1]);
    arg2 = (int) Z_LVAL_PP(args[1]);
    /*@SWIG@*/;
    
  }
  result = (char **)GeneralCmdLineProcessor(arg1,arg2);
  {
    /* %typemap(out) char ** -> ( string ) */
    char **stringarray = result;
    if ( stringarray == NULL ) {
      RETVAL_NULL();
    }
    else {
      int len = CSLCount( stringarray );
      array_init(return_value);
      for ( int i = 0; i < len; ++i, ++stringarray ) {
        add_next_index_string( return_value, *stringarray, 1 );
      }
    }
  }
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg1 );
  }
  return;
fail:
  {
    /* %typemap(freearg) char **options */
    CSLDestroy( arg1 );
  }
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_GIntBig) {
  /* No destructor for simple type _p_GIntBig */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_double) {
  /* No destructor for simple type _p_double */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_double) {
  /* No destructor for simple type _p_p_double */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_char) {
  /* No destructor for simple type _p_p_char */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_char) {
  /* No destructor for simple type _p_char */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_p_char) {
  /* No destructor for simple type _p_p_p_char */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OGRFeatureShadow) {
  __wrap_delete_Feature(rsrc, SWIGTYPE_p_OGRFeatureShadow->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OGRGeometryShadow) {
  __wrap_delete_Geometry(rsrc, SWIGTYPE_p_OGRGeometryShadow->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OSRSpatialReferenceShadow) {
  /* No destructor for class SpatialReference */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OGRDataSourceShadow) {
  __wrap_delete_DataSource(rsrc, SWIGTYPE_p_OGRDataSourceShadow->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_OGRGeometryShadow) {
  /* No destructor for simple type _p_p_OGRGeometryShadow */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_int) {
  /* No destructor for simple type _int */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_int) {
  /* No destructor for simple type _p_int */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OGRFieldDefnShadow) {
  __wrap_delete_FieldDefn(rsrc, SWIGTYPE_p_OGRFieldDefnShadow->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OGRFeatureDefnShadow) {
  __wrap_delete_FeatureDefn(rsrc, SWIGTYPE_p_OGRFeatureDefnShadow->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_OGRLayerShadow) {
  /* No destructor for simple type _p_p_OGRLayerShadow */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OGRLayerShadow) {
  /* No destructor for class Layer */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OGRDriverShadow) {
  /* No destructor for class Driver */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_int) {
  /* No destructor for simple type _p_p_int */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OSRCoordinateTransformationShadow) {
  /* No destructor for class CoordinateTransformation */
  efree(rsrc->ptr);
}
/* end wrapper section */
/* class entry subsection */


/* entry subsection */
/* Every non-class user visible function must have an entry here */
static zend_function_entry ogr_functions[] = {
 SWIG_ZEND_NAMED_FE(driver_name_get,_wrap_Driver_name_get,NULL)
 SWIG_ZEND_NAMED_FE(driver_createdatasource,_wrap_Driver_CreateDataSource,NULL)
 SWIG_ZEND_NAMED_FE(driver_copydatasource,_wrap_Driver_CopyDataSource,NULL)
 SWIG_ZEND_NAMED_FE(driver_open,_wrap_Driver_Open,NULL)
 SWIG_ZEND_NAMED_FE(driver_deletedatasource,_wrap_Driver_DeleteDataSource,NULL)
 SWIG_ZEND_NAMED_FE(driver_testcapability,_wrap_Driver_TestCapability,NULL)
 SWIG_ZEND_NAMED_FE(driver_getname,_wrap_Driver_GetName,NULL)
 SWIG_ZEND_NAMED_FE(driver_register,_wrap_Driver_Register,NULL)
 SWIG_ZEND_NAMED_FE(driver_deregister,_wrap_Driver_Deregister,NULL)
 SWIG_ZEND_NAMED_FE(datasource_name_get,_wrap_DataSource_name_get,NULL)
 SWIG_ZEND_NAMED_FE(datasource_getrefcount,_wrap_DataSource_GetRefCount,NULL)
 SWIG_ZEND_NAMED_FE(datasource_getsummaryrefcount,_wrap_DataSource_GetSummaryRefCount,NULL)
 SWIG_ZEND_NAMED_FE(datasource_getlayercount,_wrap_DataSource_GetLayerCount,NULL)
 SWIG_ZEND_NAMED_FE(datasource_getdriver,_wrap_DataSource_GetDriver,NULL)
 SWIG_ZEND_NAMED_FE(datasource_getname,_wrap_DataSource_GetName,NULL)
 SWIG_ZEND_NAMED_FE(datasource_deletelayer,_wrap_DataSource_DeleteLayer,NULL)
 SWIG_ZEND_NAMED_FE(datasource_createlayer,_wrap_DataSource_CreateLayer,NULL)
 SWIG_ZEND_NAMED_FE(datasource_copylayer,_wrap_DataSource_CopyLayer,NULL)
 SWIG_ZEND_NAMED_FE(datasource_getlayerbyindex,_wrap_DataSource_GetLayerByIndex,NULL)
 SWIG_ZEND_NAMED_FE(datasource_getlayerbyname,_wrap_DataSource_GetLayerByName,NULL)
 SWIG_ZEND_NAMED_FE(datasource_testcapability,_wrap_DataSource_TestCapability,NULL)
 SWIG_ZEND_NAMED_FE(datasource_executesql,_wrap_DataSource_ExecuteSQL,NULL)
 SWIG_ZEND_NAMED_FE(datasource_releaseresultset,_wrap_DataSource_ReleaseResultSet,NULL)
 SWIG_ZEND_NAMED_FE(layer_getrefcount,_wrap_Layer_GetRefCount,NULL)
 SWIG_ZEND_NAMED_FE(layer_setspatialfilter,_wrap_Layer_SetSpatialFilter,NULL)
 SWIG_ZEND_NAMED_FE(layer_setspatialfilterrect,_wrap_Layer_SetSpatialFilterRect,NULL)
 SWIG_ZEND_NAMED_FE(layer_getspatialfilter,_wrap_Layer_GetSpatialFilter,NULL)
 SWIG_ZEND_NAMED_FE(layer_setattributefilter,_wrap_Layer_SetAttributeFilter,NULL)
 SWIG_ZEND_NAMED_FE(layer_resetreading,_wrap_Layer_ResetReading,NULL)
 SWIG_ZEND_NAMED_FE(layer_getname,_wrap_Layer_GetName,NULL)
 SWIG_ZEND_NAMED_FE(layer_getgeomtype,_wrap_Layer_GetGeomType,NULL)
 SWIG_ZEND_NAMED_FE(layer_getgeometrycolumn,_wrap_Layer_GetGeometryColumn,NULL)
 SWIG_ZEND_NAMED_FE(layer_getfidcolumn,_wrap_Layer_GetFIDColumn,NULL)
 SWIG_ZEND_NAMED_FE(layer_getfeature,_wrap_Layer_GetFeature,NULL)
 SWIG_ZEND_NAMED_FE(layer_getnextfeature,_wrap_Layer_GetNextFeature,NULL)
 SWIG_ZEND_NAMED_FE(layer_setnextbyindex,_wrap_Layer_SetNextByIndex,NULL)
 SWIG_ZEND_NAMED_FE(layer_setfeature,_wrap_Layer_SetFeature,NULL)
 SWIG_ZEND_NAMED_FE(layer_createfeature,_wrap_Layer_CreateFeature,NULL)
 SWIG_ZEND_NAMED_FE(layer_deletefeature,_wrap_Layer_DeleteFeature,NULL)
 SWIG_ZEND_NAMED_FE(layer_synctodisk,_wrap_Layer_SyncToDisk,NULL)
 SWIG_ZEND_NAMED_FE(layer_getlayerdefn,_wrap_Layer_GetLayerDefn,NULL)
 SWIG_ZEND_NAMED_FE(layer_getfeaturecount,_wrap_Layer_GetFeatureCount,NULL)
 SWIG_ZEND_NAMED_FE(layer_getextent,_wrap_Layer_GetExtent,NULL)
 SWIG_ZEND_NAMED_FE(layer_testcapability,_wrap_Layer_TestCapability,NULL)
 SWIG_ZEND_NAMED_FE(layer_createfield,_wrap_Layer_CreateField,NULL)
 SWIG_ZEND_NAMED_FE(layer_starttransaction,_wrap_Layer_StartTransaction,NULL)
 SWIG_ZEND_NAMED_FE(layer_committransaction,_wrap_Layer_CommitTransaction,NULL)
 SWIG_ZEND_NAMED_FE(layer_rollbacktransaction,_wrap_Layer_RollbackTransaction,NULL)
 SWIG_ZEND_NAMED_FE(layer_getspatialref,_wrap_Layer_GetSpatialRef,NULL)
 SWIG_ZEND_NAMED_FE(layer_getfeaturesread,_wrap_Layer_GetFeaturesRead,NULL)
 SWIG_ZEND_NAMED_FE(layer_setignoredfields,_wrap_Layer_SetIgnoredFields,NULL)
 SWIG_ZEND_NAMED_FE(new_feature,_wrap_new_Feature,NULL)
 SWIG_ZEND_NAMED_FE(feature_getdefnref,_wrap_Feature_GetDefnRef,NULL)
 SWIG_ZEND_NAMED_FE(feature_setgeometry,_wrap_Feature_SetGeometry,NULL)
 SWIG_ZEND_NAMED_FE(feature_setgeometrydirectly,_wrap_Feature_SetGeometryDirectly,NULL)
 SWIG_ZEND_NAMED_FE(feature_getgeometryref,_wrap_Feature_GetGeometryRef,NULL)
 SWIG_ZEND_NAMED_FE(feature_c_clone,_wrap_Feature_c_Clone,NULL)
 SWIG_ZEND_NAMED_FE(feature_equal,_wrap_Feature_Equal,NULL)
 SWIG_ZEND_NAMED_FE(feature_getfieldcount,_wrap_Feature_GetFieldCount,NULL)
 SWIG_ZEND_NAMED_FE(feature_getfielddefnref,_wrap_Feature_GetFieldDefnRef,NULL)
 SWIG_ZEND_NAMED_FE(feature_getfieldasstring,_wrap_Feature_GetFieldAsString,NULL)
 SWIG_ZEND_NAMED_FE(feature_getfieldasinteger,_wrap_Feature_GetFieldAsInteger,NULL)
 SWIG_ZEND_NAMED_FE(feature_getfieldasdouble,_wrap_Feature_GetFieldAsDouble,NULL)
 SWIG_ZEND_NAMED_FE(feature_getfieldasdatetime,_wrap_Feature_GetFieldAsDateTime,NULL)
 SWIG_ZEND_NAMED_FE(feature_getfieldasintegerlist,_wrap_Feature_GetFieldAsIntegerList,NULL)
 SWIG_ZEND_NAMED_FE(feature_getfieldasdoublelist,_wrap_Feature_GetFieldAsDoubleList,NULL)
 SWIG_ZEND_NAMED_FE(feature_getfieldasstringlist,_wrap_Feature_GetFieldAsStringList,NULL)
 SWIG_ZEND_NAMED_FE(feature_isfieldset,_wrap_Feature_IsFieldSet,NULL)
 SWIG_ZEND_NAMED_FE(feature_getfieldindex,_wrap_Feature_GetFieldIndex,NULL)
 SWIG_ZEND_NAMED_FE(feature_getfid,_wrap_Feature_GetFID,NULL)
 SWIG_ZEND_NAMED_FE(feature_setfid,_wrap_Feature_SetFID,NULL)
 SWIG_ZEND_NAMED_FE(feature_dumpreadable,_wrap_Feature_DumpReadable,NULL)
 SWIG_ZEND_NAMED_FE(feature_unsetfield,_wrap_Feature_UnsetField,NULL)
 SWIG_ZEND_NAMED_FE(feature_setfield,_wrap_Feature_SetField,NULL)
 SWIG_ZEND_NAMED_FE(feature_setfieldintegerlist,_wrap_Feature_SetFieldIntegerList,NULL)
 SWIG_ZEND_NAMED_FE(feature_setfielddoublelist,_wrap_Feature_SetFieldDoubleList,NULL)
 SWIG_ZEND_NAMED_FE(feature_setfieldstringlist,_wrap_Feature_SetFieldStringList,NULL)
 SWIG_ZEND_NAMED_FE(feature_setfrom,_wrap_Feature_SetFrom,NULL)
 SWIG_ZEND_NAMED_FE(feature_getstylestring,_wrap_Feature_GetStyleString,NULL)
 SWIG_ZEND_NAMED_FE(feature_setstylestring,_wrap_Feature_SetStyleString,NULL)
 SWIG_ZEND_NAMED_FE(feature_getfieldtype,_wrap_Feature_GetFieldType,NULL)
 SWIG_ZEND_NAMED_FE(new_featuredefn,_wrap_new_FeatureDefn,NULL)
 SWIG_ZEND_NAMED_FE(featuredefn_getname,_wrap_FeatureDefn_GetName,NULL)
 SWIG_ZEND_NAMED_FE(featuredefn_getfieldcount,_wrap_FeatureDefn_GetFieldCount,NULL)
 SWIG_ZEND_NAMED_FE(featuredefn_getfielddefn,_wrap_FeatureDefn_GetFieldDefn,NULL)
 SWIG_ZEND_NAMED_FE(featuredefn_getfieldindex,_wrap_FeatureDefn_GetFieldIndex,NULL)
 SWIG_ZEND_NAMED_FE(featuredefn_addfielddefn,_wrap_FeatureDefn_AddFieldDefn,NULL)
 SWIG_ZEND_NAMED_FE(featuredefn_getgeomtype,_wrap_FeatureDefn_GetGeomType,NULL)
 SWIG_ZEND_NAMED_FE(featuredefn_setgeomtype,_wrap_FeatureDefn_SetGeomType,NULL)
 SWIG_ZEND_NAMED_FE(featuredefn_getreferencecount,_wrap_FeatureDefn_GetReferenceCount,NULL)
 SWIG_ZEND_NAMED_FE(featuredefn_isgeometryignored,_wrap_FeatureDefn_IsGeometryIgnored,NULL)
 SWIG_ZEND_NAMED_FE(featuredefn_setgeometryignored,_wrap_FeatureDefn_SetGeometryIgnored,NULL)
 SWIG_ZEND_NAMED_FE(featuredefn_isstyleignored,_wrap_FeatureDefn_IsStyleIgnored,NULL)
 SWIG_ZEND_NAMED_FE(featuredefn_setstyleignored,_wrap_FeatureDefn_SetStyleIgnored,NULL)
 SWIG_ZEND_NAMED_FE(new_fielddefn,_wrap_new_FieldDefn,NULL)
 SWIG_ZEND_NAMED_FE(fielddefn_getname,_wrap_FieldDefn_GetName,NULL)
 SWIG_ZEND_NAMED_FE(fielddefn_getnameref,_wrap_FieldDefn_GetNameRef,NULL)
 SWIG_ZEND_NAMED_FE(fielddefn_setname,_wrap_FieldDefn_SetName,NULL)
 SWIG_ZEND_NAMED_FE(fielddefn_gettype,_wrap_FieldDefn_GetType,NULL)
 SWIG_ZEND_NAMED_FE(fielddefn_settype,_wrap_FieldDefn_SetType,NULL)
 SWIG_ZEND_NAMED_FE(fielddefn_getjustify,_wrap_FieldDefn_GetJustify,NULL)
 SWIG_ZEND_NAMED_FE(fielddefn_setjustify,_wrap_FieldDefn_SetJustify,NULL)
 SWIG_ZEND_NAMED_FE(fielddefn_getwidth,_wrap_FieldDefn_GetWidth,NULL)
 SWIG_ZEND_NAMED_FE(fielddefn_setwidth,_wrap_FieldDefn_SetWidth,NULL)
 SWIG_ZEND_NAMED_FE(fielddefn_getprecision,_wrap_FieldDefn_GetPrecision,NULL)
 SWIG_ZEND_NAMED_FE(fielddefn_setprecision,_wrap_FieldDefn_SetPrecision,NULL)
 SWIG_ZEND_NAMED_FE(fielddefn_gettypename,_wrap_FieldDefn_GetTypeName,NULL)
 SWIG_ZEND_NAMED_FE(fielddefn_getfieldtypename,_wrap_FieldDefn_GetFieldTypeName,NULL)
 SWIG_ZEND_NAMED_FE(fielddefn_isignored,_wrap_FieldDefn_IsIgnored,NULL)
 SWIG_ZEND_NAMED_FE(fielddefn_setignored,_wrap_FieldDefn_SetIgnored,NULL)
 SWIG_ZEND_NAMED_FE(creategeometryfromwkb,_wrap_CreateGeometryFromWkb,NULL)
 SWIG_ZEND_NAMED_FE(creategeometryfromwkt,_wrap_CreateGeometryFromWkt,NULL)
 SWIG_ZEND_NAMED_FE(creategeometryfromgml,_wrap_CreateGeometryFromGML,NULL)
 SWIG_ZEND_NAMED_FE(creategeometryfromjson,_wrap_CreateGeometryFromJson,NULL)
 SWIG_ZEND_NAMED_FE(buildpolygonfromedges,_wrap_BuildPolygonFromEdges,NULL)
 SWIG_ZEND_NAMED_FE(approximatearcangles,_wrap_ApproximateArcAngles,NULL)
 SWIG_ZEND_NAMED_FE(forcetopolygon,_wrap_ForceToPolygon,NULL)
 SWIG_ZEND_NAMED_FE(forcetomultipolygon,_wrap_ForceToMultiPolygon,NULL)
 SWIG_ZEND_NAMED_FE(forcetomultipoint,_wrap_ForceToMultiPoint,NULL)
 SWIG_ZEND_NAMED_FE(forcetomultilinestring,_wrap_ForceToMultiLineString,NULL)
 SWIG_ZEND_NAMED_FE(new_geometry,_wrap_new_Geometry,NULL)
 SWIG_ZEND_NAMED_FE(geometry_exporttowkt,_wrap_Geometry_ExportToWkt,NULL)
 SWIG_ZEND_NAMED_FE(geometry_exporttowkb,_wrap_Geometry_ExportToWkb,NULL)
 SWIG_ZEND_NAMED_FE(geometry_exporttogml,_wrap_Geometry_ExportToGML,NULL)
 SWIG_ZEND_NAMED_FE(geometry_exporttokml,_wrap_Geometry_ExportToKML,NULL)
 SWIG_ZEND_NAMED_FE(geometry_exporttojson,_wrap_Geometry_ExportToJson,NULL)
 SWIG_ZEND_NAMED_FE(geometry_addpoint,_wrap_Geometry_AddPoint,NULL)
 SWIG_ZEND_NAMED_FE(geometry_addpoint_2d,_wrap_Geometry_AddPoint_2D,NULL)
 SWIG_ZEND_NAMED_FE(geometry_addgeometrydirectly,_wrap_Geometry_AddGeometryDirectly,NULL)
 SWIG_ZEND_NAMED_FE(geometry_addgeometry,_wrap_Geometry_AddGeometry,NULL)
 SWIG_ZEND_NAMED_FE(geometry_c_clone,_wrap_Geometry_c_Clone,NULL)
 SWIG_ZEND_NAMED_FE(geometry_getgeometrytype,_wrap_Geometry_GetGeometryType,NULL)
 SWIG_ZEND_NAMED_FE(geometry_getgeometryname,_wrap_Geometry_GetGeometryName,NULL)
 SWIG_ZEND_NAMED_FE(geometry_length,_wrap_Geometry_Length,NULL)
 SWIG_ZEND_NAMED_FE(geometry_area,_wrap_Geometry_Area,NULL)
 SWIG_ZEND_NAMED_FE(geometry_getarea,_wrap_Geometry_GetArea,NULL)
 SWIG_ZEND_NAMED_FE(geometry_getpointcount,_wrap_Geometry_GetPointCount,NULL)
 SWIG_ZEND_NAMED_FE(geometry_getx,_wrap_Geometry_GetX,NULL)
 SWIG_ZEND_NAMED_FE(geometry_gety,_wrap_Geometry_GetY,NULL)
 SWIG_ZEND_NAMED_FE(geometry_getz,_wrap_Geometry_GetZ,NULL)
 SWIG_ZEND_NAMED_FE(geometry_getpoint,_wrap_Geometry_GetPoint,NULL)
 SWIG_ZEND_NAMED_FE(geometry_getpoint_2d,_wrap_Geometry_GetPoint_2D,NULL)
 SWIG_ZEND_NAMED_FE(geometry_getgeometrycount,_wrap_Geometry_GetGeometryCount,NULL)
 SWIG_ZEND_NAMED_FE(geometry_setpoint,_wrap_Geometry_SetPoint,NULL)
 SWIG_ZEND_NAMED_FE(geometry_setpoint_2d,_wrap_Geometry_SetPoint_2D,NULL)
 SWIG_ZEND_NAMED_FE(geometry_getgeometryref,_wrap_Geometry_GetGeometryRef,NULL)
 SWIG_ZEND_NAMED_FE(geometry_simplify,_wrap_Geometry_Simplify,NULL)
 SWIG_ZEND_NAMED_FE(geometry_boundary,_wrap_Geometry_Boundary,NULL)
 SWIG_ZEND_NAMED_FE(geometry_getboundary,_wrap_Geometry_GetBoundary,NULL)
 SWIG_ZEND_NAMED_FE(geometry_convexhull,_wrap_Geometry_ConvexHull,NULL)
 SWIG_ZEND_NAMED_FE(geometry_buffer,_wrap_Geometry_Buffer,NULL)
 SWIG_ZEND_NAMED_FE(geometry_intersection,_wrap_Geometry_Intersection,NULL)
 SWIG_ZEND_NAMED_FE(geometry_union,_wrap_Geometry_Union,NULL)
 SWIG_ZEND_NAMED_FE(geometry_unioncascaded,_wrap_Geometry_UnionCascaded,NULL)
 SWIG_ZEND_NAMED_FE(geometry_difference,_wrap_Geometry_Difference,NULL)
 SWIG_ZEND_NAMED_FE(geometry_symdifference,_wrap_Geometry_SymDifference,NULL)
 SWIG_ZEND_NAMED_FE(geometry_symmetricdifference,_wrap_Geometry_SymmetricDifference,NULL)
 SWIG_ZEND_NAMED_FE(geometry_distance,_wrap_Geometry_Distance,NULL)
 SWIG_ZEND_NAMED_FE(geometry_c_empty,_wrap_Geometry_c_Empty,NULL)
 SWIG_ZEND_NAMED_FE(geometry_isempty,_wrap_Geometry_IsEmpty,NULL)
 SWIG_ZEND_NAMED_FE(geometry_isvalid,_wrap_Geometry_IsValid,NULL)
 SWIG_ZEND_NAMED_FE(geometry_issimple,_wrap_Geometry_IsSimple,NULL)
 SWIG_ZEND_NAMED_FE(geometry_isring,_wrap_Geometry_IsRing,NULL)
 SWIG_ZEND_NAMED_FE(geometry_intersects,_wrap_Geometry_Intersects,NULL)
 SWIG_ZEND_NAMED_FE(geometry_intersect,_wrap_Geometry_Intersect,NULL)
 SWIG_ZEND_NAMED_FE(geometry_equals,_wrap_Geometry_Equals,NULL)
 SWIG_ZEND_NAMED_FE(geometry_equal,_wrap_Geometry_Equal,NULL)
 SWIG_ZEND_NAMED_FE(geometry_disjoint,_wrap_Geometry_Disjoint,NULL)
 SWIG_ZEND_NAMED_FE(geometry_touches,_wrap_Geometry_Touches,NULL)
 SWIG_ZEND_NAMED_FE(geometry_crosses,_wrap_Geometry_Crosses,NULL)
 SWIG_ZEND_NAMED_FE(geometry_within,_wrap_Geometry_Within,NULL)
 SWIG_ZEND_NAMED_FE(geometry_contains,_wrap_Geometry_Contains,NULL)
 SWIG_ZEND_NAMED_FE(geometry_overlaps,_wrap_Geometry_Overlaps,NULL)
 SWIG_ZEND_NAMED_FE(geometry_transformto,_wrap_Geometry_TransformTo,NULL)
 SWIG_ZEND_NAMED_FE(geometry_transform,_wrap_Geometry_Transform,NULL)
 SWIG_ZEND_NAMED_FE(geometry_getspatialreference,_wrap_Geometry_GetSpatialReference,NULL)
 SWIG_ZEND_NAMED_FE(geometry_assignspatialreference,_wrap_Geometry_AssignSpatialReference,NULL)
 SWIG_ZEND_NAMED_FE(geometry_closerings,_wrap_Geometry_CloseRings,NULL)
 SWIG_ZEND_NAMED_FE(geometry_flattento2d,_wrap_Geometry_FlattenTo2D,NULL)
 SWIG_ZEND_NAMED_FE(geometry_segmentize,_wrap_Geometry_Segmentize,NULL)
 SWIG_ZEND_NAMED_FE(geometry_getenvelope,_wrap_Geometry_GetEnvelope,NULL)
 SWIG_ZEND_NAMED_FE(geometry_centroid,_wrap_Geometry_Centroid,NULL)
 SWIG_ZEND_NAMED_FE(geometry_wkbsize,_wrap_Geometry_WkbSize,NULL)
 SWIG_ZEND_NAMED_FE(geometry_getcoordinatedimension,_wrap_Geometry_GetCoordinateDimension,NULL)
 SWIG_ZEND_NAMED_FE(geometry_setcoordinatedimension,_wrap_Geometry_SetCoordinateDimension,NULL)
 SWIG_ZEND_NAMED_FE(geometry_getdimension,_wrap_Geometry_GetDimension,NULL)
 SWIG_ZEND_NAMED_FE(ogrgetdrivercount,_wrap_OGRGetDriverCount,NULL)
 SWIG_ZEND_NAMED_FE(ogrgetopendscount,_wrap_OGRGetOpenDSCount,NULL)
 SWIG_ZEND_NAMED_FE(ogrsetgenerate_db2_v72_byte_order,_wrap_OGRSetGenerate_DB2_V72_BYTE_ORDER,NULL)
 SWIG_ZEND_NAMED_FE(ogrregisterall,_wrap_OGRRegisterAll,NULL)
 SWIG_ZEND_NAMED_FE(geometrytypetoname,_wrap_GeometryTypeToName,NULL)
 SWIG_ZEND_NAMED_FE(getfieldtypename,_wrap_GetFieldTypeName,NULL)
 SWIG_ZEND_NAMED_FE(getopends,_wrap_GetOpenDS,NULL)
 SWIG_ZEND_NAMED_FE(open,_wrap_Open,NULL)
 SWIG_ZEND_NAMED_FE(openshared,_wrap_OpenShared,NULL)
 SWIG_ZEND_NAMED_FE(getdriverbyname,_wrap_GetDriverByName,NULL)
 SWIG_ZEND_NAMED_FE(getdriver,_wrap_GetDriver,NULL)
 SWIG_ZEND_NAMED_FE(generalcmdlineprocessor,_wrap_GeneralCmdLineProcessor,NULL)
 SWIG_ZEND_NAMED_FE(swig_ogr_alter_newobject,_wrap_swig_ogr_alter_newobject,NULL)
 SWIG_ZEND_NAMED_FE(swig_ogr_get_newobject,_wrap_swig_ogr_get_newobject,NULL)
{NULL, NULL, NULL}
};

/* init section */
#if ZEND_MODULE_API_NO <= 20090626
#undef ZEND_MODULE_BUILD_ID
#define ZEND_MODULE_BUILD_ID (char*)"API" ZEND_TOSTR(ZEND_MODULE_API_NO) ZEND_BUILD_TS ZEND_BUILD_DEBUG ZEND_BUILD_SYSTEM ZEND_BUILD_EXTRA
#endif
zend_module_entry ogr_module_entry = {
#if ZEND_MODULE_API_NO > 20010900
    STANDARD_MODULE_HEADER,
#endif
    (char*)"ogr",
    ogr_functions,
    PHP_MINIT(ogr),
    PHP_MSHUTDOWN(ogr),
    PHP_RINIT(ogr),
    PHP_RSHUTDOWN(ogr),
    PHP_MINFO(ogr),
#if ZEND_MODULE_API_NO > 20010900
    NO_VERSION_YET,
#endif
    STANDARD_MODULE_PROPERTIES
};
zend_module_entry* SWIG_module_entry = &ogr_module_entry;

#ifdef __cplusplus
extern "C" {
#endif
SWIGEXPORT zend_module_entry *get_module(void) { return &ogr_module_entry; }
#ifdef __cplusplus
}
#endif

#define SWIG_php_minit PHP_MINIT_FUNCTION(ogr)
/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is tough by the requirement that no dynamic 
 * memory is used. Also, since swig_type_info structures store pointers to 
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization. 
 * The idea is that swig generates all the structures that are needed. 
 * The runtime then collects these partially filled structures. 
 * The SWIG_InitializeModule function takes these initial arrays out of 
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.
 *
 * The generated swig_type_info structures are assigned staticly to an initial 
 * array. We just loop through that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast linked list. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns. So to actually build the cast linked list,
 * we find the array of casts associated with the type, and loop through it 
 * adding the casts to the list. The one last trick we need to do is making
 * sure the type pointer in the swig_cast_info struct is correct.
 *
 * First off, we lookup the cast->type name to see if it is already loaded. 
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the 
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the linked list (because the cast->type) pointer will
 *     be correct.
 * ----------------------------------------------------------------------------- */

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

#if 0
#define SWIGRUNTIME_DEBUG
#endif


SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int found, init;

  clientdata = clientdata;

  /* check to see if the circular list has been setup, if not, set it up */
  if (swig_module.next==0) {
    /* Initialize the swig_module */
    swig_module.type_initial = swig_type_initial;
    swig_module.cast_initial = swig_cast_initial;
    swig_module.next = &swig_module;
    init = 1;
  } else {
    init = 0;
  }

  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (!module_head) {
    /* This is the first module loaded for this interpreter */
    /* so set the swig module into the interpreter */
    SWIG_SetModule(clientdata, &swig_module);
    module_head = &swig_module;
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    found=0;
    iter=module_head;
    do {
      if (iter==&swig_module) {
        found=1;
        break;
      }
      iter=iter->next;
    } while (iter!= module_head);

    /* if the is found in the list, then all is done and we may leave */
    if (found) return;
    /* otherwise we must add out module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }

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


  SWIG_php_minit {
    SWIG_InitializeModule(0);

/* oinit subsection */
ZEND_INIT_MODULE_GLOBALS(ogr, ogr_init_globals, ogr_destroy_globals);

/* Register resource destructors for pointer types */
le_swig__p_GIntBig=zend_register_list_destructors_ex(_wrap_destroy_p_GIntBig,NULL,(char *)(SWIGTYPE_p_GIntBig->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_GIntBig,&le_swig__p_GIntBig);
le_swig__p_double=zend_register_list_destructors_ex(_wrap_destroy_p_double,NULL,(char *)(SWIGTYPE_p_double->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_double,&le_swig__p_double);
le_swig__p_p_double=zend_register_list_destructors_ex(_wrap_destroy_p_p_double,NULL,(char *)(SWIGTYPE_p_p_double->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_p_double,&le_swig__p_p_double);
le_swig__p_p_char=zend_register_list_destructors_ex(_wrap_destroy_p_p_char,NULL,(char *)(SWIGTYPE_p_p_char->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_p_char,&le_swig__p_p_char);
le_swig__p_char=zend_register_list_destructors_ex(_wrap_destroy_p_char,NULL,(char *)(SWIGTYPE_p_char->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_char,&le_swig__p_char);
le_swig__p_p_p_char=zend_register_list_destructors_ex(_wrap_destroy_p_p_p_char,NULL,(char *)(SWIGTYPE_p_p_p_char->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_p_p_char,&le_swig__p_p_p_char);
le_swig__p_OGRFeatureShadow=zend_register_list_destructors_ex(_wrap_destroy_p_OGRFeatureShadow,NULL,(char *)(SWIGTYPE_p_OGRFeatureShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_OGRFeatureShadow,&le_swig__p_OGRFeatureShadow);
le_swig__p_OGRGeometryShadow=zend_register_list_destructors_ex(_wrap_destroy_p_OGRGeometryShadow,NULL,(char *)(SWIGTYPE_p_OGRGeometryShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_OGRGeometryShadow,&le_swig__p_OGRGeometryShadow);
le_swig__p_OSRSpatialReferenceShadow=zend_register_list_destructors_ex(_wrap_destroy_p_OSRSpatialReferenceShadow,NULL,(char *)(SWIGTYPE_p_OSRSpatialReferenceShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_OSRSpatialReferenceShadow,&le_swig__p_OSRSpatialReferenceShadow);
le_swig__p_OGRDataSourceShadow=zend_register_list_destructors_ex(_wrap_destroy_p_OGRDataSourceShadow,NULL,(char *)(SWIGTYPE_p_OGRDataSourceShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_OGRDataSourceShadow,&le_swig__p_OGRDataSourceShadow);
le_swig__p_p_OGRGeometryShadow=zend_register_list_destructors_ex(_wrap_destroy_p_p_OGRGeometryShadow,NULL,(char *)(SWIGTYPE_p_p_OGRGeometryShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_p_OGRGeometryShadow,&le_swig__p_p_OGRGeometryShadow);
le_swig__int=zend_register_list_destructors_ex(_wrap_destroy_int,NULL,(char *)(SWIGTYPE_int->name),module_number);
SWIG_TypeClientData(SWIGTYPE_int,&le_swig__int);
le_swig__p_int=zend_register_list_destructors_ex(_wrap_destroy_p_int,NULL,(char *)(SWIGTYPE_p_int->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_int,&le_swig__p_int);
le_swig__p_OGRFieldDefnShadow=zend_register_list_destructors_ex(_wrap_destroy_p_OGRFieldDefnShadow,NULL,(char *)(SWIGTYPE_p_OGRFieldDefnShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_OGRFieldDefnShadow,&le_swig__p_OGRFieldDefnShadow);
le_swig__p_OGRFeatureDefnShadow=zend_register_list_destructors_ex(_wrap_destroy_p_OGRFeatureDefnShadow,NULL,(char *)(SWIGTYPE_p_OGRFeatureDefnShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_OGRFeatureDefnShadow,&le_swig__p_OGRFeatureDefnShadow);
le_swig__p_p_OGRLayerShadow=zend_register_list_destructors_ex(_wrap_destroy_p_p_OGRLayerShadow,NULL,(char *)(SWIGTYPE_p_p_OGRLayerShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_p_OGRLayerShadow,&le_swig__p_p_OGRLayerShadow);
le_swig__p_OGRLayerShadow=zend_register_list_destructors_ex(_wrap_destroy_p_OGRLayerShadow,NULL,(char *)(SWIGTYPE_p_OGRLayerShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_OGRLayerShadow,&le_swig__p_OGRLayerShadow);
le_swig__p_OGRDriverShadow=zend_register_list_destructors_ex(_wrap_destroy_p_OGRDriverShadow,NULL,(char *)(SWIGTYPE_p_OGRDriverShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_OGRDriverShadow,&le_swig__p_OGRDriverShadow);
le_swig__p_p_int=zend_register_list_destructors_ex(_wrap_destroy_p_p_int,NULL,(char *)(SWIGTYPE_p_p_int->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_p_int,&le_swig__p_p_int);
le_swig__p_OSRCoordinateTransformationShadow=zend_register_list_destructors_ex(_wrap_destroy_p_OSRCoordinateTransformationShadow,NULL,(char *)(SWIGTYPE_p_OSRCoordinateTransformationShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_OSRCoordinateTransformationShadow,&le_swig__p_OSRCoordinateTransformationShadow);
CG(active_class_entry) = NULL;
/* end oinit subsection */

/* cinit subsection */
SWIG_LONG_CONSTANT(wkb25DBit, 0x80000000);
SWIG_LONG_CONSTANT(wkb25Bit, 0x80000000);
SWIG_LONG_CONSTANT(wkbUnknown, 0);
SWIG_LONG_CONSTANT(wkbPoint, 1);
SWIG_LONG_CONSTANT(wkbLineString, 2);
SWIG_LONG_CONSTANT(wkbPolygon, 3);
SWIG_LONG_CONSTANT(wkbMultiPoint, 4);
SWIG_LONG_CONSTANT(wkbMultiLineString, 5);
SWIG_LONG_CONSTANT(wkbMultiPolygon, 6);
SWIG_LONG_CONSTANT(wkbGeometryCollection, 7);
SWIG_LONG_CONSTANT(wkbNone, 100);
SWIG_LONG_CONSTANT(wkbLinearRing, 101);
SWIG_LONG_CONSTANT(wkbPoint25D, wkbPoint+wkb25DBit);
SWIG_LONG_CONSTANT(wkbLineString25D, wkbLineString+wkb25DBit);
SWIG_LONG_CONSTANT(wkbPolygon25D, wkbPolygon+wkb25DBit);
SWIG_LONG_CONSTANT(wkbMultiPoint25D, wkbMultiPoint+wkb25DBit);
SWIG_LONG_CONSTANT(wkbMultiLineString25D, wkbMultiLineString+wkb25DBit);
SWIG_LONG_CONSTANT(wkbMultiPolygon25D, wkbMultiPolygon+wkb25DBit);
SWIG_LONG_CONSTANT(wkbGeometryCollection25D, wkbGeometryCollection+wkb25DBit);
SWIG_LONG_CONSTANT(OFTInteger, 0);
SWIG_LONG_CONSTANT(OFTIntegerList, 1);
SWIG_LONG_CONSTANT(OFTReal, 2);
SWIG_LONG_CONSTANT(OFTRealList, 3);
SWIG_LONG_CONSTANT(OFTString, 4);
SWIG_LONG_CONSTANT(OFTStringList, 5);
SWIG_LONG_CONSTANT(OFTWideString, 6);
SWIG_LONG_CONSTANT(OFTWideStringList, 7);
SWIG_LONG_CONSTANT(OFTBinary, 8);
SWIG_LONG_CONSTANT(OFTDate, 9);
SWIG_LONG_CONSTANT(OFTTime, 10);
SWIG_LONG_CONSTANT(OFTDateTime, 11);
SWIG_LONG_CONSTANT(OJUndefined, 0);
SWIG_LONG_CONSTANT(OJLeft, 1);
SWIG_LONG_CONSTANT(OJRight, 2);
SWIG_LONG_CONSTANT(wkbXDR, 0);
SWIG_LONG_CONSTANT(wkbNDR, 1);
SWIG_LONG_CONSTANT(NullFID, -1);
SWIG_STRING_CONSTANT(OLCRandomRead, "RandomRead");
SWIG_STRING_CONSTANT(OLCSequentialWrite, "SequentialWrite");
SWIG_STRING_CONSTANT(OLCRandomWrite, "RandomWrite");
SWIG_STRING_CONSTANT(OLCFastSpatialFilter, "FastSpatialFilter");
SWIG_STRING_CONSTANT(OLCFastFeatureCount, "FastFeatureCount");
SWIG_STRING_CONSTANT(OLCFastGetExtent, "FastGetExtent");
SWIG_STRING_CONSTANT(OLCCreateField, "CreateField");
SWIG_STRING_CONSTANT(OLCTransactions, "Transactions");
SWIG_STRING_CONSTANT(OLCDeleteFeature, "DeleteFeature");
SWIG_STRING_CONSTANT(OLCFastSetNextByIndex, "FastSetNextByIndex");
SWIG_STRING_CONSTANT(OLCStringsAsUTF8, "StringsAsUTF8");
SWIG_STRING_CONSTANT(OLCIgnoreFields, "IgnoreFields");
SWIG_STRING_CONSTANT(ODsCCreateLayer, "CreateLayer");
SWIG_STRING_CONSTANT(ODsCDeleteLayer, "DeleteLayer");
SWIG_STRING_CONSTANT(ODrCCreateDataSource, "CreateDataSource");
SWIG_STRING_CONSTANT(ODrCDeleteDataSource, "DeleteDataSource");
/* end cinit subsection */

    return SUCCESS;
}

PHP_RINIT_FUNCTION(ogr)
{
/* rinit section */

/* vinit subsection */
/* end vinit subsection */

    return SUCCESS;
}

PHP_MSHUTDOWN_FUNCTION(ogr)
{
/* shutdown section */
#ifdef ZTS
    ts_free_id(ogr_globals_id);
#endif
    return SUCCESS;
}

PHP_RSHUTDOWN_FUNCTION(ogr)
{
/* rshutdown section */

    return SUCCESS;
}

PHP_MINFO_FUNCTION(ogr)
{
}
/* end init section */
