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


#ifdef __cplusplus
template<class T> class SwigValueWrapper {
    T *tt;
public:
    SwigValueWrapper() : tt(0) { }
    SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
    SwigValueWrapper(const T& t) : tt(new T(t)) { }
    ~SwigValueWrapper() { delete tt; } 
    SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
    operator T&() const { return *tt; }
    T *operator&() { return tt; }
private:
    SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
};
#endif

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

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
#  if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#    define SWIGTEMPLATEDISAMBIGUATOR template
#  else
#    define SWIGTEMPLATEDISAMBIGUATOR 
#  endif
#endif

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

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__) || defined(__ICC)
#   define SWIGUNUSED __attribute__ ((unused)) 
# else
#   define SWIGUNUSED 
# endif
#endif

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

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

/* exporting methods for Windows DLLs */
#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   define SWIGEXPORT
# endif
#endif

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


/* ruby.swg */
/* Implementation : RUBY */
#define SWIGRUBY 1

#include "ruby.h"

/* Flags for pointer conversion */
#define SWIG_POINTER_EXCEPTION     0x1
#define SWIG_POINTER_DISOWN        0x2

#define NUM2USHRT(n) (\
    (0 <= NUM2UINT(n) && NUM2UINT(n) <= USHRT_MAX)\
    ? (unsigned short) NUM2UINT(n) \
    : (rb_raise(rb_eArgError, "integer %d out of range of `unsigned short'",\
               NUM2UINT(n)), (short)0)\
)

#define NUM2SHRT(n) (\
    (SHRT_MIN <= NUM2INT(n) && NUM2INT(n) <= SHRT_MAX)\
    ? (short)NUM2INT(n)\
    : (rb_raise(rb_eArgError, "integer %d out of range of `short'",\
               NUM2INT(n)), (short)0)\
)

/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
#ifndef NUM2LL
#define NUM2LL(x) NUM2LONG((x))
#endif
#ifndef LL2NUM
#define LL2NUM(x) INT2NUM((long) (x))
#endif
#ifndef ULL2NUM
#define ULL2NUM(x) UINT2NUM((unsigned long) (x))
#endif

/* Ruby 1.7 doesn't (yet) define NUM2ULL() */
#ifndef NUM2ULL
#ifdef HAVE_LONG_LONG
#define NUM2ULL(x) rb_num2ull((x))
#else
#define NUM2ULL(x) NUM2ULONG(x)
#endif
#endif

/*
 * Need to be very careful about how these macros are defined, especially
 * when compiling C++ code or C code with an ANSI C compiler.
 *
 * VALUEFUNC(f) is a macro used to typecast a C function that implements
 * a Ruby method so that it can be passed as an argument to API functions
 * like rb_define_method() and rb_define_singleton_method().
 *
 * VOIDFUNC(f) is a macro used to typecast a C function that implements
 * either the "mark" or "free" stuff for a Ruby Data object, so that it
 * can be passed as an argument to API functions like Data_Wrap_Struct()
 * and Data_Make_Struct().
 */
 
#ifdef __cplusplus
#  ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */
#    define PROTECTFUNC(f) ((VALUE (*)()) f)
#    define VALUEFUNC(f) ((VALUE (*)()) f)
#    define VOIDFUNC(f)  ((void (*)()) f)
#  else
#    ifndef ANYARGS /* These definitions should work for Ruby 1.6 */
#      define PROTECTFUNC(f) ((VALUE (*)()) f)
#      define VALUEFUNC(f) ((VALUE (*)()) f)
#      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
#    else /* These definitions should work for Ruby 1.7+ */
#      define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f)
#      define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f)
#      define VOIDFUNC(f)  ((RUBY_DATA_FUNC) f)
#    endif
#  endif
#else
#  define VALUEFUNC(f) (f)
#  define VOIDFUNC(f) (f)
#endif

typedef struct {
  VALUE klass;
  VALUE mImpl;
  void  (*mark)(void *);
  void  (*destroy)(void *);
} swig_class;

/* Don't use for expressions have side effect */
#ifndef RB_STRING_VALUE
#define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s)))
#endif
#ifndef StringValue
#define StringValue(s) RB_STRING_VALUE(s)
#endif
#ifndef StringValuePtr
#define StringValuePtr(s) RSTRING(RB_STRING_VALUE(s))->ptr
#endif
#ifndef StringValueLen
#define StringValueLen(s) RSTRING(RB_STRING_VALUE(s))->len
#endif
#ifndef SafeStringValue
#define SafeStringValue(v) do {\
    StringValue(v);\
    rb_check_safe_str(v);\
} while (0)
#endif

#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
#define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1)
#define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
#endif

/* Contract support */

#define SWIG_contract_assert(expr, msg) if (!(expr)) { rb_raise(rb_eRuntimeError, (char *) msg ); } else


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

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

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

/*
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  creating a static or dynamic library from the swig runtime code.
  In 99.9% of the cases, swig just needs to declare them as 'static'.
  
  But only do this if is strictly necessary, ie, if you have problems
  with your compiler or so.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

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

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

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

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


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

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

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

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


/* think of this as a c++ template<> or a scheme macro */
#define SWIG_TypeCheck_Template(comparison, ty)         \
  if (ty) {                                             \
    swig_cast_info *iter = ty->cast;                    \
    while (iter) {                                      \
      if (comparison) {                                 \
        if (iter == ty->cast) return iter;              \
        /* Move iter to the top of the linked list */   \
        iter->prev->next = iter->next;                  \
        if (iter->next)                                 \
          iter->next->prev = iter->prev;                \
        iter->next = ty->cast;                          \
        iter->prev = 0;                                 \
        if (ty->cast) ty->cast->prev = iter;            \
        ty->cast = iter;                                \
        return iter;                                    \
      }                                                 \
      iter = iter->next;                                \
    }                                                   \
  }                                                     \
  return 0

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

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

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

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

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

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

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

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

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


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

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

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

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

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

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

#ifdef __cplusplus
}
#endif

/* Common SWIG API */
#define SWIG_ConvertPtr(obj, pp, type, flags) \
  SWIG_Ruby_ConvertPtr(obj, pp, type, flags)
#define SWIG_NewPointerObj(p, type, flags) \
  SWIG_Ruby_NewPointerObj(p, type, flags)
#define SWIG_MustGetPtr(p, type, argnum, flags) \
  SWIG_Ruby_MustGetPtr(p, type, argnum, flags)
#define SWIG_GetModule(clientdata) \
  SWIG_Ruby_GetModule()
#define SWIG_SetModule(clientdata, pointer) \
  SWIG_Ruby_SetModule(pointer)

/* Ruby-specific SWIG API */

#define SWIG_InitRuntime() \
  SWIG_Ruby_InitRuntime()
#define SWIG_define_class(ty) \
  SWIG_Ruby_define_class(ty)
#define SWIG_NewClassInstance(value, ty) \
  SWIG_Ruby_NewClassInstance(value, ty)
#define SWIG_MangleStr(value) \
  SWIG_Ruby_MangleStr(value)
#define SWIG_CheckConvert(value, ty) \
  SWIG_Ruby_CheckConvert(value, ty)
#define SWIG_NewPackedObj(ptr, sz, ty) \
  SWIG_Ruby_NewPackedObj(ptr, sz, ty)
#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \
  SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags)

/* rubydef.swg */
#ifdef __cplusplus
extern "C" {
#endif

static VALUE _mSWIG = Qnil;
static VALUE _cSWIG_Pointer = Qnil;
static VALUE swig_runtime_data_type_pointer = Qnil;

/* Initialize Ruby runtime support */
static void
SWIG_Ruby_InitRuntime(void)
{
    if (_mSWIG == Qnil) {
        _mSWIG = rb_define_module("SWIG");
    }
}

/* Define Ruby class for C type */
static void
SWIG_Ruby_define_class(swig_type_info *type)
{
    VALUE klass;
    char *klass_name = (char *) malloc(4 + strlen(type->name) + 1);
    sprintf(klass_name, "TYPE%s", type->name);
    if (NIL_P(_cSWIG_Pointer)) {
	_cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject);
	rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new");
    }
    klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer);
    free((void *) klass_name);
}

/* Create a new pointer object */
static VALUE
SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int own)
{
    char *klass_name;
    swig_class *sklass;
    VALUE klass;
    VALUE obj;
    
    if (!ptr)
	return Qnil;
    
    if (type->clientdata) {
      sklass = (swig_class *) type->clientdata;
      obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), (own ? VOIDFUNC(sklass->destroy) : 0), ptr);
    } else {
      klass_name = (char *) malloc(4 + strlen(type->name) + 1);
      sprintf(klass_name, "TYPE%s", type->name);
      klass = rb_const_get(_mSWIG, rb_intern(klass_name));
      free((void *) klass_name);
      obj = Data_Wrap_Struct(klass, 0, 0, ptr);
    }
    rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
    return obj;
}

/* Create a new class instance (always owned) */
static VALUE
SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
{
    VALUE obj;
    swig_class *sklass = (swig_class *) type->clientdata;
    obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
    rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
    return obj;
}

/* Get type mangle from class name */
static SWIGINLINE char *
SWIG_Ruby_MangleStr(VALUE obj)
{
  VALUE stype = rb_iv_get(obj, "__swigtype__");
  return StringValuePtr(stype);
}

/* Convert a pointer value */
static int
SWIG_Ruby_ConvertPtr(VALUE obj, void **ptr, swig_type_info *ty, int flags)
{
  char *c;
  swig_cast_info *tc;

  /* Grab the pointer */
  if (NIL_P(obj)) {
    *ptr = 0;
    return 0;
  } else {
    Data_Get_Struct(obj, void, *ptr);
  }
  
  /* Do type-checking if type info was provided */
  if (ty) {
    if (ty->clientdata) {
        if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) {
          if (*ptr == 0)
            rb_raise(rb_eRuntimeError, "This %s already released", ty->str);
          return 0;
        }
    }
    if ((c = SWIG_MangleStr(obj)) == NULL) {
      if (flags & SWIG_POINTER_EXCEPTION)
        rb_raise(rb_eTypeError, "Expected %s", ty->str);
      else
        return -1;
    }
    tc = SWIG_TypeCheck(c, ty);
    if (!tc) {
      if (flags & SWIG_POINTER_EXCEPTION)
        rb_raise(rb_eTypeError, "Expected %s", ty->str);
      else
        return -1;
    }
    *ptr = SWIG_TypeCast(tc, *ptr);
  }
  return 0;
}

