text: /* ----------------------------------------------------------------------------
   * This file was automatically generated by SWIG (http://www.swig.org).
   * Version 2.0.6
   * 
   * 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 SWIGJAVA
  
  
  #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
  
  
  
  /* Fix for jlong on some versions of gcc on Windows */
  #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
    typedef long long __int64;
  #endif
  
  /* Fix for jlong on 64-bit x86 Solaris */
  #if defined(__x86_64)
  # ifdef _LP64
  #   undef _LP64
  # endif
  #endif
  
  #include <jni.h>
  #include <stdlib.h>
  #include <string.h>
  
  
  /* Support for throwing Java exceptions */
  typedef enum {
    SWIG_JavaOutOfMemoryError = 1, 
    SWIG_JavaIOException, 
    SWIG_JavaRuntimeException, 
    SWIG_JavaIndexOutOfBoundsException,
    SWIG_JavaArithmeticException,
    SWIG_JavaIllegalArgumentException,
    SWIG_JavaNullPointerException,
    SWIG_JavaDirectorPureVirtual,
    SWIG_JavaUnknownError
  } SWIG_JavaExceptionCodes;
  
  typedef struct {
    SWIG_JavaExceptionCodes code;
    const char *java_exception;
  } SWIG_JavaExceptions_t;
  
  
  static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) {
    jclass excep;
    static const SWIG_JavaExceptions_t java_exceptions[] = {
      { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" },
      { SWIG_JavaIOException, "java/io/IOException" },
      { SWIG_JavaRuntimeException, "java/lang/RuntimeException" },
      { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" },
      { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" },
      { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" },
      { SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
      { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
      { SWIG_JavaUnknownError,  "java/lang/UnknownError" },
      { (SWIG_JavaExceptionCodes)0,  "java/lang/UnknownError" }
    };
    const SWIG_JavaExceptions_t *except_ptr = java_exceptions;
  
    while (except_ptr->code != code && except_ptr->code)
      except_ptr++;
  
    jenv->ExceptionClear();
    excep = jenv->FindClass(except_ptr->java_exception);
    if (excep)
      jenv->ThrowNew(excep, msg);
  }
  
  
  /* Contract support */
  
  #define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, 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_JavaException(JNIEnv *jenv, int code, const char *msg) {
    SWIG_JavaExceptionCodes exception_code = SWIG_JavaUnknownError;
    switch(code) {
    case SWIG_MemoryError:
      exception_code = SWIG_JavaOutOfMemoryError;
      break;
    case SWIG_IOError:
      exception_code = SWIG_JavaIOException;
      break;
    case SWIG_SystemError:
    case SWIG_RuntimeError:
      exception_code = SWIG_JavaRuntimeException;
      break;
    case SWIG_OverflowError:
    case SWIG_IndexError:
      exception_code = SWIG_JavaIndexOutOfBoundsException;
      break;
    case SWIG_DivisionByZero:
      exception_code = SWIG_JavaArithmeticException;
      break;
    case SWIG_SyntaxError:
    case SWIG_ValueError:
    case SWIG_TypeError:
      exception_code = SWIG_JavaIllegalArgumentException;
      break;
    case SWIG_UnknownError:
    default:
      exception_code = SWIG_JavaUnknownError;
      break;
    }
    SWIG_JavaThrowException(jenv, exception_code, msg);
  }
  
  
  #include <stdexcept>
  
  
  typedef char retStringAndCPLFree;
  
  
  #include <iostream>
  using namespace std;
  
  #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"
  
  #ifdef DEBUG 
  typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
  typedef struct OGRDriverHS OGRDriverShadow;
  typedef struct OGRDataSourceHS OGRDataSourceShadow;
  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;
  typedef void OGRDriverShadow;
  typedef void OGRDataSourceShadow;
  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;
  
  
  typedef void retGetPoints;
  
  
  static int bUseExceptions=1;
  
  void CPL_STDCALL 
  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 (eclass == CE_Fatal ) {
      CPLDefaultErrorHandler(eclass, code, msg );
    }
  }
  
  
  void UseExceptions() {
    bUseExceptions = 1;
    CPLSetErrorHandler( (CPLErrorHandler) VeryQuietErrorHandler );
  }
  
  void DontUseExceptions() {
    bUseExceptions = 0;
    CPLSetErrorHandler( CPLDefaultErrorHandler );
  }
  
  
  typedef struct {
      JNIEnv *jenv;
      jobject pJavaCallback;
  } JavaProgressData;
  
  
  class ProgressCallback
  {
  public:
          virtual ~ProgressCallback() {  }
          virtual int run(double dfComplete, const char* pszMessage)
          {
              return 1;
          }
  };
  
  class TermProgressCallback : public ProgressCallback
  {
  public:
      TermProgressCallback()
      {
      }
  
      virtual int run(double dfComplete, const char* pszMessage)
      {
          return GDALTermProgress(dfComplete, pszMessage, NULL);
      }
  };
  
  
  /************************************************************************/
  /*                        JavaProgressProxy()                           */
  /************************************************************************/
  
  int CPL_STDCALL
  JavaProgressProxy( double dfComplete, const char *pszMessage, void *pData )
  {
      JavaProgressData* psProgressInfo = (JavaProgressData*)pData;
      JNIEnv *jenv = psProgressInfo->jenv;
      int ret;
      const jclass progressCallbackClass = jenv->FindClass("org/gdal/gdal/ProgressCallback");
      const jmethodID runMethod = jenv->GetMethodID(progressCallbackClass, "run", "(DLjava/lang/String;)I");
      jstring temp_string = jenv->NewStringUTF(pszMessage);
      ret = jenv->CallIntMethod(psProgressInfo->pJavaCallback, runMethod, dfComplete, temp_string);
      jenv->DeleteLocalRef(temp_string);
      return ret;
  }
  
  
  #if defined(SWIG_NOINCLUDE) || defined(SWIG_NOARRAYS)
  
  
  static int SWIG_JavaArrayInBool (JNIEnv *jenv, jboolean **jarr, bool **carr, jbooleanArray input);
  static void SWIG_JavaArrayArgoutBool (JNIEnv *jenv, jboolean *jarr, bool *carr, jbooleanArray input);
  static jbooleanArray SWIG_JavaArrayOutBool (JNIEnv *jenv, bool *result, jsize sz);
  
  
  static int SWIG_JavaArrayInSchar (JNIEnv *jenv, jbyte **jarr, signed char **carr, jbyteArray input);
  static void SWIG_JavaArrayArgoutSchar (JNIEnv *jenv, jbyte *jarr, signed char *carr, jbyteArray input);
  static jbyteArray SWIG_JavaArrayOutSchar (JNIEnv *jenv, signed char *result, jsize sz);
  
  
  static int SWIG_JavaArrayInUchar (JNIEnv *jenv, jshort **jarr, unsigned char **carr, jshortArray input);
  static void SWIG_JavaArrayArgoutUchar (JNIEnv *jenv, jshort *jarr, unsigned char *carr, jshortArray input);
  static jshortArray SWIG_JavaArrayOutUchar (JNIEnv *jenv, unsigned char *result, jsize sz);
  
  
  static int SWIG_JavaArrayInShort (JNIEnv *jenv, jshort **jarr, short **carr, jshortArray input);
  static void SWIG_JavaArrayArgoutShort (JNIEnv *jenv, jshort *jarr, short *carr, jshortArray input);
  static jshortArray SWIG_JavaArrayOutShort (JNIEnv *jenv, short *result, jsize sz);
  
  
  static int SWIG_JavaArrayInUshort (JNIEnv *jenv, jint **jarr, unsigned short **carr, jintArray input);
  static void SWIG_JavaArrayArgoutUshort (JNIEnv *jenv, jint *jarr, unsigned short *carr, jintArray input);
  static jintArray SWIG_JavaArrayOutUshort (JNIEnv *jenv, unsigned short *result, jsize sz);
  
  
  static int SWIG_JavaArrayInInt (JNIEnv *jenv, jint **jarr, int **carr, jintArray input);
  static void SWIG_JavaArrayArgoutInt (JNIEnv *jenv, jint *jarr, int *carr, jintArray input);
  static jintArray SWIG_JavaArrayOutInt (JNIEnv *jenv, int *result, jsize sz);
  
  
  static int SWIG_JavaArrayInUint (JNIEnv *jenv, jlong **jarr, unsigned int **carr, jlongArray input);
  static void SWIG_JavaArrayArgoutUint (JNIEnv *jenv, jlong *jarr, unsigned int *carr, jlongArray input);
  static jlongArray SWIG_JavaArrayOutUint (JNIEnv *jenv, unsigned int *result, jsize sz);
  
  
  static int SWIG_JavaArrayInLong (JNIEnv *jenv, jint **jarr, long **carr, jintArray input);
  static void SWIG_JavaArrayArgoutLong (JNIEnv *jenv, jint *jarr, long *carr, jintArray input);
  static jintArray SWIG_JavaArrayOutLong (JNIEnv *jenv, long *result, jsize sz);
  
  
  static int SWIG_JavaArrayInUlong (JNIEnv *jenv, jlong **jarr, unsigned long **carr, jlongArray input);
  static void SWIG_JavaArrayArgoutUlong (JNIEnv *jenv, jlong *jarr, unsigned long *carr, jlongArray input);
  static jlongArray SWIG_JavaArrayOutUlong (JNIEnv *jenv, unsigned long *result, jsize sz);
  
  
  static int SWIG_JavaArrayInLonglong (JNIEnv *jenv, jlong **jarr, jlong **carr, jlongArray input);
  static void SWIG_JavaArrayArgoutLonglong (JNIEnv *jenv, jlong *jarr, jlong *carr, jlongArray input);
  static jlongArray SWIG_JavaArrayOutLonglong (JNIEnv *jenv, jlong *result, jsize sz);
  
  
  static int SWIG_JavaArrayInFloat (JNIEnv *jenv, jfloat **jarr, float **carr, jfloatArray input);
  static void SWIG_JavaArrayArgoutFloat (JNIEnv *jenv, jfloat *jarr, float *carr, jfloatArray input);
  static jfloatArray SWIG_JavaArrayOutFloat (JNIEnv *jenv, float *result, jsize sz);
  
  
  static int SWIG_JavaArrayInDouble (JNIEnv *jenv, jdouble **jarr, double **carr, jdoubleArray input);
  static void SWIG_JavaArrayArgoutDouble (JNIEnv *jenv, jdouble *jarr, double *carr, jdoubleArray input);
  static jdoubleArray SWIG_JavaArrayOutDouble (JNIEnv *jenv, double *result, jsize sz);
  
  
  #else
  
  
  /* bool[] support */
  static int SWIG_JavaArrayInBool (JNIEnv *jenv, jboolean **jarr, bool **carr, jbooleanArray input) {
    int i;
    jsize sz;
    if (!input) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
      return 0;
    }
    sz = jenv->GetArrayLength(input);
    *jarr = jenv->GetBooleanArrayElements(input, 0);
    if (!*jarr)
      return 0; 
    *carr = new bool[sz]; 
    if (!*carr) {
      SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
      return 0;
    }
    for (i=0; i<sz; i++)
      (*carr)[i] = ((*jarr)[i] != 0);
    return 1;
  }
  
  static void SWIG_JavaArrayArgoutBool (JNIEnv *jenv, jboolean *jarr, bool *carr, jbooleanArray input) {
    int i;
    jsize sz = jenv->GetArrayLength(input);
    for (i=0; i<sz; i++)
      jarr[i] = (jboolean)carr[i];
    jenv->ReleaseBooleanArrayElements(input, jarr, 0);
  }
  
  static jbooleanArray SWIG_JavaArrayOutBool (JNIEnv *jenv, bool *result, jsize sz) {
    jboolean *arr;
    int i;
    jbooleanArray jresult = jenv->NewBooleanArray(sz);
    if (!jresult)
      return NULL;
    arr = jenv->GetBooleanArrayElements(jresult, 0);
    if (!arr)
      return NULL;
    for (i=0; i<sz; i++)
      arr[i] = (jboolean)result[i];
    jenv->ReleaseBooleanArrayElements(jresult, arr, 0);
    return jresult;
  }
  
  
  /* signed char[] support */
  static int SWIG_JavaArrayInSchar (JNIEnv *jenv, jbyte **jarr, signed char **carr, jbyteArray input) {
    int i;
    jsize sz;
    if (!input) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
      return 0;
    }
    sz = jenv->GetArrayLength(input);
    *jarr = jenv->GetByteArrayElements(input, 0);
    if (!*jarr)
      return 0; 
    *carr = new signed char[sz]; 
    if (!*carr) {
      SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
      return 0;
    }
    for (i=0; i<sz; i++)
      (*carr)[i] = (signed char)(*jarr)[i];
    return 1;
  }
  
  static void SWIG_JavaArrayArgoutSchar (JNIEnv *jenv, jbyte *jarr, signed char *carr, jbyteArray input) {
    int i;
    jsize sz = jenv->GetArrayLength(input);
    for (i=0; i<sz; i++)
      jarr[i] = (jbyte)carr[i];
    jenv->ReleaseByteArrayElements(input, jarr, 0);
  }
  
  static jbyteArray SWIG_JavaArrayOutSchar (JNIEnv *jenv, signed char *result, jsize sz) {
    jbyte *arr;
    int i;
    jbyteArray jresult = jenv->NewByteArray(sz);
    if (!jresult)
      return NULL;
    arr = jenv->GetByteArrayElements(jresult, 0);
    if (!arr)
      return NULL;
    for (i=0; i<sz; i++)
      arr[i] = (jbyte)result[i];
    jenv->ReleaseByteArrayElements(jresult, arr, 0);
    return jresult;
  }
  
  
  /* unsigned char[] support */
  static int SWIG_JavaArrayInUchar (JNIEnv *jenv, jshort **jarr, unsigned char **carr, jshortArray input) {
    int i;
    jsize sz;
    if (!input) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
      return 0;
    }
    sz = jenv->GetArrayLength(input);
    *jarr = jenv->GetShortArrayElements(input, 0);
    if (!*jarr)
      return 0; 
    *carr = new unsigned char[sz]; 
    if (!*carr) {
      SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
      return 0;
    }
    for (i=0; i<sz; i++)
      (*carr)[i] = (unsigned char)(*jarr)[i];
    return 1;
  }
  
  static void SWIG_JavaArrayArgoutUchar (JNIEnv *jenv, jshort *jarr, unsigned char *carr, jshortArray input) {
    int i;
    jsize sz = jenv->GetArrayLength(input);
    for (i=0; i<sz; i++)
      jarr[i] = (jshort)carr[i];
    jenv->ReleaseShortArrayElements(input, jarr, 0);
  }
  
  static jshortArray SWIG_JavaArrayOutUchar (JNIEnv *jenv, unsigned char *result, jsize sz) {
    jshort *arr;
    int i;
    jshortArray jresult = jenv->NewShortArray(sz);
    if (!jresult)
      return NULL;
    arr = jenv->GetShortArrayElements(jresult, 0);
    if (!arr)
      return NULL;
    for (i=0; i<sz; i++)
      arr[i] = (jshort)result[i];
    jenv->ReleaseShortArrayElements(jresult, arr, 0);
    return jresult;
  }
  
  
  /* short[] support */
  static int SWIG_JavaArrayInShort (JNIEnv *jenv, jshort **jarr, short **carr, jshortArray input) {
    int i;
    jsize sz;
    if (!input) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
      return 0;
    }
    sz = jenv->GetArrayLength(input);
    *jarr = jenv->GetShortArrayElements(input, 0);
    if (!*jarr)
      return 0; 
    *carr = new short[sz]; 
    if (!*carr) {
      SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
      return 0;
    }
    for (i=0; i<sz; i++)
      (*carr)[i] = (short)(*jarr)[i];
    return 1;
  }
  
  static void SWIG_JavaArrayArgoutShort (JNIEnv *jenv, jshort *jarr, short *carr, jshortArray input) {
    int i;
    jsize sz = jenv->GetArrayLength(input);
    for (i=0; i<sz; i++)
      jarr[i] = (jshort)carr[i];
    jenv->ReleaseShortArrayElements(input, jarr, 0);
  }
  
  static jshortArray SWIG_JavaArrayOutShort (JNIEnv *jenv, short *result, jsize sz) {
    jshort *arr;
    int i;
    jshortArray jresult = jenv->NewShortArray(sz);
    if (!jresult)
      return NULL;
    arr = jenv->GetShortArrayElements(jresult, 0);
    if (!arr)
      return NULL;
    for (i=0; i<sz; i++)
      arr[i] = (jshort)result[i];
    jenv->ReleaseShortArrayElements(jresult, arr, 0);
    return jresult;
  }
  
  
  /* unsigned short[] support */
  static int SWIG_JavaArrayInUshort (JNIEnv *jenv, jint **jarr, unsigned short **carr, jintArray input) {
    int i;
    jsize sz;
    if (!input) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
      return 0;
    }
    sz = jenv->GetArrayLength(input);
    *jarr = jenv->GetIntArrayElements(input, 0);
    if (!*jarr)
      return 0; 
    *carr = new unsigned short[sz]; 
    if (!*carr) {
      SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
      return 0;
    }
    for (i=0; i<sz; i++)
      (*carr)[i] = (unsigned short)(*jarr)[i];
    return 1;
  }
  
  static void SWIG_JavaArrayArgoutUshort (JNIEnv *jenv, jint *jarr, unsigned short *carr, jintArray input) {
    int i;
    jsize sz = jenv->GetArrayLength(input);
    for (i=0; i<sz; i++)
      jarr[i] = (jint)carr[i];
    jenv->ReleaseIntArrayElements(input, jarr, 0);
  }
  
  static jintArray SWIG_JavaArrayOutUshort (JNIEnv *jenv, unsigned short *result, jsize sz) {
    jint *arr;
    int i;
    jintArray jresult = jenv->NewIntArray(sz);
    if (!jresult)
      return NULL;
    arr = jenv->GetIntArrayElements(jresult, 0);
    if (!arr)
      return NULL;
    for (i=0; i<sz; i++)
      arr[i] = (jint)result[i];
    jenv->ReleaseIntArrayElements(jresult, arr, 0);
    return jresult;
  }
  
  
  /* int[] support */
  static int SWIG_JavaArrayInInt (JNIEnv *jenv, jint **jarr, int **carr, jintArray input) {
    int i;
    jsize sz;
    if (!input) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
      return 0;
    }
    sz = jenv->GetArrayLength(input);
    *jarr = jenv->GetIntArrayElements(input, 0);
    if (!*jarr)
      return 0; 
    *carr = new int[sz]; 
    if (!*carr) {
      SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
      return 0;
    }
    for (i=0; i<sz; i++)
      (*carr)[i] = (int)(*jarr)[i];
    return 1;
  }
  
  static void SWIG_JavaArrayArgoutInt (JNIEnv *jenv, jint *jarr, int *carr, jintArray input) {
    int i;
    jsize sz = jenv->GetArrayLength(input);
    for (i=0; i<sz; i++)
      jarr[i] = (jint)carr[i];
    jenv->ReleaseIntArrayElements(input, jarr, 0);
  }
  
  static jintArray SWIG_JavaArrayOutInt (JNIEnv *jenv, int *result, jsize sz) {
    jint *arr;
    int i;
    jintArray jresult = jenv->NewIntArray(sz);
    if (!jresult)
      return NULL;
    arr = jenv->GetIntArrayElements(jresult, 0);
    if (!arr)
      return NULL;
    for (i=0; i<sz; i++)
      arr[i] = (jint)result[i];
    jenv->ReleaseIntArrayElements(jresult, arr, 0);
    return jresult;
  }
  
  
  /* unsigned int[] support */
  static int SWIG_JavaArrayInUint (JNIEnv *jenv, jlong **jarr, unsigned int **carr, jlongArray input) {
    int i;
    jsize sz;
    if (!input) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
      return 0;
    }
    sz = jenv->GetArrayLength(input);
    *jarr = jenv->GetLongArrayElements(input, 0);
    if (!*jarr)
      return 0; 
    *carr = new unsigned int[sz]; 
    if (!*carr) {
      SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
      return 0;
    }
    for (i=0; i<sz; i++)
      (*carr)[i] = (unsigned int)(*jarr)[i];
    return 1;
  }
  
  static void SWIG_JavaArrayArgoutUint (JNIEnv *jenv, jlong *jarr, unsigned int *carr, jlongArray input) {
    int i;
    jsize sz = jenv->GetArrayLength(input);
    for (i=0; i<sz; i++)
      jarr[i] = (jlong)carr[i];
    jenv->ReleaseLongArrayElements(input, jarr, 0);
  }
  
  static jlongArray SWIG_JavaArrayOutUint (JNIEnv *jenv, unsigned int *result, jsize sz) {
    jlong *arr;
    int i;
    jlongArray jresult = jenv->NewLongArray(sz);
    if (!jresult)
      return NULL;
    arr = jenv->GetLongArrayElements(jresult, 0);
    if (!arr)
      return NULL;
    for (i=0; i<sz; i++)
      arr[i] = (jlong)result[i];
    jenv->ReleaseLongArrayElements(jresult, arr, 0);
    return jresult;
  }
  
  
  /* long[] support */
  static int SWIG_JavaArrayInLong (JNIEnv *jenv, jint **jarr, long **carr, jintArray input) {
    int i;
    jsize sz;
    if (!input) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
      return 0;
    }
    sz = jenv->GetArrayLength(input);
    *jarr = jenv->GetIntArrayElements(input, 0);
    if (!*jarr)
      return 0; 
    *carr = new long[sz]; 
    if (!*carr) {
      SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
      return 0;
    }
    for (i=0; i<sz; i++)
      (*carr)[i] = (long)(*jarr)[i];
    return 1;
  }
  
  static void SWIG_JavaArrayArgoutLong (JNIEnv *jenv, jint *jarr, long *carr, jintArray input) {
    int i;
    jsize sz = jenv->GetArrayLength(input);
    for (i=0; i<sz; i++)
      jarr[i] = (jint)carr[i];
    jenv->ReleaseIntArrayElements(input, jarr, 0);
  }
  
  static jintArray SWIG_JavaArrayOutLong (JNIEnv *jenv, long *result, jsize sz) {
    jint *arr;
    int i;
    jintArray jresult = jenv->NewIntArray(sz);
    if (!jresult)
      return NULL;
    arr = jenv->GetIntArrayElements(jresult, 0);
    if (!arr)
      return NULL;
    for (i=0; i<sz; i++)
      arr[i] = (jint)result[i];
    jenv->ReleaseIntArrayElements(jresult, arr, 0);
    return jresult;
  }
  
  
  /* unsigned long[] support */
  static int SWIG_JavaArrayInUlong (JNIEnv *jenv, jlong **jarr, unsigned long **carr, jlongArray input) {
    int i;
    jsize sz;
    if (!input) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
      return 0;
    }
    sz = jenv->GetArrayLength(input);
    *jarr = jenv->GetLongArrayElements(input, 0);
    if (!*jarr)
      return 0; 
    *carr = new unsigned long[sz]; 
    if (!*carr) {
      SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
      return 0;
    }
    for (i=0; i<sz; i++)
      (*carr)[i] = (unsigned long)(*jarr)[i];
    return 1;
  }
  
  static void SWIG_JavaArrayArgoutUlong (JNIEnv *jenv, jlong *jarr, unsigned long *carr, jlongArray input) {
    int i;
    jsize sz = jenv->GetArrayLength(input);
    for (i=0; i<sz; i++)
      jarr[i] = (jlong)carr[i];
    jenv->ReleaseLongArrayElements(input, jarr, 0);
  }
  
  static jlongArray SWIG_JavaArrayOutUlong (JNIEnv *jenv, unsigned long *result, jsize sz) {
    jlong *arr;
    int i;
    jlongArray jresult = jenv->NewLongArray(sz);
    if (!jresult)
      return NULL;
    arr = jenv->GetLongArrayElements(jresult, 0);
    if (!arr)
      return NULL;
    for (i=0; i<sz; i++)
      arr[i] = (jlong)result[i];
    jenv->ReleaseLongArrayElements(jresult, arr, 0);
    return jresult;
  }
  
  
  /* jlong[] support */
  static int SWIG_JavaArrayInLonglong (JNIEnv *jenv, jlong **jarr, jlong **carr, jlongArray input) {
    int i;
    jsize sz;
    if (!input) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
      return 0;
    }
    sz = jenv->GetArrayLength(input);
    *jarr = jenv->GetLongArrayElements(input, 0);
    if (!*jarr)
      return 0; 
    *carr = new jlong[sz]; 
    if (!*carr) {
      SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
      return 0;
    }
    for (i=0; i<sz; i++)
      (*carr)[i] = (jlong)(*jarr)[i];
    return 1;
  }
  
  static void SWIG_JavaArrayArgoutLonglong (JNIEnv *jenv, jlong *jarr, jlong *carr, jlongArray input) {
    int i;
    jsize sz = jenv->GetArrayLength(input);
    for (i=0; i<sz; i++)
      jarr[i] = (jlong)carr[i];
    jenv->ReleaseLongArrayElements(input, jarr, 0);
  }
  
  static jlongArray SWIG_JavaArrayOutLonglong (JNIEnv *jenv, jlong *result, jsize sz) {
    jlong *arr;
    int i;
    jlongArray jresult = jenv->NewLongArray(sz);
    if (!jresult)
      return NULL;
    arr = jenv->GetLongArrayElements(jresult, 0);
    if (!arr)
      return NULL;
    for (i=0; i<sz; i++)
      arr[i] = (jlong)result[i];
    jenv->ReleaseLongArrayElements(jresult, arr, 0);
    return jresult;
  }
  
  
  /* float[] support */
  static int SWIG_JavaArrayInFloat (JNIEnv *jenv, jfloat **jarr, float **carr, jfloatArray input) {
    int i;
    jsize sz;
    if (!input) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
      return 0;
    }
    sz = jenv->GetArrayLength(input);
    *jarr = jenv->GetFloatArrayElements(input, 0);
    if (!*jarr)
      return 0; 
    *carr = new float[sz]; 
    if (!*carr) {
      SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
      return 0;
    }
    for (i=0; i<sz; i++)
      (*carr)[i] = (float)(*jarr)[i];
    return 1;
  }
  
  static void SWIG_JavaArrayArgoutFloat (JNIEnv *jenv, jfloat *jarr, float *carr, jfloatArray input) {
    int i;
    jsize sz = jenv->GetArrayLength(input);
    for (i=0; i<sz; i++)
      jarr[i] = (jfloat)carr[i];
    jenv->ReleaseFloatArrayElements(input, jarr, 0);
  }
  
  static jfloatArray SWIG_JavaArrayOutFloat (JNIEnv *jenv, float *result, jsize sz) {
    jfloat *arr;
    int i;
    jfloatArray jresult = jenv->NewFloatArray(sz);
    if (!jresult)
      return NULL;
    arr = jenv->GetFloatArrayElements(jresult, 0);
    if (!arr)
      return NULL;
    for (i=0; i<sz; i++)
      arr[i] = (jfloat)result[i];
    jenv->ReleaseFloatArrayElements(jresult, arr, 0);
    return jresult;
  }
  
  
  /* double[] support */
  static int SWIG_JavaArrayInDouble (JNIEnv *jenv, jdouble **jarr, double **carr, jdoubleArray input) {
    int i;
    jsize sz;
    if (!input) {
      SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
      return 0;
    }
    sz = jenv->GetArrayLength(input);
    *jarr = jenv->GetDoubleArrayElements(input, 0);
    if (!*jarr)
      return 0; 
    *carr = new double[sz]; 
    if (!*carr) {
      SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
      return 0;
    }
    for (i=0; i<sz; i++)
      (*carr)[i] = (double)(*jarr)[i];
    return 1;
  }
  
  static void SWIG_JavaArrayArgoutDouble (JNIEnv *jenv, jdouble *jarr, double *carr, jdoubleArray input) {
    int i;
    jsize sz = jenv->GetArrayLength(input);
    for (i=0; i<sz; i++)
      jarr[i] = (jdouble)carr[i];
    jenv->ReleaseDoubleArrayElements(input, jarr, 0);
  }
  
  static jdoubleArray SWIG_JavaArrayOutDouble (JNIEnv *jenv, double *result, jsize sz) {
    jdouble *arr;
    int i;
    jdoubleArray jresult = jenv->NewDoubleArray(sz);
    if (!jresult)
      return NULL;
    arr = jenv->GetDoubleArrayElements(jresult, 0);
    if (!arr)
      return NULL;
    for (i=0; i<sz; i++)
      arr[i] = (jdouble)result[i];
    jenv->ReleaseDoubleArrayElements(jresult, arr, 0);
    return jresult;
  }
  
  
  #endif
  
  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__SWIG_0(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__SWIG_0(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__SWIG_0(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 OGRErr OGRDriverShadow_DeleteDataSource(OGRDriverShadow *self,char const *utf8_path){
  
  
  
      return OGR_Dr_DeleteDataSource( self, utf8_path );
    }
  
  
  #include "ogr_core.h"
  static char const *
  OGRErrMessages( int rc ) {
    switch( rc ) {
    case OGRERR_NONE:
      return "OGR Error: None";
    case OGRERR_NOT_ENOUGH_DATA:
      return "OGR Error: Not enough data to deserialize";
    case OGRERR_NOT_ENOUGH_MEMORY:
      return "OGR Error: Not enough memory";
    case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
      return "OGR Error: Unsupported geometry type";
    case OGRERR_UNSUPPORTED_OPERATION:
      return "OGR Error: Unsupported operation";
    case OGRERR_CORRUPT_DATA:
      return "OGR Error: Corrupt data";
    case OGRERR_FAILURE:
      return "OGR Error: General Error";
    case OGRERR_UNSUPPORTED_SRS:
      return "OGR Error: Unsupported SRS";
    case OGRERR_INVALID_HANDLE:
      return "OGR Error: Invalid handle";
    default:
      return "OGR Error: Unknown";
    }
  }
  
  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);
    }
  SWIGINTERN OGRErr OGRDataSourceShadow_SyncToDisk(OGRDataSourceShadow *self){
      return OGR_DS_SyncToDisk(self);
    }
  SWIGINTERN OGRLayerShadow *OGRDataSourceShadow_CreateLayer__SWIG_0(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__SWIG_0(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){
  
  
  
      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__SWIG_0(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 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,long 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,long 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,long 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 int OGRLayerShadow_GetFeatureCount__SWIG_0(OGRLayerShadow *self,int force=1){
      return OGR_L_GetFeatureCount(self, force);
    }
  SWIGINTERN OGRErr OGRLayerShadow_GetExtent(OGRLayerShadow *self,double argout[4],int force){
  
      return OGR_L_GetExtent(self, (OGREnvelope*)argout, force);
    }
  SWIGINTERN bool OGRLayerShadow_TestCapability(OGRLayerShadow *self,char const *cap){
      return (OGR_L_TestCapability(self, cap) > 0);
    }
  SWIGINTERN OGRErr OGRLayerShadow_CreateField__SWIG_0(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__SWIG_0(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__SWIG_0(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__SWIG_0(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__SWIG_0(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__SWIG_0(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__SWIG_0(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__SWIG_0(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__SWIG_0(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);
    }
  
  typedef int* retIntArray;
  typedef double* retDoubleArray;
  
  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 *name,OGRGeometryShadow *geom){
        int iField = OGR_F_GetGeomFieldIndex(self, name);
        if (iField == -1)
        {
          CPLError(CE_Failure, 1, "No such field: '%s'", 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 *name,OGRGeometryShadow *geom){
        int iField = OGR_F_GetGeomFieldIndex(self, name);
        if (iField == -1)
        {
          CPLError(CE_Failure, 1, "No such field: '%s'", 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 *name){
      int i = OGR_F_GetGeomFieldIndex(self, name);
      if (i == -1)
      {
        CPLError(CE_Failure, 1, "No such field: '%s'", 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 *name){
        int i = OGR_F_GetFieldIndex(self, name);
        if (i == -1)
  	  CPLError(CE_Failure, 1, "No such field: '%s'", 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 *name){
        int i = OGR_F_GetGeomFieldIndex(self, name);
        if (i == -1)
        CPLError(CE_Failure, 1, "No such field: '%s'", 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 *name){
        int i = OGR_F_GetFieldIndex(self, name);
        if (i == -1)
  	  CPLError(CE_Failure, 1, "No such field: '%s'", 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 *name){
        int i = OGR_F_GetFieldIndex(self, name);
        if (i == -1)
  	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
        else
  	  return OGR_F_GetFieldAsInteger(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 *name){
        int i = OGR_F_GetFieldIndex(self, name);
        if (i == -1)
  	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
        else
  	  return OGR_F_GetFieldAsDouble(self, i);
        return 0;
    }
  SWIGINTERN void OGRFeatureShadow_GetFieldAsDateTime(OGRFeatureShadow *self,int id,int *pnYear,int *pnMonth,int *pnDay,int *pnHour,int *pnMinute,int *pnSecond,int *pnTZFlag){
        OGR_F_GetFieldAsDateTime(self, id, pnYear, pnMonth, pnDay,
  			       pnHour, pnMinute, pnSecond,
  			       pnTZFlag);
    }
  SWIGINTERN retIntArray OGRFeatureShadow_GetFieldAsIntegerList(OGRFeatureShadow *self,int id,int *nLen,int const **pList){
        *pList = OGR_F_GetFieldAsIntegerList(self, id, nLen);
        return (retIntArray)*pList;
    }
  SWIGINTERN retDoubleArray OGRFeatureShadow_GetFieldAsDoubleList(OGRFeatureShadow *self,int id,int *nLen,double const **pList){
        *pList = OGR_F_GetFieldAsDoubleList(self, id, nLen);
        return (retDoubleArray)*pList;
    }
  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 *name){
        int i = OGR_F_GetFieldIndex(self, name);
        if (i == -1)
  	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
        else
  	  return (OGR_F_IsFieldSet(self, i) > 0);
        return false;
    }
  SWIGINTERN int OGRFeatureShadow_GetFieldIndex(OGRFeatureShadow *self,char const *name){
        return OGR_F_GetFieldIndex(self, name);
    }
  SWIGINTERN int OGRFeatureShadow_GetGeomFieldIndex(OGRFeatureShadow *self,char const *name){
        return OGR_F_GetGeomFieldIndex(self, name);
    }
  SWIGINTERN int OGRFeatureShadow_GetFID(OGRFeatureShadow *self){
      return OGR_F_GetFID(self);
    }
  SWIGINTERN OGRErr OGRFeatureShadow_SetFID(OGRFeatureShadow *self,int 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 *name){
        int i = OGR_F_GetFieldIndex(self, name);
        if (i == -1)
  	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
        else
  	  OGR_F_UnsetField(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 *name,char const *value){
        int i = OGR_F_GetFieldIndex(self, name);
        if (i == -1)
  	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
        else
  	  OGR_F_SetFieldString(self, i, 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 *name,int value){
        int i = OGR_F_GetFieldIndex(self, name);
        if (i == -1)
  	  CPLError(CE_Failure, 1, "No such field: '%s'", 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 *name,double value){
        int i = OGR_F_GetFieldIndex(self, name);
        if (i == -1)
  	  CPLError(CE_Failure, 1, "No such field: '%s'", 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,int second,int tzflag){
      OGR_F_SetFieldDateTime(self, id, year, month, day,
                               hour, minute, second, 
                               tzflag);
    }
  SWIGINTERN void OGRFeatureShadow_SetField__SWIG_7(OGRFeatureShadow *self,char const *name,int year,int month,int day,int hour,int minute,int second,int tzflag){
        int i = OGR_F_GetFieldIndex(self, name);
        if (i == -1)
  	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
        else
  	  OGR_F_SetFieldDateTime(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 *name,char const *pszValue){
        int i = OGR_F_GetFieldIndex(self, name);
        if (i == -1)
          CPLError(CE_Failure, 1, "No such field: '%s'", name);
        else
        {
          int nBytes;
          GByte* pabyBuf = CPLHexToBinary(pszValue, &nBytes );
          OGR_F_SetFieldBinary(self, i, nBytes, pabyBuf);
          CPLFree(pabyBuf);
        }
    }
  SWIGINTERN OGRErr OGRFeatureShadow_SetFrom__SWIG_0(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){
      return (OGRFieldType) OGR_Fld_GetType( OGR_F_GetFieldDefnRef( self, id));
    }
  SWIGINTERN OGRFieldType OGRFeatureShadow_GetFieldType__SWIG_1(OGRFeatureShadow *self,char const *name){
        int i = OGR_F_GetFieldIndex(self, name);
        if (i == -1) {
  	  CPLError(CE_Failure, 1, "No such field: '%s'", name);
  	  return (OGRFieldType)0;
        } else
  	  return (OGRFieldType) OGR_Fld_GetType( 
  	      OGR_F_GetFieldDefnRef( self,  i )
  	      );
    }
  
      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 wkbNone:
              /*case wkbLinearRing:*/
              case wkbPoint25D:
              case wkbLineString25D:
              case wkbPolygon25D:
              case wkbMultiPoint25D:
              case wkbMultiLineString25D:
              case wkbMultiPolygon25D:
              case wkbGeometryCollection25D:
                  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__SWIG_0(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 *name){
        return OGR_FD_GetFieldIndex(self, 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 *name){
        return OGR_FD_GetGeomFieldIndex(self, 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:
                  return TRUE;
              default:
                  CPLError(CE_Failure, CPLE_IllegalArg, "Illegal field type value");
                  return FALSE;
          }
      }
  
  SWIGINTERN void delete_OGRFieldDefnShadow(OGRFieldDefnShadow *self){
      OGR_Fld_Destroy(self);
    }
  SWIGINTERN OGRFieldDefnShadow *new_OGRFieldDefnShadow__SWIG_0(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 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){
      return OGR_Fld_SetIgnored( self, bIgnored );
    }
  SWIGINTERN void delete_OGRGeomFieldDefnShadow(OGRGeomFieldDefnShadow *self){
      OGR_GFld_Destroy(self);
    }
  SWIGINTERN OGRGeomFieldDefnShadow *new_OGRGeomFieldDefnShadow__SWIG_0(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 );
    }
  
  OGRGeometryShadow* CreateGeometryFromWkb(int nLen, unsigned char *pBuf, 
                                              OSRSpatialReferenceShadow *reference=NULL ) {
      OGRGeometryH geom = NULL;
      OGRErr err = OGR_G_CreateFromWkb((unsigned char*) pBuf, reference, &geom, nLen);
      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) );
  }
  
  SWIGINTERN void delete_OGRGeometryShadow(OGRGeometryShadow *self){
      OGR_G_DestroyGeometry( self );
    }
  SWIGINTERN OGRErr OGRGeometryShadow_ExportToWkt__SWIG_0(OGRGeometryShadow *self,char **argout){
      return OGR_G_ExportToWkt(self, argout);
    }
  SWIGINTERN GByte *OGRGeometryShadow_ExportToWkb__SWIG_0(OGRGeometryShadow *self,int *nLen,char **pBuf,OGRwkbByteOrder byte_order=wkbXDR){
      *nLen = OGR_G_WkbSize( self );
      *pBuf = (char *) malloc( *nLen * sizeof(unsigned char) );
      OGR_G_ExportToWkb(self, byte_order, (unsigned char*) *pBuf );
      return (GByte*)*pBuf;
    }
  SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToGML__SWIG_0(OGRGeometryShadow *self,char **options=0){
      return (retStringAndCPLFree*) OGR_G_ExportToGMLEx(self, options);
    }
  SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToKML__SWIG_0(OGRGeometryShadow *self,char const *altitude_mode=NULL){
      return (retStringAndCPLFree *) OGR_G_ExportToKML(self, altitude_mode);
    }
  SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToJson__SWIG_0(OGRGeometryShadow *self,char **options=0){
      return (retStringAndCPLFree *) OGR_G_ExportToJsonEx(self, options);
    }
  SWIGINTERN void OGRGeometryShadow_AddPoint__SWIG_0(OGRGeometryShadow *self,double x,double y,double z=0){
      OGR_G_AddPoint( self, x, y, z );
    }
  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 retGetPoints *OGRGeometryShadow_GetPoints__SWIG_0(OGRGeometryShadow *self,int *pnCount,double **ppadfXY,double **ppadfZ,int nCoordDimension=0){
      int nPoints = OGR_G_GetPointCount(self);
      *pnCount = nPoints;
      if (nPoints == 0)
      {
          *ppadfXY = NULL;
          *ppadfZ = NULL;
      }
      *ppadfXY = (double*)VSIMalloc(2 * sizeof(double) * nPoints);
      if (*ppadfXY == NULL)
      {
          CPLError(CE_Failure, CPLE_OutOfMemory, "Cannot allocate resulting array");
          *pnCount = 0;
          return NULL;
      }
      if (nCoordDimension <= 0)
          nCoordDimension = OGR_G_GetCoordinateDimension(self);
      *ppadfZ = (nCoordDimension == 3) ? (double*)VSIMalloc(sizeof(double) * nPoints) : NULL;
      OGR_G_GetPoints(self,
                      *ppadfXY, 2 * sizeof(double),
                      (*ppadfXY) + 1, 2 * sizeof(double),
                      *ppadfZ, sizeof(double));
      return NULL;
    }
  SWIGINTERN double OGRGeometryShadow_GetX__SWIG_0(OGRGeometryShadow *self,int point=0){
      return OGR_G_GetX(self, point);
    }
  SWIGINTERN double OGRGeometryShadow_GetY__SWIG_0(OGRGeometryShadow *self,int point=0){
      return OGR_G_GetY(self, point);
    }
  SWIGINTERN double OGRGeometryShadow_GetZ__SWIG_0(OGRGeometryShadow *self,int point=0){
      return OGR_G_GetZ(self, point);
    }
  SWIGINTERN void OGRGeometryShadow_GetPoint(OGRGeometryShadow *self,int iPoint,double argout[3]){
  
  
  
      OGR_G_GetPoint( self, iPoint, argout+0, argout+1, argout+2 );
    }
  SWIGINTERN void OGRGeometryShadow_GetPoint_2D(OGRGeometryShadow *self,int iPoint,double argout[2]){
  
  
  
      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__SWIG_0(OGRGeometryShadow *self,int point,double x,double y,double z=0){
      OGR_G_SetPoint(self, point, x, y, z);
    }
  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_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__SWIG_0(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 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,double argout[4]){
      OGR_G_GetEnvelope(self, (OGREnvelope*)argout);
    }
  SWIGINTERN void OGRGeometryShadow_GetEnvelope3D(OGRGeometryShadow *self,double argout[6]){
      OGR_G_GetEnvelope3D(self, (OGREnvelope3D*)argout);
    }
  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 void OGRGeometryShadow_SetCoordinateDimension(OGRGeometryShadow *self,int dimension){
      OGR_G_SetCoordinateDimension(self, dimension);
    }
  SWIGINTERN int OGRGeometryShadow_GetDimension(OGRGeometryShadow *self){
      return OGR_G_GetDimension(self);
    }
  SWIGINTERN OGRGeometryShadow *new_OGRGeometryShadow__SWIG_0(OGRwkbGeometryType type,char *wkt,int nLen,unsigned char *pBuf,char const *gml){
      if (type != wkbUnknown ) {
        return (OGRGeometryShadow*) OGR_G_CreateGeometry( type );
      }
      else if ( wkt != 0 ) {
        return CreateGeometryFromWkt( &wkt );
      }
      else if ( nLen != 0 ) {
        return CreateGeometryFromWkb( nLen, pBuf );
      }
      else if ( gml != 0 ) {
        return CreateGeometryFromGML( gml );
      }
      // throw?
      else return 0;
    }
  SWIGINTERN OGRGeometryShadow *new_OGRGeometryShadow__SWIG_1(OGRwkbGeometryType type){
      if (type != wkbUnknown ) {
        return (OGRGeometryShadow*) OGR_G_CreateGeometry( type );
      }
      // throw?
      else return 0;
    }
  SWIGINTERN retStringAndCPLFree *OGRGeometryShadow_ExportToWkt__SWIG_1(OGRGeometryShadow *self){
         char* argout = NULL;
         OGR_G_ExportToWkt(self, &argout);
         return argout;
     }
  
  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 );
  }
  
  
    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;
    }
  
  
  OGRDriverShadow* GetDriverByName( char const *name ) {
    return (OGRDriverShadow*) OGRGetDriverByName( name );
  }
  
  OGRDriverShadow* GetDriver(int driver_number) {
    return (OGRDriverShadow*) OGRGetDriver(driver_number);
  }
  
  
    char **GeneralCmdLineProcessor( char **papszArgv, int nOptions = 0 ) {
      int nResArgCount;
      
      /* We must add a 'dummy' element in front of the real argument list */
      /* as Java doesn't include the binary name as the first */
      /* argument, as C does... */
      char** papszArgvModBefore = CSLInsertString(CSLDuplicate(papszArgv), 0, "dummy");
      char** papszArgvModAfter = papszArgvModBefore;
  
      nResArgCount = 
        OGRGeneralCmdLineProcessor( CSLCount(papszArgvModBefore), &papszArgvModAfter, nOptions ); 
  
      CSLDestroy(papszArgvModBefore);
  
      if( nResArgCount <= 0 )
      {
          return NULL;
      }
      else
      {
          /* Now, remove the first dummy element */
          char** papszRet = CSLDuplicate(papszArgvModAfter + 1);
          CSLDestroy(papszArgvModAfter);
          return papszRet;
      }
    }
  
  
  #ifdef __cplusplus
  extern "C" {
  #endif
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_UseExceptions(JNIEnv *jenv, jclass jcls) {
    (void)jenv;
    (void)jcls;
    UseExceptions();
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_DontUseExceptions(JNIEnv *jenv, jclass jcls) {
    (void)jenv;
    (void)jcls;
    DontUseExceptions();
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_delete_1ProgressCallback(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    ProgressCallback *arg1 = (ProgressCallback *) 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(ProgressCallback **)&jarg1; 
    delete arg1;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_ProgressCallback_1run(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jstring jarg3) {
    jint jresult = 0 ;
    ProgressCallback *arg1 = (ProgressCallback *) 0 ;
    double arg2 ;
    char *arg3 = (char *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(ProgressCallback **)&jarg1; 
    arg2 = (double)jarg2; 
    arg3 = 0;
    if (jarg3) {
      arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
      if (!arg3) return 0;
    }
    result = (int)(arg1)->run(arg2,(char const *)arg3);
    jresult = (jint)result; 
    if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_new_1ProgressCallback(JNIEnv *jenv, jclass jcls) {
    jlong jresult = 0 ;
    ProgressCallback *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    result = (ProgressCallback *)new ProgressCallback();
    *(ProgressCallback **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_new_1TermProgressCallback(JNIEnv *jenv, jclass jcls) {
    jlong jresult = 0 ;
    TermProgressCallback *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    result = (TermProgressCallback *)new TermProgressCallback();
    *(TermProgressCallback **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_TermProgressCallback_1run(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jstring jarg3) {
    jint jresult = 0 ;
    TermProgressCallback *arg1 = (TermProgressCallback *) 0 ;
    double arg2 ;
    char *arg3 = (char *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(TermProgressCallback **)&jarg1; 
    arg2 = (double)jarg2; 
    arg3 = 0;
    if (jarg3) {
      arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
      if (!arg3) return 0;
    }
    result = (int)(arg1)->run(arg2,(char const *)arg3);
    jresult = (jint)result; 
    if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_delete_1TermProgressCallback(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    TermProgressCallback *arg1 = (TermProgressCallback *) 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(TermProgressCallback **)&jarg1; 
    delete arg1;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_new_1StyleTable(JNIEnv *jenv, jclass jcls) {
    jlong jresult = 0 ;
    OGRStyleTableShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    result = (OGRStyleTableShadow *)new_OGRStyleTableShadow();
    *(OGRStyleTableShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_delete_1StyleTable(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(OGRStyleTableShadow **)&jarg1; 
    delete_OGRStyleTableShadow(arg1);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_StyleTable_1AddStyle(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
    jint jresult = 0 ;
    OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *arg3 = (char *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRStyleTableShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    arg3 = 0;
    if (jarg3) {
      arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
      if (!arg3) return 0;
    }
    result = (int)OGRStyleTableShadow_AddStyle(arg1,(char const *)arg2,(char const *)arg3);
    jresult = (jint)result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_StyleTable_1LoadStyleTable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jint jresult = 0 ;
    OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRStyleTableShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    result = (int)OGRStyleTableShadow_LoadStyleTable(arg1,(char const *)arg2);
    jresult = (jint)result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_StyleTable_1SaveStyleTable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jint jresult = 0 ;
    OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRStyleTableShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    result = (int)OGRStyleTableShadow_SaveStyleTable(arg1,(char const *)arg2);
    jresult = (jint)result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_StyleTable_1Find(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jstring jresult = 0 ;
    OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRStyleTableShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    result = (char *)OGRStyleTableShadow_Find(arg1,(char const *)arg2);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_StyleTable_1ResetStyleStringReading(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRStyleTableShadow **)&jarg1; 
    OGRStyleTableShadow_ResetStyleStringReading(arg1);
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_StyleTable_1GetNextStyle(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRStyleTableShadow **)&jarg1; 
    result = (char *)OGRStyleTableShadow_GetNextStyle(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_StyleTable_1GetLastStyleName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRStyleTableShadow *arg1 = (OGRStyleTableShadow *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRStyleTableShadow **)&jarg1; 
    result = (char *)OGRStyleTableShadow_GetLastStyleName(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_Driver_1name_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDriverShadow **)&jarg1; 
    result = (char *)OGRDriverShadow_name_get(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Driver_1CreateDataSource_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jobject jarg3) {
    jlong jresult = 0 ;
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char **arg3 = (char **) 0 ;
    OGRDataSourceShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDriverShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      /* %typemap(in) char **options */
      arg3 = NULL;
      if(jarg3 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg3, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg3);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg3 = CSLAddString(arg3,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    result = (OGRDataSourceShadow *)OGRDriverShadow_CreateDataSource__SWIG_0(arg1,(char const *)arg2,arg3);
    *(OGRDataSourceShadow **)&jresult = result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg3 );
    }
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Driver_1CreateDataSource_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jlong jresult = 0 ;
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRDataSourceShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDriverShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    result = (OGRDataSourceShadow *)OGRDriverShadow_CreateDataSource__SWIG_0(arg1,(char const *)arg2);
    *(OGRDataSourceShadow **)&jresult = result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Driver_1CopyDataSource_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jstring jarg3, jobject jarg4) {
    jlong jresult = 0 ;
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    OGRDataSourceShadow *arg2 = (OGRDataSourceShadow *) 0 ;
    char *arg3 = (char *) 0 ;
    char **arg4 = (char **) 0 ;
    OGRDataSourceShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRDriverShadow **)&jarg1; 
    arg2 = *(OGRDataSourceShadow **)&jarg2; 
    arg3 = 0;
    if (jarg3) {
      arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
      if (!arg3) return 0;
    }
    {
      /* %typemap(in) char **options */
      arg4 = NULL;
      if(jarg4 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg4, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg4);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg4 = CSLAddString(arg4,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    result = (OGRDataSourceShadow *)OGRDriverShadow_CopyDataSource__SWIG_0(arg1,arg2,(char const *)arg3,arg4);
    *(OGRDataSourceShadow **)&jresult = result; 
    if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg4 );
    }
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Driver_1CopyDataSource_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jstring jarg3) {
    jlong jresult = 0 ;
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    OGRDataSourceShadow *arg2 = (OGRDataSourceShadow *) 0 ;
    char *arg3 = (char *) 0 ;
    OGRDataSourceShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRDriverShadow **)&jarg1; 
    arg2 = *(OGRDataSourceShadow **)&jarg2; 
    arg3 = 0;
    if (jarg3) {
      arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
      if (!arg3) return 0;
    }
    result = (OGRDataSourceShadow *)OGRDriverShadow_CopyDataSource__SWIG_0(arg1,arg2,(char const *)arg3);
    *(OGRDataSourceShadow **)&jresult = result; 
    if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Driver_1Open_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
    jlong jresult = 0 ;
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int arg3 ;
    OGRDataSourceShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDriverShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    arg3 = (int)jarg3; 
    result = (OGRDataSourceShadow *)OGRDriverShadow_Open__SWIG_0(arg1,(char const *)arg2,arg3);
    *(OGRDataSourceShadow **)&jresult = result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Driver_1Open_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jlong jresult = 0 ;
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRDataSourceShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDriverShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    result = (OGRDataSourceShadow *)OGRDriverShadow_Open__SWIG_0(arg1,(char const *)arg2);
    *(OGRDataSourceShadow **)&jresult = result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Driver_1DeleteDataSource(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jint jresult = 0 ;
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDriverShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    result = (OGRErr)OGRDriverShadow_DeleteDataSource(arg1,(char const *)arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Driver_1TestCapability(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jboolean jresult = 0 ;
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDriverShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (bool)OGRDriverShadow_TestCapability(arg1,(char const *)arg2);
    jresult = (jboolean)result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_Driver_1GetName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDriverShadow **)&jarg1; 
    result = (char *)OGRDriverShadow_GetName(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Driver_1Register(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDriverShadow **)&jarg1; 
    OGRDriverShadow_Register(arg1);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Driver_1Deregister(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    OGRDriverShadow *arg1 = (OGRDriverShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDriverShadow **)&jarg1; 
    OGRDriverShadow_Deregister(arg1);
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1name_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    result = (char *)OGRDataSourceShadow_name_get(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_delete_1DataSource(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    delete_OGRDataSourceShadow(arg1);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1GetRefCount(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    result = (int)OGRDataSourceShadow_GetRefCount(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1GetSummaryRefCount(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    result = (int)OGRDataSourceShadow_GetSummaryRefCount(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1GetLayerCount(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    result = (int)OGRDataSourceShadow_GetLayerCount(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1GetDriver(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    OGRDriverShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    result = (OGRDriverShadow *)OGRDataSourceShadow_GetDriver(arg1);
    *(OGRDriverShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1GetName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    result = (char *)OGRDataSourceShadow_GetName(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1DeleteLayer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jint jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    int arg2 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (OGRErr)OGRDataSourceShadow_DeleteLayer(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1SyncToDisk(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    result = (OGRErr)OGRDataSourceShadow_SyncToDisk(arg1);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1CreateLayer_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_, jint jarg4, jobject jarg5) {
    jlong jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) 0 ;
    OGRwkbGeometryType arg4 ;
    char **arg5 = (char **) 0 ;
    OGRLayerShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg3_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    arg3 = *(OSRSpatialReferenceShadow **)&jarg3; 
    arg4 = (OGRwkbGeometryType)jarg4; 
    {
      /* %typemap(in) char **options */
      arg5 = NULL;
      if(jarg5 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg5, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg5);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg5 = CSLAddString(arg5,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRLayerShadow *)OGRDataSourceShadow_CreateLayer__SWIG_0(arg1,(char const *)arg2,arg3,arg4,arg5);
    *(OGRLayerShadow **)&jresult = result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg5 );
    }
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1CreateLayer_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_, jint jarg4) {
    jlong jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) 0 ;
    OGRwkbGeometryType arg4 ;
    OGRLayerShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg3_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    arg3 = *(OSRSpatialReferenceShadow **)&jarg3; 
    arg4 = (OGRwkbGeometryType)jarg4; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRLayerShadow *)OGRDataSourceShadow_CreateLayer__SWIG_0(arg1,(char const *)arg2,arg3,arg4);
    *(OGRLayerShadow **)&jresult = result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1CreateLayer_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_) {
    jlong jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) 0 ;
    OGRLayerShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg3_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    arg3 = *(OSRSpatialReferenceShadow **)&jarg3; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRLayerShadow *)OGRDataSourceShadow_CreateLayer__SWIG_0(arg1,(char const *)arg2,arg3);
    *(OGRLayerShadow **)&jresult = result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1CreateLayer_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jlong jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRLayerShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRLayerShadow *)OGRDataSourceShadow_CreateLayer__SWIG_0(arg1,(char const *)arg2);
    *(OGRLayerShadow **)&jresult = result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1CopyLayer_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jstring jarg3, jobject jarg4) {
    jlong jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    char *arg3 = (char *) 0 ;
    char **arg4 = (char **) 0 ;
    OGRLayerShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = 0;
    if (jarg3) {
      arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
      if (!arg3) return 0;
    }
    {
      /* %typemap(in) char **options */
      arg4 = NULL;
      if(jarg4 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg4, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg4);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg4 = CSLAddString(arg4,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRLayerShadow *)OGRDataSourceShadow_CopyLayer__SWIG_0(arg1,arg2,(char const *)arg3,arg4);
    *(OGRLayerShadow **)&jresult = result; 
    if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg4 );
    }
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1CopyLayer_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jstring jarg3) {
    jlong jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    char *arg3 = (char *) 0 ;
    OGRLayerShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = 0;
    if (jarg3) {
      arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
      if (!arg3) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRLayerShadow *)OGRDataSourceShadow_CopyLayer__SWIG_0(arg1,arg2,(char const *)arg3);
    *(OGRLayerShadow **)&jresult = result; 
    if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1GetLayerByIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jlong jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    int arg2 ;
    OGRLayerShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (OGRLayerShadow *)OGRDataSourceShadow_GetLayerByIndex(arg1,arg2);
    *(OGRLayerShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1GetLayerByName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jlong jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRLayerShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    result = (OGRLayerShadow *)OGRDataSourceShadow_GetLayerByName(arg1,(char const *)arg2);
    *(OGRLayerShadow **)&jresult = result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1TestCapability(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jboolean jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (bool)OGRDataSourceShadow_TestCapability(arg1,(char const *)arg2);
    jresult = (jboolean)result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1ExecuteSQL_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_, jstring jarg4) {
    jlong jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
    char *arg4 = (char *) 0 ;
    OGRLayerShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg3_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    arg3 = *(OGRGeometryShadow **)&jarg3; 
    arg4 = 0;
    if (jarg4) {
      arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
      if (!arg4) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRLayerShadow *)OGRDataSourceShadow_ExecuteSQL__SWIG_0(arg1,(char const *)arg2,arg3,(char const *)arg4);
    *(OGRLayerShadow **)&jresult = result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1ExecuteSQL_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_) {
    jlong jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
    OGRLayerShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg3_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    arg3 = *(OGRGeometryShadow **)&jarg3; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRLayerShadow *)OGRDataSourceShadow_ExecuteSQL__SWIG_0(arg1,(char const *)arg2,arg3);
    *(OGRLayerShadow **)&jresult = result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1ExecuteSQL_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jlong jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRLayerShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRLayerShadow *)OGRDataSourceShadow_ExecuteSQL__SWIG_0(arg1,(char const *)arg2);
    *(OGRLayerShadow **)&jresult = result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1ReleaseResultSet(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    OGRDataSourceShadow_ReleaseResultSet(arg1,arg2);
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1GetStyleTable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    OGRStyleTableShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    result = (OGRStyleTableShadow *)OGRDataSourceShadow_GetStyleTable(arg1);
    *(OGRStyleTableShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_DataSource_1SetStyleTable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    OGRDataSourceShadow *arg1 = (OGRDataSourceShadow *) 0 ;
    OGRStyleTableShadow *arg2 = (OGRStyleTableShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRDataSourceShadow **)&jarg1; 
    arg2 = *(OGRStyleTableShadow **)&jarg2; 
    OGRDataSourceShadow_SetStyleTable(arg1,arg2);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1GetRefCount(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    result = (int)OGRLayerShadow_GetRefCount(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1SetSpatialFilter_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    OGRLayerShadow_SetSpatialFilter__SWIG_0(arg1,arg2);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1SetSpatialFilterRect_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    double arg2 ;
    double arg3 ;
    double arg4 ;
    double arg5 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = (double)jarg2; 
    arg3 = (double)jarg3; 
    arg4 = (double)jarg4; 
    arg5 = (double)jarg5; 
    OGRLayerShadow_SetSpatialFilterRect__SWIG_0(arg1,arg2,arg3,arg4,arg5);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1SetSpatialFilter_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jlong jarg3, jobject jarg3_) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    int arg2 ;
    OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    arg3 = *(OGRGeometryShadow **)&jarg3; 
    OGRLayerShadow_SetSpatialFilter__SWIG_1(arg1,arg2,arg3);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1SetSpatialFilterRect_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    int arg2 ;
    double arg3 ;
    double arg4 ;
    double arg5 ;
    double arg6 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    arg3 = (double)jarg3; 
    arg4 = (double)jarg4; 
    arg5 = (double)jarg5; 
    arg6 = (double)jarg6; 
    OGRLayerShadow_SetSpatialFilterRect__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1GetSpatialFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    result = (OGRGeometryShadow *)OGRLayerShadow_GetSpatialFilter(arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1SetAttributeFilter(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    result = (OGRErr)OGRLayerShadow_SetAttributeFilter(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1ResetReading(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    OGRLayerShadow_ResetReading(arg1);
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1GetName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    result = (char *)OGRLayerShadow_GetName(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1GetGeomType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRwkbGeometryType result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    result = (OGRwkbGeometryType)OGRLayerShadow_GetGeomType(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1GetGeometryColumn(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    result = (char *)OGRLayerShadow_GetGeometryColumn(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1GetFIDColumn(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    result = (char *)OGRLayerShadow_GetFIDColumn(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1GetFeature(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jlong jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    long arg2 ;
    OGRFeatureShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = (long)jarg2; 
    result = (OGRFeatureShadow *)OGRLayerShadow_GetFeature(arg1,arg2);
    *(OGRFeatureShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1GetNextFeature(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRFeatureShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    result = (OGRFeatureShadow *)OGRLayerShadow_GetNextFeature(arg1);
    *(OGRFeatureShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1SetNextByIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    long arg2 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = (long)jarg2; 
    result = (OGRErr)OGRLayerShadow_SetNextByIndex(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1SetFeature(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRFeatureShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRErr)OGRLayerShadow_SetFeature(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1CreateFeature(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRFeatureShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRErr)OGRLayerShadow_CreateFeature(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1DeleteFeature(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    long arg2 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = (long)jarg2; 
    result = (OGRErr)OGRLayerShadow_DeleteFeature(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1SyncToDisk(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    result = (OGRErr)OGRLayerShadow_SyncToDisk(arg1);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1GetLayerDefn(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRFeatureDefnShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    result = (OGRFeatureDefnShadow *)OGRLayerShadow_GetLayerDefn(arg1);
    *(OGRFeatureDefnShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1GetFeatureCount_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    int arg2 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (int)OGRLayerShadow_GetFeatureCount__SWIG_0(arg1,arg2);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1GetFeatureCount_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    result = (int)OGRLayerShadow_GetFeatureCount__SWIG_0(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1GetExtent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdoubleArray jarg2, jint jarg3) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    double *arg2 ;
    int arg3 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    {
      /* %typemap(in) (double argout[ANY]) */
      if(jarg2 == NULL || jenv->GetArrayLength(jarg2) != 4) {
        char errorMsg[512];
        sprintf(errorMsg, "array of size %d expected", 4);
        SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, errorMsg);
        return 0;
      }
      arg2 = (double *)jenv->GetDoubleArrayElements(jarg2, NULL);
    }
    arg3 = (int)jarg3; 
    result = (OGRErr)OGRLayerShadow_GetExtent(arg1,arg2,arg3);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(argout) (double argout[ANY]) */
    }
    {
      /* %typemap(freearg) (double argout[ANY]) */
      jenv->ReleaseDoubleArrayElements(jarg2, (jdouble *)arg2, 0);
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1TestCapability(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jboolean jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (bool)OGRLayerShadow_TestCapability(arg1,(char const *)arg2);
    jresult = (jboolean)result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1CreateField_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jint jarg3) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
    int arg3 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRFieldDefnShadow **)&jarg2; 
    arg3 = (int)jarg3; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRErr)OGRLayerShadow_CreateField__SWIG_0(arg1,arg2,arg3);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1CreateField_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRFieldDefnShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRErr)OGRLayerShadow_CreateField__SWIG_0(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1DeleteField(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    int arg2 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (OGRErr)OGRLayerShadow_DeleteField(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1ReorderField(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    arg3 = (int)jarg3; 
    result = (OGRErr)OGRLayerShadow_ReorderField(arg1,arg2,arg3);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1ReorderFields(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jintArray jarg2) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    int arg2 ;
    int *arg3 = (int *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    {
      /* %typemap(in) (int nList, int* pList) */
      /* check if is List */
      if (jarg2)
      {
        arg2 = jenv->GetArrayLength(jarg2);
        if (arg2 == 0)
        arg3 = NULL;
        else
        arg3 = (int *)jenv->GetIntArrayElements(jarg2, NULL);
      }
      else
      {
        arg2 = 0;
        arg3 = NULL;
      }
    }
    result = (OGRErr)OGRLayerShadow_ReorderFields(arg1,arg2,arg3);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(argout) (int nList, int* pList) */
    }
    {
      /* %typemap(freearg) (int nList, int* pList) */
      if (arg3) {
        jenv->ReleaseIntArrayElements(jarg2, (jint*)arg3, JNI_ABORT);
      }
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1AlterFieldDefn(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jlong jarg3, jobject jarg3_, jint jarg4) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    int arg2 ;
    OGRFieldDefnShadow *arg3 = (OGRFieldDefnShadow *) 0 ;
    int arg4 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    arg3 = *(OGRFieldDefnShadow **)&jarg3; 
    arg4 = (int)jarg4; 
    {
      if (!arg3) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRErr)OGRLayerShadow_AlterFieldDefn(arg1,arg2,arg3,arg4);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1CreateGeomField_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jint jarg3) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRGeomFieldDefnShadow *arg2 = (OGRGeomFieldDefnShadow *) 0 ;
    int arg3 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRGeomFieldDefnShadow **)&jarg2; 
    arg3 = (int)jarg3; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRErr)OGRLayerShadow_CreateGeomField__SWIG_0(arg1,arg2,arg3);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1CreateGeomField_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRGeomFieldDefnShadow *arg2 = (OGRGeomFieldDefnShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRGeomFieldDefnShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRErr)OGRLayerShadow_CreateGeomField__SWIG_0(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1StartTransaction(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    result = (OGRErr)OGRLayerShadow_StartTransaction(arg1);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1CommitTransaction(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    result = (OGRErr)OGRLayerShadow_CommitTransaction(arg1);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1RollbackTransaction(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    result = (OGRErr)OGRLayerShadow_RollbackTransaction(arg1);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1FindFieldIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int arg3 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    arg3 = (int)jarg3; 
    result = (int)OGRLayerShadow_FindFieldIndex(arg1,(char const *)arg2,arg3);
    jresult = (jint)result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1GetSpatialRef(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OSRSpatialReferenceShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    result = (OSRSpatialReferenceShadow *)OGRLayerShadow_GetSpatialRef(arg1);
    *(OSRSpatialReferenceShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1GetFeaturesRead(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    GIntBig result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    result = OGRLayerShadow_GetFeaturesRead(arg1);
    {
      /* %typemap(out) (GIntBig) */
      jresult = result;
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1SetIgnoredFields(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobject jarg2) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    {
      /* %typemap(in) char **options */
      arg2 = NULL;
      if(jarg2 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg2, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg2);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg2 = CSLAddString(arg2,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    result = (OGRErr)OGRLayerShadow_SetIgnoredFields(arg1,(char const **)arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg2 );
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Intersection_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jobject jarg4, jobject jarg5) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    char **arg4 = (char **) 0 ;
    GDALProgressFunc arg5 ;
    void *arg6 = (void *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    JavaProgressData sProgressInfo;
    sProgressInfo.jenv = jenv;
    sProgressInfo.pJavaCallback = NULL;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    {
      /* %typemap(in) char **options */
      arg4 = NULL;
      if(jarg4 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg4, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg4);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg4 = CSLAddString(arg4,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    {
      if ( jarg5 != 0 ) {
        sProgressInfo.pJavaCallback = jarg5;
        arg5 = JavaProgressProxy;
        arg6 = &sProgressInfo;
      }
      else
      {
        arg5 = NULL;
        arg6 = NULL;
      }
    }
    result = (OGRErr)OGRLayerShadow_Intersection__SWIG_0(arg1,arg2,arg3,arg4,arg5,arg6);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg4 );
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Intersection_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jobject jarg4) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    char **arg4 = (char **) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    {
      /* %typemap(in) char **options */
      arg4 = NULL;
      if(jarg4 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg4, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg4);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg4 = CSLAddString(arg4,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    result = (OGRErr)OGRLayerShadow_Intersection__SWIG_0(arg1,arg2,arg3,arg4);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg4 );
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Intersection_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    result = (OGRErr)OGRLayerShadow_Intersection__SWIG_0(arg1,arg2,arg3);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Union_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jobject jarg4, jobject jarg5) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    char **arg4 = (char **) 0 ;
    GDALProgressFunc arg5 ;
    void *arg6 = (void *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    JavaProgressData sProgressInfo;
    sProgressInfo.jenv = jenv;
    sProgressInfo.pJavaCallback = NULL;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    {
      /* %typemap(in) char **options */
      arg4 = NULL;
      if(jarg4 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg4, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg4);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg4 = CSLAddString(arg4,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    {
      if ( jarg5 != 0 ) {
        sProgressInfo.pJavaCallback = jarg5;
        arg5 = JavaProgressProxy;
        arg6 = &sProgressInfo;
      }
      else
      {
        arg5 = NULL;
        arg6 = NULL;
      }
    }
    result = (OGRErr)OGRLayerShadow_Union__SWIG_0(arg1,arg2,arg3,arg4,arg5,arg6);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg4 );
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Union_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jobject jarg4) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    char **arg4 = (char **) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    {
      /* %typemap(in) char **options */
      arg4 = NULL;
      if(jarg4 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg4, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg4);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg4 = CSLAddString(arg4,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    result = (OGRErr)OGRLayerShadow_Union__SWIG_0(arg1,arg2,arg3,arg4);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg4 );
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Union_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    result = (OGRErr)OGRLayerShadow_Union__SWIG_0(arg1,arg2,arg3);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1SymDifference_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jobject jarg4, jobject jarg5) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    char **arg4 = (char **) 0 ;
    GDALProgressFunc arg5 ;
    void *arg6 = (void *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    JavaProgressData sProgressInfo;
    sProgressInfo.jenv = jenv;
    sProgressInfo.pJavaCallback = NULL;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    {
      /* %typemap(in) char **options */
      arg4 = NULL;
      if(jarg4 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg4, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg4);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg4 = CSLAddString(arg4,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    {
      if ( jarg5 != 0 ) {
        sProgressInfo.pJavaCallback = jarg5;
        arg5 = JavaProgressProxy;
        arg6 = &sProgressInfo;
      }
      else
      {
        arg5 = NULL;
        arg6 = NULL;
      }
    }
    result = (OGRErr)OGRLayerShadow_SymDifference__SWIG_0(arg1,arg2,arg3,arg4,arg5,arg6);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg4 );
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1SymDifference_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jobject jarg4) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    char **arg4 = (char **) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    {
      /* %typemap(in) char **options */
      arg4 = NULL;
      if(jarg4 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg4, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg4);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg4 = CSLAddString(arg4,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    result = (OGRErr)OGRLayerShadow_SymDifference__SWIG_0(arg1,arg2,arg3,arg4);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg4 );
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1SymDifference_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    result = (OGRErr)OGRLayerShadow_SymDifference__SWIG_0(arg1,arg2,arg3);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Identity_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jobject jarg4, jobject jarg5) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    char **arg4 = (char **) 0 ;
    GDALProgressFunc arg5 ;
    void *arg6 = (void *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    JavaProgressData sProgressInfo;
    sProgressInfo.jenv = jenv;
    sProgressInfo.pJavaCallback = NULL;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    {
      /* %typemap(in) char **options */
      arg4 = NULL;
      if(jarg4 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg4, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg4);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg4 = CSLAddString(arg4,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    {
      if ( jarg5 != 0 ) {
        sProgressInfo.pJavaCallback = jarg5;
        arg5 = JavaProgressProxy;
        arg6 = &sProgressInfo;
      }
      else
      {
        arg5 = NULL;
        arg6 = NULL;
      }
    }
    result = (OGRErr)OGRLayerShadow_Identity__SWIG_0(arg1,arg2,arg3,arg4,arg5,arg6);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg4 );
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Identity_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jobject jarg4) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    char **arg4 = (char **) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    {
      /* %typemap(in) char **options */
      arg4 = NULL;
      if(jarg4 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg4, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg4);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg4 = CSLAddString(arg4,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    result = (OGRErr)OGRLayerShadow_Identity__SWIG_0(arg1,arg2,arg3,arg4);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg4 );
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Identity_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    result = (OGRErr)OGRLayerShadow_Identity__SWIG_0(arg1,arg2,arg3);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Update_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jobject jarg4, jobject jarg5) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    char **arg4 = (char **) 0 ;
    GDALProgressFunc arg5 ;
    void *arg6 = (void *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    JavaProgressData sProgressInfo;
    sProgressInfo.jenv = jenv;
    sProgressInfo.pJavaCallback = NULL;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    {
      /* %typemap(in) char **options */
      arg4 = NULL;
      if(jarg4 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg4, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg4);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg4 = CSLAddString(arg4,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    {
      if ( jarg5 != 0 ) {
        sProgressInfo.pJavaCallback = jarg5;
        arg5 = JavaProgressProxy;
        arg6 = &sProgressInfo;
      }
      else
      {
        arg5 = NULL;
        arg6 = NULL;
      }
    }
    result = (OGRErr)OGRLayerShadow_Update__SWIG_0(arg1,arg2,arg3,arg4,arg5,arg6);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg4 );
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Update_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jobject jarg4) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    char **arg4 = (char **) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    {
      /* %typemap(in) char **options */
      arg4 = NULL;
      if(jarg4 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg4, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg4);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg4 = CSLAddString(arg4,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    result = (OGRErr)OGRLayerShadow_Update__SWIG_0(arg1,arg2,arg3,arg4);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg4 );
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Update_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    result = (OGRErr)OGRLayerShadow_Update__SWIG_0(arg1,arg2,arg3);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Clip_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jobject jarg4, jobject jarg5) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    char **arg4 = (char **) 0 ;
    GDALProgressFunc arg5 ;
    void *arg6 = (void *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    JavaProgressData sProgressInfo;
    sProgressInfo.jenv = jenv;
    sProgressInfo.pJavaCallback = NULL;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    {
      /* %typemap(in) char **options */
      arg4 = NULL;
      if(jarg4 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg4, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg4);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg4 = CSLAddString(arg4,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    {
      if ( jarg5 != 0 ) {
        sProgressInfo.pJavaCallback = jarg5;
        arg5 = JavaProgressProxy;
        arg6 = &sProgressInfo;
      }
      else
      {
        arg5 = NULL;
        arg6 = NULL;
      }
    }
    result = (OGRErr)OGRLayerShadow_Clip__SWIG_0(arg1,arg2,arg3,arg4,arg5,arg6);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg4 );
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Clip_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jobject jarg4) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    char **arg4 = (char **) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    {
      /* %typemap(in) char **options */
      arg4 = NULL;
      if(jarg4 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg4, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg4);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg4 = CSLAddString(arg4,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    result = (OGRErr)OGRLayerShadow_Clip__SWIG_0(arg1,arg2,arg3,arg4);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg4 );
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Clip_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    result = (OGRErr)OGRLayerShadow_Clip__SWIG_0(arg1,arg2,arg3);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Erase_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jobject jarg4, jobject jarg5) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    char **arg4 = (char **) 0 ;
    GDALProgressFunc arg5 ;
    void *arg6 = (void *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    JavaProgressData sProgressInfo;
    sProgressInfo.jenv = jenv;
    sProgressInfo.pJavaCallback = NULL;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    {
      /* %typemap(in) char **options */
      arg4 = NULL;
      if(jarg4 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg4, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg4);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg4 = CSLAddString(arg4,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    {
      if ( jarg5 != 0 ) {
        sProgressInfo.pJavaCallback = jarg5;
        arg5 = JavaProgressProxy;
        arg6 = &sProgressInfo;
      }
      else
      {
        arg5 = NULL;
        arg6 = NULL;
      }
    }
    result = (OGRErr)OGRLayerShadow_Erase__SWIG_0(arg1,arg2,arg3,arg4,arg5,arg6);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg4 );
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Erase_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jobject jarg4) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    char **arg4 = (char **) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    {
      /* %typemap(in) char **options */
      arg4 = NULL;
      if(jarg4 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg4, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg4);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg4 = CSLAddString(arg4,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    result = (OGRErr)OGRLayerShadow_Erase__SWIG_0(arg1,arg2,arg3,arg4);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg4 );
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1Erase_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) {
    jint jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg2 = (OGRLayerShadow *) 0 ;
    OGRLayerShadow *arg3 = (OGRLayerShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    (void)jarg3_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRLayerShadow **)&jarg2; 
    arg3 = *(OGRLayerShadow **)&jarg3; 
    result = (OGRErr)OGRLayerShadow_Erase__SWIG_0(arg1,arg2,arg3);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1GetStyleTable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRStyleTableShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    result = (OGRStyleTableShadow *)OGRLayerShadow_GetStyleTable(arg1);
    *(OGRStyleTableShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Layer_1SetStyleTable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    OGRLayerShadow *arg1 = (OGRLayerShadow *) 0 ;
    OGRStyleTableShadow *arg2 = (OGRStyleTableShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRLayerShadow **)&jarg1; 
    arg2 = *(OGRStyleTableShadow **)&jarg2; 
    OGRLayerShadow_SetStyleTable(arg1,arg2);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_delete_1Feature(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    delete_OGRFeatureShadow(arg1);
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_new_1Feature(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    OGRFeatureShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    {
      if (!arg1) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRFeatureShadow *)new_OGRFeatureShadow(arg1);
    *(OGRFeatureShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetDefnRef(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRFeatureDefnShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    result = (OGRFeatureDefnShadow *)OGRFeatureShadow_GetDefnRef(arg1);
    *(OGRFeatureDefnShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetGeometry(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    result = (OGRErr)OGRFeatureShadow_SetGeometry(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetGeometryDirectly(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    result = (OGRErr)OGRFeatureShadow_SetGeometryDirectly(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetGeometryRef(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeometryRef(arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetGeomField_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jlong jarg3, jobject jarg3_) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg3_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    arg3 = *(OGRGeometryShadow **)&jarg3; 
    result = (OGRErr)OGRFeatureShadow_SetGeomField__SWIG_0(arg1,arg2,arg3);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetGeomField_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg3_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    arg3 = *(OGRGeometryShadow **)&jarg3; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRErr)OGRFeatureShadow_SetGeomField__SWIG_1(arg1,(char const *)arg2,arg3);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetGeomFieldDirectly_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jlong jarg3, jobject jarg3_) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg3_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    arg3 = *(OGRGeometryShadow **)&jarg3; 
    result = (OGRErr)OGRFeatureShadow_SetGeomFieldDirectly__SWIG_0(arg1,arg2,arg3);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetGeomFieldDirectly_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRGeometryShadow *arg3 = (OGRGeometryShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg3_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    arg3 = *(OGRGeometryShadow **)&jarg3; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRErr)OGRFeatureShadow_SetGeomFieldDirectly__SWIG_1(arg1,(char const *)arg2,arg3);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetGeomFieldRef_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jlong jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeomFieldRef__SWIG_0(arg1,arg2);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetGeomFieldRef_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jlong jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRGeometryShadow *)OGRFeatureShadow_GetGeomFieldRef__SWIG_1(arg1,(char const *)arg2);
    *(OGRGeometryShadow **)&jresult = result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1Clone(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRFeatureShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    result = (OGRFeatureShadow *)OGRFeatureShadow_Clone(arg1);
    *(OGRFeatureShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1Equal(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jboolean jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = *(OGRFeatureShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (bool)OGRFeatureShadow_Equal(arg1,arg2);
    jresult = (jboolean)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetFieldCount(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    result = (int)OGRFeatureShadow_GetFieldCount(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetFieldDefnRef_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jlong jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    OGRFieldDefnShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_0(arg1,arg2);
    *(OGRFieldDefnShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetFieldDefnRef_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jlong jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRFieldDefnShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
    *(OGRFieldDefnShadow **)&jresult = result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetGeomFieldCount(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    result = (int)OGRFeatureShadow_GetGeomFieldCount(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetGeomFieldDefnRef_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jlong jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    OGRGeomFieldDefnShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (OGRGeomFieldDefnShadow *)OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_0(arg1,arg2);
    *(OGRGeomFieldDefnShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetGeomFieldDefnRef_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jlong jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRGeomFieldDefnShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRGeomFieldDefnShadow *)OGRFeatureShadow_GetGeomFieldDefnRef__SWIG_1(arg1,(char const *)arg2);
    *(OGRGeomFieldDefnShadow **)&jresult = result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetFieldAsString_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jstring jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_0(arg1,arg2);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetFieldAsString_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jstring jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_1(arg1,(char const *)arg2);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetFieldAsInteger_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_0(arg1,arg2);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetFieldAsInteger_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_1(arg1,(char const *)arg2);
    jresult = (jint)result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jdouble JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetFieldAsDouble_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jdouble jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    double result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_0(arg1,arg2);
    jresult = (jdouble)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jdouble JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetFieldAsDouble_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jdouble jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    double result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_1(arg1,(char const *)arg2);
    jresult = (jdouble)result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetFieldAsDateTime(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jintArray jarg3, jintArray jarg4, jintArray jarg5, jintArray jarg6, jintArray jarg7, jintArray jarg8, jintArray 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 ;
    int *arg8 = (int *) 0 ;
    int *arg9 = (int *) 0 ;
    int temp3 ;
    int temp4 ;
    int temp5 ;
    int temp6 ;
    int temp7 ;
    int temp8 ;
    int temp9 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    {
      if (!jarg3) {
        SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
        return ;
      }
      if (jenv->GetArrayLength(jarg3) == 0) {
        SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
        return ;
      }
      arg3 = &temp3; 
    }
    {
      if (!jarg4) {
        SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
        return ;
      }
      if (jenv->GetArrayLength(jarg4) == 0) {
        SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
        return ;
      }
      arg4 = &temp4; 
    }
    {
      if (!jarg5) {
        SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
        return ;
      }
      if (jenv->GetArrayLength(jarg5) == 0) {
        SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
        return ;
      }
      arg5 = &temp5; 
    }
    {
      if (!jarg6) {
        SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
        return ;
      }
      if (jenv->GetArrayLength(jarg6) == 0) {
        SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
        return ;
      }
      arg6 = &temp6; 
    }
    {
      if (!jarg7) {
        SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
        return ;
      }
      if (jenv->GetArrayLength(jarg7) == 0) {
        SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
        return ;
      }
      arg7 = &temp7; 
    }
    {
      if (!jarg8) {
        SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
        return ;
      }
      if (jenv->GetArrayLength(jarg8) == 0) {
        SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
        return ;
      }
      arg8 = &temp8; 
    }
    {
      if (!jarg9) {
        SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
        return ;
      }
      if (jenv->GetArrayLength(jarg9) == 0) {
        SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
        return ;
      }
      arg9 = &temp9; 
    }
    OGRFeatureShadow_GetFieldAsDateTime(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    {
      jint jvalue = (jint)temp3;
      jenv->SetIntArrayRegion(jarg3, 0, 1, &jvalue);
    }
    {
      jint jvalue = (jint)temp4;
      jenv->SetIntArrayRegion(jarg4, 0, 1, &jvalue);
    }
    {
      jint jvalue = (jint)temp5;
      jenv->SetIntArrayRegion(jarg5, 0, 1, &jvalue);
    }
    {
      jint jvalue = (jint)temp6;
      jenv->SetIntArrayRegion(jarg6, 0, 1, &jvalue);
    }
    {
      jint jvalue = (jint)temp7;
      jenv->SetIntArrayRegion(jarg7, 0, 1, &jvalue);
    }
    {
      jint jvalue = (jint)temp8;
      jenv->SetIntArrayRegion(jarg8, 0, 1, &jvalue);
    }
    {
      jint jvalue = (jint)temp9;
      jenv->SetIntArrayRegion(jarg9, 0, 1, &jvalue);
    }
    
    
    
    
    
    
    
  }
  
  
  SWIGEXPORT jintArray JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetFieldAsIntegerList(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jintArray jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    int *arg3 = (int *) 0 ;
    int **arg4 = (int **) 0 ;
    int nLen2 ;
    int *pList2 ;
    retIntArray result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    {
      /* %typemap(in) (int id, int *nLen2, const int **pList2) */
      arg2 = jarg2;
      arg3 = &nLen2;
      arg4 = &pList2;
    }
    result = OGRFeatureShadow_GetFieldAsIntegerList(arg1,arg2,arg3,(int const **)arg4);
    {
      
    }
    {
      /* %typemap(argout) (int id, int *nLen, const int **pList) */
      jintArray intArray = jenv->NewIntArray(nLen2);
      jenv->SetIntArrayRegion(intArray, (jsize)0, (jsize)nLen2, (jint*)pList2);
      jresult = intArray;
    }
    {
      /* %typemap(freearg) (int id, int *nLen, const int **pList) */
    }
    return jresult;
  }
  
  
  SWIGEXPORT jdoubleArray JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetFieldAsDoubleList(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jdoubleArray jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    int *arg3 = (int *) 0 ;
    double **arg4 = (double **) 0 ;
    int nLen2 ;
    double *pList2 ;
    retDoubleArray result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    {
      /* %typemap(in) (int id, int *nLen2, const double **pList2) */
      arg2 = jarg2;
      arg3 = &nLen2;
      arg4 = &pList2;
    }
    result = OGRFeatureShadow_GetFieldAsDoubleList(arg1,arg2,arg3,(double const **)arg4);
    {
      
    }
    {
      /* %typemap(argout) (int id, int *nLen, const double **pList) */
      jdoubleArray doubleArray = jenv->NewDoubleArray(nLen2);
      jenv->SetDoubleArrayRegion(doubleArray, (jsize)0, (jsize)nLen2, pList2);
      jresult = doubleArray;
    }
    {
      /* %typemap(freearg) (int id, int *nLen, const double **pList) */
    }
    return jresult;
  }
  
  
  SWIGEXPORT jobjectArray JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetFieldAsStringList(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jobjectArray jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    char **result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (char **)OGRFeatureShadow_GetFieldAsStringList(arg1,arg2);
    {
      /* %typemap(out) char **retAsStringArrayNoFree -> String[] */
      char **stringarray = result;
      int i;
      int len=CSLCount(result);
      jstring temp_string;
      const jclass clazz = jenv->FindClass("java/lang/String");
      
      jresult = jenv->NewObjectArray(len, clazz, NULL);
      /* exception checking omitted */
      
      for (i=0; i<len; i++) {
        temp_string = jenv->NewStringUTF(*stringarray++);
        jenv->SetObjectArrayElement(jresult, i, temp_string);
        jenv->DeleteLocalRef(temp_string);
      }
    }
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1IsFieldSet_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jboolean jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_0(arg1,arg2);
    jresult = (jboolean)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1IsFieldSet_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jboolean jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_1(arg1,(char const *)arg2);
    jresult = (jboolean)result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetFieldIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (int)OGRFeatureShadow_GetFieldIndex(arg1,(char const *)arg2);
    jresult = (jint)result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetGeomFieldIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (int)OGRFeatureShadow_GetGeomFieldIndex(arg1,(char const *)arg2);
    jresult = (jint)result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetFID(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    result = (int)OGRFeatureShadow_GetFID(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetFID(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (OGRErr)OGRFeatureShadow_SetFID(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1DumpReadable(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    OGRFeatureShadow_DumpReadable(arg1);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1UnsetField_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    OGRFeatureShadow_UnsetField__SWIG_0(arg1,arg2);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1UnsetField_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return ;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return ; 
        };
      }
    }
    OGRFeatureShadow_UnsetField__SWIG_1(arg1,(char const *)arg2);
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetField_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jstring jarg3) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    char *arg3 = (char *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    {
      /* %typemap(in) (tostring argin) */
      if (jarg3)
      arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    }
    OGRFeatureShadow_SetField__SWIG_0(arg1,arg2,(char const *)arg3);
    {
      /* %typemap(in) (tostring argin) */
      if (jarg3)
      jenv->ReleaseStringUTFChars(jarg3, (char*)arg3);
    }
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetField_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *arg3 = (char *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return ;
    }
    {
      /* %typemap(in) (tostring argin) */
      if (jarg3)
      arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return ; 
        };
      }
    }
    OGRFeatureShadow_SetField__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    {
      /* %typemap(in) (tostring argin) */
      if (jarg3)
      jenv->ReleaseStringUTFChars(jarg3, (char*)arg3);
    }
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetField_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    arg3 = (int)jarg3; 
    OGRFeatureShadow_SetField__SWIG_2(arg1,arg2,arg3);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetField_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int arg3 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return ;
    }
    arg3 = (int)jarg3; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return ; 
        };
      }
    }
    OGRFeatureShadow_SetField__SWIG_3(arg1,(char const *)arg2,arg3);
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetField_1_1SWIG_14(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jdouble jarg3) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    double arg3 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    arg3 = (double)jarg3; 
    OGRFeatureShadow_SetField__SWIG_4(arg1,arg2,arg3);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetField_1_1SWIG_15(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jdouble jarg3) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    double arg3 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return ;
    }
    arg3 = (double)jarg3; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return ; 
        };
      }
    }
    OGRFeatureShadow_SetField__SWIG_5(arg1,(char const *)arg2,arg3);
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetField_1_1SWIG_16(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jint jarg4, jint jarg5, jint jarg6, jint jarg7, jint jarg8, jint jarg9) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    int arg4 ;
    int arg5 ;
    int arg6 ;
    int arg7 ;
    int arg8 ;
    int arg9 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    arg3 = (int)jarg3; 
    arg4 = (int)jarg4; 
    arg5 = (int)jarg5; 
    arg6 = (int)jarg6; 
    arg7 = (int)jarg7; 
    arg8 = (int)jarg8; 
    arg9 = (int)jarg9; 
    OGRFeatureShadow_SetField__SWIG_6(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetField_1_1SWIG_17(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3, jint jarg4, jint jarg5, jint jarg6, jint jarg7, jint jarg8, jint jarg9) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int arg3 ;
    int arg4 ;
    int arg5 ;
    int arg6 ;
    int arg7 ;
    int arg8 ;
    int arg9 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return ;
    }
    arg3 = (int)jarg3; 
    arg4 = (int)jarg4; 
    arg5 = (int)jarg5; 
    arg6 = (int)jarg6; 
    arg7 = (int)jarg7; 
    arg8 = (int)jarg8; 
    arg9 = (int)jarg9; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return ; 
        };
      }
    }
    OGRFeatureShadow_SetField__SWIG_7(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetFieldIntegerList(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jintArray jarg3) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    int *arg4 = (int *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    {
      /* %typemap(in) (int nList, int* pList) */
      /* check if is List */
      if (jarg3)
      {
        arg3 = jenv->GetArrayLength(jarg3);
        if (arg3 == 0)
        arg4 = NULL;
        else
        arg4 = (int *)jenv->GetIntArrayElements(jarg3, NULL);
      }
      else
      {
        arg3 = 0;
        arg4 = NULL;
      }
    }
    OGRFeatureShadow_SetFieldIntegerList(arg1,arg2,arg3,arg4);
    {
      /* %typemap(argout) (int nList, int* pList) */
    }
    {
      /* %typemap(freearg) (int nList, int* pList) */
      if (arg4) {
        jenv->ReleaseIntArrayElements(jarg3, (jint*)arg4, JNI_ABORT);
      }
    }
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetFieldDoubleList(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jdoubleArray jarg3) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    double *arg4 = (double *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    {
      /* %typemap(in) (int nList, double* pList) */
      /* check if is List */
      if (jarg3)
      {
        arg3 = jenv->GetArrayLength(jarg3);
        if (arg3 == 0)
        arg4 = NULL;
        else
        arg4 = (double *)jenv->GetDoubleArrayElements(jarg3, NULL);
      }
      else
      {
        arg3 = 0;
        arg4 = NULL;
      }
    }
    OGRFeatureShadow_SetFieldDoubleList(arg1,arg2,arg3,arg4);
    {
      /* %typemap(argout) (int nList, double* pList) */
    }
    {
      /* %typemap(freearg) (int nList, double* pList) */
      if (arg4) {
        jenv->ReleaseDoubleArrayElements(jarg3, arg4, JNI_ABORT);
      }
    }
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetFieldStringList(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jobject jarg3) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    char **arg3 = (char **) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    {
      /* %typemap(in) char **options */
      arg3 = NULL;
      if(jarg3 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return ;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg3, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg3);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return ;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg3 = CSLAddString(arg3,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    OGRFeatureShadow_SetFieldStringList(arg1,arg2,arg3);
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg3 );
    }
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetFieldBinaryFromHexString_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jstring jarg3) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    char *arg3 = (char *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    arg3 = 0;
    if (jarg3) {
      arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
      if (!arg3) return ;
    }
    OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_0(arg1,arg2,(char const *)arg3);
    if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetFieldBinaryFromHexString_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    char *arg3 = (char *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return ;
    }
    arg3 = 0;
    if (jarg3) {
      arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
      if (!arg3) return ;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return ; 
        };
      }
    }
    OGRFeatureShadow_SetFieldBinaryFromHexString__SWIG_1(arg1,(char const *)arg2,(char const *)arg3);
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetFrom_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jint jarg3) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    int arg3 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = *(OGRFeatureShadow **)&jarg2; 
    arg3 = (int)jarg3; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRErr)OGRFeatureShadow_SetFrom__SWIG_0(arg1,arg2,arg3);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetFrom_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = *(OGRFeatureShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRErr)OGRFeatureShadow_SetFrom__SWIG_0(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetFromWithMap(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jint jarg3, jintArray jarg4) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    OGRFeatureShadow *arg2 = (OGRFeatureShadow *) 0 ;
    int arg3 ;
    int arg4 ;
    int *arg5 = (int *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = *(OGRFeatureShadow **)&jarg2; 
    arg3 = (int)jarg3; 
    {
      /* %typemap(in) (int nList, int* pList) */
      /* check if is List */
      if (jarg4)
      {
        arg4 = jenv->GetArrayLength(jarg4);
        if (arg4 == 0)
        arg5 = NULL;
        else
        arg5 = (int *)jenv->GetIntArrayElements(jarg4, NULL);
      }
      else
      {
        arg4 = 0;
        arg5 = NULL;
      }
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRErr)OGRFeatureShadow_SetFromWithMap(arg1,arg2,arg3,arg4,arg5);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(argout) (int nList, int* pList) */
    }
    {
      /* %typemap(freearg) (int nList, int* pList) */
      if (arg5) {
        jenv->ReleaseIntArrayElements(jarg4, (jint*)arg5, JNI_ABORT);
      }
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetStyleString(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    result = (char *)OGRFeatureShadow_GetStyleString(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1SetStyleString(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return ;
    }
    OGRFeatureShadow_SetStyleString(arg1,(char const *)arg2);
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetFieldType_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    int arg2 ;
    OGRFieldType result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_0(arg1,arg2);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Feature_1GetFieldType_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jint jresult = 0 ;
    OGRFeatureShadow *arg1 = (OGRFeatureShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    OGRFieldType result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_1(arg1,(char const *)arg2);
    jresult = (jint)result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_delete_1FeatureDefn(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    delete_OGRFeatureDefnShadow(arg1);
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_new_1FeatureDefn_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1) {
    jlong jresult = 0 ;
    char *arg1 = (char *) 0 ;
    OGRFeatureDefnShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = 0;
    if (jarg1) {
      arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
      if (!arg1) return 0;
    }
    result = (OGRFeatureDefnShadow *)new_OGRFeatureDefnShadow__SWIG_0((char const *)arg1);
    *(OGRFeatureDefnShadow **)&jresult = result; 
    if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_new_1FeatureDefn_1_1SWIG_11(JNIEnv *jenv, jclass jcls) {
    jlong jresult = 0 ;
    OGRFeatureDefnShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    result = (OGRFeatureDefnShadow *)new_OGRFeatureDefnShadow__SWIG_0();
    *(OGRFeatureDefnShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1GetName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    result = (char *)OGRFeatureDefnShadow_GetName(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1GetFieldCount(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    result = (int)OGRFeatureDefnShadow_GetFieldCount(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1GetFieldDefn(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jlong jresult = 0 ;
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int arg2 ;
    OGRFieldDefnShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (OGRFieldDefnShadow *)OGRFeatureDefnShadow_GetFieldDefn(arg1,arg2);
    *(OGRFieldDefnShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1GetFieldIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jint jresult = 0 ;
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (int)OGRFeatureDefnShadow_GetFieldIndex(arg1,(char const *)arg2);
    jresult = (jint)result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1AddFieldDefn(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    OGRFieldDefnShadow *arg2 = (OGRFieldDefnShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    arg2 = *(OGRFieldDefnShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return ; 
        };
      }
    }
    OGRFeatureDefnShadow_AddFieldDefn(arg1,arg2);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1GetGeomFieldCount(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    result = (int)OGRFeatureDefnShadow_GetGeomFieldCount(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1GetGeomFieldDefn(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jlong jresult = 0 ;
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int arg2 ;
    OGRGeomFieldDefnShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (OGRGeomFieldDefnShadow *)OGRFeatureDefnShadow_GetGeomFieldDefn(arg1,arg2);
    *(OGRGeomFieldDefnShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1GetGeomFieldIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jint jresult = 0 ;
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (int)OGRFeatureDefnShadow_GetGeomFieldIndex(arg1,(char const *)arg2);
    jresult = (jint)result; 
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1AddGeomFieldDefn(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    OGRGeomFieldDefnShadow *arg2 = (OGRGeomFieldDefnShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    arg2 = *(OGRGeomFieldDefnShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return ; 
        };
      }
    }
    OGRFeatureDefnShadow_AddGeomFieldDefn(arg1,arg2);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1DeleteGeomFieldDefn(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jint jresult = 0 ;
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int arg2 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (OGRErr)OGRFeatureDefnShadow_DeleteGeomFieldDefn(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1GetGeomType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    OGRwkbGeometryType result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    result = (OGRwkbGeometryType)OGRFeatureDefnShadow_GetGeomType(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1SetGeomType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    OGRwkbGeometryType arg2 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    arg2 = (OGRwkbGeometryType)jarg2; 
    OGRFeatureDefnShadow_SetGeomType(arg1,arg2);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1GetReferenceCount(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    result = (int)OGRFeatureDefnShadow_GetReferenceCount(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1IsGeometryIgnored(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    result = (int)OGRFeatureDefnShadow_IsGeometryIgnored(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1SetGeometryIgnored(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int arg2 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    OGRFeatureDefnShadow_SetGeometryIgnored(arg1,arg2);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1IsStyleIgnored(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    result = (int)OGRFeatureDefnShadow_IsStyleIgnored(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1SetStyleIgnored(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    int arg2 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    OGRFeatureDefnShadow_SetStyleIgnored(arg1,arg2);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_FeatureDefn_1IsSame(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jint jresult = 0 ;
    OGRFeatureDefnShadow *arg1 = (OGRFeatureDefnShadow *) 0 ;
    OGRFeatureDefnShadow *arg2 = (OGRFeatureDefnShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRFeatureDefnShadow **)&jarg1; 
    arg2 = *(OGRFeatureDefnShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (int)OGRFeatureDefnShadow_IsSame(arg1,arg2);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_delete_1FieldDefn(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(OGRFieldDefnShadow **)&jarg1; 
    delete_OGRFieldDefnShadow(arg1);
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_new_1FieldDefn_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2) {
    jlong jresult = 0 ;
    char *arg1 = (char *) 0 ;
    OGRFieldType arg2 ;
    OGRFieldDefnShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = 0;
    if (jarg1) {
      arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
      if (!arg1) return 0;
    }
    arg2 = (OGRFieldType)jarg2; 
    result = (OGRFieldDefnShadow *)new_OGRFieldDefnShadow__SWIG_0((char const *)arg1,arg2);
    *(OGRFieldDefnShadow **)&jresult = result; 
    if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_new_1FieldDefn_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1) {
    jlong jresult = 0 ;
    char *arg1 = (char *) 0 ;
    OGRFieldDefnShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = 0;
    if (jarg1) {
      arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
      if (!arg1) return 0;
    }
    result = (OGRFieldDefnShadow *)new_OGRFieldDefnShadow__SWIG_0((char const *)arg1);
    *(OGRFieldDefnShadow **)&jresult = result; 
    if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_new_1FieldDefn_1_1SWIG_12(JNIEnv *jenv, jclass jcls) {
    jlong jresult = 0 ;
    OGRFieldDefnShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    result = (OGRFieldDefnShadow *)new_OGRFieldDefnShadow__SWIG_0();
    *(OGRFieldDefnShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_FieldDefn_1GetName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFieldDefnShadow **)&jarg1; 
    result = (char *)OGRFieldDefnShadow_GetName(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_FieldDefn_1GetNameRef(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFieldDefnShadow **)&jarg1; 
    result = (char *)OGRFieldDefnShadow_GetNameRef(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_FieldDefn_1SetName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFieldDefnShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return ;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return ; 
        };
      }
    }
    OGRFieldDefnShadow_SetName(arg1,(char const *)arg2);
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_FieldDefn_1GetFieldType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    OGRFieldType result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFieldDefnShadow **)&jarg1; 
    result = (OGRFieldType)OGRFieldDefnShadow_GetType(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_FieldDefn_1SetType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    OGRFieldType arg2 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFieldDefnShadow **)&jarg1; 
    arg2 = (OGRFieldType)jarg2; 
    OGRFieldDefnShadow_SetType(arg1,arg2);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_FieldDefn_1GetJustify(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    OGRJustification result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFieldDefnShadow **)&jarg1; 
    result = (OGRJustification)OGRFieldDefnShadow_GetJustify(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_FieldDefn_1SetJustify(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    OGRJustification arg2 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFieldDefnShadow **)&jarg1; 
    arg2 = (OGRJustification)jarg2; 
    OGRFieldDefnShadow_SetJustify(arg1,arg2);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_FieldDefn_1GetWidth(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFieldDefnShadow **)&jarg1; 
    result = (int)OGRFieldDefnShadow_GetWidth(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_FieldDefn_1SetWidth(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    int arg2 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFieldDefnShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    OGRFieldDefnShadow_SetWidth(arg1,arg2);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_FieldDefn_1GetPrecision(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFieldDefnShadow **)&jarg1; 
    result = (int)OGRFieldDefnShadow_GetPrecision(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_FieldDefn_1SetPrecision(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    int arg2 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFieldDefnShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    OGRFieldDefnShadow_SetPrecision(arg1,arg2);
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_FieldDefn_1GetTypeName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFieldDefnShadow **)&jarg1; 
    result = (char *)OGRFieldDefnShadow_GetTypeName(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_FieldDefn_1GetFieldTypeName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jstring jresult = 0 ;
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    OGRFieldType arg2 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFieldDefnShadow **)&jarg1; 
    arg2 = (OGRFieldType)jarg2; 
    result = (char *)OGRFieldDefnShadow_GetFieldTypeName(arg1,arg2);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_FieldDefn_1IsIgnored(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFieldDefnShadow **)&jarg1; 
    result = (int)OGRFieldDefnShadow_IsIgnored(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_FieldDefn_1SetIgnored(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    OGRFieldDefnShadow *arg1 = (OGRFieldDefnShadow *) 0 ;
    int arg2 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRFieldDefnShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    OGRFieldDefnShadow_SetIgnored(arg1,arg2);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_delete_1GeomFieldDefn(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(OGRGeomFieldDefnShadow **)&jarg1; 
    delete_OGRGeomFieldDefnShadow(arg1);
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_new_1GeomFieldDefn_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2) {
    jlong jresult = 0 ;
    char *arg1 = (char *) 0 ;
    OGRwkbGeometryType arg2 ;
    OGRGeomFieldDefnShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = 0;
    if (jarg1) {
      arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
      if (!arg1) return 0;
    }
    arg2 = (OGRwkbGeometryType)jarg2; 
    result = (OGRGeomFieldDefnShadow *)new_OGRGeomFieldDefnShadow__SWIG_0((char const *)arg1,arg2);
    *(OGRGeomFieldDefnShadow **)&jresult = result; 
    if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_new_1GeomFieldDefn_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1) {
    jlong jresult = 0 ;
    char *arg1 = (char *) 0 ;
    OGRGeomFieldDefnShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = 0;
    if (jarg1) {
      arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
      if (!arg1) return 0;
    }
    result = (OGRGeomFieldDefnShadow *)new_OGRGeomFieldDefnShadow__SWIG_0((char const *)arg1);
    *(OGRGeomFieldDefnShadow **)&jresult = result; 
    if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_new_1GeomFieldDefn_1_1SWIG_12(JNIEnv *jenv, jclass jcls) {
    jlong jresult = 0 ;
    OGRGeomFieldDefnShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    result = (OGRGeomFieldDefnShadow *)new_OGRGeomFieldDefnShadow__SWIG_0();
    *(OGRGeomFieldDefnShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_GeomFieldDefn_1GetName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeomFieldDefnShadow **)&jarg1; 
    result = (char *)OGRGeomFieldDefnShadow_GetName(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_GeomFieldDefn_1GetNameRef(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeomFieldDefnShadow **)&jarg1; 
    result = (char *)OGRGeomFieldDefnShadow_GetNameRef(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_GeomFieldDefn_1SetName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeomFieldDefnShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return ;
    }
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return ; 
        };
      }
    }
    OGRGeomFieldDefnShadow_SetName(arg1,(char const *)arg2);
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_GeomFieldDefn_1GetFieldType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    OGRwkbGeometryType result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeomFieldDefnShadow **)&jarg1; 
    result = (OGRwkbGeometryType)OGRGeomFieldDefnShadow_GetType(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_GeomFieldDefn_1SetType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    OGRwkbGeometryType arg2 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeomFieldDefnShadow **)&jarg1; 
    arg2 = (OGRwkbGeometryType)jarg2; 
    OGRGeomFieldDefnShadow_SetType(arg1,arg2);
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_GeomFieldDefn_1GetSpatialRef(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    OSRSpatialReferenceShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeomFieldDefnShadow **)&jarg1; 
    result = (OSRSpatialReferenceShadow *)OGRGeomFieldDefnShadow_GetSpatialRef(arg1);
    *(OSRSpatialReferenceShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_GeomFieldDefn_1SetSpatialRef(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeomFieldDefnShadow **)&jarg1; 
    arg2 = *(OSRSpatialReferenceShadow **)&jarg2; 
    OGRGeomFieldDefnShadow_SetSpatialRef(arg1,arg2);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_GeomFieldDefn_1IsIgnored(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeomFieldDefnShadow **)&jarg1; 
    result = (int)OGRGeomFieldDefnShadow_IsIgnored(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_GeomFieldDefn_1SetIgnored(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    OGRGeomFieldDefnShadow *arg1 = (OGRGeomFieldDefnShadow *) 0 ;
    int arg2 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeomFieldDefnShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    OGRGeomFieldDefnShadow_SetIgnored(arg1,arg2);
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_CreateGeometryFromWkb_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jbyteArray jarg1, jlong jarg3, jobject jarg3_) {
    jlong jresult = 0 ;
    int arg1 ;
    unsigned char *arg2 = (unsigned char *) 0 ;
    OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg3_;
    {
      /* %typemap(in) (int nLen, unsigned char *pBuf ) */
      arg1 = 0;
      arg2 = NULL;
      if (jarg1)
      {
        arg1 = jenv->GetArrayLength(jarg1);
        arg2 = (unsigned char *)jenv->GetByteArrayElements(jarg1, NULL);
      }
    }
    arg3 = *(OSRSpatialReferenceShadow **)&jarg3; 
    result = (OGRGeometryShadow *)CreateGeometryFromWkb(arg1,arg2,arg3);
    *(OGRGeometryShadow **)&jresult = result; 
    {
      /* %typemap(argout) (int nLen, unsigned char *pBuf ) */
    }
    {
      /* %typemap(freearg) (int nLen, unsigned char *pBuf ) */
      /* This calls JNI_ABORT, so any modifications will not be passed back
            into the Java caller
         */
      if(arg2) {
        jenv->ReleaseByteArrayElements(jarg1, (jbyte *)arg2, JNI_ABORT);
      }
    }
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_CreateGeometryFromWkb_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jbyteArray jarg1) {
    jlong jresult = 0 ;
    int arg1 ;
    unsigned char *arg2 = (unsigned char *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    {
      /* %typemap(in) (int nLen, unsigned char *pBuf ) */
      arg1 = 0;
      arg2 = NULL;
      if (jarg1)
      {
        arg1 = jenv->GetArrayLength(jarg1);
        arg2 = (unsigned char *)jenv->GetByteArrayElements(jarg1, NULL);
      }
    }
    result = (OGRGeometryShadow *)CreateGeometryFromWkb(arg1,arg2);
    *(OGRGeometryShadow **)&jresult = result; 
    {
      /* %typemap(argout) (int nLen, unsigned char *pBuf ) */
    }
    {
      /* %typemap(freearg) (int nLen, unsigned char *pBuf ) */
      /* This calls JNI_ABORT, so any modifications will not be passed back
            into the Java caller
         */
      if(arg2) {
        jenv->ReleaseByteArrayElements(jarg1, (jbyte *)arg2, JNI_ABORT);
      }
    }
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_CreateGeometryFromWkt_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1, jlong jarg2, jobject jarg2_) {
    jlong jresult = 0 ;
    char **arg1 = (char **) 0 ;
    OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    char *ori_val1 ;
    char *val1 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg2_;
    {
      /* %typemap(in) (char **ignorechange) */
      ori_val1 = val1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
      arg1 = &val1;
    }
    arg2 = *(OSRSpatialReferenceShadow **)&jarg2; 
    result = (OGRGeometryShadow *)CreateGeometryFromWkt(arg1,arg2);
    *(OGRGeometryShadow **)&jresult = result; 
    {
      /* %typemap(freearg) (char **ignorechange) */
      jenv->ReleaseStringUTFChars(jarg1, ori_val1);
    }
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_CreateGeometryFromWkt_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1) {
    jlong jresult = 0 ;
    char **arg1 = (char **) 0 ;
    char *ori_val1 ;
    char *val1 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    {
      /* %typemap(in) (char **ignorechange) */
      ori_val1 = val1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
      arg1 = &val1;
    }
    result = (OGRGeometryShadow *)CreateGeometryFromWkt(arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    {
      /* %typemap(freearg) (char **ignorechange) */
      jenv->ReleaseStringUTFChars(jarg1, ori_val1);
    }
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_CreateGeometryFromGML(JNIEnv *jenv, jclass jcls, jstring jarg1) {
    jlong jresult = 0 ;
    char *arg1 = (char *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = 0;
    if (jarg1) {
      arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
      if (!arg1) return 0;
    }
    result = (OGRGeometryShadow *)CreateGeometryFromGML((char const *)arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_CreateGeometryFromJson(JNIEnv *jenv, jclass jcls, jstring jarg1) {
    jlong jresult = 0 ;
    char *arg1 = (char *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = 0;
    if (jarg1) {
      arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
      if (!arg1) return 0;
    }
    result = (OGRGeometryShadow *)CreateGeometryFromJson((char const *)arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_BuildPolygonFromEdges_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jdouble jarg4) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    double arg4 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    arg3 = (int)jarg3; 
    arg4 = (double)jarg4; 
    result = (OGRGeometryShadow *)BuildPolygonFromEdges(arg1,arg2,arg3,arg4);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_BuildPolygonFromEdges_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    int arg3 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    arg3 = (int)jarg3; 
    result = (OGRGeometryShadow *)BuildPolygonFromEdges(arg1,arg2,arg3);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_BuildPolygonFromEdges_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (OGRGeometryShadow *)BuildPolygonFromEdges(arg1,arg2);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_BuildPolygonFromEdges_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (OGRGeometryShadow *)BuildPolygonFromEdges(arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_ApproximateArcAngles(JNIEnv *jenv, jclass jcls, jdouble jarg1, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6, jdouble jarg7, jdouble jarg8, jdouble jarg9) {
    jlong jresult = 0 ;
    double arg1 ;
    double arg2 ;
    double arg3 ;
    double arg4 ;
    double arg5 ;
    double arg6 ;
    double arg7 ;
    double arg8 ;
    double arg9 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    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; 
    result = (OGRGeometryShadow *)ApproximateArcAngles(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_ForceToPolygon(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (OGRGeometryShadow *)ForceToPolygon(arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_ForceToLineString(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (OGRGeometryShadow *)ForceToLineString(arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_ForceToMultiPolygon(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (OGRGeometryShadow *)ForceToMultiPolygon(arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_ForceToMultiPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (OGRGeometryShadow *)ForceToMultiPoint(arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_ForceToMultiLineString(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (OGRGeometryShadow *)ForceToMultiLineString(arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_delete_1Geometry(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    delete_OGRGeometryShadow(arg1);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1ExportToWkt_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2) {
    jint jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    char *argout2 = 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    {
      /* %typemap(in) (char **argout2) */
      arg2 = &argout2;
    }
    result = (OGRErr)OGRGeometryShadow_ExportToWkt__SWIG_0(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(argout) (char **argout) */
      jstring temp_string;
      
      if(jarg2 != NULL && (int)jenv->GetArrayLength(jarg2) >= 1) {
        temp_string = jenv->NewStringUTF(argout2);
        jenv->SetObjectArrayElement(jarg2, 0, temp_string);
        jenv->DeleteLocalRef(temp_string);
      }
    }
    {
      /* %typemap(freearg) (char **argout) */
      if(arg2) {
        CPLFree((void *)argout2);
      }
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jbyteArray JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1ExportToWkb_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg4) {
    jbyteArray jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int *arg2 = (int *) 0 ;
    char **arg3 = (char **) 0 ;
    OGRwkbByteOrder arg4 ;
    int nLen2 ;
    char *pBuf2 ;
    GByte *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    {
      /* %typemap(in) (int *nLen2, char **pBuf2 ) */
      arg2 = &nLen2;
      arg3 = &pBuf2;
    }
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg4 = (OGRwkbByteOrder)jarg4; 
    result = (GByte *)OGRGeometryShadow_ExportToWkb__SWIG_0(arg1,arg2,arg3,arg4);
    {
      /* %typemap(out) (GByte* outBytes ) */
    }
    {
      /* %typemap(argout) (int *nLen, char **pBuf ) */
      jbyteArray byteArray = jenv->NewByteArray(nLen2);
      jenv->SetByteArrayRegion(byteArray, (jsize)0, (jsize)nLen2, (jbyte*)pBuf2);
      jresult = byteArray;
    }
    {
      /* %typemap(freearg) (int *nLen, char **pBuf ) */
      if( nLen2 ) {
        free( pBuf2 );
      }
    }
    return jresult;
  }
  
  
  SWIGEXPORT jbyteArray JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1ExportToWkb_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jbyteArray jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int *arg2 = (int *) 0 ;
    char **arg3 = (char **) 0 ;
    int nLen2 ;
    char *pBuf2 ;
    GByte *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    {
      /* %typemap(in) (int *nLen2, char **pBuf2 ) */
      arg2 = &nLen2;
      arg3 = &pBuf2;
    }
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (GByte *)OGRGeometryShadow_ExportToWkb__SWIG_0(arg1,arg2,arg3);
    {
      /* %typemap(out) (GByte* outBytes ) */
    }
    {
      /* %typemap(argout) (int *nLen, char **pBuf ) */
      jbyteArray byteArray = jenv->NewByteArray(nLen2);
      jenv->SetByteArrayRegion(byteArray, (jsize)0, (jsize)nLen2, (jbyte*)pBuf2);
      jresult = byteArray;
    }
    {
      /* %typemap(freearg) (int *nLen, char **pBuf ) */
      if( nLen2 ) {
        free( pBuf2 );
      }
    }
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1ExportToGML_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobject jarg2) {
    jstring jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    retStringAndCPLFree *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    {
      /* %typemap(in) char **options */
      arg2 = NULL;
      if(jarg2 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg2, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg2);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg2 = CSLAddString(arg2,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToGML__SWIG_0(arg1,arg2);
    {
      /* %typemap(out) (retStringAndCPLFree*) */
      if(result)
      {
        jresult = jenv->NewStringUTF((const char *)result);
        CPLFree(result);
      }
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg2 );
    }
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1ExportToGML_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    retStringAndCPLFree *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToGML__SWIG_0(arg1);
    {
      /* %typemap(out) (retStringAndCPLFree*) */
      if(result)
      {
        jresult = jenv->NewStringUTF((const char *)result);
        CPLFree(result);
      }
    }
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1ExportToKML_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    jstring jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    char *arg2 = (char *) 0 ;
    retStringAndCPLFree *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToKML__SWIG_0(arg1,(char const *)arg2);
    {
      /* %typemap(out) (retStringAndCPLFree*) */
      if(result)
      {
        jresult = jenv->NewStringUTF((const char *)result);
        CPLFree(result);
      }
    }
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1ExportToKML_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    retStringAndCPLFree *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToKML__SWIG_0(arg1);
    {
      /* %typemap(out) (retStringAndCPLFree*) */
      if(result)
      {
        jresult = jenv->NewStringUTF((const char *)result);
        CPLFree(result);
      }
    }
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1ExportToJson_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobject jarg2) {
    jstring jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    char **arg2 = (char **) 0 ;
    retStringAndCPLFree *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    {
      /* %typemap(in) char **options */
      arg2 = NULL;
      if(jarg2 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg2, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg2);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg2 = CSLAddString(arg2,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToJson__SWIG_0(arg1,arg2);
    {
      /* %typemap(out) (retStringAndCPLFree*) */
      if(result)
      {
        jresult = jenv->NewStringUTF((const char *)result);
        CPLFree(result);
      }
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg2 );
    }
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1ExportToJson_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    retStringAndCPLFree *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToJson__SWIG_0(arg1);
    {
      /* %typemap(out) (retStringAndCPLFree*) */
      if(result)
      {
        jresult = jenv->NewStringUTF((const char *)result);
        CPLFree(result);
      }
    }
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1AddPoint_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double arg2 ;
    double arg3 ;
    double arg4 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (double)jarg2; 
    arg3 = (double)jarg3; 
    arg4 = (double)jarg4; 
    OGRGeometryShadow_AddPoint__SWIG_0(arg1,arg2,arg3,arg4);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1AddPoint_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double arg2 ;
    double arg3 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (double)jarg2; 
    arg3 = (double)jarg3; 
    OGRGeometryShadow_AddPoint__SWIG_0(arg1,arg2,arg3);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1AddPoint_12D(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double arg2 ;
    double arg3 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (double)jarg2; 
    arg3 = (double)jarg3; 
    OGRGeometryShadow_AddPoint_2D(arg1,arg2,arg3);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1AddGeometryDirectly(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jint jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRErr)OGRGeometryShadow_AddGeometryDirectly(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1AddGeometry(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jint jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRErr)OGRGeometryShadow_AddGeometry(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Clone(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (OGRGeometryShadow *)OGRGeometryShadow_Clone(arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetGeometryType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRwkbGeometryType result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (OGRwkbGeometryType)OGRGeometryShadow_GetGeometryType(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetGeometryName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (char *)OGRGeometryShadow_GetGeometryName(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT jdouble JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Length(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jdouble jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (double)OGRGeometryShadow_Length(arg1);
    jresult = (jdouble)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jdouble JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Area(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jdouble jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (double)OGRGeometryShadow_Area(arg1);
    jresult = (jdouble)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jdouble JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetArea(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jdouble jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (double)OGRGeometryShadow_GetArea(arg1);
    jresult = (jdouble)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetPointCount(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (int)OGRGeometryShadow_GetPointCount(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jobjectArray JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetPoints_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg5) {
    jobjectArray jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int *arg2 = (int *) 0 ;
    double **arg3 = (double **) 0 ;
    double **arg4 = (double **) 0 ;
    int arg5 ;
    int nPoints2 = 0 ;
    double *padfXY2 = NULL ;
    double *padfZ2 = NULL ;
    retGetPoints *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    {
      /* %typemap(in,numinputs=0) (int* pnCount, double** ppadfXY, double** ppadfZ) */
      arg2 = &nPoints2;
      arg3 = &padfXY2;
      arg4 = &padfZ2;
    }
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg5 = (int)jarg5; 
    result = (retGetPoints *)OGRGeometryShadow_GetPoints__SWIG_0(arg1,arg2,arg3,arg4,arg5);
    *(retGetPoints **)&jresult = result; 
    {
      /* %typemap(out)  (int* pnCount, double** ppadfXY, double** ppadfZ) */
      
      int nPointCount = *(arg2);
      if (nPointCount == 0)
      {
        jresult = 0;
      }
      else
      {
        int nDimensions = (*arg4 != NULL) ? 3 : 2;
        jresult = jenv->NewObjectArray(nPointCount, jenv->FindClass("java/lang/Object"), NULL);
        for( int i=0; i< nPointCount; i++ )
        {
          jdoubleArray dblArray = jenv->NewDoubleArray(nDimensions);
          jenv->SetDoubleArrayRegion(dblArray, 0, 2, &( (*arg3)[2*i] ));
          if (nDimensions == 3)
          jenv->SetDoubleArrayRegion(dblArray, 2, 1, &( (*arg4)[i] ));
          jenv->SetObjectArrayElement(jresult, (jsize)i, dblArray);
          jenv->DeleteLocalRef(dblArray);
        }
      }
    }
    {
      /* %typemap(freearg)  (int* pnCount, double** ppadfXY, double** ppadfZ) */
      VSIFree(*arg3);
      VSIFree(*arg4);
    }
    return jresult;
  }
  
  
  SWIGEXPORT jobjectArray JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetPoints_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jobjectArray jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int *arg2 = (int *) 0 ;
    double **arg3 = (double **) 0 ;
    double **arg4 = (double **) 0 ;
    int nPoints2 = 0 ;
    double *padfXY2 = NULL ;
    double *padfZ2 = NULL ;
    retGetPoints *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    {
      /* %typemap(in,numinputs=0) (int* pnCount, double** ppadfXY, double** ppadfZ) */
      arg2 = &nPoints2;
      arg3 = &padfXY2;
      arg4 = &padfZ2;
    }
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (retGetPoints *)OGRGeometryShadow_GetPoints__SWIG_0(arg1,arg2,arg3,arg4);
    *(retGetPoints **)&jresult = result; 
    {
      /* %typemap(out)  (int* pnCount, double** ppadfXY, double** ppadfZ) */
      
      int nPointCount = *(arg2);
      if (nPointCount == 0)
      {
        jresult = 0;
      }
      else
      {
        int nDimensions = (*arg4 != NULL) ? 3 : 2;
        jresult = jenv->NewObjectArray(nPointCount, jenv->FindClass("java/lang/Object"), NULL);
        for( int i=0; i< nPointCount; i++ )
        {
          jdoubleArray dblArray = jenv->NewDoubleArray(nDimensions);
          jenv->SetDoubleArrayRegion(dblArray, 0, 2, &( (*arg3)[2*i] ));
          if (nDimensions == 3)
          jenv->SetDoubleArrayRegion(dblArray, 2, 1, &( (*arg4)[i] ));
          jenv->SetObjectArrayElement(jresult, (jsize)i, dblArray);
          jenv->DeleteLocalRef(dblArray);
        }
      }
    }
    {
      /* %typemap(freearg)  (int* pnCount, double** ppadfXY, double** ppadfZ) */
      VSIFree(*arg3);
      VSIFree(*arg4);
    }
    return jresult;
  }
  
  
  SWIGEXPORT jdouble JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetX_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jdouble jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    double result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (double)OGRGeometryShadow_GetX__SWIG_0(arg1,arg2);
    jresult = (jdouble)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jdouble JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetX_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jdouble jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (double)OGRGeometryShadow_GetX__SWIG_0(arg1);
    jresult = (jdouble)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jdouble JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetY_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jdouble jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    double result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (double)OGRGeometryShadow_GetY__SWIG_0(arg1,arg2);
    jresult = (jdouble)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jdouble JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetY_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jdouble jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (double)OGRGeometryShadow_GetY__SWIG_0(arg1);
    jresult = (jdouble)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jdouble JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetZ_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jdouble jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    double result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (double)OGRGeometryShadow_GetZ__SWIG_0(arg1,arg2);
    jresult = (jdouble)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jdouble JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetZ_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jdouble jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (double)OGRGeometryShadow_GetZ__SWIG_0(arg1);
    jresult = (jdouble)result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetPoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jdoubleArray jarg3) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    double *arg3 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    {
      /* %typemap(in) (double argout[ANY]) */
      if(jarg3 == NULL || jenv->GetArrayLength(jarg3) != 3) {
        char errorMsg[512];
        sprintf(errorMsg, "array of size %d expected", 3);
        SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, errorMsg);
        return ;
      }
      arg3 = (double *)jenv->GetDoubleArrayElements(jarg3, NULL);
    }
    OGRGeometryShadow_GetPoint(arg1,arg2,arg3);
    {
      /* %typemap(argout) (double argout[ANY]) */
    }
    {
      /* %typemap(freearg) (double argout[ANY]) */
      jenv->ReleaseDoubleArrayElements(jarg3, (jdouble *)arg3, 0);
    }
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetPoint_12D(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jdoubleArray jarg3) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    double *arg3 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    {
      /* %typemap(in) (double argout[ANY]) */
      if(jarg3 == NULL || jenv->GetArrayLength(jarg3) != 2) {
        char errorMsg[512];
        sprintf(errorMsg, "array of size %d expected", 2);
        SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, errorMsg);
        return ;
      }
      arg3 = (double *)jenv->GetDoubleArrayElements(jarg3, NULL);
    }
    OGRGeometryShadow_GetPoint_2D(arg1,arg2,arg3);
    {
      /* %typemap(argout) (double argout[ANY]) */
    }
    {
      /* %typemap(freearg) (double argout[ANY]) */
      jenv->ReleaseDoubleArrayElements(jarg3, (jdouble *)arg3, 0);
    }
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetGeometryCount(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (int)OGRGeometryShadow_GetGeometryCount(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1SetPoint_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    double arg3 ;
    double arg4 ;
    double arg5 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    arg3 = (double)jarg3; 
    arg4 = (double)jarg4; 
    arg5 = (double)jarg5; 
    OGRGeometryShadow_SetPoint__SWIG_0(arg1,arg2,arg3,arg4,arg5);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1SetPoint_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jdouble jarg3, jdouble jarg4) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    double arg3 ;
    double arg4 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    arg3 = (double)jarg3; 
    arg4 = (double)jarg4; 
    OGRGeometryShadow_SetPoint__SWIG_0(arg1,arg2,arg3,arg4);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1SetPoint_12D(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jdouble jarg3, jdouble jarg4) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    double arg3 ;
    double arg4 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    arg3 = (double)jarg3; 
    arg4 = (double)jarg4; 
    OGRGeometryShadow_SetPoint_2D(arg1,arg2,arg3,arg4);
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetGeometryRef(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    result = (OGRGeometryShadow *)OGRGeometryShadow_GetGeometryRef(arg1,arg2);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Simplify(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double arg2 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (double)jarg2; 
    result = (OGRGeometryShadow *)OGRGeometryShadow_Simplify(arg1,arg2);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1SimplifyPreserveTopology(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double arg2 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (double)jarg2; 
    result = (OGRGeometryShadow *)OGRGeometryShadow_SimplifyPreserveTopology(arg1,arg2);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Boundary(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (OGRGeometryShadow *)OGRGeometryShadow_Boundary(arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetBoundary(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (OGRGeometryShadow *)OGRGeometryShadow_GetBoundary(arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1ConvexHull(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (OGRGeometryShadow *)OGRGeometryShadow_ConvexHull(arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Buffer_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jint jarg3) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double arg2 ;
    int arg3 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (double)jarg2; 
    arg3 = (int)jarg3; 
    result = (OGRGeometryShadow *)OGRGeometryShadow_Buffer__SWIG_0(arg1,arg2,arg3);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Buffer_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double arg2 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (double)jarg2; 
    result = (OGRGeometryShadow *)OGRGeometryShadow_Buffer__SWIG_0(arg1,arg2);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Intersection(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_Intersection(arg1,arg2);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Union(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_Union(arg1,arg2);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1UnionCascaded(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (OGRGeometryShadow *)OGRGeometryShadow_UnionCascaded(arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Difference(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_Difference(arg1,arg2);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1SymDifference(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_SymDifference(arg1,arg2);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1SymmetricDifference(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRGeometryShadow *)OGRGeometryShadow_SymmetricDifference(arg1,arg2);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jdouble JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Distance(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jdouble jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    double result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (double)OGRGeometryShadow_Distance(arg1,arg2);
    jresult = (jdouble)result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Empty(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    OGRGeometryShadow_Empty(arg1);
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1IsEmpty(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jboolean jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (bool)OGRGeometryShadow_IsEmpty(arg1);
    jresult = (jboolean)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1IsValid(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jboolean jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (bool)OGRGeometryShadow_IsValid(arg1);
    jresult = (jboolean)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1IsSimple(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jboolean jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (bool)OGRGeometryShadow_IsSimple(arg1);
    jresult = (jboolean)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1IsRing(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jboolean jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (bool)OGRGeometryShadow_IsRing(arg1);
    jresult = (jboolean)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Intersects(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jboolean jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (bool)OGRGeometryShadow_Intersects(arg1,arg2);
    jresult = (jboolean)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Intersect(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jboolean jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (bool)OGRGeometryShadow_Intersect(arg1,arg2);
    jresult = (jboolean)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Equals(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jboolean jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (bool)OGRGeometryShadow_Equals(arg1,arg2);
    jresult = (jboolean)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Equal(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jboolean jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (bool)OGRGeometryShadow_Equal(arg1,arg2);
    jresult = (jboolean)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Disjoint(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jboolean jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (bool)OGRGeometryShadow_Disjoint(arg1,arg2);
    jresult = (jboolean)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Touches(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jboolean jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (bool)OGRGeometryShadow_Touches(arg1,arg2);
    jresult = (jboolean)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Crosses(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jboolean jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (bool)OGRGeometryShadow_Crosses(arg1,arg2);
    jresult = (jboolean)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Within(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jboolean jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (bool)OGRGeometryShadow_Within(arg1,arg2);
    jresult = (jboolean)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Contains(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jboolean jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (bool)OGRGeometryShadow_Contains(arg1,arg2);
    jresult = (jboolean)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jboolean JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Overlaps(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jboolean jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *arg2 = (OGRGeometryShadow *) 0 ;
    bool result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OGRGeometryShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (bool)OGRGeometryShadow_Overlaps(arg1,arg2);
    jresult = (jboolean)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1TransformTo(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jint jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OSRSpatialReferenceShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRErr)OGRGeometryShadow_TransformTo(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Transform(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    jint jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OSRCoordinateTransformationShadow *arg2 = (OSRCoordinateTransformationShadow *) 0 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OSRCoordinateTransformationShadow **)&jarg2; 
    {
      if (!arg2) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRErr)OGRGeometryShadow_Transform(arg1,arg2);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetSpatialReference(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OSRSpatialReferenceShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (OSRSpatialReferenceShadow *)OGRGeometryShadow_GetSpatialReference(arg1);
    *(OSRSpatialReferenceShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1AssignSpatialReference(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    (void)jarg2_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = *(OSRSpatialReferenceShadow **)&jarg2; 
    OGRGeometryShadow_AssignSpatialReference(arg1,arg2);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1CloseRings(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    OGRGeometryShadow_CloseRings(arg1);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1FlattenTo2D(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    OGRGeometryShadow_FlattenTo2D(arg1);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Segmentize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double arg2 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (double)jarg2; 
    OGRGeometryShadow_Segmentize(arg1,arg2);
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetEnvelope(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdoubleArray jarg2) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double *arg2 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    {
      /* %typemap(in) (double argout[ANY]) */
      if(jarg2 == NULL || jenv->GetArrayLength(jarg2) != 4) {
        char errorMsg[512];
        sprintf(errorMsg, "array of size %d expected", 4);
        SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, errorMsg);
        return ;
      }
      arg2 = (double *)jenv->GetDoubleArrayElements(jarg2, NULL);
    }
    OGRGeometryShadow_GetEnvelope(arg1,arg2);
    {
      /* %typemap(argout) (double argout[ANY]) */
    }
    {
      /* %typemap(freearg) (double argout[ANY]) */
      jenv->ReleaseDoubleArrayElements(jarg2, (jdouble *)arg2, 0);
    }
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetEnvelope3D(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdoubleArray jarg2) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    double *arg2 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    {
      /* %typemap(in) (double argout[ANY]) */
      if(jarg2 == NULL || jenv->GetArrayLength(jarg2) != 6) {
        char errorMsg[512];
        sprintf(errorMsg, "array of size %d expected", 6);
        SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, errorMsg);
        return ;
      }
      arg2 = (double *)jenv->GetDoubleArrayElements(jarg2, NULL);
    }
    OGRGeometryShadow_GetEnvelope3D(arg1,arg2);
    {
      /* %typemap(argout) (double argout[ANY]) */
    }
    {
      /* %typemap(freearg) (double argout[ANY]) */
      jenv->ReleaseDoubleArrayElements(jarg2, (jdouble *)arg2, 0);
    }
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1Centroid(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (OGRGeometryShadow *)OGRGeometryShadow_Centroid(arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1PointOnSurface(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jlong jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (OGRGeometryShadow *)OGRGeometryShadow_PointOnSurface(arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1WkbSize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (int)OGRGeometryShadow_WkbSize(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetCoordinateDimension(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (int)OGRGeometryShadow_GetCoordinateDimension(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1SetCoordinateDimension(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int arg2 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    arg2 = (int)jarg2; 
    OGRGeometryShadow_SetCoordinateDimension(arg1,arg2);
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1GetDimension(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jint jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (int)OGRGeometryShadow_GetDimension(arg1);
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_new_1Geometry_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jint jarg1, jstring jarg2, jbyteArray jarg3, jstring jarg5) {
    jlong jresult = 0 ;
    OGRwkbGeometryType arg1 ;
    char *arg2 = (char *) 0 ;
    int arg3 ;
    unsigned char *arg4 = (unsigned char *) 0 ;
    char *arg5 = (char *) 0 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = (OGRwkbGeometryType)jarg1; 
    arg2 = 0;
    if (jarg2) {
      arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
      if (!arg2) return 0;
    }
    {
      /* %typemap(in) (int nLen, unsigned char *pBuf ) */
      arg3 = 0;
      arg4 = NULL;
      if (jarg3)
      {
        arg3 = jenv->GetArrayLength(jarg3);
        arg4 = (unsigned char *)jenv->GetByteArrayElements(jarg3, NULL);
      }
    }
    arg5 = 0;
    if (jarg5) {
      arg5 = (char *)jenv->GetStringUTFChars(jarg5, 0);
      if (!arg5) return 0;
    }
    result = (OGRGeometryShadow *)new_OGRGeometryShadow__SWIG_0(arg1,arg2,arg3,arg4,(char const *)arg5);
    *(OGRGeometryShadow **)&jresult = result; 
    {
      /* %typemap(argout) (int nLen, unsigned char *pBuf ) */
    }
    if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    {
      /* %typemap(freearg) (int nLen, unsigned char *pBuf ) */
      /* This calls JNI_ABORT, so any modifications will not be passed back
            into the Java caller
         */
      if(arg4) {
        jenv->ReleaseByteArrayElements(jarg3, (jbyte *)arg4, JNI_ABORT);
      }
    }
    if (arg5) jenv->ReleaseStringUTFChars(jarg5, (const char *)arg5);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_new_1Geometry_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jint jarg1) {
    jlong jresult = 0 ;
    OGRwkbGeometryType arg1 ;
    OGRGeometryShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = (OGRwkbGeometryType)jarg1; 
    result = (OGRGeometryShadow *)new_OGRGeometryShadow__SWIG_1(arg1);
    *(OGRGeometryShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_Geometry_1ExportToWkt_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    jstring jresult = 0 ;
    OGRGeometryShadow *arg1 = (OGRGeometryShadow *) 0 ;
    retStringAndCPLFree *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    (void)jarg1_;
    arg1 = *(OGRGeometryShadow **)&jarg1; 
    result = (retStringAndCPLFree *)OGRGeometryShadow_ExportToWkt__SWIG_1(arg1);
    {
      /* %typemap(out) (retStringAndCPLFree*) */
      if(result)
      {
        jresult = jenv->NewStringUTF((const char *)result);
        CPLFree(result);
      }
    }
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_GetDriverCount(JNIEnv *jenv, jclass jcls) {
    jint jresult = 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    result = (int)OGRGetDriverCount();
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_GetOpenDSCount(JNIEnv *jenv, jclass jcls) {
    jint jresult = 0 ;
    int result;
    
    (void)jenv;
    (void)jcls;
    result = (int)OGRGetOpenDSCount();
    jresult = (jint)result; 
    return jresult;
  }
  
  
  SWIGEXPORT jint JNICALL Java_org_gdal_ogr_ogrJNI_SetGenerate_1DB2_1V72_1BYTE_1ORDER(JNIEnv *jenv, jclass jcls, jint jarg1) {
    jint jresult = 0 ;
    int arg1 ;
    OGRErr result;
    
    (void)jenv;
    (void)jcls;
    arg1 = (int)jarg1; 
    result = (OGRErr)OGRSetGenerate_DB2_V72_BYTE_ORDER(arg1);
    {
      /* %typemap(out) OGRErr */
      if (result != 0 && bUseExceptions) {
        SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
          OGRErrMessages(result));
        return 0;
      }
      jresult = (jint)result;
    }
    {
      /* %typemap(ret) OGRErr */
      
    }
    return jresult;
  }
  
  
  SWIGEXPORT void JNICALL Java_org_gdal_ogr_ogrJNI_RegisterAll(JNIEnv *jenv, jclass jcls) {
    (void)jenv;
    (void)jcls;
    OGRRegisterAll();
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_GeometryTypeToName(JNIEnv *jenv, jclass jcls, jint jarg1) {
    jstring jresult = 0 ;
    OGRwkbGeometryType arg1 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = (OGRwkbGeometryType)jarg1; 
    result = (char *)OGRGeometryTypeToName(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT jstring JNICALL Java_org_gdal_ogr_ogrJNI_GetFieldTypeName(JNIEnv *jenv, jclass jcls, jint jarg1) {
    jstring jresult = 0 ;
    OGRFieldType arg1 ;
    char *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = (OGRFieldType)jarg1; 
    result = (char *)OGR_GetFieldTypeName(arg1);
    if (result) jresult = jenv->NewStringUTF((const char *)result);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_GetOpenDS(JNIEnv *jenv, jclass jcls, jint jarg1) {
    jlong jresult = 0 ;
    int arg1 ;
    OGRDataSourceShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = (int)jarg1; 
    result = (OGRDataSourceShadow *)GetOpenDS(arg1);
    *(OGRDataSourceShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Open_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2) {
    jlong jresult = 0 ;
    char *arg1 = (char *) 0 ;
    int arg2 ;
    OGRDataSourceShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = 0;
    if (jarg1) {
      arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
      if (!arg1) return 0;
    }
    arg2 = (int)jarg2; 
    result = (OGRDataSourceShadow *)Open((char const *)arg1,arg2);
    *(OGRDataSourceShadow **)&jresult = result; 
    if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_Open_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1) {
    jlong jresult = 0 ;
    char *arg1 = (char *) 0 ;
    OGRDataSourceShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = 0;
    if (jarg1) {
      arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
      if (!arg1) return 0;
    }
    result = (OGRDataSourceShadow *)Open((char const *)arg1);
    *(OGRDataSourceShadow **)&jresult = result; 
    if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_OpenShared_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2) {
    jlong jresult = 0 ;
    char *arg1 = (char *) 0 ;
    int arg2 ;
    OGRDataSourceShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = 0;
    if (jarg1) {
      arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
      if (!arg1) return 0;
    }
    arg2 = (int)jarg2; 
    result = (OGRDataSourceShadow *)OpenShared((char const *)arg1,arg2);
    *(OGRDataSourceShadow **)&jresult = result; 
    if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_OpenShared_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1) {
    jlong jresult = 0 ;
    char *arg1 = (char *) 0 ;
    OGRDataSourceShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = 0;
    if (jarg1) {
      arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
      if (!arg1) return 0;
    }
    result = (OGRDataSourceShadow *)OpenShared((char const *)arg1);
    *(OGRDataSourceShadow **)&jresult = result; 
    if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_GetDriverByName(JNIEnv *jenv, jclass jcls, jstring jarg1) {
    jlong jresult = 0 ;
    char *arg1 = (char *) 0 ;
    OGRDriverShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = 0;
    if (jarg1) {
      arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
      if (!arg1) return 0;
    }
    {
      if (!arg1) {
        {
          SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
        };
      }
    }
    result = (OGRDriverShadow *)GetDriverByName((char const *)arg1);
    *(OGRDriverShadow **)&jresult = result; 
    if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_GetDriver(JNIEnv *jenv, jclass jcls, jint jarg1) {
    jlong jresult = 0 ;
    int arg1 ;
    OGRDriverShadow *result = 0 ;
    
    (void)jenv;
    (void)jcls;
    arg1 = (int)jarg1; 
    result = (OGRDriverShadow *)GetDriver(arg1);
    *(OGRDriverShadow **)&jresult = result; 
    return jresult;
  }
  
  
  SWIGEXPORT jobject JNICALL Java_org_gdal_ogr_ogrJNI_GeneralCmdLineProcessor_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jobject jarg1, jint jarg2) {
    jobject jresult = 0 ;
    char **arg1 = (char **) 0 ;
    int arg2 ;
    char **result = 0 ;
    
    (void)jenv;
    (void)jcls;
    {
      /* %typemap(in) char **options */
      arg1 = NULL;
      if(jarg1 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg1, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg1);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg1 = CSLAddString(arg1,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    arg2 = (int)jarg2; 
    result = (char **)GeneralCmdLineProcessor(arg1,arg2);
    {
      /* %typemap(out) char **CSL -> vector of strings */
      char **stringarray = result;
      const jclass vector = jenv->FindClass("java/util/Vector");
      const jmethodID constructor = jenv->GetMethodID(vector, "<init>", "()V");
      const jmethodID add = jenv->GetMethodID(vector, "add", "(Ljava/lang/Object;)Z");
      
      jresult = jenv->NewObject(vector, constructor);
      if ( stringarray != NULL ) {
        while(*stringarray != NULL) {
          /*printf("working on string %s\n", *stringarray);*/
          jstring value = (jstring)jenv->NewStringUTF(*stringarray);
          jenv->CallBooleanMethod(jresult, add, value);
          jenv->DeleteLocalRef(value);
          stringarray++;
        }
      }
      CSLDestroy(result);
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg1 );
    }
    return jresult;
  }
  
  
  SWIGEXPORT jobject JNICALL Java_org_gdal_ogr_ogrJNI_GeneralCmdLineProcessor_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jobject jarg1) {
    jobject jresult = 0 ;
    char **arg1 = (char **) 0 ;
    char **result = 0 ;
    
    (void)jenv;
    (void)jcls;
    {
      /* %typemap(in) char **options */
      arg1 = NULL;
      if(jarg1 != 0) {
        const jclass vector = jenv->FindClass("java/util/Vector");
        const jclass enumeration = jenv->FindClass("java/util/Enumeration");
        const jclass stringClass = jenv->FindClass("java/lang/String");
        const jmethodID elements = jenv->GetMethodID(vector, "elements",
          "()Ljava/util/Enumeration;");
        const jmethodID hasMoreElements = jenv->GetMethodID(enumeration, 
          "hasMoreElements", "()Z");
        const jmethodID getNextElement = jenv->GetMethodID(enumeration,
          "nextElement", "()Ljava/lang/Object;");
        if(vector == NULL || enumeration == NULL || elements == NULL ||
          hasMoreElements == NULL || getNextElement == NULL) {
          fprintf(stderr, "Could not load (options **) jni types.\n");
          return 0;
        }
        for (jobject keys = jenv->CallObjectMethod(jarg1, elements);
          jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
          jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
          if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
          {
            CSLDestroy(arg1);
            SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
            return 0;
          }
          const char *valptr = jenv->GetStringUTFChars(value, 0);
          arg1 = CSLAddString(arg1,  valptr);
          jenv->ReleaseStringUTFChars(value, valptr);
        }
      }
    }
    result = (char **)GeneralCmdLineProcessor(arg1);
    {
      /* %typemap(out) char **CSL -> vector of strings */
      char **stringarray = result;
      const jclass vector = jenv->FindClass("java/util/Vector");
      const jmethodID constructor = jenv->GetMethodID(vector, "<init>", "()V");
      const jmethodID add = jenv->GetMethodID(vector, "add", "(Ljava/lang/Object;)Z");
      
      jresult = jenv->NewObject(vector, constructor);
      if ( stringarray != NULL ) {
        while(*stringarray != NULL) {
          /*printf("working on string %s\n", *stringarray);*/
          jstring value = (jstring)jenv->NewStringUTF(*stringarray);
          jenv->CallBooleanMethod(jresult, add, value);
          jenv->DeleteLocalRef(value);
          stringarray++;
        }
      }
      CSLDestroy(result);
    }
    {
      /* %typemap(freearg) char **options */
      CSLDestroy( arg1 );
    }
    return jresult;
  }
  
  
  SWIGEXPORT jlong JNICALL Java_org_gdal_ogr_ogrJNI_TermProgressCallback_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
      jlong baseptr = 0;
      (void)jenv;
      (void)jcls;
      *(ProgressCallback **)&baseptr = *(TermProgressCallback **)&jarg1;
      return baseptr;
  }
  
  #ifdef __cplusplus
  }
  #endif
  
  