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


#ifdef __cplusplus
template<class T> class SwigValueWrapper {
    T *tt;
public:
    SwigValueWrapper() : tt(0) { }
    SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
    SwigValueWrapper(const T& t) : tt(new T(t)) { }
    ~SwigValueWrapper() { delete tt; } 
    SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
    operator T&() const { return *tt; }
    T *operator&() { return tt; }
private:
    SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
};
#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
#  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__) || defined(__ICC)
#   define SWIGUNUSED __attribute__ ((unused)) 
# else
#   define 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 for Windows DLLs */
#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   define SWIGEXPORT
# endif
#endif

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


/***********************************************************************
 * swigrun.swg
 *
 *     This file contains generic CAPI 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 "2"

/* 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 is strictly necessary, ie, if you have problems
  with your compiler or so.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

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

/* Structure to store inforomation 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 */
} 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 (int)(*f1 - *f2);
  }
  return (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;
}


/* think of this as a c++ template<> or a scheme macro */
#define SWIG_TypeCheck_Template(comparison, ty)         \
  if (ty) {                                             \
    swig_cast_info *iter = ty->cast;                    \
    while (iter) {                                      \
      if (comparison) {                                 \
        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

/*
  Check the typename
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  SWIG_TypeCheck_Template(strcmp(iter->type->name, c) == 0, ty);
}

/* Same as previous function, except strcmp is replaced with a pointer comparison */
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
  SWIG_TypeCheck_Template(iter->type == from, into);
}

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

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

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

/*
 * php4.swg
 *
 * PHP4 runtime library
 *
 */

#ifdef __cplusplus
extern "C" {
#endif
#include "zend.h"
#include "zend_API.h"
#include "php.h"

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

/* Flags for SWIG_ConvertPtr */
#define SWIG_POINTER_DISOWN  0x1

#define SWIG_fail goto fail

static 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) ErrorCode() = code; ErrorMsg() = msg; SWIG_fail;

#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_Php4_GetModule()
#define SWIG_SetModule(clientdata, pointer) SWIG_Php4_SetModule(pointer)

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

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

#define SWIG_SetPointerZval(a,b,c,d) SWIG_ZTS_SetPointerZval(a,b,c,d, SWIG_module_entry TSRMLS_CC)

static void
SWIG_ZTS_SetPointerZval(zval *z, void *ptr, swig_type_info *type, int newobject, zend_module_entry* module_entry 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;
    ZEND_REGISTER_RESOURCE(z, value, *(int *)(type->clientdata));
    return;
  } else { /* have to deal with old fashioned string pointer?
              but this should not get this far */
    zend_error(E_ERROR, "Type: %s not registered with zend",type->name);
  }
}

/* This is a new pointer conversion routine
   Taking the native pointer p (which would have been converted from the old
   string pointer) and it's php type id, and it's type name (which also would
   have come from the old string pointer) it converts it to ptr calling 
   appropriate casting functions according to ty
   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 int
SWIG_ZTS_ConvertResourceData(void * p, int type, const char *type_name, void **ptr, swig_type_info *ty TSRMLS_DC) {
  swig_cast_info *tc;

  if (ty) {
    if (! type_name) {  
      /* can't convert p to ptr type ty if we don't know what type p is */
      return -1;
    } else {
      /* convert and cast p from type_name to ptr as ty
         Need to sort out const-ness, can SWIG_TypeCast really not take a const? */
      tc = SWIG_TypeCheck((char *)type_name,ty);
      if (!tc) return -1;
      *ptr = SWIG_TypeCast(tc, (void*)p);
    }
  } else {
    /* They don't care about the target type, so just pass on the pointer! */
    *ptr = (void *) p;
  }
  return 0;
}

/* This function fills ptr with a pointer of type ty by extracting the pointer
   and type info from the resource in z.  z must be a resource
   It uses SWIG_ZTS_ConvertResourceData to do the real work. */
static int
SWIG_ZTS_ConvertResourcePtr(zval *z, void **ptr, 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 -1;

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

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

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

   if (z->type==IS_OBJECT) {
     zval ** _cPtr;
     if (zend_hash_find(HASH_OF(z),"_cPtr",sizeof("_cPtr"),(void**)&_cPtr)==SUCCESS) {
       /* Don't co-erce to string if it isn't */
       if ((*_cPtr)->type==IS_STRING) c = Z_STRVAL_PP(_cPtr);
       else if ((*_cPtr)->type==IS_RESOURCE) {
         return SWIG_ZTS_ConvertResourcePtr(*_cPtr,ptr,ty, flags TSRMLS_CC);
       } else goto type_error; /* _cPtr was not string or resource property */
     } else goto type_error; /* can't find property _cPtr */
   } else if (z->type==IS_RESOURCE) {
     return SWIG_ZTS_ConvertResourcePtr(z,ptr,ty, flags TSRMLS_CC);
   } else goto type_error;

type_error:

    return -1;
}

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

  MAKE_STD_ZVAL(pointer);

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

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


/* -------- 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_OGRDataSourceShadow swig_types[14]
#define SWIGTYPE_p_p_OGRDriverShadow swig_types[15]
#define SWIGTYPE_p_p_OGRFeatureDefnShadow swig_types[16]
#define SWIGTYPE_p_p_OGRFeatureShadow swig_types[17]
#define SWIGTYPE_p_p_OGRFieldDefnShadow swig_types[18]
#define SWIGTYPE_p_p_OGRGeometryShadow swig_types[19]
#define SWIGTYPE_p_p_OGRLayerShadow swig_types[20]
#define SWIGTYPE_p_p_OSRCoordinateTransformationShadow swig_types[21]
#define SWIGTYPE_p_p_OSRSpatialReferenceShadow swig_types[22]
#define SWIGTYPE_p_p_char swig_types[23]
static swig_type_info *swig_types[25];
static swig_module_info swig_module = {swig_types, 24, 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 */
/*
  +----------------------------------------------------------------------+
  | PHP version 4.0                                                      |
  +----------------------------------------------------------------------+
  | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group             |
  +----------------------------------------------------------------------+
  | This source file is subject to version 2.02 of the PHP license,      |
  | that is bundled with this package in the file LICENSE, and is        |
  | available at through the world-wide-web at                           |
  | http://www.php.net/license/2_02.txt.                                 |
  | If you did not receive a copy of the PHP license and are unable to   |
  | obtain it through the world-wide-web, please send a note to          |
  | license@php.net so we can mail you a copy immediately.               |
  +----------------------------------------------------------------------+
  | Authors:                                                             |
  |                                                                      |
  +----------------------------------------------------------------------+
 */
ZEND_BEGIN_MODULE_GLOBALS(ogr)
char *error_msg;
int error_code;
ZEND_END_MODULE_GLOBALS(ogr)
ZEND_DECLARE_MODULE_GLOBALS(ogr)
#ifdef ZTS
#define ErrorMsg() TSRMG(ogr_globals_id, zend_ogr_globals *, error_msg );
#define ErrorCode() TSRMG(ogr_globals_id, zend_ogr_globals *, error_code );
#else
#define ErrorMsg() (ogr_globals.error_msg)
#define ErrorCode() (ogr_globals.error_code)
#endif

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

void SWIG_ResetError() {
  ErrorMsg() = default_error_msg;
  ErrorCode() = default_error_code;
}
#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


#define  SWIG_MemoryError    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_UnknownError  99


/* We should make use of "code" if we can */
#define SWIG_exception(code, msg) { zend_error(E_ERROR, msg); }


#include <stdexcept>


#include <iostream>
using namespace std;

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

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;

static OGRDataSourceShadow *OGRDriverShadow_CreateDataSource(OGRDriverShadow *self,char const *name,char **options=0){
    OGRDataSourceShadow *ds = (OGRDataSourceShadow*) OGR_Dr_CreateDataSource( self, name, options);
    return ds;
  }
static OGRDataSourceShadow *OGRDriverShadow_CopyDataSource(OGRDriverShadow *self,OGRDataSourceShadow *copy_ds,char const *name,char **options=0){
    OGRDataSourceShadow *ds = (OGRDataSourceShadow*) OGR_Dr_CopyDataSource(self, copy_ds, name, options);
    return ds;
  }
static OGRDataSourceShadow *OGRDriverShadow_Open(OGRDriverShadow *self,char const *name,int update=0){
    OGRDataSourceShadow* ds = (OGRDataSourceShadow*) OGR_Dr_Open(self, name, update);
    return ds;
  }
static int OGRDriverShadow_DeleteDataSource(OGRDriverShadow *self,char const *name){
    return OGR_Dr_DeleteDataSource( self, name );
  }
static int OGRDriverShadow_TestCapability(OGRDriverShadow *self,char const *cap){
    return OGR_Dr_TestCapability(self, cap);
  }
static char const *OGRDriverShadow_GetName(OGRDriverShadow *self){
    return OGR_Dr_GetName( self );
  }
static int _wrap_propset_Driver(zend_property_reference *property_reference, pval *value);
static int _propset_Driver(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_Driver(zend_property_reference *property_reference);
static int _propget_Driver(zend_property_reference *property_reference, pval *value);
static void delete_OGRDataSourceShadow(OGRDataSourceShadow *self){
    OGRReleaseDataSource(self);
  }
static int OGRDataSourceShadow_GetRefCount(OGRDataSourceShadow *self){
    return OGR_DS_GetRefCount(self);
  }
static int OGRDataSourceShadow_GetSummaryRefCount(OGRDataSourceShadow *self){
    return OGR_DS_GetSummaryRefCount(self);
  }
static int OGRDataSourceShadow_GetLayerCount(OGRDataSourceShadow *self){
    return OGR_DS_GetLayerCount(self);
  }
static char const *OGRDataSourceShadow_GetName(OGRDataSourceShadow *self){
    return OGR_DS_GetName(self);
  }
static 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";
  }
}

static OGRLayerShadow *OGRDataSourceShadow_CreateLayer(OGRDataSourceShadow *self,char const *name,OSRSpatialReferenceShadow *reference=NULL,OGRwkbGeometryType geom_type=wkbUnknown,char **options=0){
    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_CreateLayer( self,
                                                        name,
                                                        reference,
                                                        geom_type,
                                                        options);
    return layer;
  }
static 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;
  }
static OGRLayerShadow *OGRDataSourceShadow_GetLayerByIndex(OGRDataSourceShadow *self,int index=0){
    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_GetLayer(self, index);
    return layer;
  }
static OGRLayerShadow *OGRDataSourceShadow_GetLayerByName(OGRDataSourceShadow *self,char const *layer_name){
    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_GetLayerByName(self, layer_name);
    return layer;
  }
static int OGRDataSourceShadow_TestCapability(OGRDataSourceShadow *self,char const *cap){
    return OGR_DS_TestCapability(self, cap);
  }
static OGRLayerShadow *OGRDataSourceShadow_ExecuteSQL(OGRDataSourceShadow *self,char const *statement,OGRGeometryShadow *geom=NULL,char const *dialect=""){
    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_ExecuteSQL((OGRDataSourceShadow*)self,
                                                      statement,
                                                      geom,
                                                      dialect);
    return layer;
  }
static void OGRDataSourceShadow_ReleaseResultSet(OGRDataSourceShadow *self,OGRLayerShadow *layer){
    OGR_DS_ReleaseResultSet(self, layer);
  }
static int _wrap_propset_DataSource(zend_property_reference *property_reference, pval *value);
static int _propset_DataSource(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_DataSource(zend_property_reference *property_reference);
static int _propget_DataSource(zend_property_reference *property_reference, pval *value);
static int OGRLayerShadow_GetRefCount(OGRLayerShadow *self){
    return OGR_L_GetRefCount(self);
  }
static void OGRLayerShadow_SetSpatialFilter(OGRLayerShadow *self,OGRGeometryShadow *filter){
    OGR_L_SetSpatialFilter (self, filter);
  }
static void OGRLayerShadow_SetSpatialFilterRect(OGRLayerShadow *self,double minx,double miny,double maxx,double maxy){
    OGR_L_SetSpatialFilterRect(self, minx, miny, maxx, maxy);                          
  }
static OGRGeometryShadow *OGRLayerShadow_GetSpatialFilter(OGRLayerShadow *self){
    return (OGRGeometryShadow *) OGR_L_GetSpatialFilter(self);
  }
static OGRErr OGRLayerShadow_SetAttributeFilter(OGRLayerShadow *self,char *filter_string){
    OGRErr err = OGR_L_SetAttributeFilter((OGRLayerShadow*)self, filter_string);
    if (err != 0) {
      throw err;
    } 
    return 0;
  }
static void OGRLayerShadow_ResetReading(OGRLayerShadow *self){
    OGR_L_ResetReading(self);
  }
static char const *OGRLayerShadow_GetName(OGRLayerShadow *self){
    return OGR_FD_GetName(OGR_L_GetLayerDefn(self));
  }
static OGRFeatureShadow *OGRLayerShadow_GetFeature(OGRLayerShadow *self,long fid){
    return (OGRFeatureShadow*) OGR_L_GetFeature(self, fid);
  }
static OGRFeatureShadow *OGRLayerShadow_GetNextFeature(OGRLayerShadow *self){
    return (OGRFeatureShadow*) OGR_L_GetNextFeature(self);
  }
static OGRErr OGRLayerShadow_SetNextByIndex(OGRLayerShadow *self,long new_index){
    OGRErr err = OGR_L_SetNextByIndex(self, new_index);
    if (err != 0) {
      throw err;
    }
    return 0;
  }
static OGRErr OGRLayerShadow_SetFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
    OGRErr err = OGR_L_SetFeature(self, feature);
    if (err != 0) {
      throw err;
    }
    return 0;
  }
static OGRErr OGRLayerShadow_CreateFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
    OGRErr err = OGR_L_CreateFeature(self, feature);
    if (err != 0) {
      throw err;
    }
    return 0;
  }
static OGRErr OGRLayerShadow_DeleteFeature(OGRLayerShadow *self,long fid){
    OGRErr err = OGR_L_DeleteFeature(self, fid);
    if (err != 0) {
      throw err;
    }
    return 0;
  }
static OGRErr OGRLayerShadow_SyncToDisk(OGRLayerShadow *self){
    OGRErr err = OGR_L_SyncToDisk(self);
    if (err != 0) {
      throw err;
    }
    return 0;
  }
static OGRFeatureDefnShadow *OGRLayerShadow_GetLayerDefn(OGRLayerShadow *self){
    return (OGRFeatureDefnShadow*) OGR_L_GetLayerDefn(self);
  }
static 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;
 }


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);
    return;
  }
  zval *tmp;
  tmp = *target;
  zval_copy_ctor(tmp);
  array_init(*target);
  add_next_index_zval( *target, tmp);
  add_next_index_zval( *target, o);

}

static void OGRLayerShadow_GetExtent(OGRLayerShadow *self,double argout[4],int force=1){
    OGRErr err = OGR_L_GetExtent(self, (OGREnvelope*)argout, force);
    if (err != 0)
      throw err;
  }
static int OGRLayerShadow_TestCapability(OGRLayerShadow *self,char const *cap){
    return OGR_L_TestCapability(self, cap);
  }
static OGRErr OGRLayerShadow_CreateField(OGRLayerShadow *self,OGRFieldDefnShadow *field_def,int approx_ok=1){
    OGRErr err = OGR_L_CreateField(self, field_def, approx_ok);
    if (err != 0)
      throw err;
    return 0;
  }
static OGRErr OGRLayerShadow_StartTransaction(OGRLayerShadow *self){
    OGRErr err = OGR_L_StartTransaction(self);
    if (err != 0)
      throw err;
    return 0;
  }
static OGRErr OGRLayerShadow_CommitTransaction(OGRLayerShadow *self){
    OGRErr err = OGR_L_CommitTransaction(self);
    if (err != 0)
      throw err;
    return 0;
  }
static OGRErr OGRLayerShadow_RollbackTransaction(OGRLayerShadow *self){
    OGRErr err = OGR_L_RollbackTransaction(self);
    if (err != 0)
      throw err;
    return 0;
  }
static OSRSpatialReferenceShadow *OGRLayerShadow_GetSpatialRef(OGRLayerShadow *self){
    return (OSRSpatialReferenceShadow*) OGR_L_GetSpatialRef(self);
  }
static GIntBig OGRLayerShadow_GetFeatureRead(OGRLayerShadow *self){
    return OGR_L_GetFeaturesRead(self);
  }
static int _wrap_propset_Layer(zend_property_reference *property_reference, pval *value);
static int _propset_Layer(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_Layer(zend_property_reference *property_reference);
static int _propget_Layer(zend_property_reference *property_reference, pval *value);
static void delete_OGRFeatureShadow(OGRFeatureShadow *self){
    OGR_F_Destroy(self);
  }
static OGRFeatureShadow *new_OGRFeatureShadow(OGRFeatureDefnShadow *feature_def=0){
    return (OGRFeatureShadow*) OGR_F_Create( feature_def );
  }
static OGRFeatureDefnShadow *OGRFeatureShadow_GetDefnRef(OGRFeatureShadow *self){
    return (OGRFeatureDefnShadow*) OGR_F_GetDefnRef(self);
  }
static OGRErr OGRFeatureShadow_SetGeometry(OGRFeatureShadow *self,OGRGeometryShadow *geom){
    OGRErr err = OGR_F_SetGeometry(self, geom);
    if (err != 0)
      throw err;
    return 0;
  }
static OGRErr OGRFeatureShadow_SetGeometryDirectly(OGRFeatureShadow *self,OGRGeometryShadow *geom){
    OGRErr err = OGR_F_SetGeometryDirectly(self, geom);
    if (err != 0)
      throw err;
    return 0;
  }
static OGRGeometryShadow *OGRFeatureShadow_GetGeometryRef(OGRFeatureShadow *self){
    return (OGRGeometryShadow*) OGR_F_GetGeometryRef(self);
  }
static OGRFeatureShadow *OGRFeatureShadow_Clone(OGRFeatureShadow *self){
    return (OGRFeatureShadow*) OGR_F_Clone(self);
  }
static int OGRFeatureShadow_Equal(OGRFeatureShadow *self,OGRFeatureShadow *feature){
    return OGR_F_Equal(self, feature);
  }
static int OGRFeatureShadow_GetFieldCount(OGRFeatureShadow *self){
    return OGR_F_GetFieldCount(self);
  }
static OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_0(OGRFeatureShadow *self,int id){
    return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, id);
  }
static OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_1(OGRFeatureShadow *self,char const *name){
    return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, OGR_F_GetFieldIndex(self, name));
  }
static char const *OGRFeatureShadow_GetFieldAsString__SWIG_0(OGRFeatureShadow *self,int id){
    return (const char *) OGR_F_GetFieldAsString(self, id);
  }
static char const *OGRFeatureShadow_GetFieldAsString__SWIG_1(OGRFeatureShadow *self,char const *name){
    return (const char *) OGR_F_GetFieldAsString(self, OGR_F_GetFieldIndex(self, name));
  }
static int OGRFeatureShadow_GetFieldAsInteger__SWIG_0(OGRFeatureShadow *self,int id){
    return OGR_F_GetFieldAsInteger(self, id);
  }
static int OGRFeatureShadow_GetFieldAsInteger__SWIG_1(OGRFeatureShadow *self,char const *name){
    return OGR_F_GetFieldAsInteger(self, OGR_F_GetFieldIndex(self, name));
  }
static double OGRFeatureShadow_GetFieldAsDouble__SWIG_0(OGRFeatureShadow *self,int id){
    return OGR_F_GetFieldAsDouble(self, id);
  }
static double OGRFeatureShadow_GetFieldAsDouble__SWIG_1(OGRFeatureShadow *self,char const *name){
    return OGR_F_GetFieldAsDouble(self, OGR_F_GetFieldIndex(self, name));
  }
static int OGRFeatureShadow_IsFieldSet__SWIG_0(OGRFeatureShadow *self,int id){
    return OGR_F_IsFieldSet(self, id);
  }
static int OGRFeatureShadow_IsFieldSet__SWIG_1(OGRFeatureShadow *self,char const *name){
    return OGR_F_IsFieldSet(self, OGR_F_GetFieldIndex(self, name));
  }
static int OGRFeatureShadow_GetFieldIndex(OGRFeatureShadow *self,char const *name){
    return OGR_F_GetFieldIndex(self, name);
  }
static int OGRFeatureShadow_GetFID(OGRFeatureShadow *self){
    return OGR_F_GetFID(self);
  }
static OGRErr OGRFeatureShadow_SetFID(OGRFeatureShadow *self,int fid){
    OGRErr err = OGR_F_SetFID(self, fid);
    if (err != 0)
      throw err;
    return 0;
  }
static void OGRFeatureShadow_DumpReadable(OGRFeatureShadow *self){
    OGR_F_DumpReadable(self, NULL);
  }
static void OGRFeatureShadow_UnsetField__SWIG_0(OGRFeatureShadow *self,int id){
    OGR_F_UnsetField(self, id);
  }
static void OGRFeatureShadow_UnsetField__SWIG_1(OGRFeatureShadow *self,char const *name){
    OGR_F_UnsetField(self, OGR_F_GetFieldIndex(self, name));
  }
static void OGRFeatureShadow_SetField__SWIG_0(OGRFeatureShadow *self,int id,char const *value){
    OGR_F_SetFieldString(self, id, value);
  }
static void OGRFeatureShadow_SetField__SWIG_1(OGRFeatureShadow *self,char const *name,char const *value){
    OGR_F_SetFieldString(self, OGR_F_GetFieldIndex(self, name), value);
  }
static OGRErr OGRFeatureShadow_SetFrom(OGRFeatureShadow *self,OGRFeatureShadow *other,int forgiving=1){
    OGRErr err = OGR_F_SetFrom(self, other, forgiving);
    if (err != 0)
      throw err;
    return 0;
  }
static char const *OGRFeatureShadow_GetStyleString(OGRFeatureShadow *self){
    return (const char*) OGR_F_GetStyleString(self);
  }
static void OGRFeatureShadow_SetStyleString(OGRFeatureShadow *self,char const *the_string){
    OGR_F_SetStyleString(self, the_string);
  }
static OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_0(OGRFeatureShadow *self,int id){
    return (OGRFieldType) OGR_Fld_GetType( OGR_F_GetFieldDefnRef( self, id));
  }
static OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_1(OGRFeatureShadow *self,char const *name,char const *value){
    return (OGRFieldType) OGR_Fld_GetType( 
                            OGR_F_GetFieldDefnRef( self,  
                                                   OGR_F_GetFieldIndex(self, 
                                                                       name)
                                                  )
                                          );
    
  }
static int _wrap_propset_Feature(zend_property_reference *property_reference, pval *value);
static int _propset_Feature(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_Feature(zend_property_reference *property_reference);
static int _propget_Feature(zend_property_reference *property_reference, pval *value);
static void delete_OGRFeatureDefnShadow(OGRFeatureDefnShadow *self){
    OGR_FD_Destroy(self);
  }
static OGRFeatureDefnShadow *new_OGRFeatureDefnShadow(char const *name=NULL){
    return (OGRFeatureDefnShadow* )OGR_FD_Create(name);
  }
static char const *OGRFeatureDefnShadow_GetName(OGRFeatureDefnShadow *self){
    return OGR_FD_GetName(self);
  }
static int OGRFeatureDefnShadow_GetFieldCount(OGRFeatureDefnShadow *self){
    return OGR_FD_GetFieldCount(self);
  }
static OGRFieldDefnShadow *OGRFeatureDefnShadow_GetFieldDefn(OGRFeatureDefnShadow *self,int i){
    return (OGRFieldDefnShadow*) OGR_FD_GetFieldDefn(self, i);
  }
static int OGRFeatureDefnShadow_GetFieldIndex(OGRFeatureDefnShadow *self,char const *name){
    return OGR_FD_GetFieldIndex(self, name);
  }
static void OGRFeatureDefnShadow_AddFieldDefn(OGRFeatureDefnShadow *self,OGRFieldDefnShadow *defn){
    OGR_FD_AddFieldDefn(self, defn);
  }
static OGRwkbGeometryType OGRFeatureDefnShadow_GetGeomType(OGRFeatureDefnShadow *self){
    return (OGRwkbGeometryType) OGR_FD_GetGeomType(self);
  }
static void OGRFeatureDefnShadow_SetGeomType(OGRFeatureDefnShadow *self,OGRwkbGeometryType geom_type){
    OGR_FD_SetGeomType(self, geom_type);
  }
static int OGRFeatureDefnShadow_GetReferenceCount(OGRFeatureDefnShadow *self){
    return OGR_FD_GetReferenceCount(self);
  }
static int _wrap_propset_FeatureDefn(zend_property_reference *property_reference, pval *value);
static int _propset_FeatureDefn(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_FeatureDefn(zend_property_reference *property_reference);
static int _propget_FeatureDefn(zend_property_reference *property_reference, pval *value);
static void delete_OGRFieldDefnShadow(OGRFieldDefnShadow *self){
    OGR_Fld_Destroy(self);
  }
static OGRFieldDefnShadow *new_OGRFieldDefnShadow(char const *name="unnamed",OGRFieldType field_type=OFTString){
    return (OGRFieldDefnShadow*) OGR_Fld_Create(name, field_type);
  }
static char const *OGRFieldDefnShadow_GetName(OGRFieldDefnShadow *self){
    return (const char *) OGR_Fld_GetNameRef(self);
  }
static char const *OGRFieldDefnShadow_GetNameRef(OGRFieldDefnShadow *self){
    return (const char *) OGR_Fld_GetNameRef(self);
  }
static void OGRFieldDefnShadow_SetName(OGRFieldDefnShadow *self,char const *name){
    OGR_Fld_SetName(self, name);
  }
static OGRFieldType OGRFieldDefnShadow_GetType(OGRFieldDefnShadow *self){
    return OGR_Fld_GetType(self);
  }
static void OGRFieldDefnShadow_SetType(OGRFieldDefnShadow *self,OGRFieldType type){
    OGR_Fld_SetType(self, type);
  }
static OGRJustification OGRFieldDefnShadow_GetJustify(OGRFieldDefnShadow *self){
    return OGR_Fld_GetJustify(self);
  }
static void OGRFieldDefnShadow_SetJustify(OGRFieldDefnShadow *self,OGRJustification justify){
    OGR_Fld_SetJustify(self, justify);
  }
static int OGRFieldDefnShadow_GetWidth(OGRFieldDefnShadow *self){
    return OGR_Fld_GetWidth(self);
  }
static void OGRFieldDefnShadow_SetWidth(OGRFieldDefnShadow *self,int width){
    OGR_Fld_SetWidth(self, width);
  }
static int OGRFieldDefnShadow_GetPrecision(OGRFieldDefnShadow *self){
    return OGR_Fld_GetPrecision(self);
  }
static void OGRFieldDefnShadow_SetPrecision(OGRFieldDefnShadow *self,int precision){
    OGR_Fld_SetPrecision(self, precision);
  }
static char const *OGRFieldDefnShadow_GetFieldTypeName(OGRFieldDefnShadow *self,OGRFieldType type){
    return OGR_GetFieldTypeName(type);
  }
static int _wrap_propset_FieldDefn(zend_property_reference *property_reference, pval *value);
static int _propset_FieldDefn(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_FieldDefn(zend_property_reference *property_reference);
static int _propget_FieldDefn(zend_property_reference *property_reference, pval *value);

  OGRGeometryShadow* CreateGeometryFromWkb( int len, char *bin_string, 
                                            OSRSpatialReferenceShadow *reference=NULL ) {
    void *geom;
    OGRErr err = OGR_G_CreateFromWkb( (unsigned char *) bin_string,
                                      reference,
                                      &geom,
                                      len );
    if (err != 0 )
       throw err;
    return (OGRGeometryShadow*) geom;
  }
 


  OGRGeometryShadow* CreateGeometryFromWkt( char **val, 
                                      OSRSpatialReferenceShadow *reference=NULL ) {
    void *geom;
    OGRErr err = OGR_G_CreateFromWkt(val,
                                      reference,
                                      &geom);
    if (err != 0 )
       throw err;
    return (OGRGeometryShadow*) geom;
  }
 


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

static void delete_OGRGeometryShadow(OGRGeometryShadow *self){
    OGR_G_DestroyGeometry( self );
  }
static 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 return 0;
  }
static char const *OGRGeometryShadow_ExportToWkt(OGRGeometryShadow *self){
    char * output;
    OGRErr err = OGR_G_ExportToWkt(self, &output);
    if (err != 0) 
      throw err;
    return output;
  }
static 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 );
  }
static char const *OGRGeometryShadow_ExportToGML(OGRGeometryShadow *self){
    return (const char *) OGR_G_ExportToGML(self);
  }
static void OGRGeometryShadow_AddPoint(OGRGeometryShadow *self,double x,double y,double z=0){
    OGR_G_AddPoint( self, x, y, z );
  }
static OGRErr OGRGeometryShadow_AddGeometryDirectly(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_AddGeometryDirectly( self, other );
  }
static OGRErr OGRGeometryShadow_AddGeometry(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_AddGeometry( self, other );
  }
static OGRGeometryShadow *OGRGeometryShadow_Clone(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Clone(self);
  }
static OGRwkbGeometryType OGRGeometryShadow_GetGeometryType(OGRGeometryShadow *self){
    return (OGRwkbGeometryType) OGR_G_GetGeometryType(self);
  }
static char const *OGRGeometryShadow_GetGeometryName(OGRGeometryShadow *self){
    return (const char *) OGR_G_GetGeometryName(self);
  }
static double OGRGeometryShadow_GetArea(OGRGeometryShadow *self){
    return OGR_G_GetArea(self);
  }
static int OGRGeometryShadow_GetPointCount(OGRGeometryShadow *self){
    return OGR_G_GetPointCount(self);
  }
static double OGRGeometryShadow_GetX(OGRGeometryShadow *self,int point=0){
    return OGR_G_GetX(self, point);
  }
static double OGRGeometryShadow_GetY(OGRGeometryShadow *self,int point=0){
    return OGR_G_GetY(self, point);
  }
static double OGRGeometryShadow_GetZ(OGRGeometryShadow *self,int point=0){
    return OGR_G_GetZ(self, point);
  }
static int OGRGeometryShadow_GetGeometryCount(OGRGeometryShadow *self){
    return OGR_G_GetGeometryCount(self);
  }
static void OGRGeometryShadow_SetPoint(OGRGeometryShadow *self,int point,double x,double y,double z=0){
    OGR_G_SetPoint(self, point, x, y, z);
  }
static OGRGeometryShadow *OGRGeometryShadow_GetGeometryRef(OGRGeometryShadow *self,int geom){
    return (OGRGeometryShadow*) OGR_G_GetGeometryRef(self, geom);
  }
static OGRGeometryShadow *OGRGeometryShadow_GetBoundary(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_GetBoundary(self);
  }
static OGRGeometryShadow *OGRGeometryShadow_ConvexHull(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_ConvexHull(self);
  }
static OGRGeometryShadow *OGRGeometryShadow_Buffer(OGRGeometryShadow *self,double distance,int quadsecs=30){
    return (OGRGeometryShadow*) OGR_G_Buffer( self, distance, quadsecs );
  }
static OGRGeometryShadow *OGRGeometryShadow_Intersection(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_Intersection( self, other );
  }
static OGRGeometryShadow *OGRGeometryShadow_Union(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_Union( self, other );
  }
static OGRGeometryShadow *OGRGeometryShadow_Difference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_Difference( self, other );
  }
static OGRGeometryShadow *OGRGeometryShadow_SymmetricDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_SymmetricDifference( self, other );
  }
static double OGRGeometryShadow_Distance(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_Distance(self, other);
  }
static void OGRGeometryShadow_Empty(OGRGeometryShadow *self){
    OGR_G_Empty(self);
  }
static int OGRGeometryShadow_Intersect(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_Intersect(self, other);
  }
static int OGRGeometryShadow_Equal(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_Equal(self, other);
  }
static int OGRGeometryShadow_Disjoint(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_Disjoint(self, other);
  }
static int OGRGeometryShadow_Touches(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_Touches(self, other);
  }
static int OGRGeometryShadow_Crosses(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_Crosses(self, other);
  }
static int OGRGeometryShadow_Within(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_Within(self, other);
  }
static int OGRGeometryShadow_Contains(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_Contains(self, other);
  }
static int OGRGeometryShadow_Overlaps(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_Overlaps(self, other);
  }
static OGRErr OGRGeometryShadow_TransformTo(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
    return OGR_G_TransformTo(self, reference);
  }
static OGRErr OGRGeometryShadow_Transform(OGRGeometryShadow *self,OSRCoordinateTransformationShadow *trans){
    return OGR_G_Transform(self, trans);
  }
static OSRSpatialReferenceShadow *OGRGeometryShadow_GetSpatialReference(OGRGeometryShadow *self){
    return (OSRSpatialReferenceShadow*)OGR_G_GetSpatialReference(self);
  }
static void OGRGeometryShadow_AssignSpatialReference(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
    OGR_G_AssignSpatialReference(self, reference);
  }
static void OGRGeometryShadow_CloseRings(OGRGeometryShadow *self){
    OGR_G_CloseRings(self);
  }
static void OGRGeometryShadow_FlattenTo2D(OGRGeometryShadow *self){
    OGR_G_FlattenTo2D(self);
  }
static void OGRGeometryShadow_GetEnvelope(OGRGeometryShadow *self,double argout[4]){
    OGR_G_GetEnvelope(self, (OGREnvelope*)argout);
  }
static OGRGeometryShadow *OGRGeometryShadow_Centroid(OGRGeometryShadow *self){
    OGRGeometryShadow *pt = new_OGRGeometryShadow( wkbPoint );
    OGRErr rcode = OGR_G_Centroid( self, pt );
    return pt;
  }
static int OGRGeometryShadow_WkbSize(OGRGeometryShadow *self){
    return OGR_G_WkbSize(self);
  }
static int OGRGeometryShadow_GetCoordinateDimension(OGRGeometryShadow *self){
    return OGR_G_GetCoordinateDimension(self);
  }
static int OGRGeometryShadow_GetDimension(OGRGeometryShadow *self){
    return OGR_G_GetDimension(self);
  }
static int _wrap_propset_Geometry(zend_property_reference *property_reference, pval *value);
static int _propset_Geometry(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_Geometry(zend_property_reference *property_reference);
static int _propget_Geometry(zend_property_reference *property_reference, pval *value);

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 ) {
    OGRDataSourceShadow* ds = (OGRDataSourceShadow*)OGROpen(filename,update,NULL);
    return ds;
  }


  OGRDataSourceShadow* OpenShared( const char *filename, int update =0 ) {
    OGRDataSourceShadow* ds = (OGRDataSourceShadow*)OGROpenShared(filename,update,NULL);
    return ds;
  }


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

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

