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

#define SWIGCSHARP


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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



#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_CSharpInvalidCastException,
  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_CSharpInvalidCastException, 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 SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) {
  SWIG_CSharpExceptionCallback_t callback = SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback;
  if ((size_t)code < sizeof(SWIG_csharp_exceptions)/sizeof(SWIG_CSharpException_t)) {
    callback = SWIG_csharp_exceptions[code].callback;
  }
  callback(msg);
}

static void SWIGUNUSED SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpExceptionArgumentCodes code, const char *msg, const char *param_name) {
  SWIG_CSharpExceptionArgumentCallback_t callback = SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback;
  if ((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_Ogr(
                                                SWIG_CSharpExceptionCallback_t applicationCallback,
                                                SWIG_CSharpExceptionCallback_t arithmeticCallback,
                                                SWIG_CSharpExceptionCallback_t divideByZeroCallback, 
                                                SWIG_CSharpExceptionCallback_t indexOutOfRangeCallback, 
                                                SWIG_CSharpExceptionCallback_t invalidCastCallback,
                                                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_CSharpInvalidCastException].callback = invalidCastCallback;
  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_Ogr(
                                                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_Ogr(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

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




SWIGINTERN void SWIG_CSharpException(int code, const char *msg) {
  if (code == SWIG_ValueError) {
    SWIG_CSharpExceptionArgumentCodes exception_code = SWIG_CSharpArgumentOutOfRangeException;
    SWIG_CSharpSetPendingExceptionArgument(exception_code, msg, 0);
  } else {
    SWIG_CSharpExceptionCodes exception_code = SWIG_CSharpApplicationException;
    switch(code) {
    case SWIG_MemoryError:
      exception_code = SWIG_CSharpOutOfMemoryException;
      break;
    case SWIG_IndexError:
      exception_code = SWIG_CSharpIndexOutOfRangeException;
      break;
    case SWIG_DivisionByZero:
      exception_code = SWIG_CSharpDivideByZeroException;
      break;
    case SWIG_IOError:
      exception_code = SWIG_CSharpIOException;
      break;
    case SWIG_OverflowError:
      exception_code = SWIG_CSharpOverflowException;
      break;
    case SWIG_RuntimeError:
    case SWIG_TypeError:
    case SWIG_SyntaxError:
    case SWIG_SystemError:
    case SWIG_UnknownError:
    default:
      exception_code = SWIG_CSharpApplicationException;
      break;
    }
    SWIG_CSharpSetPendingException(exception_code, msg);
  }
}


#include <stdexcept>


typedef char retStringAndCPLFree;


#include <iostream>
using namespace std;

#include "gdal.h"
#include "ogr_api.h"
#include "ogr_p.h"
#include "ogr_core.h"
#include "cpl_port.h"
#include "cpl_string.h"
#include "ogr_srs_api.h"

#define FIELD_INDEX_ERROR_TMPL "Invalid field index: '%i'"
#define FIELD_NAME_ERROR_TMPL "Invalid field name: '%s'"

typedef void GDALMajorObjectShadow;

#ifdef DEBUG
typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
#ifndef SWIGPERL
typedef struct OGRDriverHS OGRDriverShadow;
typedef struct OGRDataSourceHS OGRDataSourceShadow;
#endif
typedef struct OGRLayerHS OGRLayerShadow;
typedef struct OGRFeatureHS OGRFeatureShadow;
typedef struct OGRFeatureDefnHS OGRFeatureDefnShadow;
typedef struct OGRGeometryHS OGRGeometryShadow;
typedef struct OGRCoordinateTransformationHS OSRCoordinateTransformationShadow;
typedef struct OGRCoordinateTransformationHS OGRCoordinateTransformationShadow;
typedef struct OGRFieldDefnHS OGRFieldDefnShadow;
#else
typedef void OSRSpatialReferenceShadow;
#ifndef SWIGPERL
typedef void OGRDriverShadow;
typedef void OGRDataSourceShadow;
#endif
typedef void OGRLayerShadow;
typedef void OGRFeatureShadow;
typedef void OGRFeatureDefnShadow;
typedef void OGRGeometryShadow;
typedef void OSRCoordinateTransformationShadow;
typedef void OGRFieldDefnShadow;
#endif
typedef struct OGRStyleTableHS OGRStyleTableShadow;
typedef struct OGRGeomFieldDefnHS OGRGeomFieldDefnShadow;


void VeryQuietErrorHandler(CPLErr eclass, int code, const char *msg ) {
  /* If the error class is CE_Fatal, we want to have a message issued
     because the CPL support code does an abort() before any exception
     can be generated */
#if defined(SWIGPERL)
    AV* error_stack = get_av("Geo::GDAL::error", 0);
    SV *error = newSVpv(msg, 0);
    av_push(error_stack, error);
#endif
  if (eclass == CE_Fatal ) {
    CPLDefaultErrorHandler(eclass, code, msg );
  }
}


void UseExceptions() {
  CPLSetErrorHandler( (CPLErrorHandler) VeryQuietErrorHandler );
}

void DontUseExceptions() {
  CPLSetErrorHandler( CPLDefaultErrorHandler );
}


    void StringListDestroy(void *buffer_ptr) {
       CSLDestroy((char**)buffer_ptr);
    }

SWIGINTERN OGRStyleTableShadow *new_OGRStyleTableShadow(){
        return (OGRStyleTableShadow*) OGR_STBL_Create();
   }
SWIGINTERN void delete_OGRStyleTableShadow(OGRStyleTableShadow *self){
        OGR_STBL_Destroy( (OGRStyleTableH) self );
   }
SWIGINTERN int OGRStyleTableShadow_AddStyle(OGRStyleTableShadow *self,char const *pszName,char const *pszStyleString){
        return OGR_STBL_AddStyle( (OGRStyleTableH) self, pszName, pszStyleString);
   }
SWIGINTERN int OGRStyleTableShadow_LoadStyleTable(OGRStyleTableShadow *self,char const *utf8_path){
        return OGR_STBL_LoadStyleTable( (OGRStyleTableH) self, utf8_path );
   }
SWIGINTERN int OGRStyleTableShadow_SaveStyleTable(OGRStyleTableShadow *self,char const *utf8_path){
        return OGR_STBL_SaveStyleTable( (OGRStyleTableH) self, utf8_path );
   }
SWIGINTERN char const *OGRStyleTableShadow_Find(OGRStyleTableShadow *self,char const *pszName){
        return OGR_STBL_Find( (OGRStyleTableH) self, pszName );
   }
SWIGINTERN void OGRStyleTableShadow_ResetStyleStringReading(OGRStyleTableShadow *self){
        OGR_STBL_ResetStyleStringReading( (OGRStyleTableH) self );
   }
SWIGINTERN char const *OGRStyleTableShadow_GetNextStyle(OGRStyleTableShadow *self){
        return OGR_STBL_GetNextStyle( (OGRStyleTableH) self );
   }
SWIGINTERN char const *OGRStyleTableShadow_GetLastStyleName(OGRStyleTableShadow *self){
        return OGR_STBL_GetLastStyleName( (OGRStyleTableH) self );
   }
SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_CreateDataSource(OGRDriverShadow *self,char const *utf8_path,char **options=0){
    OGRDataSourceShadow *ds = (OGRDataSourceShadow*) OGR_Dr_CreateDataSource( self, utf8_path, options);
    return ds;
  }
SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_CopyDataSource(OGRDriverShadow *self,OGRDataSourceShadow *copy_ds,char const *utf8_path,char **options=0){
    OGRDataSourceShadow *ds = (OGRDataSourceShadow*) OGR_Dr_CopyDataSource(self, copy_ds, utf8_path, options);
    return ds;
  }
SWIGINTERN OGRDataSourceShadow *OGRDriverShadow_Open(OGRDriverShadow *self,char const *utf8_path,int update=0){
    CPLErrorReset();
    OGRDataSourceShadow* ds = (OGRDataSourceShadow*) OGR_Dr_Open(self, utf8_path, update);
    if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
    {
        CPLDebug(
            "SWIG",
            "OGR_Dr_Open() succeeded, but an error is posted, so we destroy"
            " the datasource and fail at swig level.\nError:%s",
            CPLGetLastErrorMsg() );
        OGRReleaseDataSource(ds);
        ds = NULL;
    }
    return ds;
  }
SWIGINTERN int OGRDriverShadow_DeleteDataSource(OGRDriverShadow *self,char const *utf8_path){

    return OGR_Dr_DeleteDataSource( self, utf8_path );
  }
SWIGINTERN bool OGRDriverShadow_TestCapability(OGRDriverShadow *self,char const *cap){
    return (OGR_Dr_TestCapability(self, cap) > 0);
  }
SWIGINTERN char const *OGRDriverShadow_GetName(OGRDriverShadow *self){
    return OGR_Dr_GetName( self );
  }
SWIGINTERN void OGRDriverShadow_Register(OGRDriverShadow *self){
    OGRRegisterDriver( self );
  }
SWIGINTERN void OGRDriverShadow_Deregister(OGRDriverShadow *self){
    OGRDeregisterDriver( self );
  }
SWIGINTERN void delete_OGRDataSourceShadow(OGRDataSourceShadow *self){
    OGRReleaseDataSource(self);
  }
SWIGINTERN int OGRDataSourceShadow_GetRefCount(OGRDataSourceShadow *self){
    return OGR_DS_GetRefCount(self);
  }
SWIGINTERN int OGRDataSourceShadow_GetSummaryRefCount(OGRDataSourceShadow *self){
    return OGR_DS_GetSummaryRefCount(self);
  }
SWIGINTERN int OGRDataSourceShadow_GetLayerCount(OGRDataSourceShadow *self){
    return OGR_DS_GetLayerCount(self);
  }
SWIGINTERN OGRDriverShadow *OGRDataSourceShadow_GetDriver(OGRDataSourceShadow *self){
    return (OGRDriverShadow *) OGR_DS_GetDriver( self );
  }
SWIGINTERN char const *OGRDataSourceShadow_GetName(OGRDataSourceShadow *self){
    return OGR_DS_GetName(self);
  }
SWIGINTERN OGRErr OGRDataSourceShadow_DeleteLayer(OGRDataSourceShadow *self,int index){
    return OGR_DS_DeleteLayer(self, index);
  }

static char const *
OGRErrMessages( int rc ) {
  switch( rc ) {
  case 0:
    return "OGR Error %d: None";
  case 1:
    return "OGR Error %d: Not enough data";
  case 2:
    return "OGR Error %d: Unsupported geometry type";
  case 3:
    return "OGR Error %d: Unsupported operation";
  case 4:
    return "OGR Error %d: Corrupt data";
  case 5:
    return "OGR Error %d: General Error";
  case 6:
    return "OGR Error %d: Unsupported SRS";
  default:
    return "OGR Error %d: Unknown";
  }
}

SWIGINTERN OGRErr OGRDataSourceShadow_SyncToDisk(OGRDataSourceShadow *self){
    return OGR_DS_SyncToDisk(self);
  }
SWIGINTERN void OGRDataSourceShadow_FlushCache(OGRDataSourceShadow *self){
    GDALFlushCache( self );
  }
SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_CreateLayer(OGRDataSourceShadow *self,char const *name,OSRSpatialReferenceShadow *srs=NULL,OGRwkbGeometryType geom_type=wkbUnknown,char **options=0){
    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_CreateLayer( self,
								  name,
								  srs,
								  geom_type,
								  options);
    return layer;
  }
SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_CopyLayer(OGRDataSourceShadow *self,OGRLayerShadow *src_layer,char const *new_name,char **options=0){
    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_CopyLayer( self,
                                                      src_layer,
                                                      new_name,
                                                      options);
    return layer;
  }
SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_GetLayerByIndex(OGRDataSourceShadow *self,int index=0){

    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_GetLayer(self, index);
    return layer;
  }
SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_GetLayerByName(OGRDataSourceShadow *self,char const *layer_name){
    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_GetLayerByName(self, layer_name);
    return layer;
  }
SWIGINTERN bool OGRDataSourceShadow_TestCapability(OGRDataSourceShadow *self,char const *cap){
    return (OGR_DS_TestCapability(self, cap) > 0);
  }
SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_ExecuteSQL(OGRDataSourceShadow *self,char const *statement,OGRGeometryShadow *spatialFilter=NULL,char const *dialect=""){
    OGRLayerShadow* layer = (OGRLayerShadow*) OGR_DS_ExecuteSQL((OGRDataSourceShadow*)self,
                                                      statement,
                                                      spatialFilter,
                                                      dialect);
    return layer;
  }
SWIGINTERN void OGRDataSourceShadow_ReleaseResultSet(OGRDataSourceShadow *self,OGRLayerShadow *layer){
    OGR_DS_ReleaseResultSet(self, layer);
  }
SWIGINTERN OGRStyleTableShadow *OGRDataSourceShadow_GetStyleTable(OGRDataSourceShadow *self){
    return (OGRStyleTableShadow*) OGR_DS_GetStyleTable(self);
  }
SWIGINTERN void OGRDataSourceShadow_SetStyleTable(OGRDataSourceShadow *self,OGRStyleTableShadow *table){
    if( table != NULL )
        OGR_DS_SetStyleTable(self, (OGRStyleTableH) table);
  }
SWIGINTERN OGRErr OGRDataSourceShadow_StartTransaction(OGRDataSourceShadow *self,int force=FALSE){
    return GDALDatasetStartTransaction(self, force);
  }
SWIGINTERN OGRErr OGRDataSourceShadow_CommitTransaction(OGRDataSourceShadow *self){
    return GDALDatasetCommitTransaction(self);
  }
SWIGINTERN OGRErr OGRDataSourceShadow_RollbackTransaction(OGRDataSourceShadow *self){
    return GDALDatasetRollbackTransaction(self);
  }
SWIGINTERN int OGRLayerShadow_GetRefCount(OGRLayerShadow *self){
    return OGR_L_GetRefCount(self);
  }
SWIGINTERN void OGRLayerShadow_SetSpatialFilter__SWIG_0(OGRLayerShadow *self,OGRGeometryShadow *filter){
    OGR_L_SetSpatialFilter (self, filter);
  }
SWIGINTERN void OGRLayerShadow_SetSpatialFilterRect__SWIG_0(OGRLayerShadow *self,double minx,double miny,double maxx,double maxy){
    OGR_L_SetSpatialFilterRect(self, minx, miny, maxx, maxy);
  }
SWIGINTERN void OGRLayerShadow_SetSpatialFilter__SWIG_1(OGRLayerShadow *self,int iGeomField,OGRGeometryShadow *filter){
    OGR_L_SetSpatialFilterEx (self, iGeomField, filter);
  }
SWIGINTERN void OGRLayerShadow_SetSpatialFilterRect__SWIG_1(OGRLayerShadow *self,int iGeomField,double minx,double miny,double maxx,double maxy){
    OGR_L_SetSpatialFilterRectEx(self, iGeomField, minx, miny, maxx, maxy);
  }
SWIGINTERN OGRGeometryShadow *OGRLayerShadow_GetSpatialFilter(OGRLayerShadow *self){
    return (OGRGeometryShadow *) OGR_L_GetSpatialFilter(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetAttributeFilter(OGRLayerShadow *self,char *filter_string){
    return OGR_L_SetAttributeFilter((OGRLayerShadow*)self, filter_string);
  }
SWIGINTERN void OGRLayerShadow_ResetReading(OGRLayerShadow *self){
    OGR_L_ResetReading(self);
  }
SWIGINTERN char const *OGRLayerShadow_GetName(OGRLayerShadow *self){
    return OGR_L_GetName(self);
  }
SWIGINTERN OGRwkbGeometryType OGRLayerShadow_GetGeomType(OGRLayerShadow *self){
    return (OGRwkbGeometryType) OGR_L_GetGeomType(self);
  }
SWIGINTERN char const *OGRLayerShadow_GetGeometryColumn(OGRLayerShadow *self){
    return OGR_L_GetGeometryColumn(self);
  }
SWIGINTERN char const *OGRLayerShadow_GetFIDColumn(OGRLayerShadow *self){
    return OGR_L_GetFIDColumn(self);
  }
SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetFeature(OGRLayerShadow *self,GIntBig fid){
    return (OGRFeatureShadow*) OGR_L_GetFeature(self, fid);
  }
SWIGINTERN OGRFeatureShadow *OGRLayerShadow_GetNextFeature(OGRLayerShadow *self){
    return (OGRFeatureShadow*) OGR_L_GetNextFeature(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetNextByIndex(OGRLayerShadow *self,GIntBig new_index){
    return OGR_L_SetNextByIndex(self, new_index);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
    return OGR_L_SetFeature(self, feature);
  }
SWIGINTERN OGRErr OGRLayerShadow_CreateFeature(OGRLayerShadow *self,OGRFeatureShadow *feature){
    return OGR_L_CreateFeature(self, feature);
  }
SWIGINTERN OGRErr OGRLayerShadow_DeleteFeature(OGRLayerShadow *self,GIntBig fid){
    return OGR_L_DeleteFeature(self, fid);
  }
SWIGINTERN OGRErr OGRLayerShadow_SyncToDisk(OGRLayerShadow *self){
    return OGR_L_SyncToDisk(self);
  }
SWIGINTERN OGRFeatureDefnShadow *OGRLayerShadow_GetLayerDefn(OGRLayerShadow *self){
    return (OGRFeatureDefnShadow*) OGR_L_GetLayerDefn(self);
  }
SWIGINTERN GIntBig OGRLayerShadow_GetFeatureCount(OGRLayerShadow *self,int force=1){
    return OGR_L_GetFeatureCount(self, force);
  }
SWIGINTERN OGRErr OGRLayerShadow_GetExtent(OGRLayerShadow *self,OGREnvelope *extent,int force=1){
    return OGR_L_GetExtent(self, extent, force);
  }
SWIGINTERN bool OGRLayerShadow_TestCapability(OGRLayerShadow *self,char const *cap){
    return (OGR_L_TestCapability(self, cap) > 0);
  }
SWIGINTERN OGRErr OGRLayerShadow_CreateField(OGRLayerShadow *self,OGRFieldDefnShadow *field_def,int approx_ok=1){
    return OGR_L_CreateField(self, field_def, approx_ok);
  }
SWIGINTERN OGRErr OGRLayerShadow_DeleteField(OGRLayerShadow *self,int iField){
    return OGR_L_DeleteField(self, iField);
  }
SWIGINTERN OGRErr OGRLayerShadow_ReorderField(OGRLayerShadow *self,int iOldFieldPos,int iNewFieldPos){
    return OGR_L_ReorderField(self, iOldFieldPos, iNewFieldPos);
  }
SWIGINTERN OGRErr OGRLayerShadow_ReorderFields(OGRLayerShadow *self,int nList,int *pList){
    if (nList != OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)))
    {
      CPLError(CE_Failure, CPLE_IllegalArg,
               "List should have %d elements",
               OGR_FD_GetFieldCount(OGR_L_GetLayerDefn(self)));
      return 6;
    }
    return OGR_L_ReorderFields(self, pList);
  }
SWIGINTERN OGRErr OGRLayerShadow_AlterFieldDefn(OGRLayerShadow *self,int iField,OGRFieldDefnShadow *field_def,int nFlags){
    return OGR_L_AlterFieldDefn(self, iField, field_def, nFlags);
  }
SWIGINTERN OGRErr OGRLayerShadow_CreateGeomField(OGRLayerShadow *self,OGRGeomFieldDefnShadow *field_def,int approx_ok=1){
    return OGR_L_CreateGeomField(self, field_def, approx_ok);
  }
SWIGINTERN OGRErr OGRLayerShadow_StartTransaction(OGRLayerShadow *self){
    return OGR_L_StartTransaction(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_CommitTransaction(OGRLayerShadow *self){
    return OGR_L_CommitTransaction(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_RollbackTransaction(OGRLayerShadow *self){
    return OGR_L_RollbackTransaction(self);
  }
SWIGINTERN int OGRLayerShadow_FindFieldIndex(OGRLayerShadow *self,char const *pszFieldName,int bExactMatch){
    return OGR_L_FindFieldIndex(self, pszFieldName, bExactMatch );
  }
SWIGINTERN OSRSpatialReferenceShadow *OGRLayerShadow_GetSpatialRef(OGRLayerShadow *self){
    OGRSpatialReferenceH ref =  OGR_L_GetSpatialRef(self);
    if( ref )
        OSRReference(ref);
    return (OSRSpatialReferenceShadow*) ref;
  }
SWIGINTERN GIntBig OGRLayerShadow_GetFeaturesRead(OGRLayerShadow *self){
    return OGR_L_GetFeaturesRead(self);
  }
SWIGINTERN OGRErr OGRLayerShadow_SetIgnoredFields(OGRLayerShadow *self,char const **options){
    return OGR_L_SetIgnoredFields( self, options );
  }
SWIGINTERN OGRErr OGRLayerShadow_Intersection(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Intersection( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Union(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Union( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_SymDifference(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_SymDifference( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Identity(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Identity( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Update(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Update( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Clip(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Clip( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRErr OGRLayerShadow_Erase(OGRLayerShadow *self,OGRLayerShadow *method_layer,OGRLayerShadow *result_layer,char **options=NULL,GDALProgressFunc callback=NULL,void *callback_data=NULL){
    return OGR_L_Erase( self, method_layer, result_layer, options, callback, callback_data );
  }
SWIGINTERN OGRStyleTableShadow *OGRLayerShadow_GetStyleTable(OGRLayerShadow *self){
    return (OGRStyleTableShadow*) OGR_L_GetStyleTable(self);
  }
SWIGINTERN void OGRLayerShadow_SetStyleTable(OGRLayerShadow *self,OGRStyleTableShadow *table){
    if( table != NULL )
        OGR_L_SetStyleTable(self, (OGRStyleTableH) table);
  }
SWIGINTERN void delete_OGRFeatureShadow(OGRFeatureShadow *self){
    OGR_F_Destroy(self);
  }
SWIGINTERN OGRFeatureShadow *new_OGRFeatureShadow(OGRFeatureDefnShadow *feature_def){
      return (OGRFeatureShadow*) OGR_F_Create( feature_def );
  }
SWIGINTERN OGRFeatureDefnShadow *OGRFeatureShadow_GetDefnRef(OGRFeatureShadow *self){
    return (OGRFeatureDefnShadow*) OGR_F_GetDefnRef(self);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeometry(OGRFeatureShadow *self,OGRGeometryShadow *geom){
    return OGR_F_SetGeometry(self, geom);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeometryDirectly(OGRFeatureShadow *self,OGRGeometryShadow *geom){
    return OGR_F_SetGeometryDirectly(self, geom);
  }
SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeometryRef(OGRFeatureShadow *self){
    return (OGRGeometryShadow*) OGR_F_GetGeometryRef(self);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeomField__SWIG_0(OGRFeatureShadow *self,int iField,OGRGeometryShadow *geom){
    return OGR_F_SetGeomField(self, iField, geom);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeomField__SWIG_1(OGRFeatureShadow *self,char const *field_name,OGRGeometryShadow *geom){
      int iField = OGR_F_GetGeomFieldIndex(self, field_name);
      if (iField == -1)
      {
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
          return 6;
      }
      else
          return OGR_F_SetGeomField(self, iField, geom);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeomFieldDirectly__SWIG_0(OGRFeatureShadow *self,int iField,OGRGeometryShadow *geom){
    return OGR_F_SetGeomFieldDirectly(self, iField, geom);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetGeomFieldDirectly__SWIG_1(OGRFeatureShadow *self,char const *field_name,OGRGeometryShadow *geom){
      int iField = OGR_F_GetGeomFieldIndex(self, field_name);
      if (iField == -1)
      {
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
          return 6;
      }
      else
          return OGR_F_SetGeomFieldDirectly(self, iField, geom);
  }
SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeomFieldRef__SWIG_0(OGRFeatureShadow *self,int iField){
    return (OGRGeometryShadow*) OGR_F_GetGeomFieldRef(self, iField);
  }
SWIGINTERN OGRGeometryShadow *OGRFeatureShadow_GetGeomFieldRef__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetGeomFieldIndex(self, field_name);
      if (i == -1)
      {
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
          return NULL;
      }
      else
          return (OGRGeometryShadow*) OGR_F_GetGeomFieldRef(self, i);
  }
SWIGINTERN OGRFeatureShadow *OGRFeatureShadow_Clone(OGRFeatureShadow *self){
    return (OGRFeatureShadow*) OGR_F_Clone(self);
  }
SWIGINTERN bool OGRFeatureShadow_Equal(OGRFeatureShadow *self,OGRFeatureShadow *feature){
    return (OGR_F_Equal(self, feature) > 0);
  }
SWIGINTERN int OGRFeatureShadow_GetFieldCount(OGRFeatureShadow *self){
    return OGR_F_GetFieldCount(self);
  }
SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_0(OGRFeatureShadow *self,int id){
    return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, id);
  }
SWIGINTERN OGRFieldDefnShadow *OGRFeatureShadow_GetFieldDefnRef__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          return (OGRFieldDefnShadow *) OGR_F_GetFieldDefnRef(self, i);
      return NULL;
  }
SWIGINTERN int OGRFeatureShadow_GetGeomFieldCount(OGRFeatureShadow *self){
    return OGR_F_GetGeomFieldCount(self);
  }
SWIGINTERN OGRGeomFieldDefnShadow *OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_0(OGRFeatureShadow *self,int id){
      return (OGRGeomFieldDefnShadow *) OGR_F_GetGeomFieldDefnRef(self, id);
  }
SWIGINTERN OGRGeomFieldDefnShadow *OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetGeomFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          return (OGRGeomFieldDefnShadow *) OGR_F_GetGeomFieldDefnRef(self, i);
      return NULL;
  }
SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_0(OGRFeatureShadow *self,int id){
    return (const char *) OGR_F_GetFieldAsString(self, id);
  }
SWIGINTERN char const *OGRFeatureShadow_GetFieldAsString__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  return (const char *) OGR_F_GetFieldAsString(self, i);
      return NULL;
  }
SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_0(OGRFeatureShadow *self,int id){
    return OGR_F_GetFieldAsInteger(self, id);
  }
SWIGINTERN int OGRFeatureShadow_GetFieldAsInteger__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  return OGR_F_GetFieldAsInteger(self, i);
      return 0;
  }
SWIGINTERN GIntBig OGRFeatureShadow_GetFieldAsInteger64__SWIG_0(OGRFeatureShadow *self,int id){
    return OGR_F_GetFieldAsInteger64(self, id);
  }
SWIGINTERN GIntBig OGRFeatureShadow_GetFieldAsInteger64__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          return OGR_F_GetFieldAsInteger64(self, i);
      return 0;
  }
SWIGINTERN double OGRFeatureShadow_GetFieldAsDouble__SWIG_0(OGRFeatureShadow *self,int id){
    return OGR_F_GetFieldAsDouble(self, id);
  }
SWIGINTERN double OGRFeatureShadow_GetFieldAsDouble__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          return OGR_F_GetFieldAsDouble(self, i);
      return 0;
  }
SWIGINTERN void OGRFeatureShadow_GetFieldAsDateTime__SWIG_0(OGRFeatureShadow *self,int id,int *pnYear,int *pnMonth,int *pnDay,int *pnHour,int *pnMinute,float *pfSecond,int *pnTZFlag){
      OGR_F_GetFieldAsDateTimeEx(self, id, pnYear, pnMonth, pnDay,
			       pnHour, pnMinute, pfSecond,
			       pnTZFlag);
  }
SWIGINTERN void OGRFeatureShadow_GetFieldAsDateTime__SWIG_1(OGRFeatureShadow *self,char const *field_name,int *pnYear,int *pnMonth,int *pnDay,int *pnHour,int *pnMinute,float *pfSecond,int *pnTZFlag){
      int id = OGR_F_GetFieldIndex(self, field_name);
      if (id == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  OGR_F_GetFieldAsDateTimeEx(self, id, pnYear, pnMonth, pnDay,
			       pnHour, pnMinute, pfSecond,
			       pnTZFlag);
  }
SWIGINTERN int const *OGRFeatureShadow_GetFieldAsIntegerList(OGRFeatureShadow *self,int id,int *count){
      return OGR_F_GetFieldAsIntegerList(self, id, count);
  }
SWIGINTERN double const *OGRFeatureShadow_GetFieldAsDoubleList(OGRFeatureShadow *self,int id,int *count){
      return OGR_F_GetFieldAsDoubleList(self, id, count);
  }
SWIGINTERN char **OGRFeatureShadow_GetFieldAsStringList(OGRFeatureShadow *self,int id){
      return OGR_F_GetFieldAsStringList(self, id);
  }
SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_0(OGRFeatureShadow *self,int id){
    return (OGR_F_IsFieldSet(self, id) > 0);
  }
SWIGINTERN bool OGRFeatureShadow_IsFieldSet__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  return (OGR_F_IsFieldSet(self, i) > 0);
      return false;
  }
SWIGINTERN bool OGRFeatureShadow_IsFieldNull__SWIG_0(OGRFeatureShadow *self,int id){
    return (OGR_F_IsFieldNull(self, id) > 0);
  }
SWIGINTERN bool OGRFeatureShadow_IsFieldNull__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  return (OGR_F_IsFieldNull(self, i) > 0);
      return false;
  }
SWIGINTERN bool OGRFeatureShadow_IsFieldSetAndNotNull__SWIG_0(OGRFeatureShadow *self,int id){
    return (OGR_F_IsFieldSetAndNotNull(self, id) > 0);
  }
SWIGINTERN bool OGRFeatureShadow_IsFieldSetAndNotNull__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  return (OGR_F_IsFieldSetAndNotNull(self, i) > 0);
      return false;
  }
SWIGINTERN int OGRFeatureShadow_GetFieldIndex(OGRFeatureShadow *self,char const *field_name){
      // Do not issue an error if the field doesn't exist. It is intended to be silent
      return OGR_F_GetFieldIndex(self, field_name);
  }
SWIGINTERN int OGRFeatureShadow_GetGeomFieldIndex(OGRFeatureShadow *self,char const *field_name){
      // Do not issue an error if the field doesn't exist. It is intended to be silent
      return OGR_F_GetGeomFieldIndex(self, field_name);
  }
SWIGINTERN GIntBig OGRFeatureShadow_GetFID(OGRFeatureShadow *self){
    return OGR_F_GetFID(self);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetFID(OGRFeatureShadow *self,GIntBig fid){
    return OGR_F_SetFID(self, fid);
  }
SWIGINTERN void OGRFeatureShadow_DumpReadable(OGRFeatureShadow *self){
    OGR_F_DumpReadable(self, NULL);
  }
SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_0(OGRFeatureShadow *self,int id){
    OGR_F_UnsetField(self, id);
  }
SWIGINTERN void OGRFeatureShadow_UnsetField__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          OGR_F_UnsetField(self, i);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldNull__SWIG_0(OGRFeatureShadow *self,int id){
    OGR_F_SetFieldNull(self, id);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldNull__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          OGR_F_SetFieldNull(self, i);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_0(OGRFeatureShadow *self,int id,char const *value){
    OGR_F_SetFieldString(self, id, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_1(OGRFeatureShadow *self,char const *field_name,char const *value){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
          OGR_F_SetFieldString(self, i, value);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldInteger64(OGRFeatureShadow *self,int id,GIntBig value){
    OGR_F_SetFieldInteger64(self, id, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_2(OGRFeatureShadow *self,int id,int value){
    OGR_F_SetFieldInteger(self, id, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_3(OGRFeatureShadow *self,char const *field_name,int value){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  OGR_F_SetFieldInteger(self, i, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_4(OGRFeatureShadow *self,int id,double value){
    OGR_F_SetFieldDouble(self, id, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_5(OGRFeatureShadow *self,char const *field_name,double value){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  OGR_F_SetFieldDouble(self, i, value);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_6(OGRFeatureShadow *self,int id,int year,int month,int day,int hour,int minute,float second,int tzflag){
    OGR_F_SetFieldDateTimeEx(self, id, year, month, day,
                             hour, minute, second,
                             tzflag);
  }
SWIGINTERN void OGRFeatureShadow_SetField__SWIG_7(OGRFeatureShadow *self,char const *field_name,int year,int month,int day,int hour,int minute,float second,int tzflag){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
	  CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
	  OGR_F_SetFieldDateTimeEx(self, i, year, month, day,
				 hour, minute, second,
				 tzflag);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldIntegerList(OGRFeatureShadow *self,int id,int nList,int *pList){
      OGR_F_SetFieldIntegerList(self, id, nList, pList);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldDoubleList(OGRFeatureShadow *self,int id,int nList,double *pList){
      OGR_F_SetFieldDoubleList(self, id, nList, pList);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldStringList(OGRFeatureShadow *self,int id,char **pList){
      OGR_F_SetFieldStringList(self, id, pList);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_0(OGRFeatureShadow *self,int id,char const *pszValue){
     int nBytes;
     GByte* pabyBuf = CPLHexToBinary(pszValue, &nBytes );
     OGR_F_SetFieldBinary(self, id, nBytes, pabyBuf);
     CPLFree(pabyBuf);
  }
SWIGINTERN void OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_1(OGRFeatureShadow *self,char const *field_name,char const *pszValue){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1)
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
      else
      {
          int nBytes;
          GByte* pabyBuf = CPLHexToBinary(pszValue, &nBytes );
          OGR_F_SetFieldBinary(self, i, nBytes, pabyBuf);
          CPLFree(pabyBuf);
      }
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetFrom(OGRFeatureShadow *self,OGRFeatureShadow *other,int forgiving=1){
    return OGR_F_SetFrom(self, other, forgiving);
  }
SWIGINTERN OGRErr OGRFeatureShadow_SetFromWithMap(OGRFeatureShadow *self,OGRFeatureShadow *other,int forgiving,int nList,int *pList){
    if (nList != OGR_F_GetFieldCount(other))
    {
        CPLError(CE_Failure, CPLE_AppDefined,
                 "The size of map doesn't match with the field count of the source feature");
        return 6;
    }
    return OGR_F_SetFromWithMap(self, other, forgiving, pList);
  }
SWIGINTERN char const *OGRFeatureShadow_GetStyleString(OGRFeatureShadow *self){
    return (const char*) OGR_F_GetStyleString(self);
  }
SWIGINTERN void OGRFeatureShadow_SetStyleString(OGRFeatureShadow *self,char const *the_string){
    OGR_F_SetStyleString(self, the_string);
  }
SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_0(OGRFeatureShadow *self,int id){
      OGRFieldDefnH fd = OGR_F_GetFieldDefnRef( self,  id );
      if (fd)
          return (OGRFieldType) OGR_Fld_GetType( fd );
      else
          return (OGRFieldType)0;
  }
SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_1(OGRFeatureShadow *self,char const *field_name){
      int i = OGR_F_GetFieldIndex(self, field_name);
      if (i == -1) {
          CPLError(CE_Failure, 1, FIELD_NAME_ERROR_TMPL, field_name);
          return (OGRFieldType)0;
      } else
          return (OGRFieldType) OGR_Fld_GetType( OGR_F_GetFieldDefnRef( self, i ) );
  }
SWIGINTERN int OGRFeatureShadow_Validate(OGRFeatureShadow *self,int flags=OGR_F_VAL_ALL,int bEmitError=TRUE){
    return OGR_F_Validate(self, flags, bEmitError);
  }
SWIGINTERN void OGRFeatureShadow_FillUnsetWithDefault(OGRFeatureShadow *self,int bNotNullableOnly=FALSE,char **options=NULL){
    OGR_F_FillUnsetWithDefault(self, bNotNullableOnly, options );
  }
SWIGINTERN char const *OGRFeatureShadow_GetNativeData(OGRFeatureShadow *self){
    return OGR_F_GetNativeData(self);
  }
SWIGINTERN char const *OGRFeatureShadow_GetNativeMediaType(OGRFeatureShadow *self){
    return OGR_F_GetNativeMediaType(self);
  }
SWIGINTERN void OGRFeatureShadow_SetNativeData(OGRFeatureShadow *self,char const *nativeData){
    OGR_F_SetNativeData(self, nativeData);
  }
SWIGINTERN void OGRFeatureShadow_SetNativeMediaType(OGRFeatureShadow *self,char const *nativeMediaType){
    OGR_F_SetNativeMediaType(self, nativeMediaType);
  }

    static int ValidateOGRGeometryType(OGRwkbGeometryType field_type)
    {
        switch(field_type)
        {
            case wkbUnknown:
            case wkbPoint:
            case wkbLineString:
            case wkbPolygon:
            case wkbMultiPoint:
            case wkbMultiLineString:
            case wkbMultiPolygon:
            case wkbGeometryCollection:
            case wkbCircularString:
            case wkbCompoundCurve:
            case wkbCurvePolygon:
            case wkbMultiCurve:
            case wkbMultiSurface:
            case wkbCurve:
            case wkbSurface:
            case wkbTriangle:
            case wkbTIN:
            case wkbPolyhedralSurface:
            case wkbNone:
            /*case wkbLinearRing:*/
            case wkbCircularStringZ:
            case wkbCompoundCurveZ:
            case wkbCurvePolygonZ:
            case wkbMultiCurveZ:
            case wkbMultiSurfaceZ:
            case wkbCurveZ:
            case wkbSurfaceZ:
            case wkbTriangleZ:
            case wkbTINZ:
            case wkbPolyhedralSurfaceZ:
            case wkbPoint25D:
            case wkbLineString25D:
            case wkbPolygon25D:
            case wkbMultiPoint25D:
            case wkbMultiLineString25D:
            case wkbMultiPolygon25D:
            case wkbGeometryCollection25D:
            case wkbPointM:
            case wkbLineStringM:
            case wkbPolygonM:
            case wkbMultiPointM:
            case wkbMultiLineStringM:
            case wkbMultiPolygonM:
            case wkbGeometryCollectionM:
            case wkbCircularStringM:
            case wkbCompoundCurveM:
            case wkbCurvePolygonM:
            case wkbMultiCurveM:
            case wkbMultiSurfaceM:
            case wkbCurveM:
            case wkbSurfaceM:
            case wkbTriangleM:
            case wkbTINM:
            case wkbPolyhedralSurfaceM:
            case wkbPointZM:
            case wkbLineStringZM:
            case wkbPolygonZM:
            case wkbMultiPointZM:
            case wkbMultiLineStringZM:
            case wkbMultiPolygonZM:
            case wkbGeometryCollectionZM:
            case wkbCircularStringZM:
            case wkbCompoundCurveZM:
            case wkbCurvePolygonZM:
            case wkbMultiCurveZM:
            case wkbMultiSurfaceZM:
            case wkbCurveZM:
            case wkbSurfaceZM:
            case wkbTriangleZM:
            case wkbTINZM:
            case wkbPolyhedralSurfaceZM:
                return TRUE;
            default:
                CPLError(CE_Failure, CPLE_IllegalArg, "Illegal geometry type value");
                return FALSE;
        }
    }

SWIGINTERN void delete_OGRFeatureDefnShadow(OGRFeatureDefnShadow *self){
    /*OGR_FD_Destroy(self);*/
    OGR_FD_Release( OGRFeatureDefnH(self) );
  }
SWIGINTERN OGRFeatureDefnShadow *new_OGRFeatureDefnShadow(char const *name_null_ok=NULL){
    OGRFeatureDefnH h = OGR_FD_Create(name_null_ok);
    OGR_FD_Reference(h);
    return (OGRFeatureDefnShadow* )h;
  }
SWIGINTERN char const *OGRFeatureDefnShadow_GetName(OGRFeatureDefnShadow *self){
    return OGR_FD_GetName(self);
  }
SWIGINTERN int OGRFeatureDefnShadow_GetFieldCount(OGRFeatureDefnShadow *self){
    return OGR_FD_GetFieldCount(self);
  }
SWIGINTERN OGRFieldDefnShadow *OGRFeatureDefnShadow_GetFieldDefn(OGRFeatureDefnShadow *self,int i){
    return (OGRFieldDefnShadow*) OGR_FD_GetFieldDefn(self, i);
  }
SWIGINTERN int OGRFeatureDefnShadow_GetFieldIndex(OGRFeatureDefnShadow *self,char const *field_name){
      // Do not issue an error if the field doesn't exist. It is intended to be silent
      return OGR_FD_GetFieldIndex(self, field_name);
  }
SWIGINTERN void OGRFeatureDefnShadow_AddFieldDefn(OGRFeatureDefnShadow *self,OGRFieldDefnShadow *defn){
    OGR_FD_AddFieldDefn(self, defn);
  }
SWIGINTERN int OGRFeatureDefnShadow_GetGeomFieldCount(OGRFeatureDefnShadow *self){
    return OGR_FD_GetGeomFieldCount(self);
  }
SWIGINTERN OGRGeomFieldDefnShadow *OGRFeatureDefnShadow_GetGeomFieldDefn(OGRFeatureDefnShadow *self,int i){
    return (OGRGeomFieldDefnShadow*) OGR_FD_GetGeomFieldDefn(self, i);
  }
SWIGINTERN int OGRFeatureDefnShadow_GetGeomFieldIndex(OGRFeatureDefnShadow *self,char const *field_name){
      // Do not issue an error if the field doesn't exist. It is intended to be silent
      return OGR_FD_GetGeomFieldIndex(self, field_name);
  }
SWIGINTERN void OGRFeatureDefnShadow_AddGeomFieldDefn(OGRFeatureDefnShadow *self,OGRGeomFieldDefnShadow *defn){
    OGR_FD_AddGeomFieldDefn(self, defn);
  }
SWIGINTERN OGRErr OGRFeatureDefnShadow_DeleteGeomFieldDefn(OGRFeatureDefnShadow *self,int idx){
    return OGR_FD_DeleteGeomFieldDefn(self, idx);
  }
SWIGINTERN OGRwkbGeometryType OGRFeatureDefnShadow_GetGeomType(OGRFeatureDefnShadow *self){
    return (OGRwkbGeometryType) OGR_FD_GetGeomType(self);
  }
SWIGINTERN void OGRFeatureDefnShadow_SetGeomType(OGRFeatureDefnShadow *self,OGRwkbGeometryType geom_type){
    if( ValidateOGRGeometryType(geom_type) )
        OGR_FD_SetGeomType(self, geom_type);
  }
SWIGINTERN int OGRFeatureDefnShadow_GetReferenceCount(OGRFeatureDefnShadow *self){
    return OGR_FD_GetReferenceCount(self);
  }
SWIGINTERN int OGRFeatureDefnShadow_IsGeometryIgnored(OGRFeatureDefnShadow *self){
    return OGR_FD_IsGeometryIgnored(self);
  }
SWIGINTERN void OGRFeatureDefnShadow_SetGeometryIgnored(OGRFeatureDefnShadow *self,int bIgnored){
    return OGR_FD_SetGeometryIgnored(self,bIgnored);
  }
SWIGINTERN int OGRFeatureDefnShadow_IsStyleIgnored(OGRFeatureDefnShadow *self){
    return OGR_FD_IsStyleIgnored(self);
  }
SWIGINTERN void OGRFeatureDefnShadow_SetStyleIgnored(OGRFeatureDefnShadow *self,int bIgnored){
    return OGR_FD_SetStyleIgnored(self,bIgnored);
  }
SWIGINTERN int OGRFeatureDefnShadow_IsSame(OGRFeatureDefnShadow *self,OGRFeatureDefnShadow *other_defn){
    return OGR_FD_IsSame(self, other_defn);
  }

    static int ValidateOGRFieldType(OGRFieldType field_type)
    {
        switch(field_type)
        {
            case OFTInteger:
            case OFTIntegerList:
            case OFTReal:
            case OFTRealList:
            case OFTString:
            case OFTStringList:
            case OFTBinary:
            case OFTDate:
            case OFTTime:
            case OFTDateTime:
            case OFTInteger64:
            case OFTInteger64List:
                return TRUE;
            default:
                CPLError(CE_Failure, CPLE_IllegalArg, "Illegal field type value");
                return FALSE;
        }
    }


    static int ValidateOGRFieldSubType(OGRFieldSubType field_subtype)
    {
        switch(field_subtype)
        {
            case OFSTNone:
            case OFSTBoolean:
            case OFSTInt16:
            case OFSTFloat32:
                return TRUE;
            default:
                CPLError(CE_Failure, CPLE_IllegalArg, "Illegal field subtype value");
                return FALSE;
        }
    }

SWIGINTERN void delete_OGRFieldDefnShadow(OGRFieldDefnShadow *self){
    OGR_Fld_Destroy(self);
  }
SWIGINTERN OGRFieldDefnShadow *new_OGRFieldDefnShadow(char const *name_null_ok="unnamed",OGRFieldType field_type=OFTString){
    if (ValidateOGRFieldType(field_type))
        return (OGRFieldDefnShadow*) OGR_Fld_Create(name_null_ok, field_type);
    else
        return NULL;
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetName(OGRFieldDefnShadow *self){
    return (const char *) OGR_Fld_GetNameRef(self);
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetNameRef(OGRFieldDefnShadow *self){
    return (const char *) OGR_Fld_GetNameRef(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetName(OGRFieldDefnShadow *self,char const *name){
    OGR_Fld_SetName(self, name);
  }
SWIGINTERN OGRFieldType OGRFieldDefnShadow_GetType(OGRFieldDefnShadow *self){
    return OGR_Fld_GetType(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetType(OGRFieldDefnShadow *self,OGRFieldType type){
    if (ValidateOGRFieldType(type))
        OGR_Fld_SetType(self, type);
  }
SWIGINTERN OGRFieldSubType OGRFieldDefnShadow_GetSubType(OGRFieldDefnShadow *self){
    return OGR_Fld_GetSubType(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetSubType(OGRFieldDefnShadow *self,OGRFieldSubType type){
    if (ValidateOGRFieldSubType(type))
        OGR_Fld_SetSubType(self, type);
  }
SWIGINTERN OGRJustification OGRFieldDefnShadow_GetJustify(OGRFieldDefnShadow *self){
    return OGR_Fld_GetJustify(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetJustify(OGRFieldDefnShadow *self,OGRJustification justify){
    OGR_Fld_SetJustify(self, justify);
  }
SWIGINTERN int OGRFieldDefnShadow_GetWidth(OGRFieldDefnShadow *self){
    return OGR_Fld_GetWidth(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetWidth(OGRFieldDefnShadow *self,int width){
    OGR_Fld_SetWidth(self, width);
  }
SWIGINTERN int OGRFieldDefnShadow_GetPrecision(OGRFieldDefnShadow *self){
    return OGR_Fld_GetPrecision(self);
  }
SWIGINTERN void OGRFieldDefnShadow_SetPrecision(OGRFieldDefnShadow *self,int precision){
    OGR_Fld_SetPrecision(self, precision);
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetTypeName(OGRFieldDefnShadow *self){
      return OGR_GetFieldTypeName(OGR_Fld_GetType(self));
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetFieldTypeName(OGRFieldDefnShadow *self,OGRFieldType type){
    return OGR_GetFieldTypeName(type);
  }
SWIGINTERN int OGRFieldDefnShadow_IsIgnored(OGRFieldDefnShadow *self){
    return OGR_Fld_IsIgnored( self );
  }
SWIGINTERN void OGRFieldDefnShadow_SetIgnored(OGRFieldDefnShadow *self,int bIgnored){
    OGR_Fld_SetIgnored( self, bIgnored );
  }
SWIGINTERN int OGRFieldDefnShadow_IsNullable(OGRFieldDefnShadow *self){
    return OGR_Fld_IsNullable( self );
  }
SWIGINTERN void OGRFieldDefnShadow_SetNullable(OGRFieldDefnShadow *self,int bNullable){
    OGR_Fld_SetNullable( self, bNullable );
  }
SWIGINTERN char const *OGRFieldDefnShadow_GetDefault(OGRFieldDefnShadow *self){
    return OGR_Fld_GetDefault( self );
  }
SWIGINTERN void OGRFieldDefnShadow_SetDefault(OGRFieldDefnShadow *self,char const *pszValue){
    OGR_Fld_SetDefault( self, pszValue );
  }
SWIGINTERN int OGRFieldDefnShadow_IsDefaultDriverSpecific(OGRFieldDefnShadow *self){
    return OGR_Fld_IsDefaultDriverSpecific( self );
  }
SWIGINTERN void delete_OGRGeomFieldDefnShadow(OGRGeomFieldDefnShadow *self){
    OGR_GFld_Destroy(self);
  }
SWIGINTERN OGRGeomFieldDefnShadow *new_OGRGeomFieldDefnShadow(char const *name_null_ok="",OGRwkbGeometryType field_type=wkbUnknown){
    if( ValidateOGRGeometryType(field_type) )
        return (OGRGeomFieldDefnShadow*) OGR_GFld_Create(name_null_ok, field_type);
    else
        return NULL;
  }
SWIGINTERN char const *OGRGeomFieldDefnShadow_GetName(OGRGeomFieldDefnShadow *self){
    return (const char *) OGR_GFld_GetNameRef(self);
  }
SWIGINTERN char const *OGRGeomFieldDefnShadow_GetNameRef(OGRGeomFieldDefnShadow *self){
    return (const char *) OGR_GFld_GetNameRef(self);
  }
SWIGINTERN void OGRGeomFieldDefnShadow_SetName(OGRGeomFieldDefnShadow *self,char const *name){
    OGR_GFld_SetName(self, name);
  }
SWIGINTERN OGRwkbGeometryType OGRGeomFieldDefnShadow_GetType(OGRGeomFieldDefnShadow *self){
    return OGR_GFld_GetType(self);
  }
SWIGINTERN void OGRGeomFieldDefnShadow_SetType(OGRGeomFieldDefnShadow *self,OGRwkbGeometryType type){
    if( ValidateOGRGeometryType(type) )
        OGR_GFld_SetType(self, type);
  }
SWIGINTERN OSRSpatialReferenceShadow *OGRGeomFieldDefnShadow_GetSpatialRef(OGRGeomFieldDefnShadow *self){
    OGRSpatialReferenceH ref =  OGR_GFld_GetSpatialRef(self);
    if( ref )
        OSRReference(ref);
    return (OSRSpatialReferenceShadow*) ref;
  }
SWIGINTERN void OGRGeomFieldDefnShadow_SetSpatialRef(OGRGeomFieldDefnShadow *self,OSRSpatialReferenceShadow *srs){
     OGR_GFld_SetSpatialRef( self, (OGRSpatialReferenceH)srs );
  }
SWIGINTERN int OGRGeomFieldDefnShadow_IsIgnored(OGRGeomFieldDefnShadow *self){
    return OGR_GFld_IsIgnored( self );
  }
SWIGINTERN void OGRGeomFieldDefnShadow_SetIgnored(OGRGeomFieldDefnShadow *self,int bIgnored){
    OGR_GFld_SetIgnored( self, bIgnored );
  }
SWIGINTERN int OGRGeomFieldDefnShadow_IsNullable(OGRGeomFieldDefnShadow *self){
    return OGR_GFld_IsNullable( self );
  }
SWIGINTERN void OGRGeomFieldDefnShadow_SetNullable(OGRGeomFieldDefnShadow *self,int bNullable){
    return OGR_GFld_SetNullable( self, bNullable );
  }

  OGRGeometryShadow* CreateGeometryFromWkb( int len, char *bin_string,
                                            OSRSpatialReferenceShadow *reference=NULL ) {
    OGRGeometryH geom = NULL;
    OGRErr err = OGR_G_CreateFromWkb( (unsigned char *) bin_string,
                                      reference,
                                      &geom,
                                      len );
    if (err != 0 ) {
       CPLError(CE_Failure, err, "%s", OGRErrMessages(err));
       return NULL;
    }
    return (OGRGeometryShadow*) geom;
  }



  OGRGeometryShadow* CreateGeometryFromWkt( char **val,
                                      OSRSpatialReferenceShadow *reference=NULL ) {
    OGRGeometryH geom = NULL;
    OGRErr err = OGR_G_CreateFromWkt(val,
                                      reference,
                                      &geom);
    if (err != 0 ) {
       CPLError(CE_Failure, err, "%s", OGRErrMessages(err));
       return NULL;
    }
    return (OGRGeometryShadow*) geom;
  }



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



  OGRGeometryShadow *CreateGeometryFromJson( const char * input_string ) {
    OGRGeometryShadow* geom = (OGRGeometryShadow*)OGR_G_CreateGeometryFromJson(input_string);
    return geom;
  }



  OGRGeometryShadow* BuildPolygonFromEdges( OGRGeometryShadow*  hLineCollection,
                                            int bBestEffort = 0,
                                            int bAutoClose = 0,
                                            double dfTolerance=0) {

  OGRGeometryH hPolygon = NULL;

  OGRErr eErr;

  hPolygon = OGRBuildPolygonFromEdges( hLineCollection, bBestEffort,
                                       bAutoClose, dfTolerance, &eErr );

  if (eErr != OGRERR_NONE ) {
    CPLError(CE_Failure, eErr, "%s", OGRErrMessages(eErr));
    return NULL;
  }

  return (OGRGeometryShadow* )hPolygon;
  }


  OGRGeometryShadow* ApproximateArcAngles(
        double dfCenterX, double dfCenterY, double dfZ,
  	double dfPrimaryRadius, double dfSecondaryAxis, double dfRotation,
        double dfStartAngle, double dfEndAngle,
        double dfMaxAngleStepSizeDegrees ) {

  return (OGRGeometryShadow* )OGR_G_ApproximateArcAngles(
             dfCenterX, dfCenterY, dfZ,
             dfPrimaryRadius, dfSecondaryAxis, dfRotation,
             dfStartAngle, dfEndAngle, dfMaxAngleStepSizeDegrees );
  }


OGRGeometryShadow* ForceToPolygon( OGRGeometryShadow *geom_in ) {
 if (geom_in == NULL)
     return NULL;
 return (OGRGeometryShadow* )OGR_G_ForceToPolygon( OGR_G_Clone(geom_in) );
}


OGRGeometryShadow* ForceToLineString( OGRGeometryShadow *geom_in ) {
 if (geom_in == NULL)
     return NULL;
 return (OGRGeometryShadow* )OGR_G_ForceToLineString( OGR_G_Clone(geom_in) );
}


OGRGeometryShadow* ForceToMultiPolygon( OGRGeometryShadow *geom_in ) {
 if (geom_in == NULL)
     return NULL;
 return (OGRGeometryShadow* )OGR_G_ForceToMultiPolygon( OGR_G_Clone(geom_in) );
}


OGRGeometryShadow* ForceToMultiPoint( OGRGeometryShadow *geom_in ) {
 if (geom_in == NULL)
     return NULL;
 return (OGRGeometryShadow* )OGR_G_ForceToMultiPoint( OGR_G_Clone(geom_in) );
}


OGRGeometryShadow* ForceToMultiLineString( OGRGeometryShadow *geom_in ) {
 if (geom_in == NULL)
     return NULL;
 return (OGRGeometryShadow* )OGR_G_ForceToMultiLineString( OGR_G_Clone(geom_in) );
}


OGRGeometryShadow* ForceTo( OGRGeometryShadow *geom_in, OGRwkbGeometryType eTargetType, char** options = NULL ) {
 if (geom_in == NULL)
     return NULL;
 return (OGRGeometryShadow* )OGR_G_ForceTo( OGR_G_Clone(geom_in), eTargetType, options );
}

SWIGINTERN void delete_OGRGeometryShadow(OGRGeometryShadow *self){
    OGR_G_DestroyGeometry( self );
  }
SWIGINTERN OGRGeometryShadow *new_OGRGeometryShadow(OGRwkbGeometryType type=wkbUnknown,char *wkt=0,int wkb=0,char *wkb_buf=0,char *gml=0){
    if (type != wkbUnknown ) {
      return (OGRGeometryShadow*) OGR_G_CreateGeometry( type );
    }
    else if ( wkt != 0 ) {
      return CreateGeometryFromWkt( &wkt );
    }
    else if ( wkb != 0 ) {
      return CreateGeometryFromWkb( wkb, wkb_buf );
    }
    else if ( gml != 0 ) {
      return CreateGeometryFromGML( gml );
    }
    // throw?
    else {
        CPLError(CE_Failure, 1, "Empty geometries cannot be constructed");
        return NULL;}

  }
SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkt(OGRGeometryShadow *self,char **argout){
    return OGR_G_ExportToWkt(self, argout);
  }
SWIGINTERN OGRErr OGRGeometryShadow_ExportToIsoWkt(OGRGeometryShadow *self,char **argout){
    return OGR_G_ExportToIsoWkt(self, argout);
  }
SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToGML__SWIG_0(OGRGeometryShadow *self){
    return (retStringAndCPLFree*) OGR_G_ExportToGMLEx(self, NULL);
  }
SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToGML__SWIG_1(OGRGeometryShadow *self,char **options){
    return (retStringAndCPLFree*) OGR_G_ExportToGMLEx(self, options);
  }
SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToKML(OGRGeometryShadow *self,char const *altitude_mode=NULL){
    return (retStringAndCPLFree *) OGR_G_ExportToKML(self, altitude_mode);
  }
SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToJson(OGRGeometryShadow *self,char **options=0){
    return (retStringAndCPLFree *) OGR_G_ExportToJsonEx(self, options);
  }
SWIGINTERN void OGRGeometryShadow_AddPoint(OGRGeometryShadow *self,double x,double y,double z=0){
    OGR_G_AddPoint( self, x, y, z );
  }
SWIGINTERN void OGRGeometryShadow_AddPointM(OGRGeometryShadow *self,double x,double y,double m){
      OGR_G_AddPointM( self, x, y, m );
  }
SWIGINTERN void OGRGeometryShadow_AddPointZM(OGRGeometryShadow *self,double x,double y,double z,double m){
      OGR_G_AddPointZM( self, x, y, z, m );
  }
SWIGINTERN void OGRGeometryShadow_AddPoint_2D(OGRGeometryShadow *self,double x,double y){
    OGR_G_AddPoint_2D( self, x, y );
  }
SWIGINTERN OGRErr OGRGeometryShadow_AddGeometryDirectly(OGRGeometryShadow *self,OGRGeometryShadow *other_disown){
    return OGR_G_AddGeometryDirectly( self, other_disown );
  }
SWIGINTERN OGRErr OGRGeometryShadow_AddGeometry(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_AddGeometry( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Clone(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Clone(self);
  }
SWIGINTERN OGRwkbGeometryType OGRGeometryShadow_GetGeometryType(OGRGeometryShadow *self){
    return (OGRwkbGeometryType) OGR_G_GetGeometryType(self);
  }
SWIGINTERN char const *OGRGeometryShadow_GetGeometryName(OGRGeometryShadow *self){
    return (const char *) OGR_G_GetGeometryName(self);
  }
SWIGINTERN double OGRGeometryShadow_Length(OGRGeometryShadow *self){
    return OGR_G_Length(self);
  }
SWIGINTERN double OGRGeometryShadow_Area(OGRGeometryShadow *self){
    return OGR_G_Area(self);
  }
SWIGINTERN double OGRGeometryShadow_GetArea(OGRGeometryShadow *self){
    return OGR_G_Area(self);
  }
SWIGINTERN int OGRGeometryShadow_GetPointCount(OGRGeometryShadow *self){
    return OGR_G_GetPointCount(self);
  }
SWIGINTERN double OGRGeometryShadow_GetX(OGRGeometryShadow *self,int point=0){
    return OGR_G_GetX(self, point);
  }
SWIGINTERN double OGRGeometryShadow_GetY(OGRGeometryShadow *self,int point=0){
    return OGR_G_GetY(self, point);
  }
SWIGINTERN double OGRGeometryShadow_GetZ(OGRGeometryShadow *self,int point=0){
    return OGR_G_GetZ(self, point);
  }
SWIGINTERN double OGRGeometryShadow_GetM(OGRGeometryShadow *self,int point=0){
    return OGR_G_GetM(self, point);
  }
SWIGINTERN void OGRGeometryShadow_GetPoint(OGRGeometryShadow *self,int iPoint=0,double argout[3]=NULL){

    OGR_G_GetPoint( self, iPoint, argout+0, argout+1, argout+2 );
  }
SWIGINTERN void OGRGeometryShadow_GetPointZM(OGRGeometryShadow *self,int iPoint=0,double argout[4]=NULL){

      OGR_G_GetPointZM( self, iPoint, argout+0, argout+1, argout+2, argout+3 );
  }
SWIGINTERN void OGRGeometryShadow_GetPoint_2D(OGRGeometryShadow *self,int iPoint=0,double argout[2]=NULL){

    OGR_G_GetPoint( self, iPoint, argout+0, argout+1, NULL );
  }
SWIGINTERN int OGRGeometryShadow_GetGeometryCount(OGRGeometryShadow *self){
    return OGR_G_GetGeometryCount(self);
  }
SWIGINTERN void OGRGeometryShadow_SetPoint(OGRGeometryShadow *self,int point,double x,double y,double z=0){
    OGR_G_SetPoint(self, point, x, y, z);
  }
SWIGINTERN void OGRGeometryShadow_SetPointM(OGRGeometryShadow *self,int point,double x,double y,double m){
      OGR_G_SetPointM(self, point, x, y, m);
  }
SWIGINTERN void OGRGeometryShadow_SetPointZM(OGRGeometryShadow *self,int point,double x,double y,double z,double m){
      OGR_G_SetPointZM(self, point, x, y, z, m);
  }
SWIGINTERN void OGRGeometryShadow_SetPoint_2D(OGRGeometryShadow *self,int point,double x,double y){
    OGR_G_SetPoint_2D(self, point, x, y);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetGeometryRef(OGRGeometryShadow *self,int geom){
    return (OGRGeometryShadow*) OGR_G_GetGeometryRef(self, geom);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Simplify(OGRGeometryShadow *self,double tolerance){
    return (OGRGeometryShadow*) OGR_G_Simplify(self, tolerance);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SimplifyPreserveTopology(OGRGeometryShadow *self,double tolerance){
    return (OGRGeometryShadow*) OGR_G_SimplifyPreserveTopology(self, tolerance);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_DelaunayTriangulation(OGRGeometryShadow *self,double dfTolerance=0.0,int bOnlyEdges=FALSE){
    return (OGRGeometryShadow*) OGR_G_DelaunayTriangulation(self, dfTolerance, bOnlyEdges);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Boundary(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Boundary(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetBoundary(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_Boundary(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_ConvexHull(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_ConvexHull(self);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Buffer(OGRGeometryShadow *self,double distance,int quadsecs=30){
    return (OGRGeometryShadow*) OGR_G_Buffer( self, distance, quadsecs );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Intersection(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_Intersection( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Union(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_Union( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_UnionCascaded(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_UnionCascaded( self );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Difference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_Difference( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_SymmetricDifference(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGRGeometryShadow*) OGR_G_SymDifference( self, other );
  }
SWIGINTERN double OGRGeometryShadow_Distance(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_Distance(self, other);
  }
SWIGINTERN double OGRGeometryShadow_Distance3D(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return OGR_G_Distance3D(self, other);
  }
SWIGINTERN void OGRGeometryShadow_Empty(OGRGeometryShadow *self){
    OGR_G_Empty(self);
  }
SWIGINTERN bool OGRGeometryShadow_IsEmpty(OGRGeometryShadow *self){
    return (OGR_G_IsEmpty(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_IsValid(OGRGeometryShadow *self){
    return (OGR_G_IsValid(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_IsSimple(OGRGeometryShadow *self){
    return (OGR_G_IsSimple(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_IsRing(OGRGeometryShadow *self){
    return (OGR_G_IsRing(self) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Intersects(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Intersects(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Intersect(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Intersects(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Equals(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Equals(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Equal(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Equals(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Disjoint(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Disjoint(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Touches(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Touches(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Crosses(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Crosses(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Within(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Within(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Contains(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Contains(self, other) > 0);
  }
SWIGINTERN bool OGRGeometryShadow_Overlaps(OGRGeometryShadow *self,OGRGeometryShadow *other){
    return (OGR_G_Overlaps(self, other) > 0);
  }
SWIGINTERN OGRErr OGRGeometryShadow_TransformTo(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
    return OGR_G_TransformTo(self, reference);
  }
SWIGINTERN OGRErr OGRGeometryShadow_Transform(OGRGeometryShadow *self,OSRCoordinateTransformationShadow *trans){
    return OGR_G_Transform(self, trans);
  }
SWIGINTERN OSRSpatialReferenceShadow *OGRGeometryShadow_GetSpatialReference(OGRGeometryShadow *self){
    OGRSpatialReferenceH ref =  OGR_G_GetSpatialReference(self);
    if( ref )
        OSRReference(ref);
    return (OSRSpatialReferenceShadow*) ref;
  }
SWIGINTERN void OGRGeometryShadow_AssignSpatialReference(OGRGeometryShadow *self,OSRSpatialReferenceShadow *reference){
    OGR_G_AssignSpatialReference(self, reference);
  }
SWIGINTERN void OGRGeometryShadow_CloseRings(OGRGeometryShadow *self){
    OGR_G_CloseRings(self);
  }
SWIGINTERN void OGRGeometryShadow_FlattenTo2D(OGRGeometryShadow *self){
    OGR_G_FlattenTo2D(self);
  }
SWIGINTERN void OGRGeometryShadow_Segmentize(OGRGeometryShadow *self,double dfMaxLength){
    OGR_G_Segmentize(self, dfMaxLength);
  }
SWIGINTERN void OGRGeometryShadow_GetEnvelope(OGRGeometryShadow *self,OGREnvelope *env){
    OGR_G_GetEnvelope(self, env);
  }
SWIGINTERN void OGRGeometryShadow_GetEnvelope3D(OGRGeometryShadow *self,OGREnvelope3D *env){
    OGR_G_GetEnvelope3D(self, env);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Centroid(OGRGeometryShadow *self){
    OGRGeometryShadow *pt = (OGRGeometryShadow*) OGR_G_CreateGeometry( wkbPoint );
    OGR_G_Centroid( self, pt );
    return pt;
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_PointOnSurface(OGRGeometryShadow *self){
    return (OGRGeometryShadow*) OGR_G_PointOnSurface( self );
  }
SWIGINTERN int OGRGeometryShadow_WkbSize(OGRGeometryShadow *self){
    return OGR_G_WkbSize(self);
  }
SWIGINTERN int OGRGeometryShadow_GetCoordinateDimension(OGRGeometryShadow *self){
    return OGR_G_GetCoordinateDimension(self);
  }
SWIGINTERN int OGRGeometryShadow_CoordinateDimension(OGRGeometryShadow *self){
    return OGR_G_CoordinateDimension(self);
  }
SWIGINTERN int OGRGeometryShadow_Is3D(OGRGeometryShadow *self){
      return OGR_G_Is3D(self);
  }
SWIGINTERN int OGRGeometryShadow_IsMeasured(OGRGeometryShadow *self){
      return OGR_G_IsMeasured(self);
  }
SWIGINTERN void OGRGeometryShadow_SetCoordinateDimension(OGRGeometryShadow *self,int dimension){
    OGR_G_SetCoordinateDimension(self, dimension);
  }
SWIGINTERN void OGRGeometryShadow_Set3D(OGRGeometryShadow *self,int b3D){
      OGR_G_Set3D(self, b3D);
  }
SWIGINTERN void OGRGeometryShadow_SetMeasured(OGRGeometryShadow *self,int bMeasured){
      OGR_G_SetMeasured(self, bMeasured);
  }
SWIGINTERN int OGRGeometryShadow_GetDimension(OGRGeometryShadow *self){
    return OGR_G_GetDimension(self);
  }
SWIGINTERN int OGRGeometryShadow_HasCurveGeometry(OGRGeometryShadow *self,int bLookForCircular=FALSE){
        return OGR_G_HasCurveGeometry(self, bLookForCircular);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetLinearGeometry(OGRGeometryShadow *self,double dfMaxAngleStepSizeDegrees=0.0,char **options=NULL){
    return (OGRGeometryShadow* )OGR_G_GetLinearGeometry(self, dfMaxAngleStepSizeDegrees, options);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_GetCurveGeometry(OGRGeometryShadow *self,char **options=NULL){
    return (OGRGeometryShadow* )OGR_G_GetCurveGeometry(self, options);
  }
SWIGINTERN OGRGeometryShadow *OGRGeometryShadow_Value(OGRGeometryShadow *self,double dfDistance){
    return OGR_G_Value(self, dfDistance);
  }
SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkb(OGRGeometryShadow *self,int bufLen,char *buffer,OGRwkbByteOrder byte_order){
      if (bufLen < OGR_G_WkbSize( self ))
        CPLError(CE_Failure, 1, "Array size is small (ExportToWkb).");
      return OGR_G_ExportToWkb(self, byte_order, (unsigned char*) buffer );
    }

char const *OGRDriverShadow_get_name( OGRDriverShadow *h ) {
  return OGR_Dr_GetName( h );
}

char const *OGRDataSourceShadow_get_name( OGRDataSourceShadow *h ) {
  return OGR_DS_GetName( h );
}

char const *OGRDriverShadow_name_get( OGRDriverShadow *h ) {
  return OGR_Dr_GetName( h );
}

char const *OGRDataSourceShadow_name_get( OGRDataSourceShadow *h ) {
  return OGR_DS_GetName( h );
}


OGRwkbGeometryType GT_SetModifier( OGRwkbGeometryType eType, int bSetZ, int bSetM = FALSE)
{
    return OGR_GT_SetModifier(eType, bSetZ, bSetM);
}


  OGRDataSourceShadow* GetOpenDS(int ds_number) {
    OGRDataSourceShadow* layer = (OGRDataSourceShadow*) OGRGetOpenDS(ds_number);
    return layer;
  }


  OGRDataSourceShadow* Open( const char *utf8_path, int update =0 ) {
    CPLErrorReset();
    OGRDataSourceShadow* ds = (OGRDataSourceShadow*)OGROpen(utf8_path,update,NULL);
    if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
    {
        CPLDebug( "SWIG",
		  "OGROpen() succeeded, but an error is posted, so we destroy"
		  " the datasource and fail at swig level." );
        OGRReleaseDataSource(ds);
        ds = NULL;
    }

    return ds;
  }


  OGRDataSourceShadow* OpenShared( const char *utf8_path, int update =0 ) {
    CPLErrorReset();
    OGRDataSourceShadow* ds = (OGRDataSourceShadow*)OGROpenShared(utf8_path,update,NULL);
    if( CPLGetLastErrorType() == CE_Failure && ds != NULL )
    {
        OGRReleaseDataSource(ds);
        ds = NULL;
    }

    return ds;
  }


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

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


  char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
    int nResArgCount;

    if( papszArgv == NULL )
        return NULL;

    nResArgCount =
      OGRGeneralCmdLineProcessor( CSLCount(papszArgv), &papszArgv, nOptions );

    if( nResArgCount <= 0 )
        return NULL;
    else
        return papszArgv;
  }


#ifdef __cplusplus
extern "C" {
#endif

SWIGEXPORT int SWIGSTDCALL CSharp_wkb25DBit_get() {
  int jresult ;
  int result;
  
  result = (int)(0x80000000);
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_ogrZMarker_get() {
  int jresult ;
  int result;
  
  result = (int)(0x21125711);
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_OGRNullFID_get() {
  int jresult ;
  int result;
  
  result = (int)(-1);
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_OGRUnsetMarker_get() {
  int jresult ;
  int result;
  
  result = (int)(-21121);
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLCRandomRead_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("RandomRead");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLCSequentialWrite_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("SequentialWrite");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLCRandomWrite_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("RandomWrite");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLCFastSpatialFilter_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("FastSpatialFilter");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLCFastFeatureCount_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("FastFeatureCount");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLCFastGetExtent_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("FastGetExtent");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLCCreateField_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("CreateField");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLCDeleteField_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("DeleteField");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLCReorderFields_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("ReorderFields");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLCAlterFieldDefn_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("AlterFieldDefn");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLCTransactions_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("Transactions");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLCDeleteFeature_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("DeleteFeature");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLCFastSetNextByIndex_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("FastSetNextByIndex");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLCStringsAsUTF8_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("StringsAsUTF8");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLCCreateGeomField_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("CreateGeomField");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLCCurveGeometries_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("CurveGeometries");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLCMeasuredGeometries_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("MeasuredGeometries");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ODsCCreateLayer_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("CreateLayer");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ODsCDeleteLayer_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("DeleteLayer");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ODsCCreateGeomFieldAfterCreateLayer_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("CreateGeomFieldAfterCreateLayer");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ODsCCurveGeometries_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("CurveGeometries");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ODsCTransactions_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("Transactions");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ODsCEmulatedTransactions_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("EmulatedTransactions");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ODsCMeasuredGeometries_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("MeasuredGeometries");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ODsCRandomLayerRead_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("RandomLayerRead");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ODsCRandomLayerWrite_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("RandomLayerWrite");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ODrCCreateDataSource_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("CreateDataSource");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ODrCDeleteDataSource_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("DeleteDataSource");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_OLMD_FID64_get() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)("OLMD_FID64");
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


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


SWIGEXPORT int SWIGSTDCALL CSharp_OGRERR_NOT_ENOUGH_DATA_get() {
  int jresult ;
  int result;
  
  result = (int)(1);
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_OGRERR_NOT_ENOUGH_MEMORY_get() {
  int jresult ;
  int result;
  
  result = (int)(2);
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_OGRERR_UNSUPPORTED_GEOMETRY_TYPE_get() {
  int jresult ;
  int result;
  
  result = (int)(3);
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_OGRERR_UNSUPPORTED_OPERATION_get() {
  int jresult ;
  int result;
  
  result = (int)(4);
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_OGRERR_CORRUPT_DATA_get() {
  int jresult ;
  int result;
  
  result = (int)(5);
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_OGRERR_FAILURE_get() {
  int jresult ;
  int result;
  
  result = (int)(6);
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_OGRERR_UNSUPPORTED_SRS_get() {
  int jresult ;
  int result;
  
  result = (int)(7);
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_OGRERR_INVALID_HANDLE_get() {
  int jresult ;
  int result;
  
  result = (int)(8);
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_OGRERR_NON_EXISTING_FEATURE_get() {
  int jresult ;
  int result;
  
  result = (int)(9);
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_UseExceptions() {
  UseExceptions();
}


SWIGEXPORT void SWIGSTDCALL CSharp_DontUseExceptions() {
  DontUseExceptions();
}


SWIGEXPORT void SWIGSTDCALL CSharp_StringListDestroy(void * jarg1) {
  void *arg1 = (void *) 0 ;
  
  arg1 = (void *)jarg1; 
  {
    CPLErrorReset();
    StringListDestroy(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Envelope_MinX_set(void * jarg1, double jarg2) {
  OGREnvelope *arg1 = (OGREnvelope *) 0 ;
  double arg2 ;
  
  arg1 = (OGREnvelope *)jarg1; 
  arg2 = (double)jarg2; 
  if (arg1) (arg1)->MinX = arg2;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Envelope_MinX_get(void * jarg1) {
  double jresult ;
  OGREnvelope *arg1 = (OGREnvelope *) 0 ;
  double result;
  
  arg1 = (OGREnvelope *)jarg1; 
  result = (double) ((arg1)->MinX);
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Envelope_MaxX_set(void * jarg1, double jarg2) {
  OGREnvelope *arg1 = (OGREnvelope *) 0 ;
  double arg2 ;
  
  arg1 = (OGREnvelope *)jarg1; 
  arg2 = (double)jarg2; 
  if (arg1) (arg1)->MaxX = arg2;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Envelope_MaxX_get(void * jarg1) {
  double jresult ;
  OGREnvelope *arg1 = (OGREnvelope *) 0 ;
  double result;
  
  arg1 = (OGREnvelope *)jarg1; 
  result = (double) ((arg1)->MaxX);
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Envelope_MinY_set(void * jarg1, double jarg2) {
  OGREnvelope *arg1 = (OGREnvelope *) 0 ;
  double arg2 ;
  
  arg1 = (OGREnvelope *)jarg1; 
  arg2 = (double)jarg2; 
  if (arg1) (arg1)->MinY = arg2;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Envelope_MinY_get(void * jarg1) {
  double jresult ;
  OGREnvelope *arg1 = (OGREnvelope *) 0 ;
  double result;
  
  arg1 = (OGREnvelope *)jarg1; 
  result = (double) ((arg1)->MinY);
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Envelope_MaxY_set(void * jarg1, double jarg2) {
  OGREnvelope *arg1 = (OGREnvelope *) 0 ;
  double arg2 ;
  
  arg1 = (OGREnvelope *)jarg1; 
  arg2 = (double)jarg2; 
  if (arg1) (arg1)->MaxY = arg2;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Envelope_MaxY_get(void * jarg1) {
  double jresult ;
  OGREnvelope *arg1 = (OGREnvelope *) 0 ;
  double result;
  
  arg1 = (OGREnvelope *)jarg1; 
  result = (double) ((arg1)->MaxY);
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Envelope() {
  void * jresult ;
  OGREnvelope *result = 0 ;
  
  {
    CPLErrorReset();
    result = (OGREnvelope *)new OGREnvelope();
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_Envelope(void * jarg1) {
  OGREnvelope *arg1 = (OGREnvelope *) 0 ;
  
  arg1 = (OGREnvelope *)jarg1; 
  {
    CPLErrorReset();
    delete arg1;
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Envelope3D_MinX_set(void * jarg1, double jarg2) {
  OGREnvelope3D *arg1 = (OGREnvelope3D *) 0 ;
  double arg2 ;
  
  arg1 = (OGREnvelope3D *)jarg1; 
  arg2 = (double)jarg2; 
  if (arg1) (arg1)->MinX = arg2;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Envelope3D_MinX_get(void * jarg1) {
  double jresult ;
  OGREnvelope3D *arg1 = (OGREnvelope3D *) 0 ;
  double result;
  
  arg1 = (OGREnvelope3D *)jarg1; 
  result = (double) ((arg1)->MinX);
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Envelope3D_MaxX_set(void * jarg1, double jarg2) {
  OGREnvelope3D *arg1 = (OGREnvelope3D *) 0 ;
  double arg2 ;
  
  arg1 = (OGREnvelope3D *)jarg1; 
  arg2 = (double)jarg2; 
  if (arg1) (arg1)->MaxX = arg2;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Envelope3D_MaxX_get(void * jarg1) {
  double jresult ;
  OGREnvelope3D *arg1 = (OGREnvelope3D *) 0 ;
  double result;
  
  arg1 = (OGREnvelope3D *)jarg1; 
  result = (double) ((arg1)->MaxX);
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Envelope3D_MinY_set(void * jarg1, double jarg2) {
  OGREnvelope3D *arg1 = (OGREnvelope3D *) 0 ;
  double arg2 ;
  
  arg1 = (OGREnvelope3D *)jarg1; 
  arg2 = (double)jarg2; 
  if (arg1) (arg1)->MinY = arg2;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Envelope3D_MinY_get(void * jarg1) {
  double jresult ;
  OGREnvelope3D *arg1 = (OGREnvelope3D *) 0 ;
  double result;
  
  arg1 = (OGREnvelope3D *)jarg1; 
  result = (double) ((arg1)->MinY);
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Envelope3D_MaxY_set(void * jarg1, double jarg2) {
  OGREnvelope3D *arg1 = (OGREnvelope3D *) 0 ;
  double arg2 ;
  
  arg1 = (OGREnvelope3D *)jarg1; 
  arg2 = (double)jarg2; 
  if (arg1) (arg1)->MaxY = arg2;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Envelope3D_MaxY_get(void * jarg1) {
  double jresult ;
  OGREnvelope3D *arg1 = (OGREnvelope3D *) 0 ;
  double result;
  
  arg1 = (OGREnvelope3D *)jarg1; 
  result = (double) ((arg1)->MaxY);
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Envelope3D_MinZ_set(void * jarg1, double jarg2) {
  OGREnvelope3D *arg1 = (OGREnvelope3D *) 0 ;
  double arg2 ;
  
  arg1 = (OGREnvelope3D *)jarg1; 
  arg2 = (double)jarg2; 
  if (arg1) (arg1)->MinZ = arg2;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Envelope3D_MinZ_get(void * jarg1) {
  double jresult ;
  OGREnvelope3D *arg1 = (OGREnvelope3D *) 0 ;
  double result;
  
  arg1 = (OGREnvelope3D *)jarg1; 
  result = (double) ((arg1)->MinZ);
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Envelope3D_MaxZ_set(void * jarg1, double jarg2) {
  OGREnvelope3D *arg1 = (OGREnvelope3D *) 0 ;
  double arg2 ;
  
  arg1 = (OGREnvelope3D *)jarg1; 
  arg2 = (double)jarg2; 
  if (arg1) (arg1)->MaxZ = arg2;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Envelope3D_MaxZ_get(void * jarg1) {
  double jresult ;
  OGREnvelope3D *arg1 = (OGREnvelope3D *) 0 ;
  double result;
  
  arg1 = (OGREnvelope3D *)jarg1; 
  result = (double) ((arg1)->MaxZ);
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Envelope3D() {
  void * jresult ;
  OGREnvelope3D *result = 0 ;
  
  {
    CPLErrorReset();
    result = (OGREnvelope3D *)new OGREnvelope3D();
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_Envelope3D(void * jarg1) {
  OGREnvelope3D *arg1 = (OGREnvelope3D *) 0 ;
  
  arg1 = (OGREnvelope3D *)jarg1; 
  {
    CPLErrorReset();
    delete arg1;
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_StyleTable() {
  void * jresult ;
  OGRStyleTableShadow *result = 0 ;
  
  {
    CPLErrorReset();
    result = (OGRStyleTableShadow *)new_OGRStyleTableShadow();
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_StyleTable(void * jarg1) {
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  
  arg1 = (OGRStyleTableShadow *)jarg1; 
  {
    CPLErrorReset();
    delete_OGRStyleTableShadow(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_StyleTable_AddStyle(void * jarg1, char * jarg2, char * jarg3) {
  int jresult ;
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  int result;
  
  arg1 = (OGRStyleTableShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  arg3 = (char *)jarg3; 
  {
    CPLErrorReset();
    result = (int)OGRStyleTableShadow_AddStyle(arg1,(char const *)arg2,(char const *)arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_StyleTable_LoadStyleTable(void * jarg1, char * jarg2) {
  int jresult ;
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int result;
  
  arg1 = (OGRStyleTableShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (int)OGRStyleTableShadow_LoadStyleTable(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_StyleTable_SaveStyleTable(void * jarg1, char * jarg2) {
  int jresult ;
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int result;
  
  arg1 = (OGRStyleTableShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (int)OGRStyleTableShadow_SaveStyleTable(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_StyleTable_Find(void * jarg1, char * jarg2) {
  char * jresult ;
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRStyleTableShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (char *)OGRStyleTableShadow_Find(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_StyleTable_ResetStyleStringReading(void * jarg1) {
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  
  arg1 = (OGRStyleTableShadow *)jarg1; 
  {
    CPLErrorReset();
    OGRStyleTableShadow_ResetStyleStringReading(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_StyleTable_GetNextStyle(void * jarg1) {
  char * jresult ;
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRStyleTableShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRStyleTableShadow_GetNextStyle(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_StyleTable_GetLastStyleName(void * jarg1) {
  char * jresult ;
  OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRStyleTableShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRStyleTableShadow_GetLastStyleName(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Driver_name_get(void * jarg1) {
  char * jresult ;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRDriverShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRDriverShadow_name_get(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Driver_CreateDataSource(void * jarg1, char * jarg2, void * jarg3) {
  void * jresult ;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char **arg3 = (char **) 0 ;
  OGRDataSourceShadow *result = 0 ;
  
  arg1 = (OGRDriverShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  arg3 = (char **)jarg3; 
  {
    CPLErrorReset();
    result = (OGRDataSourceShadow *)OGRDriverShadow_CreateDataSource(arg1,(char const *)arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Driver_CopyDataSource(void * jarg1, void * jarg2, char * jarg3, void * jarg4) {
  void * jresult ;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  OGRDataSourceShadow *arg2 = (OGRDataSourceShadow *) 0 ;
  char *arg3 = (char *) 0 ;
  char **arg4 = (char **) 0 ;
  OGRDataSourceShadow *result = 0 ;
  
  arg1 = (OGRDriverShadow *)jarg1; 
  arg2 = (OGRDataSourceShadow *)jarg2; 
  arg3 = (char *)jarg3; 
  arg4 = (char **)jarg4; 
  {
    CPLErrorReset();
    result = (OGRDataSourceShadow *)OGRDriverShadow_CopyDataSource(arg1,arg2,(char const *)arg3,arg4);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Driver_Open(void * jarg1, char * jarg2, int jarg3) {
  void * jresult ;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 = (int) 0 ;
  OGRDataSourceShadow *result = 0 ;
  
  arg1 = (OGRDriverShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  arg3 = (int)jarg3; 
  {
    CPLErrorReset();
    result = (OGRDataSourceShadow *)OGRDriverShadow_Open(arg1,(char const *)arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Driver_DeleteDataSource(void * jarg1, char * jarg2) {
  int jresult ;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int result;
  
  arg1 = (OGRDriverShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (int)OGRDriverShadow_DeleteDataSource(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Driver_TestCapability(void * jarg1, char * jarg2) {
  unsigned int jresult ;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  bool result;
  
  arg1 = (OGRDriverShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (bool)OGRDriverShadow_TestCapability(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Driver_GetName(void * jarg1) {
  char * jresult ;
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRDriverShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRDriverShadow_GetName(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Driver_Register(void * jarg1) {
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  
  arg1 = (OGRDriverShadow *)jarg1; 
  {
    CPLErrorReset();
    OGRDriverShadow_Register(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Driver_Deregister(void * jarg1) {
  OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
  
  arg1 = (OGRDriverShadow *)jarg1; 
  {
    CPLErrorReset();
    OGRDriverShadow_Deregister(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_DataSource_name_get(void * jarg1) {
  char * jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRDataSourceShadow_name_get(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_DataSource(void * jarg1) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  {
    CPLErrorReset();
    delete_OGRDataSourceShadow(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_DataSource_GetRefCount(void * jarg1) {
  int jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  int result;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRDataSourceShadow_GetRefCount(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_DataSource_GetSummaryRefCount(void * jarg1) {
  int jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  int result;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRDataSourceShadow_GetSummaryRefCount(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_DataSource_GetLayerCount(void * jarg1) {
  int jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  int result;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRDataSourceShadow_GetLayerCount(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_DataSource_GetDriver(void * jarg1) {
  void * jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  OGRDriverShadow *result = 0 ;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRDriverShadow *)OGRDataSourceShadow_GetDriver(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_DataSource_GetName(void * jarg1) {
  char * jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRDataSourceShadow_GetName(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_DataSource_DeleteLayer(void * jarg1, int jarg2) {
  int jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  int arg2 ;
  OGRErr result;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRDataSourceShadow_DeleteLayer(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_DataSource_SyncToDisk(void * jarg1) {
  int jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRDataSourceShadow_SyncToDisk(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_DataSource_FlushCache(void * jarg1) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  {
    CPLErrorReset();
    OGRDataSourceShadow_FlushCache(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_DataSource_CreateLayer(void * jarg1, char * jarg2, void * jarg3, int jarg4, void * jarg5) {
  void * jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
  OGRwkbGeometryType arg4 = (OGRwkbGeometryType) wkbUnknown ;
  char **arg5 = (char **) 0 ;
  OGRLayerShadow *result = 0 ;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  arg3 = (OSRSpatialReferenceShadow *)jarg3; 
  arg4 = (OGRwkbGeometryType)jarg4; 
  arg5 = (char **)jarg5; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRLayerShadow *)OGRDataSourceShadow_CreateLayer(arg1,(char const *)arg2,arg3,arg4,arg5);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_DataSource_CopyLayer(void * jarg1, void * jarg2, char * jarg3, void * jarg4) {
  void * jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  char *arg3 = (char *) 0 ;
  char **arg4 = (char **) 0 ;
  OGRLayerShadow *result = 0 ;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  arg2 = (OGRLayerShadow *)jarg2; 
  arg3 = (char *)jarg3; 
  arg4 = (char **)jarg4; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRLayerShadow *)OGRDataSourceShadow_CopyLayer(arg1,arg2,(char const *)arg3,arg4);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_DataSource_GetLayerByIndex(void * jarg1, int jarg2) {
  void * jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  int arg2 = (int) 0 ;
  OGRLayerShadow *result = 0 ;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (OGRLayerShadow *)OGRDataSourceShadow_GetLayerByIndex(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_DataSource_GetLayerByName(void * jarg1, char * jarg2) {
  void * jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRLayerShadow *result = 0 ;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (OGRLayerShadow *)OGRDataSourceShadow_GetLayerByName(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_DataSource_TestCapability(void * jarg1, char * jarg2) {
  unsigned int jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  bool result;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (bool)OGRDataSourceShadow_TestCapability(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_DataSource_ExecuteSQL(void * jarg1, char * jarg2, void * jarg3, char * jarg4) {
  void * jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRGeometryShadow *arg3 = (OGRGeometryShadow *) NULL ;
  char *arg4 = (char *) "" ;
  OGRLayerShadow *result = 0 ;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  arg3 = (OGRGeometryShadow *)jarg3; 
  arg4 = (char *)jarg4; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRLayerShadow *)OGRDataSourceShadow_ExecuteSQL(arg1,(char const *)arg2,arg3,(char const *)arg4);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_DataSource_ReleaseResultSet(void * jarg1, void * jarg2) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  arg2 = (OGRLayerShadow *)jarg2; 
  {
    CPLErrorReset();
    OGRDataSourceShadow_ReleaseResultSet(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_DataSource_GetStyleTable(void * jarg1) {
  void * jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  OGRStyleTableShadow *result = 0 ;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRStyleTableShadow *)OGRDataSourceShadow_GetStyleTable(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_DataSource_SetStyleTable(void * jarg1, void * jarg2) {
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  OGRStyleTableShadow *arg2 = (OGRStyleTableShadow *) 0 ;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  arg2 = (OGRStyleTableShadow *)jarg2; 
  {
    CPLErrorReset();
    OGRDataSourceShadow_SetStyleTable(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_DataSource_StartTransaction(void * jarg1, int jarg2) {
  int jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  int arg2 = (int) FALSE ;
  OGRErr result;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRDataSourceShadow_StartTransaction(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_DataSource_CommitTransaction(void * jarg1) {
  int jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRDataSourceShadow_CommitTransaction(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_DataSource_RollbackTransaction(void * jarg1) {
  int jresult ;
  OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRDataSourceShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRDataSourceShadow_RollbackTransaction(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_GetRefCount(void * jarg1) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRLayerShadow_GetRefCount(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Layer_SetSpatialFilter__SWIG_0(void * jarg1, void * jarg2) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    CPLErrorReset();
    OGRLayerShadow_SetSpatialFilter__SWIG_0(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Layer_SetSpatialFilterRect__SWIG_0(void * jarg1, double jarg2, double jarg3, double jarg4, double jarg5) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (double)jarg2; 
  arg3 = (double)jarg3; 
  arg4 = (double)jarg4; 
  arg5 = (double)jarg5; 
  {
    CPLErrorReset();
    OGRLayerShadow_SetSpatialFilterRect__SWIG_0(arg1,arg2,arg3,arg4,arg5);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Layer_SetSpatialFilter__SWIG_1(void * jarg1, int jarg2, void * jarg3) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 ;
  OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (OGRGeometryShadow *)jarg3; 
  {
    CPLErrorReset();
    OGRLayerShadow_SetSpatialFilter__SWIG_1(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Layer_SetSpatialFilterRect__SWIG_1(void * jarg1, int jarg2, double jarg3, double jarg4, double jarg5, double jarg6) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (double)jarg3; 
  arg4 = (double)jarg4; 
  arg5 = (double)jarg5; 
  arg6 = (double)jarg6; 
  {
    CPLErrorReset();
    OGRLayerShadow_SetSpatialFilterRect__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Layer_GetSpatialFilter(void * jarg1) {
  void * jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRLayerShadow_GetSpatialFilter(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_SetAttributeFilter(void * jarg1, char * jarg2) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_SetAttributeFilter(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Layer_ResetReading(void * jarg1) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  {
    CPLErrorReset();
    OGRLayerShadow_ResetReading(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Layer_GetName(void * jarg1) {
  char * jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRLayerShadow_GetName(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_GetGeomType(void * jarg1) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRwkbGeometryType result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRwkbGeometryType)OGRLayerShadow_GetGeomType(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Layer_GetGeometryColumn(void * jarg1) {
  char * jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRLayerShadow_GetGeometryColumn(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Layer_GetFIDColumn(void * jarg1) {
  char * jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRLayerShadow_GetFIDColumn(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Layer_GetFeature(void * jarg1, GIntBig jarg2) {
  void * jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  GIntBig arg2 ;
  OGRFeatureShadow *result = 0 ;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = jarg2; 
  {
    CPLErrorReset();
    result = (OGRFeatureShadow *)OGRLayerShadow_GetFeature(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Layer_GetNextFeature(void * jarg1) {
  void * jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRFeatureShadow *result = 0 ;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRFeatureShadow *)OGRLayerShadow_GetNextFeature(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_SetNextByIndex(void * jarg1, GIntBig jarg2) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  GIntBig arg2 ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = jarg2; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_SetNextByIndex(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_SetFeature(void * jarg1, void * jarg2) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (OGRFeatureShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_SetFeature(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_CreateFeature(void * jarg1, void * jarg2) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (OGRFeatureShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_CreateFeature(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_DeleteFeature(void * jarg1, GIntBig jarg2) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  GIntBig arg2 ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = jarg2; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_DeleteFeature(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_SyncToDisk(void * jarg1) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_SyncToDisk(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Layer_GetLayerDefn(void * jarg1) {
  void * jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRFeatureDefnShadow *result = 0 ;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRFeatureDefnShadow *)OGRLayerShadow_GetLayerDefn(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT GIntBig SWIGSTDCALL CSharp_Layer_GetFeatureCount(void * jarg1, int jarg2) {
  GIntBig jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 = (int) 1 ;
  GIntBig result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = OGRLayerShadow_GetFeatureCount(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_GetExtent(void * jarg1, void * jarg2, int jarg3) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGREnvelope *arg2 = (OGREnvelope *) 0 ;
  int arg3 = (int) 1 ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (OGREnvelope *)jarg2; 
  arg3 = (int)jarg3; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_GetExtent(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Layer_TestCapability(void * jarg1, char * jarg2) {
  unsigned int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  bool result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (bool)OGRLayerShadow_TestCapability(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_CreateField(void * jarg1, void * jarg2, int jarg3) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
  int arg3 = (int) 1 ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (OGRFieldDefnShadow *)jarg2; 
  arg3 = (int)jarg3; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_CreateField(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_DeleteField(void * jarg1, int jarg2) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_DeleteField(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_ReorderField(void * jarg1, int jarg2, int jarg3) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (int)jarg3; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_ReorderField(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_ReorderFields(void * jarg1, int jarg2, void * jarg3) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 ;
  int *arg3 = (int *) 0 ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    /* %typemap(in) (int inout[ANY]) */
    arg3 = (int *)jarg3;
  }
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_ReorderFields(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_AlterFieldDefn(void * jarg1, int jarg2, void * jarg3, int jarg4) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  int arg2 ;
  OGRFieldDefnShadow *arg3 = (OGRFieldDefnShadow *) 0 ;
  int arg4 ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (OGRFieldDefnShadow *)jarg3; 
  arg4 = (int)jarg4; 
  {
    if (!arg3) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_AlterFieldDefn(arg1,arg2,arg3,arg4);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_CreateGeomField(void * jarg1, void * jarg2, int jarg3) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRGeomFieldDefnShadow *arg2 = (OGRGeomFieldDefnShadow *) 0 ;
  int arg3 = (int) 1 ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (OGRGeomFieldDefnShadow *)jarg2; 
  arg3 = (int)jarg3; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_CreateGeomField(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_StartTransaction(void * jarg1) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_StartTransaction(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_CommitTransaction(void * jarg1) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_CommitTransaction(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_RollbackTransaction(void * jarg1) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_RollbackTransaction(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_FindFieldIndex(void * jarg1, char * jarg2, int jarg3) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  int result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  arg3 = (int)jarg3; 
  {
    CPLErrorReset();
    result = (int)OGRLayerShadow_FindFieldIndex(arg1,(char const *)arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Layer_GetSpatialRef(void * jarg1) {
  void * jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OSRSpatialReferenceShadow *result = 0 ;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OSRSpatialReferenceShadow *)OGRLayerShadow_GetSpatialRef(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT GIntBig SWIGSTDCALL CSharp_Layer_GetFeaturesRead(void * jarg1) {
  GIntBig jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  GIntBig result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  {
    CPLErrorReset();
    result = OGRLayerShadow_GetFeaturesRead(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_SetIgnoredFields(void * jarg1, void * jarg2) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (char **)jarg2; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_SetIgnoredFields(arg1,(char const **)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_Intersection(void * jarg1, void * jarg2, void * jarg3, void * jarg4, void * jarg5, void * jarg6) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (OGRLayerShadow *)jarg2; 
  arg3 = (OGRLayerShadow *)jarg3; 
  arg4 = (char **)jarg4; 
  arg5 = (GDALProgressFunc)jarg5; 
  arg6 = (void *)jarg6; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_Intersection(arg1,arg2,arg3,arg4,arg5,arg6);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_Union(void * jarg1, void * jarg2, void * jarg3, void * jarg4, void * jarg5, void * jarg6) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (OGRLayerShadow *)jarg2; 
  arg3 = (OGRLayerShadow *)jarg3; 
  arg4 = (char **)jarg4; 
  arg5 = (GDALProgressFunc)jarg5; 
  arg6 = (void *)jarg6; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_Union(arg1,arg2,arg3,arg4,arg5,arg6);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_SymDifference(void * jarg1, void * jarg2, void * jarg3, void * jarg4, void * jarg5, void * jarg6) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (OGRLayerShadow *)jarg2; 
  arg3 = (OGRLayerShadow *)jarg3; 
  arg4 = (char **)jarg4; 
  arg5 = (GDALProgressFunc)jarg5; 
  arg6 = (void *)jarg6; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_SymDifference(arg1,arg2,arg3,arg4,arg5,arg6);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_Identity(void * jarg1, void * jarg2, void * jarg3, void * jarg4, void * jarg5, void * jarg6) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (OGRLayerShadow *)jarg2; 
  arg3 = (OGRLayerShadow *)jarg3; 
  arg4 = (char **)jarg4; 
  arg5 = (GDALProgressFunc)jarg5; 
  arg6 = (void *)jarg6; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_Identity(arg1,arg2,arg3,arg4,arg5,arg6);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_Update(void * jarg1, void * jarg2, void * jarg3, void * jarg4, void * jarg5, void * jarg6) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (OGRLayerShadow *)jarg2; 
  arg3 = (OGRLayerShadow *)jarg3; 
  arg4 = (char **)jarg4; 
  arg5 = (GDALProgressFunc)jarg5; 
  arg6 = (void *)jarg6; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_Update(arg1,arg2,arg3,arg4,arg5,arg6);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_Clip(void * jarg1, void * jarg2, void * jarg3, void * jarg4, void * jarg5, void * jarg6) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (OGRLayerShadow *)jarg2; 
  arg3 = (OGRLayerShadow *)jarg3; 
  arg4 = (char **)jarg4; 
  arg5 = (GDALProgressFunc)jarg5; 
  arg6 = (void *)jarg6; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_Clip(arg1,arg2,arg3,arg4,arg5,arg6);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Layer_Erase(void * jarg1, void * jarg2, void * jarg3, void * jarg4, void * jarg5, void * jarg6) {
  int jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
  OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
  char **arg4 = (char **) NULL ;
  GDALProgressFunc arg5 = (GDALProgressFunc) NULL ;
  void *arg6 = (void *) NULL ;
  OGRErr result;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (OGRLayerShadow *)jarg2; 
  arg3 = (OGRLayerShadow *)jarg3; 
  arg4 = (char **)jarg4; 
  arg5 = (GDALProgressFunc)jarg5; 
  arg6 = (void *)jarg6; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRLayerShadow_Erase(arg1,arg2,arg3,arg4,arg5,arg6);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Layer_GetStyleTable(void * jarg1) {
  void * jresult ;
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRStyleTableShadow *result = 0 ;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRStyleTableShadow *)OGRLayerShadow_GetStyleTable(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Layer_SetStyleTable(void * jarg1, void * jarg2) {
  OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
  OGRStyleTableShadow *arg2 = (OGRStyleTableShadow *) 0 ;
  
  arg1 = (OGRLayerShadow *)jarg1; 
  arg2 = (OGRStyleTableShadow *)jarg2; 
  {
    CPLErrorReset();
    OGRLayerShadow_SetStyleTable(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_Feature(void * jarg1) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  {
    CPLErrorReset();
    delete_OGRFeatureShadow(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Feature(void * jarg1) {
  void * jresult ;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  OGRFeatureShadow *result = 0 ;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  {
    if (!arg1) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRFeatureShadow *)new_OGRFeatureShadow(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Feature_GetDefnRef(void * jarg1) {
  void * jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRFeatureDefnShadow *result = 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRFeatureDefnShadow *)OGRFeatureShadow_GetDefnRef(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_SetGeometry(void * jarg1, void * jarg2) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRFeatureShadow_SetGeometry(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_SetGeometryDirectly(void * jarg1, void * jarg2) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRFeatureShadow_SetGeometryDirectly(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Feature_GetGeometryRef(void * jarg1) {
  void * jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeometryRef(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_SetGeomField__SWIG_0(void * jarg1, int jarg2, void * jarg3) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (OGRGeometryShadow *)jarg3; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRFeatureShadow_SetGeomField__SWIG_0(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_SetGeomField__SWIG_1(void * jarg1, char * jarg2, void * jarg3) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  arg3 = (OGRGeometryShadow *)jarg3; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRFeatureShadow_SetGeomField__SWIG_1(arg1,(char const *)arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_SetGeomFieldDirectly__SWIG_0(void * jarg1, int jarg2, void * jarg3) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (OGRGeometryShadow *)jarg3; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRFeatureShadow_SetGeomFieldDirectly__SWIG_0(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_SetGeomFieldDirectly__SWIG_1(void * jarg1, char * jarg2, void * jarg3) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  arg3 = (OGRGeometryShadow *)jarg3; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRFeatureShadow_SetGeomFieldDirectly__SWIG_1(arg1,(char const *)arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Feature_GetGeomFieldRef__SWIG_0(void * jarg1, int jarg2) {
  void * jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeomFieldRef__SWIG_0(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Feature_GetGeomFieldRef__SWIG_1(void * jarg1, char * jarg2) {
  void * jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeomFieldRef__SWIG_1(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Feature_Clone(void * jarg1) {
  void * jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRFeatureShadow *result = 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRFeatureShadow *)OGRFeatureShadow_Clone(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Feature_Equal(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
  bool result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (OGRFeatureShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (bool)OGRFeatureShadow_Equal(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_GetFieldCount(void * jarg1) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRFeatureShadow_GetFieldCount(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Feature_GetFieldDefnRef__SWIG_0(void * jarg1, int jarg2) {
  void * jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  OGRFieldDefnShadow *result = 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_0(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Feature_GetFieldDefnRef__SWIG_1(void * jarg1, char * jarg2) {
  void * jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRFieldDefnShadow *result = 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_GetGeomFieldCount(void * jarg1) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRFeatureShadow_GetGeomFieldCount(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Feature_GetGeomFieldDefnRef__SWIG_0(void * jarg1, int jarg2) {
  void * jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  OGRGeomFieldDefnShadow *result = 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (OGRGeomFieldDefnShadow *)OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_0(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Feature_GetGeomFieldDefnRef__SWIG_1(void * jarg1, char * jarg2) {
  void * jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRGeomFieldDefnShadow *result = 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (OGRGeomFieldDefnShadow *)OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Feature_GetFieldAsString__SWIG_0(void * jarg1, int jarg2) {
  char * jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  char *result = 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_0(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Feature_GetFieldAsString__SWIG_1(void * jarg1, char * jarg2) {
  char * jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_1(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_GetFieldAsInteger__SWIG_0(void * jarg1, int jarg2) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_0(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_GetFieldAsInteger__SWIG_1(void * jarg1, char * jarg2) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_1(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT GIntBig SWIGSTDCALL CSharp_Feature_GetFieldAsInteger64__SWIG_0(void * jarg1, int jarg2) {
  GIntBig jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  GIntBig result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = OGRFeatureShadow_GetFieldAsInteger64__SWIG_0(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT GIntBig SWIGSTDCALL CSharp_Feature_GetFieldAsInteger64__SWIG_1(void * jarg1, char * jarg2) {
  GIntBig jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  GIntBig result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = OGRFeatureShadow_GetFieldAsInteger64__SWIG_1(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Feature_GetFieldAsDouble__SWIG_0(void * jarg1, int jarg2) {
  double jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  double result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_0(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Feature_GetFieldAsDouble__SWIG_1(void * jarg1, char * jarg2) {
  double jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  double result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_1(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_GetFieldAsDateTime__SWIG_0(void * jarg1, int jarg2, int * jarg3, int * jarg4, int * jarg5, int * jarg6, int * jarg7, float * jarg8, int * jarg9) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int *arg3 = (int *) 0 ;
  int *arg4 = (int *) 0 ;
  int *arg5 = (int *) 0 ;
  int *arg6 = (int *) 0 ;
  int *arg7 = (int *) 0 ;
  float *arg8 = (float *) 0 ;
  int *arg9 = (int *) 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (int *)jarg3; 
  arg4 = (int *)jarg4; 
  arg5 = (int *)jarg5; 
  arg6 = (int *)jarg6; 
  arg7 = (int *)jarg7; 
  arg8 = (float *)jarg8; 
  arg9 = (int *)jarg9; 
  {
    CPLErrorReset();
    OGRFeatureShadow_GetFieldAsDateTime__SWIG_0(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_GetFieldAsDateTime__SWIG_1(void * jarg1, char * jarg2, int * jarg3, int * jarg4, int * jarg5, int * jarg6, int * jarg7, float * jarg8, int * jarg9) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int *arg3 = (int *) 0 ;
  int *arg4 = (int *) 0 ;
  int *arg5 = (int *) 0 ;
  int *arg6 = (int *) 0 ;
  int *arg7 = (int *) 0 ;
  float *arg8 = (float *) 0 ;
  int *arg9 = (int *) 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  arg3 = (int *)jarg3; 
  arg4 = (int *)jarg4; 
  arg5 = (int *)jarg5; 
  arg6 = (int *)jarg6; 
  arg7 = (int *)jarg7; 
  arg8 = (float *)jarg8; 
  arg9 = (int *)jarg9; 
  {
    CPLErrorReset();
    OGRFeatureShadow_GetFieldAsDateTime__SWIG_1(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Feature_GetFieldAsIntegerList(void * jarg1, int jarg2, void * jarg3) {
  void * jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int *arg3 = (int *) 0 ;
  int *result = 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    /* %typemap(in) (int *hasval) */
    arg3 = (int *)jarg3;
  }
  {
    CPLErrorReset();
    result = (int *)OGRFeatureShadow_GetFieldAsIntegerList(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Feature_GetFieldAsDoubleList(void * jarg1, int jarg2, void * jarg3) {
  void * jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int *arg3 = (int *) 0 ;
  double *result = 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    /* %typemap(in) (int *hasval) */
    arg3 = (int *)jarg3;
  }
  {
    CPLErrorReset();
    result = (double *)OGRFeatureShadow_GetFieldAsDoubleList(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Feature_GetFieldAsStringList(void * jarg1, int jarg2) {
  void * jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  char **result = 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (char **)OGRFeatureShadow_GetFieldAsStringList(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Feature_IsFieldSet__SWIG_0(void * jarg1, int jarg2) {
  unsigned int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  bool result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_0(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Feature_IsFieldSet__SWIG_1(void * jarg1, char * jarg2) {
  unsigned int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  bool result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_1(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Feature_IsFieldNull__SWIG_0(void * jarg1, int jarg2) {
  unsigned int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  bool result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (bool)OGRFeatureShadow_IsFieldNull__SWIG_0(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Feature_IsFieldNull__SWIG_1(void * jarg1, char * jarg2) {
  unsigned int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  bool result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (bool)OGRFeatureShadow_IsFieldNull__SWIG_1(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Feature_IsFieldSetAndNotNull__SWIG_0(void * jarg1, int jarg2) {
  unsigned int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  bool result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (bool)OGRFeatureShadow_IsFieldSetAndNotNull__SWIG_0(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Feature_IsFieldSetAndNotNull__SWIG_1(void * jarg1, char * jarg2) {
  unsigned int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  bool result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (bool)OGRFeatureShadow_IsFieldSetAndNotNull__SWIG_1(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_GetFieldIndex(void * jarg1, char * jarg2) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (int)OGRFeatureShadow_GetFieldIndex(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_GetGeomFieldIndex(void * jarg1, char * jarg2) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (int)OGRFeatureShadow_GetGeomFieldIndex(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT GIntBig SWIGSTDCALL CSharp_Feature_GetFID(void * jarg1) {
  GIntBig jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  GIntBig result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  {
    CPLErrorReset();
    result = OGRFeatureShadow_GetFID(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_SetFID(void * jarg1, GIntBig jarg2) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  GIntBig arg2 ;
  OGRErr result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = jarg2; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRFeatureShadow_SetFID(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_DumpReadable(void * jarg1) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  {
    CPLErrorReset();
    OGRFeatureShadow_DumpReadable(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_UnsetField__SWIG_0(void * jarg1, int jarg2) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    OGRFeatureShadow_UnsetField__SWIG_0(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_UnsetField__SWIG_1(void * jarg1, char * jarg2) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    OGRFeatureShadow_UnsetField__SWIG_1(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetFieldNull__SWIG_0(void * jarg1, int jarg2) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    OGRFeatureShadow_SetFieldNull__SWIG_0(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetFieldNull__SWIG_1(void * jarg1, char * jarg2) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    OGRFeatureShadow_SetFieldNull__SWIG_1(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetField__SWIG_0(void * jarg1, int jarg2, char * jarg3) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (char *)jarg3; 
  {
    CPLErrorReset();
    OGRFeatureShadow_SetField__SWIG_0(arg1,arg2,(char const *)arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetField__SWIG_1(void * jarg1, char * jarg2, char * jarg3) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  arg3 = (char *)jarg3; 
  {
    CPLErrorReset();
    OGRFeatureShadow_SetField__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetFieldInteger64(void * jarg1, int jarg2, GIntBig jarg3) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  GIntBig arg3 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = jarg3; 
  {
    CPLErrorReset();
    OGRFeatureShadow_SetFieldInteger64(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetField__SWIG_2(void * jarg1, int jarg2, int jarg3) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (int)jarg3; 
  {
    CPLErrorReset();
    OGRFeatureShadow_SetField__SWIG_2(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetField__SWIG_3(void * jarg1, char * jarg2, int jarg3) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  arg3 = (int)jarg3; 
  {
    CPLErrorReset();
    OGRFeatureShadow_SetField__SWIG_3(arg1,(char const *)arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetField__SWIG_4(void * jarg1, int jarg2, double jarg3) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  double arg3 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (double)jarg3; 
  {
    CPLErrorReset();
    OGRFeatureShadow_SetField__SWIG_4(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetField__SWIG_5(void * jarg1, char * jarg2, double jarg3) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  double arg3 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  arg3 = (double)jarg3; 
  {
    CPLErrorReset();
    OGRFeatureShadow_SetField__SWIG_5(arg1,(char const *)arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetField__SWIG_6(void * jarg1, int jarg2, int jarg3, int jarg4, int jarg5, int jarg6, int jarg7, float jarg8, int jarg9) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  float arg8 ;
  int arg9 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (int)jarg3; 
  arg4 = (int)jarg4; 
  arg5 = (int)jarg5; 
  arg6 = (int)jarg6; 
  arg7 = (int)jarg7; 
  arg8 = (float)jarg8; 
  arg9 = (int)jarg9; 
  {
    CPLErrorReset();
    OGRFeatureShadow_SetField__SWIG_6(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetField__SWIG_7(void * jarg1, char * jarg2, int jarg3, int jarg4, int jarg5, int jarg6, int jarg7, float jarg8, int jarg9) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  float arg8 ;
  int arg9 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  arg3 = (int)jarg3; 
  arg4 = (int)jarg4; 
  arg5 = (int)jarg5; 
  arg6 = (int)jarg6; 
  arg7 = (int)jarg7; 
  arg8 = (float)jarg8; 
  arg9 = (int)jarg9; 
  {
    CPLErrorReset();
    OGRFeatureShadow_SetField__SWIG_7(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetFieldIntegerList(void * jarg1, int jarg2, int jarg3, void * jarg4) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  int *arg4 = (int *) 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (int)jarg3; 
  {
    /* %typemap(in) (int inout[ANY]) */
    arg4 = (int *)jarg4;
  }
  {
    CPLErrorReset();
    OGRFeatureShadow_SetFieldIntegerList(arg1,arg2,arg3,arg4);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetFieldDoubleList(void * jarg1, int jarg2, int jarg3, void * jarg4) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  int arg3 ;
  double *arg4 = (double *) 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (int)jarg3; 
  {
    /* %typemap(in) (double inout[ANY]) */
    arg4 = (double *)jarg4;
  }
  {
    CPLErrorReset();
    OGRFeatureShadow_SetFieldDoubleList(arg1,arg2,arg3,arg4);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetFieldStringList(void * jarg1, int jarg2, void * jarg3) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  char **arg3 = (char **) 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (char **)jarg3; 
  {
    CPLErrorReset();
    OGRFeatureShadow_SetFieldStringList(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetFieldBinaryFromHexString__SWIG_0(void * jarg1, int jarg2, char * jarg3) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (char *)jarg3; 
  {
    CPLErrorReset();
    OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_0(arg1,arg2,(char const *)arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetFieldBinaryFromHexString__SWIG_1(void * jarg1, char * jarg2, char * jarg3) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  arg3 = (char *)jarg3; 
  {
    CPLErrorReset();
    OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_SetFrom(void * jarg1, void * jarg2, int jarg3) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
  int arg3 = (int) 1 ;
  OGRErr result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (OGRFeatureShadow *)jarg2; 
  arg3 = (int)jarg3; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRErr)OGRFeatureShadow_SetFrom(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_SetFromWithMap(void * jarg1, void * jarg2, int jarg3, int jarg4, void * jarg5) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
  int arg3 ;
  int arg4 ;
  int *arg5 = (int *) 0 ;
  OGRErr result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (OGRFeatureShadow *)jarg2; 
  arg3 = (int)jarg3; 
  arg4 = (int)jarg4; 
  {
    /* %typemap(in) (int inout[ANY]) */
    arg5 = (int *)jarg5;
  }
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRErr)OGRFeatureShadow_SetFromWithMap(arg1,arg2,arg3,arg4,arg5);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Feature_GetStyleString(void * jarg1) {
  char * jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRFeatureShadow_GetStyleString(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetStyleString(void * jarg1, char * jarg2) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    OGRFeatureShadow_SetStyleString(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_GetFieldType__SWIG_0(void * jarg1, int jarg2) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 ;
  OGRFieldType result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_0(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_GetFieldType__SWIG_1(void * jarg1, char * jarg2) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  OGRFieldType result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_1(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Feature_Validate(void * jarg1, int jarg2, int jarg3) {
  int jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 = (int) OGR_F_VAL_ALL ;
  int arg3 = (int) TRUE ;
  int result;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (int)jarg3; 
  {
    CPLErrorReset();
    result = (int)OGRFeatureShadow_Validate(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_FillUnsetWithDefault(void * jarg1, int jarg2, void * jarg3) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  int arg2 = (int) FALSE ;
  char **arg3 = (char **) NULL ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (char **)jarg3; 
  {
    CPLErrorReset();
    OGRFeatureShadow_FillUnsetWithDefault(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Feature_GetNativeData(void * jarg1) {
  char * jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRFeatureShadow_GetNativeData(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Feature_GetNativeMediaType(void * jarg1) {
  char * jresult ;
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRFeatureShadow_GetNativeMediaType(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetNativeData(void * jarg1, char * jarg2) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    OGRFeatureShadow_SetNativeData(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Feature_SetNativeMediaType(void * jarg1, char * jarg2) {
  OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  
  arg1 = (OGRFeatureShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    OGRFeatureShadow_SetNativeMediaType(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_FeatureDefn(void * jarg1) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    delete_OGRFeatureDefnShadow(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_FeatureDefn(char * jarg1) {
  void * jresult ;
  char *arg1 = (char *) NULL ;
  OGRFeatureDefnShadow *result = 0 ;
  
  arg1 = (char *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRFeatureDefnShadow *)new_OGRFeatureDefnShadow((char const *)arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_FeatureDefn_GetName(void * jarg1) {
  char * jresult ;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRFeatureDefnShadow_GetName(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_FeatureDefn_GetFieldCount(void * jarg1) {
  int jresult ;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int result;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRFeatureDefnShadow_GetFieldCount(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_FeatureDefn_GetFieldDefn(void * jarg1, int jarg2) {
  void * jresult ;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int arg2 ;
  OGRFieldDefnShadow *result = 0 ;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (OGRFieldDefnShadow *)OGRFeatureDefnShadow_GetFieldDefn(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_FeatureDefn_GetFieldIndex(void * jarg1, char * jarg2) {
  int jresult ;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int result;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (int)OGRFeatureDefnShadow_GetFieldIndex(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FeatureDefn_AddFieldDefn(void * jarg1, void * jarg2) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  arg2 = (OGRFieldDefnShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return ; 
      };
    }
  }
  {
    CPLErrorReset();
    OGRFeatureDefnShadow_AddFieldDefn(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_FeatureDefn_GetGeomFieldCount(void * jarg1) {
  int jresult ;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int result;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRFeatureDefnShadow_GetGeomFieldCount(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_FeatureDefn_GetGeomFieldDefn(void * jarg1, int jarg2) {
  void * jresult ;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int arg2 ;
  OGRGeomFieldDefnShadow *result = 0 ;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (OGRGeomFieldDefnShadow *)OGRFeatureDefnShadow_GetGeomFieldDefn(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_FeatureDefn_GetGeomFieldIndex(void * jarg1, char * jarg2) {
  int jresult ;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  int result;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (int)OGRFeatureDefnShadow_GetGeomFieldIndex(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FeatureDefn_AddGeomFieldDefn(void * jarg1, void * jarg2) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  OGRGeomFieldDefnShadow *arg2 = (OGRGeomFieldDefnShadow *) 0 ;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  arg2 = (OGRGeomFieldDefnShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return ; 
      };
    }
  }
  {
    CPLErrorReset();
    OGRFeatureDefnShadow_AddGeomFieldDefn(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_FeatureDefn_DeleteGeomFieldDefn(void * jarg1, int jarg2) {
  int jresult ;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int arg2 ;
  OGRErr result;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRFeatureDefnShadow_DeleteGeomFieldDefn(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_FeatureDefn_GetGeomType(void * jarg1) {
  int jresult ;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  OGRwkbGeometryType result;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRwkbGeometryType)OGRFeatureDefnShadow_GetGeomType(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FeatureDefn_SetGeomType(void * jarg1, int jarg2) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  OGRwkbGeometryType arg2 ;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  arg2 = (OGRwkbGeometryType)jarg2; 
  {
    CPLErrorReset();
    OGRFeatureDefnShadow_SetGeomType(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_FeatureDefn_GetReferenceCount(void * jarg1) {
  int jresult ;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int result;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRFeatureDefnShadow_GetReferenceCount(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_FeatureDefn_IsGeometryIgnored(void * jarg1) {
  int jresult ;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int result;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRFeatureDefnShadow_IsGeometryIgnored(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FeatureDefn_SetGeometryIgnored(void * jarg1, int jarg2) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int arg2 ;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    OGRFeatureDefnShadow_SetGeometryIgnored(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_FeatureDefn_IsStyleIgnored(void * jarg1) {
  int jresult ;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int result;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRFeatureDefnShadow_IsStyleIgnored(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FeatureDefn_SetStyleIgnored(void * jarg1, int jarg2) {
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  int arg2 ;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    OGRFeatureDefnShadow_SetStyleIgnored(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_FeatureDefn_IsSame(void * jarg1, void * jarg2) {
  int jresult ;
  OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
  OGRFeatureDefnShadow *arg2 = (OGRFeatureDefnShadow *) 0 ;
  int result;
  
  arg1 = (OGRFeatureDefnShadow *)jarg1; 
  arg2 = (OGRFeatureDefnShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (int)OGRFeatureDefnShadow_IsSame(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_FieldDefn(void * jarg1) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    delete_OGRFieldDefnShadow(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_FieldDefn(char * jarg1, int jarg2) {
  void * jresult ;
  char *arg1 = (char *) "unnamed" ;
  OGRFieldType arg2 = (OGRFieldType) OFTString ;
  OGRFieldDefnShadow *result = 0 ;
  
  arg1 = (char *)jarg1; 
  arg2 = (OGRFieldType)jarg2; 
  {
    CPLErrorReset();
    result = (OGRFieldDefnShadow *)new_OGRFieldDefnShadow((char const *)arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_FieldDefn_GetName(void * jarg1) {
  char * jresult ;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRFieldDefnShadow_GetName(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_FieldDefn_GetNameRef(void * jarg1) {
  char * jresult ;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRFieldDefnShadow_GetNameRef(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FieldDefn_SetName(void * jarg1, char * jarg2) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return ; 
      };
    }
  }
  {
    CPLErrorReset();
    OGRFieldDefnShadow_SetName(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_FieldDefn_GetFieldType(void * jarg1) {
  int jresult ;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  OGRFieldType result;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRFieldType)OGRFieldDefnShadow_GetType(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FieldDefn_SetType(void * jarg1, int jarg2) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  OGRFieldType arg2 ;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  arg2 = (OGRFieldType)jarg2; 
  {
    CPLErrorReset();
    OGRFieldDefnShadow_SetType(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_FieldDefn_GetSubType(void * jarg1) {
  int jresult ;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  OGRFieldSubType result;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRFieldSubType)OGRFieldDefnShadow_GetSubType(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FieldDefn_SetSubType(void * jarg1, int jarg2) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  OGRFieldSubType arg2 ;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  arg2 = (OGRFieldSubType)jarg2; 
  {
    CPLErrorReset();
    OGRFieldDefnShadow_SetSubType(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_FieldDefn_GetJustify(void * jarg1) {
  int jresult ;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  OGRJustification result;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRJustification)OGRFieldDefnShadow_GetJustify(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FieldDefn_SetJustify(void * jarg1, int jarg2) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  OGRJustification arg2 ;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  arg2 = (OGRJustification)jarg2; 
  {
    CPLErrorReset();
    OGRFieldDefnShadow_SetJustify(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_FieldDefn_GetWidth(void * jarg1) {
  int jresult ;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int result;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRFieldDefnShadow_GetWidth(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FieldDefn_SetWidth(void * jarg1, int jarg2) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int arg2 ;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    OGRFieldDefnShadow_SetWidth(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_FieldDefn_GetPrecision(void * jarg1) {
  int jresult ;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int result;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRFieldDefnShadow_GetPrecision(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FieldDefn_SetPrecision(void * jarg1, int jarg2) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int arg2 ;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    OGRFieldDefnShadow_SetPrecision(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_FieldDefn_GetTypeName(void * jarg1) {
  char * jresult ;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRFieldDefnShadow_GetTypeName(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_FieldDefn_GetFieldTypeName(void * jarg1, int jarg2) {
  char * jresult ;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  OGRFieldType arg2 ;
  char *result = 0 ;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  arg2 = (OGRFieldType)jarg2; 
  {
    CPLErrorReset();
    result = (char *)OGRFieldDefnShadow_GetFieldTypeName(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_FieldDefn_IsIgnored(void * jarg1) {
  int jresult ;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int result;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRFieldDefnShadow_IsIgnored(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FieldDefn_SetIgnored(void * jarg1, int jarg2) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int arg2 ;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    OGRFieldDefnShadow_SetIgnored(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_FieldDefn_IsNullable(void * jarg1) {
  int jresult ;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int result;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRFieldDefnShadow_IsNullable(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FieldDefn_SetNullable(void * jarg1, int jarg2) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int arg2 ;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    OGRFieldDefnShadow_SetNullable(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_FieldDefn_GetDefault(void * jarg1) {
  char * jresult ;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRFieldDefnShadow_GetDefault(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FieldDefn_SetDefault(void * jarg1, char * jarg2) {
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    OGRFieldDefnShadow_SetDefault(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_FieldDefn_IsDefaultDriverSpecific(void * jarg1) {
  int jresult ;
  OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
  int result;
  
  arg1 = (OGRFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRFieldDefnShadow_IsDefaultDriverSpecific(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_GeomFieldDefn(void * jarg1) {
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  
  arg1 = (OGRGeomFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    delete_OGRGeomFieldDefnShadow(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_GeomFieldDefn(char * jarg1, int jarg2) {
  void * jresult ;
  char *arg1 = (char *) "" ;
  OGRwkbGeometryType arg2 = (OGRwkbGeometryType) wkbUnknown ;
  OGRGeomFieldDefnShadow *result = 0 ;
  
  arg1 = (char *)jarg1; 
  arg2 = (OGRwkbGeometryType)jarg2; 
  {
    CPLErrorReset();
    result = (OGRGeomFieldDefnShadow *)new_OGRGeomFieldDefnShadow((char const *)arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_GeomFieldDefn_GetName(void * jarg1) {
  char * jresult ;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRGeomFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRGeomFieldDefnShadow_GetName(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_GeomFieldDefn_GetNameRef(void * jarg1) {
  char * jresult ;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRGeomFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRGeomFieldDefnShadow_GetNameRef(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GeomFieldDefn_SetName(void * jarg1, char * jarg2) {
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  char *arg2 = (char *) 0 ;
  
  arg1 = (OGRGeomFieldDefnShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return ; 
      };
    }
  }
  {
    CPLErrorReset();
    OGRGeomFieldDefnShadow_SetName(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_GeomFieldDefn_GetFieldType(void * jarg1) {
  int jresult ;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  OGRwkbGeometryType result;
  
  arg1 = (OGRGeomFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRwkbGeometryType)OGRGeomFieldDefnShadow_GetType(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GeomFieldDefn_SetType(void * jarg1, int jarg2) {
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  OGRwkbGeometryType arg2 ;
  
  arg1 = (OGRGeomFieldDefnShadow *)jarg1; 
  arg2 = (OGRwkbGeometryType)jarg2; 
  {
    CPLErrorReset();
    OGRGeomFieldDefnShadow_SetType(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_GeomFieldDefn_GetSpatialRef(void * jarg1) {
  void * jresult ;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  OSRSpatialReferenceShadow *result = 0 ;
  
  arg1 = (OGRGeomFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OSRSpatialReferenceShadow *)OGRGeomFieldDefnShadow_GetSpatialRef(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GeomFieldDefn_SetSpatialRef(void * jarg1, void * jarg2) {
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
  
  arg1 = (OGRGeomFieldDefnShadow *)jarg1; 
  arg2 = (OSRSpatialReferenceShadow *)jarg2; 
  {
    CPLErrorReset();
    OGRGeomFieldDefnShadow_SetSpatialRef(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_GeomFieldDefn_IsIgnored(void * jarg1) {
  int jresult ;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  int result;
  
  arg1 = (OGRGeomFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRGeomFieldDefnShadow_IsIgnored(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GeomFieldDefn_SetIgnored(void * jarg1, int jarg2) {
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  int arg2 ;
  
  arg1 = (OGRGeomFieldDefnShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    OGRGeomFieldDefnShadow_SetIgnored(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_GeomFieldDefn_IsNullable(void * jarg1) {
  int jresult ;
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  int result;
  
  arg1 = (OGRGeomFieldDefnShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRGeomFieldDefnShadow_IsNullable(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_GeomFieldDefn_SetNullable(void * jarg1, int jarg2) {
  OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
  int arg2 ;
  
  arg1 = (OGRGeomFieldDefnShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    OGRGeomFieldDefnShadow_SetNullable(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_CreateGeometryFromWkb(int jarg1, char * jarg2, void * jarg3) {
  void * jresult ;
  int arg1 ;
  char *arg2 = (char *) 0 ;
  OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) NULL ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (int)jarg1; 
  arg2 = (char *)jarg2; 
  arg3 = (OSRSpatialReferenceShadow *)jarg3; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)CreateGeometryFromWkb(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_CreateGeometryFromWkt(void * jarg1, void * jarg2) {
  void * jresult ;
  char **arg1 = (char **) 0 ;
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) NULL ;
  OGRGeometryShadow *result = 0 ;
  
  /* %typemap(in) (char **ignorechange) */
  char * savearg = *((char **)jarg1);
  arg1 = (char **)jarg1;
  arg2 = (OSRSpatialReferenceShadow *)jarg2; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)CreateGeometryFromWkt(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  /* %typemap(argout) (char **ignorechange) */
  if ((*arg1 - savearg) > 0)
  memmove(savearg, *arg1, strlen(*arg1)+1);
  *arg1 = savearg;
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_CreateGeometryFromGML(char * jarg1) {
  void * jresult ;
  char *arg1 = (char *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (char *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)CreateGeometryFromGML((char const *)arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_CreateGeometryFromJson(char * jarg1) {
  void * jresult ;
  char *arg1 = (char *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (char *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)CreateGeometryFromJson((char const *)arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_BuildPolygonFromEdges(void * jarg1, int jarg2, int jarg3, double jarg4) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  int arg3 = (int) 0 ;
  double arg4 = (double) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (int)jarg3; 
  arg4 = (double)jarg4; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)BuildPolygonFromEdges(arg1,arg2,arg3,arg4);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ApproximateArcAngles(double jarg1, double jarg2, double jarg3, double jarg4, double jarg5, double jarg6, double jarg7, double jarg8, double jarg9) {
  void * jresult ;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  double arg8 ;
  double arg9 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (double)jarg1; 
  arg2 = (double)jarg2; 
  arg3 = (double)jarg3; 
  arg4 = (double)jarg4; 
  arg5 = (double)jarg5; 
  arg6 = (double)jarg6; 
  arg7 = (double)jarg7; 
  arg8 = (double)jarg8; 
  arg9 = (double)jarg9; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)ApproximateArcAngles(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ForceToPolygon(void * jarg1) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)ForceToPolygon(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ForceToLineString(void * jarg1) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)ForceToLineString(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ForceToMultiPolygon(void * jarg1) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)ForceToMultiPolygon(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ForceToMultiPoint(void * jarg1) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)ForceToMultiPoint(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ForceToMultiLineString(void * jarg1) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)ForceToMultiLineString(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ForceTo(void * jarg1, int jarg2, void * jarg3) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRwkbGeometryType arg2 ;
  char **arg3 = (char **) NULL ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRwkbGeometryType)jarg2; 
  arg3 = (char **)jarg3; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)ForceTo(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_Geometry(void * jarg1) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    delete_OGRGeometryShadow(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Geometry(int jarg1, char * jarg2, int jarg3, char * jarg4, char * jarg5) {
  void * jresult ;
  OGRwkbGeometryType arg1 = (OGRwkbGeometryType) wkbUnknown ;
  char *arg2 = (char *) 0 ;
  int arg3 = (int) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRwkbGeometryType)jarg1; 
  arg2 = (char *)jarg2; 
  arg3 = (int)jarg3; 
  arg4 = (char *)jarg4; 
  arg5 = (char *)jarg5; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)new_OGRGeometryShadow(arg1,arg2,arg3,arg4,arg5);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Geometry_ExportToWkt(void * jarg1, void * jarg2) {
  int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  OGRErr result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    /* %typemap(in) (char **argout) */
    arg2 = (char **)jarg2;
  }
  {
    CPLErrorReset();
    result = (OGRErr)OGRGeometryShadow_ExportToWkt(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(argout) (char **argout) */
    char* temp_string;
    temp_string = SWIG_csharp_string_callback(*arg2);
    if (*arg2)
    CPLFree(*arg2);
    *arg2 = temp_string;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Geometry_ExportToIsoWkt(void * jarg1, void * jarg2) {
  int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  OGRErr result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    /* %typemap(in) (char **argout) */
    arg2 = (char **)jarg2;
  }
  {
    CPLErrorReset();
    result = (OGRErr)OGRGeometryShadow_ExportToIsoWkt(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(argout) (char **argout) */
    char* temp_string;
    temp_string = SWIG_csharp_string_callback(*arg2);
    if (*arg2)
    CPLFree(*arg2);
    *arg2 = temp_string;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Geometry_ExportToGML__SWIG_0(void * jarg1) {
  char * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  retStringAndCPLFree *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToGML__SWIG_0(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  
  /* %typemap(out) (retStringAndCPLFree*) */
  if(result)
  {
    jresult = SWIG_csharp_string_callback((const char *)result);
    CPLFree(result);
  }
  else
  {
    jresult = NULL;
  }
  
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Geometry_ExportToGML__SWIG_1(void * jarg1, void * jarg2) {
  char * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  retStringAndCPLFree *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (char **)jarg2; 
  {
    CPLErrorReset();
    result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToGML__SWIG_1(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  
  /* %typemap(out) (retStringAndCPLFree*) */
  if(result)
  {
    jresult = SWIG_csharp_string_callback((const char *)result);
    CPLFree(result);
  }
  else
  {
    jresult = NULL;
  }
  
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Geometry_ExportToKML(void * jarg1, char * jarg2) {
  char * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char *arg2 = (char *) NULL ;
  retStringAndCPLFree *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (char *)jarg2; 
  {
    CPLErrorReset();
    result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToKML(arg1,(char const *)arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  
  /* %typemap(out) (retStringAndCPLFree*) */
  if(result)
  {
    jresult = SWIG_csharp_string_callback((const char *)result);
    CPLFree(result);
  }
  else
  {
    jresult = NULL;
  }
  
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Geometry_ExportToJson(void * jarg1, void * jarg2) {
  char * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char **arg2 = (char **) 0 ;
  retStringAndCPLFree *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (char **)jarg2; 
  {
    CPLErrorReset();
    result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToJson(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  
  /* %typemap(out) (retStringAndCPLFree*) */
  if(result)
  {
    jresult = SWIG_csharp_string_callback((const char *)result);
    CPLFree(result);
  }
  else
  {
    jresult = NULL;
  }
  
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_AddPoint(void * jarg1, double jarg2, double jarg3, double jarg4) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 = (double) 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (double)jarg2; 
  arg3 = (double)jarg3; 
  arg4 = (double)jarg4; 
  {
    CPLErrorReset();
    OGRGeometryShadow_AddPoint(arg1,arg2,arg3,arg4);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_AddPointM(void * jarg1, double jarg2, double jarg3, double jarg4) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (double)jarg2; 
  arg3 = (double)jarg3; 
  arg4 = (double)jarg4; 
  {
    CPLErrorReset();
    OGRGeometryShadow_AddPointM(arg1,arg2,arg3,arg4);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_AddPointZM(void * jarg1, double jarg2, double jarg3, double jarg4, double jarg5) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (double)jarg2; 
  arg3 = (double)jarg3; 
  arg4 = (double)jarg4; 
  arg5 = (double)jarg5; 
  {
    CPLErrorReset();
    OGRGeometryShadow_AddPointZM(arg1,arg2,arg3,arg4,arg5);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_AddPoint_2D(void * jarg1, double jarg2, double jarg3) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  double arg3 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (double)jarg2; 
  arg3 = (double)jarg3; 
  {
    CPLErrorReset();
    OGRGeometryShadow_AddPoint_2D(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_Geometry_AddGeometryDirectly(void * jarg1, void * jarg2) {
  int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRErr)OGRGeometryShadow_AddGeometryDirectly(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Geometry_AddGeometry(void * jarg1, void * jarg2) {
  int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRErr)OGRGeometryShadow_AddGeometry(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_Clone(void * jarg1) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_Clone(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Geometry_GetGeometryType(void * jarg1) {
  int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRwkbGeometryType result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRwkbGeometryType)OGRGeometryShadow_GetGeometryType(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Geometry_GetGeometryName(void * jarg1) {
  char * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRGeometryShadow_GetGeometryName(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Geometry_Length(void * jarg1) {
  double jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (double)OGRGeometryShadow_Length(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Geometry_Area(void * jarg1) {
  double jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (double)OGRGeometryShadow_Area(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Geometry_GetArea(void * jarg1) {
  double jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (double)OGRGeometryShadow_GetArea(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Geometry_GetPointCount(void * jarg1) {
  int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRGeometryShadow_GetPointCount(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Geometry_GetX(void * jarg1, int jarg2) {
  double jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  double result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (double)OGRGeometryShadow_GetX(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Geometry_GetY(void * jarg1, int jarg2) {
  double jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  double result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (double)OGRGeometryShadow_GetY(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Geometry_GetZ(void * jarg1, int jarg2) {
  double jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  double result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (double)OGRGeometryShadow_GetZ(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Geometry_GetM(void * jarg1, int jarg2) {
  double jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  double result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (double)OGRGeometryShadow_GetM(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_GetPoint(void * jarg1, int jarg2, void * jarg3) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  double *arg3 = (double *) (double *)NULL ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    /* %typemap(in) (double argout[ANY]) */
    arg3 = (double *)jarg3;
  }
  {
    CPLErrorReset();
    OGRGeometryShadow_GetPoint(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_GetPointZM(void * jarg1, int jarg2, void * jarg3) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  double *arg3 = (double *) (double *)NULL ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    /* %typemap(in) (double argout[ANY]) */
    arg3 = (double *)jarg3;
  }
  {
    CPLErrorReset();
    OGRGeometryShadow_GetPointZM(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_GetPoint_2D(void * jarg1, int jarg2, void * jarg3) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) 0 ;
  double *arg3 = (double *) (double *)NULL ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    /* %typemap(in) (double argout[ANY]) */
    arg3 = (double *)jarg3;
  }
  {
    CPLErrorReset();
    OGRGeometryShadow_GetPoint_2D(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_Geometry_GetGeometryCount(void * jarg1) {
  int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRGeometryShadow_GetGeometryCount(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_SetPoint(void * jarg1, int jarg2, double jarg3, double jarg4, double jarg5) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 = (double) 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (double)jarg3; 
  arg4 = (double)jarg4; 
  arg5 = (double)jarg5; 
  {
    CPLErrorReset();
    OGRGeometryShadow_SetPoint(arg1,arg2,arg3,arg4,arg5);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_SetPointM(void * jarg1, int jarg2, double jarg3, double jarg4, double jarg5) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (double)jarg3; 
  arg4 = (double)jarg4; 
  arg5 = (double)jarg5; 
  {
    CPLErrorReset();
    OGRGeometryShadow_SetPointM(arg1,arg2,arg3,arg4,arg5);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_SetPointZM(void * jarg1, int jarg2, double jarg3, double jarg4, double jarg5, double jarg6) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (double)jarg3; 
  arg4 = (double)jarg4; 
  arg5 = (double)jarg5; 
  arg6 = (double)jarg6; 
  {
    CPLErrorReset();
    OGRGeometryShadow_SetPointZM(arg1,arg2,arg3,arg4,arg5,arg6);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_SetPoint_2D(void * jarg1, int jarg2, double jarg3, double jarg4) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (double)jarg3; 
  arg4 = (double)jarg4; 
  {
    CPLErrorReset();
    OGRGeometryShadow_SetPoint_2D(arg1,arg2,arg3,arg4);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_GetGeometryRef(void * jarg1, int jarg2) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_GetGeometryRef(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_Simplify(void * jarg1, double jarg2) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (double)jarg2; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_Simplify(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_SimplifyPreserveTopology(void * jarg1, double jarg2) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (double)jarg2; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_SimplifyPreserveTopology(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_DelaunayTriangulation(void * jarg1, double jarg2, int jarg3) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 = (double) 0.0 ;
  int arg3 = (int) FALSE ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (double)jarg2; 
  arg3 = (int)jarg3; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_DelaunayTriangulation(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_Boundary(void * jarg1) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_Boundary(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_GetBoundary(void * jarg1) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_GetBoundary(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_ConvexHull(void * jarg1) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_ConvexHull(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_Buffer(void * jarg1, double jarg2, int jarg3) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  int arg3 = (int) 30 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (double)jarg2; 
  arg3 = (int)jarg3; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_Buffer(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_Intersection(void * jarg1, void * jarg2) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_Intersection(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_Union(void * jarg1, void * jarg2) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_Union(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_UnionCascaded(void * jarg1) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_UnionCascaded(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_Difference(void * jarg1, void * jarg2) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_Difference(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_SymDifference(void * jarg1, void * jarg2) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_SymDifference(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_SymmetricDifference(void * jarg1, void * jarg2) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_SymmetricDifference(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Geometry_Distance(void * jarg1, void * jarg2) {
  double jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  double result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (double)OGRGeometryShadow_Distance(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Geometry_Distance3D(void * jarg1, void * jarg2) {
  double jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  double result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (double)OGRGeometryShadow_Distance3D(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_Empty(void * jarg1) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    OGRGeometryShadow_Empty(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Geometry_IsEmpty(void * jarg1) {
  unsigned int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  bool result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (bool)OGRGeometryShadow_IsEmpty(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Geometry_IsValid(void * jarg1) {
  unsigned int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  bool result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (bool)OGRGeometryShadow_IsValid(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Geometry_IsSimple(void * jarg1) {
  unsigned int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  bool result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (bool)OGRGeometryShadow_IsSimple(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Geometry_IsRing(void * jarg1) {
  unsigned int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  bool result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (bool)OGRGeometryShadow_IsRing(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Geometry_Intersects(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  bool result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (bool)OGRGeometryShadow_Intersects(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Geometry_Intersect(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  bool result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (bool)OGRGeometryShadow_Intersect(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Geometry_Equals(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  bool result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (bool)OGRGeometryShadow_Equals(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Geometry_Equal(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  bool result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (bool)OGRGeometryShadow_Equal(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Geometry_Disjoint(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  bool result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (bool)OGRGeometryShadow_Disjoint(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Geometry_Touches(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  bool result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (bool)OGRGeometryShadow_Touches(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Geometry_Crosses(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  bool result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (bool)OGRGeometryShadow_Crosses(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Geometry_Within(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  bool result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (bool)OGRGeometryShadow_Within(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Geometry_Contains(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  bool result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (bool)OGRGeometryShadow_Contains(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Geometry_Overlaps(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
  bool result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGRGeometryShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (bool)OGRGeometryShadow_Overlaps(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Geometry_TransformTo(void * jarg1, void * jarg2) {
  int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OSRSpatialReferenceShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRErr)OGRGeometryShadow_TransformTo(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Geometry_Transform(void * jarg1, void * jarg2) {
  int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OSRCoordinateTransformationShadow *arg2 = (OSRCoordinateTransformationShadow *) 0 ;
  OGRErr result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OSRCoordinateTransformationShadow *)jarg2; 
  {
    if (!arg2) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRErr)OGRGeometryShadow_Transform(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_GetSpatialReference(void * jarg1) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OSRSpatialReferenceShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OSRSpatialReferenceShadow *)OGRGeometryShadow_GetSpatialReference(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_AssignSpatialReference(void * jarg1, void * jarg2) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OSRSpatialReferenceShadow *)jarg2; 
  {
    CPLErrorReset();
    OGRGeometryShadow_AssignSpatialReference(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_CloseRings(void * jarg1) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    OGRGeometryShadow_CloseRings(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_FlattenTo2D(void * jarg1) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    OGRGeometryShadow_FlattenTo2D(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_Segmentize(void * jarg1, double jarg2) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (double)jarg2; 
  {
    CPLErrorReset();
    OGRGeometryShadow_Segmentize(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_GetEnvelope(void * jarg1, void * jarg2) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGREnvelope *arg2 = (OGREnvelope *) 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGREnvelope *)jarg2; 
  {
    CPLErrorReset();
    OGRGeometryShadow_GetEnvelope(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_GetEnvelope3D(void * jarg1, void * jarg2) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGREnvelope3D *arg2 = (OGREnvelope3D *) 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (OGREnvelope3D *)jarg2; 
  {
    CPLErrorReset();
    OGRGeometryShadow_GetEnvelope3D(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_Centroid(void * jarg1) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_Centroid(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_PointOnSurface(void * jarg1) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_PointOnSurface(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Geometry_WkbSize(void * jarg1) {
  int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRGeometryShadow_WkbSize(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Geometry_GetCoordinateDimension(void * jarg1) {
  int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRGeometryShadow_GetCoordinateDimension(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Geometry_CoordinateDimension(void * jarg1) {
  int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRGeometryShadow_CoordinateDimension(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Geometry_Is3D(void * jarg1) {
  int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRGeometryShadow_Is3D(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Geometry_IsMeasured(void * jarg1) {
  int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRGeometryShadow_IsMeasured(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_SetCoordinateDimension(void * jarg1, int jarg2) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    OGRGeometryShadow_SetCoordinateDimension(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_Set3D(void * jarg1, int jarg2) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    OGRGeometryShadow_Set3D(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Geometry_SetMeasured(void * jarg1, int jarg2) {
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    OGRGeometryShadow_SetMeasured(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_Geometry_GetDimension(void * jarg1) {
  int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGRGeometryShadow_GetDimension(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Geometry_HasCurveGeometry(void * jarg1, int jarg2) {
  int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 = (int) FALSE ;
  int result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (int)OGRGeometryShadow_HasCurveGeometry(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_GetLinearGeometry(void * jarg1, double jarg2, void * jarg3) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 = (double) 0.0 ;
  char **arg3 = (char **) NULL ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (double)jarg2; 
  arg3 = (char **)jarg3; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_GetLinearGeometry(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_GetCurveGeometry(void * jarg1, void * jarg2) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  char **arg2 = (char **) NULL ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (char **)jarg2; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_GetCurveGeometry(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Geometry_Value(void * jarg1, double jarg2) {
  void * jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  double arg2 ;
  OGRGeometryShadow *result = 0 ;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (double)jarg2; 
  {
    CPLErrorReset();
    result = (OGRGeometryShadow *)OGRGeometryShadow_Value(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Geometry_ExportToWkb(void * jarg1, int jarg2, char * jarg3, int jarg4) {
  int jresult ;
  OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  OGRwkbByteOrder arg4 ;
  OGRErr result;
  
  arg1 = (OGRGeometryShadow *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (char *)jarg3; 
  arg4 = (OGRwkbByteOrder)jarg4; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRGeometryShadow_ExportToWkb(arg1,arg2,arg3,arg4);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GetDriverCount() {
  int jresult ;
  int result;
  
  {
    CPLErrorReset();
    result = (int)OGRGetDriverCount();
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GetOpenDSCount() {
  int jresult ;
  int result;
  
  {
    CPLErrorReset();
    result = (int)OGRGetOpenDSCount();
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_SetGenerate_DB2_V72_BYTE_ORDER(int jarg1) {
  int jresult ;
  int arg1 ;
  OGRErr result;
  
  arg1 = (int)jarg1; 
  {
    CPLErrorReset();
    result = (OGRErr)OGRSetGenerate_DB2_V72_BYTE_ORDER(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  {
    /* %typemap(out,fragment="OGRErrMessages",canthrow=1) OGRErr */
    jresult = result;
  }
  {
    /* %typemap(ret) OGRErr */
    
  }
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_RegisterAll() {
  {
    CPLErrorReset();
    OGRRegisterAll();
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_GeometryTypeToName(int jarg1) {
  char * jresult ;
  OGRwkbGeometryType arg1 ;
  char *result = 0 ;
  
  arg1 = (OGRwkbGeometryType)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGRGeometryTypeToName(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_GetFieldTypeName(int jarg1) {
  char * jresult ;
  OGRFieldType arg1 ;
  char *result = 0 ;
  
  arg1 = (OGRFieldType)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGR_GetFieldTypeName(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_GetFieldSubTypeName(int jarg1) {
  char * jresult ;
  OGRFieldSubType arg1 ;
  char *result = 0 ;
  
  arg1 = (OGRFieldSubType)jarg1; 
  {
    CPLErrorReset();
    result = (char *)OGR_GetFieldSubTypeName(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GT_Flatten(int jarg1) {
  int jresult ;
  OGRwkbGeometryType arg1 ;
  OGRwkbGeometryType result;
  
  arg1 = (OGRwkbGeometryType)jarg1; 
  {
    CPLErrorReset();
    result = (OGRwkbGeometryType)OGR_GT_Flatten(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GT_SetZ(int jarg1) {
  int jresult ;
  OGRwkbGeometryType arg1 ;
  OGRwkbGeometryType result;
  
  arg1 = (OGRwkbGeometryType)jarg1; 
  {
    CPLErrorReset();
    result = (OGRwkbGeometryType)OGR_GT_SetZ(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GT_SetM(int jarg1) {
  int jresult ;
  OGRwkbGeometryType arg1 ;
  OGRwkbGeometryType result;
  
  arg1 = (OGRwkbGeometryType)jarg1; 
  {
    CPLErrorReset();
    result = (OGRwkbGeometryType)OGR_GT_SetM(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GT_SetModifier(int jarg1, int jarg2, int jarg3) {
  int jresult ;
  OGRwkbGeometryType arg1 ;
  int arg2 ;
  int arg3 = (int) FALSE ;
  OGRwkbGeometryType result;
  
  arg1 = (OGRwkbGeometryType)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (int)jarg3; 
  {
    CPLErrorReset();
    result = (OGRwkbGeometryType)GT_SetModifier(arg1,arg2,arg3);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GT_HasZ(int jarg1) {
  int jresult ;
  OGRwkbGeometryType arg1 ;
  int result;
  
  arg1 = (OGRwkbGeometryType)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGR_GT_HasZ(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GT_HasM(int jarg1) {
  int jresult ;
  OGRwkbGeometryType arg1 ;
  int result;
  
  arg1 = (OGRwkbGeometryType)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGR_GT_HasM(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GT_IsSubClassOf(int jarg1, int jarg2) {
  int jresult ;
  OGRwkbGeometryType arg1 ;
  OGRwkbGeometryType arg2 ;
  int result;
  
  arg1 = (OGRwkbGeometryType)jarg1; 
  arg2 = (OGRwkbGeometryType)jarg2; 
  {
    CPLErrorReset();
    result = (int)OGR_GT_IsSubClassOf(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GT_IsCurve(int jarg1) {
  int jresult ;
  OGRwkbGeometryType arg1 ;
  int result;
  
  arg1 = (OGRwkbGeometryType)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGR_GT_IsCurve(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GT_IsSurface(int jarg1) {
  int jresult ;
  OGRwkbGeometryType arg1 ;
  int result;
  
  arg1 = (OGRwkbGeometryType)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGR_GT_IsSurface(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GT_IsNonLinear(int jarg1) {
  int jresult ;
  OGRwkbGeometryType arg1 ;
  int result;
  
  arg1 = (OGRwkbGeometryType)jarg1; 
  {
    CPLErrorReset();
    result = (int)OGR_GT_IsNonLinear(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GT_GetCollection(int jarg1) {
  int jresult ;
  OGRwkbGeometryType arg1 ;
  OGRwkbGeometryType result;
  
  arg1 = (OGRwkbGeometryType)jarg1; 
  {
    CPLErrorReset();
    result = (OGRwkbGeometryType)OGR_GT_GetCollection(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GT_GetCurve(int jarg1) {
  int jresult ;
  OGRwkbGeometryType arg1 ;
  OGRwkbGeometryType result;
  
  arg1 = (OGRwkbGeometryType)jarg1; 
  {
    CPLErrorReset();
    result = (OGRwkbGeometryType)OGR_GT_GetCurve(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_GT_GetLinear(int jarg1) {
  int jresult ;
  OGRwkbGeometryType arg1 ;
  OGRwkbGeometryType result;
  
  arg1 = (OGRwkbGeometryType)jarg1; 
  {
    CPLErrorReset();
    result = (OGRwkbGeometryType)OGR_GT_GetLinear(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_SetNonLinearGeometriesEnabledFlag(int jarg1) {
  int arg1 ;
  
  arg1 = (int)jarg1; 
  {
    CPLErrorReset();
    OGRSetNonLinearGeometriesEnabledFlag(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_GetNonLinearGeometriesEnabledFlag() {
  int jresult ;
  int result;
  
  {
    CPLErrorReset();
    result = (int)OGRGetNonLinearGeometriesEnabledFlag();
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_GetOpenDS(int jarg1) {
  void * jresult ;
  int arg1 ;
  OGRDataSourceShadow *result = 0 ;
  
  arg1 = (int)jarg1; 
  {
    CPLErrorReset();
    result = (OGRDataSourceShadow *)GetOpenDS(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Open(char * jarg1, int jarg2) {
  void * jresult ;
  char *arg1 = (char *) 0 ;
  int arg2 = (int) 0 ;
  OGRDataSourceShadow *result = 0 ;
  
  arg1 = (char *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (OGRDataSourceShadow *)Open((char const *)arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_OpenShared(char * jarg1, int jarg2) {
  void * jresult ;
  char *arg1 = (char *) 0 ;
  int arg2 = (int) 0 ;
  OGRDataSourceShadow *result = 0 ;
  
  arg1 = (char *)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (OGRDataSourceShadow *)OpenShared((char const *)arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_GetDriverByName(char * jarg1) {
  void * jresult ;
  char *arg1 = (char *) 0 ;
  OGRDriverShadow *result = 0 ;
  
  arg1 = (char *)jarg1; 
  {
    if (!arg1) {
      {
        SWIG_CSharpException(SWIG_ValueError, "Received a NULL pointer."); return 0; 
      };
    }
  }
  {
    CPLErrorReset();
    result = (OGRDriverShadow *)GetDriverByName((char const *)arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_GetDriver(int jarg1) {
  void * jresult ;
  int arg1 ;
  OGRDriverShadow *result = 0 ;
  
  arg1 = (int)jarg1; 
  {
    CPLErrorReset();
    result = (OGRDriverShadow *)GetDriver(arg1);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_GeneralCmdLineProcessor(void * jarg1, int jarg2) {
  void * jresult ;
  char **arg1 = (char **) 0 ;
  int arg2 = (int) 0 ;
  char **result = 0 ;
  
  arg1 = (char **)jarg1; 
  arg2 = (int)jarg2; 
  {
    CPLErrorReset();
    result = (char **)GeneralCmdLineProcessor(arg1,arg2);
    CPLErr eclass = CPLGetLastErrorType();
    if ( eclass == CE_Failure || eclass == CE_Fatal ) {
      SWIG_CSharpException(SWIG_RuntimeError, CPLGetLastErrorMsg());
      
      
      
    }
    
    
    
    
    
    
    
    
    
    
    
  }
  jresult = result; 
  return jresult;
}


#ifdef __cplusplus
}
#endif

