/*
 * FILE : gdal_wrap.c
 * 
 * This file was automatically generated by :
 * Simplified Wrapper and Interface Generator (SWIG)
 * Version 1.1 (Patch 5)
 * 
 * Portions Copyright (c) 1995-1998
 * The University of Utah and The Regents of the University of California.
 * Permission is granted to distribute this file in any manner provided
 * this notice remains intact.
 * 
 * Do not make changes to this file--changes will be lost!
 *
 */


#define SWIGCODE
/* Implementation : PYTHON */

#define SWIGPYTHON
#include <string.h>
#include <stdlib.h>
/***********************************************************************
 * $Header: /cvsroot/osrs/gdal/pymod/gdal_wrap.c,v 1.26 2001/01/22 22:34:06 warmerda Exp $
 * swig_lib/python/python.cfg
 *
 * This file contains coded needed to add variable linking to the
 * Python interpreter.   C variables are added as a new kind of Python
 * datatype.
 *
 * Also contains supporting code for building python under Windows
 * and things like that.
 *
 * $Log: gdal_wrap.c,v $
 * Revision 1.26  2001/01/22 22:34:06  warmerda
 * added median cut, and dithering algorithms
 *
 ************************************************************************/

#ifdef __cplusplus
extern "C" {
#endif
#include "Python.h"
#ifdef __cplusplus
}
#endif

/* Definitions for Windows/Unix exporting */
#if defined(__WIN32__)
#   if defined(_MSC_VER)
#	define SWIGEXPORT(a,b) __declspec(dllexport) a b
#   else
#	if defined(__BORLANDC__)
#	    define SWIGEXPORT(a,b) a _export b
#	else
#	    define SWIGEXPORT(a,b) a b
#	endif
#   endif
#else
#   define SWIGEXPORT(a,b) a b
#endif

#ifdef SWIG_GLOBAL
#ifdef __cplusplus
#define SWIGSTATIC extern "C"
#else
#define SWIGSTATIC
#endif
#endif

#ifndef SWIGSTATIC
#define SWIGSTATIC static
#endif

typedef struct {
  char  *name;
  PyObject *(*get_attr)(void);
  int (*set_attr)(PyObject *);
} swig_globalvar;

typedef struct swig_varlinkobject {
  PyObject_HEAD
  swig_globalvar **vars;
  int      nvars;
  int      maxvars;
} swig_varlinkobject;

/* ----------------------------------------------------------------------
   swig_varlink_repr()

   Function for python repr method
   ---------------------------------------------------------------------- */

static PyObject *
swig_varlink_repr(swig_varlinkobject *v)
{
  v = v;
  return PyString_FromString("<Global variables>");
}

/* ---------------------------------------------------------------------
   swig_varlink_print()

   Print out all of the global variable names
   --------------------------------------------------------------------- */

static int
swig_varlink_print(swig_varlinkobject *v, FILE *fp, int flags)
{

  int i = 0;
  flags = flags;
  fprintf(fp,"Global variables { ");
  while (v->vars[i]) {
    fprintf(fp,"%s", v->vars[i]->name);
    i++;
    if (v->vars[i]) fprintf(fp,", ");
  }
  fprintf(fp," }\n");
  return 0;
}

/* --------------------------------------------------------------------
   swig_varlink_getattr
 
   This function gets the value of a variable and returns it as a
   PyObject.   In our case, we'll be looking at the datatype and
   converting into a number or string
   -------------------------------------------------------------------- */

static PyObject *
swig_varlink_getattr(swig_varlinkobject *v, char *n)
{
  int i = 0;
  char temp[128];

  while (v->vars[i]) {
    if (strcmp(v->vars[i]->name,n) == 0) {
      return (*v->vars[i]->get_attr)();
    }
    i++;
  }
  sprintf(temp,"C global variable %s not found.", n);
  PyErr_SetString(PyExc_NameError,temp);
  return NULL;
}

/* -------------------------------------------------------------------
   swig_varlink_setattr()

   This function sets the value of a variable.
   ------------------------------------------------------------------- */

static int
swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p)
{
  char temp[128];
  int i = 0;
  while (v->vars[i]) {
    if (strcmp(v->vars[i]->name,n) == 0) {
      return (*v->vars[i]->set_attr)(p);
    }
    i++;
  }
  sprintf(temp,"C global variable %s not found.", n);
  PyErr_SetString(PyExc_NameError,temp);
  return 1;
}

statichere PyTypeObject varlinktype = {
/*  PyObject_HEAD_INIT(&PyType_Type)  Note : This doesn't work on some machines */
  PyObject_HEAD_INIT(0)              
  0,
  "varlink",                          /* Type name    */
  sizeof(swig_varlinkobject),         /* Basic size   */
  0,                                  /* Itemsize     */
  0,                                  /* Deallocator  */ 
  (printfunc) swig_varlink_print,     /* Print        */
  (getattrfunc) swig_varlink_getattr, /* get attr     */
  (setattrfunc) swig_varlink_setattr, /* Set attr     */
  0,                                  /* tp_compare   */
  (reprfunc) swig_varlink_repr,       /* tp_repr      */    
  0,                                  /* tp_as_number */
  0,                                  /* tp_as_mapping*/
  0,                                  /* tp_hash      */
};

/* Create a variable linking object for use later */

SWIGSTATIC PyObject *
SWIG_newvarlink(void)
{
  swig_varlinkobject *result = 0;
  result = PyMem_NEW(swig_varlinkobject,1);
  varlinktype.ob_type = &PyType_Type;    /* Patch varlinktype into a PyType */
  result->ob_type = &varlinktype;
  /*  _Py_NewReference(result);  Does not seem to be necessary */
  result->nvars = 0;
  result->maxvars = 64;
  result->vars = (swig_globalvar **) malloc(64*sizeof(swig_globalvar *));
  result->vars[0] = 0;
  result->ob_refcnt = 0;
  Py_XINCREF((PyObject *) result);
  return ((PyObject*) result);
}

SWIGSTATIC void
SWIG_addvarlink(PyObject *p, char *name,
	   PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p))
{
  swig_varlinkobject *v;
  v= (swig_varlinkobject *) p;
	
  if (v->nvars >= v->maxvars -1) {
    v->maxvars = 2*v->maxvars;
    v->vars = (swig_globalvar **) realloc(v->vars,v->maxvars*sizeof(swig_globalvar *));
    if (v->vars == NULL) {
      fprintf(stderr,"SWIG : Fatal error in initializing Python module.\n");
      exit(1);
    }
  }
  v->vars[v->nvars] = (swig_globalvar *) malloc(sizeof(swig_globalvar));
  v->vars[v->nvars]->name = (char *) malloc(strlen(name)+1);
  strcpy(v->vars[v->nvars]->name,name);
  v->vars[v->nvars]->get_attr = get_attr;
  v->vars[v->nvars]->set_attr = set_attr;
  v->nvars++;
  v->vars[v->nvars] = 0;
}



/*****************************************************************************
 * $Header: /cvsroot/osrs/gdal/pymod/gdal_wrap.c,v 1.26 2001/01/22 22:34:06 warmerda Exp $
 *
 * swigptr.swg
 *
 * This file contains supporting code for the SWIG run-time type checking
 * mechanism.  The following functions are available :
 *
 * SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *));
 *
 *      Registers a new type-mapping with the type-checker.  origtype is the
 *      original datatype and newtype is an equivalent type.  cast is optional
 *      pointer to a function to cast pointer values between types (this
 *      is typically used to cast pointers from derived classes to base classes in C++)
 *      
 * SWIG_MakePtr(char *buffer, void *ptr, char *typestring);
 *     
 *      Makes a pointer string from a pointer and typestring.  The result is returned
 *      in buffer which is assumed to hold enough space for the result.
 *
 * char * SWIG_GetPtr(char *buffer, void **ptr, char *type)
 *
 *      Gets a pointer value from a string.  If there is a type-mismatch, returns
 *      a character string to the received type.  On success, returns NULL.
 *
 *
 * You can remap these functions by making a file called "swigptr.swg" in
 * your the same directory as the interface file you are wrapping.
 *
 * These functions are normally declared static, but this file can be
 * can be used in a multi-module environment by redefining the symbol
 * SWIGSTATIC.
 *****************************************************************************/

#include <stdlib.h>

#ifdef SWIG_GLOBAL
#ifdef __cplusplus
#define SWIGSTATIC extern "C"
#else
#define SWIGSTATIC
#endif
#endif

#ifndef SWIGSTATIC
#define SWIGSTATIC static
#endif


/* SWIG pointer structure */

typedef struct SwigPtrType {
  char               *name;               /* Datatype name                  */
  int                 len;                /* Length (used for optimization) */
  void               *(*cast)(void *);    /* Pointer casting function       */
  struct SwigPtrType *next;               /* Linked list pointer            */
} SwigPtrType;

/* Pointer cache structure */

typedef struct {
  int                 stat;               /* Status (valid) bit             */
  SwigPtrType        *tp;                 /* Pointer to type structure      */
  char                name[256];          /* Given datatype name            */
  char                mapped[256];        /* Equivalent name                */
} SwigCacheType;

/* Some variables  */

static int SwigPtrMax  = 64;           /* Max entries that can be currently held */
                                       /* This value may be adjusted dynamically */
static int SwigPtrN    = 0;            /* Current number of entries              */
static int SwigPtrSort = 0;            /* Status flag indicating sort            */
static int SwigStart[256];             /* Starting positions of types            */

/* Pointer table */
static SwigPtrType *SwigPtrTable = 0;  /* Table containing pointer equivalences  */

/* Cached values */

#define SWIG_CACHESIZE  8
#define SWIG_CACHEMASK  0x7
static SwigCacheType SwigCache[SWIG_CACHESIZE];  
static int SwigCacheIndex = 0;
static int SwigLastCache = 0;

/* Sort comparison function */
static int swigsort(const void *data1, const void *data2) {
	SwigPtrType *d1 = (SwigPtrType *) data1;
	SwigPtrType *d2 = (SwigPtrType *) data2;
	return strcmp(d1->name,d2->name);
}

/* Binary Search function */
static int swigcmp(const void *key, const void *data) {
  char *k = (char *) key;
  SwigPtrType *d = (SwigPtrType *) data;
  return strncmp(k,d->name,d->len);
}

/* Register a new datatype with the type-checker */

SWIGSTATIC 
void SWIG_RegisterMapping(char *origtype, char *newtype, void *(*cast)(void *)) {

  int i;
  SwigPtrType *t = 0,*t1;

  /* Allocate the pointer table if necessary */

  if (!SwigPtrTable) {     
    SwigPtrTable = (SwigPtrType *) malloc(SwigPtrMax*sizeof(SwigPtrType));
    SwigPtrN = 0;
  }
  /* Grow the table */
  if (SwigPtrN >= SwigPtrMax) {
    SwigPtrMax = 2*SwigPtrMax;
    SwigPtrTable = (SwigPtrType *) realloc((char *) SwigPtrTable,SwigPtrMax*sizeof(SwigPtrType));
  }
  for (i = 0; i < SwigPtrN; i++)
    if (strcmp(SwigPtrTable[i].name,origtype) == 0) {
      t = &SwigPtrTable[i];
      break;
    }
  if (!t) {
    t = &SwigPtrTable[SwigPtrN];
    t->name = origtype;
    t->len = strlen(t->name);
    t->cast = 0;
    t->next = 0;
    SwigPtrN++;
  }

  /* Check for existing entry */

  while (t->next) {
    if ((strcmp(t->name,newtype) == 0)) {
      if (cast) t->cast = cast;
      return;
    }
    t = t->next;
  }
  
  /* Now place entry (in sorted order) */

  t1 = (SwigPtrType *) malloc(sizeof(SwigPtrType));
  t1->name = newtype;
  t1->len = strlen(t1->name);
  t1->cast = cast;
  t1->next = 0;            
  t->next = t1;           
  SwigPtrSort = 0;
}

/* Make a pointer value string */

SWIGSTATIC 
void SWIG_MakePtr(char *_c, const void *_ptr, char *type) {
  static char _hex[16] =
  {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
   'a', 'b', 'c', 'd', 'e', 'f'};
  unsigned long _p, _s;
  char _result[20], *_r;    /* Note : a 64-bit hex number = 16 digits */
  _r = _result;
  _p = (unsigned long) _ptr;
  if (_p > 0) {
    while (_p > 0) {
      _s = _p & 0xf;
      *(_r++) = _hex[_s];
      _p = _p >> 4;
    }
    *_r = '_';
    while (_r >= _result)
      *(_c++) = *(_r--);
  } else {
    strcpy (_c, "NULL");
  }
  if (_ptr)
    strcpy (_c, type);
}

/* Define for backwards compatibility */

#define _swig_make_hex   SWIG_MakePtr 

/* Function for getting a pointer value */