/* class entry subsection */
/* Function entries for Driver */
static zend_function_entry Driver_functions[] = {
 ZEND_NAMED_FE(driver_createdatasource,_wrap_Driver_CreateDataSource, NULL)
 ZEND_NAMED_FE(createdatasource,_wrap_Driver_CreateDataSource, NULL)
 ZEND_NAMED_FE(driver_copydatasource,_wrap_Driver_CopyDataSource, NULL)
 ZEND_NAMED_FE(copydatasource,_wrap_Driver_CopyDataSource, NULL)
 ZEND_NAMED_FE(driver_open,_wrap_Driver_Open, NULL)
 ZEND_NAMED_FE(open,_wrap_Driver_Open, NULL)
 ZEND_NAMED_FE(driver_deletedatasource,_wrap_Driver_DeleteDataSource, NULL)
 ZEND_NAMED_FE(deletedatasource,_wrap_Driver_DeleteDataSource, NULL)
 ZEND_NAMED_FE(driver_testcapability,_wrap_Driver_TestCapability, NULL)
 ZEND_NAMED_FE(testcapability,_wrap_Driver_TestCapability, NULL)
 ZEND_NAMED_FE(driver_getname,_wrap_Driver_GetName, NULL)
 ZEND_NAMED_FE(getname,_wrap_Driver_GetName, NULL)
   { NULL, NULL, NULL}
};
/* Function entries for DataSource */
static zend_function_entry DataSource_functions[] = {
 ZEND_NAMED_FE(datasource_getrefcount,_wrap_DataSource_GetRefCount, NULL)
 ZEND_NAMED_FE(getrefcount,_wrap_DataSource_GetRefCount, NULL)
 ZEND_NAMED_FE(datasource_getsummaryrefcount,_wrap_DataSource_GetSummaryRefCount, NULL)
 ZEND_NAMED_FE(getsummaryrefcount,_wrap_DataSource_GetSummaryRefCount, NULL)
 ZEND_NAMED_FE(datasource_getlayercount,_wrap_DataSource_GetLayerCount, NULL)
 ZEND_NAMED_FE(getlayercount,_wrap_DataSource_GetLayerCount, NULL)
 ZEND_NAMED_FE(datasource_getname,_wrap_DataSource_GetName, NULL)
 ZEND_NAMED_FE(getname,_wrap_DataSource_GetName, NULL)
 ZEND_NAMED_FE(datasource_deletelayer,_wrap_DataSource_DeleteLayer, NULL)
 ZEND_NAMED_FE(deletelayer,_wrap_DataSource_DeleteLayer, NULL)
 ZEND_NAMED_FE(datasource_createlayer,_wrap_DataSource_CreateLayer, NULL)
 ZEND_NAMED_FE(createlayer,_wrap_DataSource_CreateLayer, NULL)
 ZEND_NAMED_FE(datasource_copylayer,_wrap_DataSource_CopyLayer, NULL)
 ZEND_NAMED_FE(copylayer,_wrap_DataSource_CopyLayer, NULL)
 ZEND_NAMED_FE(datasource_getlayerbyindex,_wrap_DataSource_GetLayerByIndex, NULL)
 ZEND_NAMED_FE(getlayerbyindex,_wrap_DataSource_GetLayerByIndex, NULL)
 ZEND_NAMED_FE(datasource_getlayerbyname,_wrap_DataSource_GetLayerByName, NULL)
 ZEND_NAMED_FE(getlayerbyname,_wrap_DataSource_GetLayerByName, NULL)
 ZEND_NAMED_FE(datasource_testcapability,_wrap_DataSource_TestCapability, NULL)
 ZEND_NAMED_FE(testcapability,_wrap_DataSource_TestCapability, NULL)
 ZEND_NAMED_FE(datasource_executesql,_wrap_DataSource_ExecuteSQL, NULL)
 ZEND_NAMED_FE(executesql,_wrap_DataSource_ExecuteSQL, NULL)
 ZEND_NAMED_FE(datasource_releaseresultset,_wrap_DataSource_ReleaseResultSet, NULL)
 ZEND_NAMED_FE(releaseresultset,_wrap_DataSource_ReleaseResultSet, NULL)
   { NULL, NULL, NULL}
};
/* Function entries for Layer */
static zend_function_entry Layer_functions[] = {
 ZEND_NAMED_FE(layer_getrefcount,_wrap_Layer_GetRefCount, NULL)
 ZEND_NAMED_FE(getrefcount,_wrap_Layer_GetRefCount, NULL)
 ZEND_NAMED_FE(layer_setspatialfilter,_wrap_Layer_SetSpatialFilter, NULL)
 ZEND_NAMED_FE(setspatialfilter,_wrap_Layer_SetSpatialFilter, NULL)
 ZEND_NAMED_FE(layer_setspatialfilterrect,_wrap_Layer_SetSpatialFilterRect, NULL)
 ZEND_NAMED_FE(setspatialfilterrect,_wrap_Layer_SetSpatialFilterRect, NULL)
 ZEND_NAMED_FE(layer_getspatialfilter,_wrap_Layer_GetSpatialFilter, NULL)
 ZEND_NAMED_FE(getspatialfilter,_wrap_Layer_GetSpatialFilter, NULL)
 ZEND_NAMED_FE(layer_setattributefilter,_wrap_Layer_SetAttributeFilter, NULL)
 ZEND_NAMED_FE(setattributefilter,_wrap_Layer_SetAttributeFilter, NULL)
 ZEND_NAMED_FE(layer_resetreading,_wrap_Layer_ResetReading, NULL)
 ZEND_NAMED_FE(resetreading,_wrap_Layer_ResetReading, NULL)
 ZEND_NAMED_FE(layer_getname,_wrap_Layer_GetName, NULL)
 ZEND_NAMED_FE(getname,_wrap_Layer_GetName, NULL)
 ZEND_NAMED_FE(layer_getfeature,_wrap_Layer_GetFeature, NULL)
 ZEND_NAMED_FE(getfeature,_wrap_Layer_GetFeature, NULL)
 ZEND_NAMED_FE(layer_getnextfeature,_wrap_Layer_GetNextFeature, NULL)
 ZEND_NAMED_FE(getnextfeature,_wrap_Layer_GetNextFeature, NULL)
 ZEND_NAMED_FE(layer_setnextbyindex,_wrap_Layer_SetNextByIndex, NULL)
 ZEND_NAMED_FE(setnextbyindex,_wrap_Layer_SetNextByIndex, NULL)
 ZEND_NAMED_FE(layer_setfeature,_wrap_Layer_SetFeature, NULL)
 ZEND_NAMED_FE(setfeature,_wrap_Layer_SetFeature, NULL)
 ZEND_NAMED_FE(layer_createfeature,_wrap_Layer_CreateFeature, NULL)
 ZEND_NAMED_FE(createfeature,_wrap_Layer_CreateFeature, NULL)
 ZEND_NAMED_FE(layer_deletefeature,_wrap_Layer_DeleteFeature, NULL)
 ZEND_NAMED_FE(deletefeature,_wrap_Layer_DeleteFeature, NULL)
 ZEND_NAMED_FE(layer_synctodisk,_wrap_Layer_SyncToDisk, NULL)
 ZEND_NAMED_FE(synctodisk,_wrap_Layer_SyncToDisk, NULL)
 ZEND_NAMED_FE(layer_getlayerdefn,_wrap_Layer_GetLayerDefn, NULL)
 ZEND_NAMED_FE(getlayerdefn,_wrap_Layer_GetLayerDefn, NULL)
 ZEND_NAMED_FE(layer_getfeaturecount,_wrap_Layer_GetFeatureCount, NULL)
 ZEND_NAMED_FE(getfeaturecount,_wrap_Layer_GetFeatureCount, NULL)
 ZEND_NAMED_FE(layer_getextent,_wrap_Layer_GetExtent, NULL)
 ZEND_NAMED_FE(getextent,_wrap_Layer_GetExtent, NULL)
 ZEND_NAMED_FE(layer_testcapability,_wrap_Layer_TestCapability, NULL)
 ZEND_NAMED_FE(testcapability,_wrap_Layer_TestCapability, NULL)
 ZEND_NAMED_FE(layer_createfield,_wrap_Layer_CreateField, NULL)
 ZEND_NAMED_FE(createfield,_wrap_Layer_CreateField, NULL)
 ZEND_NAMED_FE(layer_starttransaction,_wrap_Layer_StartTransaction, NULL)
 ZEND_NAMED_FE(starttransaction,_wrap_Layer_StartTransaction, NULL)
 ZEND_NAMED_FE(layer_committransaction,_wrap_Layer_CommitTransaction, NULL)
 ZEND_NAMED_FE(committransaction,_wrap_Layer_CommitTransaction, NULL)
 ZEND_NAMED_FE(layer_rollbacktransaction,_wrap_Layer_RollbackTransaction, NULL)
 ZEND_NAMED_FE(rollbacktransaction,_wrap_Layer_RollbackTransaction, NULL)
 ZEND_NAMED_FE(layer_getspatialref,_wrap_Layer_GetSpatialRef, NULL)
 ZEND_NAMED_FE(getspatialref,_wrap_Layer_GetSpatialRef, NULL)
 ZEND_NAMED_FE(layer_getfeatureread,_wrap_Layer_GetFeatureRead, NULL)
 ZEND_NAMED_FE(getfeatureread,_wrap_Layer_GetFeatureRead, NULL)
   { NULL, NULL, NULL}
};
/* Function entries for Feature */
static zend_function_entry Feature_functions[] = {
 ZEND_NAMED_FE(new_feature,_wrap_new_Feature, NULL)
 ZEND_NAMED_FE(feature,_wrap_new_Feature, NULL)
 ZEND_NAMED_FE(feature_getdefnref,_wrap_Feature_GetDefnRef, NULL)
 ZEND_NAMED_FE(getdefnref,_wrap_Feature_GetDefnRef, NULL)
 ZEND_NAMED_FE(feature_setgeometry,_wrap_Feature_SetGeometry, NULL)
 ZEND_NAMED_FE(setgeometry,_wrap_Feature_SetGeometry, NULL)
 ZEND_NAMED_FE(feature_setgeometrydirectly,_wrap_Feature_SetGeometryDirectly, NULL)
 ZEND_NAMED_FE(setgeometrydirectly,_wrap_Feature_SetGeometryDirectly, NULL)
 ZEND_NAMED_FE(feature_getgeometryref,_wrap_Feature_GetGeometryRef, NULL)
 ZEND_NAMED_FE(getgeometryref,_wrap_Feature_GetGeometryRef, NULL)
 ZEND_NAMED_FE(feature_clone,_wrap_Feature_Clone, NULL)
 ZEND_NAMED_FE(clone,_wrap_Feature_Clone, NULL)
 ZEND_NAMED_FE(feature_equal,_wrap_Feature_Equal, NULL)
 ZEND_NAMED_FE(equal,_wrap_Feature_Equal, NULL)
 ZEND_NAMED_FE(feature_getfieldcount,_wrap_Feature_GetFieldCount, NULL)
 ZEND_NAMED_FE(getfieldcount,_wrap_Feature_GetFieldCount, NULL)
 ZEND_NAMED_FE(getfielddefnref,_wrap_Feature_GetFieldDefnRef, NULL)
 ZEND_NAMED_FE(feature_getfielddefnref,_wrap_Feature_GetFieldDefnRef, NULL)
 ZEND_NAMED_FE(getfielddefnref,_wrap_Feature_GetFieldDefnRef, NULL)
 ZEND_NAMED_FE(getfieldasstring,_wrap_Feature_GetFieldAsString, NULL)
 ZEND_NAMED_FE(feature_getfieldasstring,_wrap_Feature_GetFieldAsString, NULL)
 ZEND_NAMED_FE(getfieldasstring,_wrap_Feature_GetFieldAsString, NULL)
 ZEND_NAMED_FE(getfieldasinteger,_wrap_Feature_GetFieldAsInteger, NULL)
 ZEND_NAMED_FE(feature_getfieldasinteger,_wrap_Feature_GetFieldAsInteger, NULL)
 ZEND_NAMED_FE(getfieldasinteger,_wrap_Feature_GetFieldAsInteger, NULL)
 ZEND_NAMED_FE(getfieldasdouble,_wrap_Feature_GetFieldAsDouble, NULL)
 ZEND_NAMED_FE(feature_getfieldasdouble,_wrap_Feature_GetFieldAsDouble, NULL)
 ZEND_NAMED_FE(getfieldasdouble,_wrap_Feature_GetFieldAsDouble, NULL)
 ZEND_NAMED_FE(isfieldset,_wrap_Feature_IsFieldSet, NULL)
 ZEND_NAMED_FE(feature_isfieldset,_wrap_Feature_IsFieldSet, NULL)
 ZEND_NAMED_FE(isfieldset,_wrap_Feature_IsFieldSet, NULL)
 ZEND_NAMED_FE(feature_getfieldindex,_wrap_Feature_GetFieldIndex, NULL)
 ZEND_NAMED_FE(getfieldindex,_wrap_Feature_GetFieldIndex, NULL)
 ZEND_NAMED_FE(feature_getfid,_wrap_Feature_GetFID, NULL)
 ZEND_NAMED_FE(getfid,_wrap_Feature_GetFID, NULL)
 ZEND_NAMED_FE(feature_setfid,_wrap_Feature_SetFID, NULL)
 ZEND_NAMED_FE(setfid,_wrap_Feature_SetFID, NULL)
 ZEND_NAMED_FE(feature_dumpreadable,_wrap_Feature_DumpReadable, NULL)
 ZEND_NAMED_FE(dumpreadable,_wrap_Feature_DumpReadable, NULL)
 ZEND_NAMED_FE(unsetfield,_wrap_Feature_UnsetField, NULL)
 ZEND_NAMED_FE(feature_unsetfield,_wrap_Feature_UnsetField, NULL)
 ZEND_NAMED_FE(unsetfield,_wrap_Feature_UnsetField, NULL)
 ZEND_NAMED_FE(setfield,_wrap_Feature_SetField, NULL)
 ZEND_NAMED_FE(feature_setfield,_wrap_Feature_SetField, NULL)
 ZEND_NAMED_FE(setfield,_wrap_Feature_SetField, NULL)
 ZEND_NAMED_FE(feature_setfrom,_wrap_Feature_SetFrom, NULL)
 ZEND_NAMED_FE(setfrom,_wrap_Feature_SetFrom, NULL)
 ZEND_NAMED_FE(feature_getstylestring,_wrap_Feature_GetStyleString, NULL)
 ZEND_NAMED_FE(getstylestring,_wrap_Feature_GetStyleString, NULL)
 ZEND_NAMED_FE(feature_setstylestring,_wrap_Feature_SetStyleString, NULL)
 ZEND_NAMED_FE(setstylestring,_wrap_Feature_SetStyleString, NULL)
 ZEND_NAMED_FE(getfieldtype,_wrap_Feature_GetFieldType, NULL)
 ZEND_NAMED_FE(feature_getfieldtype,_wrap_Feature_GetFieldType, NULL)
 ZEND_NAMED_FE(getfieldtype,_wrap_Feature_GetFieldType, NULL)
   { NULL, NULL, NULL}
};
/* Function entries for FeatureDefn */
static zend_function_entry FeatureDefn_functions[] = {
 ZEND_NAMED_FE(new_featuredefn,_wrap_new_FeatureDefn, NULL)
 ZEND_NAMED_FE(featuredefn,_wrap_new_FeatureDefn, NULL)
 ZEND_NAMED_FE(featuredefn_getname,_wrap_FeatureDefn_GetName, NULL)
 ZEND_NAMED_FE(getname,_wrap_FeatureDefn_GetName, NULL)
 ZEND_NAMED_FE(featuredefn_getfieldcount,_wrap_FeatureDefn_GetFieldCount, NULL)
 ZEND_NAMED_FE(getfieldcount,_wrap_FeatureDefn_GetFieldCount, NULL)
 ZEND_NAMED_FE(featuredefn_getfielddefn,_wrap_FeatureDefn_GetFieldDefn, NULL)
 ZEND_NAMED_FE(getfielddefn,_wrap_FeatureDefn_GetFieldDefn, NULL)
 ZEND_NAMED_FE(featuredefn_getfieldindex,_wrap_FeatureDefn_GetFieldIndex, NULL)
 ZEND_NAMED_FE(getfieldindex,_wrap_FeatureDefn_GetFieldIndex, NULL)
 ZEND_NAMED_FE(featuredefn_addfielddefn,_wrap_FeatureDefn_AddFieldDefn, NULL)
 ZEND_NAMED_FE(addfielddefn,_wrap_FeatureDefn_AddFieldDefn, NULL)
 ZEND_NAMED_FE(featuredefn_getgeomtype,_wrap_FeatureDefn_GetGeomType, NULL)
 ZEND_NAMED_FE(getgeomtype,_wrap_FeatureDefn_GetGeomType, NULL)
 ZEND_NAMED_FE(featuredefn_setgeomtype,_wrap_FeatureDefn_SetGeomType, NULL)
 ZEND_NAMED_FE(setgeomtype,_wrap_FeatureDefn_SetGeomType, NULL)
 ZEND_NAMED_FE(featuredefn_getreferencecount,_wrap_FeatureDefn_GetReferenceCount, NULL)
 ZEND_NAMED_FE(getreferencecount,_wrap_FeatureDefn_GetReferenceCount, NULL)
   { NULL, NULL, NULL}
};
/* Function entries for FieldDefn */
static zend_function_entry FieldDefn_functions[] = {
 ZEND_NAMED_FE(new_fielddefn,_wrap_new_FieldDefn, NULL)
 ZEND_NAMED_FE(fielddefn,_wrap_new_FieldDefn, NULL)
 ZEND_NAMED_FE(fielddefn_getname,_wrap_FieldDefn_GetName, NULL)
 ZEND_NAMED_FE(getname,_wrap_FieldDefn_GetName, NULL)
 ZEND_NAMED_FE(fielddefn_getnameref,_wrap_FieldDefn_GetNameRef, NULL)
 ZEND_NAMED_FE(getnameref,_wrap_FieldDefn_GetNameRef, NULL)
 ZEND_NAMED_FE(fielddefn_setname,_wrap_FieldDefn_SetName, NULL)
 ZEND_NAMED_FE(setname,_wrap_FieldDefn_SetName, NULL)
 ZEND_NAMED_FE(fielddefn_gettype,_wrap_FieldDefn_GetType, NULL)
 ZEND_NAMED_FE(gettype,_wrap_FieldDefn_GetType, NULL)
 ZEND_NAMED_FE(fielddefn_settype,_wrap_FieldDefn_SetType, NULL)
 ZEND_NAMED_FE(settype,_wrap_FieldDefn_SetType, NULL)
 ZEND_NAMED_FE(fielddefn_getjustify,_wrap_FieldDefn_GetJustify, NULL)
 ZEND_NAMED_FE(getjustify,_wrap_FieldDefn_GetJustify, NULL)
 ZEND_NAMED_FE(fielddefn_setjustify,_wrap_FieldDefn_SetJustify, NULL)
 ZEND_NAMED_FE(setjustify,_wrap_FieldDefn_SetJustify, NULL)
 ZEND_NAMED_FE(fielddefn_getwidth,_wrap_FieldDefn_GetWidth, NULL)
 ZEND_NAMED_FE(getwidth,_wrap_FieldDefn_GetWidth, NULL)
 ZEND_NAMED_FE(fielddefn_setwidth,_wrap_FieldDefn_SetWidth, NULL)
 ZEND_NAMED_FE(setwidth,_wrap_FieldDefn_SetWidth, NULL)
 ZEND_NAMED_FE(fielddefn_getprecision,_wrap_FieldDefn_GetPrecision, NULL)
 ZEND_NAMED_FE(getprecision,_wrap_FieldDefn_GetPrecision, NULL)
 ZEND_NAMED_FE(fielddefn_setprecision,_wrap_FieldDefn_SetPrecision, NULL)
 ZEND_NAMED_FE(setprecision,_wrap_FieldDefn_SetPrecision, NULL)
 ZEND_NAMED_FE(fielddefn_getfieldtypename,_wrap_FieldDefn_GetFieldTypeName, NULL)
 ZEND_NAMED_FE(getfieldtypename,_wrap_FieldDefn_GetFieldTypeName, NULL)
   { NULL, NULL, NULL}
};
/* Function entries for Geometry */
static zend_function_entry Geometry_functions[] = {
 ZEND_NAMED_FE(new_geometry,_wrap_new_Geometry, NULL)
 ZEND_NAMED_FE(geometry,_wrap_new_Geometry, NULL)
 ZEND_NAMED_FE(geometry_exporttowkt,_wrap_Geometry_ExportToWkt, NULL)
 ZEND_NAMED_FE(exporttowkt,_wrap_Geometry_ExportToWkt, NULL)
 ZEND_NAMED_FE(geometry_exporttowkb,_wrap_Geometry_ExportToWkb, NULL)
 ZEND_NAMED_FE(exporttowkb,_wrap_Geometry_ExportToWkb, NULL)
 ZEND_NAMED_FE(geometry_exporttogml,_wrap_Geometry_ExportToGML, NULL)
 ZEND_NAMED_FE(exporttogml,_wrap_Geometry_ExportToGML, NULL)
 ZEND_NAMED_FE(geometry_addpoint,_wrap_Geometry_AddPoint, NULL)
 ZEND_NAMED_FE(addpoint,_wrap_Geometry_AddPoint, NULL)
 ZEND_NAMED_FE(geometry_addgeometrydirectly,_wrap_Geometry_AddGeometryDirectly, NULL)
 ZEND_NAMED_FE(addgeometrydirectly,_wrap_Geometry_AddGeometryDirectly, NULL)
 ZEND_NAMED_FE(geometry_addgeometry,_wrap_Geometry_AddGeometry, NULL)
 ZEND_NAMED_FE(addgeometry,_wrap_Geometry_AddGeometry, NULL)
 ZEND_NAMED_FE(geometry_clone,_wrap_Geometry_Clone, NULL)
 ZEND_NAMED_FE(clone,_wrap_Geometry_Clone, NULL)
 ZEND_NAMED_FE(geometry_getgeometrytype,_wrap_Geometry_GetGeometryType, NULL)
 ZEND_NAMED_FE(getgeometrytype,_wrap_Geometry_GetGeometryType, NULL)
 ZEND_NAMED_FE(geometry_getgeometryname,_wrap_Geometry_GetGeometryName, NULL)
 ZEND_NAMED_FE(getgeometryname,_wrap_Geometry_GetGeometryName, NULL)
 ZEND_NAMED_FE(geometry_getarea,_wrap_Geometry_GetArea, NULL)
 ZEND_NAMED_FE(getarea,_wrap_Geometry_GetArea, NULL)
 ZEND_NAMED_FE(geometry_getpointcount,_wrap_Geometry_GetPointCount, NULL)
 ZEND_NAMED_FE(getpointcount,_wrap_Geometry_GetPointCount, NULL)
 ZEND_NAMED_FE(geometry_getx,_wrap_Geometry_GetX, NULL)
 ZEND_NAMED_FE(getx,_wrap_Geometry_GetX, NULL)
 ZEND_NAMED_FE(geometry_gety,_wrap_Geometry_GetY, NULL)
 ZEND_NAMED_FE(gety,_wrap_Geometry_GetY, NULL)
 ZEND_NAMED_FE(geometry_getz,_wrap_Geometry_GetZ, NULL)
 ZEND_NAMED_FE(getz,_wrap_Geometry_GetZ, NULL)
 ZEND_NAMED_FE(geometry_getgeometrycount,_wrap_Geometry_GetGeometryCount, NULL)
 ZEND_NAMED_FE(getgeometrycount,_wrap_Geometry_GetGeometryCount, NULL)
 ZEND_NAMED_FE(geometry_setpoint,_wrap_Geometry_SetPoint, NULL)
 ZEND_NAMED_FE(setpoint,_wrap_Geometry_SetPoint, NULL)
 ZEND_NAMED_FE(geometry_getgeometryref,_wrap_Geometry_GetGeometryRef, NULL)
 ZEND_NAMED_FE(getgeometryref,_wrap_Geometry_GetGeometryRef, NULL)
 ZEND_NAMED_FE(geometry_getboundary,_wrap_Geometry_GetBoundary, NULL)
 ZEND_NAMED_FE(getboundary,_wrap_Geometry_GetBoundary, NULL)
 ZEND_NAMED_FE(geometry_convexhull,_wrap_Geometry_ConvexHull, NULL)
 ZEND_NAMED_FE(convexhull,_wrap_Geometry_ConvexHull, NULL)
 ZEND_NAMED_FE(geometry_buffer,_wrap_Geometry_Buffer, NULL)
 ZEND_NAMED_FE(buffer,_wrap_Geometry_Buffer, NULL)
 ZEND_NAMED_FE(geometry_intersection,_wrap_Geometry_Intersection, NULL)
 ZEND_NAMED_FE(intersection,_wrap_Geometry_Intersection, NULL)
 ZEND_NAMED_FE(geometry_union,_wrap_Geometry_Union, NULL)
 ZEND_NAMED_FE(union,_wrap_Geometry_Union, NULL)
 ZEND_NAMED_FE(geometry_difference,_wrap_Geometry_Difference, NULL)
 ZEND_NAMED_FE(difference,_wrap_Geometry_Difference, NULL)
 ZEND_NAMED_FE(geometry_symmetricdifference,_wrap_Geometry_SymmetricDifference, NULL)
 ZEND_NAMED_FE(symmetricdifference,_wrap_Geometry_SymmetricDifference, NULL)
 ZEND_NAMED_FE(geometry_distance,_wrap_Geometry_Distance, NULL)
 ZEND_NAMED_FE(distance,_wrap_Geometry_Distance, NULL)
 ZEND_NAMED_FE(geometry_empty,_wrap_Geometry_Empty, NULL)
 ZEND_NAMED_FE(empty,_wrap_Geometry_Empty, NULL)
 ZEND_NAMED_FE(geometry_intersect,_wrap_Geometry_Intersect, NULL)
 ZEND_NAMED_FE(intersect,_wrap_Geometry_Intersect, NULL)
 ZEND_NAMED_FE(geometry_equal,_wrap_Geometry_Equal, NULL)
 ZEND_NAMED_FE(equal,_wrap_Geometry_Equal, NULL)
 ZEND_NAMED_FE(geometry_disjoint,_wrap_Geometry_Disjoint, NULL)
 ZEND_NAMED_FE(disjoint,_wrap_Geometry_Disjoint, NULL)
 ZEND_NAMED_FE(geometry_touches,_wrap_Geometry_Touches, NULL)
 ZEND_NAMED_FE(touches,_wrap_Geometry_Touches, NULL)
 ZEND_NAMED_FE(geometry_crosses,_wrap_Geometry_Crosses, NULL)
 ZEND_NAMED_FE(crosses,_wrap_Geometry_Crosses, NULL)
 ZEND_NAMED_FE(geometry_within,_wrap_Geometry_Within, NULL)
 ZEND_NAMED_FE(within,_wrap_Geometry_Within, NULL)
 ZEND_NAMED_FE(geometry_contains,_wrap_Geometry_Contains, NULL)
 ZEND_NAMED_FE(contains,_wrap_Geometry_Contains, NULL)
 ZEND_NAMED_FE(geometry_overlaps,_wrap_Geometry_Overlaps, NULL)
 ZEND_NAMED_FE(overlaps,_wrap_Geometry_Overlaps, NULL)
 ZEND_NAMED_FE(geometry_transformto,_wrap_Geometry_TransformTo, NULL)
 ZEND_NAMED_FE(transformto,_wrap_Geometry_TransformTo, NULL)
 ZEND_NAMED_FE(geometry_transform,_wrap_Geometry_Transform, NULL)
 ZEND_NAMED_FE(transform,_wrap_Geometry_Transform, NULL)
 ZEND_NAMED_FE(geometry_getspatialreference,_wrap_Geometry_GetSpatialReference, NULL)
 ZEND_NAMED_FE(getspatialreference,_wrap_Geometry_GetSpatialReference, NULL)
 ZEND_NAMED_FE(geometry_assignspatialreference,_wrap_Geometry_AssignSpatialReference, NULL)
 ZEND_NAMED_FE(assignspatialreference,_wrap_Geometry_AssignSpatialReference, NULL)
 ZEND_NAMED_FE(geometry_closerings,_wrap_Geometry_CloseRings, NULL)
 ZEND_NAMED_FE(closerings,_wrap_Geometry_CloseRings, NULL)
 ZEND_NAMED_FE(geometry_flattento2d,_wrap_Geometry_FlattenTo2D, NULL)
 ZEND_NAMED_FE(flattento2d,_wrap_Geometry_FlattenTo2D, NULL)
 ZEND_NAMED_FE(geometry_getenvelope,_wrap_Geometry_GetEnvelope, NULL)
 ZEND_NAMED_FE(getenvelope,_wrap_Geometry_GetEnvelope, NULL)
 ZEND_NAMED_FE(geometry_centroid,_wrap_Geometry_Centroid, NULL)
 ZEND_NAMED_FE(centroid,_wrap_Geometry_Centroid, NULL)
 ZEND_NAMED_FE(geometry_wkbsize,_wrap_Geometry_WkbSize, NULL)
 ZEND_NAMED_FE(wkbsize,_wrap_Geometry_WkbSize, NULL)
 ZEND_NAMED_FE(geometry_getcoordinatedimension,_wrap_Geometry_GetCoordinateDimension, NULL)
 ZEND_NAMED_FE(getcoordinatedimension,_wrap_Geometry_GetCoordinateDimension, NULL)
 ZEND_NAMED_FE(geometry_getdimension,_wrap_Geometry_GetDimension, NULL)
 ZEND_NAMED_FE(getdimension,_wrap_Geometry_GetDimension, NULL)
   { NULL, NULL, NULL}
};