/* Convert a pointer value, signal an exception on a type mismatch */
static SWIGINLINE void *
SWIG_Ruby_MustGetPtr(VALUE obj, swig_type_info *ty, int argnum, int flags)
{
  void *result;
  SWIG_ConvertPtr(obj, &result, ty, flags | SWIG_POINTER_EXCEPTION);
  return result;
}

/* Check convert */
static SWIGINLINE int
SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty)
{
  char *c = SWIG_MangleStr(obj);
  if (!c)
    return 0;
  return SWIG_TypeCheck(c,ty) != 0;
}

static VALUE
SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) {
  char result[1024];
  char *r = result;
  if ((2*sz + 1 + strlen(type->name)) > 1000) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r, ptr, sz);
  strcpy(r, type->name);
  return rb_str_new2(result);
}

/* Convert a packed value value */
static void
SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty, int flags) {
  swig_cast_info *tc;
  const char  *c;

  if (TYPE(obj) != T_STRING) goto type_error;
  c = StringValuePtr(obj);
  /* Pointer values must start with leading underscore */
  if (*c != '_') goto type_error;
  c++;
  c = SWIG_UnpackData(c, ptr, sz);
  if (ty) {
    tc = SWIG_TypeCheck(c, ty);
    if (!tc) goto type_error;
  }
  return;

type_error:

  if (flags) {
    if (ty) {
      rb_raise(rb_eTypeError, "Type error. Expected %s", ty->name);
    } else {
      rb_raise(rb_eTypeError, "Expected a pointer");
    }
  }
}

static swig_module_info *SWIG_Ruby_GetModule() {
    VALUE pointer;
    swig_module_info *ret = 0;

   /* first check if pointer already created */
    pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME);
    if (pointer != Qnil) {
      Data_Get_Struct(pointer, swig_module_info, ret);
    }
    return ret;
}

static void SWIG_Ruby_SetModule(swig_module_info *pointer) {
      /* register a new class */
      VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
      /* create and store the structure pointer to a global variable */
      swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer);
      rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
}

#ifdef __cplusplus
}
#endif



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

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

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

#define SWIG_init    Init_osr
#define SWIG_name    "Osr"

static VALUE mOsr;

static void SWIG_AsVal(VALUE obj, int *val)
{
    *val = (int) NUM2INT(obj);
}


#include <iostream>
using namespace std;

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

#include "ogr_srs_api.h"

typedef void OSRSpatialReferenceShadow;
typedef void OSRCoordinateTransformationShadow;



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

static OSRSpatialReferenceShadow *new_OSRSpatialReferenceShadow(char const *wkt=""){
    OSRSpatialReferenceShadow *sr = (OSRSpatialReferenceShadow*) OSRNewSpatialReference(wkt);
    if (sr) {
      OSRReference( sr );
    }
    return sr;
  }
static char *OSRSpatialReferenceShadow___str__(OSRSpatialReferenceShadow *self){
    char *buf = 0;
    OSRExportToPrettyWkt( self, &buf, 0 );
    return buf;
  }
static int OSRSpatialReferenceShadow_IsSame(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
    return OSRIsSame( self, rhs );
  }
static int OSRSpatialReferenceShadow_IsSameGeogCS(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
    return OSRIsSameGeogCS( self, rhs );
  }
static int OSRSpatialReferenceShadow_IsGeographic(OSRSpatialReferenceShadow *self){
    return OSRIsGeographic(self);
  }
static int OSRSpatialReferenceShadow_IsProjected(OSRSpatialReferenceShadow *self){
    return OSRIsProjected(self);
  }
static char const *OSRSpatialReferenceShadow_GetAttrValue(OSRSpatialReferenceShadow *self,char const *name,int child=0){
    return OSRGetAttrValue( self, name, child );
  }
static OGRErr OSRSpatialReferenceShadow_SetAttrValue(OSRSpatialReferenceShadow *self,char const *name,char const *value){
    return OSRSetAttrValue( self, name, value ); 
  }
static OGRErr OSRSpatialReferenceShadow_SetAngularUnits(OSRSpatialReferenceShadow *self,char const *name,double to_radians){
    return OSRSetAngularUnits( self, name, to_radians );
  }
static double OSRSpatialReferenceShadow_GetAngularUnits(OSRSpatialReferenceShadow *self){
    // Return code ignored.
    return OSRGetAngularUnits( self, 0 );
  }
static OGRErr OSRSpatialReferenceShadow_SetLinearUnits(OSRSpatialReferenceShadow *self,char const *name,double to_meters){
    return OSRSetAngularUnits( self, name, to_meters );
  }
static double OSRSpatialReferenceShadow_GetLinearUnits(OSRSpatialReferenceShadow *self){
    // Return code ignored.
    return OSRGetLinearUnits( self, 0 );
  }
static 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";
  }
static char const *OSRSpatialReferenceShadow_GetAuthorityCode(OSRSpatialReferenceShadow *self,char const *target_key){
    return OSRGetAuthorityCode( self, target_key );
  }
static char const *OSRSpatialReferenceShadow_GetAuthorityName(OSRSpatialReferenceShadow *self,char const *target_key){
    return OSRGetAuthorityName( self, target_key );
  }
static OGRErr OSRSpatialReferenceShadow_SetUTM(OSRSpatialReferenceShadow *self,int zone,int north=1){
    return OSRSetUTM( self, zone, north );
  }
static 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 );
  }
static OGRErr OSRSpatialReferenceShadow_AutoIdentifyEPSG(OSRSpatialReferenceShadow *self){
    return OSRAutoIdentifyEPSG( self );
  }
static OGRErr OSRSpatialReferenceShadow_SetProjection(OSRSpatialReferenceShadow *self,char const *arg){
    return OSRSetProjection( self, arg );
  }
static OGRErr OSRSpatialReferenceShadow_SetProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
    return OSRSetProjParm( self, name, val ); 
  }
static double OSRSpatialReferenceShadow_GetProjParm(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
    // Return code ignored.
    return OSRGetProjParm( self, name, default_val, 0 );
  }
static OGRErr OSRSpatialReferenceShadow_SetNormProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
    return OSRSetNormProjParm( self, name, val );
  }
static double OSRSpatialReferenceShadow_GetNormProjParm(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
    // Return code ignored.
    return OSRGetNormProjParm( self, name, default_val, 0 );
  }
static 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 );
  }
static OGRErr OSRSpatialReferenceShadow_SetAE(OSRSpatialReferenceShadow *self,double clat,double clon,double fe,double fn){
    return OSRSetAE( self, clat, clon, fe, fn );
  }
static OGRErr OSRSpatialReferenceShadow_SetCS(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    return OSRSetCS( self, clat, clong, fe, fn );
  }
static OGRErr OSRSpatialReferenceShadow_SetBonne(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    return OSRSetBonne( self, clat, clong, fe, fn );
  }
static 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 );
  }
static OGRErr OSRSpatialReferenceShadow_SetEckertIV(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
    return OSRSetEckertIV( self, cm, fe, fn );
  }
static OGRErr OSRSpatialReferenceShadow_SetEckertVI(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
    return OSRSetEckertVI( self, cm, fe, fn );
  }
static OGRErr OSRSpatialReferenceShadow_SetEquirectangular(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    return OSRSetEquirectangular( self, clat, clong, fe, fn );
  }
static OGRErr OSRSpatialReferenceShadow_SetGS(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
    return OSRSetGS( self, cm, fe, fn );
  }
static OGRErr OSRSpatialReferenceShadow_SetWellKnownGeogCS(OSRSpatialReferenceShadow *self,char const *name){
    return OSRSetWellKnownGeogCS( self, name );
  }
static OGRErr OSRSpatialReferenceShadow_SetFromUserInput(OSRSpatialReferenceShadow *self,char const *name){
    return OSRSetFromUserInput( self, name );
  }
static OGRErr OSRSpatialReferenceShadow_CopyGeogCSFrom(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
    return OSRCopyGeogCSFrom( self, rhs );
  }
static 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 );
  }
static OGRErr OSRSpatialReferenceShadow_GetTOWGS84(OSRSpatialReferenceShadow *self,double argout[7]){
    return OSRGetTOWGS84( self, argout, 7 );
  }
static 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 );
  }
static OGRErr OSRSpatialReferenceShadow_SetProjCS(OSRSpatialReferenceShadow *self,char const *name="unnamed"){
    return OSRSetProjCS( self, name );
  }
static OGRErr OSRSpatialReferenceShadow_ImportFromWkt(OSRSpatialReferenceShadow *self,char **ppszInput){
    return OSRImportFromWkt( self, ppszInput );
  }
static OGRErr OSRSpatialReferenceShadow_ImportFromProj4(OSRSpatialReferenceShadow *self,char *ppszInput){
    return OSRImportFromProj4( self, ppszInput );
  }
static OGRErr OSRSpatialReferenceShadow_ImportFromESRI(OSRSpatialReferenceShadow *self,char **ppszInput){
    return OSRImportFromESRI( self, ppszInput );
  }
static OGRErr OSRSpatialReferenceShadow_ImportFromEPSG(OSRSpatialReferenceShadow *self,int arg){
    return OSRImportFromEPSG(self, arg);
  }
static OGRErr OSRSpatialReferenceShadow_ImportFromPCI(OSRSpatialReferenceShadow *self,char const *proj,char const *units="METRE",double argin[17]=0){
    return OSRImportFromPCI( self, proj, units, argin );
  }
static 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 );
  }
static OGRErr OSRSpatialReferenceShadow_ImportFromXML(OSRSpatialReferenceShadow *self,char const *xmlString){
    return OSRImportFromXML( self, xmlString );
  }
static OGRErr OSRSpatialReferenceShadow_ExportToWkt(OSRSpatialReferenceShadow *self,char **argout){
    return OSRExportToWkt( self, argout );
  }
static OGRErr OSRSpatialReferenceShadow_ExportToPrettyWkt(OSRSpatialReferenceShadow *self,char **argout,int simplify=0){
    return OSRExportToPrettyWkt( self, argout, simplify );
  }
static OGRErr OSRSpatialReferenceShadow_ExportToProj4(OSRSpatialReferenceShadow *self,char **argout){
    return OSRExportToProj4( self, argout );
  }
static OGRErr OSRSpatialReferenceShadow_ExportToPCI(OSRSpatialReferenceShadow *self,char **proj,char **units,double *parms[17]){
    return OSRExportToPCI( self, proj, units, parms );
  }

static VALUE output_helper(VALUE target, VALUE o) {
    if (NIL_P(target)) {
	target = o;
    } else {
	if (TYPE(target) != T_ARRAY) {
	    VALUE o2 = target;
	    target = rb_ary_new();
	    rb_ary_push(target, o2);
	}
	rb_ary_push(target, o);
    }
    return target;
}

