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


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

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

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

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

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

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

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

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

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



#include <stdlib.h>
#include <string.h>
#include <stdio.h>


/* Support for throwing C# exceptions from C/C++. There are two types: 
 * Exceptions that take a message and ArgumentExceptions that take a message and a parameter name. */
typedef enum {
  SWIG_CSharpApplicationException,
  SWIG_CSharpArithmeticException,
  SWIG_CSharpDivideByZeroException,
  SWIG_CSharpIndexOutOfRangeException,
  SWIG_CSharpInvalidOperationException,
  SWIG_CSharpIOException,
  SWIG_CSharpNullReferenceException,
  SWIG_CSharpOutOfMemoryException,
  SWIG_CSharpOverflowException,
  SWIG_CSharpSystemException
} SWIG_CSharpExceptionCodes;

typedef enum {
  SWIG_CSharpArgumentException,
  SWIG_CSharpArgumentNullException,
  SWIG_CSharpArgumentOutOfRangeException
} SWIG_CSharpExceptionArgumentCodes;

typedef void (SWIGSTDCALL* SWIG_CSharpExceptionCallback_t)(const char *);
typedef void (SWIGSTDCALL* SWIG_CSharpExceptionArgumentCallback_t)(const char *, const char *);

typedef struct {
  SWIG_CSharpExceptionCodes code;
  SWIG_CSharpExceptionCallback_t callback;
} SWIG_CSharpException_t;

typedef struct {
  SWIG_CSharpExceptionArgumentCodes code;
  SWIG_CSharpExceptionArgumentCallback_t callback;
} SWIG_CSharpExceptionArgument_t;

static SWIG_CSharpException_t SWIG_csharp_exceptions[] = {
  { SWIG_CSharpApplicationException, NULL },
  { SWIG_CSharpArithmeticException, NULL },
  { SWIG_CSharpDivideByZeroException, NULL },
  { SWIG_CSharpIndexOutOfRangeException, NULL },
  { SWIG_CSharpInvalidOperationException, NULL },
  { SWIG_CSharpIOException, NULL },
  { SWIG_CSharpNullReferenceException, NULL },
  { SWIG_CSharpOutOfMemoryException, NULL },
  { SWIG_CSharpOverflowException, NULL },
  { SWIG_CSharpSystemException, NULL }
};

static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] = {
  { SWIG_CSharpArgumentException, NULL },
  { SWIG_CSharpArgumentNullException, NULL },
  { SWIG_CSharpArgumentOutOfRangeException, NULL },
};

static void SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) {
  SWIG_CSharpExceptionCallback_t callback = SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback;
  if (code >=0 && (size_t)code < sizeof(SWIG_csharp_exceptions)/sizeof(SWIG_CSharpException_t)) {
    callback = SWIG_csharp_exceptions[code].callback;
  }
  callback(msg);
}

static void SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpExceptionArgumentCodes code, const char *msg, const char *param_name) {
  SWIG_CSharpExceptionArgumentCallback_t callback = SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback;
  if (code >=0 && (size_t)code < sizeof(SWIG_csharp_exceptions_argument)/sizeof(SWIG_CSharpExceptionArgument_t)) {
    callback = SWIG_csharp_exceptions_argument[code].callback;
  }
  callback(msg, param_name);
}


#ifdef __cplusplus
extern "C" 
#endif
SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionCallbacks_gdal(
                                                SWIG_CSharpExceptionCallback_t applicationCallback,
                                                SWIG_CSharpExceptionCallback_t arithmeticCallback,
                                                SWIG_CSharpExceptionCallback_t divideByZeroCallback, 
                                                SWIG_CSharpExceptionCallback_t indexOutOfRangeCallback, 
                                                SWIG_CSharpExceptionCallback_t invalidOperationCallback,
                                                SWIG_CSharpExceptionCallback_t ioCallback,
                                                SWIG_CSharpExceptionCallback_t nullReferenceCallback,
                                                SWIG_CSharpExceptionCallback_t outOfMemoryCallback, 
                                                SWIG_CSharpExceptionCallback_t overflowCallback, 
                                                SWIG_CSharpExceptionCallback_t systemCallback) {
  SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback = applicationCallback;
  SWIG_csharp_exceptions[SWIG_CSharpArithmeticException].callback = arithmeticCallback;
  SWIG_csharp_exceptions[SWIG_CSharpDivideByZeroException].callback = divideByZeroCallback;
  SWIG_csharp_exceptions[SWIG_CSharpIndexOutOfRangeException].callback = indexOutOfRangeCallback;
  SWIG_csharp_exceptions[SWIG_CSharpInvalidOperationException].callback = invalidOperationCallback;
  SWIG_csharp_exceptions[SWIG_CSharpIOException].callback = ioCallback;
  SWIG_csharp_exceptions[SWIG_CSharpNullReferenceException].callback = nullReferenceCallback;
  SWIG_csharp_exceptions[SWIG_CSharpOutOfMemoryException].callback = outOfMemoryCallback;
  SWIG_csharp_exceptions[SWIG_CSharpOverflowException].callback = overflowCallback;
  SWIG_csharp_exceptions[SWIG_CSharpSystemException].callback = systemCallback;
}

#ifdef __cplusplus
extern "C" 
#endif
SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_gdal(
                                                SWIG_CSharpExceptionArgumentCallback_t argumentCallback,
                                                SWIG_CSharpExceptionArgumentCallback_t argumentNullCallback,
                                                SWIG_CSharpExceptionArgumentCallback_t argumentOutOfRangeCallback) {
  SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback = argumentCallback;
  SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentNullException].callback = argumentNullCallback;
  SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentOutOfRangeException].callback = argumentOutOfRangeCallback;
}


/* Callback for returning strings to C# without leaking memory */
typedef char * (SWIGSTDCALL* SWIG_CSharpStringHelperCallback)(const char *);
static SWIG_CSharpStringHelperCallback SWIG_csharp_string_callback = NULL;


#ifdef __cplusplus
extern "C" 
#endif
SWIGEXPORT void SWIGSTDCALL SWIGRegisterStringCallback_gdal(SWIG_CSharpStringHelperCallback callback) {
  SWIG_csharp_string_callback = callback;
}

/* Contract support */

#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentOutOfRangeException, msg, ""); return nullreturn; } else


#include <iostream>
using namespace std;

#include "cpl_port.h"
#include "cpl_string.h"

#include "gdal.h"
#include "gdal_priv.h"
#include "gdal_alg.h"
#include "gdalwarper.h"

typedef void GDALMajorObjectShadow;
typedef void GDALDriverShadow;
typedef void GDALDatasetShadow;
typedef void GDALRasterBandShadow;

typedef int FALSE_IS_ERR;



  void Debug( const char *msg_class, const char *message ) {
    CPLDebug( msg_class, message );
  }
  void Error( CPLErr msg_class = CE_Failure, int err_code = 0, const char* msg = "error" ) {
    CPLError( msg_class, err_code, msg );
  }

  CPLErr PushErrorHandler( char const * pszCallbackName = "CPLQuietErrorHandler" ) {
    CPLErrorHandler pfnHandler = NULL;
    if( EQUAL(pszCallbackName,"CPLQuietErrorHandler") )
      pfnHandler = CPLQuietErrorHandler;
    else if( EQUAL(pszCallbackName,"CPLDefaultErrorHandler") )
      pfnHandler = CPLDefaultErrorHandler;
    else if( EQUAL(pszCallbackName,"CPLLoggingErrorHandler") )
      pfnHandler = CPLLoggingErrorHandler;

    if ( pfnHandler == NULL )
      return CE_Fatal;

    CPLPushErrorHandler( pfnHandler );

    return CE_None;
  }


static char const *GDALMajorObjectShadow_GetDescription(GDALMajorObjectShadow *self){
    return GDALGetDescription( self );
  }
static void GDALMajorObjectShadow_SetDescription(GDALMajorObjectShadow *self,char const *pszNewDesc){
    GDALSetDescription( self, pszNewDesc );
  }
static char **GDALMajorObjectShadow_GetMetadata_Dict(GDALMajorObjectShadow *self,char const *pszDomain=""){
    return GDALGetMetadata( self, pszDomain );
  }
static char **GDALMajorObjectShadow_GetMetadata_List(GDALMajorObjectShadow *self,char const *pszDomain=""){
    return GDALGetMetadata( self, pszDomain );
  }
static CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_0(GDALMajorObjectShadow *self,char **papszMetadata,char const *pszDomain=""){
    return GDALSetMetadata( self, papszMetadata, pszDomain );
  }
static CPLErr GDALMajorObjectShadow_SetMetadata__SWIG_1(GDALMajorObjectShadow *self,char *pszMetadataString,char const *pszDomain=""){
    char *tmpList[2];
    tmpList[0] = pszMetadataString;
    tmpList[1] = 0;
    return GDALSetMetadata( self, tmpList, pszDomain );
  }
static GDALDatasetShadow *GDALDriverShadow_Create(GDALDriverShadow *self,char const *name,int xsize,int ysize,int bands=1,GDALDataType eType=GDT_Byte,char **options=0){
    GDALDatasetShadow* ds = (GDALDatasetShadow*) GDALCreate( self, name, xsize, ysize, bands, eType, options );
    return ds;
  }