SWIGSTATIC 
char *SWIG_GetPtr(char *_c, void **ptr, char *_t)
{
  unsigned long _p;
  char temp_type[256];
  char *name;
  int  i, len;
  SwigPtrType *sp,*tp;
  SwigCacheType *cache;
  int  start, end;
  _p = 0;

  /* Pointer values must start with leading underscore */
  if (*_c == '_') {
      _c++;
      /* Extract hex value from pointer */
      while (*_c) {
	  if ((*_c >= '0') && (*_c <= '9'))
	    _p = (_p << 4) + (*_c - '0');
	  else if ((*_c >= 'a') && (*_c <= 'f'))
	    _p = (_p << 4) + ((*_c - 'a') + 10);
	  else
	    break;
	  _c++;
      }

      if (_t) {
	if (strcmp(_t,_c)) { 
	  if (!SwigPtrSort) {
	    qsort((void *) SwigPtrTable, SwigPtrN, sizeof(SwigPtrType), swigsort); 
	    for (i = 0; i < 256; i++) {
	      SwigStart[i] = SwigPtrN;
	    }
	    for (i = SwigPtrN-1; i >= 0; i--) {
	      SwigStart[(int) (SwigPtrTable[i].name[1])] = i;
	    }
	    for (i = 255; i >= 1; i--) {
	      if (SwigStart[i-1] > SwigStart[i])
		SwigStart[i-1] = SwigStart[i];
	    }
	    SwigPtrSort = 1;
	    for (i = 0; i < SWIG_CACHESIZE; i++)  
	      SwigCache[i].stat = 0;
	  }
	  
	  /* First check cache for matches.  Uses last cache value as starting point */
	  cache = &SwigCache[SwigLastCache];
	  for (i = 0; i < SWIG_CACHESIZE; i++) {
	    if (cache->stat) {
	      if (strcmp(_t,cache->name) == 0) {
		if (strcmp(_c,cache->mapped) == 0) {
		  cache->stat++;
		  *ptr = (void *) _p;
		  if (cache->tp->cast) *ptr = (*(cache->tp->cast))(*ptr);
		  return (char *) 0;
		}
	      }
	    }
	    SwigLastCache = (SwigLastCache+1) & SWIG_CACHEMASK;
	    if (!SwigLastCache) cache = SwigCache;
	    else cache++;
	  }
	  /* We have a type mismatch.  Will have to look through our type
	     mapping table to figure out whether or not we can accept this datatype */

	  start = SwigStart[(int) _t[1]];
	  end = SwigStart[(int) _t[1]+1];
	  sp = &SwigPtrTable[start];
	  while (start < end) {
	    if (swigcmp(_t,sp) == 0) break;
	    sp++;
	    start++;
	  }
	  if (start >= end) sp = 0;
	  /* Try to find a match for this */
	  if (sp) {
	    while (swigcmp(_t,sp) == 0) {
	      name = sp->name;
	      len = sp->len;
	      tp = sp->next;
	      /* Try to find entry for our given datatype */
	      while(tp) {
		if (tp->len >= 255) {
		  return _c;
		}
		strcpy(temp_type,tp->name);
		strncat(temp_type,_t+len,255-tp->len);
		if (strcmp(_c,temp_type) == 0) {
		  
		  strcpy(SwigCache[SwigCacheIndex].mapped,_c);
		  strcpy(SwigCache[SwigCacheIndex].name,_t);
		  SwigCache[SwigCacheIndex].stat = 1;
		  SwigCache[SwigCacheIndex].tp = tp;
		  SwigCacheIndex = SwigCacheIndex & SWIG_CACHEMASK;
		  
		  /* Get pointer value */
		  *ptr = (void *) _p;
		  if (tp->cast) *ptr = (*(tp->cast))(*ptr);
		  return (char *) 0;
		}
		tp = tp->next;
	      }
	      sp++;
	      /* Hmmm. Didn't find it this time */
	    }
	  }
	  /* Didn't find any sort of match for this data.  
	     Get the pointer value and return the received type */
	  *ptr = (void *) _p;
	  return _c;
	} else {
	  /* Found a match on the first try.  Return pointer value */
	  *ptr = (void *) _p;
	  return (char *) 0;
	}
      } else {
	/* No type specified.  Good luck */
	*ptr = (void *) _p;
	return (char *) 0;
      }
  } else {
    if (strcmp (_c, "NULL") == 0) {
	*ptr = (void *) 0;
	return (char *) 0;
    }
    *ptr = (void *) 0;	
    return _c;
  }
}

/* Compatibility mode */

#define _swig_get_hex  SWIG_GetPtr

#define SWIG_init    init_gdal

#define SWIG_name    "_gdal"

#include "gdal.h"
#include "../alg/gdal_alg.h"
#include "cpl_conv.h"
#include "cpl_string.h"
#include "ogr_srs_api.h"
#include "gdal_py.h"

#ifdef SWIGTYPE_GDALDatasetH
#  define SWIG_GetPtr_2(s,d,t)  SWIG_ConvertPtr( s, d,(SWIGTYPE##t),1)
#else
#  define SWIG_GetPtr_2(s,d,t)  SWIG_GetPtr( s, d, #t)
#endif


typedef struct {
    PyObject *psPyCallback;
    PyObject *psPyCallbackData;
    int nLastReported;
} PyProgressData;

/************************************************************************/
/*                          PyProgressProxy()                           */
/************************************************************************/

int PyProgressProxy( double dfComplete, const char *pszMessage, void *pData )

{
    PyProgressData *psInfo = (PyProgressData *) pData;
    PyObject *psArgs, *psResult;
    int      bContinue = TRUE;

    if( psInfo->nLastReported == (int) (100.0 * dfComplete) )
        return TRUE;

    if( psInfo->psPyCallback == NULL || psInfo->psPyCallback == Py_None )
        return TRUE;

    psInfo->nLastReported = (int) 100.0 * dfComplete;
    
    if( pszMessage == NULL )
        pszMessage = "";

    if( psInfo->psPyCallbackData == NULL )
        psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, Py_None );
    else
        psArgs = Py_BuildValue("(dsO)", dfComplete, pszMessage, 
	                       psInfo->psPyCallbackData );

    psResult = PyEval_CallObject( psInfo->psPyCallback, psArgs);
    Py_XDECREF(psArgs);

    if( psResult == NULL )
    {
        return TRUE;
    }

    if( psResult == Py_None )
    {
	Py_XDECREF(Py_None);
        return TRUE;
    }

    if( !PyArg_Parse( psResult, "i", &bContinue ) )
    {
        PyErr_SetString(PyExc_ValueError, "bad progress return value");
	return FALSE;
    }

    Py_XDECREF(psResult);

    return bContinue;    
}


/************************************************************************/
/*                           GDALBuildOverviews()                       */
/************************************************************************/
static PyObject *
py_GDALBuildOverviews(PyObject *self, PyObject *args) {

    char *pszSwigDS = NULL;
    GDALDatasetH hDS = NULL;   
    char *pszResampling = "NEAREST";
    PyObject *psPyOverviewList = NULL, *psPyBandList = NULL;
    int   nOverviews, *panOverviewList, i;
    int    eErr;
    PyProgressData sProgressInfo;

    self = self;
    sProgressInfo.psPyCallback = NULL;
    sProgressInfo.psPyCallbackData = NULL;
    if(!PyArg_ParseTuple(args,"ssO!O!|OO:GDALBuildOverviews",	
			 &pszSwigDS, &pszResampling, 
		         &PyList_Type, &psPyOverviewList, 
			 &PyList_Type, &psPyBandList,
                         &(sProgressInfo.psPyCallback), 
		         &(sProgressInfo.psPyCallbackData) ) )
        return NULL;

    if (SWIG_GetPtr_2(pszSwigDS,(void **) &hDS,_GDALDatasetH)) {
        PyErr_SetString(PyExc_TypeError,
	   	        "Type error in argument 1 of GDALBuildOverviews."
			" Expected _GDALDatasetH.");
        return NULL;
    }

    nOverviews = PyList_Size(psPyOverviewList);
    panOverviewList = (int *) CPLCalloc(sizeof(int),nOverviews);
    for( i = 0; i < nOverviews; i++ )
    {
	if( !PyArg_Parse( PyList_GET_ITEM(psPyOverviewList,i), "i", 
			  panOverviewList+i) )
        {
	    PyErr_SetString(PyExc_ValueError, "bad overview value");
	    return NULL;
        }
    }

    eErr = GDALBuildOverviews( hDS, pszResampling, nOverviews, panOverviewList,
			       0, NULL, PyProgressProxy, &sProgressInfo );

    CPLFree( panOverviewList );

    return Py_BuildValue( "i", eErr );
}


/************************************************************************/
/*                           GDALCreateCopy()                           */
/************************************************************************/
static PyObject *
py_GDALCreateCopy(PyObject *self, PyObject *args) {

    PyObject *poPyOptions=NULL;
    char *pszSwigDriver=NULL, *pszFilename=NULL, *pszSwigSourceDS=NULL;
    int  bStrict = FALSE;
    GDALDriverH hDriver = NULL;
    GDALDatasetH hSourceDS = NULL, hTargetDS = NULL;   
    char **papszOptions = NULL;
    PyProgressData sProgressInfo;

    self = self;
    sProgressInfo.psPyCallback = NULL;
    sProgressInfo.psPyCallbackData = NULL;
    if(!PyArg_ParseTuple(args,"sss|iO!OO:GDALCreateCopy",	
			 &pszSwigDriver, &pszFilename, &pszSwigSourceDS, 
			 &bStrict, &PyList_Type, &poPyOptions,
			 &(sProgressInfo.psPyCallback), 
		         &(sProgressInfo.psPyCallbackData)) )
        return NULL;

    if (SWIG_GetPtr_2(pszSwigDriver,(void **) &hDriver,_GDALDriverH)) {
        PyErr_SetString(PyExc_TypeError,
	   	        "Type error in argument 1 of GDALCreateCopy."
			" Expected _GDALDriverH.");
        return NULL;
    }
	
    if (SWIG_GetPtr_2(pszSwigSourceDS,(void **) &hSourceDS, _GDALDatasetH )) {
        PyErr_SetString(PyExc_TypeError,
	   	        "Type error in argument 3 of GDALCreateCopy."
			" Expected _GDALDatasetH.");
        return NULL;
    }

    if( poPyOptions != NULL )
    {
        int i;

	for( i = 0; i < PyList_Size(poPyOptions); i++ )
        {
            char *pszItem = NULL;

	    if( !PyArg_Parse(PyList_GET_ITEM(poPyOptions,i), "s", 
			     &pszItem) )
            {
	        PyErr_SetString(PyExc_ValueError, "bad option list item");
	        return NULL;
            }
            papszOptions = CSLAddString( papszOptions, pszItem );
        }
    }

    hTargetDS = GDALCreateCopy( hDriver, pszFilename, hSourceDS, bStrict, 
			        papszOptions, PyProgressProxy, &sProgressInfo);
	
    CSLDestroy( papszOptions );

    if( hTargetDS == NULL )
    {
        Py_INCREF(Py_None);
	return Py_None;
    }
    else
    {
        char  szSwigTarget[48];

#ifdef SWIGTYPE_GDALDatasetH
	SWIG_MakePtr( szSwigTarget, hTargetDS, SWIGTYPE_GDALDatasetH );	
#else
	SWIG_MakePtr( szSwigTarget, hTargetDS, "_GDALDatasetH" );	
#endif
	return Py_BuildValue( "s", szSwigTarget );
    }
}


/************************************************************************/
/*                             GDALCreate()                             */
/************************************************************************/
static PyObject *
py_GDALCreate(PyObject *self, PyObject *args) {

    PyObject *poPyOptions=NULL;
    char *pszSwigDriver=NULL, *pszFilename=NULL;
    int  nXSize, nYSize, nBands, nDataType;
    GDALDriverH hDriver = NULL;
    GDALDatasetH hTargetDS = NULL;   
    char **papszOptions = NULL;

    self = self;
    if(!PyArg_ParseTuple(args,"ssiiii|O:GDALCreate",	
			 &pszSwigDriver, &pszFilename, 
			 &nXSize, &nYSize, &nBands, &nDataType,
			 &PyList_Type, &poPyOptions ))
        return NULL;

    if (SWIG_GetPtr_2(pszSwigDriver,(void **) &hDriver, _GDALDriverH )) {
        PyErr_SetString(PyExc_TypeError,
	   	        "Type error in argument 1 of GDALCreate."
			" Expected _GDALDriverH.");
        return NULL;
    }
	
    if( poPyOptions != NULL )
    {
        int i;

	for( i = 0; i < PyList_Size(poPyOptions); i++ )
        {
            char *pszItem = NULL;

	    if( !PyArg_Parse(PyList_GET_ITEM(poPyOptions,i), "s", 
			     &pszItem) )
            {
	        PyErr_SetString(PyExc_ValueError, "bad option list item");
	        return NULL;
            }
            papszOptions = CSLAddString( papszOptions, pszItem );
        }
    }

    hTargetDS = GDALCreate( hDriver, pszFilename, nXSize, nYSize, nBands, 
			    nDataType, papszOptions );
	
    CSLDestroy( papszOptions );

    if( hTargetDS == NULL )
    {
        Py_INCREF(Py_None);
	return Py_None;
    }
    else
    {
        char  szSwigTarget[48];

#ifdef SWIGTYPE_GDALDatasetH
	SWIG_MakePtr( szSwigTarget, hTargetDS, SWIGTYPE_GDALDatasetH );	
#else
	SWIG_MakePtr( szSwigTarget, hTargetDS, "_GDALDatasetH" );	
#endif
	return Py_BuildValue( "s", szSwigTarget );
    }
}