/* entry subsection */
/* Every non-class user visible function must have an entry here */
function_entry ogr_functions[] = {
  ZEND_NAMED_FE(creategeometryfromwkb,_wrap_CreateGeometryFromWkb, NULL)
  ZEND_NAMED_FE(creategeometryfromwkt,_wrap_CreateGeometryFromWkt, NULL)
  ZEND_NAMED_FE(creategeometryfromgml,_wrap_CreateGeometryFromGML, NULL)
  ZEND_NAMED_FE(ogrgetdrivercount,_wrap_OGRGetDriverCount, NULL)
  ZEND_NAMED_FE(ogrgetopendscount,_wrap_OGRGetOpenDSCount, NULL)
  ZEND_NAMED_FE(ogrsetgenerate_db2_v72_byte_order,_wrap_OGRSetGenerate_DB2_V72_BYTE_ORDER, NULL)
  ZEND_NAMED_FE(ogrregisterall,_wrap_OGRRegisterAll, NULL)
  ZEND_NAMED_FE(getopends,_wrap_GetOpenDS, NULL)
  ZEND_NAMED_FE(open,_wrap_Open, NULL)
  ZEND_NAMED_FE(openshared,_wrap_OpenShared, NULL)
  ZEND_NAMED_FE(getdriverbyname,_wrap_GetDriverByName, NULL)
  ZEND_NAMED_FE(getdriver,_wrap_GetDriver, NULL)
 {NULL, NULL, NULL}
};