static OGRErr OSRSpatialReferenceShadow_ExportToUSGS(OSRSpatialReferenceShadow *self,long *code,long *zone,double *parms[15],long *datum){
    return OSRExportToUSGS( self, code, zone, parms, datum );
  }
static OGRErr OSRSpatialReferenceShadow_ExportToXML(OSRSpatialReferenceShadow *self,char **argout,char const *dialect=""){
    return OSRExportToXML( self, argout, dialect );
  }
static OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_CloneGeogCS(OSRSpatialReferenceShadow *self){
    return (OSRSpatialReferenceShadow*) OSRCloneGeogCS(self);
  }
static OGRErr OSRSpatialReferenceShadow_Validate(OSRSpatialReferenceShadow *self){
    return OSRValidate(self);
  }
static OGRErr OSRSpatialReferenceShadow_StripCTParms(OSRSpatialReferenceShadow *self){
    return OSRStripCTParms(self);
  }
static OGRErr OSRSpatialReferenceShadow_FixupOrdering(OSRSpatialReferenceShadow *self){
    return OSRFixupOrdering(self);
  }
static OGRErr OSRSpatialReferenceShadow_Fixup(OSRSpatialReferenceShadow *self){
    return OSRFixup(self);
  }
static OGRErr OSRSpatialReferenceShadow_MorphToESRI(OSRSpatialReferenceShadow *self){
    return OSRMorphToESRI(self);
  }
static OGRErr OSRSpatialReferenceShadow_MorphFromESRI(OSRSpatialReferenceShadow *self){
    return OSRMorphFromESRI(self);
  }
static OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst){
    OSRCoordinateTransformationShadow *obj = (OSRCoordinateTransformationShadow*) OCTNewCoordinateTransformation( src, dst );
    if (obj == 0 ) {
      throw "Failed to create coordinate transformation";
    }
    return obj;
  }
static void OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(OSRCoordinateTransformationShadow *self,double inout[3]){
    OCTTransform( self, 1, &inout[0], &inout[1], &inout[2] );
  }
static 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] );
  }
static VALUE
_wrap_GetWellKnownGeogCSAsWKT(int argc, VALUE *argv, VALUE self) {
    char *arg1 = (char *) 0 ;
    char **arg2 = (char **) 0 ;
    OGRErr result;
    char *argout2 = 0 ;
    VALUE vresult = Qnil;
    
    {
        /* %typemap(ruby,in,numinputs=0) (char **argout2) ( char *argout2=0 ) */
        
        arg2 = &argout2;
    }
    if ((argc < 1) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    arg1 = StringValuePtr(argv[0]);
    result = (OGRErr)GetWellKnownGeogCSAsWKT((char const *)arg1,arg2);
    
    vresult = INT2NUM(result);
    {
        /* %typemap(ruby,argout) (char **argout) */
        
        if ( arg2 ) {
            vresult = rb_str_new2( *arg2 );
        }
        else {
            vresult = Qnil;
        }
    }
    {
        /* %typemap(ruby,freearg) (char **argout) */
        
        if ( *arg2 )
        CPLFree( *arg2 );
    }
    return vresult;
}


static VALUE
_wrap_GetProjectionMethods(int argc, VALUE *argv, VALUE self) {
    char **result;
    VALUE vresult = Qnil;
    
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    result = (char **)OPTGetProjectionMethods();
    
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_p_char,0);
    return vresult;
}


static VALUE
_wrap_GetProjectionMethodParameterList(int argc, VALUE *argv, VALUE self) {
    char *arg1 = (char *) 0 ;
    char **arg2 = (char **) 0 ;
    char **result;
    char *val2 = 0 ;
    VALUE vresult = Qnil;
    
    if ((argc < 2) || (argc > 2))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
    arg1 = StringValuePtr(argv[0]);
    {
        /* %typemap(ruby,in) char ** ( char *val2=0 ) */
        
        val2 = StringValuePtr(argv[1]);
        arg2 = &val2;
    }
    result = (char **)OPTGetParameterList(arg1,arg2);
    
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_p_char,0);
    return vresult;
}


static VALUE
_wrap_GetProjectionMethodParamInfo(int argc, VALUE *argv, VALUE self) {
    char *arg1 = (char *) 0 ;
    char *arg2 = (char *) 0 ;
    char **arg3 = (char **) 0 ;
    char **arg4 = (char **) 0 ;
    double *arg5 = (double *) 0 ;
    char *val3 = 0 ;
    char *val4 = 0 ;
    
    if ((argc < 5) || (argc > 5))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc);
    arg1 = StringValuePtr(argv[0]);
    arg2 = StringValuePtr(argv[1]);
    {
        /* %typemap(ruby,in) char ** ( char *val3=0 ) */
        
        val3 = StringValuePtr(argv[2]);
        arg3 = &val3;
    }
    {
        /* %typemap(ruby,in) char ** ( char *val4=0 ) */
        
        val4 = StringValuePtr(argv[3]);
        arg4 = &val4;
    }
    SWIG_ConvertPtr(argv[4], (void **) &arg5, SWIGTYPE_p_double, 1);
    OPTGetParameterInfo(arg1,arg2,arg3,arg4,arg5);
    
    return Qnil;
}


swig_class cSpatialReference;

#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
static VALUE
_wrap_SpatialReference_allocate(VALUE self) {
#else
    static VALUE
    _wrap_SpatialReference_allocate(int argc, VALUE *argv, VALUE self) {
#endif
        
        
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_OSRSpatialReferenceShadow);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
        rb_obj_call_init(vresult, argc, argv);
#endif
        return vresult;
    }
    