static GDALDatasetShadow *GDALDriverShadow_CreateCopy(GDALDriverShadow *self,char const *name,GDALDatasetShadow *src,int strict=1,char **options=0){
    GDALDatasetShadow *ds = (GDALDatasetShadow*) GDALCreateCopy(self, name, src, strict, 0, 0, 0 );
    return ds;
  }
static int GDALDriverShadow_Delete(GDALDriverShadow *self,char const *name){
    return GDALDeleteDataset( self, name );
  }

char const *GDALDriverShadow_ShortName_get( GDALDriverShadow *h ) {
  return GDALGetDriverShortName( h );
}
char const *GDALDriverShadow_LongName_get( GDALDriverShadow *h ) {
  return GDALGetDriverLongName( h );
}
char const *GDALDriverShadow_HelpTopic_get( GDALDriverShadow *h ) {
  return GDALGetDriverHelpTopic( h );
}


char const *GDALDriverShadow_get_ShortName( GDALDriverShadow *h ) {
  return GDALGetDriverShortName( h );
}
char const *GDALDriverShadow_get_LongName( GDALDriverShadow *h ) {
  return GDALGetDriverLongName( h );
}
char const *GDALDriverShadow_get_HelpTopic( GDALDriverShadow *h ) {
  return GDALGetDriverHelpTopic( h );
}

static GDAL_GCP *new_GDAL_GCP(double x=0.0,double y=0.0,double z=0.0,double pixel=0.0,double line=0.0,char const *info="",char const *id=""){
    GDAL_GCP *self = (GDAL_GCP*) CPLMalloc( sizeof( GDAL_GCP ) );
    self->dfGCPX = x;
    self->dfGCPY = y;
    self->dfGCPZ = z;
    self->dfGCPPixel = pixel;
    self->dfGCPLine = line;
    self->pszInfo =  CPLStrdup( (info == 0) ? "" : info );
    self->pszId = CPLStrdup( (id==0)? "" : id );
    return self;
  }
static void delete_GDAL_GCP(GDAL_GCP *self){
    if ( self->pszInfo )
      CPLFree( self->pszInfo );
    if ( self->pszId )
      CPLFree( self->pszId );
    CPLFree( self );
  }


double GDAL_GCP_GCPX_get( GDAL_GCP *h ) {
  return h->dfGCPX;
}
void GDAL_GCP_GCPX_set( GDAL_GCP *h, double val ) {
  h->dfGCPX = val;
}
double GDAL_GCP_GCPY_get( GDAL_GCP *h ) {
  return h->dfGCPY;
}
void GDAL_GCP_GCPY_set( GDAL_GCP *h, double val ) {
  h->dfGCPY = val;
}
double GDAL_GCP_GCPZ_get( GDAL_GCP *h ) {
  return h->dfGCPZ;
}
void GDAL_GCP_GCPZ_set( GDAL_GCP *h, double val ) {
  h->dfGCPZ = val;
}
double GDAL_GCP_GCPPixel_get( GDAL_GCP *h ) {
  return h->dfGCPPixel;
}
void GDAL_GCP_GCPPixel_set( GDAL_GCP *h, double val ) {
  h->dfGCPPixel = val;
}
double GDAL_GCP_GCPLine_get( GDAL_GCP *h ) {
  return h->dfGCPLine;
}
void GDAL_GCP_GCPLine_set( GDAL_GCP *h, double val ) {
  h->dfGCPLine = val;
}
const char * GDAL_GCP_Info_get( GDAL_GCP *h ) {
  return h->pszInfo;
}
void GDAL_GCP_Info_set( GDAL_GCP *h, const char * val ) {
  if ( h->pszInfo ) 
    CPLFree( h->pszInfo );
  h->pszInfo = CPLStrdup(val);
}
const char * GDAL_GCP_Id_get( GDAL_GCP *h ) {
  return h->pszId;
}
void GDAL_GCP_Id_set( GDAL_GCP *h, const char * val ) {
  if ( h->pszId ) 
    CPLFree( h->pszId );
  h->pszId = CPLStrdup(val);
}



/* Duplicate, but transposed names for C# because 
*  the C# module outputs backwards names
*/
double GDAL_GCP_get_GCPX( GDAL_GCP *h ) {
  return h->dfGCPX;
}
void GDAL_GCP_set_GCPX( GDAL_GCP *h, double val ) {
  h->dfGCPX = val;
}
double GDAL_GCP_get_GCPY( GDAL_GCP *h ) {
  return h->dfGCPY;
}
void GDAL_GCP_set_GCPY( GDAL_GCP *h, double val ) {
  h->dfGCPY = val;
}
double GDAL_GCP_get_GCPZ( GDAL_GCP *h ) {
  return h->dfGCPZ;
}
void GDAL_GCP_set_GCPZ( GDAL_GCP *h, double val ) {
  h->dfGCPZ = val;
}
double GDAL_GCP_get_GCPPixel( GDAL_GCP *h ) {
  return h->dfGCPPixel;
}
void GDAL_GCP_set_GCPPixel( GDAL_GCP *h, double val ) {
  h->dfGCPPixel = val;
}
double GDAL_GCP_get_GCPLine( GDAL_GCP *h ) {
  return h->dfGCPLine;
}
void GDAL_GCP_set_GCPLine( GDAL_GCP *h, double val ) {
  h->dfGCPLine = val;
}
const char * GDAL_GCP_get_Info( GDAL_GCP *h ) {
  return h->pszInfo;
}
void GDAL_GCP_set_Info( GDAL_GCP *h, const char * val ) {
  if ( h->pszInfo ) 
    CPLFree( h->pszInfo );
  h->pszInfo = CPLStrdup(val);
}
const char * GDAL_GCP_get_Id( GDAL_GCP *h ) {
  return h->pszId;
}
void GDAL_GCP_set_Id( GDAL_GCP *h, const char * val ) {
  if ( h->pszId ) 
    CPLFree( h->pszId );
  h->pszId = CPLStrdup(val);
}



static int
CreateTupleFromDoubleArray( double *first, unsigned int size ) {
  
  return 1;
}

static void delete_GDALDatasetShadow(GDALDatasetShadow *self){
    if ( GDALDereferenceDataset( self ) <= 0 ) {
      GDALClose(self);
    }
  }
static GDALDriverShadow *GDALDatasetShadow_GetDriver(GDALDatasetShadow *self){
    return (GDALDriverShadow*) GDALGetDatasetDriver( self );
  }
static GDALRasterBandShadow *GDALDatasetShadow_GetRasterBand(GDALDatasetShadow *self,int nBand){
    return (GDALRasterBandShadow*) GDALGetRasterBand( self, nBand );
  }
static char const *GDALDatasetShadow_GetProjection(GDALDatasetShadow *self){
    return GDALGetProjectionRef( self );
  }
static char const *GDALDatasetShadow_GetProjectionRef(GDALDatasetShadow *self){
    return GDALGetProjectionRef( self );
  }
static CPLErr GDALDatasetShadow_SetProjection(GDALDatasetShadow *self,char const *prj){
    return GDALSetProjection( self, prj );
  }
static void GDALDatasetShadow_GetGeoTransform(GDALDatasetShadow *self,double argout[6]){
    if ( GDALGetGeoTransform( self, argout ) != 0 ) {
      argout[0] = 0.0;
      argout[1] = 1.0;
      argout[2] = 0.0;
      argout[3] = 0.0;
      argout[4] = 0.0;
      argout[5] = 1.0;
    }
  }
static CPLErr GDALDatasetShadow_SetGeoTransform(GDALDatasetShadow *self,double argin[6]){
    return GDALSetGeoTransform( self, argin );
  }
static int GDALDatasetShadow_BuildOverviews(GDALDatasetShadow *self,char const *resampling="NEAREST",int overviewlist=0,int *pOverviews=0){
    return GDALBuildOverviews( self, resampling, overviewlist, pOverviews, 0, 0, 0, 0);
  }
static int GDALDatasetShadow_GetGCPCount(GDALDatasetShadow *self){
    return GDALGetGCPCount( self );
  }
static char const *GDALDatasetShadow_GetGCPProjection(GDALDatasetShadow *self){
    return GDALGetGCPProjection( self );
  }
static void GDALDatasetShadow_GetGCPs(GDALDatasetShadow *self,int *nGCPs,GDAL_GCP const **pGCPs){
    *nGCPs = GDALGetGCPCount( self );
    *pGCPs = GDALGetGCPs( self );
  }
static CPLErr GDALDatasetShadow_SetGCPs(GDALDatasetShadow *self,int nGCPs,GDAL_GCP const *pGCPs,char const *pszGCPProjection){
    return GDALSetGCPs( self, nGCPs, pGCPs, pszGCPProjection );
  }
static void GDALDatasetShadow_FlushCache(GDALDatasetShadow *self){
    GDALFlushCache( self );
  }
static CPLErr GDALDatasetShadow_AddBand(GDALDatasetShadow *self,GDALDataType datatype=GDT_Byte,char **options=0){
    return GDALAddBand( self, datatype, options );
  }