zend_module_entry ogr_module_entry = {
#if ZEND_MODULE_API_NO > 20010900
    STANDARD_MODULE_HEADER,
#endif
    "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;


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

static swig_type_info _swigt__int = {"_int", "int", 0, 0, 0};
static swig_type_info _swigt__p_GIntBig = {"_p_GIntBig", "GIntBig *", 0, 0, 0};
static swig_type_info _swigt__p_OGRDataSourceShadow = {"_p_OGRDataSourceShadow", "OGRDataSourceShadow *", 0, 0, 0};
static swig_type_info _swigt__p_OGRDriverShadow = {"_p_OGRDriverShadow", "OGRDriverShadow *", 0, 0, 0};
static swig_type_info _swigt__p_OGRFeatureDefnShadow = {"_p_OGRFeatureDefnShadow", "OGRFeatureDefnShadow *", 0, 0, 0};
static swig_type_info _swigt__p_OGRFeatureShadow = {"_p_OGRFeatureShadow", "OGRFeatureShadow *", 0, 0, 0};
static swig_type_info _swigt__p_OGRFieldDefnShadow = {"_p_OGRFieldDefnShadow", "OGRFieldDefnShadow *", 0, 0, 0};
static swig_type_info _swigt__p_OGRGeometryShadow = {"_p_OGRGeometryShadow", "OGRGeometryShadow *", 0, 0, 0};
static swig_type_info _swigt__p_OGRLayerShadow = {"_p_OGRLayerShadow", "OGRLayerShadow *", 0, 0, 0};
static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, 0};
static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, 0};
static swig_type_info _swigt__p_p_OGRDataSourceShadow = {"_p_p_OGRDataSourceShadow", "OGRDataSourceShadow **", 0, 0, 0};
static swig_type_info _swigt__p_p_OGRDriverShadow = {"_p_p_OGRDriverShadow", "OGRDriverShadow **", 0, 0, 0};
static swig_type_info _swigt__p_p_OGRFeatureDefnShadow = {"_p_p_OGRFeatureDefnShadow", "OGRFeatureDefnShadow **", 0, 0, 0};
static swig_type_info _swigt__p_p_OGRFeatureShadow = {"_p_p_OGRFeatureShadow", "OGRFeatureShadow **", 0, 0, 0};
static swig_type_info _swigt__p_p_OGRFieldDefnShadow = {"_p_p_OGRFieldDefnShadow", "OGRFieldDefnShadow **", 0, 0, 0};
static swig_type_info _swigt__p_p_OGRGeometryShadow = {"_p_p_OGRGeometryShadow", "OGRGeometryShadow **", 0, 0, 0};
static swig_type_info _swigt__p_p_OGRLayerShadow = {"_p_p_OGRLayerShadow", "OGRLayerShadow **", 0, 0, 0};
static swig_type_info _swigt__p_p_OSRCoordinateTransformationShadow = {"_p_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow **", 0, 0, 0};
static swig_type_info _swigt__p_p_OSRSpatialReferenceShadow = {"_p_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow **", 0, 0, 0};
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 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_OGRDataSourceShadow,
  &_swigt__p_p_OGRDriverShadow,
  &_swigt__p_p_OGRFeatureDefnShadow,
  &_swigt__p_p_OGRFeatureShadow,
  &_swigt__p_p_OGRFieldDefnShadow,
  &_swigt__p_p_OGRGeometryShadow,
  &_swigt__p_p_OGRLayerShadow,
  &_swigt__p_p_OSRCoordinateTransformationShadow,
  &_swigt__p_p_OSRSpatialReferenceShadow,
  &_swigt__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_OGRDataSourceShadow[] = {  {&_swigt__p_p_OGRDataSourceShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_OGRDriverShadow[] = {  {&_swigt__p_p_OGRDriverShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_OGRFeatureDefnShadow[] = {  {&_swigt__p_p_OGRFeatureDefnShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_OGRFeatureShadow[] = {  {&_swigt__p_p_OGRFeatureShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_OGRFieldDefnShadow[] = {  {&_swigt__p_p_OGRFieldDefnShadow, 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_OSRCoordinateTransformationShadow[] = {  {&_swigt__p_p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_OSRSpatialReferenceShadow[] = {  {&_swigt__p_p_OSRSpatialReferenceShadow, 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 *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_OGRDataSourceShadow,
  _swigc__p_p_OGRDriverShadow,
  _swigc__p_p_OGRFeatureDefnShadow,
  _swigc__p_p_OGRFeatureShadow,
  _swigc__p_p_OGRFieldDefnShadow,
  _swigc__p_p_OGRGeometryShadow,
  _swigc__p_p_OGRLayerShadow,
  _swigc__p_p_OSRCoordinateTransformationShadow,
  _swigc__p_p_OSRSpatialReferenceShadow,
  _swigc__p_p_char,
};


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

/* end header section */
/* vdecl subsection */
static zend_class_entry ce_swig_Driver;
static zend_class_entry* ptr_ce_swig_Driver=NULL;
static zend_class_entry ce_swig_DataSource;
static zend_class_entry* ptr_ce_swig_DataSource=NULL;
static zend_class_entry ce_swig_Layer;
static zend_class_entry* ptr_ce_swig_Layer=NULL;
static zend_class_entry ce_swig_Feature;
static zend_class_entry* ptr_ce_swig_Feature=NULL;
static zend_class_entry ce_swig_FeatureDefn;
static zend_class_entry* ptr_ce_swig_FeatureDefn=NULL;
static zend_class_entry ce_swig_FieldDefn;
static zend_class_entry* ptr_ce_swig_FieldDefn=NULL;
static zend_class_entry ce_swig_Geometry;
static zend_class_entry* ptr_ce_swig_Geometry=NULL;
static int le_swig__p_GIntBig=0; /* handle for  */
static int le_swig__p_double=0; /* handle for  */
static int le_swig__p_p_char=0; /* handle for  */
static int le_swig__p_char=0; /* handle for  */
static int le_swig__p_p_OGRGeometryShadow=0; /* handle for  */
static int le_swig__p_OGRGeometryShadow=0; /* handle for Geometry */
static int le_swig__p_p_OSRSpatialReferenceShadow=0; /* handle for Geometry */
static int le_swig__p_OSRSpatialReferenceShadow=0; /* handle for SpatialReference */
static int le_swig__p_p_OGRDataSourceShadow=0; /* handle for SpatialReference */
static int le_swig__p_OGRDataSourceShadow=0; /* handle for DataSource */
static int le_swig__p_OGRFeatureShadow=0; /* handle for Feature */
static int le_swig__p_p_OGRFeatureShadow=0; /* handle for Feature */
static int le_swig__int=0; /* handle for Feature */
static int le_swig__p_int=0; /* handle for Feature */
static int le_swig__p_p_OGRLayerShadow=0; /* handle for Feature */
static int le_swig__p_OGRLayerShadow=0; /* handle for Layer */
static int le_swig__p_p_OGRDriverShadow=0; /* handle for Layer */
static int le_swig__p_OGRDriverShadow=0; /* handle for Driver */
static int le_swig__p_OGRFeatureDefnShadow=0; /* handle for FeatureDefn */
static int le_swig__p_OGRFieldDefnShadow=0; /* handle for FieldDefn */
static int le_swig__p_p_OGRFieldDefnShadow=0; /* handle for FieldDefn */
static int le_swig__p_p_OGRFeatureDefnShadow=0; /* handle for FieldDefn */
static int le_swig__p_OSRCoordinateTransformationShadow=0; /* handle for CoordinateTransformation */
static int le_swig__p_p_OSRCoordinateTransformationShadow=0; /* handle for CoordinateTransformation */
/* end vdecl subsection */
/* wrapper section */
static pval _wrap_Driver_name_get(zend_property_reference *property_reference) {
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    char *result;
    zval **args[1];
    zval _return_value;
    zval *return_value=&_return_value;
    
    SWIG_ResetError();
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&(property_reference->object), (void **) &arg1, SWIGTYPE_p_OGRDriverShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Driver_name_get. Expected SWIGTYPE_p_p_OGRDriverShadow");
        }
    }
    result = (char *)OGRDriverShadow_name_get(arg1);
    
    {
        if(!result) {
            ZVAL_NULL(return_value);
        } else {
            ZVAL_STRING(return_value,result, 1);
        }
    }
    return _return_value;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Driver_CreateDataSource) {
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char **arg3 = (char **) 0 ;
    OGRDataSourceShadow *result;
    zval **args[2];
    int arg_count;
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<2 || arg_count>3)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDriverShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Driver_CreateDataSource. Expected SWIGTYPE_p_p_OGRDriverShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    if(arg_count > 2) {
        {
            /* %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;
            //    }
            //    arg3 = CSLAddString( arg3, pszItem );
            //  }
        }
    }
    result = (OGRDataSourceShadow *)OGRDriverShadow_CreateDataSource(arg1,(char const *)arg2,arg3);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRDataSourceShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_DataSource);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    {
        /* %typemap(freearg) char **options */
        CSLDestroy( arg3 );
    }
    return;
    fail:
    {
        /* %typemap(freearg) char **options */
        CSLDestroy( arg3 );
    }
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Driver_CopyDataSource) {
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    OGRDataSourceShadow *arg2 = (OGRDataSourceShadow *) 0 ;
    char *arg3 = (char *) 0 ;
    char **arg4 = (char **) 0 ;
    OGRDataSourceShadow *result;
    zval **args[3];
    int arg_count;
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<3 || arg_count>4)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDriverShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Driver_CopyDataSource. Expected SWIGTYPE_p_p_OGRDriverShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Driver_CopyDataSource. Expected SWIGTYPE_p_p_OGRDataSourceShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[1]);
        arg3 = (char *) Z_STRVAL_PP(args[1]);
        /*@@*/;
    }
    if(arg_count > 3) {
        {
            /* %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;
            //    }
            //    arg4 = CSLAddString( arg4, pszItem );
            //  }
        }
    }
    result = (OGRDataSourceShadow *)OGRDriverShadow_CopyDataSource(arg1,arg2,(char const *)arg3,arg4);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRDataSourceShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_DataSource);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    {
        /* %typemap(freearg) char **options */
        CSLDestroy( arg4 );
    }
    return;
    fail:
    {
        /* %typemap(freearg) char **options */
        CSLDestroy( arg4 );
    }
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Driver_Open) {
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int arg3 = (int) 0 ;
    OGRDataSourceShadow *result;
    zval **args[2];
    int arg_count;
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<2 || arg_count>3)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDriverShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Driver_Open. Expected SWIGTYPE_p_p_OGRDriverShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    if(arg_count > 2) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
            convert_to_long_ex(args[1]);
            arg3 = (int) Z_LVAL_PP(args[1]);
            /*@@*/;
        }
    }
    result = (OGRDataSourceShadow *)OGRDriverShadow_Open(arg1,(char const *)arg2,arg3);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRDataSourceShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_DataSource);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Driver_DeleteDataSource) {
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDriverShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Driver_DeleteDataSource. Expected SWIGTYPE_p_p_OGRDriverShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    result = (int)OGRDriverShadow_DeleteDataSource(arg1,(char const *)arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Driver_TestCapability) {
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDriverShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Driver_TestCapability. Expected SWIGTYPE_p_p_OGRDriverShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    result = (int)OGRDriverShadow_TestCapability(arg1,(char const *)arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Driver_GetName) {
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    char *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDriverShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Driver_GetName. Expected SWIGTYPE_p_p_OGRDriverShadow");
        }
    }
    result = (char *)OGRDriverShadow_GetName(arg1);
    
    {
        if(!result) {
            ZVAL_NULL(return_value);
        } else {
            ZVAL_STRING(return_value,result, 1);
        }
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


/* property handler for class Driver */
static pval _wrap_propget_Driver(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_Driver(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_Driver(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  if (strcmp(propname,"name")==0) {
    *value=_wrap_Driver_name_get(property_reference);
    return SUCCESS;
  } else  return FAILURE;
}

static int _wrap_propset_Driver(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_Driver(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is Driver */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_Driver(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static pval _wrap_DataSource_name_get(zend_property_reference *property_reference) {
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    char *result;
    zval **args[1];
    zval _return_value;
    zval *return_value=&_return_value;
    
    SWIG_ResetError();
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&(property_reference->object), (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_name_get. Expected SWIGTYPE_p_p_OGRDataSourceShadow");
        }
    }
    result = (char *)OGRDataSourceShadow_name_get(arg1);
    
    {
        if(!result) {
            ZVAL_NULL(return_value);
        } else {
            ZVAL_STRING(return_value,result, 1);
        }
    }
    return _return_value;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
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! */
    SWIG_ZTS_ConvertResourceData(ptr,rsrc->type,type_name,(void **) &arg1,SWIGTYPE_p_OGRDataSourceShadow TSRMLS_CC);
    if (! arg1) zend_error(E_ERROR, "OGRDataSourceShadow resource already free'd");
    delete_OGRDataSourceShadow(arg1);
    
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_GetRefCount) {
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    int result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_GetRefCount. Expected SWIGTYPE_p_p_OGRDataSourceShadow");
        }
    }
    result = (int)OGRDataSourceShadow_GetRefCount(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_GetSummaryRefCount) {
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    int result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_GetSummaryRefCount. Expected SWIGTYPE_p_p_OGRDataSourceShadow");
        }
    }
    result = (int)OGRDataSourceShadow_GetSummaryRefCount(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_GetLayerCount) {
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    int result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_GetLayerCount. Expected SWIGTYPE_p_p_OGRDataSourceShadow");
        }
    }
    result = (int)OGRDataSourceShadow_GetLayerCount(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_GetName) {
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    char *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_GetName. Expected SWIGTYPE_p_p_OGRDataSourceShadow");
        }
    }
    result = (char *)OGRDataSourceShadow_GetName(arg1);
    
    {
        if(!result) {
            ZVAL_NULL(return_value);
        } else {
            ZVAL_STRING(return_value,result, 1);
        }
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_DeleteLayer) {
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    int arg2 ;
    OGRErr result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_DeleteLayer. Expected SWIGTYPE_p_p_OGRDataSourceShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    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(ErrorCode(),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 ;
    OGRLayerShadow *result;
    zval **args[4];
    int arg_count;
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<2 || arg_count>5)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_CreateLayer. Expected SWIGTYPE_p_p_OGRDataSourceShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    if(arg_count > 2) {
        {
            /* typemap(in) SWIGTYPE * */
            if(SWIG_ConvertPtr(*args[1], (void **) &arg3, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
                SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of DataSource_CreateLayer. Expected SWIGTYPE_p_p_OSRSpatialReferenceShadow");
            }
        }
    }
    if(arg_count > 3) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
            convert_to_long_ex(args[2]);
            arg4 = (OGRwkbGeometryType) Z_LVAL_PP(args[2]);
            /*@@*/;
        }
    }
    if(arg_count > 4) {
        {
            /* %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;
            //    }
            //    arg5 = CSLAddString( arg5, pszItem );
            //  }
        }
    }
    result = (OGRLayerShadow *)OGRDataSourceShadow_CreateLayer(arg1,(char const *)arg2,arg3,arg4,arg5);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRLayerShadow, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Layer);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    {
        /* %typemap(freearg) char **options */
        CSLDestroy( arg5 );
    }
    return;
    fail:
    {
        /* %typemap(freearg) char **options */
        CSLDestroy( arg5 );
    }
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_CopyLayer) {
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    char *arg3 = (char *) 0 ;
    char **arg4 = (char **) 0 ;
    OGRLayerShadow *result;
    zval **args[3];
    int arg_count;
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<3 || arg_count>4)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_CopyLayer. Expected SWIGTYPE_p_p_OGRDataSourceShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of DataSource_CopyLayer. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[1]);
        arg3 = (char *) Z_STRVAL_PP(args[1]);
        /*@@*/;
    }
    if(arg_count > 3) {
        {
            /* %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;
            //    }
            //    arg4 = CSLAddString( arg4, pszItem );
            //  }
        }
    }
    result = (OGRLayerShadow *)OGRDataSourceShadow_CopyLayer(arg1,arg2,(char const *)arg3,arg4);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRLayerShadow, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Layer);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    {
        /* %typemap(freearg) char **options */
        CSLDestroy( arg4 );
    }
    return;
    fail:
    {
        /* %typemap(freearg) char **options */
        CSLDestroy( arg4 );
    }
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_GetLayerByIndex) {
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    int arg2 = (int) 0 ;
    OGRLayerShadow *result;
    zval **args[1];
    int arg_count;
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<1 || arg_count>2)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_GetLayerByIndex. Expected SWIGTYPE_p_p_OGRDataSourceShadow");
        }
    }
    if(arg_count > 1) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
            convert_to_long_ex(args[0]);
            arg2 = (int) Z_LVAL_PP(args[0]);
            /*@@*/;
        }
    }
    result = (OGRLayerShadow *)OGRDataSourceShadow_GetLayerByIndex(arg1,arg2);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRLayerShadow, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Layer);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_GetLayerByName) {
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRLayerShadow *result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_GetLayerByName. Expected SWIGTYPE_p_p_OGRDataSourceShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    result = (OGRLayerShadow *)OGRDataSourceShadow_GetLayerByName(arg1,(char const *)arg2);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRLayerShadow, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Layer);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_TestCapability) {
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_TestCapability. Expected SWIGTYPE_p_p_OGRDataSourceShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    result = (int)OGRDataSourceShadow_TestCapability(arg1,(char const *)arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_ExecuteSQL) {
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRGeometryShadow *arg3 = (OGRGeometryShadow *) NULL ;
    char *arg4 = (char *) "" ;
    OGRLayerShadow *result;
    zval **args[3];
    int arg_count;
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<2 || arg_count>4)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_ExecuteSQL. Expected SWIGTYPE_p_p_OGRDataSourceShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    if(arg_count > 2) {
        {
            /* typemap(in) SWIGTYPE * */
            if(SWIG_ConvertPtr(*args[1], (void **) &arg3, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
                SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of DataSource_ExecuteSQL. Expected SWIGTYPE_p_p_OGRGeometryShadow");
            }
        }
    }
    if(arg_count > 3) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
            convert_to_string_ex(args[2]);
            arg4 = (char *) Z_STRVAL_PP(args[2]);
            /*@@*/;
        }
    }
    result = (OGRLayerShadow *)OGRDataSourceShadow_ExecuteSQL(arg1,(char const *)arg2,arg3,(char const *)arg4);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRLayerShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Layer);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_DataSource_ReleaseResultSet) {
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRDataSourceShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of DataSource_ReleaseResultSet. Expected SWIGTYPE_p_p_OGRDataSourceShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE *DISOWN */
        if(SWIG_ConvertPtr(*args[0], (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(ErrorCode(),ErrorMsg());
}


/* property handler for class DataSource */
static pval _wrap_propget_DataSource(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_DataSource(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_DataSource(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  if (strcmp(propname,"name")==0) {
    *value=_wrap_DataSource_name_get(property_reference);
    return SUCCESS;
  } else  return FAILURE;
}

static int _wrap_propset_DataSource(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_DataSource(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is DataSource */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_DataSource(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

ZEND_NAMED_FUNCTION(_wrap_Layer_GetRefCount) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    int result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetRefCount. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    result = (int)OGRLayerShadow_GetRefCount(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_SetSpatialFilter) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_SetSpatialFilter. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Layer_SetSpatialFilter. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    OGRLayerShadow_SetSpatialFilter(arg1,arg2);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_SetSpatialFilterRect) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    double arg2 ;
    double arg3 ;
    double arg4 ;
    double arg5 ;
    zval **args[4];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 4) || (zend_get_parameters_array_ex(4, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_SetSpatialFilterRect. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,13,CONVERT_FLOAT_IN@*/
        convert_to_double_ex(args[0]);
        arg2 = (double) Z_DVAL_PP(args[0]);
        /*@@*/;
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,13,CONVERT_FLOAT_IN@*/
        convert_to_double_ex(args[1]);
        arg3 = (double) Z_DVAL_PP(args[1]);
        /*@@*/;
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,13,CONVERT_FLOAT_IN@*/
        convert_to_double_ex(args[2]);
        arg4 = (double) Z_DVAL_PP(args[2]);
        /*@@*/;
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,13,CONVERT_FLOAT_IN@*/
        convert_to_double_ex(args[3]);
        arg5 = (double) Z_DVAL_PP(args[3]);
        /*@@*/;
    }
    OGRLayerShadow_SetSpatialFilterRect(arg1,arg2,arg3,arg4,arg5);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetSpatialFilter) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRGeometryShadow *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetSpatialFilter. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    result = (OGRGeometryShadow *)OGRLayerShadow_GetSpatialFilter(arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Geometry);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_SetAttributeFilter) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRErr result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_SetAttributeFilter. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_ResetReading) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_ResetReading. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    OGRLayerShadow_ResetReading(arg1);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetName) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    char *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetName. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    result = (char *)OGRLayerShadow_GetName(arg1);
    
    {
        if(!result) {
            ZVAL_NULL(return_value);
        } else {
            ZVAL_STRING(return_value,result, 1);
        }
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetFeature) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    long arg2 ;
    OGRFeatureShadow *result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetFeature. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (long) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    result = (OGRFeatureShadow *)OGRLayerShadow_GetFeature(arg1,arg2);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFeatureShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Feature);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetNextFeature) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRFeatureShadow *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetNextFeature. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    result = (OGRFeatureShadow *)OGRLayerShadow_GetNextFeature(arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFeatureShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Feature);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_SetNextByIndex) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    long arg2 ;
    OGRErr result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_SetNextByIndex. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (long) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_SetFeature) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    OGRErr result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_SetFeature. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Layer_SetFeature. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_CreateFeature) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    OGRErr result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_CreateFeature. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Layer_CreateFeature. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_DeleteFeature) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    long arg2 ;
    OGRErr result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_DeleteFeature. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (long) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_SyncToDisk) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRErr result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_SyncToDisk. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetLayerDefn) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRFeatureDefnShadow *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetLayerDefn. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    result = (OGRFeatureDefnShadow *)OGRLayerShadow_GetLayerDefn(arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFeatureDefnShadow, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_FeatureDefn);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetFeatureCount) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    int arg2 = (int) 1 ;
    int result;
    zval **args[1];
    int arg_count;
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<1 || arg_count>2)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetFeatureCount. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    if(arg_count > 1) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
            convert_to_long_ex(args[0]);
            arg2 = (int) Z_LVAL_PP(args[0]);
            /*@@*/;
        }
    }
    result = (int)OGRLayerShadow_GetFeatureCount(arg1,arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetExtent) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    double *arg2 ;
    int arg3 = (int) 1 ;
    double argout2[4] ;
    zval **args[1];
    int arg_count;
    
    {
        /* %typemap(in,numinputs=0) (double argout2[ANY]) */
        arg2 = argout2;
    }
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<1 || arg_count>2)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetExtent. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    if(arg_count > 1) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
            convert_to_long_ex(args[0]);
            arg3 = (int) Z_LVAL_PP(args[0]);
            /*@@*/;
        }
    }
    OGRLayerShadow_GetExtent(arg1,arg2,arg3);
    
    
    {
        /* %typemap(argout) (double argout[ANY]) */
        zval *t = CreateTupleFromDoubleArray( arg2, 4 );
        t_output_helper( &return_value, t );
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_TestCapability) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_TestCapability. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    result = (int)OGRLayerShadow_TestCapability(arg1,(char const *)arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_CreateField) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
    int arg3 = (int) 1 ;
    OGRErr result;
    zval **args[2];
    int arg_count;
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<2 || arg_count>3)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_CreateField. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Layer_CreateField. Expected SWIGTYPE_p_p_OGRFieldDefnShadow");
        }
    }
    if(arg_count > 2) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
            convert_to_long_ex(args[1]);
            arg3 = (int) Z_LVAL_PP(args[1]);
            /*@@*/;
        }
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_StartTransaction) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRErr result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_StartTransaction. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_CommitTransaction) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRErr result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_CommitTransaction. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_RollbackTransaction) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRErr result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_RollbackTransaction. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetSpatialRef) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OSRSpatialReferenceShadow *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetSpatialRef. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    result = (OSRSpatialReferenceShadow *)OGRLayerShadow_GetSpatialRef(arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_SpatialReference);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Layer_GetFeatureRead) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    GIntBig result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRLayerShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Layer_GetFeatureRead. Expected SWIGTYPE_p_p_OGRLayerShadow");
        }
    }
    result = OGRLayerShadow_GetFeatureRead(arg1);
    
    {
        GIntBig * resultobj = new GIntBig((GIntBig &) result);
        SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_GIntBig, 1);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