/************************************************************************/
/*                         GDALReadRaster()                             */
/************************************************************************/
static PyObject *
py_GDALReadRaster(PyObject *self, PyObject *args) {

    PyObject *result;
    GDALRasterBandH  _arg0;
    char *_argc0 = NULL;
    int  _arg1;
    int  _arg2;
    int  _arg3;
    int  _arg4;
    int  _arg5;
    int  _arg6;
    GDALDataType  _arg7;
    char *result_string;
    int  result_size;

    self = self;
    if(!PyArg_ParseTuple(args,"siiiiiii:GDALReadRaster",
                         &_argc0,&_arg1,&_arg2,&_arg3,&_arg4,
                         &_arg5,&_arg6,&_arg7)) 
        return NULL;

    if (_argc0) {
        if (SWIG_GetPtr_2(_argc0,(void **) &_arg0,_GDALRasterBandH )) {
            PyErr_SetString(PyExc_TypeError,
			    "Type error in argument 1 of GDALReadRaster."
			    " Expected _GDALRasterBandH.");
            return NULL;
        }
    }
	
    result_size = _arg5 * _arg6 * (GDALGetDataTypeSize(_arg7)/8);
    result_string = (char *) malloc(result_size+1);

    if( GDALRasterIO(_arg0, GF_Read, _arg1, _arg2, _arg3, _arg4, 
		     (void *) result_string, 
		     _arg5, _arg6, _arg7, 0, 0 ) != CE_None )
    {
	free( result_string );
	PyErr_SetString(PyExc_TypeError,CPLGetLastErrorMsg());
	return NULL;
    }

    result = PyString_FromStringAndSize(result_string,result_size);

    free( result_string );

    return result;
}


/************************************************************************/
/*                          GDALWriteRaster()                           */
/************************************************************************/
static PyObject *
py_GDALWriteRaster(PyObject *self, PyObject *args) {

    GDALRasterBandH  _arg0;
    char *_argc0 = NULL;
    int  _arg1;
    int  _arg2;
    int  _arg3;
    int  _arg4;
    char *strbuffer_arg = NULL;
    int  strbuffer_size;
    int  _arg5;
    int  _arg6;
    GDALDataType  _arg7;

    self = self;
    if(!PyArg_ParseTuple(args,"siiiis#iii:GDALWriteRaster",
                         &_argc0,&_arg1,&_arg2,&_arg3,&_arg4,
                         &strbuffer_arg,&strbuffer_size,&_arg5,&_arg6,&_arg7)) 
        return NULL;



    if (_argc0) {
        if (SWIG_GetPtr_2(_argc0,(void **) &_arg0,_GDALRasterBandH)) {
            PyErr_SetString(PyExc_TypeError,
			    "Type error in argument 1 of GDALWriteRaster."
			    " Expected _GDALRasterBandH.");
            return NULL;
        }
    }
	
    if( GDALRasterIO(_arg0, GF_Write, _arg1, _arg2, _arg3, _arg4, 
		     (void *) strbuffer_arg,
		     _arg5, _arg6, _arg7, 0, 0 ) != CE_None )
    {
	PyErr_SetString(PyExc_TypeError,CPLGetLastErrorMsg());
	return NULL;
    }

    Py_INCREF(Py_None);
    return Py_None;
}


/************************************************************************/
/*                            GDALGetGCPs()                             */
/************************************************************************/
static PyObject *
py_GDALGetGCPs(PyObject *self, PyObject *args) {

    GDALDatasetH  _arg0;
    char *_argc0 = NULL;
    const GDAL_GCP * pasGCPList;
    PyObject *psList;
    int iGCP;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetGCPs",&_argc0))
        return NULL;

    if (_argc0) {
        if (SWIG_GetPtr_2(_argc0,(void **) &_arg0,_GDALDatasetH)) {
            PyErr_SetString(PyExc_TypeError,
                            "Type error in argument 1 of GDALGetGCPs."
                            "  Expected _GDALDatasetH.");
            return NULL;
        }
    }

    pasGCPList = GDALGetGCPs( _arg0 );	

    psList = PyList_New(GDALGetGCPCount(_arg0));
    for( iGCP = 0; pasGCPList != NULL && iGCP < GDALGetGCPCount(_arg0); iGCP++)
    {
	PyList_SetItem(psList, iGCP, 
                       Py_BuildValue("(ssfffff)", 
                                     pasGCPList[iGCP].pszId,
                                     pasGCPList[iGCP].pszInfo,
                                     pasGCPList[iGCP].dfGCPPixel,
                                     pasGCPList[iGCP].dfGCPLine,
                                     pasGCPList[iGCP].dfGCPX,
                                     pasGCPList[iGCP].dfGCPY,
                                     pasGCPList[iGCP].dfGCPZ ) );
    }

    return psList;
}

/************************************************************************/
/*                        GDALGetGeoTransform()                         */
/************************************************************************/
static PyObject *
py_GDALGetGeoTransform(PyObject *self, PyObject *args) {

    GDALDatasetH  _arg0;
    char *_argc0 = NULL;
    double geotransform[6];

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetGeoTransform",&_argc0))
        return NULL;

    if (_argc0) {
        if (SWIG_GetPtr_2(_argc0,(void **) &_arg0,_GDALDatasetH)) {
            PyErr_SetString(PyExc_TypeError,
                            "Type error in argument 1 of GDALGetGeoTransform."
                            "  Expected _GDALDatasetH.");
            return NULL;
        }
    }
	
    GDALGetGeoTransform(_arg0,geotransform);

    return Py_BuildValue("dddddd",
	                 geotransform[0],
	                 geotransform[1],
	                 geotransform[2],
	                 geotransform[3],
	                 geotransform[4],
	                 geotransform[5] );
}

/************************************************************************/
/*                        GDALSetGeoTransform()                         */
/************************************************************************/
static PyObject *
py_GDALSetGeoTransform(PyObject *self, PyObject *args) {

    GDALDatasetH  _arg0;
    char *_argc0 = NULL;
    double geotransform[6];
    int    err;

    self = self;
    if(!PyArg_ParseTuple(args,"s(dddddd):GDALSetGeoTransform",&_argc0,
	geotransform+0, geotransform+1, geotransform+2, 
	geotransform+3, geotransform+4, geotransform+5) )
        return NULL;

    if (_argc0) {
        if (SWIG_GetPtr_2(_argc0,(void **) &_arg0,_GDALDatasetH)) {
            PyErr_SetString(PyExc_TypeError,
                            "Type error in argument 1 of GDALSetGeoTransform."
                            "  Expected _GDALDatasetH.");
            return NULL;
        }
    }
	
    err = GDALSetGeoTransform(_arg0,geotransform);

    if( err != CE_None )
    {
	PyErr_SetString(PyExc_TypeError,CPLGetLastErrorMsg());
	return NULL;
    }
    
    Py_INCREF(Py_None);
    return Py_None;
}

/************************************************************************/
/*                       GDALGetRasterHistogram()                       */
/************************************************************************/
static PyObject *
py_GDALGetRasterHistogram(PyObject *self, PyObject *args) {

    GDALRasterBandH  hBand;
    char *_argc0 = NULL;
    double dfMin = -0.5, dfMax = 255.5;
    int nBuckets = 256, bIncludeOutOfRange = FALSE, bApproxOK = FALSE;
    int *panHistogram, i;
    PyObject *psList;

    self = self;
    if(!PyArg_ParseTuple(args,"s|ddiii:GDALGetRasterHistogram",&_argc0,
			 &dfMin, &dfMax, &nBuckets, &bIncludeOutOfRange, 
	 	         &bApproxOK))
        return NULL;

    if (_argc0) {
        if (SWIG_GetPtr_2(_argc0,(void **) &hBand,_GDALRasterBandH)) {
            PyErr_SetString(PyExc_TypeError,
                          "Type error in argument 1 of GDALGetRasterHistogram."
                          "  Expected _GDALRasterBandH.");
            return NULL;
        }
    }
	
    panHistogram = (int *) CPLCalloc(sizeof(int),nBuckets);
    GDALGetRasterHistogram(hBand, dfMin, dfMax, nBuckets, panHistogram, 
			   bIncludeOutOfRange, bApproxOK, 
		           GDALDummyProgress, NULL);

    psList = PyList_New(nBuckets);
    for( i = 0; i < nBuckets; i++ )
	PyList_SetItem(psList, i, Py_BuildValue("i", panHistogram[i] ));

    CPLFree( panHistogram );

    return psList;
}

/************************************************************************/
/*                       GDALGetMetadata()                              */
/************************************************************************/
static PyObject *
py_GDALGetMetadata(PyObject *self, PyObject *args) {

    GDALMajorObjectH  hObject;
    char *_argc0 = NULL;
    PyObject *psDict;
    int i;
    char **papszMetadata;
    char *pszDomain = NULL;

    self = self;
    if(!PyArg_ParseTuple(args,"s|s:GDALGetMetadata",&_argc0, &pszDomain))
        return NULL;

    if (_argc0) {
#ifdef SWIGTYPE_GDALDatasetH
        if (SWIG_ConvertPtr(_argc0,(void **) &hObject,NULL,0) ) 
#else
        if (SWIG_GetPtr(_argc0,(void **) &hObject,NULL )) 
#endif
	{
            PyErr_SetString(PyExc_TypeError,
                          "Type error in argument 1 of GDALGetMetadata."
                          "  Expected _GDALMajorObjectH.");
            return NULL;
        }
    }

    psDict = PyDict_New();
    
    papszMetadata = GDALGetMetadata( hObject, pszDomain );

    for( i = 0; i < CSLCount(papszMetadata); i++ )
    {
	char	*pszKey;
	const char *pszValue;

	pszValue = CPLParseNameValue( papszMetadata[i], &pszKey );
	if( pszValue != NULL )
	    PyDict_SetItem( psDict, 
                            Py_BuildValue("s", pszKey ), 
                            Py_BuildValue("s", pszValue ) );
	CPLFree( pszKey );
    }

    return psDict;
}

/************************************************************************/
/*                         GDALGetDescription()                         */
/************************************************************************/
static PyObject *
py_GDALGetDescription(PyObject *self, PyObject *args) {

    GDALMajorObjectH  hObject;
    char *_argc0 = NULL;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetDescription",&_argc0))
        return NULL;

    if (_argc0) {
#ifdef SWIGTYPE_GDALDatasetH
        if (SWIG_ConvertPtr(_argc0,(void **) &hObject,NULL,0) ) 
#else
        if (SWIG_GetPtr(_argc0,(void **) &hObject,NULL )) 
#endif
	{
            PyErr_SetString(PyExc_TypeError,
                          "Type error in argument 1 of GDALGetDescription."
                          "  Expected _GDALMajorObjectH.");
            return NULL;
        }
    }

    return Py_BuildValue("s", GDALGetDescription(hObject) );
}

/************************************************************************/
/*                         GDALGetRasterNoDataValue()                   */
/************************************************************************/
static PyObject *
py_GDALGetRasterNoDataValue(PyObject *self, PyObject *args) {

    GDALRasterBandH  hObject;
    char *_argc0 = NULL;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetNoDataValue",&_argc0))
        return NULL;

    if (_argc0) {
        if (SWIG_GetPtr_2(_argc0,(void **) &hObject,_GDALRasterBandH)) {
            PyErr_SetString(PyExc_TypeError,
                          "Type error in argument 1 of GDALGetNoDataValue."
                          "  Expected _GDALRasterBandH.");
            return NULL;
        }
    }

    return Py_BuildValue("d", GDALGetRasterNoDataValue(hObject,NULL) );
}

/************************************************************************/
/*                           GDALBuildOverviews()                       */
/************************************************************************/
static PyObject *
py_GDALComputeMedianCutPCT(PyObject *self, PyObject *args) {

    char *pszSwigRed, *pszSwigGreen, *pszSwigBlue;
    char *pszSwigCT = NULL;
    GDALRasterBandH   hRed, hGreen, hBlue;
    GDALColorTableH   hColorTable = NULL;
    int               nColors = 256;
    int               eErr;
    PyProgressData sProgressInfo;

    self = self;
    sProgressInfo.psPyCallback = NULL;
    sProgressInfo.psPyCallbackData = NULL;
    if(!PyArg_ParseTuple(args,"sssis|OO:GDALComputeMedianCutPCT",	
			 &pszSwigRed, &pszSwigGreen, &pszSwigBlue,
			 &nColors, &pszSwigCT,
                         &(sProgressInfo.psPyCallback), 
		         &(sProgressInfo.psPyCallbackData) ) )
        return NULL;

    if (SWIG_GetPtr_2(pszSwigRed,(void **) &hRed,_GDALRasterBandH)
	|| SWIG_GetPtr_2(pszSwigGreen,(void **) &hGreen,_GDALRasterBandH)
	|| SWIG_GetPtr_2(pszSwigBlue,(void **) &hBlue,_GDALRasterBandH))
    {
        PyErr_SetString(PyExc_TypeError,
   	      "Type error with raster band in GDALComputeMedianCutPCT."
	      " Expected _GDALRasterBandH." );
        return NULL;
    }

    if (SWIG_GetPtr_2(pszSwigCT,(void **) &hColorTable,_GDALColorTableH))
    {
        PyErr_SetString(PyExc_TypeError,
   	      "Type error with argument 5 in GDALComputeMedianCutPCT."
	      " Expected _GDALColorTableH." );
        return NULL;
    }

    eErr = GDALComputeMedianCutPCT( hRed, hGreen, hBlue, NULL,
	                            nColors, hColorTable, 
	                            PyProgressProxy, &sProgressInfo );

    return Py_BuildValue( "i", eErr );
}