static VALUE
_wrap_new_SpatialReference(int argc, VALUE *argv, VALUE self) {
    char *arg1 = (char *) "" ;
    OSRSpatialReferenceShadow *result;
    char *kwnames[] = {
        "wkt", NULL 
    };
    
    if ((argc < 0) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    if (argc > 0) {
        arg1 = StringValuePtr(argv[0]);
    }
    result = (OSRSpatialReferenceShadow *)new_OSRSpatialReferenceShadow((char const *)arg1);
    DATA_PTR(self) = result;
    return self;
}


static void delete_OSRSpatialReferenceShadow(OSRSpatialReferenceShadow *self){
    if (OSRDereference( self ) == 0 ) {
      OSRDestroySpatialReference( self );
    }
  }
static void
free_OSRSpatialReferenceShadow(OSRSpatialReferenceShadow *arg1) {
    delete_OSRSpatialReferenceShadow(arg1);
}
static VALUE
_wrap_SpatialReference___str__(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *result;
    VALUE vresult = Qnil;
    
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (char *)OSRSpatialReferenceShadow___str__(arg1);
    
    vresult = rb_str_new2(result);
    delete [] result;
    return vresult;
}


static VALUE
_wrap_SpatialReference_IsSame(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    int result;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (int)OSRSpatialReferenceShadow_IsSame(arg1,arg2);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_IsSameGeogCS(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    int result;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (int)OSRSpatialReferenceShadow_IsSameGeogCS(arg1,arg2);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_IsGeographic(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    int result;
    VALUE vresult = Qnil;
    
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (int)OSRSpatialReferenceShadow_IsGeographic(arg1);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_IsProjected(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    int result;
    VALUE vresult = Qnil;
    
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (int)OSRSpatialReferenceShadow_IsProjected(arg1);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_GetAttrValue(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int arg3 = (int) 0 ;
    char *result;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 2))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = StringValuePtr(argv[0]);
    if (argc > 1) {
        arg3 = NUM2INT(argv[1]);
    }
    result = (char *)OSRSpatialReferenceShadow_GetAttrValue(arg1,(char const *)arg2,arg3);
    
    vresult = rb_str_new2(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetAttrValue(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *arg3 = (char *) 0 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 2) || (argc > 2))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = StringValuePtr(argv[0]);
    arg3 = StringValuePtr(argv[1]);
    result = (OGRErr)OSRSpatialReferenceShadow_SetAttrValue(arg1,(char const *)arg2,(char const *)arg3);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetAngularUnits(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    double arg3 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 2) || (argc > 2))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = StringValuePtr(argv[0]);
    arg3 = (double) NUM2DBL(argv[1]);
    result = (OGRErr)OSRSpatialReferenceShadow_SetAngularUnits(arg1,(char const *)arg2,arg3);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_GetAngularUnits(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    double result;
    VALUE vresult = Qnil;
    
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (double)OSRSpatialReferenceShadow_GetAngularUnits(arg1);
    
    vresult = rb_float_new(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetLinearUnits(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    double arg3 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 2) || (argc > 2))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = StringValuePtr(argv[0]);
    arg3 = (double) NUM2DBL(argv[1]);
    result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnits(arg1,(char const *)arg2,arg3);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_GetLinearUnits(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    double result;
    VALUE vresult = Qnil;
    
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (double)OSRSpatialReferenceShadow_GetLinearUnits(arg1);
    
    vresult = rb_float_new(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_GetLinearUnitsName(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *result;
    VALUE vresult = Qnil;
    
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (char *)OSRSpatialReferenceShadow_GetLinearUnitsName(arg1);
    
    vresult = rb_str_new2(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_GetAuthorityCode(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *result;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = StringValuePtr(argv[0]);
    result = (char *)OSRSpatialReferenceShadow_GetAuthorityCode(arg1,(char const *)arg2);
    
    vresult = rb_str_new2(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_GetAuthorityName(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *result;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = StringValuePtr(argv[0]);
    result = (char *)OSRSpatialReferenceShadow_GetAuthorityName(arg1,(char const *)arg2);
    
    vresult = rb_str_new2(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetUTM(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    int arg2 ;
    int arg3 = (int) 1 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 2))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = NUM2INT(argv[0]);
    if (argc > 1) {
        arg3 = NUM2INT(argv[1]);
    }
    result = (OGRErr)OSRSpatialReferenceShadow_SetUTM(arg1,arg2,arg3);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetStatePlane(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    int arg2 ;
    int arg3 = (int) 1 ;
    char *arg4 = (char *) "" ;
    double arg5 = (double) 0.0 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 4))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = NUM2INT(argv[0]);
    if (argc > 1) {
        arg3 = NUM2INT(argv[1]);
    }
    if (argc > 2) {
        arg4 = StringValuePtr(argv[2]);
    }
    if (argc > 3) {
        arg5 = (double) NUM2DBL(argv[3]);
    }
    result = (OGRErr)OSRSpatialReferenceShadow_SetStatePlane(arg1,arg2,arg3,(char const *)arg4,arg5);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_AutoIdentifyEPSG(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (OGRErr)OSRSpatialReferenceShadow_AutoIdentifyEPSG(arg1);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetProjection(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = StringValuePtr(argv[0]);
    result = (OGRErr)OSRSpatialReferenceShadow_SetProjection(arg1,(char const *)arg2);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetProjParm(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    double arg3 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 2) || (argc > 2))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = StringValuePtr(argv[0]);
    arg3 = (double) NUM2DBL(argv[1]);
    result = (OGRErr)OSRSpatialReferenceShadow_SetProjParm(arg1,(char const *)arg2,arg3);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_GetProjParm(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    double arg3 = (double) 0.0 ;
    double result;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 2))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = StringValuePtr(argv[0]);
    if (argc > 1) {
        arg3 = (double) NUM2DBL(argv[1]);
    }
    result = (double)OSRSpatialReferenceShadow_GetProjParm(arg1,(char const *)arg2,arg3);
    
    vresult = rb_float_new(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetNormProjParm(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    double arg3 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 2) || (argc > 2))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = StringValuePtr(argv[0]);
    arg3 = (double) NUM2DBL(argv[1]);
    result = (OGRErr)OSRSpatialReferenceShadow_SetNormProjParm(arg1,(char const *)arg2,arg3);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_GetNormProjParm(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    double arg3 = (double) 0.0 ;
    double result;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 2))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = StringValuePtr(argv[0]);
    if (argc > 1) {
        arg3 = (double) NUM2DBL(argv[1]);
    }
    result = (double)OSRSpatialReferenceShadow_GetNormProjParm(arg1,(char const *)arg2,arg3);
    
    vresult = rb_float_new(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetACEA(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    double arg2 ;
    double arg3 ;
    double arg4 ;
    double arg5 ;
    double arg6 ;
    double arg7 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 6) || (argc > 6))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = (double) NUM2DBL(argv[0]);
    arg3 = (double) NUM2DBL(argv[1]);
    arg4 = (double) NUM2DBL(argv[2]);
    arg5 = (double) NUM2DBL(argv[3]);
    arg6 = (double) NUM2DBL(argv[4]);
    arg7 = (double) NUM2DBL(argv[5]);
    result = (OGRErr)OSRSpatialReferenceShadow_SetACEA(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetAE(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    double arg2 ;
    double arg3 ;
    double arg4 ;
    double arg5 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 4) || (argc > 4))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = (double) NUM2DBL(argv[0]);
    arg3 = (double) NUM2DBL(argv[1]);
    arg4 = (double) NUM2DBL(argv[2]);
    arg5 = (double) NUM2DBL(argv[3]);
    result = (OGRErr)OSRSpatialReferenceShadow_SetAE(arg1,arg2,arg3,arg4,arg5);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetCS(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    double arg2 ;
    double arg3 ;
    double arg4 ;
    double arg5 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 4) || (argc > 4))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = (double) NUM2DBL(argv[0]);
    arg3 = (double) NUM2DBL(argv[1]);
    arg4 = (double) NUM2DBL(argv[2]);
    arg5 = (double) NUM2DBL(argv[3]);
    result = (OGRErr)OSRSpatialReferenceShadow_SetCS(arg1,arg2,arg3,arg4,arg5);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetBonne(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    double arg2 ;
    double arg3 ;
    double arg4 ;
    double arg5 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 4) || (argc > 4))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = (double) NUM2DBL(argv[0]);
    arg3 = (double) NUM2DBL(argv[1]);
    arg4 = (double) NUM2DBL(argv[2]);
    arg5 = (double) NUM2DBL(argv[3]);
    result = (OGRErr)OSRSpatialReferenceShadow_SetBonne(arg1,arg2,arg3,arg4,arg5);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetEC(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    double arg2 ;
    double arg3 ;
    double arg4 ;
    double arg5 ;
    double arg6 ;
    double arg7 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 6) || (argc > 6))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 6)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = (double) NUM2DBL(argv[0]);
    arg3 = (double) NUM2DBL(argv[1]);
    arg4 = (double) NUM2DBL(argv[2]);
    arg5 = (double) NUM2DBL(argv[3]);
    arg6 = (double) NUM2DBL(argv[4]);
    arg7 = (double) NUM2DBL(argv[5]);
    result = (OGRErr)OSRSpatialReferenceShadow_SetEC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetEckertIV(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    double arg2 ;
    double arg3 ;
    double arg4 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 3) || (argc > 3))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = (double) NUM2DBL(argv[0]);
    arg3 = (double) NUM2DBL(argv[1]);
    arg4 = (double) NUM2DBL(argv[2]);
    result = (OGRErr)OSRSpatialReferenceShadow_SetEckertIV(arg1,arg2,arg3,arg4);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetEckertVI(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    double arg2 ;
    double arg3 ;
    double arg4 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 3) || (argc > 3))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = (double) NUM2DBL(argv[0]);
    arg3 = (double) NUM2DBL(argv[1]);
    arg4 = (double) NUM2DBL(argv[2]);
    result = (OGRErr)OSRSpatialReferenceShadow_SetEckertVI(arg1,arg2,arg3,arg4);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetEquirectangular(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    double arg2 ;
    double arg3 ;
    double arg4 ;
    double arg5 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 4) || (argc > 4))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = (double) NUM2DBL(argv[0]);
    arg3 = (double) NUM2DBL(argv[1]);
    arg4 = (double) NUM2DBL(argv[2]);
    arg5 = (double) NUM2DBL(argv[3]);
    result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular(arg1,arg2,arg3,arg4,arg5);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetGS(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    double arg2 ;
    double arg3 ;
    double arg4 ;
    OGRErr result;
    char *kwnames[] = {
        "self","cm","fe","fn", NULL 
    };
    VALUE vresult = Qnil;
    
    if ((argc < 3) || (argc > 3))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = (double) NUM2DBL(argv[0]);
    arg3 = (double) NUM2DBL(argv[1]);
    arg4 = (double) NUM2DBL(argv[2]);
    result = (OGRErr)OSRSpatialReferenceShadow_SetGS(arg1,arg2,arg3,arg4);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetWellKnownGeogCS(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = StringValuePtr(argv[0]);
    result = (OGRErr)OSRSpatialReferenceShadow_SetWellKnownGeogCS(arg1,(char const *)arg2);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetFromUserInput(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = StringValuePtr(argv[0]);
    result = (OGRErr)OSRSpatialReferenceShadow_SetFromUserInput(arg1,(char const *)arg2);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_CopyGeogCSFrom(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (OGRErr)OSRSpatialReferenceShadow_CopyGeogCSFrom(arg1,arg2);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetTOWGS84(int argc, VALUE *argv, VALUE self) {
    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 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 3) || (argc > 7))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = (double) NUM2DBL(argv[0]);
    arg3 = (double) NUM2DBL(argv[1]);
    arg4 = (double) NUM2DBL(argv[2]);
    if (argc > 3) {
        arg5 = (double) NUM2DBL(argv[3]);
    }
    if (argc > 4) {
        arg6 = (double) NUM2DBL(argv[4]);
    }
    if (argc > 5) {
        arg7 = (double) NUM2DBL(argv[5]);
    }
    if (argc > 6) {
        arg8 = (double) NUM2DBL(argv[6]);
    }
    result = (OGRErr)OSRSpatialReferenceShadow_SetTOWGS84(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_GetTOWGS84(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    double *arg2 ;
    OGRErr result;
    double argout2[7] ;
    VALUE vresult = Qnil;
    
    {
        /* %typemap(ruby,in,numinputs=0) (double argout2[ANY]) */
        arg2 = argout2;
    }
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (OGRErr)OSRSpatialReferenceShadow_GetTOWGS84(arg1,arg2);
    
    vresult = INT2NUM(result);
    {
        /* %typemap(ruby,argout) (double argout[ANY]) */
        vresult = rb_ary_new();
        
        for(int i=0; i<7; i++)
        {
            VALUE value = rb_float_new(arg2[i]);
            rb_ary_push(vresult, value);
        }
    }
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetGeogCS(int argc, VALUE *argv, VALUE self) {
    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 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 5) || (argc > 9))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 5)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = StringValuePtr(argv[0]);
    arg3 = StringValuePtr(argv[1]);
    arg4 = StringValuePtr(argv[2]);
    arg5 = (double) NUM2DBL(argv[3]);
    arg6 = (double) NUM2DBL(argv[4]);
    if (argc > 5) {
        arg7 = StringValuePtr(argv[5]);
    }
    if (argc > 6) {
        arg8 = (double) NUM2DBL(argv[6]);
    }
    if (argc > 7) {
        arg9 = StringValuePtr(argv[7]);
    }
    if (argc > 8) {
        arg10 = (double) NUM2DBL(argv[8]);
    }
    result = (OGRErr)OSRSpatialReferenceShadow_SetGeogCS(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,(char const *)arg7,arg8,(char const *)arg9,arg10);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_SetProjCS(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *arg2 = (char *) "unnamed" ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 0) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    if (argc > 0) {
        arg2 = StringValuePtr(argv[0]);
    }
    result = (OGRErr)OSRSpatialReferenceShadow_SetProjCS(arg1,(char const *)arg2);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_ImportFromWkt(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    OGRErr result;
    char *val2 = 0 ;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    {
        /* %typemap(ruby,in) char ** ( char *val2=0 ) */
        
        val2 = StringValuePtr(argv[0]);
        arg2 = &val2;
    }
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromWkt(arg1,arg2);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_ImportFromProj4(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = StringValuePtr(argv[0]);
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromProj4(arg1,arg2);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_ImportFromESRI(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    OGRErr result;
    char *val2 = 0 ;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    {
        /* %typemap(ruby,in) char ** ( char *val2=0 ) */
        
        val2 = StringValuePtr(argv[0]);
        arg2 = &val2;
    }
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromESRI(arg1,arg2);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_ImportFromEPSG(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    int arg2 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = NUM2INT(argv[0]);
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSG(arg1,arg2);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_ImportFromPCI(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *arg3 = (char *) "METRE" ;
    double *arg4 = (double *) (double *)0 ;
    OGRErr result;
    double argin4[17] ;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 3))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = StringValuePtr(argv[0]);
    if (argc > 1) {
        arg3 = StringValuePtr(argv[1]);
    }
    if (argc > 2) {
        {
            /* %typemap(ruby,in) (double argin4[ANY]) (double argin4[17]) */
            /* Make sure this is an array. */
            Check_Type(argv[2], T_ARRAY);
            
            /* Get the length */
            int seq_size = RARRAY(argv[2])->len;
            
            if ( seq_size != 17 ) {
                rb_raise(rb_eRangeError, "sequence must have length %i.", seq_size);
            }
            
            for( int i = 0; i<17; i++ ) {
                /* Get the Ruby Object */
                VALUE item = rb_ary_entry(argv[2],i);
                
                /* Convert to double */
                arg4[i] = NUM2DBL(item);
            }
        }
    }
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromPCI(arg1,(char const *)arg2,(char const *)arg3,arg4);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_ImportFromUSGS(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    long arg2 ;
    long arg3 = (long) 0 ;
    double *arg4 = (double *) (double *)0 ;
    long arg5 = (long) 0 ;
    OGRErr result;
    double argin4[15] ;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 4))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = NUM2LONG(argv[0]);
    if (argc > 1) {
        arg3 = NUM2LONG(argv[1]);
    }
    if (argc > 2) {
        {
            /* %typemap(ruby,in) (double argin4[ANY]) (double argin4[15]) */
            /* Make sure this is an array. */
            Check_Type(argv[2], T_ARRAY);
            
            /* Get the length */
            int seq_size = RARRAY(argv[2])->len;
            
            if ( seq_size != 15 ) {
                rb_raise(rb_eRangeError, "sequence must have length %i.", seq_size);
            }
            
            for( int i = 0; i<15; i++ ) {
                /* Get the Ruby Object */
                VALUE item = rb_ary_entry(argv[2],i);
                
                /* Convert to double */
                arg4[i] = NUM2DBL(item);
            }
        }
    }
    if (argc > 3) {
        arg5 = NUM2LONG(argv[3]);
    }
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUSGS(arg1,arg2,arg3,arg4,arg5);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_ImportFromXML(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    arg2 = StringValuePtr(argv[0]);
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromXML(arg1,(char const *)arg2);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_ExportToWkt(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    OGRErr result;
    char *argout2 = 0 ;
    VALUE vresult = Qnil;
    
    {
        /* %typemap(ruby,in,numinputs=0) (char **argout2) ( char *argout2=0 ) */
        
        arg2 = &argout2;
    }
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (OGRErr)OSRSpatialReferenceShadow_ExportToWkt(arg1,arg2);
    
    vresult = INT2NUM(result);
    {
        /* %typemap(ruby,argout) (char **argout) */
        
        if ( arg2 ) {
            vresult = rb_str_new2( *arg2 );
        }
        else {
            vresult = Qnil;
        }
    }
    {
        /* %typemap(ruby,freearg) (char **argout) */
        
        if ( *arg2 )
        CPLFree( *arg2 );
    }
    return vresult;
}


static VALUE
_wrap_SpatialReference_ExportToPrettyWkt(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    int arg3 = (int) 0 ;
    OGRErr result;
    char *argout2 = 0 ;
    VALUE vresult = Qnil;
    
    {
        /* %typemap(ruby,in,numinputs=0) (char **argout2) ( char *argout2=0 ) */
        
        arg2 = &argout2;
    }
    if ((argc < 0) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    if (argc > 0) {
        arg3 = NUM2INT(argv[0]);
    }
    result = (OGRErr)OSRSpatialReferenceShadow_ExportToPrettyWkt(arg1,arg2,arg3);
    
    vresult = INT2NUM(result);
    {
        /* %typemap(ruby,argout) (char **argout) */
        
        if ( arg2 ) {
            vresult = rb_str_new2( *arg2 );
        }
        else {
            vresult = Qnil;
        }
    }
    {
        /* %typemap(ruby,freearg) (char **argout) */
        
        if ( *arg2 )
        CPLFree( *arg2 );
    }
    return vresult;
}


static VALUE
_wrap_SpatialReference_ExportToProj4(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    OGRErr result;
    char *argout2 = 0 ;
    VALUE vresult = Qnil;
    
    {
        /* %typemap(ruby,in,numinputs=0) (char **argout2) ( char *argout2=0 ) */
        
        arg2 = &argout2;
    }
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (OGRErr)OSRSpatialReferenceShadow_ExportToProj4(arg1,arg2);
    
    vresult = INT2NUM(result);
    {
        /* %typemap(ruby,argout) (char **argout) */
        
        if ( arg2 ) {
            vresult = rb_str_new2( *arg2 );
        }
        else {
            vresult = Qnil;
        }
    }
    {
        /* %typemap(ruby,freearg) (char **argout) */
        
        if ( *arg2 )
        CPLFree( *arg2 );
    }
    return vresult;
}


static VALUE
_wrap_SpatialReference_ExportToPCI(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    char **arg3 = (char **) 0 ;
    double **arg4 ;
    OGRErr result;
    char *argout2 = 0 ;
    char *argout3 = 0 ;
    double *argout4 ;
    VALUE vresult = Qnil;
    
    {
        /* %typemap(ruby,in,numinputs=0) (char **argout2) ( char *argout2=0 ) */
        
        arg2 = &argout2;
    }
    {
        /* %typemap(ruby,in,numinputs=0) (char **argout3) ( char *argout3=0 ) */
        
        arg3 = &argout3;
    }
    {
        /* %typemap(ruby,in,numinputs=0) (double *argout4[ANY]) */
        arg4 = &argout4;
    }
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (OGRErr)OSRSpatialReferenceShadow_ExportToPCI(arg1,arg2,arg3,arg4);
    
    vresult = INT2NUM(result);
    {
        /* %typemap(ruby,argout) (char **argout) */
        
        if ( arg2 ) {
            vresult = rb_str_new2( *arg2 );
        }
        else {
            vresult = Qnil;
        }
    }
    {
        /* %typemap(ruby,argout) (char **argout) */
        
        if ( arg3 ) {
            vresult = rb_str_new2( *arg3 );
        }
        else {
            vresult = Qnil;
        }
    }
    {
        /* %typemap(ruby,argout) (double argout[ANY]) */
        vresult = rb_ary_new();
        
        for(int i=0; i<17; i++)
        {
            VALUE value = rb_float_new(*arg4[i]);
            rb_ary_push(vresult, value);
        }
    }
    {
        /* %typemap(ruby,freearg) (char **argout) */
        
        if ( *arg2 )
        CPLFree( *arg2 );
    }
    {
        /* %typemap(ruby,freearg) (char **argout) */
        
        if ( *arg3 )
        CPLFree( *arg3 );
    }
    {
        /* %typemap(ruby, freearg) (double *argout[ANY]) */
        CPLFree(*arg4);
    }
    return vresult;
}


static VALUE
_wrap_SpatialReference_ExportToUSGS(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    long *arg2 = (long *) 0 ;
    long *arg3 = (long *) 0 ;
    double **arg4 ;
    long *arg5 = (long *) 0 ;
    OGRErr result;
    long temp2 ;
    long temp3 ;
    double *argout4 ;
    long temp5 ;
    VALUE vresult = Qnil;
    
    arg2 = &temp2;
    arg3 = &temp3;
    {
        /* %typemap(ruby,in,numinputs=0) (double *argout4[ANY]) */
        arg4 = &argout4;
    }
    arg5 = &temp5;
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (OGRErr)OSRSpatialReferenceShadow_ExportToUSGS(arg1,arg2,arg3,arg4,arg5);
    
    vresult = INT2NUM(result);
    {
        VALUE o = INT2NUM((long) (*arg2));
        vresult = output_helper(vresult, o);
    }
    {
        VALUE o = INT2NUM((long) (*arg3));
        vresult = output_helper(vresult, o);
    }
    {
        /* %typemap(ruby,argout) (double argout[ANY]) */
        vresult = rb_ary_new();
        
        for(int i=0; i<15; i++)
        {
            VALUE value = rb_float_new(*arg4[i]);
            rb_ary_push(vresult, value);
        }
    }
    {
        VALUE o = INT2NUM((long) (*arg5));
        vresult = output_helper(vresult, o);
    }
    {
        /* %typemap(ruby, freearg) (double *argout[ANY]) */
        CPLFree(*arg4);
    }
    return vresult;
}


static VALUE
_wrap_SpatialReference_ExportToXML(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    char *arg3 = (char *) "" ;
    OGRErr result;
    char *argout2 = 0 ;
    VALUE vresult = Qnil;
    
    {
        /* %typemap(ruby,in,numinputs=0) (char **argout2) ( char *argout2=0 ) */
        
        arg2 = &argout2;
    }
    if ((argc < 0) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    if (argc > 0) {
        arg3 = StringValuePtr(argv[0]);
    }
    result = (OGRErr)OSRSpatialReferenceShadow_ExportToXML(arg1,arg2,(char const *)arg3);
    
    vresult = INT2NUM(result);
    {
        /* %typemap(ruby,argout) (char **argout) */
        
        if ( arg2 ) {
            vresult = rb_str_new2( *arg2 );
        }
        else {
            vresult = Qnil;
        }
    }
    {
        /* %typemap(ruby,freearg) (char **argout) */
        
        if ( *arg2 )
        CPLFree( *arg2 );
    }
    return vresult;
}


static VALUE
_wrap_SpatialReference_CloneGeogCS(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    OSRSpatialReferenceShadow *result;
    VALUE vresult = Qnil;
    
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_CloneGeogCS(arg1);
    
    vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_OSRSpatialReferenceShadow,1);
    return vresult;
}


static VALUE
_wrap_SpatialReference_Validate(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (OGRErr)OSRSpatialReferenceShadow_Validate(arg1);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_StripCTParms(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (OGRErr)OSRSpatialReferenceShadow_StripCTParms(arg1);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_FixupOrdering(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (OGRErr)OSRSpatialReferenceShadow_FixupOrdering(arg1);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_Fixup(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (OGRErr)OSRSpatialReferenceShadow_Fixup(arg1);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_MorphToESRI(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (OGRErr)OSRSpatialReferenceShadow_MorphToESRI(arg1);
    
    vresult = INT2NUM(result);
    return vresult;
}


static VALUE
_wrap_SpatialReference_MorphFromESRI(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    OGRErr result;
    VALUE vresult = Qnil;
    
    if ((argc < 0) || (argc > 0))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (OGRErr)OSRSpatialReferenceShadow_MorphFromESRI(arg1);
    
    vresult = INT2NUM(result);
    return vresult;
}


swig_class cCoordinateTransformation;

#ifdef HAVE_RB_DEFINE_ALLOC_FUNC
static VALUE
_wrap_CoordinateTransformation_allocate(VALUE self) {
#else
    static VALUE
    _wrap_CoordinateTransformation_allocate(int argc, VALUE *argv, VALUE self) {
#endif
        
        
        VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_OSRCoordinateTransformationShadow);
#ifndef HAVE_RB_DEFINE_ALLOC_FUNC
        rb_obj_call_init(vresult, argc, argv);
#endif
        return vresult;
    }
    

static VALUE
_wrap_new_CoordinateTransformation(int argc, VALUE *argv, VALUE self) {
    OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    OSRCoordinateTransformationShadow *result;
    
    if ((argc < 2) || (argc > 2))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
    SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_OSRSpatialReferenceShadow, 1);
    result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow(arg1,arg2);
    DATA_PTR(self) = result;
    return self;
}


static void delete_OSRCoordinateTransformationShadow(OSRCoordinateTransformationShadow *self){
    OCTDestroyCoordinateTransformation( self );
  }
static void
free_OSRCoordinateTransformationShadow(OSRCoordinateTransformationShadow *arg1) {
    delete_OSRCoordinateTransformationShadow(arg1);
}
static VALUE
_wrap_CoordinateTransformation_TransformPoint__SWIG_0(int argc, VALUE *argv, VALUE self) {
    OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
    double *arg2 ;
    double argin2[3] ;
    VALUE vresult = Qnil;
    
    if ((argc < 1) || (argc > 1))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRCoordinateTransformationShadow, 1);
    {
        /* %typemap(ruby,in) (double argin2[ANY]) (double argin2[3]) */
        /* Make sure this is an array. */
        Check_Type(argv[0], T_ARRAY);
        
        /* Get the length */
        int seq_size = RARRAY(argv[0])->len;
        
        if ( seq_size != 3 ) {
            rb_raise(rb_eRangeError, "sequence must have length %i.", seq_size);
        }
        
        for( int i = 0; i<3; i++ ) {
            /* Get the Ruby Object */
            VALUE item = rb_ary_entry(argv[0],i);
            
            /* Convert to double */
            arg2[i] = NUM2DBL(item);
        }
    }
    OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(arg1,arg2);
    
    {
        /* %typemap(ruby,argout) (double argout[ANY]) */
        vresult = rb_ary_new();
        
        for(int i=0; i<3; i++)
        {
            VALUE value = rb_float_new(arg2[i]);
            rb_ary_push(vresult, value);
        }
    }
    return vresult;
}


static VALUE
_wrap_CoordinateTransformation_TransformPoint__SWIG_1(int argc, VALUE *argv, VALUE self) {
    OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
    double *arg2 ;
    double arg3 ;
    double arg4 ;
    double arg5 = (double) 0.0 ;
    double argout2[3] ;
    VALUE vresult = Qnil;
    
    {
        /* %typemap(ruby,in,numinputs=0) (double argout2[ANY]) */
        arg2 = argout2;
    }
    if ((argc < 2) || (argc > 3))
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc);
    SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_OSRCoordinateTransformationShadow, 1);
    arg3 = (double) NUM2DBL(argv[0]);
    arg4 = (double) NUM2DBL(argv[1]);
    if (argc > 2) {
        arg5 = (double) NUM2DBL(argv[2]);
    }
    OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5);
    
    {
        /* %typemap(ruby,argout) (double argout[ANY]) */
        vresult = rb_ary_new();
        
        for(int i=0; i<3; i++)
        {
            VALUE value = rb_float_new(arg2[i]);
            rb_ary_push(vresult, value);
        }
    }
    return vresult;
}


static VALUE _wrap_CoordinateTransformation_TransformPoint(int nargs, VALUE *args, VALUE self) {
    int argc;
    VALUE argv[5];
    int ii;
    
    argc = nargs + 1;
    argv[0] = self;
    for (ii = 1; (ii < argc) && (ii < 4); ii++) {
        argv[ii] = args[ii-1];
    }
    if (argc == 2) {
        int _v;
        {
            void *ptr;
            _v = (NIL_P(argv[0]) || (TYPE(argv[0]) == T_DATA && SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0) != -1)) ? 1 : 0;
        }
        if (_v) {
            {
                void *ptr;
                _v = (NIL_P(argv[1]) || (TYPE(argv[1]) == T_DATA && SWIG_ConvertPtr(argv[1], &ptr, SWIGTYPE_p_double, 0) != -1)) ? 1 : 0;
            }
            if (_v) {
                return _wrap_CoordinateTransformation_TransformPoint__SWIG_0(nargs, args, self);
            }
        }
    }
    if ((argc >= 3) && (argc <= 4)) {
        int _v;
        {
            void *ptr;
            _v = (NIL_P(argv[0]) || (TYPE(argv[0]) == T_DATA && SWIG_ConvertPtr(argv[0], &ptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0) != -1)) ? 1 : 0;
        }
        if (_v) {
            {
                _v = ((TYPE(argv[1]) == T_FLOAT) || (TYPE(argv[1]) == T_FIXNUM) || (TYPE(argv[1]) == T_BIGNUM)) ? 1 : 0;
            }
            if (_v) {
                {
                    _v = ((TYPE(argv[2]) == T_FLOAT) || (TYPE(argv[2]) == T_FIXNUM) || (TYPE(argv[2]) == T_BIGNUM)) ? 1 : 0;
                }
                if (_v) {
                    if (argc <= 3) {
                        return _wrap_CoordinateTransformation_TransformPoint__SWIG_1(nargs, args, self);
                    }
                    {
                        _v = ((TYPE(argv[3]) == T_FLOAT) || (TYPE(argv[3]) == T_FIXNUM) || (TYPE(argv[3]) == T_BIGNUM)) ? 1 : 0;
                    }
                    if (_v) {
                        return _wrap_CoordinateTransformation_TransformPoint__SWIG_1(nargs, args, self);
                    }
                }
            }
        }
    }
    
    rb_raise(rb_eArgError, "No matching function for overloaded 'CoordinateTransformation_TransformPoint'");
    return Qnil;
}



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

static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, 0};
static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "int *|OGRErr *", 0, 0, 0};
static swig_type_info _swigt__p_long = {"_p_long", "long *", 0, 0, 0};
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, 0};
static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, 0};
static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "unsigned long *|VALUE *", 0, 0, 0};

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

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_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 _swigc__p_unsigned_long[] = {  {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};

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


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

/*************************************************************************
 * Type initialization:
 * This problem is tough by the requirement that no dynamic 
 * memory is used. Also, since swig_type_info structures store pointers to 
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization. 
 * The idea is that swig generates all the structures that are needed. 
 * The runtime then collects these partially filled structures. 
 * The SWIG_InitializeModule function takes these initial arrays out of 
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.

 * The generated swig_type_info structures are assigned staticly to an initial 
 * array. We just loop though that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast linked list. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns. So to actually build the cast linked list,
 * we find the array of casts associated with the type, and loop through it 
 * adding the casts to the list. The one last trick we need to do is making
 * sure the type pointer in the swig_cast_info struct is correct.

 * First off, we lookup the cast->type name to see if it is already loaded. 
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the 
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the linked list (because the cast->type) pointer will
 *     be correct.
**/

#ifdef __cplusplus
extern "C" {
#endif

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

  clientdata = clientdata;

  if (init_run) return;
  init_run = 1;

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

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

    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
      if (swig_module.type_initial[i]->clientdata) type->clientdata = swig_module.type_initial[i]->clientdata;
    } else {
      type = swig_module.type_initial[i];
    }

    /* Insert casting types */
    cast = swig_module.cast_initial[i];
    while (cast->type) {
    
      /* Don't need to add information already in the list */
      ret = 0;
      if (swig_module.next != &swig_module) {
        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
      }
      if (ret && type == swig_module.type_initial[i]) {
        cast->type = ret;
        ret = 0;
      }
      
      if (!ret) {
        if (type->cast) {
          type->cast->prev = cast;
          cast->next = type->cast;
        }
        type->cast = cast;
      }

      cast++;
    }

    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
}

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

  if (init_run) return;
  init_run = 1;

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

#ifdef __cplusplus
}
#endif


#ifdef __cplusplus
extern "C"
#endif
SWIGEXPORT void Init_osr(void) {
    int i;
    
    SWIG_InitRuntime();
    mOsr = rb_define_module("Osr");
    
    SWIG_InitializeModule(0);
    for (i = 0; i < swig_module.size; i++) {
        SWIG_define_class(swig_module.types[i]);
    }
    
    rb_define_const(mOsr,"SRS_PT_ALBERS_CONIC_EQUAL_AREA", rb_str_new2("SRS_PT_ALBERS_CONIC_EQUAL_AREA"));
    rb_define_const(mOsr,"SRS_PT_AZIMUTHAL_EQUIDISTANT", rb_str_new2("SRS_PT_AZIMUTHAL_EQUIDISTANT"));
    rb_define_const(mOsr,"SRS_PT_CASSINI_SOLDNER", rb_str_new2("SRS_PT_CASSINI_SOLDNER"));
    rb_define_const(mOsr,"SRS_PT_CYLINDRICAL_EQUAL_AREA", rb_str_new2("SRS_PT_CYLINDRICAL_EQUAL_AREA"));
    rb_define_const(mOsr,"SRS_PT_ECKERT_IV", rb_str_new2("SRS_PT_ECKERT_IV"));
    rb_define_const(mOsr,"SRS_PT_ECKERT_VI", rb_str_new2("SRS_PT_ECKERT_VI"));
    rb_define_const(mOsr,"SRS_PT_EQUIDISTANT_CONIC", rb_str_new2("SRS_PT_EQUIDISTANT_CONIC"));
    rb_define_const(mOsr,"SRS_PT_EQUIRECTANGULAR", rb_str_new2("SRS_PT_EQUIRECTANGULAR"));
    rb_define_const(mOsr,"SRS_PT_GALL_STEREOGRAPHIC", rb_str_new2("SRS_PT_GALL_STEREOGRAPHIC"));
    rb_define_const(mOsr,"SRS_PT_GNOMONIC", rb_str_new2("SRS_PT_GNOMONIC"));
    rb_define_const(mOsr,"SRS_PT_GOODE_HOMOLOSINE", rb_str_new2("SRS_PT_GOODE_HOMOLOSINE"));
    rb_define_const(mOsr,"SRS_PT_HOTINE_OBLIQUE_MERCATOR", rb_str_new2("SRS_PT_HOTINE_OBLIQUE_MERCATOR"));
    rb_define_const(mOsr,"SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN", rb_str_new2("SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN"));
    rb_define_const(mOsr,"SRS_PT_LABORDE_OBLIQUE_MERCATOR", rb_str_new2("SRS_PT_LABORDE_OBLIQUE_MERCATOR"));
    rb_define_const(mOsr,"SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP", rb_str_new2("SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP"));
    rb_define_const(mOsr,"SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP", rb_str_new2("SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP"));
    rb_define_const(mOsr,"SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM", rb_str_new2("SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM"));
    rb_define_const(mOsr,"SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA", rb_str_new2("SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA"));
    rb_define_const(mOsr,"SRS_PT_MERCATOR_1SP", rb_str_new2("SRS_PT_MERCATOR_1SP"));
    rb_define_const(mOsr,"SRS_PT_MERCATOR_2SP", rb_str_new2("SRS_PT_MERCATOR_2SP"));
    rb_define_const(mOsr,"SRS_PT_MILLER_CYLINDRICAL", rb_str_new2("SRS_PT_MILLER_CYLINDRICAL"));
    rb_define_const(mOsr,"SRS_PT_MOLLWEIDE", rb_str_new2("SRS_PT_MOLLWEIDE"));
    rb_define_const(mOsr,"SRS_PT_NEW_ZEALAND_MAP_GRID", rb_str_new2("SRS_PT_NEW_ZEALAND_MAP_GRID"));
    rb_define_const(mOsr,"SRS_PT_OBLIQUE_STEREOGRAPHIC", rb_str_new2("SRS_PT_OBLIQUE_STEREOGRAPHIC"));
    rb_define_const(mOsr,"SRS_PT_ORTHOGRAPHIC", rb_str_new2("SRS_PT_ORTHOGRAPHIC"));
    rb_define_const(mOsr,"SRS_PT_POLAR_STEREOGRAPHIC", rb_str_new2("SRS_PT_POLAR_STEREOGRAPHIC"));
    rb_define_const(mOsr,"SRS_PT_POLYCONIC", rb_str_new2("SRS_PT_POLYCONIC"));
    rb_define_const(mOsr,"SRS_PT_ROBINSON", rb_str_new2("SRS_PT_ROBINSON"));
    rb_define_const(mOsr,"SRS_PT_SINUSOIDAL", rb_str_new2("SRS_PT_SINUSOIDAL"));
    rb_define_const(mOsr,"SRS_PT_STEREOGRAPHIC", rb_str_new2("SRS_PT_STEREOGRAPHIC"));
    rb_define_const(mOsr,"SRS_PT_SWISS_OBLIQUE_CYLINDRICAL", rb_str_new2("SRS_PT_SWISS_OBLIQUE_CYLINDRICAL"));
    rb_define_const(mOsr,"SRS_PT_TRANSVERSE_MERCATOR", rb_str_new2("SRS_PT_TRANSVERSE_MERCATOR"));
    rb_define_const(mOsr,"SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED", rb_str_new2("SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED"));
    rb_define_const(mOsr,"SRS_PT_TRANSVERSE_MERCATOR_MI_22", rb_str_new2("SRS_PT_TRANSVERSE_MERCATOR_MI_22"));
    rb_define_const(mOsr,"SRS_PT_TRANSVERSE_MERCATOR_MI_23", rb_str_new2("SRS_PT_TRANSVERSE_MERCATOR_MI_23"));
    rb_define_const(mOsr,"SRS_PT_TRANSVERSE_MERCATOR_MI_24", rb_str_new2("SRS_PT_TRANSVERSE_MERCATOR_MI_24"));
    rb_define_const(mOsr,"SRS_PT_TRANSVERSE_MERCATOR_MI_25", rb_str_new2("SRS_PT_TRANSVERSE_MERCATOR_MI_25"));
    rb_define_const(mOsr,"SRS_PT_TUNISIA_MINING_GRID", rb_str_new2("SRS_PT_TUNISIA_MINING_GRID"));
    rb_define_const(mOsr,"SRS_PT_VANDERGRINTEN", rb_str_new2("SRS_PT_VANDERGRINTEN"));
    rb_define_const(mOsr,"SRS_PT_KROVAK", rb_str_new2("SRS_PT_KROVAK"));
    rb_define_const(mOsr,"SRS_PP_CENTRAL_MERIDIAN", rb_str_new2("SRS_PP_CENTRAL_MERIDIAN"));
    rb_define_const(mOsr,"SRS_PP_SCALE_FACTOR", rb_str_new2("SRS_PP_SCALE_FACTOR"));
    rb_define_const(mOsr,"SRS_PP_STANDARD_PARALLEL_1", rb_str_new2("SRS_PP_STANDARD_PARALLEL_1"));
    rb_define_const(mOsr,"SRS_PP_STANDARD_PARALLEL_2", rb_str_new2("SRS_PP_STANDARD_PARALLEL_2"));
    rb_define_const(mOsr,"SRS_PP_PSEUDO_STD_PARALLEL_1", rb_str_new2("SRS_PP_PSEUDO_STD_PARALLEL_1"));
    rb_define_const(mOsr,"SRS_PP_LONGITUDE_OF_CENTER", rb_str_new2("SRS_PP_LONGITUDE_OF_CENTER"));
    rb_define_const(mOsr,"SRS_PP_LATITUDE_OF_CENTER", rb_str_new2("SRS_PP_LATITUDE_OF_CENTER"));
    rb_define_const(mOsr,"SRS_PP_LONGITUDE_OF_ORIGIN", rb_str_new2("SRS_PP_LONGITUDE_OF_ORIGIN"));
    rb_define_const(mOsr,"SRS_PP_LATITUDE_OF_ORIGIN", rb_str_new2("SRS_PP_LATITUDE_OF_ORIGIN"));
    rb_define_const(mOsr,"SRS_PP_FALSE_EASTING", rb_str_new2("SRS_PP_FALSE_EASTING"));
    rb_define_const(mOsr,"SRS_PP_FALSE_NORTHING", rb_str_new2("SRS_PP_FALSE_NORTHING"));
    rb_define_const(mOsr,"SRS_PP_AZIMUTH", rb_str_new2("SRS_PP_AZIMUTH"));
    rb_define_const(mOsr,"SRS_PP_LONGITUDE_OF_POINT_1", rb_str_new2("SRS_PP_LONGITUDE_OF_POINT_1"));
    rb_define_const(mOsr,"SRS_PP_LATITUDE_OF_POINT_1", rb_str_new2("SRS_PP_LATITUDE_OF_POINT_1"));
    rb_define_const(mOsr,"SRS_PP_LONGITUDE_OF_POINT_2", rb_str_new2("SRS_PP_LONGITUDE_OF_POINT_2"));
    rb_define_const(mOsr,"SRS_PP_LATITUDE_OF_POINT_2", rb_str_new2("SRS_PP_LATITUDE_OF_POINT_2"));
    rb_define_const(mOsr,"SRS_PP_LONGITUDE_OF_POINT_3", rb_str_new2("SRS_PP_LONGITUDE_OF_POINT_3"));
    rb_define_const(mOsr,"SRS_PP_LATITUDE_OF_POINT_3", rb_str_new2("SRS_PP_LATITUDE_OF_POINT_3"));
    rb_define_const(mOsr,"SRS_PP_RECTIFIED_GRID_ANGLE", rb_str_new2("SRS_PP_RECTIFIED_GRID_ANGLE"));
    rb_define_const(mOsr,"SRS_PP_LANDSAT_NUMBER", rb_str_new2("SRS_PP_LANDSAT_NUMBER"));
    rb_define_const(mOsr,"SRS_PP_PATH_NUMBER", rb_str_new2("SRS_PP_PATH_NUMBER"));
    rb_define_const(mOsr,"SRS_PP_PERSPECTIVE_POINT_HEIGHT", rb_str_new2("SRS_PP_PERSPECTIVE_POINT_HEIGHT"));
    rb_define_const(mOsr,"SRS_PP_FIPSZONE", rb_str_new2("SRS_PP_FIPSZONE"));
    rb_define_const(mOsr,"SRS_PP_ZONE", rb_str_new2("SRS_PP_ZONE"));
    rb_define_const(mOsr,"SRS_UL_METER", rb_str_new2("SRS_UL_METER"));
    rb_define_const(mOsr,"SRS_UL_FOOT", rb_str_new2("SRS_UL_FOOT"));
    rb_define_const(mOsr,"SRS_UL_FOOT_CONV", rb_str_new2("SRS_UL_FOOT_CONV"));
    rb_define_const(mOsr,"SRS_UL_US_FOOT", rb_str_new2("SRS_UL_US_FOOT"));
    rb_define_const(mOsr,"SRS_UL_US_FOOT_CONV", rb_str_new2("SRS_UL_US_FOOT_CONV"));
    rb_define_const(mOsr,"SRS_UL_NAUTICAL_MILE", rb_str_new2("SRS_UL_NAUTICAL_MILE"));
    rb_define_const(mOsr,"SRS_UL_NAUTICAL_MILE_CONV", rb_str_new2("SRS_UL_NAUTICAL_MILE_CONV"));
    rb_define_const(mOsr,"SRS_UL_LINK", rb_str_new2("SRS_UL_LINK"));
    rb_define_const(mOsr,"SRS_UL_LINK_CONV", rb_str_new2("SRS_UL_LINK_CONV"));
    rb_define_const(mOsr,"SRS_UL_CHAIN", rb_str_new2("SRS_UL_CHAIN"));
    rb_define_const(mOsr,"SRS_UL_CHAIN_CONV", rb_str_new2("SRS_UL_CHAIN_CONV"));
    rb_define_const(mOsr,"SRS_UL_ROD", rb_str_new2("SRS_UL_ROD"));
    rb_define_const(mOsr,"SRS_UL_ROD_CONV", rb_str_new2("SRS_UL_ROD_CONV"));
    rb_define_const(mOsr,"SRS_DN_NAD27", rb_str_new2("SRS_DN_NAD27"));
    rb_define_const(mOsr,"SRS_DN_NAD83", rb_str_new2("SRS_DN_NAD83"));
    rb_define_const(mOsr,"SRS_DN_WGS72", rb_str_new2("SRS_DN_WGS72"));
    rb_define_const(mOsr,"SRS_DN_WGS84", rb_str_new2("SRS_DN_WGS84"));
    rb_define_const(mOsr,"SRS_WGS84_SEMIMAJOR", rb_float_new(SRS_WGS84_SEMIMAJOR));
    rb_define_const(mOsr,"SRS_WGS84_INVFLATTENING", rb_float_new(SRS_WGS84_INVFLATTENING));
    rb_define_module_function(mOsr, "GetWellKnownGeogCSAsWKT", VALUEFUNC(_wrap_GetWellKnownGeogCSAsWKT), -1);
    rb_define_module_function(mOsr, "GetProjectionMethods", VALUEFUNC(_wrap_GetProjectionMethods), -1);
    rb_define_module_function(mOsr, "GetProjectionMethodParameterList", VALUEFUNC(_wrap_GetProjectionMethodParameterList), -1);
    rb_define_module_function(mOsr, "GetProjectionMethodParamInfo", VALUEFUNC(_wrap_GetProjectionMethodParamInfo), -1);
    
    cSpatialReference.klass = rb_define_class_under(mOsr, "SpatialReference", rb_cObject);
    SWIG_TypeClientData(SWIGTYPE_p_OSRSpatialReferenceShadow, (void *) &cSpatialReference);
    rb_define_alloc_func(cSpatialReference.klass, _wrap_SpatialReference_allocate);
    rb_define_method(cSpatialReference.klass, "initialize", VALUEFUNC(_wrap_new_SpatialReference), -1);
    rb_define_method(cSpatialReference.klass, "to_s", VALUEFUNC(_wrap_SpatialReference___str__), -1);
    rb_define_method(cSpatialReference.klass, "IsSame", VALUEFUNC(_wrap_SpatialReference_IsSame), -1);
    rb_define_method(cSpatialReference.klass, "IsSameGeogCS", VALUEFUNC(_wrap_SpatialReference_IsSameGeogCS), -1);
    rb_define_method(cSpatialReference.klass, "IsGeographic", VALUEFUNC(_wrap_SpatialReference_IsGeographic), -1);
    rb_define_method(cSpatialReference.klass, "IsProjected", VALUEFUNC(_wrap_SpatialReference_IsProjected), -1);
    rb_define_method(cSpatialReference.klass, "GetAttrValue", VALUEFUNC(_wrap_SpatialReference_GetAttrValue), -1);
    rb_define_method(cSpatialReference.klass, "SetAttrValue", VALUEFUNC(_wrap_SpatialReference_SetAttrValue), -1);
    rb_define_method(cSpatialReference.klass, "SetAngularUnits", VALUEFUNC(_wrap_SpatialReference_SetAngularUnits), -1);
    rb_define_method(cSpatialReference.klass, "GetAngularUnits", VALUEFUNC(_wrap_SpatialReference_GetAngularUnits), -1);
    rb_define_method(cSpatialReference.klass, "SetLinearUnits", VALUEFUNC(_wrap_SpatialReference_SetLinearUnits), -1);
    rb_define_method(cSpatialReference.klass, "GetLinearUnits", VALUEFUNC(_wrap_SpatialReference_GetLinearUnits), -1);
    rb_define_method(cSpatialReference.klass, "GetLinearUnitsName", VALUEFUNC(_wrap_SpatialReference_GetLinearUnitsName), -1);
    rb_define_method(cSpatialReference.klass, "GetAuthorityCode", VALUEFUNC(_wrap_SpatialReference_GetAuthorityCode), -1);
    rb_define_method(cSpatialReference.klass, "GetAuthorityName", VALUEFUNC(_wrap_SpatialReference_GetAuthorityName), -1);
    rb_define_method(cSpatialReference.klass, "SetUTM", VALUEFUNC(_wrap_SpatialReference_SetUTM), -1);
    rb_define_method(cSpatialReference.klass, "SetStatePlane", VALUEFUNC(_wrap_SpatialReference_SetStatePlane), -1);
    rb_define_method(cSpatialReference.klass, "AutoIdentifyEPSG", VALUEFUNC(_wrap_SpatialReference_AutoIdentifyEPSG), -1);
    rb_define_method(cSpatialReference.klass, "SetProjection", VALUEFUNC(_wrap_SpatialReference_SetProjection), -1);
    rb_define_method(cSpatialReference.klass, "SetProjParm", VALUEFUNC(_wrap_SpatialReference_SetProjParm), -1);
    rb_define_method(cSpatialReference.klass, "GetProjParm", VALUEFUNC(_wrap_SpatialReference_GetProjParm), -1);
    rb_define_method(cSpatialReference.klass, "SetNormProjParm", VALUEFUNC(_wrap_SpatialReference_SetNormProjParm), -1);
    rb_define_method(cSpatialReference.klass, "GetNormProjParm", VALUEFUNC(_wrap_SpatialReference_GetNormProjParm), -1);
    rb_define_method(cSpatialReference.klass, "SetACEA", VALUEFUNC(_wrap_SpatialReference_SetACEA), -1);
    rb_define_method(cSpatialReference.klass, "SetAE", VALUEFUNC(_wrap_SpatialReference_SetAE), -1);
    rb_define_method(cSpatialReference.klass, "SetCS", VALUEFUNC(_wrap_SpatialReference_SetCS), -1);
    rb_define_method(cSpatialReference.klass, "SetBonne", VALUEFUNC(_wrap_SpatialReference_SetBonne), -1);
    rb_define_method(cSpatialReference.klass, "SetEC", VALUEFUNC(_wrap_SpatialReference_SetEC), -1);
    rb_define_method(cSpatialReference.klass, "SetEckertIV", VALUEFUNC(_wrap_SpatialReference_SetEckertIV), -1);
    rb_define_method(cSpatialReference.klass, "SetEckertVI", VALUEFUNC(_wrap_SpatialReference_SetEckertVI), -1);
    rb_define_method(cSpatialReference.klass, "SetEquirectangular", VALUEFUNC(_wrap_SpatialReference_SetEquirectangular), -1);
    rb_define_method(cSpatialReference.klass, "SetGS", VALUEFUNC(_wrap_SpatialReference_SetGS), -1);
    rb_define_method(cSpatialReference.klass, "SetWellKnownGeogCS", VALUEFUNC(_wrap_SpatialReference_SetWellKnownGeogCS), -1);
    rb_define_method(cSpatialReference.klass, "SetFromUserInput", VALUEFUNC(_wrap_SpatialReference_SetFromUserInput), -1);
    rb_define_method(cSpatialReference.klass, "CopyGeogCSFrom", VALUEFUNC(_wrap_SpatialReference_CopyGeogCSFrom), -1);
    rb_define_method(cSpatialReference.klass, "SetTOWGS84", VALUEFUNC(_wrap_SpatialReference_SetTOWGS84), -1);
    rb_define_method(cSpatialReference.klass, "GetTOWGS84", VALUEFUNC(_wrap_SpatialReference_GetTOWGS84), -1);
    rb_define_method(cSpatialReference.klass, "SetGeogCS", VALUEFUNC(_wrap_SpatialReference_SetGeogCS), -1);
    rb_define_method(cSpatialReference.klass, "SetProjCS", VALUEFUNC(_wrap_SpatialReference_SetProjCS), -1);
    rb_define_method(cSpatialReference.klass, "ImportFromWkt", VALUEFUNC(_wrap_SpatialReference_ImportFromWkt), -1);
    rb_define_method(cSpatialReference.klass, "ImportFromProj4", VALUEFUNC(_wrap_SpatialReference_ImportFromProj4), -1);
    rb_define_method(cSpatialReference.klass, "ImportFromESRI", VALUEFUNC(_wrap_SpatialReference_ImportFromESRI), -1);
    rb_define_method(cSpatialReference.klass, "ImportFromEPSG", VALUEFUNC(_wrap_SpatialReference_ImportFromEPSG), -1);
    rb_define_method(cSpatialReference.klass, "ImportFromPCI", VALUEFUNC(_wrap_SpatialReference_ImportFromPCI), -1);
    rb_define_method(cSpatialReference.klass, "ImportFromUSGS", VALUEFUNC(_wrap_SpatialReference_ImportFromUSGS), -1);
    rb_define_method(cSpatialReference.klass, "ImportFromXML", VALUEFUNC(_wrap_SpatialReference_ImportFromXML), -1);
    rb_define_method(cSpatialReference.klass, "ExportToWkt", VALUEFUNC(_wrap_SpatialReference_ExportToWkt), -1);
    rb_define_method(cSpatialReference.klass, "ExportToPrettyWkt", VALUEFUNC(_wrap_SpatialReference_ExportToPrettyWkt), -1);
    rb_define_method(cSpatialReference.klass, "ExportToProj4", VALUEFUNC(_wrap_SpatialReference_ExportToProj4), -1);
    rb_define_method(cSpatialReference.klass, "ExportToPCI", VALUEFUNC(_wrap_SpatialReference_ExportToPCI), -1);
    rb_define_method(cSpatialReference.klass, "ExportToUSGS", VALUEFUNC(_wrap_SpatialReference_ExportToUSGS), -1);
    rb_define_method(cSpatialReference.klass, "ExportToXML", VALUEFUNC(_wrap_SpatialReference_ExportToXML), -1);
    rb_define_method(cSpatialReference.klass, "CloneGeogCS", VALUEFUNC(_wrap_SpatialReference_CloneGeogCS), -1);
    rb_define_method(cSpatialReference.klass, "Validate", VALUEFUNC(_wrap_SpatialReference_Validate), -1);
    rb_define_method(cSpatialReference.klass, "StripCTParms", VALUEFUNC(_wrap_SpatialReference_StripCTParms), -1);
    rb_define_method(cSpatialReference.klass, "FixupOrdering", VALUEFUNC(_wrap_SpatialReference_FixupOrdering), -1);
    rb_define_method(cSpatialReference.klass, "Fixup", VALUEFUNC(_wrap_SpatialReference_Fixup), -1);
    rb_define_method(cSpatialReference.klass, "MorphToESRI", VALUEFUNC(_wrap_SpatialReference_MorphToESRI), -1);
    rb_define_method(cSpatialReference.klass, "MorphFromESRI", VALUEFUNC(_wrap_SpatialReference_MorphFromESRI), -1);
    cSpatialReference.mark = 0;
    cSpatialReference.destroy = (void (*)(void *)) free_OSRSpatialReferenceShadow;
    
    cCoordinateTransformation.klass = rb_define_class_under(mOsr, "CoordinateTransformation", rb_cObject);
    SWIG_TypeClientData(SWIGTYPE_p_OSRCoordinateTransformationShadow, (void *) &cCoordinateTransformation);
    rb_define_alloc_func(cCoordinateTransformation.klass, _wrap_CoordinateTransformation_allocate);
    rb_define_method(cCoordinateTransformation.klass, "initialize", VALUEFUNC(_wrap_new_CoordinateTransformation), -1);
    rb_define_method(cCoordinateTransformation.klass, "TransformPoint", VALUEFUNC(_wrap_CoordinateTransformation_TransformPoint), -1);
    cCoordinateTransformation.mark = 0;
    cCoordinateTransformation.destroy = (void (*)(void *)) free_OSRCoordinateTransformationShadow;
}