/* property handler for class Layer */
static pval _wrap_propget_Layer(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_Layer(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_Layer(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static int _wrap_propset_Layer(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_Layer(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is Layer */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_Layer(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
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! */
    SWIG_ZTS_ConvertResourceData(ptr,rsrc->type,type_name,(void **) &arg1,SWIGTYPE_p_OGRFeatureShadow TSRMLS_CC);
    if (! arg1) zend_error(E_ERROR, "OGRFeatureShadow resource already free'd");
    delete_OGRFeatureShadow(arg1);
    
}


ZEND_NAMED_FUNCTION(_wrap_new_Feature) {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    OGRFeatureShadow *result;
    zval **args[1];
    int arg_count;
    
    SWIG_ResetError();
    /* NATIVE Constructor */
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<0 || arg_count>1)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    if(arg_count > 0) {
        {
            /* typemap(in) SWIGTYPE * */
            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_p_OGRFeatureDefnShadow");
            }
        }
    }
    result = (OGRFeatureShadow *)new_OGRFeatureShadow(arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFeatureShadow, 1);
    }
    /* Wrap this return value */
    if (this_ptr) {
        /* NATIVE Constructor, use this_ptr */
        zval *_cPtr; MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        add_property_zval(this_ptr,"_cPtr",_cPtr);
    } else if (! this_ptr) {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Feature);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetDefnRef) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRFeatureDefnShadow *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetDefnRef. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    result = (OGRFeatureDefnShadow *)OGRFeatureShadow_GetDefnRef(arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFeatureDefnShadow, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_FeatureDefn);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetGeometry) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    OGRErr result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetGeometry. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Feature_SetGeometry. Expected SWIGTYPE_p_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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetGeometryDirectly) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    OGRErr result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetGeometryDirectly. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE *DISOWN */
        if(SWIG_ConvertPtr(*args[0], (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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetGeometryRef) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRGeometryShadow *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetGeometryRef. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeometryRef(arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Geometry);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_Clone) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRFeatureShadow *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_Clone. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    result = (OGRFeatureShadow *)OGRFeatureShadow_Clone(arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFeatureShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Feature);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_Equal) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_Equal. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Feature_Equal. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    result = (int)OGRFeatureShadow_Equal(arg1,arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldCount) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldCount. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    result = (int)OGRFeatureShadow_GetFieldCount(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldDefnRef__SWIG_0) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    OGRFieldDefnShadow *result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldDefnRef. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_0(arg1,arg2);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFieldDefnShadow, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_FieldDefn);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldDefnRef__SWIG_1) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRFieldDefnShadow *result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldDefnRef. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFieldDefnShadow, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_FieldDefn);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldDefnRef) {
    int argc;
    zval **argv[2];
    int ii;
    
    argc = ZEND_NUM_ARGS();
    zend_get_parameters_array_ex(argc,argv);
    if (argc == 2) {
        int _v;
        {
            /* typecheck SWIGTYPE * */
            void *tmp;
            _v = (SWIG_ConvertPtr( *argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) < 0)? 0:1;
        }
        if (_v) {
            _v = (Z_TYPE_PP(argv[1]) == IS_LONG ||
            Z_TYPE_PP(argv[1]) == IS_DOUBLE ||
            Z_TYPE_PP(argv[1]) == IS_STRING) ? 1 : 0; 
            if (_v) {
                return _wrap_Feature_GetFieldDefnRef__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
            }
        }
    }
    if (argc == 2) {
        int _v;
        {
            /* typecheck SWIGTYPE * */
            void *tmp;
            _v = (SWIG_ConvertPtr( *argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) < 0)? 0:1;
        }
        if (_v) {
            _v = (Z_TYPE_PP(argv[1]) == IS_LONG ||
            Z_TYPE_PP(argv[1]) == IS_DOUBLE ||
            Z_TYPE_PP(argv[1]) == IS_STRING) ? 1 : 0; 
            if (_v) {
                return _wrap_Feature_GetFieldDefnRef__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
            }
        }
    }
    
    /*No matching function for overloaded 'Feature_GetFieldDefnRef'*/
    
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsString__SWIG_0) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    char *result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldAsString. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_0(arg1,arg2);
    
    {
        if(!result) {
            ZVAL_NULL(return_value);
        } else {
            ZVAL_STRING(return_value,result, 1);
        }
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsString__SWIG_1) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldAsString. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_1(arg1,(char const *)arg2);
    
    {
        if(!result) {
            ZVAL_NULL(return_value);
        } else {
            ZVAL_STRING(return_value,result, 1);
        }
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsString) {
    int argc;
    zval **argv[2];
    int ii;
    
    argc = ZEND_NUM_ARGS();
    zend_get_parameters_array_ex(argc,argv);
    if (argc == 2) {
        int _v;
        {
            /* typecheck SWIGTYPE * */
            void *tmp;
            _v = (SWIG_ConvertPtr( *argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) < 0)? 0:1;
        }
        if (_v) {
            _v = (Z_TYPE_PP(argv[1]) == IS_LONG ||
            Z_TYPE_PP(argv[1]) == IS_DOUBLE ||
            Z_TYPE_PP(argv[1]) == IS_STRING) ? 1 : 0; 
            if (_v) {
                return _wrap_Feature_GetFieldAsString__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
            }
        }
    }
    if (argc == 2) {
        int _v;
        {
            /* typecheck SWIGTYPE * */
            void *tmp;
            _v = (SWIG_ConvertPtr( *argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) < 0)? 0:1;
        }
        if (_v) {
            _v = (Z_TYPE_PP(argv[1]) == IS_LONG ||
            Z_TYPE_PP(argv[1]) == IS_DOUBLE ||
            Z_TYPE_PP(argv[1]) == IS_STRING) ? 1 : 0; 
            if (_v) {
                return _wrap_Feature_GetFieldAsString__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
            }
        }
    }
    
    /*No matching function for overloaded 'Feature_GetFieldAsString'*/
    
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsInteger__SWIG_0) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldAsInteger. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_0(arg1,arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsInteger__SWIG_1) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldAsInteger. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_1(arg1,(char const *)arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsInteger) {
    int argc;
    zval **argv[2];
    int ii;
    
    argc = ZEND_NUM_ARGS();
    zend_get_parameters_array_ex(argc,argv);
    if (argc == 2) {
        int _v;
        {
            /* typecheck SWIGTYPE * */
            void *tmp;
            _v = (SWIG_ConvertPtr( *argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) < 0)? 0:1;
        }
        if (_v) {
            _v = (Z_TYPE_PP(argv[1]) == IS_LONG ||
            Z_TYPE_PP(argv[1]) == IS_DOUBLE ||
            Z_TYPE_PP(argv[1]) == IS_STRING) ? 1 : 0; 
            if (_v) {
                return _wrap_Feature_GetFieldAsInteger__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
            }
        }
    }
    if (argc == 2) {
        int _v;
        {
            /* typecheck SWIGTYPE * */
            void *tmp;
            _v = (SWIG_ConvertPtr( *argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) < 0)? 0:1;
        }
        if (_v) {
            _v = (Z_TYPE_PP(argv[1]) == IS_LONG ||
            Z_TYPE_PP(argv[1]) == IS_DOUBLE ||
            Z_TYPE_PP(argv[1]) == IS_STRING) ? 1 : 0; 
            if (_v) {
                return _wrap_Feature_GetFieldAsInteger__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
            }
        }
    }
    
    /*No matching function for overloaded 'Feature_GetFieldAsInteger'*/
    
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsDouble__SWIG_0) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    double result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldAsDouble. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_0(arg1,arg2);
    
    {
        ZVAL_DOUBLE(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsDouble__SWIG_1) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    double result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldAsDouble. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_1(arg1,(char const *)arg2);
    
    {
        ZVAL_DOUBLE(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldAsDouble) {
    int argc;
    zval **argv[2];
    int ii;
    
    argc = ZEND_NUM_ARGS();
    zend_get_parameters_array_ex(argc,argv);
    if (argc == 2) {
        int _v;
        {
            /* typecheck SWIGTYPE * */
            void *tmp;
            _v = (SWIG_ConvertPtr( *argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) < 0)? 0:1;
        }
        if (_v) {
            _v = (Z_TYPE_PP(argv[1]) == IS_LONG ||
            Z_TYPE_PP(argv[1]) == IS_DOUBLE ||
            Z_TYPE_PP(argv[1]) == IS_STRING) ? 1 : 0; 
            if (_v) {
                return _wrap_Feature_GetFieldAsDouble__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
            }
        }
    }
    if (argc == 2) {
        int _v;
        {
            /* typecheck SWIGTYPE * */
            void *tmp;
            _v = (SWIG_ConvertPtr( *argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) < 0)? 0:1;
        }
        if (_v) {
            _v = (Z_TYPE_PP(argv[1]) == IS_LONG ||
            Z_TYPE_PP(argv[1]) == IS_DOUBLE ||
            Z_TYPE_PP(argv[1]) == IS_STRING) ? 1 : 0; 
            if (_v) {
                return _wrap_Feature_GetFieldAsDouble__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
            }
        }
    }
    
    /*No matching function for overloaded 'Feature_GetFieldAsDouble'*/
    
}


ZEND_NAMED_FUNCTION(_wrap_Feature_IsFieldSet__SWIG_0) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_IsFieldSet. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    result = (int)OGRFeatureShadow_IsFieldSet__SWIG_0(arg1,arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_IsFieldSet__SWIG_1) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_IsFieldSet. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    result = (int)OGRFeatureShadow_IsFieldSet__SWIG_1(arg1,(char const *)arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_IsFieldSet) {
    int argc;
    zval **argv[2];
    int ii;
    
    argc = ZEND_NUM_ARGS();
    zend_get_parameters_array_ex(argc,argv);
    if (argc == 2) {
        int _v;
        {
            /* typecheck SWIGTYPE * */
            void *tmp;
            _v = (SWIG_ConvertPtr( *argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) < 0)? 0:1;
        }
        if (_v) {
            _v = (Z_TYPE_PP(argv[1]) == IS_LONG ||
            Z_TYPE_PP(argv[1]) == IS_DOUBLE ||
            Z_TYPE_PP(argv[1]) == IS_STRING) ? 1 : 0; 
            if (_v) {
                return _wrap_Feature_IsFieldSet__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
            }
        }
    }
    if (argc == 2) {
        int _v;
        {
            /* typecheck SWIGTYPE * */
            void *tmp;
            _v = (SWIG_ConvertPtr( *argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) < 0)? 0:1;
        }
        if (_v) {
            _v = (Z_TYPE_PP(argv[1]) == IS_LONG ||
            Z_TYPE_PP(argv[1]) == IS_DOUBLE ||
            Z_TYPE_PP(argv[1]) == IS_STRING) ? 1 : 0; 
            if (_v) {
                return _wrap_Feature_IsFieldSet__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
            }
        }
    }
    
    /*No matching function for overloaded 'Feature_IsFieldSet'*/
    
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldIndex) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldIndex. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    result = (int)OGRFeatureShadow_GetFieldIndex(arg1,(char const *)arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFID) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFID. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    result = (int)OGRFeatureShadow_GetFID(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetFID) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    OGRErr result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetFID. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_DumpReadable) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_DumpReadable. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    OGRFeatureShadow_DumpReadable(arg1);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_UnsetField__SWIG_0) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_UnsetField. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    OGRFeatureShadow_UnsetField__SWIG_0(arg1,arg2);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_UnsetField__SWIG_1) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_UnsetField. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    OGRFeatureShadow_UnsetField__SWIG_1(arg1,(char const *)arg2);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_UnsetField) {
    int argc;
    zval **argv[2];
    int ii;
    
    argc = ZEND_NUM_ARGS();
    zend_get_parameters_array_ex(argc,argv);
    if (argc == 2) {
        int _v;
        {
            /* typecheck SWIGTYPE * */
            void *tmp;
            _v = (SWIG_ConvertPtr( *argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) < 0)? 0:1;
        }
        if (_v) {
            _v = (Z_TYPE_PP(argv[1]) == IS_LONG ||
            Z_TYPE_PP(argv[1]) == IS_DOUBLE ||
            Z_TYPE_PP(argv[1]) == IS_STRING) ? 1 : 0; 
            if (_v) {
                return _wrap_Feature_UnsetField__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
            }
        }
    }
    if (argc == 2) {
        int _v;
        {
            /* typecheck SWIGTYPE * */
            void *tmp;
            _v = (SWIG_ConvertPtr( *argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) < 0)? 0:1;
        }
        if (_v) {
            _v = (Z_TYPE_PP(argv[1]) == IS_LONG ||
            Z_TYPE_PP(argv[1]) == IS_DOUBLE ||
            Z_TYPE_PP(argv[1]) == IS_STRING) ? 1 : 0; 
            if (_v) {
                return _wrap_Feature_UnsetField__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
            }
        }
    }
    
    /*No matching function for overloaded 'Feature_UnsetField'*/
    
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetField__SWIG_0) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    char *arg3 = (char *) 0 ;
    zval **args[2];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 2) || (zend_get_parameters_array_ex(2, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetField. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    {
        /* %typemap(in) (tostring argin) */
        convert_to_string_ex(args[1]);
        arg3 = Z_STRVAL_PP( args[1] );
    }
    OGRFeatureShadow_SetField__SWIG_0(arg1,arg2,(char const *)arg3);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetField__SWIG_1) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *arg3 = (char *) 0 ;
    zval **args[2];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 2) || (zend_get_parameters_array_ex(2, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetField. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    {
        /* %typemap(in) (tostring argin) */
        convert_to_string_ex(args[1]);
        arg3 = Z_STRVAL_PP( args[1] );
    }
    OGRFeatureShadow_SetField__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetField) {
    int argc;
    zval **argv[3];
    int ii;
    
    argc = ZEND_NUM_ARGS();
    zend_get_parameters_array_ex(argc,argv);
    if (argc == 3) {
        int _v;
        {
            /* typecheck SWIGTYPE * */
            void *tmp;
            _v = (SWIG_ConvertPtr( *argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) < 0)? 0:1;
        }
        if (_v) {
            _v = (Z_TYPE_PP(argv[1]) == IS_LONG ||
            Z_TYPE_PP(argv[1]) == IS_DOUBLE ||
            Z_TYPE_PP(argv[1]) == IS_STRING) ? 1 : 0; 
            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;
        {
            /* typecheck SWIGTYPE * */
            void *tmp;
            _v = (SWIG_ConvertPtr( *argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) < 0)? 0:1;
        }
        if (_v) {
            _v = (Z_TYPE_PP(argv[1]) == IS_LONG ||
            Z_TYPE_PP(argv[1]) == IS_DOUBLE ||
            Z_TYPE_PP(argv[1]) == IS_STRING) ? 1 : 0; 
            if (_v) {
                {
                    /* %typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) (tostring argin) */
                    _v = 1;
                }
                if (_v) {
                    return _wrap_Feature_SetField__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
                }
            }
        }
    }
    
    /*No matching function for overloaded 'Feature_SetField'*/
    
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetFrom) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    int arg3 = (int) 1 ;
    OGRErr result;
    zval **args[2];
    int arg_count;
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<2 || arg_count>3)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetFrom. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Feature_SetFrom. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    if(arg_count > 2) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
            convert_to_long_ex(args[1]);
            arg3 = (int) Z_LVAL_PP(args[1]);
            /*@@*/;
        }
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetStyleString) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetStyleString. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    result = (char *)OGRFeatureShadow_GetStyleString(arg1);
    
    {
        if(!result) {
            ZVAL_NULL(return_value);
        } else {
            ZVAL_STRING(return_value,result, 1);
        }
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_SetStyleString) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_SetStyleString. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    OGRFeatureShadow_SetStyleString(arg1,(char const *)arg2);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldType__SWIG_0) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    OGRFieldType result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldType. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_0(arg1,arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldType__SWIG_1) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *arg3 = (char *) 0 ;
    OGRFieldType result;
    zval **args[2];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 2) || (zend_get_parameters_array_ex(2, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Feature_GetFieldType. Expected SWIGTYPE_p_p_OGRFeatureShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[1]);
        arg3 = (char *) Z_STRVAL_PP(args[1]);
        /*@@*/;
    }
    result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Feature_GetFieldType) {
    int argc;
    zval **argv[3];
    int ii;
    
    argc = ZEND_NUM_ARGS();
    zend_get_parameters_array_ex(argc,argv);
    if (argc == 2) {
        int _v;
        {
            /* typecheck SWIGTYPE * */
            void *tmp;
            _v = (SWIG_ConvertPtr( *argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) < 0)? 0:1;
        }
        if (_v) {
            _v = (Z_TYPE_PP(argv[1]) == IS_LONG ||
            Z_TYPE_PP(argv[1]) == IS_DOUBLE ||
            Z_TYPE_PP(argv[1]) == IS_STRING) ? 1 : 0; 
            if (_v) {
                return _wrap_Feature_GetFieldType__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
            }
        }
    }
    if (argc == 3) {
        int _v;
        {
            /* typecheck SWIGTYPE * */
            void *tmp;
            _v = (SWIG_ConvertPtr( *argv[0], (void**)&tmp, SWIGTYPE_p_OGRFeatureShadow, 0) < 0)? 0:1;
        }
        if (_v) {
            _v = (Z_TYPE_PP(argv[1]) == IS_LONG ||
            Z_TYPE_PP(argv[1]) == IS_DOUBLE ||
            Z_TYPE_PP(argv[1]) == IS_STRING) ? 1 : 0; 
            if (_v) {
                _v = (Z_TYPE_PP(argv[2]) == IS_LONG ||
                Z_TYPE_PP(argv[2]) == IS_DOUBLE ||
                Z_TYPE_PP(argv[2]) == IS_STRING) ? 1 : 0; 
                if (_v) {
                    return _wrap_Feature_GetFieldType__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
                }
            }
        }
    }
    
    /*No matching function for overloaded 'Feature_GetFieldType'*/
    
}