/************************************************************************/
/*                         GDALDitherRGB2PCT()                          */
/************************************************************************/
static PyObject *
py_GDALDitherRGB2PCT(PyObject *self, PyObject *args) {

    char *pszSwigRed, *pszSwigGreen, *pszSwigBlue, *pszSwigTarget;
    char *pszSwigCT = NULL;
    GDALRasterBandH   hRed, hGreen, hBlue, hTarget;
    GDALColorTableH   hColorTable = NULL;
    int               eErr;
    PyProgressData sProgressInfo;

    self = self;
    sProgressInfo.psPyCallback = NULL;
    sProgressInfo.psPyCallbackData = NULL;
    if(!PyArg_ParseTuple(args,"sssss|OO:GDALDitherRGB2PCT",	
			 &pszSwigRed, &pszSwigGreen, &pszSwigBlue,
	                 &pszSwigTarget,
			 &pszSwigCT,
                         &(sProgressInfo.psPyCallback), 
		         &(sProgressInfo.psPyCallbackData) ) )
        return NULL;

    if (SWIG_GetPtr_2(pszSwigRed,(void **) &hRed,_GDALRasterBandH)
	|| SWIG_GetPtr_2(pszSwigGreen,(void **) &hGreen,_GDALRasterBandH)
	|| SWIG_GetPtr_2(pszSwigBlue,(void **) &hBlue,_GDALRasterBandH)
	|| SWIG_GetPtr_2(pszSwigTarget,(void **) &hTarget,_GDALRasterBandH))
    {
        PyErr_SetString(PyExc_TypeError,
   	      "Type error with raster band in GDALDitherRGB2PCT."
	      " Expected _GDALRasterBandH." );
        return NULL;
    }

    if (SWIG_GetPtr_2(pszSwigCT,(void **) &hColorTable,_GDALColorTableH))
    {
        PyErr_SetString(PyExc_TypeError,
   	      "Type error with argument 5 in GDALDitherRGB2PCT."
	      " Expected _GDALColorTableH." );
        return NULL;
    }

    eErr = GDALDitherRGB2PCT( hRed, hGreen, hBlue, hTarget, 
		              hColorTable, 	
	                      PyProgressProxy, &sProgressInfo );

    return Py_BuildValue( "i", eErr );
}


/************************************************************************/
/*                          OSRImportFromESRI()                         */
/************************************************************************/
static PyObject *
py_OSRImportFromESRI(PyObject *self, PyObject *args) {

    OGRSpatialReferenceH _arg0;
    char *_argc0 = NULL;
    OGRErr err;
    PyObject *py_prj = NULL;
    char **prj = NULL;
    int    i;

    self = self;
    if(!PyArg_ParseTuple(args,"sO!:OSRImportFromESRI",
	&_argc0, &PyList_Type, &py_prj) )
        return NULL;

    if (_argc0) {
        if (SWIG_GetPtr_2(_argc0,(void **) &_arg0,_OGRSpatialReferenceH)) {
            PyErr_SetString(PyExc_TypeError,
                            "Type error in argument 1 of OSRImportFromESRI."
                            "  Expected _OGRSpatialReferenceH.");
            return NULL;
        }
    }
	
    for( i = 0; i < PyList_Size(py_prj); i++ )
    {
        char      *line = NULL;
        if( !PyArg_Parse( PyList_GET_ITEM(py_prj,i), "s", &line ) )
        {
            PyErr_SetString(PyExc_TypeError,
                            "Type error in argument 2 of OSRImportFromESRI."
                            "  Expected list of strings.");
            return NULL;
        }
        prj = CSLAddString( prj, line );
    }

    err = OSRImportFromESRI( _arg0, prj );
    CSLDestroy( prj );

    return Py_BuildValue( "i", err );
}

/************************************************************************/
/*                          OSRImportFromWkt()                          */
/************************************************************************/
static PyObject *
py_OSRImportFromWkt(PyObject *self, PyObject *args) {

    OGRSpatialReferenceH _arg0;
    char *_argc0 = NULL;
    char *wkt;
    OGRErr err;

    self = self;
    if(!PyArg_ParseTuple(args,"ss:OSRImportFromWkt",&_argc0,&wkt) )
        return NULL;

    if (_argc0) {
        if (SWIG_GetPtr_2(_argc0,(void **) &_arg0,_OGRSpatialReferenceH)) {
            PyErr_SetString(PyExc_TypeError,
                            "Type error in argument 1 of OSRImportFromWkt."
                            "  Expected _OGRSpatialReferenceH.");
            return NULL;
        }
    }
	
    err = OSRImportFromWkt( _arg0, &wkt );

    return Py_BuildValue( "i", err );
}

/************************************************************************/
/*                          OSRExportToProj4()                          */
/************************************************************************/
static PyObject *
py_OSRExportToProj4(PyObject *self, PyObject *args) {

    OGRSpatialReferenceH _arg0;
    char *_argc0 = NULL;
    char *wkt = NULL;
    OGRErr err;
    PyObject *ret;

    self = self;
    if(!PyArg_ParseTuple(args,"s:OSRExportToProj4",&_argc0) )
        return NULL;

    if (_argc0) {
        if (SWIG_GetPtr_2(_argc0,(void **) &_arg0,_OGRSpatialReferenceH)) {
            PyErr_SetString(PyExc_TypeError,
                            "Type error in argument 1 of OSRExportToProj4."
                            "  Expected _OGRSpatialReferenceH.");
            return NULL;
        }
    }
	
    err = OSRExportToProj4( _arg0, &wkt );
    if( wkt == NULL )
	wkt = "";

    ret = Py_BuildValue( "s", wkt );
    OGRFree( wkt );
    return ret;
}

/************************************************************************/
/*                           OSRExportToWkt()                           */
/************************************************************************/
static PyObject *
py_OSRExportToWkt(PyObject *self, PyObject *args) {

    OGRSpatialReferenceH _arg0;
    char *_argc0 = NULL;
    char *wkt = NULL;
    OGRErr err;
    PyObject *ret;

    self = self;
    if(!PyArg_ParseTuple(args,"s:OSRExportToWkt",&_argc0) )
        return NULL;

    if (_argc0) {
        if (SWIG_GetPtr_2(_argc0,(void **) &_arg0,_OGRSpatialReferenceH)) {
            PyErr_SetString(PyExc_TypeError,
                            "Type error in argument 1 of OSRExportToWkt."
                            "  Expected _OGRSpatialReferenceH.");
            return NULL;
        }
    }
	
    err = OSRExportToWkt( _arg0, &wkt );
    if( wkt == NULL )
	wkt = "";

    ret = Py_BuildValue( "s", wkt );
    OGRFree( wkt );
    return ret;
}

/************************************************************************/
/*                        OSRExportToPrettyWkt()                        */
/************************************************************************/
static PyObject *
py_OSRExportToPrettyWkt(PyObject *self, PyObject *args) {

    OGRSpatialReferenceH _arg0;
    char *_argc0 = NULL;
    char *wkt = NULL;
    int  bSimplify = FALSE;
    OGRErr err;
    PyObject *ret;

    self = self;
    if(!PyArg_ParseTuple(args,"s|i:OSRExportToPrettyWkt",&_argc0, &bSimplify) )
        return NULL;

    if (_argc0) {
        if (SWIG_GetPtr_2(_argc0,(void **) &_arg0,_OGRSpatialReferenceH)) {
            PyErr_SetString(PyExc_TypeError,
                            "Type error in argument 1 of OSRExportToWkt."
                            "  Expected _OGRSpatialReferenceH.");
            return NULL;
        }
    }
	
    err = OSRExportToPrettyWkt( _arg0, &wkt, bSimplify );
    if( wkt == NULL )
	wkt = "";

    ret = Py_BuildValue( "s", wkt );
    OGRFree( wkt );
    return ret;
}

/************************************************************************/
/*                             OCTTransform                             */
/************************************************************************/
static PyObject *
py_OCTTransform(PyObject *self, PyObject *args) {

    OGRCoordinateTransformationH _arg0;
    PyObject *pnts;
    char *_argc0 = NULL;
    double *x, *y, *z;
    int    pnt_count, i;

    self = self;
    if(!PyArg_ParseTuple(args,"sO!:OCTTransform",&_argc0, &PyList_Type, &pnts))
        return NULL;

    if (_argc0) {
        if (SWIG_GetPtr_2(_argc0,
			  (void **) &_arg0,_OGRCoordinateTransformationH)) {
            PyErr_SetString(PyExc_TypeError,
                            "Type error in argument 1 of OCTTransform."
                            "  Expected _OGRCoordinateTransformationH.");
            return NULL;
        }
    }

    pnt_count = PyList_Size(pnts);
    x = (double *) CPLCalloc(sizeof(double),pnt_count);
    y = (double *) CPLCalloc(sizeof(double),pnt_count);
    z = (double *) CPLCalloc(sizeof(double),pnt_count);
    for( i = 0; i < pnt_count; i++ )
    {
	if( !PyArg_ParseTuple(PyList_GET_ITEM(pnts,i), "dd|d", x+i, y+i, z+i) )
        {
	    CPLFree( x );
	    CPLFree( y );
	    CPLFree( z );
	    return NULL;
        }
    }  	

    /* perform the transformation */
    if( !OCTTransform( _arg0, pnt_count, x, y, z ) )
    {
        CPLFree( x );
        CPLFree( y );
        CPLFree( z );

        PyErr_SetString(PyExc_TypeError,"OCTTransform failed.");
	return NULL;
    }

    /* make a new points list */
    pnts = PyList_New(pnt_count);
    for( i = 0; i < pnt_count; i++ )
    {
	PyList_SetItem(pnts, i, Py_BuildValue("(ddd)", x[i], y[i], z[i] ) );
    }

    CPLFree( x );
    CPLFree( y );
    CPLFree( z );

    return pnts;
}