static CPLErr GDALDatasetShadow_WriteRaster(GDALDatasetShadow *self,int xoff,int yoff,int xsize,int ysize,int buf_len,char *buf_string,int *buf_xsize=0,int *buf_ysize=0,GDALDataType *buf_type=0,int band_list=0,int *pband_list=0){
    int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    GDALDataType ntype;
    if ( buf_type != 0 ) {
      ntype = (GDALDataType) *buf_type;
    } else {
      int lastband = GDALGetRasterCount( self ) - 1;
      ntype = GDALGetRasterDataType( GDALGetRasterBand( self, lastband ) );
    }
    bool myBandList = false;
    int nBandCount;
    int *pBandList;
    if ( band_list != 0 ) {
      myBandList = false;
      nBandCount = band_list;
      pBandList = pband_list;
    }
    else {
      myBandList = true;
      nBandCount = GDALGetRasterCount( self );
      pBandList = (int*) CPLMalloc( sizeof(int) * nBandCount );
      for( int i = 0; i< nBandCount; ++i ) {
        pBandList[i] = i;
      }
    }
    return GDALDatasetRasterIO( self, GF_Write, xoff, yoff, xsize, ysize,
                                (void*) buf_string, nxsize, nysize, ntype,
                                band_list, pband_list, 0, 0, 0 );
    if ( myBandList ) {
       CPLFree( pBandList );
    }
  }

int GDALDatasetShadow_RasterXSize_get( GDALDatasetShadow *h ) {
  return GDALGetRasterXSize( h );
}
int GDALDatasetShadow_RasterYSize_get( GDALDatasetShadow *h ) {
  return GDALGetRasterYSize( h );
}
int GDALDatasetShadow_RasterCount_get( GDALDatasetShadow *h ) {
  return GDALGetRasterCount( h );
}


int GDALDatasetShadow_get_RasterXSize( GDALDatasetShadow *h ) {
  return GDALGetRasterXSize( h );
}
int GDALDatasetShadow_get_RasterYSize( GDALDatasetShadow *h ) {
  return GDALGetRasterYSize( h );
}
int GDALDatasetShadow_get_RasterCount( GDALDatasetShadow *h ) {
  return GDALGetRasterCount( h );
}


static
CPLErr ReadRaster_internal( GDALRasterBandShadow *obj, 
                            int xoff, int yoff, int xsize, int ysize,
                            int buf_xsize, int buf_ysize,
                            GDALDataType buf_type,
                            int *buf_size, char **buf )
{

  *buf_size = buf_xsize * buf_ysize * GDALGetDataTypeSize( buf_type ) / 8;
  *buf = (char*) malloc( *buf_size );
  CPLErr result =  GDALRasterIO( obj, GF_Read, xoff, yoff, xsize, ysize,
                                 (void *) *buf, buf_xsize, buf_ysize,
                                 buf_type, 0, 0 );
  if ( result != CE_None ) {
    free( *buf );
    *buf = 0;
    *buf_size = 0;
  }
  return result;
}

static
CPLErr WriteRaster_internal( GDALRasterBandShadow *obj,
                             int xoff, int yoff, int xsize, int ysize,
                             int buf_xsize, int buf_ysize,
                             GDALDataType buf_type,
                             int buf_size, char *buffer )
{
    if ( buf_size < buf_xsize * buf_ysize * GDALGetDataTypeSize( buf_type) /8 ) {
      return CE_Failure;
    }

    return GDALRasterIO( obj, GF_Write, xoff, yoff, xsize, ysize, 
		        (void *) buffer, buf_xsize, buf_ysize, buf_type, 0, 0 );
}

static GDALColorInterp GDALRasterBandShadow_GetRasterColorInterpretation(GDALRasterBandShadow *self){
    return GDALGetRasterColorInterpretation( self );
  }
static CPLErr GDALRasterBandShadow_SetRasterColorInterpretation(GDALRasterBandShadow *self,GDALColorInterp val){
    return GDALSetRasterColorInterpretation( self, val );
  }
static void GDALRasterBandShadow_GetNoDataValue(GDALRasterBandShadow *self,double *val,int *hasval){
    *val = GDALGetRasterNoDataValue( self, hasval );
  }
static CPLErr GDALRasterBandShadow_SetNoDataValue(GDALRasterBandShadow *self,double d){
    return GDALSetRasterNoDataValue( self, d );
  }
static void GDALRasterBandShadow_GetMinimum(GDALRasterBandShadow *self,double *val,int *hasval){
    *val = GDALGetRasterMinimum( self, hasval );
  }
static void GDALRasterBandShadow_GetMaximum(GDALRasterBandShadow *self,double *val,int *hasval){
    *val = GDALGetRasterMaximum( self, hasval );
  }
static void GDALRasterBandShadow_GetOffset(GDALRasterBandShadow *self,double *val,int *hasval){
    *val = GDALGetRasterOffset( self, hasval );
  }
static void GDALRasterBandShadow_GetScale(GDALRasterBandShadow *self,double *val,int *hasval){
    *val = GDALGetRasterScale( self, hasval );
  }
static int GDALRasterBandShadow_GetOverviewCount(GDALRasterBandShadow *self){
    return GDALGetOverviewCount( self );
  }
static GDALRasterBandShadow *GDALRasterBandShadow_GetOverview(GDALRasterBandShadow *self,int i){
    return (GDALRasterBandShadow*) GDALGetOverview( self, i );
  }
static int GDALRasterBandShadow_Checksum(GDALRasterBandShadow *self,int xoff=0,int yoff=0,int *xsize=0,int *ysize=0){
    int nxsize = (xsize!=0) ? *xsize : GDALGetRasterBandXSize( self );
    int nysize = (ysize!=0) ? *ysize : GDALGetRasterBandYSize( self );
    return GDALChecksumImage( self, xoff, yoff, nxsize, nysize );
  }
static void GDALRasterBandShadow_ComputeRasterMinMax(GDALRasterBandShadow *self,double argout[2],int approx_ok=0){
    GDALComputeRasterMinMax( self, approx_ok, argout );
  }
static CPLErr GDALRasterBandShadow_Fill(GDALRasterBandShadow *self,double real_fill,double imag_fill=0.0){
    return GDALFillRaster( self, real_fill, imag_fill );
  }
static CPLErr GDALRasterBandShadow_ReadRaster(GDALRasterBandShadow *self,int xoff,int yoff,int xsize,int ysize,int *buf_len,char **buf,int *buf_xsize=0,int *buf_ysize=0,int *buf_type=0){
    int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
                                        : (GDALDataType)*buf_type;
    return ReadRaster_internal( self, xoff, yoff, xsize, ysize,
                                nxsize, nysize, ntype, buf_len, buf );
  }
static CPLErr GDALRasterBandShadow_WriteRaster(GDALRasterBandShadow *self,int xoff,int yoff,int xsize,int ysize,int buf_len,char *buf_string,int *buf_xsize=0,int *buf_ysize=0,int *buf_type=0){
    int nxsize = (buf_xsize==0) ? xsize : *buf_xsize;
    int nysize = (buf_ysize==0) ? ysize : *buf_ysize;
    GDALDataType ntype  = (buf_type==0) ? GDALGetRasterDataType(self)
                                        : (GDALDataType)*buf_type;
    return WriteRaster_internal( self, xoff, yoff, xsize, ysize,
                                 nxsize, nysize, ntype, buf_len, buf_string );
  }
static void GDALRasterBandShadow_FlushCache(GDALRasterBandShadow *self){
    GDALFlushRasterCache( self );
  }
static GDALColorTable *GDALRasterBandShadow_GetRasterColorTable(GDALRasterBandShadow *self){
    return (GDALColorTable*) GDALGetRasterColorTable( self );
  }
static int GDALRasterBandShadow_SetRasterColorTable(GDALRasterBandShadow *self,GDALColorTable *arg){
    return GDALSetRasterColorTable( self, arg );
  }

GDALDataType GDALRasterBandShadow_DataType_get( GDALRasterBandShadow *h ) {
  return GDALGetRasterDataType( h );
}
int GDALRasterBandShadow_XSize_get( GDALRasterBandShadow *h ) {
  return GDALGetRasterBandXSize( h );
}
int GDALRasterBandShadow_YSize_get( GDALRasterBandShadow *h ) {
  return GDALGetRasterBandYSize( h );
}


GDALDataType GDALRasterBandShadow_get_DataType( GDALRasterBandShadow *h ) {
  return GDALGetRasterDataType( h );
}
int GDALRasterBandShadow_get_XSize( GDALRasterBandShadow *h ) {
  return GDALGetRasterBandXSize( h );
}
int GDALRasterBandShadow_get_YSize( GDALRasterBandShadow *h ) {
  return GDALGetRasterBandYSize( h );
}


int GetDriverCount() {
  return GDALGetDriverCount();
}


GDALDriverShadow* GetDriverByName( char const *name ) {
  return (GDALDriverShadow*) GDALGetDriverByName( name );
}


GDALDatasetShadow* Open( char const* name, GDALAccess eAccess = GA_ReadOnly ) {
  GDALDatasetShadow *ds = GDALOpen( name, eAccess );
  return (GDALDatasetShadow*) ds;
}


GDALDatasetShadow* OpenShared( char const* name, GDALAccess eAccess = GA_ReadOnly ) {
  GDALDatasetShadow *ds = GDALOpenShared( name, eAccess );
  return (GDALDatasetShadow*) ds;
}