/* property handler for class Feature */
static pval _wrap_propget_Feature(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_Feature(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_Feature(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static int _wrap_propset_Feature(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_Feature(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is Feature */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_Feature(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
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! */
    SWIG_ZTS_ConvertResourceData(ptr,rsrc->type,type_name,(void **) &arg1,SWIGTYPE_p_OGRFeatureDefnShadow TSRMLS_CC);
    if (! arg1) zend_error(E_ERROR, "OGRFeatureDefnShadow resource already free'd");
    delete_OGRFeatureDefnShadow(arg1);
    
}


ZEND_NAMED_FUNCTION(_wrap_new_FeatureDefn) {
    char *arg1 = (char *) NULL ;
    OGRFeatureDefnShadow *result;
    zval **args[1];
    int arg_count;
    
    SWIG_ResetError();
    /* NATIVE Constructor */
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<0 || arg_count>1)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    if(arg_count > 0) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
            convert_to_string_ex(args[0]);
            arg1 = (char *) Z_STRVAL_PP(args[0]);
            /*@@*/;
        }
    }
    result = (OGRFeatureDefnShadow *)new_OGRFeatureDefnShadow((char const *)arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFeatureDefnShadow, 1);
    }
    /* Wrap this return value */
    if (this_ptr) {
        /* NATIVE Constructor, use this_ptr */
        zval *_cPtr; MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        add_property_zval(this_ptr,"_cPtr",_cPtr);
    } else if (! this_ptr) {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_FeatureDefn);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_GetName) {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    char *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_GetName. Expected SWIGTYPE_p_p_OGRFeatureDefnShadow");
        }
    }
    result = (char *)OGRFeatureDefnShadow_GetName(arg1);
    
    {
        if(!result) {
            ZVAL_NULL(return_value);
        } else {
            ZVAL_STRING(return_value,result, 1);
        }
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_GetFieldCount) {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_GetFieldCount. Expected SWIGTYPE_p_p_OGRFeatureDefnShadow");
        }
    }
    result = (int)OGRFeatureDefnShadow_GetFieldCount(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_GetFieldDefn) {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int arg2 ;
    OGRFieldDefnShadow *result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_GetFieldDefn. Expected SWIGTYPE_p_p_OGRFeatureDefnShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    result = (OGRFieldDefnShadow *)OGRFeatureDefnShadow_GetFieldDefn(arg1,arg2);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFieldDefnShadow, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_FieldDefn);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_GetFieldIndex) {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_GetFieldIndex. Expected SWIGTYPE_p_p_OGRFeatureDefnShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    result = (int)OGRFeatureDefnShadow_GetFieldIndex(arg1,(char const *)arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_AddFieldDefn) {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_AddFieldDefn. Expected SWIGTYPE_p_p_OGRFeatureDefnShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of FeatureDefn_AddFieldDefn. Expected SWIGTYPE_p_p_OGRFieldDefnShadow");
        }
    }
    OGRFeatureDefnShadow_AddFieldDefn(arg1,arg2);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_GetGeomType) {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    OGRwkbGeometryType result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_GetGeomType. Expected SWIGTYPE_p_p_OGRFeatureDefnShadow");
        }
    }
    result = (OGRwkbGeometryType)OGRFeatureDefnShadow_GetGeomType(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_SetGeomType) {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    OGRwkbGeometryType arg2 ;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_SetGeomType. Expected SWIGTYPE_p_p_OGRFeatureDefnShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (OGRwkbGeometryType) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    OGRFeatureDefnShadow_SetGeomType(arg1,arg2);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FeatureDefn_GetReferenceCount) {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFeatureDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FeatureDefn_GetReferenceCount. Expected SWIGTYPE_p_p_OGRFeatureDefnShadow");
        }
    }
    result = (int)OGRFeatureDefnShadow_GetReferenceCount(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


/* property handler for class FeatureDefn */
static pval _wrap_propget_FeatureDefn(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_FeatureDefn(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_FeatureDefn(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static int _wrap_propset_FeatureDefn(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_FeatureDefn(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is FeatureDefn */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_FeatureDefn(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
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! */
    SWIG_ZTS_ConvertResourceData(ptr,rsrc->type,type_name,(void **) &arg1,SWIGTYPE_p_OGRFieldDefnShadow TSRMLS_CC);
    if (! arg1) zend_error(E_ERROR, "OGRFieldDefnShadow resource already free'd");
    delete_OGRFieldDefnShadow(arg1);
    
}


ZEND_NAMED_FUNCTION(_wrap_new_FieldDefn) {
    char *arg1 = (char *) "unnamed" ;
    OGRFieldType arg2 = (OGRFieldType) OFTString ;
    OGRFieldDefnShadow *result;
    zval **args[2];
    int arg_count;
    
    SWIG_ResetError();
    /* NATIVE Constructor */
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<0 || arg_count>2)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    if(arg_count > 0) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
            convert_to_string_ex(args[0]);
            arg1 = (char *) Z_STRVAL_PP(args[0]);
            /*@@*/;
        }
    }
    if(arg_count > 1) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
            convert_to_long_ex(args[1]);
            arg2 = (OGRFieldType) Z_LVAL_PP(args[1]);
            /*@@*/;
        }
    }
    result = (OGRFieldDefnShadow *)new_OGRFieldDefnShadow((char const *)arg1,arg2);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRFieldDefnShadow, 1);
    }
    /* Wrap this return value */
    if (this_ptr) {
        /* NATIVE Constructor, use this_ptr */
        zval *_cPtr; MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        add_property_zval(this_ptr,"_cPtr",_cPtr);
    } else if (! this_ptr) {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_FieldDefn);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_GetName) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    char *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_GetName. Expected SWIGTYPE_p_p_OGRFieldDefnShadow");
        }
    }
    result = (char *)OGRFieldDefnShadow_GetName(arg1);
    
    {
        if(!result) {
            ZVAL_NULL(return_value);
        } else {
            ZVAL_STRING(return_value,result, 1);
        }
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_GetNameRef) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    char *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_GetNameRef. Expected SWIGTYPE_p_p_OGRFieldDefnShadow");
        }
    }
    result = (char *)OGRFieldDefnShadow_GetNameRef(arg1);
    
    {
        if(!result) {
            ZVAL_NULL(return_value);
        } else {
            ZVAL_STRING(return_value,result, 1);
        }
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_SetName) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_SetName. Expected SWIGTYPE_p_p_OGRFieldDefnShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg2 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    OGRFieldDefnShadow_SetName(arg1,(char const *)arg2);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_GetType) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    OGRFieldType result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_GetType. Expected SWIGTYPE_p_p_OGRFieldDefnShadow");
        }
    }
    result = (OGRFieldType)OGRFieldDefnShadow_GetType(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_SetType) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    OGRFieldType arg2 ;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_SetType. Expected SWIGTYPE_p_p_OGRFieldDefnShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (OGRFieldType) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    OGRFieldDefnShadow_SetType(arg1,arg2);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_GetJustify) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    OGRJustification result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_GetJustify. Expected SWIGTYPE_p_p_OGRFieldDefnShadow");
        }
    }
    result = (OGRJustification)OGRFieldDefnShadow_GetJustify(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_SetJustify) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    OGRJustification arg2 ;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_SetJustify. Expected SWIGTYPE_p_p_OGRFieldDefnShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (OGRJustification) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    OGRFieldDefnShadow_SetJustify(arg1,arg2);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_GetWidth) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    int result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_GetWidth. Expected SWIGTYPE_p_p_OGRFieldDefnShadow");
        }
    }
    result = (int)OGRFieldDefnShadow_GetWidth(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_SetWidth) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    int arg2 ;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_SetWidth. Expected SWIGTYPE_p_p_OGRFieldDefnShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    OGRFieldDefnShadow_SetWidth(arg1,arg2);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_GetPrecision) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    int result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_GetPrecision. Expected SWIGTYPE_p_p_OGRFieldDefnShadow");
        }
    }
    result = (int)OGRFieldDefnShadow_GetPrecision(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_SetPrecision) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    int arg2 ;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_SetPrecision. Expected SWIGTYPE_p_p_OGRFieldDefnShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    OGRFieldDefnShadow_SetPrecision(arg1,arg2);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_FieldDefn_GetFieldTypeName) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    OGRFieldType arg2 ;
    char *result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRFieldDefnShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of FieldDefn_GetFieldTypeName. Expected SWIGTYPE_p_p_OGRFieldDefnShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (OGRFieldType) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    result = (char *)OGRFieldDefnShadow_GetFieldTypeName(arg1,arg2);
    
    {
        if(!result) {
            ZVAL_NULL(return_value);
        } else {
            ZVAL_STRING(return_value,result, 1);
        }
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


/* property handler for class FieldDefn */
static pval _wrap_propget_FieldDefn(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_FieldDefn(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_FieldDefn(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static int _wrap_propset_FieldDefn(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_FieldDefn(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is FieldDefn */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_FieldDefn(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

ZEND_NAMED_FUNCTION(_wrap_CreateGeometryFromWkb) {
    int arg1 ;
    char *arg2 = (char *) 0 ;
    OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
    OGRGeometryShadow *result;
    zval **args[2];
    int arg_count;
    
    SWIG_ResetError();
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<1 || arg_count>2)
    WRONG_PARAM_COUNT;
    
    if(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) {
        {
            /* typemap(in) SWIGTYPE * */
            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_p_OSRSpatialReferenceShadow");
            }
        }
    }
    result = (OGRGeometryShadow *)CreateGeometryFromWkb(arg1,arg2,arg3);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Geometry);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_CreateGeometryFromWkt) {
    char **arg1 = (char **) 0 ;
    OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) NULL ;
    OGRGeometryShadow *result;
    char *val1 ;
    zval **args[2];
    int arg_count;
    
    SWIG_ResetError();
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<1 || arg_count>2)
    WRONG_PARAM_COUNT;
    
    if(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) {
        {
            /* typemap(in) SWIGTYPE * */
            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_p_OSRSpatialReferenceShadow");
            }
        }
    }
    result = (OGRGeometryShadow *)CreateGeometryFromWkt(arg1,arg2);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Geometry);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_CreateGeometryFromGML) {
    char *arg1 = (char *) 0 ;
    OGRGeometryShadow *result;
    zval **args[1];
    
    SWIG_ResetError();
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg1 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    result = (OGRGeometryShadow *)CreateGeometryFromGML((char const *)arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Geometry);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
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! */
    SWIG_ZTS_ConvertResourceData(ptr,rsrc->type,type_name,(void **) &arg1,SWIGTYPE_p_OGRGeometryShadow TSRMLS_CC);
    if (! arg1) zend_error(E_ERROR, "OGRGeometryShadow resource already free'd");
    delete_OGRGeometryShadow(arg1);
    
}


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 ;
    OGRGeometryShadow *result;
    zval **args[5];
    int arg_count;
    
    SWIG_ResetError();
    /* NATIVE Constructor */
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<0 || arg_count>5)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    if(arg_count > 0) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
            convert_to_long_ex(args[0]);
            arg1 = (OGRwkbGeometryType) Z_LVAL_PP(args[0]);
            /*@@*/;
        }
    }
    if(arg_count > 1) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
            convert_to_string_ex(args[1]);
            arg2 = (char *) Z_STRVAL_PP(args[1]);
            /*@@*/;
        }
    }
    if(arg_count > 2) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
            convert_to_long_ex(args[2]);
            arg3 = (int) Z_LVAL_PP(args[2]);
            /*@@*/;
        }
    }
    if(arg_count > 3) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
            convert_to_string_ex(args[3]);
            arg4 = (char *) Z_STRVAL_PP(args[3]);
            /*@@*/;
        }
    }
    if(arg_count > 4) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
            convert_to_string_ex(args[4]);
            arg5 = (char *) Z_STRVAL_PP(args[4]);
            /*@@*/;
        }
    }
    result = (OGRGeometryShadow *)new_OGRGeometryShadow(arg1,arg2,arg3,arg4,arg5);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
    }
    /* Wrap this return value */
    if (this_ptr) {
        /* NATIVE Constructor, use this_ptr */
        zval *_cPtr; MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        add_property_zval(this_ptr,"_cPtr",_cPtr);
    } else if (! this_ptr) {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Geometry);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_ExportToWkt) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    char *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_ExportToWkt. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (char *)OGRGeometryShadow_ExportToWkt(arg1);
    
    {
        if(!result) {
            ZVAL_NULL(return_value);
        } else {
            ZVAL_STRING(return_value,result, 1);
        }
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_ExportToWkb) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int *arg2 = (int *) 0 ;
    char **arg3 = (char **) 0 ;
    OGRwkbByteOrder arg4 = (OGRwkbByteOrder) wkbXDR ;
    OGRErr result;
    int nLen2 = 0 ;
    char *pBuf2 = 0 ;
    zval **args[1];
    int arg_count;
    
    {
        /* %typemap(in,numinputs=0) (int *nLen2, char **pBuf2 ) */
        arg2 = &nLen2;
        arg3 = &pBuf2;
    }
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<1 || arg_count>2)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_ExportToWkb. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    if(arg_count > 1) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
            convert_to_long_ex(args[0]);
            arg4 = (OGRwkbByteOrder) Z_LVAL_PP(args[0]);
            /*@@*/;
        }
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_ExportToGML) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    char *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_ExportToGML. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (char *)OGRGeometryShadow_ExportToGML(arg1);
    
    {
        if(!result) {
            ZVAL_NULL(return_value);
        } else {
            ZVAL_STRING(return_value,result, 1);
        }
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_AddPoint) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double arg2 ;
    double arg3 ;
    double arg4 = (double) 0 ;
    zval **args[3];
    int arg_count;
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<3 || arg_count>4)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_AddPoint. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,13,CONVERT_FLOAT_IN@*/
        convert_to_double_ex(args[0]);
        arg2 = (double) Z_DVAL_PP(args[0]);
        /*@@*/;
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,13,CONVERT_FLOAT_IN@*/
        convert_to_double_ex(args[1]);
        arg3 = (double) Z_DVAL_PP(args[1]);
        /*@@*/;
    }
    if(arg_count > 3) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,13,CONVERT_FLOAT_IN@*/
            convert_to_double_ex(args[2]);
            arg4 = (double) Z_DVAL_PP(args[2]);
            /*@@*/;
        }
    }
    OGRGeometryShadow_AddPoint(arg1,arg2,arg3,arg4);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_AddGeometryDirectly) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    OGRErr result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_AddGeometryDirectly. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE *DISOWN */
        if(SWIG_ConvertPtr(*args[0], (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");
        }
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_AddGeometry) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    OGRErr result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_AddGeometry. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_AddGeometry. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Clone) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Clone. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_Clone(arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Geometry);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetGeometryType) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRwkbGeometryType result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetGeometryType. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (OGRwkbGeometryType)OGRGeometryShadow_GetGeometryType(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetGeometryName) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    char *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetGeometryName. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (char *)OGRGeometryShadow_GetGeometryName(arg1);
    
    {
        if(!result) {
            ZVAL_NULL(return_value);
        } else {
            ZVAL_STRING(return_value,result, 1);
        }
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetArea) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetArea. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (double)OGRGeometryShadow_GetArea(arg1);
    
    {
        ZVAL_DOUBLE(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetPointCount) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetPointCount. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (int)OGRGeometryShadow_GetPointCount(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetX) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 = (int) 0 ;
    double result;
    zval **args[1];
    int arg_count;
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<1 || arg_count>2)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetX. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    if(arg_count > 1) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
            convert_to_long_ex(args[0]);
            arg2 = (int) Z_LVAL_PP(args[0]);
            /*@@*/;
        }
    }
    result = (double)OGRGeometryShadow_GetX(arg1,arg2);
    
    {
        ZVAL_DOUBLE(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetY) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 = (int) 0 ;
    double result;
    zval **args[1];
    int arg_count;
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<1 || arg_count>2)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetY. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    if(arg_count > 1) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
            convert_to_long_ex(args[0]);
            arg2 = (int) Z_LVAL_PP(args[0]);
            /*@@*/;
        }
    }
    result = (double)OGRGeometryShadow_GetY(arg1,arg2);
    
    {
        ZVAL_DOUBLE(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetZ) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 = (int) 0 ;
    double result;
    zval **args[1];
    int arg_count;
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<1 || arg_count>2)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetZ. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    if(arg_count > 1) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
            convert_to_long_ex(args[0]);
            arg2 = (int) Z_LVAL_PP(args[0]);
            /*@@*/;
        }
    }
    result = (double)OGRGeometryShadow_GetZ(arg1,arg2);
    
    {
        ZVAL_DOUBLE(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetGeometryCount) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetGeometryCount. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (int)OGRGeometryShadow_GetGeometryCount(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_SetPoint) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    double arg3 ;
    double arg4 ;
    double arg5 = (double) 0 ;
    zval **args[4];
    int arg_count;
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<4 || arg_count>5)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_SetPoint. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,13,CONVERT_FLOAT_IN@*/
        convert_to_double_ex(args[1]);
        arg3 = (double) Z_DVAL_PP(args[1]);
        /*@@*/;
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,13,CONVERT_FLOAT_IN@*/
        convert_to_double_ex(args[2]);
        arg4 = (double) Z_DVAL_PP(args[2]);
        /*@@*/;
    }
    if(arg_count > 4) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,13,CONVERT_FLOAT_IN@*/
            convert_to_double_ex(args[3]);
            arg5 = (double) Z_DVAL_PP(args[3]);
            /*@@*/;
        }
    }
    OGRGeometryShadow_SetPoint(arg1,arg2,arg3,arg4,arg5);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetGeometryRef) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    OGRGeometryShadow *result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetGeometryRef. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg2 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_GetGeometryRef(arg1,arg2);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Geometry);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetBoundary) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetBoundary. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_GetBoundary(arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Geometry);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_ConvexHull) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_ConvexHull. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_ConvexHull(arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Geometry);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Buffer) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double arg2 ;
    int arg3 = (int) 30 ;
    OGRGeometryShadow *result;
    zval **args[2];
    int arg_count;
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<2 || arg_count>3)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Buffer. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,13,CONVERT_FLOAT_IN@*/
        convert_to_double_ex(args[0]);
        arg2 = (double) Z_DVAL_PP(args[0]);
        /*@@*/;
    }
    if(arg_count > 2) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
            convert_to_long_ex(args[1]);
            arg3 = (int) Z_LVAL_PP(args[1]);
            /*@@*/;
        }
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_Buffer(arg1,arg2,arg3);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Geometry);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Intersection) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Intersection. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Intersection. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_Intersection(arg1,arg2);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Geometry);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Union) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Union. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Union. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_Union(arg1,arg2);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Geometry);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Difference) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Difference. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Difference. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_Difference(arg1,arg2);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Geometry);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_SymmetricDifference) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_SymmetricDifference. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_SymmetricDifference. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_SymmetricDifference(arg1,arg2);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Geometry);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Distance) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    double result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Distance. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Distance. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (double)OGRGeometryShadow_Distance(arg1,arg2);
    
    {
        ZVAL_DOUBLE(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Empty) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Empty. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    OGRGeometryShadow_Empty(arg1);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Intersect) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Intersect. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Intersect. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (int)OGRGeometryShadow_Intersect(arg1,arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Equal) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Equal. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Equal. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (int)OGRGeometryShadow_Equal(arg1,arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Disjoint) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Disjoint. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Disjoint. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (int)OGRGeometryShadow_Disjoint(arg1,arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Touches) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Touches. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Touches. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (int)OGRGeometryShadow_Touches(arg1,arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Crosses) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Crosses. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Crosses. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (int)OGRGeometryShadow_Crosses(arg1,arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Within) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Within. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Within. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (int)OGRGeometryShadow_Within(arg1,arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Contains) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Contains. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Contains. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (int)OGRGeometryShadow_Contains(arg1,arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Overlaps) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    int result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Overlaps. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Overlaps. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (int)OGRGeometryShadow_Overlaps(arg1,arg2);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_TransformTo) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    OGRErr result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_TransformTo. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_TransformTo. Expected SWIGTYPE_p_p_OSRSpatialReferenceShadow");
        }
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Transform) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OSRCoordinateTransformationShadow *arg2 = (OSRCoordinateTransformationShadow *) 0 ;
    OGRErr result;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Transform. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_Transform. Expected SWIGTYPE_p_p_OSRCoordinateTransformationShadow");
        }
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetSpatialReference) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OSRSpatialReferenceShadow *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetSpatialReference. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (OSRSpatialReferenceShadow *)OGRGeometryShadow_GetSpatialReference(arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_SpatialReference);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_AssignSpatialReference) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    zval **args[1];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_AssignSpatialReference. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*args[0], (void **) &arg2, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of Geometry_AssignSpatialReference. Expected SWIGTYPE_p_p_OSRSpatialReferenceShadow");
        }
    }
    OGRGeometryShadow_AssignSpatialReference(arg1,arg2);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_CloseRings) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_CloseRings. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    OGRGeometryShadow_CloseRings(arg1);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_FlattenTo2D) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_FlattenTo2D. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    OGRGeometryShadow_FlattenTo2D(arg1);
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetEnvelope) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double *arg2 ;
    double argout2[4] ;
    zval **args[0];
    
    {
        /* %typemap(in,numinputs=0) (double argout2[ANY]) */
        arg2 = argout2;
    }
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetEnvelope. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    OGRGeometryShadow_GetEnvelope(arg1,arg2);
    
    
    {
        /* %typemap(argout) (double argout[ANY]) */
        zval *t = CreateTupleFromDoubleArray( arg2, 4 );
        t_output_helper( &return_value, t );
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_Centroid) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_Centroid. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_Centroid(arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRGeometryShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Geometry);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_WkbSize) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_WkbSize. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (int)OGRGeometryShadow_WkbSize(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetCoordinateDimension) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetCoordinateDimension. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (int)OGRGeometryShadow_GetCoordinateDimension(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Geometry_GetDimension) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int result;
    zval **args[0];
    
    SWIG_ResetError();
    /* This function uses a this_ptr*/
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /* typemap(in) SWIGTYPE * */
        if(SWIG_ConvertPtr(*&this_ptr, (void **) &arg1, SWIGTYPE_p_OGRGeometryShadow, 0) < 0) {
            SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of Geometry_GetDimension. Expected SWIGTYPE_p_p_OGRGeometryShadow");
        }
    }
    result = (int)OGRGeometryShadow_GetDimension(arg1);
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