/************************************************************************/
/*                        OPTGetProjectionMethods()                     */
/************************************************************************/
static PyObject *
py_OPTGetProjectionMethods(PyObject *self, PyObject *args) {

    PyObject *py_MList;
    char     **papszMethods;
    int      iMethod;
    
    self = self;
    args = args;

    papszMethods = OPTGetProjectionMethods();
    py_MList = PyList_New(CSLCount(papszMethods));

    for( iMethod = 0; papszMethods[iMethod] != NULL; iMethod++ )
    {
	char    *pszUserMethodName;
	char    **papszParameters;
	PyObject *py_PList;
	int       iParam;

	papszParameters = OPTGetParameterList( papszMethods[iMethod], 
					       &pszUserMethodName );
        if( papszParameters == NULL )
            return NULL;

	py_PList = PyList_New(CSLCount(papszParameters));
	for( iParam = 0; papszParameters[iParam] != NULL; iParam++ )
       	{
	    char    *pszType;
	    char    *pszUserParamName;
            double  dfDefault;

	    OPTGetParameterInfo( papszMethods[iMethod], 
				 papszParameters[iParam], 
				 &pszUserParamName, 
				 &pszType, &dfDefault );
	    PyList_SetItem(py_PList, iParam, 
			   Py_BuildValue("(sssd)", 
					 papszParameters[iParam], 
					 pszUserParamName, 
                                         pszType, dfDefault ));
	}
	
	CSLDestroy( papszParameters );

	PyList_SetItem(py_MList, iMethod, 
		       Py_BuildValue("(ssO)", 
		                     papszMethods[iMethod], 
				     pszUserMethodName, 
		                     py_PList));
    }

    CSLDestroy( papszMethods );

    return py_MList;
}
static PyObject *_wrap_CPLDebug(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    char * _arg0;
    char * _arg1;

    self = self;
    if(!PyArg_ParseTuple(args,"ss:CPLDebug",&_arg0,&_arg1)) 
        return NULL;
    CPLDebug(_arg0,_arg1);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_CPLErrorReset(PyObject *self, PyObject *args) {
    PyObject * _resultobj;

    self = self;
    if(!PyArg_ParseTuple(args,":CPLErrorReset")) 
        return NULL;
    CPLErrorReset();
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_CPLGetLastErrorNo(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;

    self = self;
    if(!PyArg_ParseTuple(args,":CPLGetLastErrorNo")) 
        return NULL;
    _result = (int )CPLGetLastErrorNo();
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_CPLGetLastErrorMsg(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    char * _result;

    self = self;
    if(!PyArg_ParseTuple(args,":CPLGetLastErrorMsg")) 
        return NULL;
    _result = (char *)CPLGetLastErrorMsg();
    _resultobj = Py_BuildValue("s", _result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetDataTypeSize(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALDataType  _arg0;

    self = self;
    if(!PyArg_ParseTuple(args,"i:GDALGetDataTypeSize",&_arg0)) 
        return NULL;
    _result = (int )GDALGetDataTypeSize(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetDataTypeName(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    char * _result;
    GDALDataType  _arg0;

    self = self;
    if(!PyArg_ParseTuple(args,"i:GDALGetDataTypeName",&_arg0)) 
        return NULL;
    _result = (char *)GDALGetDataTypeName(_arg0);
    _resultobj = Py_BuildValue("s", _result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetColorInterpretationName(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    char * _result;
    GDALColorInterp  _arg0;

    self = self;
    if(!PyArg_ParseTuple(args,"i:GDALGetColorInterpretationName",&_arg0)) 
        return NULL;
    _result = (char *)GDALGetColorInterpretationName(_arg0);
    _resultobj = Py_BuildValue("s", _result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetPaletteInterpretationName(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    char * _result;
    GDALPaletteInterp  _arg0;

    self = self;
    if(!PyArg_ParseTuple(args,"i:GDALGetPaletteInterpretationName",&_arg0)) 
        return NULL;
    _result = (char *)GDALGetPaletteInterpretationName(_arg0);
    _resultobj = Py_BuildValue("s", _result);
    return _resultobj;
}

static PyObject *_wrap_GDALAllRegister(PyObject *self, PyObject *args) {
    PyObject * _resultobj;

    self = self;
    if(!PyArg_ParseTuple(args,":GDALAllRegister")) 
        return NULL;
    GDALAllRegister();
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_GDALRegister_NUMPY(PyObject *self, PyObject *args) {
    PyObject * _resultobj;

    self = self;
    if(!PyArg_ParseTuple(args,":GDALRegister_NUMPY")) 
        return NULL;
    GDALRegister_NUMPY();
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_GDALOpen(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALDatasetH  _result;
    char * _arg0;
    GDALAccess  _arg1;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"si:GDALOpen",&_arg0,&_arg1)) 
        return NULL;
    _result = (GDALDatasetH )GDALOpen(_arg0,_arg1);
    SWIG_MakePtr(_ptemp, (char *) _result,"_GDALDatasetH");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_GDALGetDriverByName(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALDriverH  _result;
    char * _arg0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetDriverByName",&_arg0)) 
        return NULL;
    _result = (GDALDriverH )GDALGetDriverByName(_arg0);
    SWIG_MakePtr(_ptemp, (char *) _result,"_GDALDriverH");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_GDALGetDriverCount(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;

    self = self;
    if(!PyArg_ParseTuple(args,":GDALGetDriverCount")) 
        return NULL;
    _result = (int )GDALGetDriverCount();
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetDriver(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALDriverH  _result;
    int  _arg0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"i:GDALGetDriver",&_arg0)) 
        return NULL;
    _result = (GDALDriverH )GDALGetDriver(_arg0);
    SWIG_MakePtr(_ptemp, (char *) _result,"_GDALDriverH");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_GDALRegisterDriver(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALDriverH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALRegisterDriver",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALRegisterDriver. Expected _GDALDriverH.");
        return NULL;
        }
    }
    _result = (int )GDALRegisterDriver(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALDeregisterDriver(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALDriverH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALDeregisterDriver",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALDeregisterDriver. Expected _GDALDriverH.");
        return NULL;
        }
    }
    GDALDeregisterDriver(_arg0);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_GDALDeleteDataset(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALDriverH  _arg0;
    char * _arg1;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"ss:GDALDeleteDataset",&_argc0,&_arg1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALDeleteDataset. Expected _GDALDriverH.");
        return NULL;
        }
    }
    _result = (int )GDALDeleteDataset(_arg0,_arg1);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetDriverShortName(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    char * _result;
    GDALDriverH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetDriverShortName",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetDriverShortName. Expected _GDALDriverH.");
        return NULL;
        }
    }
    _result = (char *)GDALGetDriverShortName(_arg0);
    _resultobj = Py_BuildValue("s", _result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetDriverLongName(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    char * _result;
    GDALDriverH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetDriverLongName",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetDriverLongName. Expected _GDALDriverH.");
        return NULL;
        }
    }
    _result = (char *)GDALGetDriverLongName(_arg0);
    _resultobj = Py_BuildValue("s", _result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetDriverHelpTopic(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    char * _result;
    GDALDriverH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetDriverHelpTopic",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetDriverHelpTopic. Expected _GDALDriverH.");
        return NULL;
        }
    }
    _result = (char *)GDALGetDriverHelpTopic(_arg0);
    _resultobj = Py_BuildValue("s", _result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetDatasetDriver(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALDriverH  _result;
    GDALDatasetH  _arg0;
    char * _argc0 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetDatasetDriver",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetDatasetDriver. Expected _GDALDatasetH.");
        return NULL;
        }
    }
    _result = (GDALDriverH )GDALGetDatasetDriver(_arg0);
    SWIG_MakePtr(_ptemp, (char *) _result,"_GDALDriverH");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_GDALClose(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALDatasetH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALClose",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALClose. Expected _GDALDatasetH.");
        return NULL;
        }
    }
    GDALClose(_arg0);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_GDALGetRasterXSize(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALDatasetH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetRasterXSize",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetRasterXSize. Expected _GDALDatasetH.");
        return NULL;
        }
    }
    _result = (int )GDALGetRasterXSize(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetRasterYSize(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALDatasetH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetRasterYSize",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetRasterYSize. Expected _GDALDatasetH.");
        return NULL;
        }
    }
    _result = (int )GDALGetRasterYSize(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetRasterCount(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALDatasetH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetRasterCount",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetRasterCount. Expected _GDALDatasetH.");
        return NULL;
        }
    }
    _result = (int )GDALGetRasterCount(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetRasterBand(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALRasterBandH  _result;
    GDALDatasetH  _arg0;
    int  _arg1;
    char * _argc0 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"si:GDALGetRasterBand",&_argc0,&_arg1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetRasterBand. Expected _GDALDatasetH.");
        return NULL;
        }
    }
    _result = (GDALRasterBandH )GDALGetRasterBand(_arg0,_arg1);
    SWIG_MakePtr(_ptemp, (char *) _result,"_GDALRasterBandH");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_GDALGetProjectionRef(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    char * _result;
    GDALDatasetH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetProjectionRef",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetProjectionRef. Expected _GDALDatasetH.");
        return NULL;
        }
    }
    _result = (char *)GDALGetProjectionRef(_arg0);
    _resultobj = Py_BuildValue("s", _result);
    return _resultobj;
}

static PyObject *_wrap_GDALSetProjection(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALDatasetH  _arg0;
    char * _arg1;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"ss:GDALSetProjection",&_argc0,&_arg1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALSetProjection. Expected _GDALDatasetH.");
        return NULL;
        }
    }
    _result = (int )GDALSetProjection(_arg0,_arg1);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALReferenceDataset(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALDatasetH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALReferenceDataset",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALReferenceDataset. Expected _GDALDatasetH.");
        return NULL;
        }
    }
    _result = (int )GDALReferenceDataset(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALDereferenceDataset(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALDatasetH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALDereferenceDataset",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALDereferenceDataset. Expected _GDALDatasetH.");
        return NULL;
        }
    }
    _result = (int )GDALDereferenceDataset(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetGCPCount(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALDatasetH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetGCPCount",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetGCPCount. Expected _GDALDatasetH.");
        return NULL;
        }
    }
    _result = (int )GDALGetGCPCount(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetGCPProjection(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    char * _result;
    GDALDatasetH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetGCPProjection",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetGCPProjection. Expected _GDALDatasetH.");
        return NULL;
        }
    }
    _result = (char *)GDALGetGCPProjection(_arg0);
    _resultobj = Py_BuildValue("s", _result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetRasterDataType(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALDataType  _result;
    GDALRasterBandH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetRasterDataType",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetRasterDataType. Expected _GDALRasterBandH.");
        return NULL;
        }
    }
    _result = (GDALDataType )GDALGetRasterDataType(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetBlockSize(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALRasterBandH  _arg0;
    int * _arg1;
    int * _arg2;
    char * _argc0 = 0;
    char * _argc1 = 0;
    char * _argc2 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"sss:GDALGetBlockSize",&_argc0,&_argc1,&_argc2)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetBlockSize. Expected _GDALRasterBandH.");
        return NULL;
        }
    }
    if (_argc1) {
        if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_int_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of GDALGetBlockSize. Expected _int_p.");
        return NULL;
        }
    }
    if (_argc2) {
        if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_int_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of GDALGetBlockSize. Expected _int_p.");
        return NULL;
        }
    }
    GDALGetBlockSize(_arg0,_arg1,_arg2);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_GDALGetRasterBandXSize(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALRasterBandH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetRasterBandXSize",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetRasterBandXSize. Expected _GDALRasterBandH.");
        return NULL;
        }
    }
    _result = (int )GDALGetRasterBandXSize(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetRasterBandYSize(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALRasterBandH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetRasterBandYSize",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetRasterBandYSize. Expected _GDALRasterBandH.");
        return NULL;
        }
    }
    _result = (int )GDALGetRasterBandYSize(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetRasterColorInterpretation(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALColorInterp  _result;
    GDALRasterBandH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetRasterColorInterpretation",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetRasterColorInterpretation. Expected _GDALRasterBandH.");
        return NULL;
        }
    }
    _result = (GDALColorInterp )GDALGetRasterColorInterpretation(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetRasterColorTable(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALColorTableH  _result;
    GDALRasterBandH  _arg0;
    char * _argc0 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetRasterColorTable",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetRasterColorTable. Expected _GDALRasterBandH.");
        return NULL;
        }
    }
    _result = (GDALColorTableH )GDALGetRasterColorTable(_arg0);
    SWIG_MakePtr(_ptemp, (char *) _result,"_GDALColorTableH");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_GDALSetRasterColorTable(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALRasterBandH  _arg0;
    GDALColorTableH  _arg1;
    char * _argc0 = 0;
    char * _argc1 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"ss:GDALSetRasterColorTable",&_argc0,&_argc1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALSetRasterColorTable. Expected _GDALRasterBandH.");
        return NULL;
        }
    }
    if (_argc1) {
        if (SWIG_GetPtr(_argc1,(void **) &_arg1,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of GDALSetRasterColorTable. Expected _GDALColorTableH.");
        return NULL;
        }
    }
    _result = (int )GDALSetRasterColorTable(_arg0,_arg1);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALSetRasterNoDataValue(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALRasterBandH  _arg0;
    double  _arg1;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"sd:GDALSetRasterNoDataValue",&_argc0,&_arg1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALSetRasterNoDataValue. Expected _GDALRasterBandH.");
        return NULL;
        }
    }
    _result = (int )GDALSetRasterNoDataValue(_arg0,_arg1);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetOverviewCount(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALRasterBandH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetOverviewCount",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetOverviewCount. Expected _GDALRasterBandH.");
        return NULL;
        }
    }
    _result = (int )GDALGetOverviewCount(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetOverview(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALRasterBandH  _result;
    GDALRasterBandH  _arg0;
    int  _arg1;
    char * _argc0 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"si:GDALGetOverview",&_argc0,&_arg1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetOverview. Expected _GDALRasterBandH.");
        return NULL;
        }
    }
    _result = (GDALRasterBandH )GDALGetOverview(_arg0,_arg1);
    SWIG_MakePtr(_ptemp, (char *) _result,"_GDALRasterBandH");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_GDALFlushRasterCache(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALRasterBandH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALFlushRasterCache",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALFlushRasterCache. Expected _GDALRasterBandH.");
        return NULL;
        }
    }
    _result = (int )GDALFlushRasterCache(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALCreateColorTable(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALColorTableH  _result;
    GDALPaletteInterp  _arg0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"i:GDALCreateColorTable",&_arg0)) 
        return NULL;
    _result = (GDALColorTableH )GDALCreateColorTable(_arg0);
    SWIG_MakePtr(_ptemp, (char *) _result,"_GDALColorTableH");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_GDALDestroyColorTable(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALColorTableH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALDestroyColorTable",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALDestroyColorTable. Expected _GDALColorTableH.");
        return NULL;
        }
    }
    GDALDestroyColorTable(_arg0);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_GDALCloneColorTable(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALColorTableH  _result;
    GDALColorTableH  _arg0;
    char * _argc0 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALCloneColorTable",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALCloneColorTable. Expected _GDALColorTableH.");
        return NULL;
        }
    }
    _result = (GDALColorTableH )GDALCloneColorTable(_arg0);
    SWIG_MakePtr(_ptemp, (char *) _result,"_GDALColorTableH");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_GDALGetPaletteInterpretation(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALPaletteInterp  _result;
    GDALColorTableH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetPaletteInterpretation",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetPaletteInterpretation. Expected _GDALColorTableH.");
        return NULL;
        }
    }
    _result = (GDALPaletteInterp )GDALGetPaletteInterpretation(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetColorEntryCount(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALColorTableH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALGetColorEntryCount",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetColorEntryCount. Expected _GDALColorTableH.");
        return NULL;
        }
    }
    _result = (int )GDALGetColorEntryCount(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetColorEntry(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALColorEntry * _result;
    GDALColorTableH  _arg0;
    int  _arg1;
    char * _argc0 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"si:GDALGetColorEntry",&_argc0,&_arg1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetColorEntry. Expected _GDALColorTableH.");
        return NULL;
        }
    }
    _result = (GDALColorEntry *)GDALGetColorEntry(_arg0,_arg1);
    SWIG_MakePtr(_ptemp, (char *) _result,"_GDALColorEntry_p");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_GDALGetColorEntryAsRGB(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALColorTableH  _arg0;
    int  _arg1;
    GDALColorEntry * _arg2;
    char * _argc0 = 0;
    char * _argc2 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"sis:GDALGetColorEntryAsRGB",&_argc0,&_arg1,&_argc2)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALGetColorEntryAsRGB. Expected _GDALColorTableH.");
        return NULL;
        }
    }
    if (_argc2) {
        if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_GDALColorEntry_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of GDALGetColorEntryAsRGB. Expected _GDALColorEntry_p.");
        return NULL;
        }
    }
    _result = (int )GDALGetColorEntryAsRGB(_arg0,_arg1,_arg2);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALSetColorEntry(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALColorTableH  _arg0;
    int  _arg1;
    GDALColorEntry * _arg2;
    char * _argc0 = 0;
    char * _argc2 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"sis:GDALSetColorEntry",&_argc0,&_arg1,&_argc2)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALSetColorEntry. Expected _GDALColorTableH.");
        return NULL;
        }
    }
    if (_argc2) {
        if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_GDALColorEntry_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of GDALSetColorEntry. Expected _GDALColorEntry_p.");
        return NULL;
        }
    }
    GDALSetColorEntry(_arg0,_arg1,_arg2);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_GDALCreateProjDef(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALProjDefH  _result;
    char * _arg0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALCreateProjDef",&_arg0)) 
        return NULL;
    _result = (GDALProjDefH )GDALCreateProjDef(_arg0);
    SWIG_MakePtr(_ptemp, (char *) _result,"_GDALProjDefH");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_GDALReprojectToLongLat(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALProjDefH  _arg0;
    double * _arg1;
    double * _arg2;
    char * _argc0 = 0;
    char * _argc1 = 0;
    char * _argc2 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"sss:GDALReprojectToLongLat",&_argc0,&_argc1,&_argc2)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALReprojectToLongLat. Expected _GDALProjDefH.");
        return NULL;
        }
    }
    if (_argc1) {
        if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_double_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of GDALReprojectToLongLat. Expected _double_p.");
        return NULL;
        }
    }
    if (_argc2) {
        if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_double_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of GDALReprojectToLongLat. Expected _double_p.");
        return NULL;
        }
    }
    _result = (int )GDALReprojectToLongLat(_arg0,_arg1,_arg2);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALReprojectFromLongLat(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    GDALProjDefH  _arg0;
    double * _arg1;
    double * _arg2;
    char * _argc0 = 0;
    char * _argc1 = 0;
    char * _argc2 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"sss:GDALReprojectFromLongLat",&_argc0,&_argc1,&_argc2)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALReprojectFromLongLat. Expected _GDALProjDefH.");
        return NULL;
        }
    }
    if (_argc1) {
        if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_double_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of GDALReprojectFromLongLat. Expected _double_p.");
        return NULL;
        }
    }
    if (_argc2) {
        if (SWIG_GetPtr(_argc2,(void **) &_arg2,"_double_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 3 of GDALReprojectFromLongLat. Expected _double_p.");
        return NULL;
        }
    }
    _result = (int )GDALReprojectFromLongLat(_arg0,_arg1,_arg2);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALDestroyProjDef(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    GDALProjDefH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALDestroyProjDef",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALDestroyProjDef. Expected _GDALProjDefH.");
        return NULL;
        }
    }
    GDALDestroyProjDef(_arg0);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_GDALDecToDMS(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    char * _result;
    double  _arg0;
    char * _arg1;
    int  _arg2;

    self = self;
    if(!PyArg_ParseTuple(args,"dsi:GDALDecToDMS",&_arg0,&_arg1,&_arg2)) 
        return NULL;
    _result = (char *)GDALDecToDMS(_arg0,_arg1,_arg2);
    _resultobj = Py_BuildValue("s", _result);
    return _resultobj;
}