GDALDatasetShadow *AutoCreateWarpedVRT( GDALDatasetShadow *src_ds,
                                        const char *src_wkt = 0,
                                        const char *dst_wkt = 0,
                                        GDALResampleAlg eResampleAlg = GRA_NearestNeighbour,
                                        double maxerror = 0.0 ) {
  GDALDatasetShadow *ds = GDALAutoCreateWarpedVRT( src_ds, src_wkt,
                                                   dst_wkt,
                                                   eResampleAlg,
                                                   maxerror,
                                                   0 );
  if (ds == 0) {
    throw CPLGetLastErrorMsg();
  }
  return ds;
  
}


#ifdef __cplusplus
extern "C" {
#endif

SWIGEXPORT void SWIGSTDCALL CSharp_Debug(char * jarg1, char * jarg2) {
    char *arg1 = (char *) 0 ;
    char *arg2 = (char *) 0 ;
    
    arg1 = jarg1; 
    arg2 = jarg2; 
    Debug((char const *)arg1,(char const *)arg2);
    
}


SWIGEXPORT void SWIGSTDCALL CSharp_Error(int jarg1, int jarg2, char * jarg3) {
    CPLErr arg1 = (CPLErr) CE_Failure ;
    int arg2 = (int) 0 ;
    char *arg3 = (char *) "error" ;
    
    arg1 = (CPLErr)jarg1; 
    arg2 = (int)jarg2; 
    arg3 = jarg3; 
    Error(arg1,arg2,(char const *)arg3);
    
}


SWIGEXPORT int SWIGSTDCALL CSharp_PushErrorHandler__SWIG_0(char * jarg1) {
    int jresult = 0 ;
    char *arg1 = (char *) "CPLQuietErrorHandler" ;
    CPLErr result;
    
    arg1 = jarg1; 
    result = (CPLErr)PushErrorHandler((char const *)arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_PushErrorHandler__SWIG_1(void * jarg1) {
    CPLErrorHandler arg1 ;
    CPLErrorHandler *argp1 ;
    
    argp1 = (CPLErrorHandler *)jarg1; 
    if (!argp1) {
        SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null CPLErrorHandler", 0);
        return ;
    }
    arg1 = *argp1; 
    CPLPushErrorHandler(arg1);
    
}


SWIGEXPORT void SWIGSTDCALL CSharp_PopErrorHandler() {
    CPLPopErrorHandler();
    
}


SWIGEXPORT void SWIGSTDCALL CSharp_ErrorReset() {
    CPLErrorReset();
    
}


SWIGEXPORT int SWIGSTDCALL CSharp_GetLastErrorNo() {
    int jresult = 0 ;
    int result;
    
    result = (int)CPLGetLastErrorNo();
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GetLastErrorType() {
    int jresult = 0 ;
    CPLErr result;
    
    result = (CPLErr)CPLGetLastErrorType();
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_GetLastErrorMsg() {
    char * jresult = 0 ;
    char *result;
    
    result = (char *)CPLGetLastErrorMsg();
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_PushFinderLocation(char * jarg1) {
    char *arg1 = (char *) 0 ;
    
    arg1 = jarg1; 
    CPLPushFinderLocation((char const *)arg1);
    
}


SWIGEXPORT void SWIGSTDCALL CSharp_PopFinderLocation() {
    CPLPopFinderLocation();
    
}


SWIGEXPORT void SWIGSTDCALL CSharp_FinderClean() {
    CPLFinderClean();
    
}


SWIGEXPORT char * SWIGSTDCALL CSharp_FindFile(char * jarg1, char * jarg2) {
    char * jresult = 0 ;
    char *arg1 = (char *) 0 ;
    char *arg2 = (char *) 0 ;
    char *result;
    
    arg1 = jarg1; 
    arg2 = jarg2; 
    result = (char *)CPLFindFile((char const *)arg1,(char const *)arg2);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_SetConfigOption(char * jarg1, char * jarg2) {
    char *arg1 = (char *) 0 ;
    char *arg2 = (char *) 0 ;
    
    arg1 = jarg1; 
    arg2 = jarg2; 
    CPLSetConfigOption((char const *)arg1,(char const *)arg2);
    
}


SWIGEXPORT char * SWIGSTDCALL CSharp_GetConfigOption(char * jarg1, char * jarg2) {
    char * jresult = 0 ;
    char *arg1 = (char *) 0 ;
    char *arg2 = (char *) 0 ;
    char *result;
    
    arg1 = jarg1; 
    arg2 = jarg2; 
    result = (char *)CPLGetConfigOption((char const *)arg1,(char const *)arg2);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_MajorObject_GetDescription(void * jarg1) {
    char * jresult = 0 ;
    GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    char *result;
    
    arg1 = (GDALMajorObjectShadow *)jarg1; 
    result = (char *)GDALMajorObjectShadow_GetDescription(arg1);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_MajorObject_SetDescription(void * jarg1, char * jarg2) {
    GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    
    arg1 = (GDALMajorObjectShadow *)jarg1; 
    arg2 = jarg2; 
    GDALMajorObjectShadow_SetDescription(arg1,(char const *)arg2);
    
}


SWIGEXPORT void * SWIGSTDCALL CSharp_MajorObject_GetMetadata_Dict(void * jarg1, char * jarg2) {
    void * jresult = 0 ;
    GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    char *arg2 = (char *) "" ;
    char **result;
    
    arg1 = (GDALMajorObjectShadow *)jarg1; 
    arg2 = jarg2; 
    result = (char **)GDALMajorObjectShadow_GetMetadata_Dict(arg1,(char const *)arg2);
    
    {
        /* %typemap(out) char ** -> to hash */
        
    }
    return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_MajorObject_GetMetadata_List(void * jarg1, char * jarg2) {
    void * jresult = 0 ;
    GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    char *arg2 = (char *) "" ;
    char **result;
    
    arg1 = (GDALMajorObjectShadow *)jarg1; 
    arg2 = jarg2; 
    result = (char **)GDALMajorObjectShadow_GetMetadata_List(arg1,(char const *)arg2);
    
    {
        /* %typemap(out) char ** -> ( string ) */
        
    }
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_MajorObject_SetMetadata__SWIG_0(void * jarg1, void * jarg2, char * jarg3) {
    int jresult = 0 ;
    GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    char *arg3 = (char *) "" ;
    CPLErr result;
    
    arg1 = (GDALMajorObjectShadow *)jarg1; 
    {
        /* %typemap(in) char **dict */
        
    }
    arg3 = jarg3; 
    result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_0(arg1,arg2,(char const *)arg3);
    
    jresult = result; 
    {
        /* %typemap(csharp,freearg) char **dict */
        CSLDestroy( arg2 );
    }
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_MajorObject_SetMetadata__SWIG_1(void * jarg1, char * jarg2, char * jarg3) {
    int jresult = 0 ;
    GDALMajorObjectShadow *arg1 = (GDALMajorObjectShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *arg3 = (char *) "" ;
    CPLErr result;
    
    arg1 = (GDALMajorObjectShadow *)jarg1; 
    arg2 = jarg2; 
    arg3 = jarg3; 
    result = (CPLErr)GDALMajorObjectShadow_SetMetadata__SWIG_1(arg1,arg2,(char const *)arg3);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_get_Driver_ShortName(void * jarg1) {
    char * jresult = 0 ;
    GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    char *result;
    
    arg1 = (GDALDriverShadow *)jarg1; 
    result = (char *)GDALDriverShadow_get_ShortName(arg1);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_get_Driver_LongName(void * jarg1) {
    char * jresult = 0 ;
    GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    char *result;
    
    arg1 = (GDALDriverShadow *)jarg1; 
    result = (char *)GDALDriverShadow_get_LongName(arg1);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_get_Driver_HelpTopic(void * jarg1) {
    char * jresult = 0 ;
    GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    char *result;
    
    arg1 = (GDALDriverShadow *)jarg1; 
    result = (char *)GDALDriverShadow_get_HelpTopic(arg1);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Driver_Create(void * jarg1, char * jarg2, int jarg3, int jarg4, int jarg5, int jarg6, void * jarg7) {
    void * jresult = 0 ;
    GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int arg3 ;
    int arg4 ;
    int arg5 = (int) 1 ;
    GDALDataType arg6 = (GDALDataType) GDT_Byte ;
    char **arg7 = (char **) 0 ;
    GDALDatasetShadow *result;
    
    arg1 = (GDALDriverShadow *)jarg1; 
    arg2 = jarg2; 
    arg3 = (int)jarg3; 
    arg4 = (int)jarg4; 
    arg5 = (int)jarg5; 
    arg6 = (GDALDataType)jarg6; 
    {
        /* %typemap(in) char **options */
        /* Check if is a list */
        
    }
    result = (GDALDatasetShadow *)GDALDriverShadow_Create(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
    
    jresult = (void *)result; 
    {
        /* %typemap(freearg) char **options */
        CSLDestroy( arg7 );
    }
    return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Driver_CreateCopy(void * jarg1, char * jarg2, void * jarg3, int jarg4, void * jarg5) {
    void * jresult = 0 ;
    GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    GDALDatasetShadow *arg3 = (GDALDatasetShadow *) 0 ;
    int arg4 = (int) 1 ;
    char **arg5 = (char **) 0 ;
    GDALDatasetShadow *result;
    
    arg1 = (GDALDriverShadow *)jarg1; 
    arg2 = jarg2; 
    arg3 = (GDALDatasetShadow *)jarg3; 
    arg4 = (int)jarg4; 
    {
        /* %typemap(in) char **options */
        /* Check if is a list */
        
    }
    result = (GDALDatasetShadow *)GDALDriverShadow_CreateCopy(arg1,(char const *)arg2,arg3,arg4,arg5);
    
    jresult = (void *)result; 
    {
        /* %typemap(freearg) char **options */
        CSLDestroy( arg5 );
    }
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Driver_Delete(void * jarg1, char * jarg2) {
    int jresult = 0 ;
    GDALDriverShadow *arg1 = (GDALDriverShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int result;
    
    arg1 = (GDALDriverShadow *)jarg1; 
    arg2 = jarg2; 
    result = (int)GDALDriverShadow_Delete(arg1,(char const *)arg2);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_set_GCP_GCPX(void * jarg1, double jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = (double)jarg2; 
    GDAL_GCP_set_GCPX(arg1,arg2);
    
}


SWIGEXPORT double SWIGSTDCALL CSharp_get_GCP_GCPX(void * jarg1) {
    double jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (double)GDAL_GCP_get_GCPX(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_set_GCP_GCPY(void * jarg1, double jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = (double)jarg2; 
    GDAL_GCP_set_GCPY(arg1,arg2);
    
}


SWIGEXPORT double SWIGSTDCALL CSharp_get_GCP_GCPY(void * jarg1) {
    double jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (double)GDAL_GCP_get_GCPY(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_set_GCP_GCPZ(void * jarg1, double jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = (double)jarg2; 
    GDAL_GCP_set_GCPZ(arg1,arg2);
    
}


SWIGEXPORT double SWIGSTDCALL CSharp_get_GCP_GCPZ(void * jarg1) {
    double jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (double)GDAL_GCP_get_GCPZ(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_set_GCP_GCPPixel(void * jarg1, double jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = (double)jarg2; 
    GDAL_GCP_set_GCPPixel(arg1,arg2);
    
}


SWIGEXPORT double SWIGSTDCALL CSharp_get_GCP_GCPPixel(void * jarg1) {
    double jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (double)GDAL_GCP_get_GCPPixel(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_set_GCP_GCPLine(void * jarg1, double jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = (double)jarg2; 
    GDAL_GCP_set_GCPLine(arg1,arg2);
    
}


SWIGEXPORT double SWIGSTDCALL CSharp_get_GCP_GCPLine(void * jarg1) {
    double jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (double)GDAL_GCP_get_GCPLine(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_set_GCP_Info(void * jarg1, char * jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *arg2 = (char *) 0 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = jarg2; 
    GDAL_GCP_set_Info(arg1,arg2);
    
}


SWIGEXPORT char * SWIGSTDCALL CSharp_get_GCP_Info(void * jarg1) {
    char * jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (char *)GDAL_GCP_get_Info(arg1);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_set_GCP_Id(void * jarg1, char * jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *arg2 = (char *) 0 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = jarg2; 
    GDAL_GCP_set_Id(arg1,arg2);
    
}


SWIGEXPORT char * SWIGSTDCALL CSharp_get_GCP_Id(void * jarg1) {
    char * jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (char *)GDAL_GCP_get_Id(arg1);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_GCP(double jarg1, double jarg2, double jarg3, double jarg4, double jarg5, char * jarg6, char * jarg7) {
    void * jresult = 0 ;
    double arg1 = (double) 0.0 ;
    double arg2 = (double) 0.0 ;
    double arg3 = (double) 0.0 ;
    double arg4 = (double) 0.0 ;
    double arg5 = (double) 0.0 ;
    char *arg6 = (char *) "" ;
    char *arg7 = (char *) "" ;
    GDAL_GCP *result;
    
    arg1 = (double)jarg1; 
    arg2 = (double)jarg2; 
    arg3 = (double)jarg3; 
    arg4 = (double)jarg4; 
    arg5 = (double)jarg5; 
    arg6 = jarg6; 
    arg7 = jarg7; 
    result = (GDAL_GCP *)new_GDAL_GCP(arg1,arg2,arg3,arg4,arg5,(char const *)arg6,(char const *)arg7);
    
    jresult = (void *)result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_GCP(void * jarg1) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    delete_GDAL_GCP(arg1);
    
}


SWIGEXPORT double SWIGSTDCALL CSharp_GDAL_GCP_GCPX_get(void * jarg1) {
    double jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (double)GDAL_GCP_GCPX_get(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GDAL_GCP_GCPX_set(void * jarg1, double jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = (double)jarg2; 
    GDAL_GCP_GCPX_set(arg1,arg2);
    
}


SWIGEXPORT double SWIGSTDCALL CSharp_GDAL_GCP_GCPY_get(void * jarg1) {
    double jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (double)GDAL_GCP_GCPY_get(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GDAL_GCP_GCPY_set(void * jarg1, double jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = (double)jarg2; 
    GDAL_GCP_GCPY_set(arg1,arg2);
    
}


SWIGEXPORT double SWIGSTDCALL CSharp_GDAL_GCP_GCPZ_get(void * jarg1) {
    double jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (double)GDAL_GCP_GCPZ_get(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GDAL_GCP_GCPZ_set(void * jarg1, double jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = (double)jarg2; 
    GDAL_GCP_GCPZ_set(arg1,arg2);
    
}


SWIGEXPORT double SWIGSTDCALL CSharp_GDAL_GCP_GCPPixel_get(void * jarg1) {
    double jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (double)GDAL_GCP_GCPPixel_get(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GDAL_GCP_GCPPixel_set(void * jarg1, double jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = (double)jarg2; 
    GDAL_GCP_GCPPixel_set(arg1,arg2);
    
}


SWIGEXPORT double SWIGSTDCALL CSharp_GDAL_GCP_GCPLine_get(void * jarg1) {
    double jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (double)GDAL_GCP_GCPLine_get(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GDAL_GCP_GCPLine_set(void * jarg1, double jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = (double)jarg2; 
    GDAL_GCP_GCPLine_set(arg1,arg2);
    
}


SWIGEXPORT char * SWIGSTDCALL CSharp_GDAL_GCP_Info_get(void * jarg1) {
    char * jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (char *)GDAL_GCP_Info_get(arg1);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GDAL_GCP_Info_set(void * jarg1, char * jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *arg2 = (char *) 0 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = jarg2; 
    GDAL_GCP_Info_set(arg1,(char const *)arg2);
    
}


SWIGEXPORT char * SWIGSTDCALL CSharp_GDAL_GCP_Id_get(void * jarg1) {
    char * jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (char *)GDAL_GCP_Id_get(arg1);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GDAL_GCP_Id_set(void * jarg1, char * jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *arg2 = (char *) 0 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = jarg2; 
    GDAL_GCP_Id_set(arg1,(char const *)arg2);
    
}


SWIGEXPORT double SWIGSTDCALL CSharp_GDAL_GCP_get_GCPX(void * jarg1) {
    double jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (double)GDAL_GCP_get_GCPX(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GDAL_GCP_set_GCPX(void * jarg1, double jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = (double)jarg2; 
    GDAL_GCP_set_GCPX(arg1,arg2);
    
}


SWIGEXPORT double SWIGSTDCALL CSharp_GDAL_GCP_get_GCPY(void * jarg1) {
    double jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (double)GDAL_GCP_get_GCPY(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GDAL_GCP_set_GCPY(void * jarg1, double jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = (double)jarg2; 
    GDAL_GCP_set_GCPY(arg1,arg2);
    
}


SWIGEXPORT double SWIGSTDCALL CSharp_GDAL_GCP_get_GCPZ(void * jarg1) {
    double jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (double)GDAL_GCP_get_GCPZ(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GDAL_GCP_set_GCPZ(void * jarg1, double jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = (double)jarg2; 
    GDAL_GCP_set_GCPZ(arg1,arg2);
    
}


SWIGEXPORT double SWIGSTDCALL CSharp_GDAL_GCP_get_GCPPixel(void * jarg1) {
    double jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (double)GDAL_GCP_get_GCPPixel(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GDAL_GCP_set_GCPPixel(void * jarg1, double jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = (double)jarg2; 
    GDAL_GCP_set_GCPPixel(arg1,arg2);
    
}


SWIGEXPORT double SWIGSTDCALL CSharp_GDAL_GCP_get_GCPLine(void * jarg1) {
    double jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (double)GDAL_GCP_get_GCPLine(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GDAL_GCP_set_GCPLine(void * jarg1, double jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    double arg2 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = (double)jarg2; 
    GDAL_GCP_set_GCPLine(arg1,arg2);
    
}


SWIGEXPORT char * SWIGSTDCALL CSharp_GDAL_GCP_get_Info(void * jarg1) {
    char * jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (char *)GDAL_GCP_get_Info(arg1);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GDAL_GCP_set_Info(void * jarg1, char * jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *arg2 = (char *) 0 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = jarg2; 
    GDAL_GCP_set_Info(arg1,(char const *)arg2);
    
}


SWIGEXPORT char * SWIGSTDCALL CSharp_GDAL_GCP_get_Id(void * jarg1) {
    char * jresult = 0 ;
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *result;
    
    arg1 = (GDAL_GCP *)jarg1; 
    result = (char *)GDAL_GCP_get_Id(arg1);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GDAL_GCP_set_Id(void * jarg1, char * jarg2) {
    GDAL_GCP *arg1 = (GDAL_GCP *) 0 ;
    char *arg2 = (char *) 0 ;
    
    arg1 = (GDAL_GCP *)jarg1; 
    arg2 = jarg2; 
    GDAL_GCP_set_Id(arg1,(char const *)arg2);
    
}


SWIGEXPORT void * SWIGSTDCALL CSharp_GCPsToGeoTransform(int jarg1, void * jarg2, int jarg4) {
    void * jresult = 0 ;
    int arg1 ;
    GDAL_GCP *arg2 = (GDAL_GCP *) 0 ;
    double *arg3 ;
    int arg4 = (int) 1 ;
    FALSE_IS_ERR result;
    double argout3[6] ;
    
    {
        /* %typemap(in,numinputs=0) (double argout3[ANY]) */
        
    }
    arg1 = (int)jarg1; 
    arg2 = (GDAL_GCP *)jarg2; 
    arg4 = (int)jarg4; 
    result = GDALGCPsToGeoTransform(arg1,(GDAL_GCP const *)arg2,arg3,arg4);
    
    {
        /* %typemap(csharp,out) IF_FALSE_RETURN_NONE */
        
    }
    {
        /* %typemap(argout) (double argout[ANY]) */
        
    }
    {
        /* %typemap(ret) IF_FALSE_RETURN_NONE */
        
    }
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_get_Dataset_RasterXSize(void * jarg1) {
    int jresult = 0 ;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    int result;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    result = (int)GDALDatasetShadow_get_RasterXSize(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_get_Dataset_RasterYSize(void * jarg1) {
    int jresult = 0 ;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    int result;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    result = (int)GDALDatasetShadow_get_RasterYSize(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_get_Dataset_RasterCount(void * jarg1) {
    int jresult = 0 ;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    int result;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    result = (int)GDALDatasetShadow_get_RasterCount(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_Dataset(void * jarg1) {
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    delete_GDALDatasetShadow(arg1);
    
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Dataset_GetDriver(void * jarg1) {
    void * jresult = 0 ;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    GDALDriverShadow *result;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    result = (GDALDriverShadow *)GDALDatasetShadow_GetDriver(arg1);
    
    jresult = (void *)result; 
    return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Dataset_GetRasterBand(void * jarg1, int jarg2) {
    void * jresult = 0 ;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    int arg2 ;
    GDALRasterBandShadow *result;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    arg2 = (int)jarg2; 
    result = (GDALRasterBandShadow *)GDALDatasetShadow_GetRasterBand(arg1,arg2);
    
    jresult = (void *)result; 
    return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Dataset_GetProjection(void * jarg1) {
    char * jresult = 0 ;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    char *result;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    result = (char *)GDALDatasetShadow_GetProjection(arg1);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Dataset_GetProjectionRef(void * jarg1) {
    char * jresult = 0 ;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    char *result;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    result = (char *)GDALDatasetShadow_GetProjectionRef(arg1);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Dataset_SetProjection(void * jarg1, char * jarg2) {
    int jresult = 0 ;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    CPLErr result;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    arg2 = jarg2; 
    result = (CPLErr)GDALDatasetShadow_SetProjection(arg1,(char const *)arg2);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Dataset_GetGeoTransform(void * jarg1) {
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    double *arg2 ;
    double argout2[6] ;
    
    {
        /* %typemap(in,numinputs=0) (double argout2[ANY]) */
        
    }
    arg1 = (GDALDatasetShadow *)jarg1; 
    GDALDatasetShadow_GetGeoTransform(arg1,arg2);
    
    {
        /* %typemap(argout) (double argout[ANY]) */
        
    }
}


SWIGEXPORT int SWIGSTDCALL CSharp_Dataset_SetGeoTransform(void * jarg1, void * jarg2) {
    int jresult = 0 ;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    double *arg2 ;
    CPLErr result;
    double argin2[6] ;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    {
        /* %typemap(in) (double argin2[ANY]) */
        
    }
    result = (CPLErr)GDALDatasetShadow_SetGeoTransform(arg1,arg2);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Dataset_BuildOverviews(void * jarg1, char * jarg2, int jarg3) {
    int jresult = 0 ;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    char *arg2 = (char *) "NEAREST" ;
    int arg3 = (int) 0 ;
    int *arg4 = (int *) 0 ;
    int result;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    arg2 = jarg2; 
    {
        /* %typemap(in,numargs=1) (int nList, int* pList)*/
        /* check if is List */
        
    }
    result = (int)GDALDatasetShadow_BuildOverviews(arg1,(char const *)arg2,arg3,arg4);
    
    jresult = result; 
    {
        /* %typemap(python,freearg) (int nList, int* pList) */
        if (arg4) {
            free((void*) arg4);
        }
    }
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Dataset_GetGCPCount(void * jarg1) {
    int jresult = 0 ;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    int result;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    result = (int)GDALDatasetShadow_GetGCPCount(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Dataset_GetGCPProjection(void * jarg1) {
    char * jresult = 0 ;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    char *result;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    result = (char *)GDALDatasetShadow_GetGCPProjection(arg1);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Dataset_GetGCPs(void * jarg1, void * jarg2, void * jarg3) {
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    int *arg2 = (int *) 0 ;
    GDAL_GCP **arg3 = (GDAL_GCP **) 0 ;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    arg2 = (int *)jarg2; 
    arg3 = (GDAL_GCP **)jarg3; 
    GDALDatasetShadow_GetGCPs(arg1,arg2,(GDAL_GCP const **)arg3);
    
}


SWIGEXPORT int SWIGSTDCALL CSharp_Dataset_SetGCPs(void * jarg1, int jarg2, void * jarg3, char * jarg4) {
    int jresult = 0 ;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    int arg2 ;
    GDAL_GCP *arg3 = (GDAL_GCP *) 0 ;
    char *arg4 = (char *) 0 ;
    CPLErr result;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    arg2 = (int)jarg2; 
    arg3 = (GDAL_GCP *)jarg3; 
    arg4 = jarg4; 
    result = (CPLErr)GDALDatasetShadow_SetGCPs(arg1,arg2,(GDAL_GCP const *)arg3,(char const *)arg4);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Dataset_FlushCache(void * jarg1) {
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    GDALDatasetShadow_FlushCache(arg1);
    
}


SWIGEXPORT int SWIGSTDCALL CSharp_Dataset_AddBand(void * jarg1, int jarg2, void * jarg3) {
    int jresult = 0 ;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    GDALDataType arg2 = (GDALDataType) GDT_Byte ;
    char **arg3 = (char **) 0 ;
    CPLErr result;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    arg2 = (GDALDataType)jarg2; 
    {
        /* %typemap(in) char **options */
        /* Check if is a list */
        
    }
    result = (CPLErr)GDALDatasetShadow_AddBand(arg1,arg2,arg3);
    
    jresult = result; 
    {
        /* %typemap(freearg) char **options */
        CSLDestroy( arg3 );
    }
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Dataset_WriteRaster(void * jarg1, int jarg2, int jarg3, int jarg4, int jarg5, int jarg6, void * jarg8, void * jarg9, void * jarg10, int jarg11) {
    int jresult = 0 ;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    int arg4 ;
    int arg5 ;
    int arg6 ;
    char *arg7 = (char *) 0 ;
    int *arg8 = (int *) 0 ;
    int *arg9 = (int *) 0 ;
    GDALDataType *arg10 = (GDALDataType *) 0 ;
    int arg11 = (int) 0 ;
    int *arg12 = (int *) 0 ;
    CPLErr result;
    int val8 ;
    int val9 ;
    int val10 ;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    arg2 = (int)jarg2; 
    arg3 = (int)jarg3; 
    arg4 = (int)jarg4; 
    arg5 = (int)jarg5; 
    {
        /* %typemap(csharp, in,numinputs=1) (int nLen, char *pBuf ) */
        
    }
    {
        /* %typemap(csharp,in) (int *optional_##int) */
        
    }
    {
        /* %typemap(csharp,in) (int *optional_##int) */
        
    }
    {
        /* %typemap(csharp,in) (int *optional_##int) */
        
    }
    {
        /* %typemap(in,numargs=1) (int nList, int* pList)*/
        /* check if is List */
        
    }
    result = (CPLErr)GDALDatasetShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
    
    jresult = result; 
    {
        /* %typemap(python,freearg) (int nList, int* pList) */
        if (arg12) {
            free((void*) arg12);
        }
    }
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_get_Band_XSize(void * jarg1) {
    int jresult = 0 ;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    int result;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    result = (int)GDALRasterBandShadow_get_XSize(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_get_Band_YSize(void * jarg1) {
    int jresult = 0 ;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    int result;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    result = (int)GDALRasterBandShadow_get_YSize(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_get_Band_DataType(void * jarg1) {
    int jresult = 0 ;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    GDALDataType result;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    result = (GDALDataType)GDALRasterBandShadow_get_DataType(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Band_GetRasterColorInterpretation(void * jarg1) {
    int jresult = 0 ;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    GDALColorInterp result;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    result = (GDALColorInterp)GDALRasterBandShadow_GetRasterColorInterpretation(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Band_SetRasterColorInterpretation(void * jarg1, int jarg2) {
    int jresult = 0 ;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    GDALColorInterp arg2 ;
    CPLErr result;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    arg2 = (GDALColorInterp)jarg2; 
    result = (CPLErr)GDALRasterBandShadow_SetRasterColorInterpretation(arg1,arg2);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Band_GetNoDataValue(void * jarg1, void * jarg2, void * jarg3) {
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    double *arg2 = (double *) 0 ;
    int *arg3 = (int *) 0 ;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    arg2 = (double *)jarg2; 
    arg3 = (int *)jarg3; 
    GDALRasterBandShadow_GetNoDataValue(arg1,arg2,arg3);
    
}


SWIGEXPORT int SWIGSTDCALL CSharp_Band_SetNoDataValue(void * jarg1, double jarg2) {
    int jresult = 0 ;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    double arg2 ;
    CPLErr result;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    arg2 = (double)jarg2; 
    result = (CPLErr)GDALRasterBandShadow_SetNoDataValue(arg1,arg2);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Band_GetMinimum(void * jarg1, void * jarg2, void * jarg3) {
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    double *arg2 = (double *) 0 ;
    int *arg3 = (int *) 0 ;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    arg2 = (double *)jarg2; 
    arg3 = (int *)jarg3; 
    GDALRasterBandShadow_GetMinimum(arg1,arg2,arg3);
    
}


SWIGEXPORT void SWIGSTDCALL CSharp_Band_GetMaximum(void * jarg1, void * jarg2, void * jarg3) {
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    double *arg2 = (double *) 0 ;
    int *arg3 = (int *) 0 ;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    arg2 = (double *)jarg2; 
    arg3 = (int *)jarg3; 
    GDALRasterBandShadow_GetMaximum(arg1,arg2,arg3);
    
}


SWIGEXPORT void SWIGSTDCALL CSharp_Band_GetOffset(void * jarg1, void * jarg2, void * jarg3) {
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    double *arg2 = (double *) 0 ;
    int *arg3 = (int *) 0 ;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    arg2 = (double *)jarg2; 
    arg3 = (int *)jarg3; 
    GDALRasterBandShadow_GetOffset(arg1,arg2,arg3);
    
}


SWIGEXPORT void SWIGSTDCALL CSharp_Band_GetScale(void * jarg1, void * jarg2, void * jarg3) {
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    double *arg2 = (double *) 0 ;
    int *arg3 = (int *) 0 ;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    arg2 = (double *)jarg2; 
    arg3 = (int *)jarg3; 
    GDALRasterBandShadow_GetScale(arg1,arg2,arg3);
    
}


SWIGEXPORT int SWIGSTDCALL CSharp_Band_GetOverviewCount(void * jarg1) {
    int jresult = 0 ;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    int result;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    result = (int)GDALRasterBandShadow_GetOverviewCount(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Band_GetOverview(void * jarg1, int jarg2) {
    void * jresult = 0 ;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    int arg2 ;
    GDALRasterBandShadow *result;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    arg2 = (int)jarg2; 
    result = (GDALRasterBandShadow *)GDALRasterBandShadow_GetOverview(arg1,arg2);
    
    jresult = (void *)result; 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Band_Checksum(void * jarg1, int jarg2, int jarg3, void * jarg4, void * jarg5) {
    int jresult = 0 ;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    int arg2 = (int) 0 ;
    int arg3 = (int) 0 ;
    int *arg4 = (int *) 0 ;
    int *arg5 = (int *) 0 ;
    int result;
    int val4 ;
    int val5 ;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    arg2 = (int)jarg2; 
    arg3 = (int)jarg3; 
    {
        /* %typemap(csharp,in) (int *optional_##int) */
        
    }
    {
        /* %typemap(csharp,in) (int *optional_##int) */
        
    }
    result = (int)GDALRasterBandShadow_Checksum(arg1,arg2,arg3,arg4,arg5);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Band_ComputeRasterMinMax(void * jarg1, int jarg3) {
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    double *arg2 ;
    int arg3 = (int) 0 ;
    double argout2[2] ;
    
    {
        /* %typemap(in,numinputs=0) (double argout2[ANY]) */
        
    }
    arg1 = (GDALRasterBandShadow *)jarg1; 
    arg3 = (int)jarg3; 
    GDALRasterBandShadow_ComputeRasterMinMax(arg1,arg2,arg3);
    
    {
        /* %typemap(argout) (double argout[ANY]) */
        
    }
}


SWIGEXPORT int SWIGSTDCALL CSharp_Band_Fill(void * jarg1, double jarg2, double jarg3) {
    int jresult = 0 ;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    double arg2 ;
    double arg3 = (double) 0.0 ;
    CPLErr result;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    arg2 = (double)jarg2; 
    arg3 = (double)jarg3; 
    result = (CPLErr)GDALRasterBandShadow_Fill(arg1,arg2,arg3);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Band_ReadRaster(void * jarg1, int jarg2, int jarg3, int jarg4, int jarg5, void * jarg8, void * jarg9, void * jarg10) {
    int jresult = 0 ;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    int arg4 ;
    int arg5 ;
    int *arg6 = (int *) 0 ;
    char **arg7 = (char **) 0 ;
    int *arg8 = (int *) 0 ;
    int *arg9 = (int *) 0 ;
    int *arg10 = (int *) 0 ;
    CPLErr result;
    int nLen6 ;
    char *pBuf6 ;
    int val8 ;
    int val9 ;
    int val10 ;
    
    {
        /* %typemap(csharp, in,numinputs=0) (int *nLen6, char **pBuf6 ) */
        arg6 = &nLen6;
        arg7 = &pBuf6;
    }
    arg1 = (GDALRasterBandShadow *)jarg1; 
    arg2 = (int)jarg2; 
    arg3 = (int)jarg3; 
    arg4 = (int)jarg4; 
    arg5 = (int)jarg5; 
    {
        /* %typemap(csharp,in) (int *optional_##int) */
        
    }
    {
        /* %typemap(csharp,in) (int *optional_##int) */
        
    }
    {
        /* %typemap(csharp,in) (int *optional_##int) */
        
    }
    result = (CPLErr)GDALRasterBandShadow_ReadRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
    
    jresult = result; 
    {
        /* %typemap(argout) (int *nLen, char **pBuf ) */
        
    }
    {
        /* %typemap(csharp,freearg) (int *nLen, char **pBuf ) */
        if( arg6 ) {
            free( *arg7 );
        }
    }
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Band_WriteRaster(void * jarg1, int jarg2, int jarg3, int jarg4, int jarg5, int jarg6, void * jarg8, void * jarg9, void * jarg10) {
    int jresult = 0 ;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    int arg4 ;
    int arg5 ;
    int arg6 ;
    char *arg7 = (char *) 0 ;
    int *arg8 = (int *) 0 ;
    int *arg9 = (int *) 0 ;
    int *arg10 = (int *) 0 ;
    CPLErr result;
    int val8 ;
    int val9 ;
    int val10 ;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    arg2 = (int)jarg2; 
    arg3 = (int)jarg3; 
    arg4 = (int)jarg4; 
    arg5 = (int)jarg5; 
    {
        /* %typemap(csharp, in,numinputs=1) (int nLen, char *pBuf ) */
        
    }
    {
        /* %typemap(csharp,in) (int *optional_##int) */
        
    }
    {
        /* %typemap(csharp,in) (int *optional_##int) */
        
    }
    {
        /* %typemap(csharp,in) (int *optional_##int) */
        
    }
    result = (CPLErr)GDALRasterBandShadow_WriteRaster(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Band_FlushCache(void * jarg1) {
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    GDALRasterBandShadow_FlushCache(arg1);
    
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Band_GetRasterColorTable(void * jarg1) {
    void * jresult = 0 ;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    GDALColorTable *result;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    result = (GDALColorTable *)GDALRasterBandShadow_GetRasterColorTable(arg1);
    
    jresult = (void *)result; 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Band_SetRasterColorTable(void * jarg1, void * jarg2) {
    int jresult = 0 ;
    GDALRasterBandShadow *arg1 = (GDALRasterBandShadow *) 0 ;
    GDALColorTable *arg2 = (GDALColorTable *) 0 ;
    int result;
    
    arg1 = (GDALRasterBandShadow *)jarg1; 
    arg2 = (GDALColorTable *)jarg2; 
    result = (int)GDALRasterBandShadow_SetRasterColorTable(arg1,arg2);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_ColorTable(int jarg1) {
    void * jresult = 0 ;
    GDALPaletteInterp arg1 = (GDALPaletteInterp) GPI_RGB ;
    GDALColorTable *result;
    
    arg1 = (GDALPaletteInterp)jarg1; 
    result = (GDALColorTable *)new GDALColorTable(arg1);
    
    jresult = (void *)result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_ColorTable(void * jarg1) {
    GDALColorTable *arg1 = (GDALColorTable *) 0 ;
    
    arg1 = (GDALColorTable *)jarg1; 
    delete arg1;
    
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ColorTable_Clone(void * jarg1) {
    void * jresult = 0 ;
    GDALColorTable *arg1 = (GDALColorTable *) 0 ;
    GDALColorTable *result;
    
    arg1 = (GDALColorTable *)jarg1; 
    result = (GDALColorTable *)((GDALColorTable const *)arg1)->Clone();
    
    jresult = (void *)result; 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_ColorTable_GetPaletteInterpretation(void * jarg1) {
    int jresult = 0 ;
    GDALColorTable *arg1 = (GDALColorTable *) 0 ;
    GDALPaletteInterp result;
    
    arg1 = (GDALColorTable *)jarg1; 
    result = (GDALPaletteInterp)((GDALColorTable const *)arg1)->GetPaletteInterpretation();
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_ColorTable_GetCount(void * jarg1) {
    int jresult = 0 ;
    GDALColorTable *arg1 = (GDALColorTable *) 0 ;
    int result;
    
    arg1 = (GDALColorTable *)jarg1; 
    result = (int)((GDALColorTable const *)arg1)->GetColorEntryCount();
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ColorTable_GetColorEntry(void * jarg1, int jarg2) {
    void * jresult = 0 ;
    GDALColorTable *arg1 = (GDALColorTable *) 0 ;
    int arg2 ;
    GDALColorEntry *result;
    
    arg1 = (GDALColorTable *)jarg1; 
    arg2 = (int)jarg2; 
    result = (GDALColorEntry *)(arg1)->GetColorEntry(arg2);
    
    jresult = (void *)result; 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_ColorTable_GetColorEntryAsRGB(void * jarg1, int jarg2, void * jarg3) {
    int jresult = 0 ;
    GDALColorTable *arg1 = (GDALColorTable *) 0 ;
    int arg2 ;
    GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
    int result;
    
    arg1 = (GDALColorTable *)jarg1; 
    arg2 = (int)jarg2; 
    arg3 = (GDALColorEntry *)jarg3; 
    result = (int)((GDALColorTable const *)arg1)->GetColorEntryAsRGB(arg2,arg3);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_ColorTable_SetColorEntry(void * jarg1, int jarg2, void * jarg3) {
    GDALColorTable *arg1 = (GDALColorTable *) 0 ;
    int arg2 ;
    GDALColorEntry *arg3 = (GDALColorEntry *) 0 ;
    
    arg1 = (GDALColorTable *)jarg1; 
    arg2 = (int)jarg2; 
    arg3 = (GDALColorEntry *)jarg3; 
    (arg1)->SetColorEntry(arg2,(GDALColorEntry const *)arg3);
    
}


SWIGEXPORT void SWIGSTDCALL CSharp_AllRegister() {
    GDALAllRegister();
    
}


SWIGEXPORT int SWIGSTDCALL CSharp_GetCacheMax() {
    int jresult = 0 ;
    int result;
    
    result = (int)GDALGetCacheMax();
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_SetCacheMax(int jarg1) {
    int arg1 ;
    
    arg1 = (int)jarg1; 
    GDALSetCacheMax(arg1);
    
}


SWIGEXPORT int SWIGSTDCALL CSharp_GetCacheUsed() {
    int jresult = 0 ;
    int result;
    
    result = (int)GDALGetCacheUsed();
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GetDataTypeSize(int jarg1) {
    int jresult = 0 ;
    GDALDataType arg1 ;
    int result;
    
    arg1 = (GDALDataType)jarg1; 
    result = (int)GDALGetDataTypeSize(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_DataTypeIsComplex(int jarg1) {
    int jresult = 0 ;
    GDALDataType arg1 ;
    int result;
    
    arg1 = (GDALDataType)jarg1; 
    result = (int)GDALDataTypeIsComplex(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_GetDataTypeName(int jarg1) {
    char * jresult = 0 ;
    GDALDataType arg1 ;
    char *result;
    
    arg1 = (GDALDataType)jarg1; 
    result = (char *)GDALGetDataTypeName(arg1);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GetDataTypeByName(char * jarg1) {
    int jresult = 0 ;
    char *arg1 = (char *) 0 ;
    GDALDataType result;
    
    arg1 = jarg1; 
    result = (GDALDataType)GDALGetDataTypeByName((char const *)arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_GetColorInterpretationName(int jarg1) {
    char * jresult = 0 ;
    GDALColorInterp arg1 ;
    char *result;
    
    arg1 = (GDALColorInterp)jarg1; 
    result = (char *)GDALGetColorInterpretationName(arg1);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_GetPaletteInterpretationName(int jarg1) {
    char * jresult = 0 ;
    GDALPaletteInterp arg1 ;
    char *result;
    
    arg1 = (GDALPaletteInterp)jarg1; 
    result = (char *)GDALGetPaletteInterpretationName(arg1);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_DecToDMS(double jarg1, char * jarg2, int jarg3) {
    char * jresult = 0 ;
    double arg1 ;
    char *arg2 = (char *) 0 ;
    int arg3 = (int) 2 ;
    char *result;
    
    arg1 = (double)jarg1; 
    arg2 = jarg2; 
    arg3 = (int)jarg3; 
    result = (char *)GDALDecToDMS(arg1,(char const *)arg2,arg3);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_PackedDMSToDec(double jarg1) {
    double jresult = 0 ;
    double arg1 ;
    double result;
    
    arg1 = (double)jarg1; 
    result = (double)GDALPackedDMSToDec(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_DecToPackedDMS(double jarg1) {
    double jresult = 0 ;
    double arg1 ;
    double result;
    
    arg1 = (double)jarg1; 
    result = (double)GDALDecToPackedDMS(arg1);
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ParseXMLString(char * jarg1) {
    void * jresult = 0 ;
    char *arg1 = (char *) 0 ;
    CPLXMLNode *result;
    
    arg1 = jarg1; 
    result = (CPLXMLNode *)CPLParseXMLString(arg1);
    
    jresult = (void *)result; 
    return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_SerializeXMLTree(void * jarg1) {
    char * jresult = 0 ;
    CPLXMLNode *arg1 = (CPLXMLNode *) 0 ;
    char *result;
    
    arg1 = (CPLXMLNode *)jarg1; 
    result = (char *)CPLSerializeXMLTree(arg1);
    
    jresult = SWIG_csharp_string_callback(result); 
    return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GetDriverCount() {
    int jresult = 0 ;
    int result;
    
    result = (int)GetDriverCount();
    
    jresult = result; 
    return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_GetDriverByName(char * jarg1) {
    void * jresult = 0 ;
    char *arg1 = (char *) 0 ;
    GDALDriverShadow *result;
    
    arg1 = jarg1; 
    result = (GDALDriverShadow *)GetDriverByName((char const *)arg1);
    
    jresult = (void *)result; 
    return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Open(char * jarg1, int jarg2) {
    void * jresult = 0 ;
    char *arg1 = (char *) 0 ;
    GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
    GDALDatasetShadow *result;
    
    arg1 = jarg1; 
    arg2 = (GDALAccess)jarg2; 
    result = (GDALDatasetShadow *)Open((char const *)arg1,arg2);
    
    jresult = (void *)result; 
    return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_OpenShared(char * jarg1, int jarg2) {
    void * jresult = 0 ;
    char *arg1 = (char *) 0 ;
    GDALAccess arg2 = (GDALAccess) GA_ReadOnly ;
    GDALDatasetShadow *result;
    
    arg1 = jarg1; 
    arg2 = (GDALAccess)jarg2; 
    result = (GDALDatasetShadow *)OpenShared((char const *)arg1,arg2);
    
    jresult = (void *)result; 
    return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_AutoCreateWarpedVRT(void * jarg1, char * jarg2, char * jarg3, int jarg4, double jarg5) {
    void * jresult = 0 ;
    GDALDatasetShadow *arg1 = (GDALDatasetShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *arg3 = (char *) 0 ;
    GDALResampleAlg arg4 = (GDALResampleAlg) GRA_NearestNeighbour ;
    double arg5 = (double) 0.0 ;
    GDALDatasetShadow *result;
    
    arg1 = (GDALDatasetShadow *)jarg1; 
    arg2 = jarg2; 
    arg3 = jarg3; 
    arg4 = (GDALResampleAlg)jarg4; 
    arg5 = (double)jarg5; 
    result = (GDALDatasetShadow *)AutoCreateWarpedVRT(arg1,(char const *)arg2,(char const *)arg3,arg4,arg5);
    
    jresult = (void *)result; 
    return jresult;
}


SWIGEXPORT GDALMajorObjectShadow * SWIGSTDCALL CSharp_DriverUpcast(GDALDriverShadow *objectRef) {
    return (GDALMajorObjectShadow *)objectRef;
}

SWIGEXPORT GDALMajorObjectShadow * SWIGSTDCALL CSharp_DatasetUpcast(GDALDatasetShadow *objectRef) {
    return (GDALMajorObjectShadow *)objectRef;
}

SWIGEXPORT GDALMajorObjectShadow * SWIGSTDCALL CSharp_BandUpcast(GDALRasterBandShadow *objectRef) {
    return (GDALMajorObjectShadow *)objectRef;
}

#ifdef __cplusplus
}
#endif