/* property handler for class Geometry */
static pval _wrap_propget_Geometry(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_Geometry(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_Geometry(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static int _wrap_propset_Geometry(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_Geometry(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is Geometry */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_Geometry(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

ZEND_NAMED_FUNCTION(_wrap_OGRGetDriverCount) {
    int result;
    zval **args[0];
    
    SWIG_ResetError();
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    result = (int)OGRGetDriverCount();
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_OGRGetOpenDSCount) {
    int result;
    zval **args[0];
    
    SWIG_ResetError();
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    result = (int)OGRGetOpenDSCount();
    
    {
        ZVAL_LONG(return_value,result);
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_OGRSetGenerate_DB2_V72_BYTE_ORDER) {
    int arg1 ;
    OGRErr result;
    zval **args[1];
    
    SWIG_ResetError();
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg1 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    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(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_OGRRegisterAll) {
    zval **args[0];
    
    SWIG_ResetError();
    if(((ZEND_NUM_ARGS() )!= 0) || (zend_get_parameters_array_ex(0, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    OGRRegisterAll();
    
    
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_GetOpenDS) {
    int arg1 ;
    OGRDataSourceShadow *result;
    zval **args[1];
    
    SWIG_ResetError();
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg1 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    result = (OGRDataSourceShadow *)GetOpenDS(arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRDataSourceShadow, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_DataSource);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_Open) {
    char *arg1 = (char *) 0 ;
    int arg2 = (int) 0 ;
    OGRDataSourceShadow *result;
    zval **args[2];
    int arg_count;
    
    SWIG_ResetError();
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<1 || arg_count>2)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg1 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    if(arg_count > 1) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
            convert_to_long_ex(args[1]);
            arg2 = (int) Z_LVAL_PP(args[1]);
            /*@@*/;
        }
    }
    result = (OGRDataSourceShadow *)Open((char const *)arg1,arg2);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRDataSourceShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_DataSource);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_OpenShared) {
    char *arg1 = (char *) 0 ;
    int arg2 = (int) 0 ;
    OGRDataSourceShadow *result;
    zval **args[2];
    int arg_count;
    
    SWIG_ResetError();
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<1 || arg_count>2)
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg1 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    if(arg_count > 1) {
        {
            /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
            convert_to_long_ex(args[1]);
            arg2 = (int) Z_LVAL_PP(args[1]);
            /*@@*/;
        }
    }
    result = (OGRDataSourceShadow *)OpenShared((char const *)arg1,arg2);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRDataSourceShadow, 1);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_DataSource);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_GetDriverByName) {
    char *arg1 = (char *) 0 ;
    OGRDriverShadow *result;
    zval **args[1];
    
    SWIG_ResetError();
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,23,CONVERT_STRING_IN@*/
        convert_to_string_ex(args[0]);
        arg1 = (char *) Z_STRVAL_PP(args[0]);
        /*@@*/;
    }
    result = (OGRDriverShadow *)GetDriverByName((char const *)arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRDriverShadow, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Driver);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_GetDriver) {
    int arg1 ;
    OGRDriverShadow *result;
    zval **args[1];
    
    SWIG_ResetError();
    if(((ZEND_NUM_ARGS() )!= 1) || (zend_get_parameters_array_ex(1, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        /*@/home/kruland/opt/share/swig/1.3.26/php4/utils.i,4,CONVERT_INT_IN@*/
        convert_to_long_ex(args[0]);
        arg1 = (int) Z_LVAL_PP(args[0]);
        /*@@*/;
    }
    result = (OGRDriverShadow *)GetDriver(arg1);
    
    {
        SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OGRDriverShadow, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_Driver);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
    return;
    fail:
    zend_error(ErrorCode(),ErrorMsg());
}


/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_GIntBig) {
  /* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_double) {
  /* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_char) {
  /* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_char) {
  /* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_OGRGeometryShadow) {
  /* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OGRGeometryShadow) {
  /* has destructor: __wrap_delete_Geometry */
  __wrap_delete_Geometry(rsrc, SWIGTYPE_p_OGRGeometryShadow->name TSRMLS_CC);
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_OSRSpatialReferenceShadow) {
  /* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OSRSpatialReferenceShadow) {
  /* bah! No destructor for this wrapped class!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_OGRDataSourceShadow) {
  /* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OGRDataSourceShadow) {
  /* has destructor: __wrap_delete_DataSource */
  __wrap_delete_DataSource(rsrc, SWIGTYPE_p_OGRDataSourceShadow->name TSRMLS_CC);
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OGRFeatureShadow) {
  /* has destructor: __wrap_delete_Feature */
  __wrap_delete_Feature(rsrc, SWIGTYPE_p_OGRFeatureShadow->name TSRMLS_CC);
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_OGRFeatureShadow) {
  /* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_int) {
  /* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_int) {
  /* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_OGRLayerShadow) {
  /* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OGRLayerShadow) {
  /* bah! No destructor for this wrapped class!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_OGRDriverShadow) {
  /* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OGRDriverShadow) {
  /* bah! No destructor for this wrapped class!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OGRFeatureDefnShadow) {
  /* has destructor: __wrap_delete_FeatureDefn */
  __wrap_delete_FeatureDefn(rsrc, SWIGTYPE_p_OGRFeatureDefnShadow->name TSRMLS_CC);
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OGRFieldDefnShadow) {
  /* has destructor: __wrap_delete_FieldDefn */
  __wrap_delete_FieldDefn(rsrc, SWIGTYPE_p_OGRFieldDefnShadow->name TSRMLS_CC);
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_OGRFieldDefnShadow) {
  /* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_OGRFeatureDefnShadow) {
  /* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OSRCoordinateTransformationShadow) {
  /* bah! No destructor for this wrapped class!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_OSRCoordinateTransformationShadow) {
  /* bah! No destructor for this simple type!! */
}
/* end wrapper section */
/* init section */
#ifdef __cplusplus
extern "C" {
#endif
ZEND_GET_MODULE(ogr)
#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 though 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" {
#endif

SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
  swig_type_info *type, *ret;
  swig_cast_info *cast;
  size_t i;
  swig_module_info *module_head;
  static int init_run = 0;

  clientdata = clientdata;

  if (init_run) return;
  init_run = 1;

  /* Initialize the swig_module */
  swig_module.type_initial = swig_type_initial;
  swig_module.cast_initial = swig_cast_initial;

  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (module_head) {
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  } else {
    /* This is the first module loaded */
    swig_module.next = &swig_module;
    SWIG_SetModule(clientdata, &swig_module);
  }
		 
  /* Now work on filling in swig_module.types */
  for (i = 0; i < swig_module.size; ++i) {
    type = 0;

    /* 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 */
      if (swig_module.type_initial[i]->clientdata) type->clientdata = swig_module.type_initial[i]->clientdata;
    } 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;
      if (swig_module.next != &swig_module) {
        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
      }
      if (ret && type == swig_module.type_initial[i]) {
        cast->type = ret;
        ret = 0;
      }
      
      if (!ret) {
        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;
}

/* 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
}
#endif


  SWIG_php_minit {
    SWIG_InitializeModule(0);


  if ( OGRGetDriverCount() == 0 ) {
    OGRRegisterAll();
  }

/* oinit subsection */
ZEND_INIT_MODULE_GLOBALS(ogr, ogr_init_globals, ogr_destroy_globals);
/* Define class Driver */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_Driver,"driver",Driver_functions,NULL,_wrap_propget_Driver,_wrap_propset_Driver);
if (! (ptr_ce_swig_Driver=zend_register_internal_class_ex(&ce_swig_Driver,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class Driver");

/* Define class DataSource */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_DataSource,"datasource",DataSource_functions,NULL,_wrap_propget_DataSource,_wrap_propset_DataSource);
if (! (ptr_ce_swig_DataSource=zend_register_internal_class_ex(&ce_swig_DataSource,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class DataSource");

/* Define class Layer */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_Layer,"layer",Layer_functions,NULL,_wrap_propget_Layer,_wrap_propset_Layer);
if (! (ptr_ce_swig_Layer=zend_register_internal_class_ex(&ce_swig_Layer,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class Layer");

/* Define class Feature */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_Feature,"feature",Feature_functions,NULL,_wrap_propget_Feature,_wrap_propset_Feature);
if (! (ptr_ce_swig_Feature=zend_register_internal_class_ex(&ce_swig_Feature,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class Feature");

/* Define class FeatureDefn */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_FeatureDefn,"featuredefn",FeatureDefn_functions,NULL,_wrap_propget_FeatureDefn,_wrap_propset_FeatureDefn);
if (! (ptr_ce_swig_FeatureDefn=zend_register_internal_class_ex(&ce_swig_FeatureDefn,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class FeatureDefn");

/* Define class FieldDefn */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_FieldDefn,"fielddefn",FieldDefn_functions,NULL,_wrap_propget_FieldDefn,_wrap_propset_FieldDefn);
if (! (ptr_ce_swig_FieldDefn=zend_register_internal_class_ex(&ce_swig_FieldDefn,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class FieldDefn");

/* Define class Geometry */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_Geometry,"geometry",Geometry_functions,NULL,_wrap_propget_Geometry,_wrap_propset_Geometry);
if (! (ptr_ce_swig_Geometry=zend_register_internal_class_ex(&ce_swig_Geometry,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class Geometry");


/* 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_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_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__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_p_OSRSpatialReferenceShadow=zend_register_list_destructors_ex(_wrap_destroy_p_p_OSRSpatialReferenceShadow,NULL,(char *)(SWIGTYPE_p_p_OSRSpatialReferenceShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_p_OSRSpatialReferenceShadow,&le_swig__p_p_OSRSpatialReferenceShadow);
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_p_OGRDataSourceShadow=zend_register_list_destructors_ex(_wrap_destroy_p_p_OGRDataSourceShadow,NULL,(char *)(SWIGTYPE_p_p_OGRDataSourceShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_p_OGRDataSourceShadow,&le_swig__p_p_OGRDataSourceShadow);
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_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_p_OGRFeatureShadow=zend_register_list_destructors_ex(_wrap_destroy_p_p_OGRFeatureShadow,NULL,(char *)(SWIGTYPE_p_p_OGRFeatureShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_p_OGRFeatureShadow,&le_swig__p_p_OGRFeatureShadow);
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_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_p_OGRDriverShadow=zend_register_list_destructors_ex(_wrap_destroy_p_p_OGRDriverShadow,NULL,(char *)(SWIGTYPE_p_p_OGRDriverShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_p_OGRDriverShadow,&le_swig__p_p_OGRDriverShadow);
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_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_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_p_OGRFieldDefnShadow=zend_register_list_destructors_ex(_wrap_destroy_p_p_OGRFieldDefnShadow,NULL,(char *)(SWIGTYPE_p_p_OGRFieldDefnShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_p_OGRFieldDefnShadow,&le_swig__p_p_OGRFieldDefnShadow);
le_swig__p_p_OGRFeatureDefnShadow=zend_register_list_destructors_ex(_wrap_destroy_p_p_OGRFeatureDefnShadow,NULL,(char *)(SWIGTYPE_p_p_OGRFeatureDefnShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_p_OGRFeatureDefnShadow,&le_swig__p_p_OGRFeatureDefnShadow);
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);
le_swig__p_p_OSRCoordinateTransformationShadow=zend_register_list_destructors_ex(_wrap_destroy_p_p_OSRCoordinateTransformationShadow,NULL,(char *)(SWIGTYPE_p_p_OSRCoordinateTransformationShadow->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_p_OSRCoordinateTransformationShadow,&le_swig__p_p_OSRCoordinateTransformationShadow);
CG(active_class_entry) = NULL;
/* end oinit subsection */

    return SUCCESS;
}
PHP_RINIT_FUNCTION(ogr)
{
/* rinit section */

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

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

    return SUCCESS;
}
PHP_MSHUTDOWN_FUNCTION(ogr)
{
/* shutdown section */

    return SUCCESS;
}
PHP_RSHUTDOWN_FUNCTION(ogr)
{
/* rshutdown section */

    return SUCCESS;
}
PHP_MINFO_FUNCTION(ogr)
{
}
/* end init section */