static PyObject *_wrap_GDALSetCacheMax(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _arg0;

    self = self;
    if(!PyArg_ParseTuple(args,"i:GDALSetCacheMax",&_arg0)) 
        return NULL;
    GDALSetCacheMax(_arg0);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_GDALGetCacheMax(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;

    self = self;
    if(!PyArg_ParseTuple(args,":GDALGetCacheMax")) 
        return NULL;
    _result = (int )GDALGetCacheMax();
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALGetCacheUsed(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;

    self = self;
    if(!PyArg_ParseTuple(args,":GDALGetCacheUsed")) 
        return NULL;
    _result = (int )GDALGetCacheUsed();
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_GDALFlushCacheBlock(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;

    self = self;
    if(!PyArg_ParseTuple(args,":GDALFlushCacheBlock")) 
        return NULL;
    _result = (int )GDALFlushCacheBlock();
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_OSRNewSpatialReference(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    OGRSpatialReferenceH  _result;
    char * _arg0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"s:OSRNewSpatialReference",&_arg0)) 
        return NULL;
    _result = (OGRSpatialReferenceH )OSRNewSpatialReference(_arg0);
    SWIG_MakePtr(_ptemp, (char *) _result,"_OGRSpatialReferenceH");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_OSRDestroySpatialReference(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    OGRSpatialReferenceH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:OSRDestroySpatialReference",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRDestroySpatialReference. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    OSRDestroySpatialReference(_arg0);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

static PyObject *_wrap_OSRReference(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    OGRSpatialReferenceH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:OSRReference",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRReference. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (int )OSRReference(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_OSRDereference(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    OGRSpatialReferenceH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:OSRDereference",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRDereference. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (int )OSRDereference(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_OSRImportFromEPSG(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    OGRErr * _result;
    OGRSpatialReferenceH  _arg0;
    int  _arg1;
    char * _argc0 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"si:OSRImportFromEPSG",&_argc0,&_arg1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRImportFromEPSG. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (OGRErr *) malloc(sizeof(OGRErr ));
    *(_result) = OSRImportFromEPSG(_arg0,_arg1);
    SWIG_MakePtr(_ptemp, (void *) _result,"_OGRErr_p");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_OSRCloneGeogCS(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    OGRSpatialReferenceH  _result;
    OGRSpatialReferenceH  _arg0;
    char * _argc0 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"s:OSRCloneGeogCS",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRCloneGeogCS. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (OGRSpatialReferenceH )OSRCloneGeogCS(_arg0);
    SWIG_MakePtr(_ptemp, (char *) _result,"_OGRSpatialReferenceH");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_OSRSetAttrValue(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    OGRErr * _result;
    OGRSpatialReferenceH  _arg0;
    char * _arg1;
    char * _arg2;
    char * _argc0 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"sss:OSRSetAttrValue",&_argc0,&_arg1,&_arg2)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRSetAttrValue. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (OGRErr *) malloc(sizeof(OGRErr ));
    *(_result) = OSRSetAttrValue(_arg0,_arg1,_arg2);
    SWIG_MakePtr(_ptemp, (void *) _result,"_OGRErr_p");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_OSRGetAttrValue(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    char * _result;
    OGRSpatialReferenceH  _arg0;
    char * _arg1;
    int  _arg2;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"ssi:OSRGetAttrValue",&_argc0,&_arg1,&_arg2)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRGetAttrValue. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (char *)OSRGetAttrValue(_arg0,_arg1,_arg2);
    _resultobj = Py_BuildValue("s", _result);
    return _resultobj;
}

static PyObject *_wrap_OSRSetLinearUnits(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    OGRErr * _result;
    OGRSpatialReferenceH  _arg0;
    char * _arg1;
    double  _arg2;
    char * _argc0 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"ssd:OSRSetLinearUnits",&_argc0,&_arg1,&_arg2)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRSetLinearUnits. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (OGRErr *) malloc(sizeof(OGRErr ));
    *(_result) = OSRSetLinearUnits(_arg0,_arg1,_arg2);
    SWIG_MakePtr(_ptemp, (void *) _result,"_OGRErr_p");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_OSRGetLinearUnits(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    double  _result;
    OGRSpatialReferenceH  _arg0;
    char ** _arg1;
    char * _argc0 = 0;
    char * _argc1 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"ss:OSRGetLinearUnits",&_argc0,&_argc1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRGetLinearUnits. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    if (_argc1) {
        if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_char_pp")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of OSRGetLinearUnits. Expected _char_pp.");
        return NULL;
        }
    }
    _result = (double )OSRGetLinearUnits(_arg0,_arg1);
    _resultobj = Py_BuildValue("d",_result);
    return _resultobj;
}

static PyObject *_wrap_OSRIsGeographic(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    OGRSpatialReferenceH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:OSRIsGeographic",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRIsGeographic. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (int )OSRIsGeographic(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_OSRIsProjected(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    OGRSpatialReferenceH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:OSRIsProjected",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRIsProjected. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (int )OSRIsProjected(_arg0);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_OSRIsSameGeogCS(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    OGRSpatialReferenceH  _arg0;
    OGRSpatialReferenceH  _arg1;
    char * _argc0 = 0;
    char * _argc1 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"ss:OSRIsSameGeogCS",&_argc0,&_argc1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRIsSameGeogCS. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    if (_argc1) {
        if (SWIG_GetPtr(_argc1,(void **) &_arg1,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of OSRIsSameGeogCS. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (int )OSRIsSameGeogCS(_arg0,_arg1);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_OSRIsSame(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    OGRSpatialReferenceH  _arg0;
    OGRSpatialReferenceH  _arg1;
    char * _argc0 = 0;
    char * _argc1 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"ss:OSRIsSame",&_argc0,&_argc1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRIsSame. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    if (_argc1) {
        if (SWIG_GetPtr(_argc1,(void **) &_arg1,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of OSRIsSame. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (int )OSRIsSame(_arg0,_arg1);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_OSRSetProjCS(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    OGRErr * _result;
    OGRSpatialReferenceH  _arg0;
    char * _arg1;
    char * _argc0 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"ss:OSRSetProjCS",&_argc0,&_arg1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRSetProjCS. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (OGRErr *) malloc(sizeof(OGRErr ));
    *(_result) = OSRSetProjCS(_arg0,_arg1);
    SWIG_MakePtr(_ptemp, (void *) _result,"_OGRErr_p");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_OSRSetWellKnownGeogCS(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    OGRErr * _result;
    OGRSpatialReferenceH  _arg0;
    char * _arg1;
    char * _argc0 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"ss:OSRSetWellKnownGeogCS",&_argc0,&_arg1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRSetWellKnownGeogCS. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (OGRErr *) malloc(sizeof(OGRErr ));
    *(_result) = OSRSetWellKnownGeogCS(_arg0,_arg1);
    SWIG_MakePtr(_ptemp, (void *) _result,"_OGRErr_p");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_OSRSetGeogCS(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    OGRErr * _result;
    OGRSpatialReferenceH  _arg0;
    char * _arg1;
    char * _arg2;
    char * _arg3;
    double  _arg4;
    double  _arg5;
    char * _arg6;
    double  _arg7;
    char * _arg8;
    double  _arg9;
    char * _argc0 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"ssssddsdsd:OSRSetGeogCS",&_argc0,&_arg1,&_arg2,&_arg3,&_arg4,&_arg5,&_arg6,&_arg7,&_arg8,&_arg9)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRSetGeogCS. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (OGRErr *) malloc(sizeof(OGRErr ));
    *(_result) = OSRSetGeogCS(_arg0,_arg1,_arg2,_arg3,_arg4,_arg5,_arg6,_arg7,_arg8,_arg9);
    SWIG_MakePtr(_ptemp, (void *) _result,"_OGRErr_p");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_OSRGetSemiMajor(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    double  _result;
    OGRSpatialReferenceH  _arg0;
    OGRErr * _arg1;
    char * _argc0 = 0;
    char * _argc1 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"ss:OSRGetSemiMajor",&_argc0,&_argc1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRGetSemiMajor. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    if (_argc1) {
        if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_OGRErr_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of OSRGetSemiMajor. Expected _OGRErr_p.");
        return NULL;
        }
    }
    _result = (double )OSRGetSemiMajor(_arg0,_arg1);
    _resultobj = Py_BuildValue("d",_result);
    return _resultobj;
}

static PyObject *_wrap_OSRGetSemiMinor(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    double  _result;
    OGRSpatialReferenceH  _arg0;
    OGRErr * _arg1;
    char * _argc0 = 0;
    char * _argc1 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"ss:OSRGetSemiMinor",&_argc0,&_argc1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRGetSemiMinor. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    if (_argc1) {
        if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_OGRErr_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of OSRGetSemiMinor. Expected _OGRErr_p.");
        return NULL;
        }
    }
    _result = (double )OSRGetSemiMinor(_arg0,_arg1);
    _resultobj = Py_BuildValue("d",_result);
    return _resultobj;
}

static PyObject *_wrap_OSRGetInvFlattening(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    double  _result;
    OGRSpatialReferenceH  _arg0;
    OGRErr * _arg1;
    char * _argc0 = 0;
    char * _argc1 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"ss:OSRGetInvFlattening",&_argc0,&_argc1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRGetInvFlattening. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    if (_argc1) {
        if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_OGRErr_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of OSRGetInvFlattening. Expected _OGRErr_p.");
        return NULL;
        }
    }
    _result = (double )OSRGetInvFlattening(_arg0,_arg1);
    _resultobj = Py_BuildValue("d",_result);
    return _resultobj;
}

static PyObject *_wrap_OSRSetAuthority(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    OGRErr * _result;
    OGRSpatialReferenceH  _arg0;
    char * _arg1;
    char * _arg2;
    int  _arg3;
    char * _argc0 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"sssi:OSRSetAuthority",&_argc0,&_arg1,&_arg2,&_arg3)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRSetAuthority. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (OGRErr *) malloc(sizeof(OGRErr ));
    *(_result) = OSRSetAuthority(_arg0,_arg1,_arg2,_arg3);
    SWIG_MakePtr(_ptemp, (void *) _result,"_OGRErr_p");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_OSRSetProjParm(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    OGRErr * _result;
    OGRSpatialReferenceH  _arg0;
    char * _arg1;
    double  _arg2;
    char * _argc0 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"ssd:OSRSetProjParm",&_argc0,&_arg1,&_arg2)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRSetProjParm. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (OGRErr *) malloc(sizeof(OGRErr ));
    *(_result) = OSRSetProjParm(_arg0,_arg1,_arg2);
    SWIG_MakePtr(_ptemp, (void *) _result,"_OGRErr_p");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_OSRGetProjParm(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    double  _result;
    OGRSpatialReferenceH  _arg0;
    char * _arg1;
    double  _arg2;
    OGRErr * _arg3;
    char * _argc0 = 0;
    char * _argc3 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"ssds:OSRGetProjParm",&_argc0,&_arg1,&_arg2,&_argc3)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRGetProjParm. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    if (_argc3) {
        if (SWIG_GetPtr(_argc3,(void **) &_arg3,"_OGRErr_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 4 of OSRGetProjParm. Expected _OGRErr_p.");
        return NULL;
        }
    }
    _result = (double )OSRGetProjParm(_arg0,_arg1,_arg2,_arg3);
    _resultobj = Py_BuildValue("d",_result);
    return _resultobj;
}

static PyObject *_wrap_OSRSetUTM(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    OGRErr * _result;
    OGRSpatialReferenceH  _arg0;
    int  _arg1;
    int  _arg2;
    char * _argc0 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"sii:OSRSetUTM",&_argc0,&_arg1,&_arg2)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRSetUTM. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (OGRErr *) malloc(sizeof(OGRErr ));
    *(_result) = OSRSetUTM(_arg0,_arg1,_arg2);
    SWIG_MakePtr(_ptemp, (void *) _result,"_OGRErr_p");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_OSRGetUTMZone(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    int  _result;
    OGRSpatialReferenceH  _arg0;
    int * _arg1;
    char * _argc0 = 0;
    char * _argc1 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"ss:OSRGetUTMZone",&_argc0,&_argc1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRGetUTMZone. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    if (_argc1) {
        if (SWIG_GetPtr(_argc1,(void **) &_arg1,"_int_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of OSRGetUTMZone. Expected _int_p.");
        return NULL;
        }
    }
    _result = (int )OSRGetUTMZone(_arg0,_arg1);
    _resultobj = Py_BuildValue("i",_result);
    return _resultobj;
}

static PyObject *_wrap_OSRSetStatePlane(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    OGRErr * _result;
    OGRSpatialReferenceH  _arg0;
    int  _arg1;
    int  _arg2;
    char * _argc0 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"sii:OSRSetStatePlane",&_argc0,&_arg1,&_arg2)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OSRSetStatePlane. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (OGRErr *) malloc(sizeof(OGRErr ));
    *(_result) = OSRSetStatePlane(_arg0,_arg1,_arg2);
    SWIG_MakePtr(_ptemp, (void *) _result,"_OGRErr_p");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_OCTNewCoordinateTransformation(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    OGRCoordinateTransformationH  _result;
    OGRSpatialReferenceH  _arg0;
    OGRSpatialReferenceH  _arg1;
    char * _argc0 = 0;
    char * _argc1 = 0;
    char _ptemp[128];

    self = self;
    if(!PyArg_ParseTuple(args,"ss:OCTNewCoordinateTransformation",&_argc0,&_argc1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OCTNewCoordinateTransformation. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    if (_argc1) {
        if (SWIG_GetPtr(_argc1,(void **) &_arg1,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 2 of OCTNewCoordinateTransformation. Expected _OGRSpatialReferenceH.");
        return NULL;
        }
    }
    _result = (OGRCoordinateTransformationH )OCTNewCoordinateTransformation(_arg0,_arg1);
    SWIG_MakePtr(_ptemp, (char *) _result,"_OGRCoordinateTransformationH");
    _resultobj = Py_BuildValue("s",_ptemp);
    return _resultobj;
}

static PyObject *_wrap_OCTDestroyCoordinateTransformation(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    OGRCoordinateTransformationH  _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:OCTDestroyCoordinateTransformation",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,(char *) 0 )) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of OCTDestroyCoordinateTransformation. Expected _OGRCoordinateTransformationH.");
        return NULL;
        }
    }
    OCTDestroyCoordinateTransformation(_arg0);
    Py_INCREF(Py_None);
    _resultobj = Py_None;
    return _resultobj;
}

#define GDALColorEntry_c1_set(_swigobj,_swigval) (_swigobj->c1 = _swigval,_swigval)
static PyObject *_wrap_GDALColorEntry_c1_set(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    short  _result;
    GDALColorEntry * _arg0;
    short  _arg1;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"sh:GDALColorEntry_c1_set",&_argc0,&_arg1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_GDALColorEntry_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALColorEntry_c1_set. Expected _GDALColorEntry_p.");
        return NULL;
        }
    }
    _result = (short )GDALColorEntry_c1_set(_arg0,_arg1);
    _resultobj = Py_BuildValue("h",_result);
    return _resultobj;
}

#define GDALColorEntry_c1_get(_swigobj) ((short ) _swigobj->c1)
static PyObject *_wrap_GDALColorEntry_c1_get(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    short  _result;
    GDALColorEntry * _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALColorEntry_c1_get",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_GDALColorEntry_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALColorEntry_c1_get. Expected _GDALColorEntry_p.");
        return NULL;
        }
    }
    _result = (short )GDALColorEntry_c1_get(_arg0);
    _resultobj = Py_BuildValue("h",_result);
    return _resultobj;
}

#define GDALColorEntry_c2_set(_swigobj,_swigval) (_swigobj->c2 = _swigval,_swigval)
static PyObject *_wrap_GDALColorEntry_c2_set(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    short  _result;
    GDALColorEntry * _arg0;
    short  _arg1;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"sh:GDALColorEntry_c2_set",&_argc0,&_arg1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_GDALColorEntry_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALColorEntry_c2_set. Expected _GDALColorEntry_p.");
        return NULL;
        }
    }
    _result = (short )GDALColorEntry_c2_set(_arg0,_arg1);
    _resultobj = Py_BuildValue("h",_result);
    return _resultobj;
}

#define GDALColorEntry_c2_get(_swigobj) ((short ) _swigobj->c2)
static PyObject *_wrap_GDALColorEntry_c2_get(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    short  _result;
    GDALColorEntry * _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALColorEntry_c2_get",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_GDALColorEntry_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALColorEntry_c2_get. Expected _GDALColorEntry_p.");
        return NULL;
        }
    }
    _result = (short )GDALColorEntry_c2_get(_arg0);
    _resultobj = Py_BuildValue("h",_result);
    return _resultobj;
}

#define GDALColorEntry_c3_set(_swigobj,_swigval) (_swigobj->c3 = _swigval,_swigval)
static PyObject *_wrap_GDALColorEntry_c3_set(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    short  _result;
    GDALColorEntry * _arg0;
    short  _arg1;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"sh:GDALColorEntry_c3_set",&_argc0,&_arg1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_GDALColorEntry_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALColorEntry_c3_set. Expected _GDALColorEntry_p.");
        return NULL;
        }
    }
    _result = (short )GDALColorEntry_c3_set(_arg0,_arg1);
    _resultobj = Py_BuildValue("h",_result);
    return _resultobj;
}

