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

#define SWIGPHP


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

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

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

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

  But only do this if strictly necessary, i.e. if you have problems
  with your compiler or such.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

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

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

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


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

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

   Now you can be more explicit:

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

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

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

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

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

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

       int food(double)
       int fooi(int);

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

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

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

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

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


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

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

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

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

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

#ifdef __cplusplus
}
#endif

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

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

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

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

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

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

#ifdef __cplusplus
}
#endif

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


#define SWIG_fail goto fail

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

  return -1;
}

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

  MAKE_STD_ZVAL(pointer);

  TSRMLS_FETCH();

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

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

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




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

#define SWIGTYPE_double swig_types[0]
#define SWIGTYPE_p_OSRCoordinateTransformationShadow swig_types[1]
#define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[2]
#define SWIGTYPE_p_char swig_types[3]
#define SWIGTYPE_p_double swig_types[4]
#define SWIGTYPE_p_int swig_types[5]
#define SWIGTYPE_p_long swig_types[6]
#define SWIGTYPE_p_p_char swig_types[7]
#define SWIGTYPE_p_p_double swig_types[8]
static swig_type_info *swig_types[10];
static swig_module_info swig_module = {swig_types, 9, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)

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

/* header section */
ZEND_BEGIN_MODULE_GLOBALS(osr)
const char *error_msg;
int error_code;
ZEND_END_MODULE_GLOBALS(osr)
ZEND_DECLARE_MODULE_GLOBALS(osr)
#ifdef ZTS
#define SWIG_ErrorMsg() TSRMG(osr_globals_id, zend_osr_globals *, error_msg )
#define SWIG_ErrorCode() TSRMG(osr_globals_id, zend_osr_globals *, error_code )
#else
#define SWIG_ErrorMsg() (osr_globals.error_msg)
#define SWIG_ErrorCode() (osr_globals.error_code)
#endif

static void osr_init_globals(zend_osr_globals *globals ) {
  globals->error_msg = default_error_msg;
  globals->error_code = default_error_code;
}
static void osr_destroy_globals(zend_osr_globals * globals) { (void)globals; }

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

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

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

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

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

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

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

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


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


#include <stdexcept>


typedef char retStringAndCPLFree;


#include <iostream>
using namespace std;

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

#include "ogr_srs_api.h"

#ifdef DEBUG
typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
typedef struct OGRCoordinateTransformationHS OSRCoordinateTransformationShadow;
typedef struct OGRCoordinateTransformationHS OGRCoordinateTransformationShadow;
#else
typedef void OSRSpatialReferenceShadow;
typedef void OSRCoordinateTransformationShadow;
#endif


OGRErr GetWellKnownGeogCSAsWKT( const char *name, char **argout ) {
  OGRSpatialReferenceH srs = OSRNewSpatialReference("");
  OGRErr rcode = OSRSetWellKnownGeogCS( srs, name );
  if( rcode == OGRERR_NONE )
      rcode = OSRExportToWkt ( srs, argout );  
  OSRDestroySpatialReference( srs );
  return rcode;
}


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

}


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


OGRErr GetUserInputAsWKT( const char *name, char **argout ) {
  OGRSpatialReferenceH srs = OSRNewSpatialReference("");
  OGRErr rcode = OSRSetFromUserInput( srs, name );
  if( rcode == OGRERR_NONE )
      rcode = OSRExportToWkt ( srs, argout );  
  OSRDestroySpatialReference( srs );
  return rcode;
}

SWIGINTERN OSRSpatialReferenceShadow *new_OSRSpatialReferenceShadow(char const *wkt=""){
    return (OSRSpatialReferenceShadow*) OSRNewSpatialReference(wkt);
  }
SWIGINTERN void delete_OSRSpatialReferenceShadow(OSRSpatialReferenceShadow *self){
    if (OSRDereference( self ) == 0 ) {
      OSRDestroySpatialReference( self );
    }
  }
SWIGINTERN char *OSRSpatialReferenceShadow___str__(OSRSpatialReferenceShadow *self){
    char *buf = 0;
    OSRExportToPrettyWkt( self, &buf, 0 );
    return buf;
  }
SWIGINTERN int OSRSpatialReferenceShadow_IsSame(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
    return OSRIsSame( self, rhs );
  }
SWIGINTERN int OSRSpatialReferenceShadow_IsSameGeogCS(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
    return OSRIsSameGeogCS( self, rhs );
  }
SWIGINTERN int OSRSpatialReferenceShadow_IsGeographic(OSRSpatialReferenceShadow *self){
    return OSRIsGeographic(self);
  }
SWIGINTERN int OSRSpatialReferenceShadow_IsProjected(OSRSpatialReferenceShadow *self){
    return OSRIsProjected(self);
  }
SWIGINTERN int OSRSpatialReferenceShadow_IsLocal(OSRSpatialReferenceShadow *self){
    return OSRIsLocal(self);
  }