#define GDALColorEntry_c3_get(_swigobj) ((short ) _swigobj->c3)
static PyObject *_wrap_GDALColorEntry_c3_get(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    short  _result;
    GDALColorEntry * _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALColorEntry_c3_get",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_GDALColorEntry_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALColorEntry_c3_get. Expected _GDALColorEntry_p.");
        return NULL;
        }
    }
    _result = (short )GDALColorEntry_c3_get(_arg0);
    _resultobj = Py_BuildValue("h",_result);
    return _resultobj;
}

#define GDALColorEntry_c4_set(_swigobj,_swigval) (_swigobj->c4 = _swigval,_swigval)
static PyObject *_wrap_GDALColorEntry_c4_set(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    short  _result;
    GDALColorEntry * _arg0;
    short  _arg1;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"sh:GDALColorEntry_c4_set",&_argc0,&_arg1)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_GDALColorEntry_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALColorEntry_c4_set. Expected _GDALColorEntry_p.");
        return NULL;
        }
    }
    _result = (short )GDALColorEntry_c4_set(_arg0,_arg1);
    _resultobj = Py_BuildValue("h",_result);
    return _resultobj;
}

#define GDALColorEntry_c4_get(_swigobj) ((short ) _swigobj->c4)
static PyObject *_wrap_GDALColorEntry_c4_get(PyObject *self, PyObject *args) {
    PyObject * _resultobj;
    short  _result;
    GDALColorEntry * _arg0;
    char * _argc0 = 0;

    self = self;
    if(!PyArg_ParseTuple(args,"s:GDALColorEntry_c4_get",&_argc0)) 
        return NULL;
    if (_argc0) {
        if (SWIG_GetPtr(_argc0,(void **) &_arg0,"_GDALColorEntry_p")) {
            PyErr_SetString(PyExc_TypeError,"Type error in argument 1 of GDALColorEntry_c4_get. Expected _GDALColorEntry_p.");
        return NULL;
        }
    }
    _result = (short )GDALColorEntry_c4_get(_arg0);
    _resultobj = Py_BuildValue("h",_result);
    return _resultobj;
}

static PyMethodDef _gdalMethods[] = {
	 { "GDALColorEntry_c4_get", _wrap_GDALColorEntry_c4_get, 1 },
	 { "GDALColorEntry_c4_set", _wrap_GDALColorEntry_c4_set, 1 },
	 { "GDALColorEntry_c3_get", _wrap_GDALColorEntry_c3_get, 1 },
	 { "GDALColorEntry_c3_set", _wrap_GDALColorEntry_c3_set, 1 },
	 { "GDALColorEntry_c2_get", _wrap_GDALColorEntry_c2_get, 1 },
	 { "GDALColorEntry_c2_set", _wrap_GDALColorEntry_c2_set, 1 },
	 { "GDALColorEntry_c1_get", _wrap_GDALColorEntry_c1_get, 1 },
	 { "GDALColorEntry_c1_set", _wrap_GDALColorEntry_c1_set, 1 },
	 { "OPTGetProjectionMethods", py_OPTGetProjectionMethods, 1 },
	 { "OCTTransform", py_OCTTransform, 1 },
	 { "OCTDestroyCoordinateTransformation", _wrap_OCTDestroyCoordinateTransformation, 1 },
	 { "OCTNewCoordinateTransformation", _wrap_OCTNewCoordinateTransformation, 1 },
	 { "OSRExportToPrettyWkt", py_OSRExportToPrettyWkt, 1 },
	 { "OSRExportToWkt", py_OSRExportToWkt, 1 },
	 { "OSRExportToProj4", py_OSRExportToProj4, 1 },
	 { "OSRImportFromWkt", py_OSRImportFromWkt, 1 },
	 { "OSRImportFromESRI", py_OSRImportFromESRI, 1 },
	 { "OSRSetStatePlane", _wrap_OSRSetStatePlane, 1 },
	 { "OSRGetUTMZone", _wrap_OSRGetUTMZone, 1 },
	 { "OSRSetUTM", _wrap_OSRSetUTM, 1 },
	 { "OSRGetProjParm", _wrap_OSRGetProjParm, 1 },
	 { "OSRSetProjParm", _wrap_OSRSetProjParm, 1 },
	 { "OSRSetAuthority", _wrap_OSRSetAuthority, 1 },
	 { "OSRGetInvFlattening", _wrap_OSRGetInvFlattening, 1 },
	 { "OSRGetSemiMinor", _wrap_OSRGetSemiMinor, 1 },
	 { "OSRGetSemiMajor", _wrap_OSRGetSemiMajor, 1 },
	 { "OSRSetGeogCS", _wrap_OSRSetGeogCS, 1 },
	 { "OSRSetWellKnownGeogCS", _wrap_OSRSetWellKnownGeogCS, 1 },
	 { "OSRSetProjCS", _wrap_OSRSetProjCS, 1 },
	 { "OSRIsSame", _wrap_OSRIsSame, 1 },
	 { "OSRIsSameGeogCS", _wrap_OSRIsSameGeogCS, 1 },
	 { "OSRIsProjected", _wrap_OSRIsProjected, 1 },
	 { "OSRIsGeographic", _wrap_OSRIsGeographic, 1 },
	 { "OSRGetLinearUnits", _wrap_OSRGetLinearUnits, 1 },
	 { "OSRSetLinearUnits", _wrap_OSRSetLinearUnits, 1 },
	 { "OSRGetAttrValue", _wrap_OSRGetAttrValue, 1 },
	 { "OSRSetAttrValue", _wrap_OSRSetAttrValue, 1 },
	 { "OSRCloneGeogCS", _wrap_OSRCloneGeogCS, 1 },
	 { "OSRImportFromEPSG", _wrap_OSRImportFromEPSG, 1 },
	 { "OSRDereference", _wrap_OSRDereference, 1 },
	 { "OSRReference", _wrap_OSRReference, 1 },
	 { "OSRDestroySpatialReference", _wrap_OSRDestroySpatialReference, 1 },
	 { "OSRNewSpatialReference", _wrap_OSRNewSpatialReference, 1 },
	 { "GDALDitherRGB2PCT", py_GDALDitherRGB2PCT, 1 },
	 { "GDALComputeMedianCutPCT", py_GDALComputeMedianCutPCT, 1 },
	 { "GDALGetRasterNoDataValue", py_GDALGetRasterNoDataValue, 1 },
	 { "GDALGetDescription", py_GDALGetDescription, 1 },
	 { "GDALGetMetadata", py_GDALGetMetadata, 1 },
	 { "GDALGetRasterHistogram", py_GDALGetRasterHistogram, 1 },
	 { "GDALSetGeoTransform", py_GDALSetGeoTransform, 1 },
	 { "GDALGetGeoTransform", py_GDALGetGeoTransform, 1 },
	 { "GDALGetGCPs", py_GDALGetGCPs, 1 },
	 { "GDALWriteRaster", py_GDALWriteRaster, 1 },
	 { "GDALReadRaster", py_GDALReadRaster, 1 },
	 { "GDALCreate", py_GDALCreate, 1 },
	 { "GDALCreateCopy", py_GDALCreateCopy, 1 },
	 { "GDALBuildOverviews", py_GDALBuildOverviews, 1 },
	 { "GDALFlushCacheBlock", _wrap_GDALFlushCacheBlock, 1 },
	 { "GDALGetCacheUsed", _wrap_GDALGetCacheUsed, 1 },
	 { "GDALGetCacheMax", _wrap_GDALGetCacheMax, 1 },
	 { "GDALSetCacheMax", _wrap_GDALSetCacheMax, 1 },
	 { "GDALDecToDMS", _wrap_GDALDecToDMS, 1 },
	 { "GDALDestroyProjDef", _wrap_GDALDestroyProjDef, 1 },
	 { "GDALReprojectFromLongLat", _wrap_GDALReprojectFromLongLat, 1 },
	 { "GDALReprojectToLongLat", _wrap_GDALReprojectToLongLat, 1 },
	 { "GDALCreateProjDef", _wrap_GDALCreateProjDef, 1 },
	 { "GDALSetColorEntry", _wrap_GDALSetColorEntry, 1 },
	 { "GDALGetColorEntryAsRGB", _wrap_GDALGetColorEntryAsRGB, 1 },
	 { "GDALGetColorEntry", _wrap_GDALGetColorEntry, 1 },
	 { "GDALGetColorEntryCount", _wrap_GDALGetColorEntryCount, 1 },
	 { "GDALGetPaletteInterpretation", _wrap_GDALGetPaletteInterpretation, 1 },
	 { "GDALCloneColorTable", _wrap_GDALCloneColorTable, 1 },
	 { "GDALDestroyColorTable", _wrap_GDALDestroyColorTable, 1 },
	 { "GDALCreateColorTable", _wrap_GDALCreateColorTable, 1 },
	 { "GDALFlushRasterCache", _wrap_GDALFlushRasterCache, 1 },
	 { "GDALGetOverview", _wrap_GDALGetOverview, 1 },
	 { "GDALGetOverviewCount", _wrap_GDALGetOverviewCount, 1 },
	 { "GDALSetRasterNoDataValue", _wrap_GDALSetRasterNoDataValue, 1 },
	 { "GDALSetRasterColorTable", _wrap_GDALSetRasterColorTable, 1 },
	 { "GDALGetRasterColorTable", _wrap_GDALGetRasterColorTable, 1 },
	 { "GDALGetRasterColorInterpretation", _wrap_GDALGetRasterColorInterpretation, 1 },
	 { "GDALGetRasterBandYSize", _wrap_GDALGetRasterBandYSize, 1 },
	 { "GDALGetRasterBandXSize", _wrap_GDALGetRasterBandXSize, 1 },
	 { "GDALGetBlockSize", _wrap_GDALGetBlockSize, 1 },
	 { "GDALGetRasterDataType", _wrap_GDALGetRasterDataType, 1 },
	 { "GDALGetGCPProjection", _wrap_GDALGetGCPProjection, 1 },
	 { "GDALGetGCPCount", _wrap_GDALGetGCPCount, 1 },
	 { "GDALDereferenceDataset", _wrap_GDALDereferenceDataset, 1 },
	 { "GDALReferenceDataset", _wrap_GDALReferenceDataset, 1 },
	 { "GDALSetProjection", _wrap_GDALSetProjection, 1 },
	 { "GDALGetProjectionRef", _wrap_GDALGetProjectionRef, 1 },
	 { "GDALGetRasterBand", _wrap_GDALGetRasterBand, 1 },
	 { "GDALGetRasterCount", _wrap_GDALGetRasterCount, 1 },
	 { "GDALGetRasterYSize", _wrap_GDALGetRasterYSize, 1 },
	 { "GDALGetRasterXSize", _wrap_GDALGetRasterXSize, 1 },
	 { "GDALClose", _wrap_GDALClose, 1 },
	 { "GDALGetDatasetDriver", _wrap_GDALGetDatasetDriver, 1 },
	 { "GDALGetDriverHelpTopic", _wrap_GDALGetDriverHelpTopic, 1 },
	 { "GDALGetDriverLongName", _wrap_GDALGetDriverLongName, 1 },
	 { "GDALGetDriverShortName", _wrap_GDALGetDriverShortName, 1 },
	 { "GDALDeleteDataset", _wrap_GDALDeleteDataset, 1 },
	 { "GDALDeregisterDriver", _wrap_GDALDeregisterDriver, 1 },
	 { "GDALRegisterDriver", _wrap_GDALRegisterDriver, 1 },
	 { "GDALGetDriver", _wrap_GDALGetDriver, 1 },
	 { "GDALGetDriverCount", _wrap_GDALGetDriverCount, 1 },
	 { "GDALGetDriverByName", _wrap_GDALGetDriverByName, 1 },
	 { "GDALOpen", _wrap_GDALOpen, 1 },
	 { "GDALRegister_NUMPY", _wrap_GDALRegister_NUMPY, 1 },
	 { "GDALAllRegister", _wrap_GDALAllRegister, 1 },
	 { "GDALGetPaletteInterpretationName", _wrap_GDALGetPaletteInterpretationName, 1 },
	 { "GDALGetColorInterpretationName", _wrap_GDALGetColorInterpretationName, 1 },
	 { "GDALGetDataTypeName", _wrap_GDALGetDataTypeName, 1 },
	 { "GDALGetDataTypeSize", _wrap_GDALGetDataTypeSize, 1 },
	 { "CPLGetLastErrorMsg", _wrap_CPLGetLastErrorMsg, 1 },
	 { "CPLGetLastErrorNo", _wrap_CPLGetLastErrorNo, 1 },
	 { "CPLErrorReset", _wrap_CPLErrorReset, 1 },
	 { "CPLDebug", _wrap_CPLDebug, 1 },
	 { "NumPyArrayToGDALFilename", py_NumPyArrayToGDALFilename, 1 },
	 { NULL, NULL }
};
static PyObject *SWIG_globals;
#ifdef __cplusplus
extern "C" 
#endif
SWIGEXPORT(void,init_gdal)() {
	 PyObject *m, *d;
	 SWIG_globals = SWIG_newvarlink();
	 m = Py_InitModule("_gdal", _gdalMethods);
	 d = PyModule_GetDict(m);
/*
 * These are the pointer type-equivalency mappings. 
 * (Used by the SWIG pointer type-checker).
 */
	 SWIG_RegisterMapping("_signed_long","_long",0);
	 SWIG_RegisterMapping("_long","_unsigned_long",0);
	 SWIG_RegisterMapping("_long","_signed_long",0);
	 SWIG_RegisterMapping("_GDALRWFlag","_GDALPaletteInterp",0);
	 SWIG_RegisterMapping("_GDALRWFlag","_GDALColorInterp",0);
	 SWIG_RegisterMapping("_GDALRWFlag","_int",0);
	 SWIG_RegisterMapping("_GDALRWFlag","_signed_int",0);
	 SWIG_RegisterMapping("_GDALRWFlag","_unsigned_int",0);
	 SWIG_RegisterMapping("_GDALRWFlag","_GDALDataType",0);
	 SWIG_RegisterMapping("_GDALRWFlag","_GDALAccess",0);
	 SWIG_RegisterMapping("_GDALPaletteInterp","_int",0);
	 SWIG_RegisterMapping("_GDALPaletteInterp","_signed_int",0);
	 SWIG_RegisterMapping("_GDALPaletteInterp","_unsigned_int",0);
	 SWIG_RegisterMapping("_GDALPaletteInterp","_GDALDataType",0);
	 SWIG_RegisterMapping("_GDALPaletteInterp","_GDALAccess",0);
	 SWIG_RegisterMapping("_GDALPaletteInterp","_GDALRWFlag",0);
	 SWIG_RegisterMapping("_GDALPaletteInterp","_GDALColorInterp",0);
	 SWIG_RegisterMapping("_GDALDataType","_GDALPaletteInterp",0);
	 SWIG_RegisterMapping("_GDALDataType","_GDALColorInterp",0);
	 SWIG_RegisterMapping("_GDALDataType","_GDALRWFlag",0);
	 SWIG_RegisterMapping("_GDALDataType","_GDALAccess",0);
	 SWIG_RegisterMapping("_GDALDataType","_int",0);
	 SWIG_RegisterMapping("_GDALDataType","_signed_int",0);
	 SWIG_RegisterMapping("_GDALDataType","_unsigned_int",0);
	 SWIG_RegisterMapping("_unsigned_long","_long",0);
	 SWIG_RegisterMapping("_signed_int","_GDALPaletteInterp",0);
	 SWIG_RegisterMapping("_signed_int","_GDALColorInterp",0);
	 SWIG_RegisterMapping("_signed_int","_GDALRWFlag",0);
	 SWIG_RegisterMapping("_signed_int","_GDALAccess",0);
	 SWIG_RegisterMapping("_signed_int","_GDALDataType",0);
	 SWIG_RegisterMapping("_signed_int","_int",0);
	 SWIG_RegisterMapping("_GDALAccess","_GDALPaletteInterp",0);
	 SWIG_RegisterMapping("_GDALAccess","_GDALColorInterp",0);
	 SWIG_RegisterMapping("_GDALAccess","_GDALRWFlag",0);
	 SWIG_RegisterMapping("_GDALAccess","_int",0);
	 SWIG_RegisterMapping("_GDALAccess","_signed_int",0);
	 SWIG_RegisterMapping("_GDALAccess","_unsigned_int",0);
	 SWIG_RegisterMapping("_GDALAccess","_GDALDataType",0);
	 SWIG_RegisterMapping("_unsigned_short","_short",0);
	 SWIG_RegisterMapping("_signed_short","_short",0);
	 SWIG_RegisterMapping("_unsigned_int","_GDALPaletteInterp",0);
	 SWIG_RegisterMapping("_unsigned_int","_GDALColorInterp",0);
	 SWIG_RegisterMapping("_unsigned_int","_GDALRWFlag",0);
	 SWIG_RegisterMapping("_unsigned_int","_GDALAccess",0);
	 SWIG_RegisterMapping("_unsigned_int","_GDALDataType",0);
	 SWIG_RegisterMapping("_unsigned_int","_int",0);
	 SWIG_RegisterMapping("_short","_unsigned_short",0);
	 SWIG_RegisterMapping("_short","_signed_short",0);
	 SWIG_RegisterMapping("_int","_GDALPaletteInterp",0);
	 SWIG_RegisterMapping("_int","_GDALColorInterp",0);
	 SWIG_RegisterMapping("_int","_GDALRWFlag",0);
	 SWIG_RegisterMapping("_int","_GDALAccess",0);
	 SWIG_RegisterMapping("_int","_GDALDataType",0);
	 SWIG_RegisterMapping("_int","_unsigned_int",0);
	 SWIG_RegisterMapping("_int","_signed_int",0);
	 SWIG_RegisterMapping("_GDALColorInterp","_GDALPaletteInterp",0);
	 SWIG_RegisterMapping("_GDALColorInterp","_int",0);
	 SWIG_RegisterMapping("_GDALColorInterp","_signed_int",0);
	 SWIG_RegisterMapping("_GDALColorInterp","_unsigned_int",0);
	 SWIG_RegisterMapping("_GDALColorInterp","_GDALDataType",0);
	 SWIG_RegisterMapping("_GDALColorInterp","_GDALAccess",0);
	 SWIG_RegisterMapping("_GDALColorInterp","_GDALRWFlag",0);
}