SWIGINTERN int OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(OSRSpatialReferenceShadow *self){
    return OSREPSGTreatsAsLatLong(self);
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAuthority(OSRSpatialReferenceShadow *self,char const *pszTargetKey,char const *pszAuthority,int nCode){
    return OSRSetAuthority( self, pszTargetKey, pszAuthority, nCode );
  }
SWIGINTERN char const *OSRSpatialReferenceShadow_GetAttrValue(OSRSpatialReferenceShadow *self,char const *name,int child=0){
    return OSRGetAttrValue( self, name, child );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAttrValue(OSRSpatialReferenceShadow *self,char const *name,char const *value){
    return OSRSetAttrValue( self, name, value ); 
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAngularUnits(OSRSpatialReferenceShadow *self,char const *name,double to_radians){
    return OSRSetAngularUnits( self, name, to_radians );
  }
SWIGINTERN double OSRSpatialReferenceShadow_GetAngularUnits(OSRSpatialReferenceShadow *self){
    // Return code ignored.
    return OSRGetAngularUnits( self, 0 );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLinearUnits(OSRSpatialReferenceShadow *self,char const *name,double to_meters){
    return OSRSetLinearUnits( self, name, to_meters );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(OSRSpatialReferenceShadow *self,char const *name,double to_meters){
    return OSRSetLinearUnitsAndUpdateParameters( self, name, to_meters );
  }
SWIGINTERN double OSRSpatialReferenceShadow_GetLinearUnits(OSRSpatialReferenceShadow *self){
    // Return code ignored.
    return OSRGetLinearUnits( self, 0 );
  }
SWIGINTERN char const *OSRSpatialReferenceShadow_GetLinearUnitsName(OSRSpatialReferenceShadow *self){
    const char *name = 0;
    if ( OSRIsProjected( self ) ) {
      name = OSRGetAttrValue( self, "PROJCS|UNIT", 0 );
    }
    else if ( OSRIsLocal( self ) ) {
      name = OSRGetAttrValue( self, "LOCAL_CS|UNIT", 0 );
    }

    if (name != 0) 
      return name;

    return "Meter";
  }
SWIGINTERN char const *OSRSpatialReferenceShadow_GetAuthorityCode(OSRSpatialReferenceShadow *self,char const *target_key){
    return OSRGetAuthorityCode( self, target_key );
  }
SWIGINTERN char const *OSRSpatialReferenceShadow_GetAuthorityName(OSRSpatialReferenceShadow *self,char const *target_key){
    return OSRGetAuthorityName( self, target_key );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetUTM(OSRSpatialReferenceShadow *self,int zone,int north=1){
    return OSRSetUTM( self, zone, north );
  }
SWIGINTERN int OSRSpatialReferenceShadow_GetUTMZone(OSRSpatialReferenceShadow *self){
    // Note: we will return south zones as negative since it is 
    // hard to return two values as the C API does. 
    int bNorth = FALSE;
    int nZone = OSRGetUTMZone( self, &bNorth );
    if( !bNorth )
        nZone = -1 * ABS(nZone);
    return nZone;
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetStatePlane(OSRSpatialReferenceShadow *self,int zone,int is_nad83=1,char const *unitsname="",double units=0.0){
    return OSRSetStatePlaneWithUnits( self, zone, is_nad83, unitsname, units );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_AutoIdentifyEPSG(OSRSpatialReferenceShadow *self){
    return OSRAutoIdentifyEPSG( self );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjection(OSRSpatialReferenceShadow *self,char const *arg){
    return OSRSetProjection( self, arg );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
    return OSRSetProjParm( self, name, val ); 
  }
SWIGINTERN double OSRSpatialReferenceShadow_GetProjParm(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
    // Return code ignored.
    return OSRGetProjParm( self, name, default_val, 0 );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetNormProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
    return OSRSetNormProjParm( self, name, val );
  }
SWIGINTERN double OSRSpatialReferenceShadow_GetNormProjParm(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
    // Return code ignored.
    return OSRGetNormProjParm( self, name, default_val, 0 );
  }
SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMajor(OSRSpatialReferenceShadow *self){
    // Return code ignored.
    return OSRGetSemiMajor( self, 0 );
  }
SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMinor(OSRSpatialReferenceShadow *self){
    // Return code ignored.
    return OSRGetSemiMinor( self, 0 );
  }
SWIGINTERN double OSRSpatialReferenceShadow_GetInvFlattening(OSRSpatialReferenceShadow *self){
    // Return code ignored.
    return OSRGetInvFlattening( self, 0 );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetACEA(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
    return OSRSetACEA( self, stdp1, stdp2, clat, clong, 
                       fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAE(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    return OSRSetAE( self, clat, clong, 
                     fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetBonne(OSRSpatialReferenceShadow *self,double stdp,double cm,double fe,double fn){
    return OSRSetBonne( self, stdp, cm, fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCEA(OSRSpatialReferenceShadow *self,double stdp1,double cm,double fe,double fn){
    return OSRSetCEA( self, stdp1, cm, 
                      fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCS(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    return OSRSetCS( self, clat, clong, 
                     fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEC(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
    return OSRSetEC( self, stdp1, stdp2, clat, clong, 
                     fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEckertIV(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
    return OSRSetEckertIV( self, cm, fe, fn);
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEckertVI(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
    return OSRSetEckertVI( self, cm, fe, fn);
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEquirectangular(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    return OSRSetEquirectangular( self, clat, clong, 
                                  fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEquirectangular2(OSRSpatialReferenceShadow *self,double clat,double clong,double pseudostdparallellat,double fe,double fn){
    return OSRSetEquirectangular2( self, clat, clong,
                                   pseudostdparallellat,
                                   fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(OSRSpatialReferenceShadow *self,double clat,double clong,double sc,double fe,double fn){
    return OSRSetGaussSchreiberTMercator( self, clat, clong, sc, fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGS(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
    return OSRSetGS( self, cm, fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGH(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
    return OSRSetGH( self, cm, fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGEOS(OSRSpatialReferenceShadow *self,double cm,double satelliteheight,double fe,double fn){
    return OSRSetGEOS( self, cm, satelliteheight,
                       fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGnomonic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    return OSRSetGnomonic( self, clat, clong, 
                           fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetHOM(OSRSpatialReferenceShadow *self,double clat,double clong,double azimuth,double recttoskew,double scale,double fe,double fn){
    return OSRSetHOM( self, clat, clong, azimuth, recttoskew,
                      scale, fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetHOM2PNO(OSRSpatialReferenceShadow *self,double clat,double dfLat1,double dfLong1,double dfLat2,double dfLong2,double scale,double fe,double fn){
    return OSRSetHOM2PNO( self, clat, dfLat1, dfLong1, dfLat2, dfLong2, 
                          scale, fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetKrovak(OSRSpatialReferenceShadow *self,double clat,double clong,double azimuth,double pseudostdparallellat,double scale,double fe,double fn){
    return OSRSetKrovak( self, clat, clong, 
                         azimuth, pseudostdparallellat, 
                         scale, fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLAEA(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    return OSRSetLAEA( self, clat, clong, 
                       fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCC(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
    return OSRSetLCC( self, stdp1, stdp2, clat, clong, 
                      fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCC1SP(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
    return OSRSetLCC1SP( self, clat, clong, scale, 
                         fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCCB(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
    return OSRSetLCCB( self, stdp1, stdp2, clat, clong, 
                       fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMC(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    return OSRSetMC( self, clat, clong,    
                     fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMercator(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
    return OSRSetMercator( self, clat, clong, 
                           scale, fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMollweide(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
    return OSRSetMollweide( self, cm, 
                            fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetNZMG(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    return OSRSetNZMG( self, clat, clong, 
                       fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetOS(OSRSpatialReferenceShadow *self,double dfOriginLat,double dfCMeridian,double scale,double fe,double fn){
    return OSRSetOS( self, dfOriginLat, dfCMeridian, scale, 
                     fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetOrthographic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    return OSRSetOrthographic( self, clat, clong, 
                               fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetPolyconic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    return OSRSetPolyconic( self, clat, clong, 
                            fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetPS(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
    return OSRSetPS( self, clat, clong, scale,
                     fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetRobinson(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
    return OSRSetRobinson( self, clong, fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetSinusoidal(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
    return OSRSetSinusoidal( self, clong, fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetStereographic(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
    return OSRSetStereographic( self, clat, clong, scale, 
                                fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetSOC(OSRSpatialReferenceShadow *self,double latitudeoforigin,double cm,double fe,double fn){
    return OSRSetSOC( self, latitudeoforigin, cm,
	              fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTM(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
    return OSRSetTM( self, clat, clong, scale, 
                     fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMVariant(OSRSpatialReferenceShadow *self,char const *pszVariantName,double clat,double clong,double scale,double fe,double fn){
    return OSRSetTMVariant( self, pszVariantName, clat, clong,  
                            scale, fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMG(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    return OSRSetTMG( self, clat, clong, 
                      fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMSO(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
    return OSRSetTMSO( self, clat, clong, scale, 
                       fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVDG(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
    return OSRSetVDG( self, clong, fe, fn );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetWellKnownGeogCS(OSRSpatialReferenceShadow *self,char const *name){
    return OSRSetWellKnownGeogCS( self, name );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetFromUserInput(OSRSpatialReferenceShadow *self,char const *name){
    return OSRSetFromUserInput( self, name );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_CopyGeogCSFrom(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
    return OSRCopyGeogCSFrom( self, rhs );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTOWGS84(OSRSpatialReferenceShadow *self,double p1,double p2,double p3,double p4=0.0,double p5=0.0,double p6=0.0,double p7=0.0){

    return OSRSetTOWGS84( self, p1, p2, p3, p4, p5, p6, p7 );
  }

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

SWIGINTERN OGRErr OSRSpatialReferenceShadow_GetTOWGS84(OSRSpatialReferenceShadow *self,double argout[7]){
    return OSRGetTOWGS84( self, argout, 7 );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLocalCS(OSRSpatialReferenceShadow *self,char const *pszName){
    return OSRSetLocalCS( self, pszName );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGeogCS(OSRSpatialReferenceShadow *self,char const *pszGeogName,char const *pszDatumName,char const *pszEllipsoidName,double dfSemiMajor,double dfInvFlattening,char const *pszPMName="Greenwich",double dfPMOffset=0.0,char const *pszUnits="degree",double dfConvertToRadians=0.0174532925199433){
    return OSRSetGeogCS( self, pszGeogName, pszDatumName, pszEllipsoidName,
                         dfSemiMajor, dfInvFlattening,
                         pszPMName, dfPMOffset, pszUnits, dfConvertToRadians );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjCS(OSRSpatialReferenceShadow *self,char const *name="unnamed"){
    return OSRSetProjCS( self, name );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromWkt(OSRSpatialReferenceShadow *self,char **ppszInput){
    return OSRImportFromWkt( self, ppszInput );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromProj4(OSRSpatialReferenceShadow *self,char *ppszInput){
    return OSRImportFromProj4( self, ppszInput );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromUrl(OSRSpatialReferenceShadow *self,char *url){
    return OSRImportFromUrl( self, url );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromESRI(OSRSpatialReferenceShadow *self,char **ppszInput){
    return OSRImportFromESRI( self, ppszInput );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromEPSG(OSRSpatialReferenceShadow *self,int arg){
    return OSRImportFromEPSG(self, arg);
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromEPSGA(OSRSpatialReferenceShadow *self,int arg){
    return OSRImportFromEPSGA(self, arg);
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromPCI(OSRSpatialReferenceShadow *self,char const *proj,char const *units="METRE",double argin[17]=0){
    return OSRImportFromPCI( self, proj, units, argin );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromUSGS(OSRSpatialReferenceShadow *self,long proj_code,long zone=0,double argin[15]=0,long datum_code=0){
    return OSRImportFromUSGS( self, proj_code, zone, argin, datum_code );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromXML(OSRSpatialReferenceShadow *self,char const *xmlString){
    return OSRImportFromXML( self, xmlString );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromERM(OSRSpatialReferenceShadow *self,char const *proj,char const *datum,char const *units){
    return OSRImportFromERM( self, proj, datum, units );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromMICoordSys(OSRSpatialReferenceShadow *self,char const *pszCoordSys){
    return OSRImportFromMICoordSys( self, pszCoordSys );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToWkt(OSRSpatialReferenceShadow *self,char **argout){
    return OSRExportToWkt( self, argout );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPrettyWkt(OSRSpatialReferenceShadow *self,char **argout,int simplify=0){
    return OSRExportToPrettyWkt( self, argout, simplify );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToProj4(OSRSpatialReferenceShadow *self,char **argout){
    return OSRExportToProj4( self, argout );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPCI(OSRSpatialReferenceShadow *self,char **proj,char **units,double *parms[17]){
    return OSRExportToPCI( self, proj, units, parms );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToUSGS(OSRSpatialReferenceShadow *self,long *code,long *zone,double *parms[15],long *datum){
    return OSRExportToUSGS( self, code, zone, parms, datum );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToXML(OSRSpatialReferenceShadow *self,char **argout,char const *dialect=""){
    return OSRExportToXML( self, argout, dialect );
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToMICoordSys(OSRSpatialReferenceShadow *self,char **argout){
    return OSRExportToMICoordSys( self, argout );
  }
SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_CloneGeogCS(OSRSpatialReferenceShadow *self){
    return (OSRSpatialReferenceShadow*) OSRCloneGeogCS(self);
  }
SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_Clone(OSRSpatialReferenceShadow *self){
    return (OSRSpatialReferenceShadow*) OSRClone(self);
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_Validate(OSRSpatialReferenceShadow *self){
    return OSRValidate(self);
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_StripCTParms(OSRSpatialReferenceShadow *self){
    return OSRStripCTParms(self);
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_FixupOrdering(OSRSpatialReferenceShadow *self){
    return OSRFixupOrdering(self);
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_Fixup(OSRSpatialReferenceShadow *self){
    return OSRFixup(self);
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphToESRI(OSRSpatialReferenceShadow *self){
    return OSRMorphToESRI(self);
  }
SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphFromESRI(OSRSpatialReferenceShadow *self){
    return OSRMorphFromESRI(self);
  }
SWIGINTERN OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst){
    OSRCoordinateTransformationShadow *obj = (OSRCoordinateTransformationShadow*) OCTNewCoordinateTransformation( src, dst );
    return obj;
  }
SWIGINTERN void delete_OSRCoordinateTransformationShadow(OSRCoordinateTransformationShadow *self){
    OCTDestroyCoordinateTransformation( self );
  }
SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(OSRCoordinateTransformationShadow *self,double inout[3]){
    OCTTransform( self, 1, &inout[0], &inout[1], &inout[2] );
  }
SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(OSRCoordinateTransformationShadow *self,double argout[3],double x,double y,double z=0.0){
    argout[0] = x;
    argout[1] = y;
    argout[2] = z;
    OCTTransform( self, 1, &argout[0], &argout[1], &argout[2] );
  }
SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoints(OSRCoordinateTransformationShadow *self,int nCount,double *x,double *y,double *z){
    OCTTransform( self, nCount, x, y, z );
  }

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

static swig_type_info _swigt__double = {"_double", "double", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "int *|OGRErr *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_long = {"_p_long", "long *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__double,
  &_swigt__p_OSRCoordinateTransformationShadow,
  &_swigt__p_OSRSpatialReferenceShadow,
  &_swigt__p_char,
  &_swigt__p_double,
  &_swigt__p_int,
  &_swigt__p_long,
  &_swigt__p_p_char,
  &_swigt__p_p_double,
};

static swig_cast_info _swigc__double[] = {  {&_swigt__double, 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_long[] = {  {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_double[] = {  {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__double,
  _swigc__p_OSRCoordinateTransformationShadow,
  _swigc__p_OSRSpatialReferenceShadow,
  _swigc__p_char,
  _swigc__p_double,
  _swigc__p_int,
  _swigc__p_long,
  _swigc__p_p_char,
  _swigc__p_p_double,
};


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

/* end header section */
/* vdecl subsection */
static int le_swig__p_char=0; /* handle for _p_char */
static int le_swig__double=0; /* handle for _double */
static int le_swig__p_p_char=0; /* handle for _p_p_char */
static int le_swig__p_double=0; /* handle for _p_double */
static int le_swig__p_p_double=0; /* handle for _p_p_double */
static int le_swig__p_long=0; /* handle for _p_long */
static int le_swig__p_OSRCoordinateTransformationShadow=0; /* handle for CoordinateTransformation */
static int le_swig__p_int=0; /* handle for _p_int */
static int le_swig__p_OSRSpatialReferenceShadow=0; /* handle for SpatialReference */
/* end vdecl subsection */
/* wrapper section */
ZEND_NAMED_FUNCTION(_wrap_GetWellKnownGeogCSAsWKT) {
  char *arg1 = (char *) 0 ;
  char **arg2 = (char **) 0 ;
  char *argout2 = 0 ;
  zval **args[1];
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (char **argout2) */
    arg2 = &argout2;
  }
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[0])->type==IS_NULL) {
    arg1 = (char *) 0;
  } else {
    convert_to_string_ex(args[0]);
    arg1 = (char *) Z_STRVAL_PP(args[0]);
  }
  /*@SWIG@*/;
  
  {
    if (!arg1) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRErr)GetWellKnownGeogCSAsWKT((char const *)arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(argout) (char **argout) */
    zval *t;
    MAKE_STD_ZVAL(t);
    if ( arg2 ) {
      ZVAL_STRING(t,*arg2,strlen(*arg2));
    }
    else {
      ZVAL_NULL(t);
    }
    t_output_helper(&return_value, t);
  }
  {
    /* %typemap(freearg) (char **argout) */
    if ( *arg2 )
    CPLFree( *arg2 );
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  {
    /* %typemap(freearg) (char **argout) */
    if ( *arg2 )
    CPLFree( *arg2 );
  }
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_GetUserInputAsWKT) {
  char *arg1 = (char *) 0 ;
  char **arg2 = (char **) 0 ;
  char *argout2 = 0 ;
  zval **args[1];
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (char **argout2) */
    arg2 = &argout2;
  }
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[0])->type==IS_NULL) {
    arg1 = (char *) 0;
  } else {
    convert_to_string_ex(args[0]);
    arg1 = (char *) Z_STRVAL_PP(args[0]);
  }
  /*@SWIG@*/;
  
  {
    if (!arg1) {
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
    }
  }
  result = (OGRErr)GetUserInputAsWKT((char const *)arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(argout) (char **argout) */
    zval *t;
    MAKE_STD_ZVAL(t);
    if ( arg2 ) {
      ZVAL_STRING(t,*arg2,strlen(*arg2));
    }
    else {
      ZVAL_NULL(t);
    }
    t_output_helper(&return_value, t);
  }
  {
    /* %typemap(freearg) (char **argout) */
    if ( *arg2 )
    CPLFree( *arg2 );
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  {
    /* %typemap(freearg) (char **argout) */
    if ( *arg2 )
    CPLFree( *arg2 );
  }
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_GetProjectionMethods) {
  char **result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 0) {
    WRONG_PARAM_COUNT;
  }
  
  result = (char **)OPTGetProjectionMethods();
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_p_char, 0);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


ZEND_NAMED_FUNCTION(_wrap_GetProjectionMethodParamInfo) {
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  char **arg3 = (char **) 0 ;
  char **arg4 = (char **) 0 ;
  double *arg5 = (double *) 0 ;
  zval **args[5];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 5 || zend_get_parameters_array_ex(5, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[0])->type==IS_NULL) {
    arg1 = (char *) 0;
  } else {
    convert_to_string_ex(args[0]);
    arg1 = (char *) Z_STRVAL_PP(args[0]);
  }
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  {
    if(SWIG_ConvertPtr(*args[2], (void **) &arg3, SWIGTYPE_p_p_char, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 3 of GetProjectionMethodParamInfo. Expected SWIGTYPE_p_p_char");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[3], (void **) &arg4, SWIGTYPE_p_p_char, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 4 of GetProjectionMethodParamInfo. Expected SWIGTYPE_p_p_char");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[4], (void **) &arg5, SWIGTYPE_p_double, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 5 of GetProjectionMethodParamInfo. Expected SWIGTYPE_p_double");
    }
  }
  OPTGetParameterInfo(arg1,arg2,arg3,arg4,arg5);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_SpatialReference(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 ;
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (OSRSpatialReferenceShadow *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_OSRSpatialReferenceShadow TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "OSRSpatialReferenceShadow resource already free'd");
  delete_OSRSpatialReferenceShadow(arg1);
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetStatePlane) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  int arg2 ;
  int arg3 = (int) 1 ;
  char *arg4 = (char *) "" ;
  double arg5 = (double) 0.0 ;
  zval **args[5];
  int arg_count;
  OGRErr result;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<2 || arg_count>5 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetStatePlane. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (int) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  if(arg_count > 2) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[2]);
    arg3 = (int) Z_LVAL_PP(args[2]);
    /*@SWIG@*/;
    
  }
  if(arg_count > 3) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
    if ((*args[3])->type==IS_NULL) {
      arg4 = (char *) 0;
    } else {
      convert_to_string_ex(args[3]);
      arg4 = (char *) Z_STRVAL_PP(args[3]);
    }
    /*@SWIG@*/;
    
  }
  if(arg_count > 4) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
    convert_to_double_ex(args[4]);
    arg5 = (double) Z_DVAL_PP(args[4]);
    /*@SWIG@*/;
    
  }
  result = (OGRErr)OSRSpatialReferenceShadow_SetStatePlane(arg1,arg2,arg3,(char const *)arg4,arg5);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


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


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


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


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


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


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


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


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


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetACEA) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  zval **args[7];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 7 || zend_get_parameters_array_ex(7, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetACEA. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[6]);
  arg7 = (double) Z_DVAL_PP(args[6]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetACEA(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


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


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


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


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetEC) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  zval **args[7];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 7 || zend_get_parameters_array_ex(7, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetEC. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[6]);
  arg7 = (double) Z_DVAL_PP(args[6]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetEC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetEckertIV) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  zval **args[4];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetEckertIV. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetEckertIV(arg1,arg2,arg3,arg4);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetEckertVI) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  zval **args[4];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetEckertVI. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetEckertVI(arg1,arg2,arg3,arg4);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetEquirectangular2) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  zval **args[6];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetEquirectangular2. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular2(arg1,arg2,arg3,arg4,arg5,arg6);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetGaussSchreiberTMercator) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  zval **args[6];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetGaussSchreiberTMercator. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(arg1,arg2,arg3,arg4,arg5,arg6);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetGS) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  zval **args[4];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetGS. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetGS(arg1,arg2,arg3,arg4);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetGH) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  zval **args[4];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetGH. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetGH(arg1,arg2,arg3,arg4);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


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


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetHOM) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  double arg8 ;
  zval **args[8];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 8 || zend_get_parameters_array_ex(8, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetHOM. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[6]);
  arg7 = (double) Z_DVAL_PP(args[6]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[7]);
  arg8 = (double) Z_DVAL_PP(args[7]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetHOM(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetHOM2PNO) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  double arg8 ;
  double arg9 ;
  zval **args[9];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 9 || zend_get_parameters_array_ex(9, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetHOM2PNO. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[6]);
  arg7 = (double) Z_DVAL_PP(args[6]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[7]);
  arg8 = (double) Z_DVAL_PP(args[7]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[8]);
  arg9 = (double) Z_DVAL_PP(args[8]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetHOM2PNO(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetKrovak) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  double arg8 ;
  zval **args[8];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 8 || zend_get_parameters_array_ex(8, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetKrovak. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[6]);
  arg7 = (double) Z_DVAL_PP(args[6]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[7]);
  arg8 = (double) Z_DVAL_PP(args[7]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetKrovak(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetLCC) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  zval **args[7];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 7 || zend_get_parameters_array_ex(7, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetLCC. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[6]);
  arg7 = (double) Z_DVAL_PP(args[6]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetLCC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetLCC1SP) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  zval **args[6];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetLCC1SP. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetLCC1SP(arg1,arg2,arg3,arg4,arg5,arg6);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetLCCB) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  zval **args[7];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 7 || zend_get_parameters_array_ex(7, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetLCCB. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[6]);
  arg7 = (double) Z_DVAL_PP(args[6]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetLCCB(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetMercator) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  zval **args[6];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetMercator. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetMercator(arg1,arg2,arg3,arg4,arg5,arg6);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetMollweide) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  zval **args[4];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetMollweide. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetMollweide(arg1,arg2,arg3,arg4);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetOS) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  zval **args[6];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetOS. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetOS(arg1,arg2,arg3,arg4,arg5,arg6);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


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


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetPS) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  zval **args[6];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetPS. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetPS(arg1,arg2,arg3,arg4,arg5,arg6);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetRobinson) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  zval **args[4];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetRobinson. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetRobinson(arg1,arg2,arg3,arg4);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetSinusoidal) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  zval **args[4];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetSinusoidal. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetSinusoidal(arg1,arg2,arg3,arg4);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetStereographic) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  zval **args[6];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetStereographic. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetStereographic(arg1,arg2,arg3,arg4,arg5,arg6);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetTM) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  zval **args[6];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetTM. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetTM(arg1,arg2,arg3,arg4,arg5,arg6);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetTMVariant) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  zval **args[7];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 7 || zend_get_parameters_array_ex(7, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetTMVariant. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[6]);
  arg7 = (double) Z_DVAL_PP(args[6]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetTMVariant(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetTMSO) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  zval **args[6];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 6 || zend_get_parameters_array_ex(6, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetTMSO. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetTMSO(arg1,arg2,arg3,arg4,arg5,arg6);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetVDG) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  zval **args[4];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 4 || zend_get_parameters_array_ex(4, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetVDG. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  result = (OGRErr)OSRSpatialReferenceShadow_SetVDG(arg1,arg2,arg3,arg4);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


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


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


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetTOWGS84) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 = (double) 0.0 ;
  double arg6 = (double) 0.0 ;
  double arg7 = (double) 0.0 ;
  double arg8 = (double) 0.0 ;
  zval **args[8];
  int arg_count;
  OGRErr result;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<4 || arg_count>8 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetTOWGS84. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg2 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg3 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[3]);
  arg4 = (double) Z_DVAL_PP(args[3]);
  /*@SWIG@*/;
  
  if(arg_count > 4) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
    convert_to_double_ex(args[4]);
    arg5 = (double) Z_DVAL_PP(args[4]);
    /*@SWIG@*/;
    
  }
  if(arg_count > 5) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
    convert_to_double_ex(args[5]);
    arg6 = (double) Z_DVAL_PP(args[5]);
    /*@SWIG@*/;
    
  }
  if(arg_count > 6) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
    convert_to_double_ex(args[6]);
    arg7 = (double) Z_DVAL_PP(args[6]);
    /*@SWIG@*/;
    
  }
  if(arg_count > 7) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
    convert_to_double_ex(args[7]);
    arg8 = (double) Z_DVAL_PP(args[7]);
    /*@SWIG@*/;
    
  }
  result = (OGRErr)OSRSpatialReferenceShadow_SetTOWGS84(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_GetTOWGS84) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  double *arg2 ;
  double argout2[7] ;
  zval **args[1];
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (double argout2[ANY]) */
    arg2 = argout2;
  }
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_GetTOWGS84. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRErr)OSRSpatialReferenceShadow_GetTOWGS84(arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(argout) (double argout[ANY]) */
    zval *t = CreateTupleFromDoubleArray( arg2, 7 );
    t_output_helper( &return_value, t );
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_SetGeogCS) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  double arg5 ;
  double arg6 ;
  char *arg7 = (char *) "Greenwich" ;
  double arg8 = (double) 0.0 ;
  char *arg9 = (char *) "degree" ;
  double arg10 = (double) 0.0174532925199433 ;
  zval **args[10];
  int arg_count;
  OGRErr result;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<6 || arg_count>10 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_SetGeogCS. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[2])->type==IS_NULL) {
    arg3 = (char *) 0;
  } else {
    convert_to_string_ex(args[2]);
    arg3 = (char *) Z_STRVAL_PP(args[2]);
  }
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[3])->type==IS_NULL) {
    arg4 = (char *) 0;
  } else {
    convert_to_string_ex(args[3]);
    arg4 = (char *) Z_STRVAL_PP(args[3]);
  }
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[4]);
  arg5 = (double) Z_DVAL_PP(args[4]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[5]);
  arg6 = (double) Z_DVAL_PP(args[5]);
  /*@SWIG@*/;
  
  if(arg_count > 6) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
    if ((*args[6])->type==IS_NULL) {
      arg7 = (char *) 0;
    } else {
      convert_to_string_ex(args[6]);
      arg7 = (char *) Z_STRVAL_PP(args[6]);
    }
    /*@SWIG@*/;
    
  }
  if(arg_count > 7) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
    convert_to_double_ex(args[7]);
    arg8 = (double) Z_DVAL_PP(args[7]);
    /*@SWIG@*/;
    
  }
  if(arg_count > 8) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
    if ((*args[8])->type==IS_NULL) {
      arg9 = (char *) 0;
    } else {
      convert_to_string_ex(args[8]);
      arg9 = (char *) Z_STRVAL_PP(args[8]);
    }
    /*@SWIG@*/;
    
  }
  if(arg_count > 9) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
    convert_to_double_ex(args[9]);
    arg10 = (double) Z_DVAL_PP(args[9]);
    /*@SWIG@*/;
    
  }
  result = (OGRErr)OSRSpatialReferenceShadow_SetGeogCS(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,(char const *)arg7,arg8,(char const *)arg9,arg10);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_ImportFromWkt) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  char *val2 ;
  zval **args[2];
  OGRErr result;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_ImportFromWkt. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    /* %typemap(in) (char **ignorechange) */
    convert_to_string_ex( args[1] );
    arg2 = NULL;
  }
  result = (OGRErr)OSRSpatialReferenceShadow_ImportFromWkt(arg1,arg2);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


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


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


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


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


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_ImportFromPCI) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) "METRE" ;
  double *arg4 = (double *) (double *)0 ;
  double argin4[17] ;
  zval **args[4];
  int arg_count;
  OGRErr result;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<2 || arg_count>4 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_ImportFromPCI. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
  if ((*args[1])->type==IS_NULL) {
    arg2 = (char *) 0;
  } else {
    convert_to_string_ex(args[1]);
    arg2 = (char *) Z_STRVAL_PP(args[1]);
  }
  /*@SWIG@*/;
  
  if(arg_count > 2) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
    if ((*args[2])->type==IS_NULL) {
      arg3 = (char *) 0;
    } else {
      convert_to_string_ex(args[2]);
      arg3 = (char *) Z_STRVAL_PP(args[2]);
    }
    /*@SWIG@*/;
    
  }
  if(arg_count > 3) {
    {
      /* %typemap(in) (double argin4[ANY]) */
      arg4 = argin4;
      for (unsigned int i=0; i<17; i++) {
        double val = 0.0; /* extract val from i-th position of args[3] */
        arg4[i] =  val;
      }
    }
  }
  result = (OGRErr)OSRSpatialReferenceShadow_ImportFromPCI(arg1,(char const *)arg2,(char const *)arg3,arg4);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_ImportFromUSGS) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  long arg2 ;
  long arg3 = (long) 0 ;
  double *arg4 = (double *) (double *)0 ;
  long arg5 = (long) 0 ;
  double argin4[15] ;
  zval **args[5];
  int arg_count;
  OGRErr result;
  
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<2 || arg_count>5 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_ImportFromUSGS. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
  convert_to_long_ex(args[1]);
  arg2 = (long) Z_LVAL_PP(args[1]);
  /*@SWIG@*/;
  
  if(arg_count > 2) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[2]);
    arg3 = (long) Z_LVAL_PP(args[2]);
    /*@SWIG@*/;
    
  }
  if(arg_count > 3) {
    {
      /* %typemap(in) (double argin4[ANY]) */
      arg4 = argin4;
      for (unsigned int i=0; i<15; i++) {
        double val = 0.0; /* extract val from i-th position of args[3] */
        arg4[i] =  val;
      }
    }
  }
  if(arg_count > 4) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[4]);
    arg5 = (long) Z_LVAL_PP(args[4]);
    /*@SWIG@*/;
    
  }
  result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUSGS(arg1,arg2,arg3,arg4,arg5);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


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


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


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


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_ExportToPrettyWkt) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  int arg3 = (int) 0 ;
  char *argout2 = 0 ;
  zval **args[2];
  int arg_count;
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (char **argout2) */
    arg2 = &argout2;
  }
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_ExportToPrettyWkt. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,7,CONVERT_INT_IN@*/
    convert_to_long_ex(args[1]);
    arg3 = (int) Z_LVAL_PP(args[1]);
    /*@SWIG@*/;
    
  }
  result = (OGRErr)OSRSpatialReferenceShadow_ExportToPrettyWkt(arg1,arg2,arg3);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(argout) (char **argout) */
    zval *t;
    MAKE_STD_ZVAL(t);
    if ( arg2 ) {
      ZVAL_STRING(t,*arg2,strlen(*arg2));
    }
    else {
      ZVAL_NULL(t);
    }
    t_output_helper(&return_value, t);
  }
  {
    /* %typemap(freearg) (char **argout) */
    if ( *arg2 )
    CPLFree( *arg2 );
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  {
    /* %typemap(freearg) (char **argout) */
    if ( *arg2 )
    CPLFree( *arg2 );
  }
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


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


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_ExportToUSGS) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  long *arg2 = (long *) 0 ;
  long *arg3 = (long *) 0 ;
  double **arg4 ;
  long *arg5 = (long *) 0 ;
  long temp2 ;
  long temp3 ;
  double *argout4 ;
  long temp5 ;
  zval **args[1];
  OGRErr result;
  
  arg2 = &temp2;
  arg3 = &temp3;
  {
    /* %typemap(in,numinputs=0) (double *argout4[ANY]) */
    arg4 = &argout4;
  }
  arg5 = &temp5;
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 1 || zend_get_parameters_array_ex(1, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_ExportToUSGS. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  result = (OGRErr)OSRSpatialReferenceShadow_ExportToUSGS(arg1,arg2,arg3,arg4,arg5);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    zval *o;
    MAKE_STD_ZVAL(o);
    ZVAL_LONG(o,temp2);
    t_output_helper( &return_value, o );
  }
  {
    zval *o;
    MAKE_STD_ZVAL(o);
    ZVAL_LONG(o,temp3);
    t_output_helper( &return_value, o );
  }
  {
    /* %typemap(argout) (double *argout[ANY]) */
    zval *t = CreateTupleFromDoubleArray( *arg4, 15 );
    t_output_helper( &return_value, t);
  }
  {
    zval *o;
    MAKE_STD_ZVAL(o);
    ZVAL_LONG(o,temp5);
    t_output_helper( &return_value, o );
  }
  {
    /* %typemap(freearg) (double *argout[ANY]) */
    CPLFree(*arg4);
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  {
    /* %typemap(freearg) (double *argout[ANY]) */
    CPLFree(*arg4);
  }
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_SpatialReference_ExportToXML) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  char *arg3 = (char *) "" ;
  char *argout2 = 0 ;
  zval **args[2];
  int arg_count;
  OGRErr result;
  
  {
    /* %typemap(in,numinputs=0) (char **argout2) */
    arg2 = &argout2;
  }
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<1 || arg_count>2 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of SpatialReference_ExportToXML. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  if(arg_count > 1) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,26,CONVERT_STRING_IN@*/
    if ((*args[1])->type==IS_NULL) {
      arg3 = (char *) 0;
    } else {
      convert_to_string_ex(args[1]);
      arg3 = (char *) Z_STRVAL_PP(args[1]);
    }
    /*@SWIG@*/;
    
  }
  result = (OGRErr)OSRSpatialReferenceShadow_ExportToXML(arg1,arg2,(char const *)arg3);
  {
    /* %typemap(out) OGRErr */
    if (result != 0 ) {
      SWIG_PHP_Error(E_ERROR,OGRErrMessages(result));
    }
  }
  {
    /* %typemap(argout) (char **argout) */
    zval *t;
    MAKE_STD_ZVAL(t);
    if ( arg2 ) {
      ZVAL_STRING(t,*arg2,strlen(*arg2));
    }
    else {
      ZVAL_NULL(t);
    }
    t_output_helper(&return_value, t);
  }
  {
    /* %typemap(freearg) (char **argout) */
    if ( *arg2 )
    CPLFree( *arg2 );
  }
  {
    /* %typemap(ret) OGRErr */
    RETVAL_LONG(0);
  }
  return;
fail:
  {
    /* %typemap(freearg) (char **argout) */
    if ( *arg2 )
    CPLFree( *arg2 );
  }
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


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


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


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


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


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


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


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


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


ZEND_NAMED_FUNCTION(_wrap_new_CoordinateTransformation) {
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
  zval **args[2];
  OSRCoordinateTransformationShadow *result = 0 ;
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of new_CoordinateTransformation. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  {
    if(SWIG_ConvertPtr(*args[1], (void **) &arg2, SWIGTYPE_p_OSRSpatialReferenceShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 2 of new_CoordinateTransformation. Expected SWIGTYPE_p_OSRSpatialReferenceShadow");
    }
  }
  result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow(arg1,arg2);
  
  SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_OSRCoordinateTransformationShadow, 1);
  
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


/* This function is designed to be called by the zend list destructors */
/* to typecast and do the actual destruction */
static void __wrap_delete_CoordinateTransformation(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 ;
  OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
  
  efree(value);
  if (! newobject) return; /* can't delete it! */
  arg1 = (OSRCoordinateTransformationShadow *)SWIG_ZTS_ConvertResourceData(ptr,type_name,SWIGTYPE_p_OSRCoordinateTransformationShadow TSRMLS_CC);
  if (! arg1) zend_error(E_ERROR, "OSRCoordinateTransformationShadow resource already free'd");
  delete_OSRCoordinateTransformationShadow(arg1);
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_CoordinateTransformation_TransformPoint__SWIG_0) {
  OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
  double *arg2 ;
  double argin2[3] ;
  zval **args[2];
  
  SWIG_ResetError();
  if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
    WRONG_PARAM_COUNT;
  }
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of CoordinateTransformation_TransformPoint. Expected SWIGTYPE_p_OSRCoordinateTransformationShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  {
    /* %typemap(in) (double argin2[ANY]) */
    arg2 = argin2;
    for (unsigned int i=0; i<3; i++) {
      double val = 0.0; /* extract val from i-th position of args[1] */
      arg2[i] =  val;
    }
  }
  OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(arg1,arg2);
  
  {
    /* %typemap(argout) (double argout[ANY]) */
    zval *t = CreateTupleFromDoubleArray( arg2, 3 );
    t_output_helper( &return_value, t );
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_CoordinateTransformation_TransformPoint__SWIG_1) {
  OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
  double *arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 = (double) 0.0 ;
  double argout2[3] ;
  zval **args[4];
  int arg_count;
  
  {
    /* %typemap(in,numinputs=0) (double argout2[ANY]) */
    arg2 = argout2;
  }
  SWIG_ResetError();
  arg_count = ZEND_NUM_ARGS();
  if(arg_count<3 || arg_count>4 ||
    zend_get_parameters_array_ex(arg_count,args)!=SUCCESS)
  WRONG_PARAM_COUNT;
  
  {
    if(SWIG_ConvertPtr(*args[0], (void **) &arg1, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0) < 0) {
      SWIG_PHP_Error(E_ERROR, "Type error in argument 1 of CoordinateTransformation_TransformPoint. Expected SWIGTYPE_p_OSRCoordinateTransformationShadow");
    }
  }
  if(!arg1) SWIG_PHP_Error(E_ERROR, "this pointer is NULL");
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[1]);
  arg3 = (double) Z_DVAL_PP(args[1]);
  /*@SWIG@*/;
  
  
  /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
  convert_to_double_ex(args[2]);
  arg4 = (double) Z_DVAL_PP(args[2]);
  /*@SWIG@*/;
  
  if(arg_count > 3) {
    /*@SWIG:/usr/share/swig1.3/php/utils.i,16,CONVERT_FLOAT_IN@*/
    convert_to_double_ex(args[3]);
    arg5 = (double) Z_DVAL_PP(args[3]);
    /*@SWIG@*/;
    
  }
  OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5);
  
  {
    /* %typemap(argout) (double argout[ANY]) */
    zval *t = CreateTupleFromDoubleArray( arg2, 3 );
    t_output_helper( &return_value, t );
  }
  return;
fail:
  zend_error_noreturn(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


ZEND_NAMED_FUNCTION(_wrap_CoordinateTransformation_TransformPoint) {
  int argc;
  zval **argv[4];
  
  argc = ZEND_NUM_ARGS();
  zend_get_parameters_array_ex(argc,argv);
  if (argc == 2) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0) >= 0);
    }
    if (_v) {
      {
        void *tmp;
        _v = (SWIG_ConvertPtr(*argv[1], (void**)&tmp, SWIGTYPE_p_double, 0) >= 0);
      }
      if (_v) {
        return _wrap_CoordinateTransformation_TransformPoint__SWIG_0(INTERNAL_FUNCTION_PARAM_PASSTHRU);
      }
    }
  }
  if ((argc >= 3) && (argc <= 4)) {
    int _v;
    {
      void *tmp;
      _v = (SWIG_ConvertPtr(*argv[0], (void**)&tmp, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0) >= 0);
    }
    if (_v) {
      _v = (Z_TYPE_PP(argv[1]) == IS_DOUBLE); 
      if (_v) {
        _v = (Z_TYPE_PP(argv[2]) == IS_DOUBLE); 
        if (_v) {
          if (argc <= 3) {
            return _wrap_CoordinateTransformation_TransformPoint__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
          }
          _v = (Z_TYPE_PP(argv[3]) == IS_DOUBLE); 
          if (_v) {
            return _wrap_CoordinateTransformation_TransformPoint__SWIG_1(INTERNAL_FUNCTION_PARAM_PASSTHRU);
          }
        }
      }
    }
  }
  
  SWIG_ErrorCode() = E_ERROR;
  SWIG_ErrorMsg() = "No matching function for overloaded 'CoordinateTransformation_TransformPoint'";
  zend_error(SWIG_ErrorCode(),"%s",SWIG_ErrorMsg());
}


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


static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_char) {
  /* No destructor for simple type _p_char */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_double) {
  /* No destructor for simple type _double */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_char) {
  /* No destructor for simple type _p_p_char */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_double) {
  /* No destructor for simple type _p_double */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_p_double) {
  /* No destructor for simple type _p_p_double */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_long) {
  /* No destructor for simple type _p_long */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OSRCoordinateTransformationShadow) {
  __wrap_delete_CoordinateTransformation(rsrc, SWIGTYPE_p_OSRCoordinateTransformationShadow->name TSRMLS_CC);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_int) {
  /* No destructor for simple type _p_int */
  efree(rsrc->ptr);
}
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_OSRSpatialReferenceShadow) {
  __wrap_delete_SpatialReference(rsrc, SWIGTYPE_p_OSRSpatialReferenceShadow->name TSRMLS_CC);
}
/* end wrapper section */
/* class entry subsection */


/* entry subsection */
/* Every non-class user visible function must have an entry here */
static zend_function_entry osr_functions[] = {
 SWIG_ZEND_NAMED_FE(getwellknowngeogcsaswkt,_wrap_GetWellKnownGeogCSAsWKT,NULL)
 SWIG_ZEND_NAMED_FE(getuserinputaswkt,_wrap_GetUserInputAsWKT,NULL)
 SWIG_ZEND_NAMED_FE(getprojectionmethods,_wrap_GetProjectionMethods,NULL)
 SWIG_ZEND_NAMED_FE(getprojectionmethodparameterlist,_wrap_GetProjectionMethodParameterList,NULL)
 SWIG_ZEND_NAMED_FE(getprojectionmethodparaminfo,_wrap_GetProjectionMethodParamInfo,NULL)
 SWIG_ZEND_NAMED_FE(new_spatialreference,_wrap_new_SpatialReference,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference___str__,_wrap_SpatialReference___str__,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_issame,_wrap_SpatialReference_IsSame,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_issamegeogcs,_wrap_SpatialReference_IsSameGeogCS,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_isgeographic,_wrap_SpatialReference_IsGeographic,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_isprojected,_wrap_SpatialReference_IsProjected,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_islocal,_wrap_SpatialReference_IsLocal,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_epsgtreatsaslatlong,_wrap_SpatialReference_EPSGTreatsAsLatLong,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setauthority,_wrap_SpatialReference_SetAuthority,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_getattrvalue,_wrap_SpatialReference_GetAttrValue,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setattrvalue,_wrap_SpatialReference_SetAttrValue,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setangularunits,_wrap_SpatialReference_SetAngularUnits,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_getangularunits,_wrap_SpatialReference_GetAngularUnits,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setlinearunits,_wrap_SpatialReference_SetLinearUnits,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setlinearunitsandupdateparameters,_wrap_SpatialReference_SetLinearUnitsAndUpdateParameters,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_getlinearunits,_wrap_SpatialReference_GetLinearUnits,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_getlinearunitsname,_wrap_SpatialReference_GetLinearUnitsName,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_getauthoritycode,_wrap_SpatialReference_GetAuthorityCode,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_getauthorityname,_wrap_SpatialReference_GetAuthorityName,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setutm,_wrap_SpatialReference_SetUTM,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_getutmzone,_wrap_SpatialReference_GetUTMZone,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setstateplane,_wrap_SpatialReference_SetStatePlane,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_autoidentifyepsg,_wrap_SpatialReference_AutoIdentifyEPSG,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setprojection,_wrap_SpatialReference_SetProjection,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setprojparm,_wrap_SpatialReference_SetProjParm,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_getprojparm,_wrap_SpatialReference_GetProjParm,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setnormprojparm,_wrap_SpatialReference_SetNormProjParm,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_getnormprojparm,_wrap_SpatialReference_GetNormProjParm,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_getsemimajor,_wrap_SpatialReference_GetSemiMajor,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_getsemiminor,_wrap_SpatialReference_GetSemiMinor,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_getinvflattening,_wrap_SpatialReference_GetInvFlattening,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setacea,_wrap_SpatialReference_SetACEA,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setae,_wrap_SpatialReference_SetAE,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setbonne,_wrap_SpatialReference_SetBonne,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setcea,_wrap_SpatialReference_SetCEA,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setcs,_wrap_SpatialReference_SetCS,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setec,_wrap_SpatialReference_SetEC,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_seteckertiv,_wrap_SpatialReference_SetEckertIV,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_seteckertvi,_wrap_SpatialReference_SetEckertVI,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setequirectangular,_wrap_SpatialReference_SetEquirectangular,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setequirectangular2,_wrap_SpatialReference_SetEquirectangular2,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setgaussschreibertmercator,_wrap_SpatialReference_SetGaussSchreiberTMercator,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setgs,_wrap_SpatialReference_SetGS,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setgh,_wrap_SpatialReference_SetGH,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setgeos,_wrap_SpatialReference_SetGEOS,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setgnomonic,_wrap_SpatialReference_SetGnomonic,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_sethom,_wrap_SpatialReference_SetHOM,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_sethom2pno,_wrap_SpatialReference_SetHOM2PNO,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setkrovak,_wrap_SpatialReference_SetKrovak,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setlaea,_wrap_SpatialReference_SetLAEA,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setlcc,_wrap_SpatialReference_SetLCC,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setlcc1sp,_wrap_SpatialReference_SetLCC1SP,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setlccb,_wrap_SpatialReference_SetLCCB,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setmc,_wrap_SpatialReference_SetMC,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setmercator,_wrap_SpatialReference_SetMercator,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setmollweide,_wrap_SpatialReference_SetMollweide,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setnzmg,_wrap_SpatialReference_SetNZMG,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setos,_wrap_SpatialReference_SetOS,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setorthographic,_wrap_SpatialReference_SetOrthographic,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setpolyconic,_wrap_SpatialReference_SetPolyconic,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setps,_wrap_SpatialReference_SetPS,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setrobinson,_wrap_SpatialReference_SetRobinson,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setsinusoidal,_wrap_SpatialReference_SetSinusoidal,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setstereographic,_wrap_SpatialReference_SetStereographic,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setsoc,_wrap_SpatialReference_SetSOC,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_settm,_wrap_SpatialReference_SetTM,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_settmvariant,_wrap_SpatialReference_SetTMVariant,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_settmg,_wrap_SpatialReference_SetTMG,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_settmso,_wrap_SpatialReference_SetTMSO,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setvdg,_wrap_SpatialReference_SetVDG,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setwellknowngeogcs,_wrap_SpatialReference_SetWellKnownGeogCS,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setfromuserinput,_wrap_SpatialReference_SetFromUserInput,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_copygeogcsfrom,_wrap_SpatialReference_CopyGeogCSFrom,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_settowgs84,_wrap_SpatialReference_SetTOWGS84,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_gettowgs84,_wrap_SpatialReference_GetTOWGS84,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setlocalcs,_wrap_SpatialReference_SetLocalCS,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setgeogcs,_wrap_SpatialReference_SetGeogCS,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_setprojcs,_wrap_SpatialReference_SetProjCS,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_importfromwkt,_wrap_SpatialReference_ImportFromWkt,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_importfromproj4,_wrap_SpatialReference_ImportFromProj4,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_importfromurl,_wrap_SpatialReference_ImportFromUrl,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_importfromesri,_wrap_SpatialReference_ImportFromESRI,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_importfromepsg,_wrap_SpatialReference_ImportFromEPSG,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_importfromepsga,_wrap_SpatialReference_ImportFromEPSGA,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_importfrompci,_wrap_SpatialReference_ImportFromPCI,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_importfromusgs,_wrap_SpatialReference_ImportFromUSGS,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_importfromxml,_wrap_SpatialReference_ImportFromXML,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_importfromerm,_wrap_SpatialReference_ImportFromERM,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_importfrommicoordsys,_wrap_SpatialReference_ImportFromMICoordSys,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_exporttowkt,_wrap_SpatialReference_ExportToWkt,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_exporttoprettywkt,_wrap_SpatialReference_ExportToPrettyWkt,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_exporttoproj4,_wrap_SpatialReference_ExportToProj4,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_exporttopci,_wrap_SpatialReference_ExportToPCI,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_exporttousgs,_wrap_SpatialReference_ExportToUSGS,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_exporttoxml,_wrap_SpatialReference_ExportToXML,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_exporttomicoordsys,_wrap_SpatialReference_ExportToMICoordSys,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_clonegeogcs,_wrap_SpatialReference_CloneGeogCS,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_c_clone,_wrap_SpatialReference_c_Clone,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_validate,_wrap_SpatialReference_Validate,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_stripctparms,_wrap_SpatialReference_StripCTParms,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_fixupordering,_wrap_SpatialReference_FixupOrdering,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_fixup,_wrap_SpatialReference_Fixup,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_morphtoesri,_wrap_SpatialReference_MorphToESRI,NULL)
 SWIG_ZEND_NAMED_FE(spatialreference_morphfromesri,_wrap_SpatialReference_MorphFromESRI,NULL)
 SWIG_ZEND_NAMED_FE(new_coordinatetransformation,_wrap_new_CoordinateTransformation,NULL)
 SWIG_ZEND_NAMED_FE(coordinatetransformation_transformpoint,_wrap_CoordinateTransformation_TransformPoint,NULL)
 SWIG_ZEND_NAMED_FE(coordinatetransformation_transformpoints,_wrap_CoordinateTransformation_TransformPoints,NULL)
 SWIG_ZEND_NAMED_FE(swig_osr_alter_newobject,_wrap_swig_osr_alter_newobject,NULL)
 SWIG_ZEND_NAMED_FE(swig_osr_get_newobject,_wrap_swig_osr_get_newobject,NULL)
{NULL, NULL, NULL}
};

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

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

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

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

#if 0
#define SWIGRUNTIME_DEBUG
#endif


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

  clientdata = clientdata;

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

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

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

  /* When multiple interpreters are used, a module could have already
     been initialized in a different interpreter, but not yet have a
     pointer in this interpreter.  In this case, we do not want to
     continue adding types... everything should be set up already */
  if (init == 0) return;

  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *ret;
    swig_cast_info *cast;

#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
#endif

    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found type %s\n", type->name);
#endif
      if (swig_module.type_initial[i]->clientdata) {
	type->clientdata = swig_module.type_initial[i]->clientdata;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
#endif
      }
    } else {
      type = swig_module.type_initial[i];
    }

    /* Insert casting types */
    cast = swig_module.cast_initial[i];
    while (cast->type) {
    
      /* Don't need to add information already in the list */
      ret = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
#ifdef SWIGRUNTIME_DEBUG
	if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
#endif
      }
      if (ret) {
	if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
	  printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
#endif
	  cast->type = ret;
	  ret = 0;
	} else {
	  /* Check for casting already in the list */
	  swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
#ifdef SWIGRUNTIME_DEBUG
	  if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
#endif
	  if (!ocast) ret = 0;
	}
      }

      if (!ret) {
#ifdef SWIGRUNTIME_DEBUG
	printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        if (type->cast) {
          type->cast->prev = cast;
          cast->next = type->cast;
        }
        type->cast = cast;
      }
      cast++;
    }
    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
  swig_module.types[i] = 0;

#ifdef SWIGRUNTIME_DEBUG
  printf("**** SWIG_InitializeModule: Cast List ******\n");
  for (i = 0; i < swig_module.size; ++i) {
    int j = 0;
    swig_cast_info *cast = swig_module.cast_initial[i];
    printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
    while (cast->type) {
      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
      cast++;
      ++j;
    }
  printf("---- Total casts: %d\n",j);
  }
  printf("**** SWIG_InitializeModule: Cast List ******\n");
#endif
}

/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
* of equivalent types.  It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
SWIGRUNTIME void
SWIG_PropagateClientData(void) {
  size_t i;
  swig_cast_info *equiv;
  static int init_run = 0;

  if (init_run) return;
  init_run = 1;

  for (i = 0; i < swig_module.size; i++) {
    if (swig_module.types[i]->clientdata) {
      equiv = swig_module.types[i]->cast;
      while (equiv) {
        if (!equiv->converter) {
          if (equiv->type && !equiv->type->clientdata)
            SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
        }
        equiv = equiv->next;
      }
    }
  }
}

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


  SWIG_php_minit {
    SWIG_InitializeModule(0);

/* oinit subsection */
ZEND_INIT_MODULE_GLOBALS(osr, osr_init_globals, osr_destroy_globals);

/* Register resource destructors for pointer types */
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__double=zend_register_list_destructors_ex(_wrap_destroy_double,NULL,(char *)(SWIGTYPE_double->name),module_number);
SWIG_TypeClientData(SWIGTYPE_double,&le_swig__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_double=zend_register_list_destructors_ex(_wrap_destroy_p_double,NULL,(char *)(SWIGTYPE_p_double->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_double,&le_swig__p_double);
le_swig__p_p_double=zend_register_list_destructors_ex(_wrap_destroy_p_p_double,NULL,(char *)(SWIGTYPE_p_p_double->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_p_double,&le_swig__p_p_double);
le_swig__p_long=zend_register_list_destructors_ex(_wrap_destroy_p_long,NULL,(char *)(SWIGTYPE_p_long->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_long,&le_swig__p_long);
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_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_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);
CG(active_class_entry) = NULL;
/* end oinit subsection */

/* cinit subsection */
SWIG_STRING_CONSTANT(SRS_WKT_WGS84, "GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AUTHORITY[\"EPSG\",\"4326\"]]");
SWIG_STRING_CONSTANT(SRS_PT_ALBERS_CONIC_EQUAL_AREA, "Albers_Conic_Equal_Area");
SWIG_STRING_CONSTANT(SRS_PT_AZIMUTHAL_EQUIDISTANT, "Azimuthal_Equidistant");
SWIG_STRING_CONSTANT(SRS_PT_CASSINI_SOLDNER, "Cassini_Soldner");
SWIG_STRING_CONSTANT(SRS_PT_CYLINDRICAL_EQUAL_AREA, "Cylindrical_Equal_Area");
SWIG_STRING_CONSTANT(SRS_PT_BONNE, "Bonne");
SWIG_STRING_CONSTANT(SRS_PT_ECKERT_I, "Eckert_I");
SWIG_STRING_CONSTANT(SRS_PT_ECKERT_II, "Eckert_II");
SWIG_STRING_CONSTANT(SRS_PT_ECKERT_III, "Eckert_III");
SWIG_STRING_CONSTANT(SRS_PT_ECKERT_IV, "Eckert_IV");
SWIG_STRING_CONSTANT(SRS_PT_ECKERT_V, "Eckert_V");
SWIG_STRING_CONSTANT(SRS_PT_ECKERT_VI, "Eckert_VI");
SWIG_STRING_CONSTANT(SRS_PT_EQUIDISTANT_CONIC, "Equidistant_Conic");
SWIG_STRING_CONSTANT(SRS_PT_EQUIRECTANGULAR, "Equirectangular");
SWIG_STRING_CONSTANT(SRS_PT_GALL_STEREOGRAPHIC, "Gall_Stereographic");
SWIG_STRING_CONSTANT(SRS_PT_GAUSSSCHREIBERTMERCATOR, "Gauss_Schreiber_Transverse_Mercator");
SWIG_STRING_CONSTANT(SRS_PT_GEOSTATIONARY_SATELLITE, "Geostationary_Satellite");
SWIG_STRING_CONSTANT(SRS_PT_GOODE_HOMOLOSINE, "Goode_Homolosine");
SWIG_STRING_CONSTANT(SRS_PT_GNOMONIC, "Gnomonic");
SWIG_STRING_CONSTANT(SRS_PT_HOTINE_OBLIQUE_MERCATOR, "Hotine_Oblique_Mercator");
SWIG_STRING_CONSTANT(SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN, "Hotine_Oblique_Mercator_Two_Point_Natural_Origin");
SWIG_STRING_CONSTANT(SRS_PT_LABORDE_OBLIQUE_MERCATOR, "Laborde_Oblique_Mercator");
SWIG_STRING_CONSTANT(SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP, "Lambert_Conformal_Conic_1SP");
SWIG_STRING_CONSTANT(SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP, "Lambert_Conformal_Conic_2SP");
SWIG_STRING_CONSTANT(SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM, "Lambert_Conformal_Conic_2SP_Belgium");
SWIG_STRING_CONSTANT(SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA, "Lambert_Azimuthal_Equal_Area");
SWIG_STRING_CONSTANT(SRS_PT_MERCATOR_1SP, "Mercator_1SP");
SWIG_STRING_CONSTANT(SRS_PT_MERCATOR_2SP, "Mercator_2SP");
SWIG_STRING_CONSTANT(SRS_PT_MERCATOR_AUXILIARY_SPHERE, "Mercator_Auxiliary_Sphere");
SWIG_STRING_CONSTANT(SRS_PT_MILLER_CYLINDRICAL, "Miller_Cylindrical");
SWIG_STRING_CONSTANT(SRS_PT_MOLLWEIDE, "Mollweide");
SWIG_STRING_CONSTANT(SRS_PT_NEW_ZEALAND_MAP_GRID, "New_Zealand_Map_Grid");
SWIG_STRING_CONSTANT(SRS_PT_OBLIQUE_STEREOGRAPHIC, "Oblique_Stereographic");
SWIG_STRING_CONSTANT(SRS_PT_ORTHOGRAPHIC, "Orthographic");
SWIG_STRING_CONSTANT(SRS_PT_POLAR_STEREOGRAPHIC, "Polar_Stereographic");
SWIG_STRING_CONSTANT(SRS_PT_POLYCONIC, "Polyconic");
SWIG_STRING_CONSTANT(SRS_PT_ROBINSON, "Robinson");
SWIG_STRING_CONSTANT(SRS_PT_SINUSOIDAL, "Sinusoidal");
SWIG_STRING_CONSTANT(SRS_PT_STEREOGRAPHIC, "Stereographic");
SWIG_STRING_CONSTANT(SRS_PT_SWISS_OBLIQUE_CYLINDRICAL, "Swiss_Oblique_Cylindrical");
SWIG_STRING_CONSTANT(SRS_PT_TRANSVERSE_MERCATOR, "Transverse_Mercator");
SWIG_STRING_CONSTANT(SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED, "Transverse_Mercator_South_Orientated");
SWIG_STRING_CONSTANT(SRS_PT_TRANSVERSE_MERCATOR_MI_21, "Transverse_Mercator_MapInfo_21");
SWIG_STRING_CONSTANT(SRS_PT_TRANSVERSE_MERCATOR_MI_22, "Transverse_Mercator_MapInfo_22");
SWIG_STRING_CONSTANT(SRS_PT_TRANSVERSE_MERCATOR_MI_23, "Transverse_Mercator_MapInfo_23");
SWIG_STRING_CONSTANT(SRS_PT_TRANSVERSE_MERCATOR_MI_24, "Transverse_Mercator_MapInfo_24");
SWIG_STRING_CONSTANT(SRS_PT_TRANSVERSE_MERCATOR_MI_25, "Transverse_Mercator_MapInfo_25");
SWIG_STRING_CONSTANT(SRS_PT_TUNISIA_MINING_GRID, "Tunisia_Mining_Grid");
SWIG_STRING_CONSTANT(SRS_PT_TWO_POINT_EQUIDISTANT, "Two_Point_Equidistant");
SWIG_STRING_CONSTANT(SRS_PT_VANDERGRINTEN, "VanDerGrinten");
SWIG_STRING_CONSTANT(SRS_PT_KROVAK, "Krovak");
SWIG_STRING_CONSTANT(SRS_PT_IMW_POLYCONIC, "International_Map_of_the_World_Polyconic");
SWIG_STRING_CONSTANT(SRS_PT_WAGNER_I, "Wagner_I");
SWIG_STRING_CONSTANT(SRS_PT_WAGNER_II, "Wagner_II");
SWIG_STRING_CONSTANT(SRS_PT_WAGNER_III, "Wagner_III");
SWIG_STRING_CONSTANT(SRS_PT_WAGNER_IV, "Wagner_IV");
SWIG_STRING_CONSTANT(SRS_PT_WAGNER_V, "Wagner_V");
SWIG_STRING_CONSTANT(SRS_PT_WAGNER_VI, "Wagner_VI");
SWIG_STRING_CONSTANT(SRS_PT_WAGNER_VII, "Wagner_VII");
SWIG_STRING_CONSTANT(SRS_PP_CENTRAL_MERIDIAN, "central_meridian");
SWIG_STRING_CONSTANT(SRS_PP_SCALE_FACTOR, "scale_factor");
SWIG_STRING_CONSTANT(SRS_PP_STANDARD_PARALLEL_1, "standard_parallel_1");
SWIG_STRING_CONSTANT(SRS_PP_STANDARD_PARALLEL_2, "standard_parallel_2");
SWIG_STRING_CONSTANT(SRS_PP_PSEUDO_STD_PARALLEL_1, "pseudo_standard_parallel_1");
SWIG_STRING_CONSTANT(SRS_PP_LONGITUDE_OF_CENTER, "longitude_of_center");
SWIG_STRING_CONSTANT(SRS_PP_LATITUDE_OF_CENTER, "latitude_of_center");
SWIG_STRING_CONSTANT(SRS_PP_LONGITUDE_OF_ORIGIN, "longitude_of_origin");
SWIG_STRING_CONSTANT(SRS_PP_LATITUDE_OF_ORIGIN, "latitude_of_origin");
SWIG_STRING_CONSTANT(SRS_PP_FALSE_EASTING, "false_easting");
SWIG_STRING_CONSTANT(SRS_PP_FALSE_NORTHING, "false_northing");
SWIG_STRING_CONSTANT(SRS_PP_AZIMUTH, "azimuth");
SWIG_STRING_CONSTANT(SRS_PP_LONGITUDE_OF_POINT_1, "longitude_of_point_1");
SWIG_STRING_CONSTANT(SRS_PP_LATITUDE_OF_POINT_1, "latitude_of_point_1");
SWIG_STRING_CONSTANT(SRS_PP_LONGITUDE_OF_POINT_2, "longitude_of_point_2");
SWIG_STRING_CONSTANT(SRS_PP_LATITUDE_OF_POINT_2, "latitude_of_point_2");
SWIG_STRING_CONSTANT(SRS_PP_LONGITUDE_OF_POINT_3, "longitude_of_point_3");
SWIG_STRING_CONSTANT(SRS_PP_LATITUDE_OF_POINT_3, "latitude_of_point_3");
SWIG_STRING_CONSTANT(SRS_PP_RECTIFIED_GRID_ANGLE, "rectified_grid_angle");
SWIG_STRING_CONSTANT(SRS_PP_LANDSAT_NUMBER, "landsat_number");
SWIG_STRING_CONSTANT(SRS_PP_PATH_NUMBER, "path_number");
SWIG_STRING_CONSTANT(SRS_PP_PERSPECTIVE_POINT_HEIGHT, "perspective_point_height");
SWIG_STRING_CONSTANT(SRS_PP_SATELLITE_HEIGHT, "satellite_height");
SWIG_STRING_CONSTANT(SRS_PP_FIPSZONE, "fipszone");
SWIG_STRING_CONSTANT(SRS_PP_ZONE, "zone");
SWIG_STRING_CONSTANT(SRS_PP_LATITUDE_OF_1ST_POINT, "Latitude_Of_1st_Point");
SWIG_STRING_CONSTANT(SRS_PP_LONGITUDE_OF_1ST_POINT, "Longitude_Of_1st_Point");
SWIG_STRING_CONSTANT(SRS_PP_LATITUDE_OF_2ND_POINT, "Latitude_Of_2nd_Point");
SWIG_STRING_CONSTANT(SRS_PP_LONGITUDE_OF_2ND_POINT, "Longitude_Of_2nd_Point");
SWIG_STRING_CONSTANT(SRS_UL_METER, "Meter");
SWIG_STRING_CONSTANT(SRS_UL_FOOT, "Foot (International)");
SWIG_STRING_CONSTANT(SRS_UL_FOOT_CONV, "0.3048");
SWIG_STRING_CONSTANT(SRS_UL_US_FOOT, "Foot_US");
SWIG_STRING_CONSTANT(SRS_UL_US_FOOT_CONV, "0.3048006096012192");
SWIG_STRING_CONSTANT(SRS_UL_NAUTICAL_MILE, "Nautical Mile");
SWIG_STRING_CONSTANT(SRS_UL_NAUTICAL_MILE_CONV, "1852.0");
SWIG_STRING_CONSTANT(SRS_UL_LINK, "Link");
SWIG_STRING_CONSTANT(SRS_UL_LINK_CONV, "0.20116684023368047");
SWIG_STRING_CONSTANT(SRS_UL_CHAIN, "Chain");
SWIG_STRING_CONSTANT(SRS_UL_CHAIN_CONV, "20.116684023368047");
SWIG_STRING_CONSTANT(SRS_UL_ROD, "Rod");
SWIG_STRING_CONSTANT(SRS_UL_ROD_CONV, "5.02921005842012");
SWIG_STRING_CONSTANT(SRS_UA_DEGREE, "degree");
SWIG_STRING_CONSTANT(SRS_UA_DEGREE_CONV, "0.0174532925199433");
SWIG_STRING_CONSTANT(SRS_UA_RADIAN, "radian");
SWIG_STRING_CONSTANT(SRS_PM_GREENWICH, "Greenwich");
SWIG_STRING_CONSTANT(SRS_DN_NAD27, "North_American_Datum_1927");
SWIG_STRING_CONSTANT(SRS_DN_NAD83, "North_American_Datum_1983");
SWIG_STRING_CONSTANT(SRS_DN_WGS72, "WGS_1972");
SWIG_STRING_CONSTANT(SRS_DN_WGS84, "WGS_1984");
SWIG_DOUBLE_CONSTANT(SRS_WGS84_SEMIMAJOR, 6378137.0);
SWIG_DOUBLE_CONSTANT(SRS_WGS84_INVFLATTENING, 298.257223563);
/* end cinit subsection */

    return SUCCESS;
}

PHP_RINIT_FUNCTION(osr)
{
/* rinit section */

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

    return SUCCESS;
}

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

PHP_RSHUTDOWN_FUNCTION(osr)
{
/* rshutdown section */

    return SUCCESS;
}

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