LCOV - code coverage report
Current view: top level - build-coverage/swig/java/org/gdal/osr - osr_wrap.cpp (source / functions) Hit Total Coverage
Test: gdal_filtered.info Lines: 441 4677 9.4 %
Date: 2026-08-22 15:37:05 Functions: 69 472 14.6 %

          Line data    Source code
       1             : /* ----------------------------------------------------------------------------
       2             :  * This file was automatically generated by SWIG (http://www.swig.org).
       3             :  * Version 4.0.1
       4             :  *
       5             :  * This file is not intended to be easily readable and contains a number of
       6             :  * coding conventions designed to improve portability and efficiency. Do not make
       7             :  * changes to this file unless you know what you are doing--modify the SWIG
       8             :  * interface file instead.
       9             :  * ----------------------------------------------------------------------------- */
      10             : 
      11             : 
      12             : #ifndef SWIGJAVA
      13             : #define SWIGJAVA
      14             : #endif
      15             : 
      16             : 
      17             : 
      18             : #ifdef __cplusplus
      19             : /* SwigValueWrapper is described in swig.swg */
      20             : template<typename T> class SwigValueWrapper {
      21             :   struct SwigMovePointer {
      22             :     T *ptr;
      23             :     SwigMovePointer(T *p) : ptr(p) { }
      24             :     ~SwigMovePointer() { delete ptr; }
      25             :     SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
      26             :   } pointer;
      27             :   SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
      28             :   SwigValueWrapper(const SwigValueWrapper<T>& rhs);
      29             : public:
      30             :   SwigValueWrapper() : pointer(0) { }
      31             :   SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
      32             :   operator T&() const { return *pointer.ptr; }
      33             :   T *operator&() { return pointer.ptr; }
      34             : };
      35             : 
      36             : template <typename T> T SwigValueInit() {
      37             :   return T();
      38             : }
      39             : #endif
      40             : 
      41             : /* -----------------------------------------------------------------------------
      42             :  *  This section contains generic SWIG labels for method/variable
      43             :  *  declarations/attributes, and other compiler dependent labels.
      44             :  * ----------------------------------------------------------------------------- */
      45             : 
      46             : /* template workaround for compilers that cannot correctly implement the C++ standard */
      47             : #ifndef SWIGTEMPLATEDISAMBIGUATOR
      48             : # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
      49             : #  define SWIGTEMPLATEDISAMBIGUATOR template
      50             : # elif defined(__HP_aCC)
      51             : /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
      52             : /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
      53             : #  define SWIGTEMPLATEDISAMBIGUATOR template
      54             : # else
      55             : #  define SWIGTEMPLATEDISAMBIGUATOR
      56             : # endif
      57             : #endif
      58             : 
      59             : /* inline attribute */
      60             : #ifndef SWIGINLINE
      61             : # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
      62             : #   define SWIGINLINE inline
      63             : # else
      64             : #   define SWIGINLINE
      65             : # endif
      66             : #endif
      67             : 
      68             : /* attribute recognised by some compilers to avoid 'unused' warnings */
      69             : #ifndef SWIGUNUSED
      70             : # if defined(__GNUC__)
      71             : #   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
      72             : #     define SWIGUNUSED __attribute__ ((__unused__))
      73             : #   else
      74             : #     define SWIGUNUSED
      75             : #   endif
      76             : # elif defined(__ICC)
      77             : #   define SWIGUNUSED __attribute__ ((__unused__))
      78             : # else
      79             : #   define SWIGUNUSED
      80             : # endif
      81             : #endif
      82             : 
      83             : #ifndef SWIG_MSC_UNSUPPRESS_4505
      84             : # if defined(_MSC_VER)
      85             : #   pragma warning(disable : 4505) /* unreferenced local function has been removed */
      86             : # endif
      87             : #endif
      88             : 
      89             : #ifndef SWIGUNUSEDPARM
      90             : # ifdef __cplusplus
      91             : #   define SWIGUNUSEDPARM(p)
      92             : # else
      93             : #   define SWIGUNUSEDPARM(p) p SWIGUNUSED
      94             : # endif
      95             : #endif
      96             : 
      97             : /* internal SWIG method */
      98             : #ifndef SWIGINTERN
      99             : # define SWIGINTERN static SWIGUNUSED
     100             : #endif
     101             : 
     102             : /* internal inline SWIG method */
     103             : #ifndef SWIGINTERNINLINE
     104             : # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
     105             : #endif
     106             : 
     107             : /* exporting methods */
     108             : #if defined(__GNUC__)
     109             : #  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
     110             : #    ifndef GCC_HASCLASSVISIBILITY
     111             : #      define GCC_HASCLASSVISIBILITY
     112             : #    endif
     113             : #  endif
     114             : #endif
     115             : 
     116             : #ifndef SWIGEXPORT
     117             : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
     118             : #   if defined(STATIC_LINKED)
     119             : #     define SWIGEXPORT
     120             : #   else
     121             : #     define SWIGEXPORT __declspec(dllexport)
     122             : #   endif
     123             : # else
     124             : #   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
     125             : #     define SWIGEXPORT __attribute__ ((visibility("default")))
     126             : #   else
     127             : #     define SWIGEXPORT
     128             : #   endif
     129             : # endif
     130             : #endif
     131             : 
     132             : /* calling conventions for Windows */
     133             : #ifndef SWIGSTDCALL
     134             : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
     135             : #   define SWIGSTDCALL __stdcall
     136             : # else
     137             : #   define SWIGSTDCALL
     138             : # endif
     139             : #endif
     140             : 
     141             : /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
     142             : #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
     143             : # define _CRT_SECURE_NO_DEPRECATE
     144             : #endif
     145             : 
     146             : /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
     147             : #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
     148             : # define _SCL_SECURE_NO_DEPRECATE
     149             : #endif
     150             : 
     151             : /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
     152             : #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
     153             : # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
     154             : #endif
     155             : 
     156             : /* Intel's compiler complains if a variable which was never initialised is
     157             :  * cast to void, which is a common idiom which we use to indicate that we
     158             :  * are aware a variable isn't used.  So we just silence that warning.
     159             :  * See: https://github.com/swig/swig/issues/192 for more discussion.
     160             :  */
     161             : #ifdef __INTEL_COMPILER
     162             : # pragma warning disable 592
     163             : #endif
     164             : 
     165             : 
     166             : /* Fix for jlong on some versions of gcc on Windows */
     167             : #if defined(__GNUC__) && !defined(__INTEL_COMPILER)
     168             :   typedef long long __int64;
     169             : #endif
     170             : 
     171             : /* Fix for jlong on 64-bit x86 Solaris */
     172             : #if defined(__x86_64)
     173             : # ifdef _LP64
     174             : #   undef _LP64
     175             : # endif
     176             : #endif
     177             : 
     178             : #include <jni.h>
     179             : #include <stdlib.h>
     180             : #include <string.h>
     181             : 
     182             : 
     183             : /* Support for throwing Java exceptions */
     184             : typedef enum {
     185             :   SWIG_JavaOutOfMemoryError = 1,
     186             :   SWIG_JavaIOException,
     187             :   SWIG_JavaRuntimeException,
     188             :   SWIG_JavaIndexOutOfBoundsException,
     189             :   SWIG_JavaArithmeticException,
     190             :   SWIG_JavaIllegalArgumentException,
     191             :   SWIG_JavaNullPointerException,
     192             :   SWIG_JavaDirectorPureVirtual,
     193             :   SWIG_JavaUnknownError,
     194             :   SWIG_JavaIllegalStateException,
     195             : } SWIG_JavaExceptionCodes;
     196             : 
     197             : typedef struct {
     198             :   SWIG_JavaExceptionCodes code;
     199             :   const char *java_exception;
     200             : } SWIG_JavaExceptions_t;
     201             : 
     202             : 
     203           0 : static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) {
     204             :   jclass excep;
     205             :   static const SWIG_JavaExceptions_t java_exceptions[] = {
     206             :     { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" },
     207             :     { SWIG_JavaIOException, "java/io/IOException" },
     208             :     { SWIG_JavaRuntimeException, "java/lang/RuntimeException" },
     209             :     { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" },
     210             :     { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" },
     211             :     { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" },
     212             :     { SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
     213             :     { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
     214             :     { SWIG_JavaUnknownError,  "java/lang/UnknownError" },
     215             :     { SWIG_JavaIllegalStateException, "java/lang/IllegalStateException" },
     216             :     { (SWIG_JavaExceptionCodes)0,  "java/lang/UnknownError" }
     217             :   };
     218           0 :   const SWIG_JavaExceptions_t *except_ptr = java_exceptions;
     219             : 
     220           0 :   while (except_ptr->code != code && except_ptr->code)
     221           0 :     except_ptr++;
     222             : 
     223           0 :   jenv->ExceptionClear();
     224           0 :   excep = jenv->FindClass(except_ptr->java_exception);
     225           0 :   if (excep)
     226           0 :     jenv->ThrowNew(excep, msg);
     227           0 : }
     228             : 
     229             : 
     230             : /* Contract support */
     231             : 
     232             : #define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else
     233             : 
     234             : /*  Errors in SWIG */
     235             : #define  SWIG_UnknownError         -1
     236             : #define  SWIG_IOError            -2
     237             : #define  SWIG_RuntimeError       -3
     238             : #define  SWIG_IndexError         -4
     239             : #define  SWIG_TypeError          -5
     240             : #define  SWIG_DivisionByZero     -6
     241             : #define  SWIG_OverflowError      -7
     242             : #define  SWIG_SyntaxError        -8
     243             : #define  SWIG_ValueError         -9
     244             : #define  SWIG_SystemError        -10
     245             : #define  SWIG_AttributeError     -11
     246             : #define  SWIG_MemoryError        -12
     247             : #define  SWIG_NullReferenceError   -13
     248             : 
     249             : 
     250             : 
     251             : 
     252           0 : SWIGINTERN void SWIG_JavaException(JNIEnv *jenv, int code, const char *msg) {
     253           0 :   SWIG_JavaExceptionCodes exception_code = SWIG_JavaUnknownError;
     254           0 :   switch(code) {
     255           0 :   case SWIG_MemoryError:
     256           0 :     exception_code = SWIG_JavaOutOfMemoryError;
     257           0 :     break;
     258           0 :   case SWIG_IOError:
     259           0 :     exception_code = SWIG_JavaIOException;
     260           0 :     break;
     261           0 :   case SWIG_SystemError:
     262             :   case SWIG_RuntimeError:
     263           0 :     exception_code = SWIG_JavaRuntimeException;
     264           0 :     break;
     265           0 :   case SWIG_OverflowError:
     266             :   case SWIG_IndexError:
     267           0 :     exception_code = SWIG_JavaIndexOutOfBoundsException;
     268           0 :     break;
     269           0 :   case SWIG_DivisionByZero:
     270           0 :     exception_code = SWIG_JavaArithmeticException;
     271           0 :     break;
     272           0 :   case SWIG_SyntaxError:
     273             :   case SWIG_ValueError:
     274             :   case SWIG_TypeError:
     275           0 :     exception_code = SWIG_JavaIllegalArgumentException;
     276           0 :     break;
     277           0 :   case SWIG_UnknownError:
     278             :   default:
     279           0 :     exception_code = SWIG_JavaUnknownError;
     280           0 :     break;
     281             :   }
     282           0 :   SWIG_JavaThrowException(jenv, exception_code, msg);
     283           0 : }
     284             : 
     285             : 
     286             : #include <typeinfo>
     287             : #include <stdexcept>
     288             : 
     289             : 
     290             : typedef char retStringAndCPLFree;
     291             : 
     292             : 
     293             : #include <iostream>
     294             : using namespace std;
     295             : 
     296             : #define CPL_SUPRESS_CPLUSPLUS
     297             : 
     298             : #include "cpl_string.h"
     299             : #include "cpl_conv.h"
     300             : 
     301             : #include "ogr_srs_api.h"
     302             : 
     303             : #ifdef DEBUG
     304             : typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
     305             : typedef struct OGRCoordinateTransformationHS OSRCoordinateTransformationShadow;
     306             : typedef struct OGRCoordinateTransformationHS OGRCoordinateTransformationShadow;
     307             : #else
     308             : typedef void OSRSpatialReferenceShadow;
     309             : typedef void OSRCoordinateTransformationShadow;
     310             : #endif
     311             : 
     312             : 
     313             : #if defined(SWIG_NOINCLUDE) || defined(SWIG_NOARRAYS)
     314             : 
     315             : 
     316             : static int SWIG_JavaArrayInBool (JNIEnv *jenv, jboolean **jarr, bool **carr, jbooleanArray input);
     317             : static void SWIG_JavaArrayArgoutBool (JNIEnv *jenv, jboolean *jarr, bool *carr, jbooleanArray input);
     318             : static jbooleanArray SWIG_JavaArrayOutBool (JNIEnv *jenv, bool *result, jsize sz);
     319             : 
     320             : 
     321             : static int SWIG_JavaArrayInSchar (JNIEnv *jenv, jbyte **jarr, signed char **carr, jbyteArray input);
     322             : static void SWIG_JavaArrayArgoutSchar (JNIEnv *jenv, jbyte *jarr, signed char *carr, jbyteArray input);
     323             : static jbyteArray SWIG_JavaArrayOutSchar (JNIEnv *jenv, signed char *result, jsize sz);
     324             : 
     325             : 
     326             : static int SWIG_JavaArrayInUchar (JNIEnv *jenv, jshort **jarr, unsigned char **carr, jshortArray input);
     327             : static void SWIG_JavaArrayArgoutUchar (JNIEnv *jenv, jshort *jarr, unsigned char *carr, jshortArray input);
     328             : static jshortArray SWIG_JavaArrayOutUchar (JNIEnv *jenv, unsigned char *result, jsize sz);
     329             : 
     330             : 
     331             : static int SWIG_JavaArrayInShort (JNIEnv *jenv, jshort **jarr, short **carr, jshortArray input);
     332             : static void SWIG_JavaArrayArgoutShort (JNIEnv *jenv, jshort *jarr, short *carr, jshortArray input);
     333             : static jshortArray SWIG_JavaArrayOutShort (JNIEnv *jenv, short *result, jsize sz);
     334             : 
     335             : 
     336             : static int SWIG_JavaArrayInUshort (JNIEnv *jenv, jint **jarr, unsigned short **carr, jintArray input);
     337             : static void SWIG_JavaArrayArgoutUshort (JNIEnv *jenv, jint *jarr, unsigned short *carr, jintArray input);
     338             : static jintArray SWIG_JavaArrayOutUshort (JNIEnv *jenv, unsigned short *result, jsize sz);
     339             : 
     340             : 
     341             : static int SWIG_JavaArrayInInt (JNIEnv *jenv, jint **jarr, int **carr, jintArray input);
     342             : static void SWIG_JavaArrayArgoutInt (JNIEnv *jenv, jint *jarr, int *carr, jintArray input);
     343             : static jintArray SWIG_JavaArrayOutInt (JNIEnv *jenv, int *result, jsize sz);
     344             : 
     345             : 
     346             : static int SWIG_JavaArrayInUint (JNIEnv *jenv, jlong **jarr, unsigned int **carr, jlongArray input);
     347             : static void SWIG_JavaArrayArgoutUint (JNIEnv *jenv, jlong *jarr, unsigned int *carr, jlongArray input);
     348             : static jlongArray SWIG_JavaArrayOutUint (JNIEnv *jenv, unsigned int *result, jsize sz);
     349             : 
     350             : 
     351             : static int SWIG_JavaArrayInLong (JNIEnv *jenv, jint **jarr, long **carr, jintArray input);
     352             : static void SWIG_JavaArrayArgoutLong (JNIEnv *jenv, jint *jarr, long *carr, jintArray input);
     353             : static jintArray SWIG_JavaArrayOutLong (JNIEnv *jenv, long *result, jsize sz);
     354             : 
     355             : 
     356             : static int SWIG_JavaArrayInUlong (JNIEnv *jenv, jlong **jarr, unsigned long **carr, jlongArray input);
     357             : static void SWIG_JavaArrayArgoutUlong (JNIEnv *jenv, jlong *jarr, unsigned long *carr, jlongArray input);
     358             : static jlongArray SWIG_JavaArrayOutUlong (JNIEnv *jenv, unsigned long *result, jsize sz);
     359             : 
     360             : 
     361             : static int SWIG_JavaArrayInLonglong (JNIEnv *jenv, jlong **jarr, jlong **carr, jlongArray input);
     362             : static void SWIG_JavaArrayArgoutLonglong (JNIEnv *jenv, jlong *jarr, jlong *carr, jlongArray input);
     363             : static jlongArray SWIG_JavaArrayOutLonglong (JNIEnv *jenv, jlong *result, jsize sz);
     364             : 
     365             : 
     366             : static int SWIG_JavaArrayInFloat (JNIEnv *jenv, jfloat **jarr, float **carr, jfloatArray input);
     367             : static void SWIG_JavaArrayArgoutFloat (JNIEnv *jenv, jfloat *jarr, float *carr, jfloatArray input);
     368             : static jfloatArray SWIG_JavaArrayOutFloat (JNIEnv *jenv, float *result, jsize sz);
     369             : 
     370             : 
     371             : static int SWIG_JavaArrayInDouble (JNIEnv *jenv, jdouble **jarr, double **carr, jdoubleArray input);
     372             : static void SWIG_JavaArrayArgoutDouble (JNIEnv *jenv, jdouble *jarr, double *carr, jdoubleArray input);
     373             : static jdoubleArray SWIG_JavaArrayOutDouble (JNIEnv *jenv, double *result, jsize sz);
     374             : 
     375             : 
     376             : #else
     377             : 
     378             : 
     379             : /* bool[] support */
     380           0 : static int SWIG_JavaArrayInBool (JNIEnv *jenv, jboolean **jarr, bool **carr, jbooleanArray input) {
     381             :   int i;
     382             :   jsize sz;
     383           0 :   if (!input) {
     384           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
     385           0 :     return 0;
     386             :   }
     387           0 :   sz = jenv->GetArrayLength(input);
     388           0 :   *jarr = jenv->GetBooleanArrayElements(input, 0);
     389           0 :   if (!*jarr)
     390           0 :     return 0; 
     391           0 :   *carr = new bool[sz]; 
     392           0 :   if (!*carr) {
     393           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
     394           0 :     return 0;
     395             :   }
     396           0 :   for (i=0; i<sz; i++)
     397           0 :     (*carr)[i] = ((*jarr)[i] != 0);
     398           0 :   return 1;
     399             : }
     400             : 
     401           0 : static void SWIG_JavaArrayArgoutBool (JNIEnv *jenv, jboolean *jarr, bool *carr, jbooleanArray input) {
     402             :   int i;
     403           0 :   jsize sz = jenv->GetArrayLength(input);
     404           0 :   for (i=0; i<sz; i++)
     405           0 :     jarr[i] = (jboolean)carr[i];
     406           0 :   jenv->ReleaseBooleanArrayElements(input, jarr, 0);
     407           0 : }
     408             : 
     409           0 : static jbooleanArray SWIG_JavaArrayOutBool (JNIEnv *jenv, bool *result, jsize sz) {
     410             :   jboolean *arr;
     411             :   int i;
     412           0 :   jbooleanArray jresult = jenv->NewBooleanArray(sz);
     413           0 :   if (!jresult)
     414           0 :     return NULL;
     415           0 :   arr = jenv->GetBooleanArrayElements(jresult, 0);
     416           0 :   if (!arr)
     417           0 :     return NULL;
     418           0 :   for (i=0; i<sz; i++)
     419           0 :     arr[i] = (jboolean)result[i];
     420           0 :   jenv->ReleaseBooleanArrayElements(jresult, arr, 0);
     421           0 :   return jresult;
     422             : }
     423             : 
     424             : 
     425             : /* signed char[] support */
     426           0 : static int SWIG_JavaArrayInSchar (JNIEnv *jenv, jbyte **jarr, signed char **carr, jbyteArray input) {
     427             :   int i;
     428             :   jsize sz;
     429           0 :   if (!input) {
     430           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
     431           0 :     return 0;
     432             :   }
     433           0 :   sz = jenv->GetArrayLength(input);
     434           0 :   *jarr = jenv->GetByteArrayElements(input, 0);
     435           0 :   if (!*jarr)
     436           0 :     return 0; 
     437           0 :   *carr = new signed char[sz]; 
     438           0 :   if (!*carr) {
     439           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
     440           0 :     return 0;
     441             :   }
     442           0 :   for (i=0; i<sz; i++)
     443           0 :     (*carr)[i] = (signed char)(*jarr)[i];
     444           0 :   return 1;
     445             : }
     446             : 
     447           0 : static void SWIG_JavaArrayArgoutSchar (JNIEnv *jenv, jbyte *jarr, signed char *carr, jbyteArray input) {
     448             :   int i;
     449           0 :   jsize sz = jenv->GetArrayLength(input);
     450           0 :   for (i=0; i<sz; i++)
     451           0 :     jarr[i] = (jbyte)carr[i];
     452           0 :   jenv->ReleaseByteArrayElements(input, jarr, 0);
     453           0 : }
     454             : 
     455           0 : static jbyteArray SWIG_JavaArrayOutSchar (JNIEnv *jenv, signed char *result, jsize sz) {
     456             :   jbyte *arr;
     457             :   int i;
     458           0 :   jbyteArray jresult = jenv->NewByteArray(sz);
     459           0 :   if (!jresult)
     460           0 :     return NULL;
     461           0 :   arr = jenv->GetByteArrayElements(jresult, 0);
     462           0 :   if (!arr)
     463           0 :     return NULL;
     464           0 :   for (i=0; i<sz; i++)
     465           0 :     arr[i] = (jbyte)result[i];
     466           0 :   jenv->ReleaseByteArrayElements(jresult, arr, 0);
     467           0 :   return jresult;
     468             : }
     469             : 
     470             : 
     471             : /* unsigned char[] support */
     472           0 : static int SWIG_JavaArrayInUchar (JNIEnv *jenv, jshort **jarr, unsigned char **carr, jshortArray input) {
     473             :   int i;
     474             :   jsize sz;
     475           0 :   if (!input) {
     476           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
     477           0 :     return 0;
     478             :   }
     479           0 :   sz = jenv->GetArrayLength(input);
     480           0 :   *jarr = jenv->GetShortArrayElements(input, 0);
     481           0 :   if (!*jarr)
     482           0 :     return 0; 
     483           0 :   *carr = new unsigned char[sz]; 
     484           0 :   if (!*carr) {
     485           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
     486           0 :     return 0;
     487             :   }
     488           0 :   for (i=0; i<sz; i++)
     489           0 :     (*carr)[i] = (unsigned char)(*jarr)[i];
     490           0 :   return 1;
     491             : }
     492             : 
     493           0 : static void SWIG_JavaArrayArgoutUchar (JNIEnv *jenv, jshort *jarr, unsigned char *carr, jshortArray input) {
     494             :   int i;
     495           0 :   jsize sz = jenv->GetArrayLength(input);
     496           0 :   for (i=0; i<sz; i++)
     497           0 :     jarr[i] = (jshort)carr[i];
     498           0 :   jenv->ReleaseShortArrayElements(input, jarr, 0);
     499           0 : }
     500             : 
     501           0 : static jshortArray SWIG_JavaArrayOutUchar (JNIEnv *jenv, unsigned char *result, jsize sz) {
     502             :   jshort *arr;
     503             :   int i;
     504           0 :   jshortArray jresult = jenv->NewShortArray(sz);
     505           0 :   if (!jresult)
     506           0 :     return NULL;
     507           0 :   arr = jenv->GetShortArrayElements(jresult, 0);
     508           0 :   if (!arr)
     509           0 :     return NULL;
     510           0 :   for (i=0; i<sz; i++)
     511           0 :     arr[i] = (jshort)result[i];
     512           0 :   jenv->ReleaseShortArrayElements(jresult, arr, 0);
     513           0 :   return jresult;
     514             : }
     515             : 
     516             : 
     517             : /* short[] support */
     518           0 : static int SWIG_JavaArrayInShort (JNIEnv *jenv, jshort **jarr, short **carr, jshortArray input) {
     519             :   int i;
     520             :   jsize sz;
     521           0 :   if (!input) {
     522           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
     523           0 :     return 0;
     524             :   }
     525           0 :   sz = jenv->GetArrayLength(input);
     526           0 :   *jarr = jenv->GetShortArrayElements(input, 0);
     527           0 :   if (!*jarr)
     528           0 :     return 0; 
     529           0 :   *carr = new short[sz]; 
     530           0 :   if (!*carr) {
     531           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
     532           0 :     return 0;
     533             :   }
     534           0 :   for (i=0; i<sz; i++)
     535           0 :     (*carr)[i] = (short)(*jarr)[i];
     536           0 :   return 1;
     537             : }
     538             : 
     539           0 : static void SWIG_JavaArrayArgoutShort (JNIEnv *jenv, jshort *jarr, short *carr, jshortArray input) {
     540             :   int i;
     541           0 :   jsize sz = jenv->GetArrayLength(input);
     542           0 :   for (i=0; i<sz; i++)
     543           0 :     jarr[i] = (jshort)carr[i];
     544           0 :   jenv->ReleaseShortArrayElements(input, jarr, 0);
     545           0 : }
     546             : 
     547           0 : static jshortArray SWIG_JavaArrayOutShort (JNIEnv *jenv, short *result, jsize sz) {
     548             :   jshort *arr;
     549             :   int i;
     550           0 :   jshortArray jresult = jenv->NewShortArray(sz);
     551           0 :   if (!jresult)
     552           0 :     return NULL;
     553           0 :   arr = jenv->GetShortArrayElements(jresult, 0);
     554           0 :   if (!arr)
     555           0 :     return NULL;
     556           0 :   for (i=0; i<sz; i++)
     557           0 :     arr[i] = (jshort)result[i];
     558           0 :   jenv->ReleaseShortArrayElements(jresult, arr, 0);
     559           0 :   return jresult;
     560             : }
     561             : 
     562             : 
     563             : /* unsigned short[] support */
     564           0 : static int SWIG_JavaArrayInUshort (JNIEnv *jenv, jint **jarr, unsigned short **carr, jintArray input) {
     565             :   int i;
     566             :   jsize sz;
     567           0 :   if (!input) {
     568           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
     569           0 :     return 0;
     570             :   }
     571           0 :   sz = jenv->GetArrayLength(input);
     572           0 :   *jarr = jenv->GetIntArrayElements(input, 0);
     573           0 :   if (!*jarr)
     574           0 :     return 0; 
     575           0 :   *carr = new unsigned short[sz]; 
     576           0 :   if (!*carr) {
     577           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
     578           0 :     return 0;
     579             :   }
     580           0 :   for (i=0; i<sz; i++)
     581           0 :     (*carr)[i] = (unsigned short)(*jarr)[i];
     582           0 :   return 1;
     583             : }
     584             : 
     585           0 : static void SWIG_JavaArrayArgoutUshort (JNIEnv *jenv, jint *jarr, unsigned short *carr, jintArray input) {
     586             :   int i;
     587           0 :   jsize sz = jenv->GetArrayLength(input);
     588           0 :   for (i=0; i<sz; i++)
     589           0 :     jarr[i] = (jint)carr[i];
     590           0 :   jenv->ReleaseIntArrayElements(input, jarr, 0);
     591           0 : }
     592             : 
     593           0 : static jintArray SWIG_JavaArrayOutUshort (JNIEnv *jenv, unsigned short *result, jsize sz) {
     594             :   jint *arr;
     595             :   int i;
     596           0 :   jintArray jresult = jenv->NewIntArray(sz);
     597           0 :   if (!jresult)
     598           0 :     return NULL;
     599           0 :   arr = jenv->GetIntArrayElements(jresult, 0);
     600           0 :   if (!arr)
     601           0 :     return NULL;
     602           0 :   for (i=0; i<sz; i++)
     603           0 :     arr[i] = (jint)result[i];
     604           0 :   jenv->ReleaseIntArrayElements(jresult, arr, 0);
     605           0 :   return jresult;
     606             : }
     607             : 
     608             : 
     609             : /* int[] support */
     610           0 : static int SWIG_JavaArrayInInt (JNIEnv *jenv, jint **jarr, int **carr, jintArray input) {
     611             :   int i;
     612             :   jsize sz;
     613           0 :   if (!input) {
     614           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
     615           0 :     return 0;
     616             :   }
     617           0 :   sz = jenv->GetArrayLength(input);
     618           0 :   *jarr = jenv->GetIntArrayElements(input, 0);
     619           0 :   if (!*jarr)
     620           0 :     return 0; 
     621           0 :   *carr = new int[sz]; 
     622           0 :   if (!*carr) {
     623           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
     624           0 :     return 0;
     625             :   }
     626           0 :   for (i=0; i<sz; i++)
     627           0 :     (*carr)[i] = (int)(*jarr)[i];
     628           0 :   return 1;
     629             : }
     630             : 
     631           0 : static void SWIG_JavaArrayArgoutInt (JNIEnv *jenv, jint *jarr, int *carr, jintArray input) {
     632             :   int i;
     633           0 :   jsize sz = jenv->GetArrayLength(input);
     634           0 :   for (i=0; i<sz; i++)
     635           0 :     jarr[i] = (jint)carr[i];
     636           0 :   jenv->ReleaseIntArrayElements(input, jarr, 0);
     637           0 : }
     638             : 
     639           0 : static jintArray SWIG_JavaArrayOutInt (JNIEnv *jenv, int *result, jsize sz) {
     640             :   jint *arr;
     641             :   int i;
     642           0 :   jintArray jresult = jenv->NewIntArray(sz);
     643           0 :   if (!jresult)
     644           0 :     return NULL;
     645           0 :   arr = jenv->GetIntArrayElements(jresult, 0);
     646           0 :   if (!arr)
     647           0 :     return NULL;
     648           0 :   for (i=0; i<sz; i++)
     649           0 :     arr[i] = (jint)result[i];
     650           0 :   jenv->ReleaseIntArrayElements(jresult, arr, 0);
     651           0 :   return jresult;
     652             : }
     653             : 
     654             : 
     655             : /* unsigned int[] support */
     656           0 : static int SWIG_JavaArrayInUint (JNIEnv *jenv, jlong **jarr, unsigned int **carr, jlongArray input) {
     657             :   int i;
     658             :   jsize sz;
     659           0 :   if (!input) {
     660           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
     661           0 :     return 0;
     662             :   }
     663           0 :   sz = jenv->GetArrayLength(input);
     664           0 :   *jarr = jenv->GetLongArrayElements(input, 0);
     665           0 :   if (!*jarr)
     666           0 :     return 0; 
     667           0 :   *carr = new unsigned int[sz]; 
     668           0 :   if (!*carr) {
     669           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
     670           0 :     return 0;
     671             :   }
     672           0 :   for (i=0; i<sz; i++)
     673           0 :     (*carr)[i] = (unsigned int)(*jarr)[i];
     674           0 :   return 1;
     675             : }
     676             : 
     677           0 : static void SWIG_JavaArrayArgoutUint (JNIEnv *jenv, jlong *jarr, unsigned int *carr, jlongArray input) {
     678             :   int i;
     679           0 :   jsize sz = jenv->GetArrayLength(input);
     680           0 :   for (i=0; i<sz; i++)
     681           0 :     jarr[i] = (jlong)carr[i];
     682           0 :   jenv->ReleaseLongArrayElements(input, jarr, 0);
     683           0 : }
     684             : 
     685           0 : static jlongArray SWIG_JavaArrayOutUint (JNIEnv *jenv, unsigned int *result, jsize sz) {
     686             :   jlong *arr;
     687             :   int i;
     688           0 :   jlongArray jresult = jenv->NewLongArray(sz);
     689           0 :   if (!jresult)
     690           0 :     return NULL;
     691           0 :   arr = jenv->GetLongArrayElements(jresult, 0);
     692           0 :   if (!arr)
     693           0 :     return NULL;
     694           0 :   for (i=0; i<sz; i++)
     695           0 :     arr[i] = (jlong)result[i];
     696           0 :   jenv->ReleaseLongArrayElements(jresult, arr, 0);
     697           0 :   return jresult;
     698             : }
     699             : 
     700             : 
     701             : /* long[] support */
     702           0 : static int SWIG_JavaArrayInLong (JNIEnv *jenv, jint **jarr, long **carr, jintArray input) {
     703             :   int i;
     704             :   jsize sz;
     705           0 :   if (!input) {
     706           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
     707           0 :     return 0;
     708             :   }
     709           0 :   sz = jenv->GetArrayLength(input);
     710           0 :   *jarr = jenv->GetIntArrayElements(input, 0);
     711           0 :   if (!*jarr)
     712           0 :     return 0; 
     713           0 :   *carr = new long[sz]; 
     714           0 :   if (!*carr) {
     715           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
     716           0 :     return 0;
     717             :   }
     718           0 :   for (i=0; i<sz; i++)
     719           0 :     (*carr)[i] = (long)(*jarr)[i];
     720           0 :   return 1;
     721             : }
     722             : 
     723           0 : static void SWIG_JavaArrayArgoutLong (JNIEnv *jenv, jint *jarr, long *carr, jintArray input) {
     724             :   int i;
     725           0 :   jsize sz = jenv->GetArrayLength(input);
     726           0 :   for (i=0; i<sz; i++)
     727           0 :     jarr[i] = (jint)carr[i];
     728           0 :   jenv->ReleaseIntArrayElements(input, jarr, 0);
     729           0 : }
     730             : 
     731           0 : static jintArray SWIG_JavaArrayOutLong (JNIEnv *jenv, long *result, jsize sz) {
     732             :   jint *arr;
     733             :   int i;
     734           0 :   jintArray jresult = jenv->NewIntArray(sz);
     735           0 :   if (!jresult)
     736           0 :     return NULL;
     737           0 :   arr = jenv->GetIntArrayElements(jresult, 0);
     738           0 :   if (!arr)
     739           0 :     return NULL;
     740           0 :   for (i=0; i<sz; i++)
     741           0 :     arr[i] = (jint)result[i];
     742           0 :   jenv->ReleaseIntArrayElements(jresult, arr, 0);
     743           0 :   return jresult;
     744             : }
     745             : 
     746             : 
     747             : /* unsigned long[] support */
     748           0 : static int SWIG_JavaArrayInUlong (JNIEnv *jenv, jlong **jarr, unsigned long **carr, jlongArray input) {
     749             :   int i;
     750             :   jsize sz;
     751           0 :   if (!input) {
     752           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
     753           0 :     return 0;
     754             :   }
     755           0 :   sz = jenv->GetArrayLength(input);
     756           0 :   *jarr = jenv->GetLongArrayElements(input, 0);
     757           0 :   if (!*jarr)
     758           0 :     return 0; 
     759           0 :   *carr = new unsigned long[sz]; 
     760           0 :   if (!*carr) {
     761           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
     762           0 :     return 0;
     763             :   }
     764           0 :   for (i=0; i<sz; i++)
     765           0 :     (*carr)[i] = (unsigned long)(*jarr)[i];
     766           0 :   return 1;
     767             : }
     768             : 
     769           0 : static void SWIG_JavaArrayArgoutUlong (JNIEnv *jenv, jlong *jarr, unsigned long *carr, jlongArray input) {
     770             :   int i;
     771           0 :   jsize sz = jenv->GetArrayLength(input);
     772           0 :   for (i=0; i<sz; i++)
     773           0 :     jarr[i] = (jlong)carr[i];
     774           0 :   jenv->ReleaseLongArrayElements(input, jarr, 0);
     775           0 : }
     776             : 
     777           0 : static jlongArray SWIG_JavaArrayOutUlong (JNIEnv *jenv, unsigned long *result, jsize sz) {
     778             :   jlong *arr;
     779             :   int i;
     780           0 :   jlongArray jresult = jenv->NewLongArray(sz);
     781           0 :   if (!jresult)
     782           0 :     return NULL;
     783           0 :   arr = jenv->GetLongArrayElements(jresult, 0);
     784           0 :   if (!arr)
     785           0 :     return NULL;
     786           0 :   for (i=0; i<sz; i++)
     787           0 :     arr[i] = (jlong)result[i];
     788           0 :   jenv->ReleaseLongArrayElements(jresult, arr, 0);
     789           0 :   return jresult;
     790             : }
     791             : 
     792             : 
     793             : /* jlong[] support */
     794           0 : static int SWIG_JavaArrayInLonglong (JNIEnv *jenv, jlong **jarr, jlong **carr, jlongArray input) {
     795             :   int i;
     796             :   jsize sz;
     797           0 :   if (!input) {
     798           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
     799           0 :     return 0;
     800             :   }
     801           0 :   sz = jenv->GetArrayLength(input);
     802           0 :   *jarr = jenv->GetLongArrayElements(input, 0);
     803           0 :   if (!*jarr)
     804           0 :     return 0; 
     805           0 :   *carr = new jlong[sz]; 
     806           0 :   if (!*carr) {
     807           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
     808           0 :     return 0;
     809             :   }
     810           0 :   for (i=0; i<sz; i++)
     811           0 :     (*carr)[i] = (jlong)(*jarr)[i];
     812           0 :   return 1;
     813             : }
     814             : 
     815           0 : static void SWIG_JavaArrayArgoutLonglong (JNIEnv *jenv, jlong *jarr, jlong *carr, jlongArray input) {
     816             :   int i;
     817           0 :   jsize sz = jenv->GetArrayLength(input);
     818           0 :   for (i=0; i<sz; i++)
     819           0 :     jarr[i] = (jlong)carr[i];
     820           0 :   jenv->ReleaseLongArrayElements(input, jarr, 0);
     821           0 : }
     822             : 
     823           0 : static jlongArray SWIG_JavaArrayOutLonglong (JNIEnv *jenv, jlong *result, jsize sz) {
     824             :   jlong *arr;
     825             :   int i;
     826           0 :   jlongArray jresult = jenv->NewLongArray(sz);
     827           0 :   if (!jresult)
     828           0 :     return NULL;
     829           0 :   arr = jenv->GetLongArrayElements(jresult, 0);
     830           0 :   if (!arr)
     831           0 :     return NULL;
     832           0 :   for (i=0; i<sz; i++)
     833           0 :     arr[i] = (jlong)result[i];
     834           0 :   jenv->ReleaseLongArrayElements(jresult, arr, 0);
     835           0 :   return jresult;
     836             : }
     837             : 
     838             : 
     839             : /* float[] support */
     840           0 : static int SWIG_JavaArrayInFloat (JNIEnv *jenv, jfloat **jarr, float **carr, jfloatArray input) {
     841             :   int i;
     842             :   jsize sz;
     843           0 :   if (!input) {
     844           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
     845           0 :     return 0;
     846             :   }
     847           0 :   sz = jenv->GetArrayLength(input);
     848           0 :   *jarr = jenv->GetFloatArrayElements(input, 0);
     849           0 :   if (!*jarr)
     850           0 :     return 0; 
     851           0 :   *carr = new float[sz]; 
     852           0 :   if (!*carr) {
     853           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
     854           0 :     return 0;
     855             :   }
     856           0 :   for (i=0; i<sz; i++)
     857           0 :     (*carr)[i] = (float)(*jarr)[i];
     858           0 :   return 1;
     859             : }
     860             : 
     861           0 : static void SWIG_JavaArrayArgoutFloat (JNIEnv *jenv, jfloat *jarr, float *carr, jfloatArray input) {
     862             :   int i;
     863           0 :   jsize sz = jenv->GetArrayLength(input);
     864           0 :   for (i=0; i<sz; i++)
     865           0 :     jarr[i] = (jfloat)carr[i];
     866           0 :   jenv->ReleaseFloatArrayElements(input, jarr, 0);
     867           0 : }
     868             : 
     869           0 : static jfloatArray SWIG_JavaArrayOutFloat (JNIEnv *jenv, float *result, jsize sz) {
     870             :   jfloat *arr;
     871             :   int i;
     872           0 :   jfloatArray jresult = jenv->NewFloatArray(sz);
     873           0 :   if (!jresult)
     874           0 :     return NULL;
     875           0 :   arr = jenv->GetFloatArrayElements(jresult, 0);
     876           0 :   if (!arr)
     877           0 :     return NULL;
     878           0 :   for (i=0; i<sz; i++)
     879           0 :     arr[i] = (jfloat)result[i];
     880           0 :   jenv->ReleaseFloatArrayElements(jresult, arr, 0);
     881           0 :   return jresult;
     882             : }
     883             : 
     884             : 
     885             : /* double[] support */
     886           0 : static int SWIG_JavaArrayInDouble (JNIEnv *jenv, jdouble **jarr, double **carr, jdoubleArray input) {
     887             :   int i;
     888             :   jsize sz;
     889           0 :   if (!input) {
     890           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null array");
     891           0 :     return 0;
     892             :   }
     893           0 :   sz = jenv->GetArrayLength(input);
     894           0 :   *jarr = jenv->GetDoubleArrayElements(input, 0);
     895           0 :   if (!*jarr)
     896           0 :     return 0; 
     897           0 :   *carr = new double[sz]; 
     898           0 :   if (!*carr) {
     899           0 :     SWIG_JavaThrowException(jenv, SWIG_JavaOutOfMemoryError, "array memory allocation failed");
     900           0 :     return 0;
     901             :   }
     902           0 :   for (i=0; i<sz; i++)
     903           0 :     (*carr)[i] = (double)(*jarr)[i];
     904           0 :   return 1;
     905             : }
     906             : 
     907           0 : static void SWIG_JavaArrayArgoutDouble (JNIEnv *jenv, jdouble *jarr, double *carr, jdoubleArray input) {
     908             :   int i;
     909           0 :   jsize sz = jenv->GetArrayLength(input);
     910           0 :   for (i=0; i<sz; i++)
     911           0 :     jarr[i] = (jdouble)carr[i];
     912           0 :   jenv->ReleaseDoubleArrayElements(input, jarr, 0);
     913           0 : }
     914             : 
     915           0 : static jdoubleArray SWIG_JavaArrayOutDouble (JNIEnv *jenv, double *result, jsize sz) {
     916             :   jdouble *arr;
     917             :   int i;
     918           0 :   jdoubleArray jresult = jenv->NewDoubleArray(sz);
     919           0 :   if (!jresult)
     920           0 :     return NULL;
     921           0 :   arr = jenv->GetDoubleArrayElements(jresult, 0);
     922           0 :   if (!arr)
     923           0 :     return NULL;
     924           0 :   for (i=0; i<sz; i++)
     925           0 :     arr[i] = (jdouble)result[i];
     926           0 :   jenv->ReleaseDoubleArrayElements(jresult, arr, 0);
     927           0 :   return jresult;
     928             : }
     929             : 
     930             : 
     931             : #endif
     932             : 
     933             : 
     934             : static int bUseExceptions=1;
     935             : 
     936             : static void CPL_STDCALL
     937           0 : VeryQuietErrorHandler(CPLErr eclass, int code, const char *msg )
     938             : {
     939             :   /* If the error class is CE_Fatal, we want to have a message issued
     940             :      because the CPL support code does an abort() before any exception
     941             :      can be generated */
     942           0 :   if (eclass == CE_Fatal ) {
     943           0 :     CPLDefaultErrorHandler(eclass, code, msg );
     944             :   }
     945           0 : }
     946             : 
     947             : 
     948           0 : static void UseExceptions() {
     949           0 :   bUseExceptions = 1;
     950           0 :   CPLSetErrorHandler( (CPLErrorHandler) VeryQuietErrorHandler );
     951           0 : }
     952             : 
     953           0 : static void DontUseExceptions() {
     954           0 :   bUseExceptions = 0;
     955           0 :   CPLSetErrorHandler( CPLDefaultErrorHandler );
     956           0 : }
     957             : 
     958           2 : static bool GetUseExceptions() {
     959           2 :   return bUseExceptions == 1;
     960             : }
     961             : 
     962             : 
     963           0 : retStringAndCPLFree* GetWellKnownGeogCSAsWKT( const char *name ) {
     964           0 :   char* argout = NULL;
     965           0 :   OGRSpatialReferenceH srs = OSRNewSpatialReference("");
     966           0 :   OGRErr rcode = OSRSetWellKnownGeogCS( srs, name );
     967           0 :   if( rcode == OGRERR_NONE )
     968           0 :       rcode = OSRExportToWkt ( srs, &argout );
     969           0 :   OSRDestroySpatialReference( srs );
     970           0 :   return argout;
     971             : }
     972             : 
     973             : 
     974             : static jstring
     975           7 : SafeNewStringUTF8(JNIEnv *jenv, const char* pszInput)
     976             : {
     977           7 :   jstring ret = 0;
     978           7 :   if (pszInput)
     979             :   {
     980           7 :       if( !CPLIsUTF8(pszInput, -1) )
     981             :       {
     982           0 :           CPLError(CE_Warning, CPLE_AppDefined,
     983             :                    "A non-UTF8 string has been detected. Forcing it to ASCII");
     984           0 :           char* pszTmp = CPLUTF8ForceToASCII(pszInput, '_');
     985             : #ifdef __cplusplus
     986           0 :           ret = jenv->NewStringUTF(pszTmp);
     987             : #else
     988             :           ret = (*jenv)->NewStringUTF(jenv, pszTmp);
     989             : #endif
     990           0 :           CPLFree(pszTmp);
     991             :       }
     992             :       else
     993             :       {
     994             : #ifdef __cplusplus
     995           7 :           ret = jenv->NewStringUTF(pszInput);
     996             : #else
     997             :           ret = (*jenv)->NewStringUTF(jenv, pszInput);
     998             : #endif
     999             :       }
    1000             :   }
    1001           7 :   return ret;
    1002             : }
    1003             : 
    1004             : 
    1005           0 : retStringAndCPLFree* GetUserInputAsWKT( const char *name ) {
    1006           0 :   char* argout = NULL;
    1007           0 :   OGRSpatialReferenceH srs = OSRNewSpatialReference("");
    1008           0 :   OGRErr rcode = OSRSetFromUserInput( srs, name );
    1009           0 :   if( rcode == OGRERR_NONE )
    1010           0 :       rcode = OSRExportToWkt ( srs, &argout );
    1011           0 :   OSRDestroySpatialReference( srs );
    1012           0 :   return argout;
    1013             : }
    1014             : 
    1015             : 
    1016           0 : OGRErr GetWellKnownGeogCSAsWKT( const char *name, char **argout ) {
    1017           0 :   OGRSpatialReferenceH srs = OSRNewSpatialReference("");
    1018           0 :   OGRErr rcode = OSRSetWellKnownGeogCS( srs, name );
    1019           0 :   if( rcode == OGRERR_NONE )
    1020           0 :       rcode = OSRExportToWkt ( srs, argout );
    1021           0 :   OSRRelease( srs );
    1022           0 :   return rcode;
    1023             : }
    1024             : 
    1025             : 
    1026             : 
    1027             : #include "ogr_core.h"
    1028             : static char const *
    1029           0 : OGRErrMessages( int rc ) {
    1030           0 :   switch( rc ) {
    1031           0 :   case OGRERR_NONE:
    1032           0 :     return "OGR Error: None";
    1033           0 :   case OGRERR_NOT_ENOUGH_DATA:
    1034           0 :     return "OGR Error: Not enough data to deserialize";
    1035           0 :   case OGRERR_NOT_ENOUGH_MEMORY:
    1036           0 :     return "OGR Error: Not enough memory";
    1037           0 :   case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
    1038           0 :     return "OGR Error: Unsupported geometry type";
    1039           0 :   case OGRERR_UNSUPPORTED_OPERATION:
    1040           0 :     return "OGR Error: Unsupported operation";
    1041           0 :   case OGRERR_CORRUPT_DATA:
    1042           0 :     return "OGR Error: Corrupt data";
    1043           0 :   case OGRERR_FAILURE:
    1044           0 :     return "OGR Error: General Error";
    1045           0 :   case OGRERR_UNSUPPORTED_SRS:
    1046           0 :     return "OGR Error: Unsupported SRS";
    1047           0 :   case OGRERR_INVALID_HANDLE:
    1048           0 :     return "OGR Error: Invalid handle";
    1049           0 :   case OGRERR_NON_EXISTING_FEATURE:
    1050           0 :     return "OGR Error: Non existing feature";
    1051           0 :   default:
    1052           0 :     return "OGR Error: Unknown";
    1053             :   }
    1054             : }
    1055             : 
    1056             : 
    1057           0 : OGRErr GetUserInputAsWKT( const char *name, char **argout ) {
    1058           0 :   OGRSpatialReferenceH srs = OSRNewSpatialReference("");
    1059           0 :   OGRErr rcode = OSRSetFromUserInput( srs, name );
    1060           0 :   if( rcode == OGRERR_NONE )
    1061           0 :       rcode = OSRExportToWkt ( srs, argout );
    1062           0 :   OSRRelease( srs );
    1063           0 :   return rcode;
    1064             : }
    1065             : 
    1066             : 
    1067             : typedef int* retIntArray;
    1068             : 
    1069             : 
    1070             : typedef struct
    1071             : {
    1072             :   double west_lon_degree;
    1073             :   double south_lat_degree;
    1074             :   double east_lon_degree;
    1075             :   double north_lat_degree;
    1076             :   char* name;
    1077             : } OSRAreaOfUse;
    1078             : 
    1079           0 : SWIGINTERN OSRAreaOfUse *new_OSRAreaOfUse(double west_lon_degree,double south_lat_degree,double east_lon_degree,double north_lat_degree,char *name){
    1080           0 :     OSRAreaOfUse *self = (OSRAreaOfUse*) CPLMalloc( sizeof( OSRAreaOfUse ) );
    1081           0 :     self->west_lon_degree = west_lon_degree;
    1082           0 :     self->south_lat_degree = south_lat_degree;
    1083           0 :     self->east_lon_degree = east_lon_degree;
    1084           0 :     self->north_lat_degree = north_lat_degree;
    1085           0 :     self->name = name ? CPLStrdup(name) : NULL;
    1086           0 :     return self;
    1087             :   }
    1088           0 : SWIGINTERN void delete_OSRAreaOfUse(OSRAreaOfUse *self){
    1089           0 :     CPLFree( self->name );
    1090           0 :     CPLFree( self );
    1091           0 :   }
    1092             : 
    1093             : 
    1094           0 : double OSRAreaOfUse_west_lon_degree_get( OSRAreaOfUse *area ) {
    1095           0 :   return area->west_lon_degree;
    1096             : }
    1097             : 
    1098           0 : double OSRAreaOfUse_south_lat_degree_get( OSRAreaOfUse *area ) {
    1099           0 :   return area->south_lat_degree;
    1100             : }
    1101             : 
    1102           0 : double OSRAreaOfUse_east_lon_degree_get( OSRAreaOfUse *area ) {
    1103           0 :   return area->east_lon_degree;
    1104             : }
    1105             : 
    1106           0 : double OSRAreaOfUse_north_lat_degree_get( OSRAreaOfUse *area ) {
    1107           0 :   return area->north_lat_degree;
    1108             : }
    1109             : 
    1110           0 : const char* OSRAreaOfUse_name_get( OSRAreaOfUse *area ) {
    1111           0 :   return area->name;
    1112             : }
    1113             : 
    1114             : 
    1115          17 : SWIGINTERN OSRSpatialReferenceShadow *new_OSRSpatialReferenceShadow__SWIG_0(char const *wkt=""){
    1116          17 :     return (OSRSpatialReferenceShadow*) OSRNewSpatialReference(wkt);
    1117             :   }
    1118           6 : SWIGINTERN void delete_OSRSpatialReferenceShadow(OSRSpatialReferenceShadow *self){
    1119           6 :     OSRRelease( self );
    1120           6 :   }
    1121           0 : SWIGINTERN retStringAndCPLFree *OSRSpatialReferenceShadow___str__(OSRSpatialReferenceShadow *self){
    1122           0 :     char *buf = 0;
    1123           0 :     OSRExportToPrettyWkt( self, &buf, 0 );
    1124           0 :     return buf;
    1125             :   }
    1126           0 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetName(OSRSpatialReferenceShadow *self){
    1127           0 :     return OSRGetName( self );
    1128             :   }
    1129           0 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetCelestialBodyName(OSRSpatialReferenceShadow *self){
    1130           0 :     return OSRGetCelestialBodyName( self );
    1131             :   }
    1132           3 : SWIGINTERN int OSRSpatialReferenceShadow_IsSame__SWIG_0(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs,char **options=NULL){
    1133           3 :     return OSRIsSameEx( self, rhs, options );
    1134             :   }
    1135           0 : SWIGINTERN int OSRSpatialReferenceShadow_IsSameGeogCS(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
    1136           0 :     return OSRIsSameGeogCS( self, rhs );
    1137             :   }
    1138           0 : SWIGINTERN int OSRSpatialReferenceShadow_IsSameVertCS(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
    1139           0 :     return OSRIsSameVertCS( self, rhs );
    1140             :   }
    1141           3 : SWIGINTERN int OSRSpatialReferenceShadow_IsGeographic(OSRSpatialReferenceShadow *self){
    1142           3 :     return OSRIsGeographic(self);
    1143             :   }
    1144           0 : SWIGINTERN int OSRSpatialReferenceShadow_IsDerivedGeographic(OSRSpatialReferenceShadow *self){
    1145           0 :     return OSRIsDerivedGeographic(self);
    1146             :   }
    1147           3 : SWIGINTERN int OSRSpatialReferenceShadow_IsProjected(OSRSpatialReferenceShadow *self){
    1148           3 :     return OSRIsProjected(self);
    1149             :   }
    1150           0 : SWIGINTERN int OSRSpatialReferenceShadow_IsDerivedProjected(OSRSpatialReferenceShadow *self){
    1151           0 :     return OSRIsDerivedProjected(self);
    1152             :   }
    1153           0 : SWIGINTERN int OSRSpatialReferenceShadow_IsCompound(OSRSpatialReferenceShadow *self){
    1154           0 :     return OSRIsCompound(self);
    1155             :   }
    1156           0 : SWIGINTERN int OSRSpatialReferenceShadow_IsGeocentric(OSRSpatialReferenceShadow *self){
    1157           0 :     return OSRIsGeocentric(self);
    1158             :   }
    1159           0 : SWIGINTERN int OSRSpatialReferenceShadow_IsLocal(OSRSpatialReferenceShadow *self){
    1160           0 :     return OSRIsLocal(self);
    1161             :   }
    1162           0 : SWIGINTERN int OSRSpatialReferenceShadow_IsVertical(OSRSpatialReferenceShadow *self){
    1163           0 :     return OSRIsVertical(self);
    1164             :   }
    1165           0 : SWIGINTERN bool OSRSpatialReferenceShadow_IsDynamic(OSRSpatialReferenceShadow *self){
    1166           0 :     return OSRIsDynamic(self);
    1167             :   }
    1168           0 : SWIGINTERN bool OSRSpatialReferenceShadow_HasPointMotionOperation(OSRSpatialReferenceShadow *self){
    1169           0 :     return OSRHasPointMotionOperation(self);
    1170             :   }
    1171           0 : SWIGINTERN double OSRSpatialReferenceShadow_GetCoordinateEpoch(OSRSpatialReferenceShadow *self){
    1172           0 :     return OSRGetCoordinateEpoch(self);
    1173             :   }
    1174           0 : SWIGINTERN void OSRSpatialReferenceShadow_SetCoordinateEpoch(OSRSpatialReferenceShadow *self,double coordinateEpoch){
    1175           0 :     OSRSetCoordinateEpoch(self, coordinateEpoch);
    1176           0 :   }
    1177           1 : SWIGINTERN int OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(OSRSpatialReferenceShadow *self){
    1178           1 :     return OSREPSGTreatsAsLatLong(self);
    1179             :   }
    1180           1 : SWIGINTERN int OSRSpatialReferenceShadow_EPSGTreatsAsNorthingEasting(OSRSpatialReferenceShadow *self){
    1181           1 :     return OSREPSGTreatsAsNorthingEasting(self);
    1182             :   }
    1183           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAuthority(OSRSpatialReferenceShadow *self,char const *pszTargetKey,char const *pszAuthority,int nCode){
    1184           0 :     return OSRSetAuthority( self, pszTargetKey, pszAuthority, nCode );
    1185             :   }
    1186           0 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAttrValue__SWIG_0(OSRSpatialReferenceShadow *self,char const *name,int child=0){
    1187           0 :     return OSRGetAttrValue( self, name, child );
    1188             :   }
    1189           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAttrValue(OSRSpatialReferenceShadow *self,char const *name,char const *value){
    1190           0 :     return OSRSetAttrValue( self, name, value );
    1191             :   }
    1192           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAngularUnits(OSRSpatialReferenceShadow *self,char const *name,double to_radians){
    1193           0 :     return OSRSetAngularUnits( self, name, to_radians );
    1194             :   }
    1195           0 : SWIGINTERN double OSRSpatialReferenceShadow_GetAngularUnits(OSRSpatialReferenceShadow *self){
    1196             :     // Return code ignored.
    1197           0 :     return OSRGetAngularUnits( self, 0 );
    1198             :   }
    1199           0 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAngularUnitsName(OSRSpatialReferenceShadow *self){
    1200           0 :     char *name = 0;
    1201           0 :     OSRGetAngularUnits( self, &name );
    1202             :     // This is really a const char* that is returned and shouldn't be freed
    1203           0 :     return (const char*)name;
    1204             :   }
    1205           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTargetLinearUnits(OSRSpatialReferenceShadow *self,char const *target,char const *name,double to_meters){
    1206           0 :     return OSRSetTargetLinearUnits( self, target, name, to_meters );
    1207             :   }
    1208           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLinearUnits(OSRSpatialReferenceShadow *self,char const *name,double to_meters){
    1209           0 :     return OSRSetLinearUnits( self, name, to_meters );
    1210             :   }
    1211           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(OSRSpatialReferenceShadow *self,char const *name,double to_meters){
    1212           0 :     return OSRSetLinearUnitsAndUpdateParameters( self, name, to_meters );
    1213             :   }
    1214           0 : SWIGINTERN double OSRSpatialReferenceShadow_GetTargetLinearUnits(OSRSpatialReferenceShadow *self,char const *target_key){
    1215             :     // Return code ignored.
    1216           0 :     return OSRGetTargetLinearUnits( self, target_key, 0 );
    1217             :   }
    1218           0 : SWIGINTERN double OSRSpatialReferenceShadow_GetLinearUnits(OSRSpatialReferenceShadow *self){
    1219             :     // Return code ignored.
    1220           0 :     return OSRGetLinearUnits( self, 0 );
    1221             :   }
    1222           0 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetLinearUnitsName(OSRSpatialReferenceShadow *self){
    1223           0 :     char *name = NULL;
    1224             :     // Return code ignored.
    1225           0 :     OSRGetLinearUnits( self, &name );
    1226           0 :     return (const char*)name;
    1227             :   }
    1228           4 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAuthorityCode__SWIG_0(OSRSpatialReferenceShadow *self,char const *target_key=NULL){
    1229           4 :     return OSRGetAuthorityCode( self, target_key );
    1230             :   }
    1231           1 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAuthorityName__SWIG_0(OSRSpatialReferenceShadow *self,char const *target_key=NULL){
    1232           1 :     return OSRGetAuthorityName( self, target_key );
    1233             :   }
    1234           0 : SWIGINTERN OSRAreaOfUse *OSRSpatialReferenceShadow_GetAreaOfUse(OSRSpatialReferenceShadow *self){
    1235           0 :     OSRAreaOfUse* pArea = new_OSRAreaOfUse(0,0,0,0,NULL);
    1236           0 :     const char* name = NULL;
    1237           0 :     if( !OSRGetAreaOfUse(self,
    1238             :                     &pArea->west_lon_degree,
    1239             :                     &pArea->south_lat_degree,
    1240             :                     &pArea->east_lon_degree,
    1241             :                     &pArea->north_lat_degree,
    1242             :                     &name) )
    1243             :     {
    1244           0 :         delete_OSRAreaOfUse(pArea);
    1245           0 :         return NULL;
    1246             :     }
    1247           0 :     pArea->name = name ? CPLStrdup(name) : NULL;
    1248           0 :     return pArea;
    1249             :   }
    1250           1 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAxisName(OSRSpatialReferenceShadow *self,char const *target_key,int iAxis){
    1251           1 :     return OSRGetAxis( self, target_key, iAxis, NULL );
    1252             :   }
    1253           0 : SWIGINTERN int OSRSpatialReferenceShadow_GetAxesCount(OSRSpatialReferenceShadow *self){
    1254           0 :     return OSRGetAxesCount(self);
    1255             :   }
    1256           1 : SWIGINTERN OGRAxisOrientation OSRSpatialReferenceShadow_GetAxisOrientation(OSRSpatialReferenceShadow *self,char const *target_key,int iAxis){
    1257           1 :     OGRAxisOrientation orientation = OAO_Other;
    1258           1 :     OSRGetAxis( self, target_key, iAxis, &orientation );
    1259           1 :     return orientation;
    1260             :   }
    1261           0 : SWIGINTERN OSRAxisMappingStrategy OSRSpatialReferenceShadow_GetAxisMappingStrategy(OSRSpatialReferenceShadow *self){
    1262           0 :     return OSRGetAxisMappingStrategy(self);
    1263             :   }
    1264           2 : SWIGINTERN void OSRSpatialReferenceShadow_SetAxisMappingStrategy(OSRSpatialReferenceShadow *self,OSRAxisMappingStrategy strategy){
    1265           2 :     OSRSetAxisMappingStrategy(self, strategy);
    1266           2 :   }
    1267           0 : SWIGINTERN retIntArray OSRSpatialReferenceShadow_GetDataAxisToSRSAxisMapping(OSRSpatialReferenceShadow *self,int *nLen,int const **pList){
    1268           0 :       *pList = OSRGetDataAxisToSRSAxisMapping(self, nLen);
    1269           0 :       return (retIntArray)*pList;
    1270             :   }
    1271           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetDataAxisToSRSAxisMapping(OSRSpatialReferenceShadow *self,int nList,int *pList){
    1272           0 :     return OSRSetDataAxisToSRSAxisMapping(self, nList, pList);
    1273             :   }
    1274           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetUTM__SWIG_0(OSRSpatialReferenceShadow *self,int zone,int north=1){
    1275           0 :     return OSRSetUTM( self, zone, north );
    1276             :   }
    1277           0 : SWIGINTERN int OSRSpatialReferenceShadow_GetUTMZone(OSRSpatialReferenceShadow *self){
    1278             :     // Note: we will return south zones as negative since it is
    1279             :     // hard to return two values as the C API does.
    1280           0 :     int bNorth = FALSE;
    1281           0 :     int nZone = OSRGetUTMZone( self, &bNorth );
    1282           0 :     if( !bNorth )
    1283           0 :         nZone = -nZone;
    1284           0 :     return nZone;
    1285             :   }
    1286           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetStatePlane__SWIG_0(OSRSpatialReferenceShadow *self,int zone,int is_nad83=1,char const *unitsname="",double units=0.0){
    1287           0 :     return OSRSetStatePlaneWithUnits( self, zone, is_nad83, unitsname, units );
    1288             :   }
    1289           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_AutoIdentifyEPSG(OSRSpatialReferenceShadow *self){
    1290           0 :     return OSRAutoIdentifyEPSG( self );
    1291             :   }
    1292           1 : SWIGINTERN OSRSpatialReferenceShadow **OSRSpatialReferenceShadow_FindMatches(OSRSpatialReferenceShadow *self,char **options,int *nvalues,int **confidence_values){
    1293           1 :        return (OSRSpatialReferenceShadow**) OSRFindMatches(self, options, nvalues, confidence_values);
    1294             :   }
    1295           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjection(OSRSpatialReferenceShadow *self,char const *arg){
    1296           0 :     return OSRSetProjection( self, arg );
    1297             :   }
    1298           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
    1299           0 :     return OSRSetProjParm( self, name, val );
    1300             :   }
    1301           0 : SWIGINTERN double OSRSpatialReferenceShadow_GetProjParm__SWIG_0(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
    1302             :     // Return code ignored.
    1303           0 :     return OSRGetProjParm( self, name, default_val, 0 );
    1304             :   }
    1305           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetNormProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
    1306           0 :     return OSRSetNormProjParm( self, name, val );
    1307             :   }
    1308           0 : SWIGINTERN double OSRSpatialReferenceShadow_GetNormProjParm__SWIG_0(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
    1309             :     // Return code ignored.
    1310           0 :     return OSRGetNormProjParm( self, name, default_val, 0 );
    1311             :   }
    1312           0 : SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMajor(OSRSpatialReferenceShadow *self){
    1313             :     // Return code ignored.
    1314           0 :     return OSRGetSemiMajor( self, 0 );
    1315             :   }
    1316           0 : SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMinor(OSRSpatialReferenceShadow *self){
    1317             :     // Return code ignored.
    1318           0 :     return OSRGetSemiMinor( self, 0 );
    1319             :   }
    1320           0 : SWIGINTERN double OSRSpatialReferenceShadow_GetInvFlattening(OSRSpatialReferenceShadow *self){
    1321             :     // Return code ignored.
    1322           0 :     return OSRGetInvFlattening( self, 0 );
    1323             :   }
    1324           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetACEA(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
    1325           0 :     return OSRSetACEA( self, stdp1, stdp2, clat, clong,
    1326           0 :                        fe, fn );
    1327             :   }
    1328           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAE(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    1329           0 :     return OSRSetAE( self, clat, clong,
    1330           0 :                      fe, fn );
    1331             :   }
    1332           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetBonne(OSRSpatialReferenceShadow *self,double stdp,double cm,double fe,double fn){
    1333           0 :     return OSRSetBonne( self, stdp, cm, fe, fn );
    1334             :   }
    1335           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCEA(OSRSpatialReferenceShadow *self,double stdp1,double cm,double fe,double fn){
    1336           0 :     return OSRSetCEA( self, stdp1, cm,
    1337           0 :                       fe, fn );
    1338             :   }
    1339           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCS(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    1340           0 :     return OSRSetCS( self, clat, clong,
    1341           0 :                      fe, fn );
    1342             :   }
    1343           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEC(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
    1344           0 :     return OSRSetEC( self, stdp1, stdp2, clat, clong,
    1345           0 :                      fe, fn );
    1346             :   }
    1347           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEckertIV(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
    1348           0 :     return OSRSetEckertIV( self, cm, fe, fn);
    1349             :   }
    1350           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEckertVI(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
    1351           0 :     return OSRSetEckertVI( self, cm, fe, fn);
    1352             :   }
    1353           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEquirectangular(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    1354           0 :     return OSRSetEquirectangular( self, clat, clong,
    1355           0 :                                   fe, fn );
    1356             :   }
    1357           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEquirectangular2(OSRSpatialReferenceShadow *self,double clat,double clong,double pseudostdparallellat,double fe,double fn){
    1358           0 :     return OSRSetEquirectangular2( self, clat, clong,
    1359             :                                    pseudostdparallellat,
    1360           0 :                                    fe, fn );
    1361             :   }
    1362           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(OSRSpatialReferenceShadow *self,double clat,double clong,double sc,double fe,double fn){
    1363           0 :     return OSRSetGaussSchreiberTMercator( self, clat, clong, sc, fe, fn );
    1364             :   }
    1365           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGS(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
    1366           0 :     return OSRSetGS( self, cm, fe, fn );
    1367             :   }
    1368           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGH(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
    1369           0 :     return OSRSetGH( self, cm, fe, fn );
    1370             :   }
    1371           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetIGH(OSRSpatialReferenceShadow *self){
    1372           0 :     return OSRSetIGH( self );
    1373             :   }
    1374           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGEOS(OSRSpatialReferenceShadow *self,double cm,double satelliteheight,double fe,double fn){
    1375           0 :     return OSRSetGEOS( self, cm, satelliteheight,
    1376           0 :                        fe, fn );
    1377             :   }
    1378           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGnomonic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    1379           0 :     return OSRSetGnomonic( self, clat, clong,
    1380           0 :                            fe, fn );
    1381             :   }
    1382           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetHOM(OSRSpatialReferenceShadow *self,double clat,double clong,double azimuth,double recttoskew,double scale,double fe,double fn){
    1383           0 :     return OSRSetHOM( self, clat, clong, azimuth, recttoskew,
    1384           0 :                       scale, fe, fn );
    1385             :   }
    1386           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetHOM2PNO(OSRSpatialReferenceShadow *self,double clat,double dfLat1,double dfLong1,double dfLat2,double dfLong2,double scale,double fe,double fn){
    1387           0 :     return OSRSetHOM2PNO( self, clat, dfLat1, dfLong1, dfLat2, dfLong2,
    1388           0 :                           scale, fe, fn );
    1389             :   }
    1390           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetKrovak(OSRSpatialReferenceShadow *self,double clat,double clong,double azimuth,double pseudostdparallellat,double scale,double fe,double fn){
    1391           0 :     return OSRSetKrovak( self, clat, clong,
    1392             :                          azimuth, pseudostdparallellat,
    1393           0 :                          scale, fe, fn );
    1394             :   }
    1395           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLAEA(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    1396           0 :     return OSRSetLAEA( self, clat, clong,
    1397           0 :                        fe, fn );
    1398             :   }
    1399           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCC(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
    1400           0 :     return OSRSetLCC( self, stdp1, stdp2, clat, clong,
    1401           0 :                       fe, fn );
    1402             :   }
    1403           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCC1SP(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
    1404           0 :     return OSRSetLCC1SP( self, clat, clong, scale,
    1405           0 :                          fe, fn );
    1406             :   }
    1407           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCCB(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
    1408           0 :     return OSRSetLCCB( self, stdp1, stdp2, clat, clong,
    1409           0 :                        fe, fn );
    1410             :   }
    1411           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMC(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    1412           0 :     return OSRSetMC( self, clat, clong,
    1413           0 :                      fe, fn );
    1414             :   }
    1415           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMercator(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
    1416           0 :     return OSRSetMercator( self, clat, clong,
    1417           0 :                            scale, fe, fn );
    1418             :   }
    1419           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMercator2SP(OSRSpatialReferenceShadow *self,double stdp1,double clat,double clong,double fe,double fn){
    1420           0 :     return OSRSetMercator2SP( self, stdp1, clat, clong, fe, fn );
    1421             :   }
    1422           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMollweide(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
    1423           0 :     return OSRSetMollweide( self, cm,
    1424           0 :                             fe, fn );
    1425             :   }
    1426           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetNZMG(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    1427           0 :     return OSRSetNZMG( self, clat, clong,
    1428           0 :                        fe, fn );
    1429             :   }
    1430           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetOS(OSRSpatialReferenceShadow *self,double dfOriginLat,double dfCMeridian,double scale,double fe,double fn){
    1431           0 :     return OSRSetOS( self, dfOriginLat, dfCMeridian, scale,
    1432           0 :                      fe, fn );
    1433             :   }
    1434           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetOrthographic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    1435           0 :     return OSRSetOrthographic( self, clat, clong,
    1436           0 :                                fe, fn );
    1437             :   }
    1438           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetPolyconic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    1439           0 :     return OSRSetPolyconic( self, clat, clong,
    1440           0 :                             fe, fn );
    1441             :   }
    1442           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetPS(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
    1443           0 :     return OSRSetPS( self, clat, clong, scale,
    1444           0 :                      fe, fn );
    1445             :   }
    1446           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetRobinson(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
    1447           0 :     return OSRSetRobinson( self, clong, fe, fn );
    1448             :   }
    1449           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetSinusoidal(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
    1450           0 :     return OSRSetSinusoidal( self, clong, fe, fn );
    1451             :   }
    1452           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetStereographic(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
    1453           0 :     return OSRSetStereographic( self, clat, clong, scale,
    1454           0 :                                 fe, fn );
    1455             :   }
    1456           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetSOC(OSRSpatialReferenceShadow *self,double latitudeoforigin,double cm,double fe,double fn){
    1457           0 :     return OSRSetSOC( self, latitudeoforigin, cm,
    1458           0 :                 fe, fn );
    1459             :   }
    1460           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTM(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
    1461           0 :     return OSRSetTM( self, clat, clong, scale,
    1462           0 :                      fe, fn );
    1463             :   }
    1464           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMVariant(OSRSpatialReferenceShadow *self,char const *pszVariantName,double clat,double clong,double scale,double fe,double fn){
    1465           0 :     return OSRSetTMVariant( self, pszVariantName, clat, clong,
    1466           0 :                             scale, fe, fn );
    1467             :   }
    1468           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMG(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
    1469           0 :     return OSRSetTMG( self, clat, clong,
    1470           0 :                       fe, fn );
    1471             :   }
    1472           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMSO(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
    1473           0 :     return OSRSetTMSO( self, clat, clong, scale,
    1474           0 :                        fe, fn );
    1475             :   }
    1476           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVDG(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
    1477           0 :     return OSRSetVDG( self, clong, fe, fn );
    1478             :   }
    1479           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVerticalPerspective(OSRSpatialReferenceShadow *self,double topoOriginLat,double topoOriginLon,double topoOriginHeight,double viewPointHeight,double fe,double fn){
    1480           0 :     return OSRSetVerticalPerspective( self,
    1481           0 :         topoOriginLat, topoOriginLon, topoOriginHeight, viewPointHeight, fe, fn );
    1482             :   }
    1483           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetWellKnownGeogCS(OSRSpatialReferenceShadow *self,char const *name){
    1484           0 :     return OSRSetWellKnownGeogCS( self, name );
    1485             :   }
    1486           4 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetFromUserInput__SWIG_0(OSRSpatialReferenceShadow *self,char const *name,char **options=NULL){
    1487           4 :     return OSRSetFromUserInputEx( self, name, options );
    1488             :   }
    1489           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_CopyGeogCSFrom(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
    1490           0 :     return OSRCopyGeogCSFrom( self, rhs );
    1491             :   }
    1492           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTOWGS84(OSRSpatialReferenceShadow *self,double p1,double p2,double p3,double p4,double p5,double p6,double p7){
    1493             : 
    1494             : 
    1495             : 
    1496             : 
    1497             : 
    1498           0 :     return OSRSetTOWGS84( self, p1, p2, p3, p4, p5, p6, p7 );
    1499             :   }
    1500           0 : SWIGINTERN bool OSRSpatialReferenceShadow_HasTOWGS84(OSRSpatialReferenceShadow *self){
    1501             :     double ignored[7];
    1502           0 :     return OSRGetTOWGS84( self, ignored, 7 ) == OGRERR_NONE;
    1503             :   }
    1504           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_GetTOWGS84(OSRSpatialReferenceShadow *self,double argout[7]){
    1505           0 :     return OSRGetTOWGS84( self, argout, 7 );
    1506             :   }
    1507           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_AddGuessedTOWGS84(OSRSpatialReferenceShadow *self){
    1508           0 :     return OSRAddGuessedTOWGS84( self );
    1509             :   }
    1510           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLocalCS(OSRSpatialReferenceShadow *self,char const *pszName){
    1511           0 :     return OSRSetLocalCS( self, pszName );
    1512             :   }
    1513           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGeogCS__SWIG_0(OSRSpatialReferenceShadow *self,char const *pszGeogName,char const *pszDatumName,char const *pszEllipsoidName,double dfSemiMajor,double dfInvFlattening,char const *pszPMName="Greenwich",double dfPMOffset=0.0,char const *pszUnits="degree",double dfConvertToRadians=0.0174532925199433){
    1514           0 :     return OSRSetGeogCS( self, pszGeogName, pszDatumName, pszEllipsoidName,
    1515             :                          dfSemiMajor, dfInvFlattening,
    1516           0 :                          pszPMName, dfPMOffset, pszUnits, dfConvertToRadians );
    1517             :   }
    1518           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjCS__SWIG_0(OSRSpatialReferenceShadow *self,char const *name="unnamed"){
    1519           0 :     return OSRSetProjCS( self, name );
    1520             :   }
    1521           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGeocCS__SWIG_0(OSRSpatialReferenceShadow *self,char const *name="unnamed"){
    1522           0 :     return OSRSetGeocCS( self, name );
    1523             :   }
    1524           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVertCS__SWIG_0(OSRSpatialReferenceShadow *self,char const *VertCSName="unnamed",char const *VertDatumName="unnamed",int VertDatumType=0){
    1525           0 :     return OSRSetVertCS( self, VertCSName, VertDatumName, VertDatumType );
    1526             :   }
    1527           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCompoundCS(OSRSpatialReferenceShadow *self,char const *name,OSRSpatialReferenceShadow *horizcs,OSRSpatialReferenceShadow *vertcs){
    1528           0 :     return OSRSetCompoundCS( self, name, horizcs, vertcs );
    1529             :   }
    1530           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromWkt(OSRSpatialReferenceShadow *self,char **ppszInput){
    1531           0 :     return OSRImportFromWkt( self, ppszInput );
    1532             :   }
    1533           2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromProj4(OSRSpatialReferenceShadow *self,char *ppszInput){
    1534           2 :     return OSRImportFromProj4( self, ppszInput );
    1535             :   }
    1536           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromUrl(OSRSpatialReferenceShadow *self,char *url){
    1537           0 :     return OSRImportFromUrl( self, url );
    1538             :   }
    1539           1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromESRI(OSRSpatialReferenceShadow *self,char **ppszInput){
    1540           1 :     return OSRImportFromESRI( self, ppszInput );
    1541             :   }
    1542           3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromEPSG(OSRSpatialReferenceShadow *self,int arg){
    1543           3 :     return OSRImportFromEPSG(self, arg);
    1544             :   }
    1545           1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromEPSGA(OSRSpatialReferenceShadow *self,int arg){
    1546           1 :     return OSRImportFromEPSGA(self, arg);
    1547             :   }
    1548           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromPCI__SWIG_0(OSRSpatialReferenceShadow *self,char const *proj,char const *units="METRE",double argin[17]=0){
    1549           0 :     return OSRImportFromPCI( self, proj, units, argin );
    1550             :   }
    1551           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromUSGS__SWIG_0(OSRSpatialReferenceShadow *self,long proj_code,long zone=0,double argin[15]=0,long datum_code=0){
    1552           0 :     return OSRImportFromUSGS( self, proj_code, zone, argin, datum_code );
    1553             :   }
    1554           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromXML(OSRSpatialReferenceShadow *self,char const *xmlString){
    1555           0 :     return OSRImportFromXML( self, xmlString );
    1556             :   }
    1557           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromERM(OSRSpatialReferenceShadow *self,char const *proj,char const *datum,char const *units){
    1558           0 :     return OSRImportFromERM( self, proj, datum, units );
    1559             :   }
    1560           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromMICoordSys(OSRSpatialReferenceShadow *self,char const *pszCoordSys){
    1561           0 :     return OSRImportFromMICoordSys( self, pszCoordSys );
    1562             :   }
    1563           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromISISPVL(OSRSpatialReferenceShadow *self,char const *pszPVLMappingGroup){
    1564           0 :     return OSRImportFromISISPVL( self, pszPVLMappingGroup );
    1565             :   }
    1566           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromOzi(OSRSpatialReferenceShadow *self,char const *const *papszLines){
    1567           0 :     return OSRImportFromOzi( self, papszLines );
    1568             :   }
    1569           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromCF1__SWIG_0(OSRSpatialReferenceShadow *self,char **keyValues,char const *units=NULL){
    1570           0 :       return OSRImportFromCF1(self, keyValues, units);
    1571             :   }
    1572           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToWkt__SWIG_0(OSRSpatialReferenceShadow *self,char **argout,char **options=NULL){
    1573           0 :     return OSRExportToWktEx( self, argout, options );
    1574             :   }
    1575           1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPrettyWkt__SWIG_0(OSRSpatialReferenceShadow *self,char **argout,int simplify=0){
    1576           1 :     return OSRExportToPrettyWkt( self, argout, simplify );
    1577             :   }
    1578           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPROJJSON__SWIG_0(OSRSpatialReferenceShadow *self,char **argout,char **options=NULL){
    1579           0 :     return OSRExportToPROJJSON( self, argout, options );
    1580             :   }
    1581           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToProj4(OSRSpatialReferenceShadow *self,char **argout){
    1582           0 :     return OSRExportToProj4( self, argout );
    1583             :   }
    1584           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPCI(OSRSpatialReferenceShadow *self,char **proj,char **units,double *params[17]){
    1585           0 :     return OSRExportToPCI( self, proj, units, params );
    1586             :   }
    1587           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToUSGS(OSRSpatialReferenceShadow *self,long *code,long *zone,double *params[15],long *datum){
    1588           0 :     return OSRExportToUSGS( self, code, zone, params, datum );
    1589             :   }
    1590           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToERM(OSRSpatialReferenceShadow *self,char **proj,char **datum,char **units){
    1591           0 :     char szProj[32] = {0}, szDatum[32] = {0}, szUnits[32] = {0};
    1592           0 :     OGRErr ret = OSRExportToERM( self, szProj, szDatum, szUnits );
    1593           0 :     *proj = CPLStrdup(szProj);
    1594           0 :     *datum = CPLStrdup(szDatum);
    1595           0 :     *units = CPLStrdup(szUnits);
    1596           0 :     return ret;
    1597             :   }
    1598           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToXML__SWIG_0(OSRSpatialReferenceShadow *self,char **argout,char const *dialect=""){
    1599           0 :     return OSRExportToXML( self, argout, dialect );
    1600             :   }
    1601           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToMICoordSys(OSRSpatialReferenceShadow *self,char **argout){
    1602           0 :     return OSRExportToMICoordSys( self, argout );
    1603             :   }
    1604           0 : SWIGINTERN char **OSRSpatialReferenceShadow_ExportToCF1__SWIG_0(OSRSpatialReferenceShadow *self,char **options=NULL){
    1605           0 :     char** ret = NULL;
    1606           0 :     OSRExportToCF1(self, NULL, &ret, NULL, options);
    1607           0 :     return ret;
    1608             :   }
    1609             : 
    1610             : /* Convert a char array to a Hashtable */
    1611             : static jobject
    1612           0 : GetCSLStringAsHashTable(JNIEnv *jenv, char **stringarray, bool bFreeCSL ) {
    1613           0 :   const jclass hashtable = jenv->FindClass("java/util/Hashtable");
    1614           0 :   const jmethodID constructor = jenv->GetMethodID(hashtable, "<init>", "()V");
    1615           0 :   const jmethodID put = jenv->GetMethodID(hashtable, "put",
    1616             :     "(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;");
    1617           0 :   jobject jHashtable = jenv->NewObject(hashtable, constructor);
    1618           0 :   if ( stringarray != NULL ) {
    1619           0 :     while (*stringarray != NULL ) {
    1620             :       char const *valptr;
    1621             :       char *keyptr;
    1622           0 :       const char* pszSep = strchr( *stringarray, '=' );
    1623           0 :       if ( pszSep != NULL) {
    1624           0 :         keyptr = CPLStrdup(*stringarray);
    1625           0 :         keyptr[pszSep - *stringarray] = '\0';
    1626           0 :         valptr = pszSep + 1;
    1627           0 :         jstring name = SafeNewStringUTF8(jenv, keyptr);
    1628           0 :         jstring value = SafeNewStringUTF8(jenv, valptr);
    1629           0 :         jenv->CallObjectMethod(jHashtable, put, name, value);
    1630           0 :         jenv->DeleteLocalRef(name);
    1631           0 :         jenv->DeleteLocalRef(value);
    1632           0 :         CPLFree(keyptr);
    1633             :       }
    1634           0 :       stringarray++;
    1635             :     }
    1636             :   }
    1637           0 :   if( bFreeCSL )
    1638           0 :     CSLDestroy(stringarray);
    1639           0 :   return jHashtable;
    1640             : }
    1641             : 
    1642           0 : SWIGINTERN retStringAndCPLFree *OSRSpatialReferenceShadow_ExportToCF1Units__SWIG_0(OSRSpatialReferenceShadow *self,char **options=NULL){
    1643           0 :     char* units = NULL;
    1644           0 :     OSRExportToCF1(self, NULL, NULL, &units, options);
    1645           0 :     return units;
    1646             :  }
    1647           5 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_CloneGeogCS(OSRSpatialReferenceShadow *self){
    1648           5 :     return (OSRSpatialReferenceShadow*) OSRCloneGeogCS(self);
    1649             :   }
    1650           2 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_Clone(OSRSpatialReferenceShadow *self){
    1651           2 :     return (OSRSpatialReferenceShadow*) OSRClone(self);
    1652             :   }
    1653           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_StripVertical(OSRSpatialReferenceShadow *self){
    1654           0 :     return OSRStripVertical(self);
    1655             :   }
    1656           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_Validate(OSRSpatialReferenceShadow *self){
    1657           0 :     return OSRValidate(self);
    1658             :   }
    1659           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphToESRI(OSRSpatialReferenceShadow *self){
    1660           0 :     return OSRMorphToESRI(self);
    1661             :   }
    1662           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphFromESRI(OSRSpatialReferenceShadow *self){
    1663           0 :     return OSRMorphFromESRI(self);
    1664             :   }
    1665           0 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_ConvertToOtherProjection__SWIG_0(OSRSpatialReferenceShadow *self,char const *other_projection,char **options=NULL){
    1666           0 :     return (OSRSpatialReferenceShadow*)OSRConvertToOtherProjection(self, other_projection, options);
    1667             :   }
    1668           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_PromoteTo3D__SWIG_0(OSRSpatialReferenceShadow *self,char const *name=NULL){
    1669           0 :     return OSRPromoteTo3D(self, name);
    1670             :   }
    1671           0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_DemoteTo2D__SWIG_0(OSRSpatialReferenceShadow *self,char const *name=NULL){
    1672           0 :     return OSRDemoteTo2D(self, name);
    1673             :   }
    1674           2 : SWIGINTERN OGRCoordinateTransformationOptions *new_OGRCoordinateTransformationOptions(){
    1675           2 :     return OCTNewCoordinateTransformationOptions();
    1676             :   }
    1677           0 : SWIGINTERN void delete_OGRCoordinateTransformationOptions(OGRCoordinateTransformationOptions *self){
    1678           0 :     OCTDestroyCoordinateTransformationOptions( self );
    1679           0 :   }
    1680           0 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetAreaOfInterest(OGRCoordinateTransformationOptions *self,double westLongitudeDeg,double southLatitudeDeg,double eastLongitudeDeg,double northLatitudeDeg){
    1681           0 :     return OCTCoordinateTransformationOptionsSetAreaOfInterest(self,
    1682             :         westLongitudeDeg, southLatitudeDeg,
    1683           0 :         eastLongitudeDeg, northLatitudeDeg);
    1684             :   }
    1685           0 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetOperation__SWIG_0(OGRCoordinateTransformationOptions *self,char const *operation,bool inverseCT=false){
    1686           0 :     return OCTCoordinateTransformationOptionsSetOperation(self, operation, inverseCT);
    1687             :   }
    1688           1 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetDesiredAccuracy(OGRCoordinateTransformationOptions *self,double accuracy){
    1689           1 :     return OCTCoordinateTransformationOptionsSetDesiredAccuracy(self, accuracy);
    1690             :   }
    1691           1 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetBallparkAllowed(OGRCoordinateTransformationOptions *self,bool allowBallpark){
    1692           1 :     return OCTCoordinateTransformationOptionsSetBallparkAllowed(self, allowBallpark);
    1693             :   }
    1694           0 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetOnlyBest(OGRCoordinateTransformationOptions *self,bool onlyBest){
    1695           0 :     return OCTCoordinateTransformationOptionsSetOnlyBest(self, onlyBest);
    1696             :   }
    1697           0 : SWIGINTERN OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow__SWIG_0(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst){
    1698           0 :     return (OSRCoordinateTransformationShadow*) OCTNewCoordinateTransformation(src, dst);
    1699             :   }
    1700           0 : SWIGINTERN OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow__SWIG_1(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst,OGRCoordinateTransformationOptions *options){
    1701             :     return (OSRCoordinateTransformationShadow*)
    1702           0 :         (options ? OCTNewCoordinateTransformationEx( src, dst, options ) : OCTNewCoordinateTransformation(src, dst));
    1703             :   }
    1704           5 : SWIGINTERN void delete_OSRCoordinateTransformationShadow(OSRCoordinateTransformationShadow *self){
    1705           5 :     OCTDestroyCoordinateTransformation( self );
    1706           5 :   }
    1707           1 : SWIGINTERN OSRSpatialReferenceShadow *OSRCoordinateTransformationShadow_GetSource(OSRCoordinateTransformationShadow *self){
    1708           1 :     OGRSpatialReferenceH srs = OCTGetSourceCS(self);
    1709           1 :     return (OSRSpatialReferenceShadow*) (srs ? OSRClone(srs) : NULL);
    1710             :   }
    1711           1 : SWIGINTERN OSRSpatialReferenceShadow *OSRCoordinateTransformationShadow_GetTarget(OSRCoordinateTransformationShadow *self){
    1712           1 :     OGRSpatialReferenceH srs = OCTGetTargetCS(self);
    1713           1 :     return (OSRSpatialReferenceShadow*) (srs ? OSRClone(srs) : NULL);
    1714             :   }
    1715           1 : SWIGINTERN OSRCoordinateTransformationShadow *OSRCoordinateTransformationShadow_GetInverse(OSRCoordinateTransformationShadow *self){
    1716           1 :     return (OSRCoordinateTransformationShadow*) OCTGetInverse(self);
    1717             :   }
    1718           1 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(OSRCoordinateTransformationShadow *self,double inout[3]){
    1719             : 
    1720           1 :     if (self == NULL)
    1721           0 :         return;
    1722           1 :     OCTTransform( self, 1, &inout[0], &inout[1], &inout[2] );
    1723             :   }
    1724           6 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_2(OSRCoordinateTransformationShadow *self,double argout[3],double x,double y,double z=0.0){
    1725           6 :     if (self == NULL)
    1726           0 :         return;
    1727           6 :     argout[0] = x;
    1728           6 :     argout[1] = y;
    1729           6 :     argout[2] = z;
    1730           6 :     OCTTransform( self, 1, &argout[0], &argout[1], &argout[2] );
    1731             :   }
    1732           0 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_4(OSRCoordinateTransformationShadow *self,double argout[4],double x,double y,double z,double t){
    1733           0 :     if (self == NULL)
    1734           0 :         return;
    1735           0 :     argout[0] = x;
    1736           0 :     argout[1] = y;
    1737           0 :     argout[2] = z;
    1738           0 :     argout[3] = t;
    1739           0 :     OCTTransform4D( self, 1, &argout[0], &argout[1], &argout[2], &argout[3], NULL );
    1740             :   }
    1741           0 : SWIGINTERN int OSRCoordinateTransformationShadow_TransformPointWithErrorCode(OSRCoordinateTransformationShadow *self,double argout[4],double x,double y,double z,double t){
    1742           0 :     if (self == NULL)
    1743           0 :         return -1;
    1744           0 :     argout[0] = x;
    1745           0 :     argout[1] = y;
    1746           0 :     argout[2] = z;
    1747           0 :     argout[3] = t;
    1748           0 :     int errorCode = 0;
    1749           0 :     OCTTransform4DWithErrorCodes( self, 1, &argout[0], &argout[1], &argout[2], &argout[3], &errorCode );
    1750           0 :     return errorCode;
    1751             :   }
    1752           0 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoints(OSRCoordinateTransformationShadow *self,int nCount,double *x,double *y,double *z){
    1753           0 :     if (self == NULL)
    1754           0 :         return;
    1755           0 :     OCTTransform( self, nCount, x, y, z );
    1756             :   }
    1757           0 : SWIGINTERN int *OSRCoordinateTransformationShadow_TransformPointsWithErrorCodes(OSRCoordinateTransformationShadow *self,int nCount,double *x,double *y,double *z,double *t,int *pnCountOut,int **outErrorCodes){
    1758           0 :     *pnCountOut = 0;
    1759           0 :     *outErrorCodes = NULL;
    1760           0 :     if (self == NULL)
    1761           0 :         return NULL;
    1762           0 :     *pnCountOut = nCount;
    1763           0 :     *outErrorCodes = (int*)CPLMalloc(sizeof(int) * nCount);
    1764           0 :     OCTTransform4DWithErrorCodes( self, nCount, x, y, z, t, *outErrorCodes );
    1765           0 :     return NULL;
    1766             :   }
    1767           0 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformBounds(OSRCoordinateTransformationShadow *self,double argout[4],double minx,double miny,double maxx,double maxy,int densify_pts){
    1768           0 :     argout[0] = HUGE_VAL;
    1769           0 :     argout[1] = HUGE_VAL;
    1770           0 :     argout[2] = HUGE_VAL;
    1771           0 :     argout[3] = HUGE_VAL;
    1772           0 :     if (self == NULL)
    1773           0 :         return;
    1774           0 :     OCTTransformBounds(
    1775             :         self,
    1776             :         minx, miny, maxx, maxy,
    1777             :         &argout[0], &argout[1], &argout[2], &argout[3],
    1778             :         densify_pts
    1779             :     );
    1780             : }
    1781             : 
    1782           9 :   OSRCoordinateTransformationShadow *CreateCoordinateTransformation( OSRSpatialReferenceShadow *src, OSRSpatialReferenceShadow *dst, OGRCoordinateTransformationOptions* options = NULL ) {
    1783             :     return (OSRCoordinateTransformationShadow*)
    1784           9 :         (options ? OCTNewCoordinateTransformationEx( src, dst, options ) : OCTNewCoordinateTransformation(src, dst));
    1785             : }
    1786             : 
    1787             : 
    1788           0 : char** GetAuthorityListFromDatabase()
    1789             : {
    1790           0 :     return OSRGetAuthorityListFromDatabase();
    1791             : }
    1792             : 
    1793             : 
    1794           0 : void SetPROJSearchPath( const char *utf8_string )
    1795             : {
    1796           0 :     const char* const apszPaths[2] = { utf8_string, NULL };
    1797           0 :     OSRSetPROJSearchPaths(apszPaths);
    1798           0 : }
    1799             : 
    1800             : 
    1801           0 : void SetPROJSearchPaths( char** paths )
    1802             : {
    1803           0 :     OSRSetPROJSearchPaths(paths);
    1804           0 : }
    1805             : 
    1806             : 
    1807           0 : char** GetPROJSearchPaths()
    1808             : {
    1809           0 :     return OSRGetPROJSearchPaths();
    1810             : }
    1811             : 
    1812             : 
    1813           2 : int GetPROJVersionMajor()
    1814             : {
    1815             :     int num;
    1816           2 :     OSRGetPROJVersion(&num, NULL, NULL);
    1817           2 :     return num;
    1818             : }
    1819             : 
    1820           0 : int GetPROJVersionMinor()
    1821             : {
    1822             :     int num;
    1823           0 :     OSRGetPROJVersion(NULL, &num, NULL);
    1824           0 :     return num;
    1825             : }
    1826             : 
    1827           0 : int GetPROJVersionMicro()
    1828             : {
    1829             :     int num;
    1830           0 :     OSRGetPROJVersion(NULL, NULL, &num);
    1831           0 :     return num;
    1832             : }
    1833             : 
    1834           0 : bool GetPROJEnableNetwork()
    1835             : {
    1836           0 :     return OSRGetPROJEnableNetwork();
    1837             : }
    1838             : 
    1839           0 : void SetPROJEnableNetwork(bool enabled)
    1840             : {
    1841           0 :     OSRSetPROJEnableNetwork(enabled);
    1842           0 : }
    1843             : 
    1844             : 
    1845           0 : void SetPROJAuxDbPath( const char *utf8_string )
    1846             : {
    1847           0 :     const char* const apszPaths[2] = { utf8_string, NULL };
    1848           0 :     OSRSetPROJAuxDbPaths(apszPaths);
    1849           0 : }
    1850             : 
    1851             : 
    1852           0 : void SetPROJAuxDbPaths( char** paths )
    1853             : {
    1854           0 :     OSRSetPROJAuxDbPaths(paths);
    1855           0 : }
    1856             : 
    1857             : 
    1858           0 : char** GetPROJAuxDbPaths()
    1859             : {
    1860           0 :     return OSRGetPROJAuxDbPaths();
    1861             : }
    1862             : 
    1863             : 
    1864             : #ifdef __cplusplus
    1865             : extern "C" {
    1866             : #endif
    1867             : 
    1868           0 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_UseExceptions(JNIEnv *jenv, jclass jcls) {
    1869             :   (void)jenv;
    1870             :   (void)jcls;
    1871           0 :   UseExceptions();
    1872           0 : }
    1873             : 
    1874             : 
    1875           0 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_DontUseExceptions(JNIEnv *jenv, jclass jcls) {
    1876             :   (void)jenv;
    1877             :   (void)jcls;
    1878           0 :   DontUseExceptions();
    1879           0 : }
    1880             : 
    1881             : 
    1882           2 : SWIGEXPORT jboolean JNICALL Java_org_gdal_osr_osrJNI_GetUseExceptions(JNIEnv *jenv, jclass jcls) {
    1883           2 :   jboolean jresult = 0 ;
    1884             :   bool result;
    1885             :   
    1886             :   (void)jenv;
    1887             :   (void)jcls;
    1888           2 :   result = (bool)GetUseExceptions();
    1889           2 :   jresult = (jboolean)result; 
    1890           2 :   return jresult;
    1891             : }
    1892             : 
    1893             : 
    1894           0 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_GetWellKnownGeogCSAsWKT_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1) {
    1895           0 :   jstring jresult = 0 ;
    1896           0 :   char *arg1 = (char *) 0 ;
    1897           0 :   retStringAndCPLFree *result = 0 ;
    1898             :   
    1899             :   (void)jenv;
    1900             :   (void)jcls;
    1901           0 :   arg1 = 0;
    1902           0 :   if (jarg1) {
    1903           0 :     arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    1904           0 :     if (!arg1) return 0;
    1905             :   }
    1906           0 :   result = (retStringAndCPLFree *)GetWellKnownGeogCSAsWKT((char const *)arg1);
    1907             :   {
    1908             :     /* %typemap(out) (retStringAndCPLFree*) */
    1909           0 :     if(result)
    1910             :     {
    1911           0 :       jresult = SafeNewStringUTF8(jenv, (const char *)result);
    1912           0 :       CPLFree(result);
    1913             :     }
    1914             :   }
    1915           0 :   if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    1916           0 :   return jresult;
    1917             : }
    1918             : 
    1919             : 
    1920           0 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_GetUserInputAsWKT_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1) {
    1921           0 :   jstring jresult = 0 ;
    1922           0 :   char *arg1 = (char *) 0 ;
    1923           0 :   retStringAndCPLFree *result = 0 ;
    1924             :   
    1925             :   (void)jenv;
    1926             :   (void)jcls;
    1927           0 :   arg1 = 0;
    1928           0 :   if (jarg1) {
    1929           0 :     arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    1930           0 :     if (!arg1) return 0;
    1931             :   }
    1932           0 :   result = (retStringAndCPLFree *)GetUserInputAsWKT((char const *)arg1);
    1933             :   {
    1934             :     /* %typemap(out) (retStringAndCPLFree*) */
    1935           0 :     if(result)
    1936             :     {
    1937           0 :       jresult = SafeNewStringUTF8(jenv, (const char *)result);
    1938           0 :       CPLFree(result);
    1939             :     }
    1940             :   }
    1941           0 :   if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    1942           0 :   return jresult;
    1943             : }
    1944             : 
    1945             : 
    1946           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_GetWellKnownGeogCSAsWKT_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1, jobjectArray jarg2) {
    1947           0 :   jint jresult = 0 ;
    1948           0 :   char *arg1 = (char *) 0 ;
    1949           0 :   char **arg2 = (char **) 0 ;
    1950           0 :   char *argout2 = 0 ;
    1951             :   OGRErr result;
    1952             :   
    1953             :   (void)jenv;
    1954             :   (void)jcls;
    1955           0 :   arg1 = 0;
    1956           0 :   if (jarg1) {
    1957           0 :     arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    1958           0 :     if (!arg1) return 0;
    1959             :   }
    1960             :   {
    1961             :     /* %typemap(in) (char **argout2) */
    1962           0 :     arg2 = &argout2;
    1963             :   }
    1964             :   {
    1965           0 :     if (!arg1) {
    1966             :       {
    1967           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    1968             :       };
    1969             :     }
    1970             :   }
    1971           0 :   result = (OGRErr)GetWellKnownGeogCSAsWKT((char const *)arg1,arg2);
    1972             :   {
    1973             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    1974           0 :     if (result != 0 && bUseExceptions) {
    1975           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    1976             :         OGRErrMessages(result));
    1977           0 :       return 0;
    1978             :     }
    1979           0 :     jresult = (jint)result;
    1980             :   }
    1981             :   {
    1982             :     /* %typemap(argout) (char **argout) */
    1983             :     jstring temp_string;
    1984             :     
    1985           0 :     if(jarg2 != NULL && (int)jenv->GetArrayLength(jarg2) >= 1) {
    1986           0 :       temp_string = SafeNewStringUTF8(jenv, argout2);
    1987           0 :       jenv->SetObjectArrayElement(jarg2, 0, temp_string);
    1988           0 :       jenv->DeleteLocalRef(temp_string);
    1989             :     }
    1990             :   }
    1991           0 :   if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    1992             :   {
    1993             :     /* %typemap(freearg) (char **argout) */
    1994           0 :     if(arg2) {
    1995           0 :       CPLFree((void *) argout2);
    1996             :     }
    1997             :   }
    1998             :   {
    1999             :     /* %typemap(ret) OGRErr */
    2000             :   }
    2001           0 :   return jresult;
    2002             : }
    2003             : 
    2004             : 
    2005           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_GetUserInputAsWKT_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1, jobjectArray jarg2) {
    2006           0 :   jint jresult = 0 ;
    2007           0 :   char *arg1 = (char *) 0 ;
    2008           0 :   char **arg2 = (char **) 0 ;
    2009           0 :   char *argout2 = 0 ;
    2010             :   OGRErr result;
    2011             :   
    2012             :   (void)jenv;
    2013             :   (void)jcls;
    2014           0 :   arg1 = 0;
    2015           0 :   if (jarg1) {
    2016           0 :     arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    2017           0 :     if (!arg1) return 0;
    2018             :   }
    2019             :   {
    2020             :     /* %typemap(in) (char **argout2) */
    2021           0 :     arg2 = &argout2;
    2022             :   }
    2023             :   {
    2024           0 :     if (!arg1) {
    2025             :       {
    2026           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    2027             :       };
    2028             :     }
    2029             :   }
    2030           0 :   result = (OGRErr)GetUserInputAsWKT((char const *)arg1,arg2);
    2031             :   {
    2032             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    2033           0 :     if (result != 0 && bUseExceptions) {
    2034           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    2035             :         OGRErrMessages(result));
    2036           0 :       return 0;
    2037             :     }
    2038           0 :     jresult = (jint)result;
    2039             :   }
    2040             :   {
    2041             :     /* %typemap(argout) (char **argout) */
    2042             :     jstring temp_string;
    2043             :     
    2044           0 :     if(jarg2 != NULL && (int)jenv->GetArrayLength(jarg2) >= 1) {
    2045           0 :       temp_string = SafeNewStringUTF8(jenv, argout2);
    2046           0 :       jenv->SetObjectArrayElement(jarg2, 0, temp_string);
    2047           0 :       jenv->DeleteLocalRef(temp_string);
    2048             :     }
    2049             :   }
    2050           0 :   if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    2051             :   {
    2052             :     /* %typemap(freearg) (char **argout) */
    2053           0 :     if(arg2) {
    2054           0 :       CPLFree((void *) argout2);
    2055             :     }
    2056             :   }
    2057             :   {
    2058             :     /* %typemap(ret) OGRErr */
    2059             :   }
    2060           0 :   return jresult;
    2061             : }
    2062             : 
    2063             : 
    2064           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_AreaOfUse_1west_1lon_1degree_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2065           0 :   jdouble jresult = 0 ;
    2066           0 :   OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
    2067             :   double result;
    2068             :   
    2069             :   (void)jenv;
    2070             :   (void)jcls;
    2071             :   (void)jarg1_;
    2072           0 :   arg1 = *(OSRAreaOfUse **)&jarg1; 
    2073           0 :   result = (double)OSRAreaOfUse_west_lon_degree_get(arg1);
    2074           0 :   jresult = (jdouble)result; 
    2075           0 :   return jresult;
    2076             : }
    2077             : 
    2078             : 
    2079           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_AreaOfUse_1south_1lat_1degree_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2080           0 :   jdouble jresult = 0 ;
    2081           0 :   OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
    2082             :   double result;
    2083             :   
    2084             :   (void)jenv;
    2085             :   (void)jcls;
    2086             :   (void)jarg1_;
    2087           0 :   arg1 = *(OSRAreaOfUse **)&jarg1; 
    2088           0 :   result = (double)OSRAreaOfUse_south_lat_degree_get(arg1);
    2089           0 :   jresult = (jdouble)result; 
    2090           0 :   return jresult;
    2091             : }
    2092             : 
    2093             : 
    2094           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_AreaOfUse_1east_1lon_1degree_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2095           0 :   jdouble jresult = 0 ;
    2096           0 :   OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
    2097             :   double result;
    2098             :   
    2099             :   (void)jenv;
    2100             :   (void)jcls;
    2101             :   (void)jarg1_;
    2102           0 :   arg1 = *(OSRAreaOfUse **)&jarg1; 
    2103           0 :   result = (double)OSRAreaOfUse_east_lon_degree_get(arg1);
    2104           0 :   jresult = (jdouble)result; 
    2105           0 :   return jresult;
    2106             : }
    2107             : 
    2108             : 
    2109           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_AreaOfUse_1north_1lat_1degree_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2110           0 :   jdouble jresult = 0 ;
    2111           0 :   OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
    2112             :   double result;
    2113             :   
    2114             :   (void)jenv;
    2115             :   (void)jcls;
    2116             :   (void)jarg1_;
    2117           0 :   arg1 = *(OSRAreaOfUse **)&jarg1; 
    2118           0 :   result = (double)OSRAreaOfUse_north_lat_degree_get(arg1);
    2119           0 :   jresult = (jdouble)result; 
    2120           0 :   return jresult;
    2121             : }
    2122             : 
    2123             : 
    2124           0 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_AreaOfUse_1name_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2125           0 :   jstring jresult = 0 ;
    2126           0 :   OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
    2127           0 :   char *result = 0 ;
    2128             :   
    2129             :   (void)jenv;
    2130             :   (void)jcls;
    2131             :   (void)jarg1_;
    2132           0 :   arg1 = *(OSRAreaOfUse **)&jarg1; 
    2133           0 :   result = (char *)OSRAreaOfUse_name_get(arg1);
    2134           0 :   jresult = SafeNewStringUTF8(jenv, (const char *)result);
    2135           0 :   return jresult;
    2136             : }
    2137             : 
    2138             : 
    2139           0 : SWIGEXPORT jlong JNICALL Java_org_gdal_osr_osrJNI_new_1AreaOfUse(JNIEnv *jenv, jclass jcls, jdouble jarg1, jdouble jarg2, jdouble jarg3, jdouble jarg4, jstring jarg5) {
    2140           0 :   jlong jresult = 0 ;
    2141             :   double arg1 ;
    2142             :   double arg2 ;
    2143             :   double arg3 ;
    2144             :   double arg4 ;
    2145           0 :   char *arg5 = (char *) 0 ;
    2146           0 :   OSRAreaOfUse *result = 0 ;
    2147             :   
    2148             :   (void)jenv;
    2149             :   (void)jcls;
    2150           0 :   arg1 = (double)jarg1; 
    2151           0 :   arg2 = (double)jarg2; 
    2152           0 :   arg3 = (double)jarg3; 
    2153           0 :   arg4 = (double)jarg4; 
    2154           0 :   arg5 = 0;
    2155           0 :   if (jarg5) {
    2156           0 :     arg5 = (char *)jenv->GetStringUTFChars(jarg5, 0);
    2157           0 :     if (!arg5) return 0;
    2158             :   }
    2159           0 :   result = (OSRAreaOfUse *)new_OSRAreaOfUse(arg1,arg2,arg3,arg4,arg5);
    2160           0 :   *(OSRAreaOfUse **)&jresult = result; 
    2161           0 :   if (arg5) jenv->ReleaseStringUTFChars(jarg5, (const char *)arg5);
    2162           0 :   return jresult;
    2163             : }
    2164             : 
    2165             : 
    2166           0 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_delete_1AreaOfUse(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    2167           0 :   OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
    2168             :   
    2169             :   (void)jenv;
    2170             :   (void)jcls;
    2171           0 :   arg1 = *(OSRAreaOfUse **)&jarg1; 
    2172           0 :   delete_OSRAreaOfUse(arg1);
    2173           0 : }
    2174             : 
    2175             : 
    2176           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_OSRAreaOfUse_1west_1lon_1degree_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2177           0 :   jdouble jresult = 0 ;
    2178           0 :   OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
    2179             :   double result;
    2180             :   
    2181             :   (void)jenv;
    2182             :   (void)jcls;
    2183             :   (void)jarg1_;
    2184           0 :   arg1 = *(OSRAreaOfUse **)&jarg1; 
    2185             :   {
    2186           0 :     if (!arg1) {
    2187             :       {
    2188           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    2189             :       };
    2190             :     }
    2191             :   }
    2192           0 :   result = (double)OSRAreaOfUse_west_lon_degree_get(arg1);
    2193           0 :   jresult = (jdouble)result; 
    2194           0 :   return jresult;
    2195             : }
    2196             : 
    2197             : 
    2198           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_OSRAreaOfUse_1south_1lat_1degree_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2199           0 :   jdouble jresult = 0 ;
    2200           0 :   OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
    2201             :   double result;
    2202             :   
    2203             :   (void)jenv;
    2204             :   (void)jcls;
    2205             :   (void)jarg1_;
    2206           0 :   arg1 = *(OSRAreaOfUse **)&jarg1; 
    2207             :   {
    2208           0 :     if (!arg1) {
    2209             :       {
    2210           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    2211             :       };
    2212             :     }
    2213             :   }
    2214           0 :   result = (double)OSRAreaOfUse_south_lat_degree_get(arg1);
    2215           0 :   jresult = (jdouble)result; 
    2216           0 :   return jresult;
    2217             : }
    2218             : 
    2219             : 
    2220           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_OSRAreaOfUse_1east_1lon_1degree_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2221           0 :   jdouble jresult = 0 ;
    2222           0 :   OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
    2223             :   double result;
    2224             :   
    2225             :   (void)jenv;
    2226             :   (void)jcls;
    2227             :   (void)jarg1_;
    2228           0 :   arg1 = *(OSRAreaOfUse **)&jarg1; 
    2229             :   {
    2230           0 :     if (!arg1) {
    2231             :       {
    2232           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    2233             :       };
    2234             :     }
    2235             :   }
    2236           0 :   result = (double)OSRAreaOfUse_east_lon_degree_get(arg1);
    2237           0 :   jresult = (jdouble)result; 
    2238           0 :   return jresult;
    2239             : }
    2240             : 
    2241             : 
    2242           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_OSRAreaOfUse_1north_1lat_1degree_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2243           0 :   jdouble jresult = 0 ;
    2244           0 :   OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
    2245             :   double result;
    2246             :   
    2247             :   (void)jenv;
    2248             :   (void)jcls;
    2249             :   (void)jarg1_;
    2250           0 :   arg1 = *(OSRAreaOfUse **)&jarg1; 
    2251             :   {
    2252           0 :     if (!arg1) {
    2253             :       {
    2254           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    2255             :       };
    2256             :     }
    2257             :   }
    2258           0 :   result = (double)OSRAreaOfUse_north_lat_degree_get(arg1);
    2259           0 :   jresult = (jdouble)result; 
    2260           0 :   return jresult;
    2261             : }
    2262             : 
    2263             : 
    2264           0 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_OSRAreaOfUse_1name_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2265           0 :   jstring jresult = 0 ;
    2266           0 :   OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
    2267           0 :   char *result = 0 ;
    2268             :   
    2269             :   (void)jenv;
    2270             :   (void)jcls;
    2271             :   (void)jarg1_;
    2272           0 :   arg1 = *(OSRAreaOfUse **)&jarg1; 
    2273             :   {
    2274           0 :     if (!arg1) {
    2275             :       {
    2276           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    2277             :       };
    2278             :     }
    2279             :   }
    2280           0 :   result = (char *)OSRAreaOfUse_name_get(arg1);
    2281           0 :   jresult = SafeNewStringUTF8(jenv, (const char *)result);
    2282           0 :   return jresult;
    2283             : }
    2284             : 
    2285             : 
    2286          15 : SWIGEXPORT jlong JNICALL Java_org_gdal_osr_osrJNI_new_1SpatialReference_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jstring jarg1) {
    2287          15 :   jlong jresult = 0 ;
    2288          15 :   char *arg1 = (char *) 0 ;
    2289          15 :   OSRSpatialReferenceShadow *result = 0 ;
    2290             :   
    2291             :   (void)jenv;
    2292             :   (void)jcls;
    2293          15 :   arg1 = 0;
    2294          15 :   if (jarg1) {
    2295          13 :     arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    2296          13 :     if (!arg1) return 0;
    2297             :   }
    2298          15 :   result = (OSRSpatialReferenceShadow *)new_OSRSpatialReferenceShadow__SWIG_0((char const *)arg1);
    2299          15 :   *(OSRSpatialReferenceShadow **)&jresult = result; 
    2300          15 :   if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    2301          15 :   return jresult;
    2302             : }
    2303             : 
    2304             : 
    2305           2 : SWIGEXPORT jlong JNICALL Java_org_gdal_osr_osrJNI_new_1SpatialReference_1_1SWIG_11(JNIEnv *jenv, jclass jcls) {
    2306           2 :   jlong jresult = 0 ;
    2307           2 :   OSRSpatialReferenceShadow *result = 0 ;
    2308             :   
    2309             :   (void)jenv;
    2310             :   (void)jcls;
    2311           2 :   result = (OSRSpatialReferenceShadow *)new_OSRSpatialReferenceShadow__SWIG_0();
    2312           2 :   *(OSRSpatialReferenceShadow **)&jresult = result; 
    2313           2 :   return jresult;
    2314             : }
    2315             : 
    2316             : 
    2317           6 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_delete_1SpatialReference(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    2318           6 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2319             :   
    2320             :   (void)jenv;
    2321             :   (void)jcls;
    2322           6 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2323           6 :   delete_OSRSpatialReferenceShadow(arg1);
    2324           6 : }
    2325             : 
    2326             : 
    2327           0 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1_1_1str_1_1(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2328           0 :   jstring jresult = 0 ;
    2329           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2330           0 :   retStringAndCPLFree *result = 0 ;
    2331             :   
    2332             :   (void)jenv;
    2333             :   (void)jcls;
    2334             :   (void)jarg1_;
    2335           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2336           0 :   result = (retStringAndCPLFree *)OSRSpatialReferenceShadow___str__(arg1);
    2337             :   {
    2338             :     /* %typemap(out) (retStringAndCPLFree*) */
    2339           0 :     if(result)
    2340             :     {
    2341           0 :       jresult = SafeNewStringUTF8(jenv, (const char *)result);
    2342           0 :       CPLFree(result);
    2343             :     }
    2344             :   }
    2345           0 :   return jresult;
    2346             : }
    2347             : 
    2348             : 
    2349           0 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2350           0 :   jstring jresult = 0 ;
    2351           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2352           0 :   char *result = 0 ;
    2353             :   
    2354             :   (void)jenv;
    2355             :   (void)jcls;
    2356             :   (void)jarg1_;
    2357           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2358           0 :   result = (char *)OSRSpatialReferenceShadow_GetName(arg1);
    2359           0 :   jresult = SafeNewStringUTF8(jenv, (const char *)result);
    2360           0 :   return jresult;
    2361             : }
    2362             : 
    2363             : 
    2364           0 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetCelestialBodyName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2365           0 :   jstring jresult = 0 ;
    2366           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2367           0 :   char *result = 0 ;
    2368             :   
    2369             :   (void)jenv;
    2370             :   (void)jcls;
    2371             :   (void)jarg1_;
    2372           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2373           0 :   result = (char *)OSRSpatialReferenceShadow_GetCelestialBodyName(arg1);
    2374           0 :   jresult = SafeNewStringUTF8(jenv, (const char *)result);
    2375           0 :   return jresult;
    2376             : }
    2377             : 
    2378             : 
    2379           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1IsSame_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jobject jarg3) {
    2380           0 :   jint jresult = 0 ;
    2381           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2382           0 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    2383           0 :   char **arg3 = (char **) 0 ;
    2384             :   int result;
    2385             :   
    2386             :   (void)jenv;
    2387             :   (void)jcls;
    2388             :   (void)jarg1_;
    2389             :   (void)jarg2_;
    2390           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2391           0 :   arg2 = *(OSRSpatialReferenceShadow **)&jarg2; 
    2392             :   {
    2393             :     /* %typemap(in) char **options */
    2394           0 :     arg3 = NULL;
    2395           0 :     if(jarg3 != 0) {
    2396           0 :       const jclass vector = jenv->FindClass("java/util/Vector");
    2397           0 :       const jclass enumeration = jenv->FindClass("java/util/Enumeration");
    2398           0 :       const jclass stringClass = jenv->FindClass("java/lang/String");
    2399           0 :       const jmethodID elements = jenv->GetMethodID(vector, "elements",
    2400             :         "()Ljava/util/Enumeration;");
    2401           0 :       const jmethodID hasMoreElements = jenv->GetMethodID(enumeration,
    2402             :         "hasMoreElements", "()Z");
    2403           0 :       const jmethodID getNextElement = jenv->GetMethodID(enumeration,
    2404             :         "nextElement", "()Ljava/lang/Object;");
    2405           0 :       if(vector == NULL || enumeration == NULL || elements == NULL ||
    2406           0 :         hasMoreElements == NULL || getNextElement == NULL) {
    2407           0 :         fprintf(stderr, "Could not load (options **) jni types.\n");
    2408           0 :         return 0;
    2409             :       }
    2410           0 :       for (jobject keys = jenv->CallObjectMethod(jarg3, elements);
    2411           0 :         jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
    2412           0 :         jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
    2413           0 :         if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
    2414             :         {
    2415           0 :           CSLDestroy(arg3);
    2416           0 :           SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
    2417           0 :           return 0;
    2418             :         }
    2419           0 :         const char *valptr = jenv->GetStringUTFChars(value, 0);
    2420           0 :         arg3 = CSLAddString(arg3,  valptr);
    2421           0 :         jenv->ReleaseStringUTFChars(value, valptr);
    2422             :       }
    2423             :     }
    2424             :   }
    2425             :   {
    2426           0 :     if (!arg2) {
    2427             :       {
    2428           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    2429             :       };
    2430             :     }
    2431             :   }
    2432           0 :   result = (int)OSRSpatialReferenceShadow_IsSame__SWIG_0(arg1,arg2,arg3);
    2433           0 :   jresult = (jint)result; 
    2434             :   {
    2435             :     /* %typemap(freearg) char **options */
    2436           0 :     CSLDestroy( arg3 );
    2437             :   }
    2438           0 :   return jresult;
    2439             : }
    2440             : 
    2441             : 
    2442           3 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1IsSame_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    2443           3 :   jint jresult = 0 ;
    2444           3 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2445           3 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    2446             :   int result;
    2447             :   
    2448             :   (void)jenv;
    2449             :   (void)jcls;
    2450             :   (void)jarg1_;
    2451             :   (void)jarg2_;
    2452           3 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2453           3 :   arg2 = *(OSRSpatialReferenceShadow **)&jarg2; 
    2454             :   {
    2455           3 :     if (!arg2) {
    2456             :       {
    2457           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    2458             :       };
    2459             :     }
    2460             :   }
    2461           3 :   result = (int)OSRSpatialReferenceShadow_IsSame__SWIG_0(arg1,arg2);
    2462           3 :   jresult = (jint)result; 
    2463           3 :   return jresult;
    2464             : }
    2465             : 
    2466             : 
    2467           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1IsSameGeogCS(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    2468           0 :   jint jresult = 0 ;
    2469           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2470           0 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    2471             :   int result;
    2472             :   
    2473             :   (void)jenv;
    2474             :   (void)jcls;
    2475             :   (void)jarg1_;
    2476             :   (void)jarg2_;
    2477           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2478           0 :   arg2 = *(OSRSpatialReferenceShadow **)&jarg2; 
    2479             :   {
    2480           0 :     if (!arg2) {
    2481             :       {
    2482           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    2483             :       };
    2484             :     }
    2485             :   }
    2486           0 :   result = (int)OSRSpatialReferenceShadow_IsSameGeogCS(arg1,arg2);
    2487           0 :   jresult = (jint)result; 
    2488           0 :   return jresult;
    2489             : }
    2490             : 
    2491             : 
    2492           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1IsSameVertCS(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    2493           0 :   jint jresult = 0 ;
    2494           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2495           0 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    2496             :   int result;
    2497             :   
    2498             :   (void)jenv;
    2499             :   (void)jcls;
    2500             :   (void)jarg1_;
    2501             :   (void)jarg2_;
    2502           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2503           0 :   arg2 = *(OSRSpatialReferenceShadow **)&jarg2; 
    2504             :   {
    2505           0 :     if (!arg2) {
    2506             :       {
    2507           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    2508             :       };
    2509             :     }
    2510             :   }
    2511           0 :   result = (int)OSRSpatialReferenceShadow_IsSameVertCS(arg1,arg2);
    2512           0 :   jresult = (jint)result; 
    2513           0 :   return jresult;
    2514             : }
    2515             : 
    2516             : 
    2517           3 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1IsGeographic(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2518           3 :   jint jresult = 0 ;
    2519           3 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2520             :   int result;
    2521             :   
    2522             :   (void)jenv;
    2523             :   (void)jcls;
    2524             :   (void)jarg1_;
    2525           3 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2526           3 :   result = (int)OSRSpatialReferenceShadow_IsGeographic(arg1);
    2527           3 :   jresult = (jint)result; 
    2528           3 :   return jresult;
    2529             : }
    2530             : 
    2531             : 
    2532           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1IsDerivedGeographic(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2533           0 :   jint jresult = 0 ;
    2534           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2535             :   int result;
    2536             :   
    2537             :   (void)jenv;
    2538             :   (void)jcls;
    2539             :   (void)jarg1_;
    2540           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2541           0 :   result = (int)OSRSpatialReferenceShadow_IsDerivedGeographic(arg1);
    2542           0 :   jresult = (jint)result; 
    2543           0 :   return jresult;
    2544             : }
    2545             : 
    2546             : 
    2547           3 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1IsProjected(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2548           3 :   jint jresult = 0 ;
    2549           3 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2550             :   int result;
    2551             :   
    2552             :   (void)jenv;
    2553             :   (void)jcls;
    2554             :   (void)jarg1_;
    2555           3 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2556           3 :   result = (int)OSRSpatialReferenceShadow_IsProjected(arg1);
    2557           3 :   jresult = (jint)result; 
    2558           3 :   return jresult;
    2559             : }
    2560             : 
    2561             : 
    2562           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1IsDerivedProjected(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2563           0 :   jint jresult = 0 ;
    2564           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2565             :   int result;
    2566             :   
    2567             :   (void)jenv;
    2568             :   (void)jcls;
    2569             :   (void)jarg1_;
    2570           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2571           0 :   result = (int)OSRSpatialReferenceShadow_IsDerivedProjected(arg1);
    2572           0 :   jresult = (jint)result; 
    2573           0 :   return jresult;
    2574             : }
    2575             : 
    2576             : 
    2577           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1IsCompound(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2578           0 :   jint jresult = 0 ;
    2579           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2580             :   int result;
    2581             :   
    2582             :   (void)jenv;
    2583             :   (void)jcls;
    2584             :   (void)jarg1_;
    2585           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2586           0 :   result = (int)OSRSpatialReferenceShadow_IsCompound(arg1);
    2587           0 :   jresult = (jint)result; 
    2588           0 :   return jresult;
    2589             : }
    2590             : 
    2591             : 
    2592           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1IsGeocentric(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2593           0 :   jint jresult = 0 ;
    2594           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2595             :   int result;
    2596             :   
    2597             :   (void)jenv;
    2598             :   (void)jcls;
    2599             :   (void)jarg1_;
    2600           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2601           0 :   result = (int)OSRSpatialReferenceShadow_IsGeocentric(arg1);
    2602           0 :   jresult = (jint)result; 
    2603           0 :   return jresult;
    2604             : }
    2605             : 
    2606             : 
    2607           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1IsLocal(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2608           0 :   jint jresult = 0 ;
    2609           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2610             :   int result;
    2611             :   
    2612             :   (void)jenv;
    2613             :   (void)jcls;
    2614             :   (void)jarg1_;
    2615           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2616           0 :   result = (int)OSRSpatialReferenceShadow_IsLocal(arg1);
    2617           0 :   jresult = (jint)result; 
    2618           0 :   return jresult;
    2619             : }
    2620             : 
    2621             : 
    2622           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1IsVertical(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2623           0 :   jint jresult = 0 ;
    2624           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2625             :   int result;
    2626             :   
    2627             :   (void)jenv;
    2628             :   (void)jcls;
    2629             :   (void)jarg1_;
    2630           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2631           0 :   result = (int)OSRSpatialReferenceShadow_IsVertical(arg1);
    2632           0 :   jresult = (jint)result; 
    2633           0 :   return jresult;
    2634             : }
    2635             : 
    2636             : 
    2637           0 : SWIGEXPORT jboolean JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1IsDynamic(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2638           0 :   jboolean jresult = 0 ;
    2639           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2640             :   bool result;
    2641             :   
    2642             :   (void)jenv;
    2643             :   (void)jcls;
    2644             :   (void)jarg1_;
    2645           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2646           0 :   result = (bool)OSRSpatialReferenceShadow_IsDynamic(arg1);
    2647           0 :   jresult = (jboolean)result; 
    2648           0 :   return jresult;
    2649             : }
    2650             : 
    2651             : 
    2652           0 : SWIGEXPORT jboolean JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1HasPointMotionOperation(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2653           0 :   jboolean jresult = 0 ;
    2654           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2655             :   bool result;
    2656             :   
    2657             :   (void)jenv;
    2658             :   (void)jcls;
    2659             :   (void)jarg1_;
    2660           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2661           0 :   result = (bool)OSRSpatialReferenceShadow_HasPointMotionOperation(arg1);
    2662           0 :   jresult = (jboolean)result; 
    2663           0 :   return jresult;
    2664             : }
    2665             : 
    2666             : 
    2667           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetCoordinateEpoch(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2668           0 :   jdouble jresult = 0 ;
    2669           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2670             :   double result;
    2671             :   
    2672             :   (void)jenv;
    2673             :   (void)jcls;
    2674             :   (void)jarg1_;
    2675           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2676           0 :   result = (double)OSRSpatialReferenceShadow_GetCoordinateEpoch(arg1);
    2677           0 :   jresult = (jdouble)result; 
    2678           0 :   return jresult;
    2679             : }
    2680             : 
    2681             : 
    2682           0 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetCoordinateEpoch(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
    2683           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2684             :   double arg2 ;
    2685             :   
    2686             :   (void)jenv;
    2687             :   (void)jcls;
    2688             :   (void)jarg1_;
    2689           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2690           0 :   arg2 = (double)jarg2; 
    2691           0 :   OSRSpatialReferenceShadow_SetCoordinateEpoch(arg1,arg2);
    2692           0 : }
    2693             : 
    2694             : 
    2695           1 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1EPSGTreatsAsLatLong(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2696           1 :   jint jresult = 0 ;
    2697           1 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2698             :   int result;
    2699             :   
    2700             :   (void)jenv;
    2701             :   (void)jcls;
    2702             :   (void)jarg1_;
    2703           1 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2704           1 :   result = (int)OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(arg1);
    2705           1 :   jresult = (jint)result; 
    2706           1 :   return jresult;
    2707             : }
    2708             : 
    2709             : 
    2710           1 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1EPSGTreatsAsNorthingEasting(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2711           1 :   jint jresult = 0 ;
    2712           1 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2713             :   int result;
    2714             :   
    2715             :   (void)jenv;
    2716             :   (void)jcls;
    2717             :   (void)jarg1_;
    2718           1 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2719           1 :   result = (int)OSRSpatialReferenceShadow_EPSGTreatsAsNorthingEasting(arg1);
    2720           1 :   jresult = (jint)result; 
    2721           1 :   return jresult;
    2722             : }
    2723             : 
    2724             : 
    2725           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetAuthority(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jint jarg4) {
    2726           0 :   jint jresult = 0 ;
    2727           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2728           0 :   char *arg2 = (char *) 0 ;
    2729           0 :   char *arg3 = (char *) 0 ;
    2730             :   int arg4 ;
    2731             :   OGRErr result;
    2732             :   
    2733             :   (void)jenv;
    2734             :   (void)jcls;
    2735             :   (void)jarg1_;
    2736           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2737           0 :   arg2 = 0;
    2738           0 :   if (jarg2) {
    2739           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    2740           0 :     if (!arg2) return 0;
    2741             :   }
    2742           0 :   arg3 = 0;
    2743           0 :   if (jarg3) {
    2744           0 :     arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    2745           0 :     if (!arg3) return 0;
    2746             :   }
    2747           0 :   arg4 = (int)jarg4; 
    2748           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetAuthority(arg1,(char const *)arg2,(char const *)arg3,arg4);
    2749             :   {
    2750             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    2751           0 :     if (result != 0 && bUseExceptions) {
    2752           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    2753             :         OGRErrMessages(result));
    2754           0 :       return 0;
    2755             :     }
    2756           0 :     jresult = (jint)result;
    2757             :   }
    2758           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    2759           0 :   if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    2760             :   {
    2761             :     /* %typemap(ret) OGRErr */
    2762             :   }
    2763           0 :   return jresult;
    2764             : }
    2765             : 
    2766             : 
    2767           0 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetAttrValue_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
    2768           0 :   jstring jresult = 0 ;
    2769           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2770           0 :   char *arg2 = (char *) 0 ;
    2771             :   int arg3 ;
    2772           0 :   char *result = 0 ;
    2773             :   
    2774             :   (void)jenv;
    2775             :   (void)jcls;
    2776             :   (void)jarg1_;
    2777           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2778           0 :   arg2 = 0;
    2779           0 :   if (jarg2) {
    2780           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    2781           0 :     if (!arg2) return 0;
    2782             :   }
    2783           0 :   arg3 = (int)jarg3; 
    2784             :   {
    2785           0 :     if (!arg2) {
    2786             :       {
    2787           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    2788             :       };
    2789             :     }
    2790             :   }
    2791           0 :   result = (char *)OSRSpatialReferenceShadow_GetAttrValue__SWIG_0(arg1,(char const *)arg2,arg3);
    2792           0 :   jresult = SafeNewStringUTF8(jenv, (const char *)result);
    2793           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    2794           0 :   return jresult;
    2795             : }
    2796             : 
    2797             : 
    2798           0 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetAttrValue_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    2799           0 :   jstring jresult = 0 ;
    2800           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2801           0 :   char *arg2 = (char *) 0 ;
    2802           0 :   char *result = 0 ;
    2803             :   
    2804             :   (void)jenv;
    2805             :   (void)jcls;
    2806             :   (void)jarg1_;
    2807           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2808           0 :   arg2 = 0;
    2809           0 :   if (jarg2) {
    2810           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    2811           0 :     if (!arg2) return 0;
    2812             :   }
    2813             :   {
    2814           0 :     if (!arg2) {
    2815             :       {
    2816           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    2817             :       };
    2818             :     }
    2819             :   }
    2820           0 :   result = (char *)OSRSpatialReferenceShadow_GetAttrValue__SWIG_0(arg1,(char const *)arg2);
    2821           0 :   jresult = SafeNewStringUTF8(jenv, (const char *)result);
    2822           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    2823           0 :   return jresult;
    2824             : }
    2825             : 
    2826             : 
    2827           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetAttrValue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
    2828           0 :   jint jresult = 0 ;
    2829           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2830           0 :   char *arg2 = (char *) 0 ;
    2831           0 :   char *arg3 = (char *) 0 ;
    2832             :   OGRErr result;
    2833             :   
    2834             :   (void)jenv;
    2835             :   (void)jcls;
    2836             :   (void)jarg1_;
    2837           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2838           0 :   arg2 = 0;
    2839           0 :   if (jarg2) {
    2840           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    2841           0 :     if (!arg2) return 0;
    2842             :   }
    2843           0 :   arg3 = 0;
    2844           0 :   if (jarg3) {
    2845           0 :     arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    2846           0 :     if (!arg3) return 0;
    2847             :   }
    2848             :   {
    2849           0 :     if (!arg2) {
    2850             :       {
    2851           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    2852             :       };
    2853             :     }
    2854             :   }
    2855           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetAttrValue(arg1,(char const *)arg2,(char const *)arg3);
    2856             :   {
    2857             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    2858           0 :     if (result != 0 && bUseExceptions) {
    2859           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    2860             :         OGRErrMessages(result));
    2861           0 :       return 0;
    2862             :     }
    2863           0 :     jresult = (jint)result;
    2864             :   }
    2865           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    2866           0 :   if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    2867             :   {
    2868             :     /* %typemap(ret) OGRErr */
    2869             :   }
    2870           0 :   return jresult;
    2871             : }
    2872             : 
    2873             : 
    2874           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetAngularUnits(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jdouble jarg3) {
    2875           0 :   jint jresult = 0 ;
    2876           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2877           0 :   char *arg2 = (char *) 0 ;
    2878             :   double arg3 ;
    2879             :   OGRErr result;
    2880             :   
    2881             :   (void)jenv;
    2882             :   (void)jcls;
    2883             :   (void)jarg1_;
    2884           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2885           0 :   arg2 = 0;
    2886           0 :   if (jarg2) {
    2887           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    2888           0 :     if (!arg2) return 0;
    2889             :   }
    2890           0 :   arg3 = (double)jarg3; 
    2891             :   {
    2892           0 :     if (!arg2) {
    2893             :       {
    2894           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    2895             :       };
    2896             :     }
    2897             :   }
    2898           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetAngularUnits(arg1,(char const *)arg2,arg3);
    2899             :   {
    2900             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    2901           0 :     if (result != 0 && bUseExceptions) {
    2902           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    2903             :         OGRErrMessages(result));
    2904           0 :       return 0;
    2905             :     }
    2906           0 :     jresult = (jint)result;
    2907             :   }
    2908           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    2909             :   {
    2910             :     /* %typemap(ret) OGRErr */
    2911             :   }
    2912           0 :   return jresult;
    2913             : }
    2914             : 
    2915             : 
    2916           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetAngularUnits(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2917           0 :   jdouble jresult = 0 ;
    2918           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2919             :   double result;
    2920             :   
    2921             :   (void)jenv;
    2922             :   (void)jcls;
    2923             :   (void)jarg1_;
    2924           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2925           0 :   result = (double)OSRSpatialReferenceShadow_GetAngularUnits(arg1);
    2926           0 :   jresult = (jdouble)result; 
    2927           0 :   return jresult;
    2928             : }
    2929             : 
    2930             : 
    2931           0 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetAngularUnitsName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    2932           0 :   jstring jresult = 0 ;
    2933           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2934           0 :   char *result = 0 ;
    2935             :   
    2936             :   (void)jenv;
    2937             :   (void)jcls;
    2938             :   (void)jarg1_;
    2939           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2940           0 :   result = (char *)OSRSpatialReferenceShadow_GetAngularUnitsName(arg1);
    2941           0 :   jresult = SafeNewStringUTF8(jenv, (const char *)result);
    2942           0 :   return jresult;
    2943             : }
    2944             : 
    2945             : 
    2946           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetTargetLinearUnits(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jdouble jarg4) {
    2947           0 :   jint jresult = 0 ;
    2948           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2949           0 :   char *arg2 = (char *) 0 ;
    2950           0 :   char *arg3 = (char *) 0 ;
    2951             :   double arg4 ;
    2952             :   OGRErr result;
    2953             :   
    2954             :   (void)jenv;
    2955             :   (void)jcls;
    2956             :   (void)jarg1_;
    2957           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    2958           0 :   arg2 = 0;
    2959           0 :   if (jarg2) {
    2960           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    2961           0 :     if (!arg2) return 0;
    2962             :   }
    2963           0 :   arg3 = 0;
    2964           0 :   if (jarg3) {
    2965           0 :     arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    2966           0 :     if (!arg3) return 0;
    2967             :   }
    2968           0 :   arg4 = (double)jarg4; 
    2969             :   {
    2970           0 :     if (!arg3) {
    2971             :       {
    2972           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    2973             :       };
    2974             :     }
    2975             :   }
    2976           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetTargetLinearUnits(arg1,(char const *)arg2,(char const *)arg3,arg4);
    2977             :   {
    2978             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    2979           0 :     if (result != 0 && bUseExceptions) {
    2980           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    2981             :         OGRErrMessages(result));
    2982           0 :       return 0;
    2983             :     }
    2984           0 :     jresult = (jint)result;
    2985             :   }
    2986           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    2987           0 :   if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    2988             :   {
    2989             :     /* %typemap(ret) OGRErr */
    2990             :   }
    2991           0 :   return jresult;
    2992             : }
    2993             : 
    2994             : 
    2995           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetLinearUnits(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jdouble jarg3) {
    2996           0 :   jint jresult = 0 ;
    2997           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    2998           0 :   char *arg2 = (char *) 0 ;
    2999             :   double arg3 ;
    3000             :   OGRErr result;
    3001             :   
    3002             :   (void)jenv;
    3003             :   (void)jcls;
    3004             :   (void)jarg1_;
    3005           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3006           0 :   arg2 = 0;
    3007           0 :   if (jarg2) {
    3008           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    3009           0 :     if (!arg2) return 0;
    3010             :   }
    3011           0 :   arg3 = (double)jarg3; 
    3012             :   {
    3013           0 :     if (!arg2) {
    3014             :       {
    3015           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    3016             :       };
    3017             :     }
    3018             :   }
    3019           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnits(arg1,(char const *)arg2,arg3);
    3020             :   {
    3021             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    3022           0 :     if (result != 0 && bUseExceptions) {
    3023           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    3024             :         OGRErrMessages(result));
    3025           0 :       return 0;
    3026             :     }
    3027           0 :     jresult = (jint)result;
    3028             :   }
    3029           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    3030             :   {
    3031             :     /* %typemap(ret) OGRErr */
    3032             :   }
    3033           0 :   return jresult;
    3034             : }
    3035             : 
    3036             : 
    3037           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetLinearUnitsAndUpdateParameters(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jdouble jarg3) {
    3038           0 :   jint jresult = 0 ;
    3039           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3040           0 :   char *arg2 = (char *) 0 ;
    3041             :   double arg3 ;
    3042             :   OGRErr result;
    3043             :   
    3044             :   (void)jenv;
    3045             :   (void)jcls;
    3046             :   (void)jarg1_;
    3047           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3048           0 :   arg2 = 0;
    3049           0 :   if (jarg2) {
    3050           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    3051           0 :     if (!arg2) return 0;
    3052             :   }
    3053           0 :   arg3 = (double)jarg3; 
    3054             :   {
    3055           0 :     if (!arg2) {
    3056             :       {
    3057           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    3058             :       };
    3059             :     }
    3060             :   }
    3061           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(arg1,(char const *)arg2,arg3);
    3062             :   {
    3063             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    3064           0 :     if (result != 0 && bUseExceptions) {
    3065           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    3066             :         OGRErrMessages(result));
    3067           0 :       return 0;
    3068             :     }
    3069           0 :     jresult = (jint)result;
    3070             :   }
    3071           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    3072             :   {
    3073             :     /* %typemap(ret) OGRErr */
    3074             :   }
    3075           0 :   return jresult;
    3076             : }
    3077             : 
    3078             : 
    3079           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetTargetLinearUnits(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    3080           0 :   jdouble jresult = 0 ;
    3081           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3082           0 :   char *arg2 = (char *) 0 ;
    3083             :   double result;
    3084             :   
    3085             :   (void)jenv;
    3086             :   (void)jcls;
    3087             :   (void)jarg1_;
    3088           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3089           0 :   arg2 = 0;
    3090           0 :   if (jarg2) {
    3091           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    3092           0 :     if (!arg2) return 0;
    3093             :   }
    3094           0 :   result = (double)OSRSpatialReferenceShadow_GetTargetLinearUnits(arg1,(char const *)arg2);
    3095           0 :   jresult = (jdouble)result; 
    3096           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    3097           0 :   return jresult;
    3098             : }
    3099             : 
    3100             : 
    3101           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetLinearUnits(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    3102           0 :   jdouble jresult = 0 ;
    3103           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3104             :   double result;
    3105             :   
    3106             :   (void)jenv;
    3107             :   (void)jcls;
    3108             :   (void)jarg1_;
    3109           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3110           0 :   result = (double)OSRSpatialReferenceShadow_GetLinearUnits(arg1);
    3111           0 :   jresult = (jdouble)result; 
    3112           0 :   return jresult;
    3113             : }
    3114             : 
    3115             : 
    3116           0 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetLinearUnitsName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    3117           0 :   jstring jresult = 0 ;
    3118           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3119           0 :   char *result = 0 ;
    3120             :   
    3121             :   (void)jenv;
    3122             :   (void)jcls;
    3123             :   (void)jarg1_;
    3124           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3125           0 :   result = (char *)OSRSpatialReferenceShadow_GetLinearUnitsName(arg1);
    3126           0 :   jresult = SafeNewStringUTF8(jenv, (const char *)result);
    3127           0 :   return jresult;
    3128             : }
    3129             : 
    3130             : 
    3131           4 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetAuthorityCode_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    3132           4 :   jstring jresult = 0 ;
    3133           4 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3134           4 :   char *arg2 = (char *) 0 ;
    3135           4 :   char *result = 0 ;
    3136             :   
    3137             :   (void)jenv;
    3138             :   (void)jcls;
    3139             :   (void)jarg1_;
    3140           4 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3141           4 :   arg2 = 0;
    3142           4 :   if (jarg2) {
    3143           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    3144           0 :     if (!arg2) return 0;
    3145             :   }
    3146           4 :   result = (char *)OSRSpatialReferenceShadow_GetAuthorityCode__SWIG_0(arg1,(char const *)arg2);
    3147           4 :   jresult = SafeNewStringUTF8(jenv, (const char *)result);
    3148           4 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    3149           4 :   return jresult;
    3150             : }
    3151             : 
    3152             : 
    3153           0 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetAuthorityCode_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    3154           0 :   jstring jresult = 0 ;
    3155           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3156           0 :   char *result = 0 ;
    3157             :   
    3158             :   (void)jenv;
    3159             :   (void)jcls;
    3160             :   (void)jarg1_;
    3161           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3162           0 :   result = (char *)OSRSpatialReferenceShadow_GetAuthorityCode__SWIG_0(arg1);
    3163           0 :   jresult = SafeNewStringUTF8(jenv, (const char *)result);
    3164           0 :   return jresult;
    3165             : }
    3166             : 
    3167             : 
    3168           1 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetAuthorityName_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    3169           1 :   jstring jresult = 0 ;
    3170           1 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3171           1 :   char *arg2 = (char *) 0 ;
    3172           1 :   char *result = 0 ;
    3173             :   
    3174             :   (void)jenv;
    3175             :   (void)jcls;
    3176             :   (void)jarg1_;
    3177           1 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3178           1 :   arg2 = 0;
    3179           1 :   if (jarg2) {
    3180           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    3181           0 :     if (!arg2) return 0;
    3182             :   }
    3183           1 :   result = (char *)OSRSpatialReferenceShadow_GetAuthorityName__SWIG_0(arg1,(char const *)arg2);
    3184           1 :   jresult = SafeNewStringUTF8(jenv, (const char *)result);
    3185           1 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    3186           1 :   return jresult;
    3187             : }
    3188             : 
    3189             : 
    3190           0 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetAuthorityName_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    3191           0 :   jstring jresult = 0 ;
    3192           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3193           0 :   char *result = 0 ;
    3194             :   
    3195             :   (void)jenv;
    3196             :   (void)jcls;
    3197             :   (void)jarg1_;
    3198           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3199           0 :   result = (char *)OSRSpatialReferenceShadow_GetAuthorityName__SWIG_0(arg1);
    3200           0 :   jresult = SafeNewStringUTF8(jenv, (const char *)result);
    3201           0 :   return jresult;
    3202             : }
    3203             : 
    3204             : 
    3205           0 : SWIGEXPORT jlong JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetAreaOfUse(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    3206           0 :   jlong jresult = 0 ;
    3207           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3208           0 :   OSRAreaOfUse *result = 0 ;
    3209             :   
    3210             :   (void)jenv;
    3211             :   (void)jcls;
    3212             :   (void)jarg1_;
    3213           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3214           0 :   result = (OSRAreaOfUse *)OSRSpatialReferenceShadow_GetAreaOfUse(arg1);
    3215           0 :   *(OSRAreaOfUse **)&jresult = result; 
    3216           0 :   return jresult;
    3217             : }
    3218             : 
    3219             : 
    3220           1 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetAxisName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
    3221           1 :   jstring jresult = 0 ;
    3222           1 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3223           1 :   char *arg2 = (char *) 0 ;
    3224             :   int arg3 ;
    3225           1 :   char *result = 0 ;
    3226             :   
    3227             :   (void)jenv;
    3228             :   (void)jcls;
    3229             :   (void)jarg1_;
    3230           1 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3231           1 :   arg2 = 0;
    3232           1 :   if (jarg2) {
    3233           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    3234           0 :     if (!arg2) return 0;
    3235             :   }
    3236           1 :   arg3 = (int)jarg3; 
    3237           1 :   result = (char *)OSRSpatialReferenceShadow_GetAxisName(arg1,(char const *)arg2,arg3);
    3238           1 :   jresult = SafeNewStringUTF8(jenv, (const char *)result);
    3239           1 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    3240           1 :   return jresult;
    3241             : }
    3242             : 
    3243             : 
    3244           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetAxesCount(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    3245           0 :   jint jresult = 0 ;
    3246           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3247             :   int result;
    3248             :   
    3249             :   (void)jenv;
    3250             :   (void)jcls;
    3251             :   (void)jarg1_;
    3252           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3253           0 :   result = (int)OSRSpatialReferenceShadow_GetAxesCount(arg1);
    3254           0 :   jresult = (jint)result; 
    3255           0 :   return jresult;
    3256             : }
    3257             : 
    3258             : 
    3259           1 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetAxisOrientation(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jint jarg3) {
    3260           1 :   jint jresult = 0 ;
    3261           1 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3262           1 :   char *arg2 = (char *) 0 ;
    3263             :   int arg3 ;
    3264             :   OGRAxisOrientation result;
    3265             :   
    3266             :   (void)jenv;
    3267             :   (void)jcls;
    3268             :   (void)jarg1_;
    3269           1 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3270           1 :   arg2 = 0;
    3271           1 :   if (jarg2) {
    3272           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    3273           0 :     if (!arg2) return 0;
    3274             :   }
    3275           1 :   arg3 = (int)jarg3; 
    3276           1 :   result = (OGRAxisOrientation)OSRSpatialReferenceShadow_GetAxisOrientation(arg1,(char const *)arg2,arg3);
    3277           1 :   jresult = (jint)result; 
    3278           1 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    3279           1 :   return jresult;
    3280             : }
    3281             : 
    3282             : 
    3283           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetAxisMappingStrategy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    3284           0 :   jint jresult = 0 ;
    3285           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3286             :   OSRAxisMappingStrategy result;
    3287             :   
    3288             :   (void)jenv;
    3289             :   (void)jcls;
    3290             :   (void)jarg1_;
    3291           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3292           0 :   result = (OSRAxisMappingStrategy)OSRSpatialReferenceShadow_GetAxisMappingStrategy(arg1);
    3293           0 :   jresult = (jint)result; 
    3294           0 :   return jresult;
    3295             : }
    3296             : 
    3297             : 
    3298           2 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetAxisMappingStrategy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    3299           2 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3300             :   OSRAxisMappingStrategy arg2 ;
    3301             :   
    3302             :   (void)jenv;
    3303             :   (void)jcls;
    3304             :   (void)jarg1_;
    3305           2 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3306           2 :   arg2 = (OSRAxisMappingStrategy)jarg2; 
    3307           2 :   OSRSpatialReferenceShadow_SetAxisMappingStrategy(arg1,arg2);
    3308           2 : }
    3309             : 
    3310             : 
    3311           0 : SWIGEXPORT jintArray JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetDataAxisToSRSAxisMapping(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jlong jarg3) {
    3312           0 :   jintArray jresult = 0 ;
    3313           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3314           0 :   int *arg2 = (int *) 0 ;
    3315           0 :   int **arg3 = (int **) 0 ;
    3316             :   retIntArray result;
    3317             :   
    3318             :   (void)jenv;
    3319             :   (void)jcls;
    3320             :   (void)jarg1_;
    3321           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3322           0 :   arg2 = *(int **)&jarg2; 
    3323           0 :   arg3 = *(int ***)&jarg3; 
    3324           0 :   result = OSRSpatialReferenceShadow_GetDataAxisToSRSAxisMapping(arg1,arg2,(int const **)arg3);
    3325             :   {
    3326             :     /* %typemap(out) (retIntArray) */
    3327             :   }
    3328           0 :   return jresult;
    3329             : }
    3330             : 
    3331             : 
    3332           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetDataAxisToSRSAxisMapping(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jintArray jarg2) {
    3333           0 :   jint jresult = 0 ;
    3334           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3335             :   int arg2 ;
    3336           0 :   int *arg3 = (int *) 0 ;
    3337             :   OGRErr result;
    3338             :   
    3339             :   (void)jenv;
    3340             :   (void)jcls;
    3341             :   (void)jarg1_;
    3342           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3343             :   {
    3344             :     /* %typemap(in) (int nList, int* pList) */
    3345             :     /* check if is List */
    3346           0 :     if (jarg2)
    3347             :     {
    3348           0 :       arg2 = jenv->GetArrayLength(jarg2);
    3349           0 :       if (arg2 == 0)
    3350           0 :       arg3 = NULL;
    3351             :       else
    3352           0 :       arg3 = (int *)jenv->GetIntArrayElements(jarg2, NULL);
    3353             :     }
    3354             :     else
    3355             :     {
    3356           0 :       arg2 = 0;
    3357           0 :       arg3 = NULL;
    3358             :     }
    3359             :   }
    3360           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetDataAxisToSRSAxisMapping(arg1,arg2,arg3);
    3361             :   {
    3362             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    3363           0 :     if (result != 0 && bUseExceptions) {
    3364           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    3365             :         OGRErrMessages(result));
    3366           0 :       return 0;
    3367             :     }
    3368           0 :     jresult = (jint)result;
    3369             :   }
    3370             :   {
    3371             :     /* %typemap(argout) (int nList, int* pList) */
    3372             :   }
    3373             :   {
    3374             :     /* %typemap(freearg) (int nList, int* pList) */
    3375           0 :     if (arg3) {
    3376           0 :       jenv->ReleaseIntArrayElements(jarg2, (jint*)arg3, JNI_ABORT);
    3377             :     }
    3378             :   }
    3379             :   {
    3380             :     /* %typemap(ret) OGRErr */
    3381             :   }
    3382           0 :   return jresult;
    3383             : }
    3384             : 
    3385             : 
    3386           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetUTM_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3) {
    3387           0 :   jint jresult = 0 ;
    3388           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3389             :   int arg2 ;
    3390             :   int arg3 ;
    3391             :   OGRErr result;
    3392             :   
    3393             :   (void)jenv;
    3394             :   (void)jcls;
    3395             :   (void)jarg1_;
    3396           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3397           0 :   arg2 = (int)jarg2; 
    3398           0 :   arg3 = (int)jarg3; 
    3399           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetUTM__SWIG_0(arg1,arg2,arg3);
    3400             :   {
    3401             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    3402           0 :     if (result != 0 && bUseExceptions) {
    3403           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    3404             :         OGRErrMessages(result));
    3405           0 :       return 0;
    3406             :     }
    3407           0 :     jresult = (jint)result;
    3408             :   }
    3409             :   {
    3410             :     /* %typemap(ret) OGRErr */
    3411             :   }
    3412           0 :   return jresult;
    3413             : }
    3414             : 
    3415             : 
    3416           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetUTM_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    3417           0 :   jint jresult = 0 ;
    3418           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3419             :   int arg2 ;
    3420             :   OGRErr result;
    3421             :   
    3422             :   (void)jenv;
    3423             :   (void)jcls;
    3424             :   (void)jarg1_;
    3425           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3426           0 :   arg2 = (int)jarg2; 
    3427           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetUTM__SWIG_0(arg1,arg2);
    3428             :   {
    3429             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    3430           0 :     if (result != 0 && bUseExceptions) {
    3431           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    3432             :         OGRErrMessages(result));
    3433           0 :       return 0;
    3434             :     }
    3435           0 :     jresult = (jint)result;
    3436             :   }
    3437             :   {
    3438             :     /* %typemap(ret) OGRErr */
    3439             :   }
    3440           0 :   return jresult;
    3441             : }
    3442             : 
    3443             : 
    3444           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetUTMZone(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    3445           0 :   jint jresult = 0 ;
    3446           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3447             :   int result;
    3448             :   
    3449             :   (void)jenv;
    3450             :   (void)jcls;
    3451             :   (void)jarg1_;
    3452           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3453           0 :   result = (int)OSRSpatialReferenceShadow_GetUTMZone(arg1);
    3454           0 :   jresult = (jint)result; 
    3455           0 :   return jresult;
    3456             : }
    3457             : 
    3458             : 
    3459           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetStatePlane_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jstring jarg4, jdouble jarg5) {
    3460           0 :   jint jresult = 0 ;
    3461           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3462             :   int arg2 ;
    3463             :   int arg3 ;
    3464           0 :   char *arg4 = (char *) 0 ;
    3465             :   double arg5 ;
    3466             :   OGRErr result;
    3467             :   
    3468             :   (void)jenv;
    3469             :   (void)jcls;
    3470             :   (void)jarg1_;
    3471           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3472           0 :   arg2 = (int)jarg2; 
    3473           0 :   arg3 = (int)jarg3; 
    3474           0 :   arg4 = 0;
    3475           0 :   if (jarg4) {
    3476           0 :     arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
    3477           0 :     if (!arg4) return 0;
    3478             :   }
    3479           0 :   arg5 = (double)jarg5; 
    3480           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetStatePlane__SWIG_0(arg1,arg2,arg3,(char const *)arg4,arg5);
    3481             :   {
    3482             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    3483           0 :     if (result != 0 && bUseExceptions) {
    3484           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    3485             :         OGRErrMessages(result));
    3486           0 :       return 0;
    3487             :     }
    3488           0 :     jresult = (jint)result;
    3489             :   }
    3490           0 :   if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
    3491             :   {
    3492             :     /* %typemap(ret) OGRErr */
    3493             :   }
    3494           0 :   return jresult;
    3495             : }
    3496             : 
    3497             : 
    3498           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetStatePlane_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jstring jarg4) {
    3499           0 :   jint jresult = 0 ;
    3500           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3501             :   int arg2 ;
    3502             :   int arg3 ;
    3503           0 :   char *arg4 = (char *) 0 ;
    3504             :   OGRErr result;
    3505             :   
    3506             :   (void)jenv;
    3507             :   (void)jcls;
    3508             :   (void)jarg1_;
    3509           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3510           0 :   arg2 = (int)jarg2; 
    3511           0 :   arg3 = (int)jarg3; 
    3512           0 :   arg4 = 0;
    3513           0 :   if (jarg4) {
    3514           0 :     arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
    3515           0 :     if (!arg4) return 0;
    3516             :   }
    3517           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetStatePlane__SWIG_0(arg1,arg2,arg3,(char const *)arg4);
    3518             :   {
    3519             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    3520           0 :     if (result != 0 && bUseExceptions) {
    3521           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    3522             :         OGRErrMessages(result));
    3523           0 :       return 0;
    3524             :     }
    3525           0 :     jresult = (jint)result;
    3526             :   }
    3527           0 :   if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
    3528             :   {
    3529             :     /* %typemap(ret) OGRErr */
    3530             :   }
    3531           0 :   return jresult;
    3532             : }
    3533             : 
    3534             : 
    3535           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetStatePlane_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3) {
    3536           0 :   jint jresult = 0 ;
    3537           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3538             :   int arg2 ;
    3539             :   int arg3 ;
    3540             :   OGRErr result;
    3541             :   
    3542             :   (void)jenv;
    3543             :   (void)jcls;
    3544             :   (void)jarg1_;
    3545           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3546           0 :   arg2 = (int)jarg2; 
    3547           0 :   arg3 = (int)jarg3; 
    3548           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetStatePlane__SWIG_0(arg1,arg2,arg3);
    3549             :   {
    3550             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    3551           0 :     if (result != 0 && bUseExceptions) {
    3552           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    3553             :         OGRErrMessages(result));
    3554           0 :       return 0;
    3555             :     }
    3556           0 :     jresult = (jint)result;
    3557             :   }
    3558             :   {
    3559             :     /* %typemap(ret) OGRErr */
    3560             :   }
    3561           0 :   return jresult;
    3562             : }
    3563             : 
    3564             : 
    3565           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetStatePlane_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    3566           0 :   jint jresult = 0 ;
    3567           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3568             :   int arg2 ;
    3569             :   OGRErr result;
    3570             :   
    3571             :   (void)jenv;
    3572             :   (void)jcls;
    3573             :   (void)jarg1_;
    3574           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3575           0 :   arg2 = (int)jarg2; 
    3576           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetStatePlane__SWIG_0(arg1,arg2);
    3577             :   {
    3578             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    3579           0 :     if (result != 0 && bUseExceptions) {
    3580           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    3581             :         OGRErrMessages(result));
    3582           0 :       return 0;
    3583             :     }
    3584           0 :     jresult = (jint)result;
    3585             :   }
    3586             :   {
    3587             :     /* %typemap(ret) OGRErr */
    3588             :   }
    3589           0 :   return jresult;
    3590             : }
    3591             : 
    3592             : 
    3593           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1AutoIdentifyEPSG(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    3594           0 :   jint jresult = 0 ;
    3595           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3596             :   OGRErr result;
    3597             :   
    3598             :   (void)jenv;
    3599             :   (void)jcls;
    3600             :   (void)jarg1_;
    3601           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3602           0 :   result = (OGRErr)OSRSpatialReferenceShadow_AutoIdentifyEPSG(arg1);
    3603             :   {
    3604             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    3605           0 :     if (result != 0 && bUseExceptions) {
    3606           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    3607             :         OGRErrMessages(result));
    3608           0 :       return 0;
    3609             :     }
    3610           0 :     jresult = (jint)result;
    3611             :   }
    3612             :   {
    3613             :     /* %typemap(ret) OGRErr */
    3614             :   }
    3615           0 :   return jresult;
    3616             : }
    3617             : 
    3618             : 
    3619           1 : SWIGEXPORT jobjectArray JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1FindMatches(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobject jarg2, jobjectArray jarg3) {
    3620           1 :   jobjectArray jresult = 0 ;
    3621           1 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3622           1 :   char **arg2 = (char **) 0 ;
    3623           1 :   int *arg3 = (int *) 0 ;
    3624           1 :   int **arg4 = (int **) 0 ;
    3625           1 :   int nLen3 = 0 ;
    3626           1 :   int *pBuf3 = NULL ;
    3627           1 :   OSRSpatialReferenceShadow **result = 0 ;
    3628             :   
    3629             :   (void)jenv;
    3630             :   (void)jcls;
    3631             :   (void)jarg1_;
    3632           1 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3633             :   {
    3634             :     /* %typemap(in) char **options */
    3635           1 :     arg2 = NULL;
    3636           1 :     if(jarg2 != 0) {
    3637           0 :       const jclass vector = jenv->FindClass("java/util/Vector");
    3638           0 :       const jclass enumeration = jenv->FindClass("java/util/Enumeration");
    3639           0 :       const jclass stringClass = jenv->FindClass("java/lang/String");
    3640           0 :       const jmethodID elements = jenv->GetMethodID(vector, "elements",
    3641             :         "()Ljava/util/Enumeration;");
    3642           0 :       const jmethodID hasMoreElements = jenv->GetMethodID(enumeration,
    3643             :         "hasMoreElements", "()Z");
    3644           0 :       const jmethodID getNextElement = jenv->GetMethodID(enumeration,
    3645             :         "nextElement", "()Ljava/lang/Object;");
    3646           0 :       if(vector == NULL || enumeration == NULL || elements == NULL ||
    3647           0 :         hasMoreElements == NULL || getNextElement == NULL) {
    3648           0 :         fprintf(stderr, "Could not load (options **) jni types.\n");
    3649           0 :         return 0;
    3650             :       }
    3651           0 :       for (jobject keys = jenv->CallObjectMethod(jarg2, elements);
    3652           0 :         jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
    3653           0 :         jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
    3654           0 :         if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
    3655             :         {
    3656           0 :           CSLDestroy(arg2);
    3657           0 :           SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
    3658           0 :           return 0;
    3659             :         }
    3660           0 :         const char *valptr = jenv->GetStringUTFChars(value, 0);
    3661           0 :         arg2 = CSLAddString(arg2,  valptr);
    3662           0 :         jenv->ReleaseStringUTFChars(value, valptr);
    3663             :       }
    3664             :     }
    3665             :   }
    3666             :   {
    3667             :     /* %typemap(in) (int* pnList, int** ppListOut) */
    3668           1 :     arg3 = &nLen3;
    3669           1 :     arg4 = &pBuf3;
    3670             :   }
    3671           1 :   result = (OSRSpatialReferenceShadow **)OSRSpatialReferenceShadow_FindMatches(arg1,arg2,arg3,arg4);
    3672             :   {
    3673             :     /* %typemap(out) (OSRSpatialReferenceShadow**) -- builds the returned SpatialReference[] */
    3674             :     /* nLen3 is hardcoded, $argnum is not useful in out typemaps.
    3675             :          nLen was declared under the separate typemap (argument
    3676             :          position 3). If FindMatches's parameter order ever
    3677             :          changes, re-check the generated osr_wrap.cpp and update this suffix
    3678             :          to match. */
    3679           1 :     const jclass srsClass = jenv->FindClass("org/gdal/osr/SpatialReference");
    3680           1 :     const jmethodID srsCtor = jenv->GetMethodID(srsClass, "<init>", "(JZ)V");
    3681             :     
    3682           1 :     jresult = jenv->NewObjectArray(nLen3, srsClass, NULL);
    3683           2 :     for (int i = 0; i < nLen3; i++) {
    3684           1 :       OSRReference(result[i]);
    3685           1 :       jobject srsObj = jenv->NewObject(srsClass, srsCtor, (jlong)result[i], (jboolean)true);
    3686           1 :       jenv->SetObjectArrayElement(jresult, i, srsObj);
    3687           1 :       jenv->DeleteLocalRef(srsObj);
    3688             :     }
    3689           1 :     OSRFreeSRSArray(result);
    3690             :   }
    3691             :   {
    3692             :     /* %typemap(argout) (int* pnList, int** ppListOut) */
    3693           1 :     if(jarg3 && jenv->GetArrayLength(jarg3) >= 1)
    3694             :     {
    3695           1 :       jintArray intArray = jenv->NewIntArray(nLen3);
    3696           1 :       jenv->SetIntArrayRegion(intArray, (jsize)0, (jsize)nLen3, (jint*)pBuf3);
    3697           1 :       jenv->SetObjectArrayElement(jarg3,0,intArray);
    3698           1 :       jenv->DeleteLocalRef(intArray);
    3699             :     }
    3700           1 :     CPLFree(pBuf3);
    3701             :   }
    3702             :   {
    3703             :     /* %typemap(freearg) char **options */
    3704           1 :     CSLDestroy( arg2 );
    3705             :   }
    3706             :   {
    3707             :     /* %typemap(freearg) (int* pnList, int** ppListOut) */
    3708             :   }
    3709           1 :   return jresult;
    3710             : }
    3711             : 
    3712             : 
    3713           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetProjection(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    3714           0 :   jint jresult = 0 ;
    3715           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3716           0 :   char *arg2 = (char *) 0 ;
    3717             :   OGRErr result;
    3718             :   
    3719             :   (void)jenv;
    3720             :   (void)jcls;
    3721             :   (void)jarg1_;
    3722           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3723           0 :   arg2 = 0;
    3724           0 :   if (jarg2) {
    3725           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    3726           0 :     if (!arg2) return 0;
    3727             :   }
    3728           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetProjection(arg1,(char const *)arg2);
    3729             :   {
    3730             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    3731           0 :     if (result != 0 && bUseExceptions) {
    3732           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    3733             :         OGRErrMessages(result));
    3734           0 :       return 0;
    3735             :     }
    3736           0 :     jresult = (jint)result;
    3737             :   }
    3738           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    3739             :   {
    3740             :     /* %typemap(ret) OGRErr */
    3741             :   }
    3742           0 :   return jresult;
    3743             : }
    3744             : 
    3745             : 
    3746           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetProjParm(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jdouble jarg3) {
    3747           0 :   jint jresult = 0 ;
    3748           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3749           0 :   char *arg2 = (char *) 0 ;
    3750             :   double arg3 ;
    3751             :   OGRErr result;
    3752             :   
    3753             :   (void)jenv;
    3754             :   (void)jcls;
    3755             :   (void)jarg1_;
    3756           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3757           0 :   arg2 = 0;
    3758           0 :   if (jarg2) {
    3759           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    3760           0 :     if (!arg2) return 0;
    3761             :   }
    3762           0 :   arg3 = (double)jarg3; 
    3763             :   {
    3764           0 :     if (!arg2) {
    3765             :       {
    3766           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    3767             :       };
    3768             :     }
    3769             :   }
    3770           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetProjParm(arg1,(char const *)arg2,arg3);
    3771             :   {
    3772             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    3773           0 :     if (result != 0 && bUseExceptions) {
    3774           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    3775             :         OGRErrMessages(result));
    3776           0 :       return 0;
    3777             :     }
    3778           0 :     jresult = (jint)result;
    3779             :   }
    3780           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    3781             :   {
    3782             :     /* %typemap(ret) OGRErr */
    3783             :   }
    3784           0 :   return jresult;
    3785             : }
    3786             : 
    3787             : 
    3788           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetProjParm_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jdouble jarg3) {
    3789           0 :   jdouble jresult = 0 ;
    3790           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3791           0 :   char *arg2 = (char *) 0 ;
    3792             :   double arg3 ;
    3793             :   double result;
    3794             :   
    3795             :   (void)jenv;
    3796             :   (void)jcls;
    3797             :   (void)jarg1_;
    3798           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3799           0 :   arg2 = 0;
    3800           0 :   if (jarg2) {
    3801           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    3802           0 :     if (!arg2) return 0;
    3803             :   }
    3804           0 :   arg3 = (double)jarg3; 
    3805             :   {
    3806           0 :     if (!arg2) {
    3807             :       {
    3808           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    3809             :       };
    3810             :     }
    3811             :   }
    3812           0 :   result = (double)OSRSpatialReferenceShadow_GetProjParm__SWIG_0(arg1,(char const *)arg2,arg3);
    3813           0 :   jresult = (jdouble)result; 
    3814           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    3815           0 :   return jresult;
    3816             : }
    3817             : 
    3818             : 
    3819           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetProjParm_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    3820           0 :   jdouble jresult = 0 ;
    3821           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3822           0 :   char *arg2 = (char *) 0 ;
    3823             :   double result;
    3824             :   
    3825             :   (void)jenv;
    3826             :   (void)jcls;
    3827             :   (void)jarg1_;
    3828           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3829           0 :   arg2 = 0;
    3830           0 :   if (jarg2) {
    3831           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    3832           0 :     if (!arg2) return 0;
    3833             :   }
    3834             :   {
    3835           0 :     if (!arg2) {
    3836             :       {
    3837           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    3838             :       };
    3839             :     }
    3840             :   }
    3841           0 :   result = (double)OSRSpatialReferenceShadow_GetProjParm__SWIG_0(arg1,(char const *)arg2);
    3842           0 :   jresult = (jdouble)result; 
    3843           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    3844           0 :   return jresult;
    3845             : }
    3846             : 
    3847             : 
    3848           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetNormProjParm(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jdouble jarg3) {
    3849           0 :   jint jresult = 0 ;
    3850           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3851           0 :   char *arg2 = (char *) 0 ;
    3852             :   double arg3 ;
    3853             :   OGRErr result;
    3854             :   
    3855             :   (void)jenv;
    3856             :   (void)jcls;
    3857             :   (void)jarg1_;
    3858           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3859           0 :   arg2 = 0;
    3860           0 :   if (jarg2) {
    3861           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    3862           0 :     if (!arg2) return 0;
    3863             :   }
    3864           0 :   arg3 = (double)jarg3; 
    3865             :   {
    3866           0 :     if (!arg2) {
    3867             :       {
    3868           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    3869             :       };
    3870             :     }
    3871             :   }
    3872           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetNormProjParm(arg1,(char const *)arg2,arg3);
    3873             :   {
    3874             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    3875           0 :     if (result != 0 && bUseExceptions) {
    3876           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    3877             :         OGRErrMessages(result));
    3878           0 :       return 0;
    3879             :     }
    3880           0 :     jresult = (jint)result;
    3881             :   }
    3882           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    3883             :   {
    3884             :     /* %typemap(ret) OGRErr */
    3885             :   }
    3886           0 :   return jresult;
    3887             : }
    3888             : 
    3889             : 
    3890           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetNormProjParm_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jdouble jarg3) {
    3891           0 :   jdouble jresult = 0 ;
    3892           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3893           0 :   char *arg2 = (char *) 0 ;
    3894             :   double arg3 ;
    3895             :   double result;
    3896             :   
    3897             :   (void)jenv;
    3898             :   (void)jcls;
    3899             :   (void)jarg1_;
    3900           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3901           0 :   arg2 = 0;
    3902           0 :   if (jarg2) {
    3903           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    3904           0 :     if (!arg2) return 0;
    3905             :   }
    3906           0 :   arg3 = (double)jarg3; 
    3907             :   {
    3908           0 :     if (!arg2) {
    3909             :       {
    3910           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    3911             :       };
    3912             :     }
    3913             :   }
    3914           0 :   result = (double)OSRSpatialReferenceShadow_GetNormProjParm__SWIG_0(arg1,(char const *)arg2,arg3);
    3915           0 :   jresult = (jdouble)result; 
    3916           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    3917           0 :   return jresult;
    3918             : }
    3919             : 
    3920             : 
    3921           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetNormProjParm_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    3922           0 :   jdouble jresult = 0 ;
    3923           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3924           0 :   char *arg2 = (char *) 0 ;
    3925             :   double result;
    3926             :   
    3927             :   (void)jenv;
    3928             :   (void)jcls;
    3929             :   (void)jarg1_;
    3930           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3931           0 :   arg2 = 0;
    3932           0 :   if (jarg2) {
    3933           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    3934           0 :     if (!arg2) return 0;
    3935             :   }
    3936             :   {
    3937           0 :     if (!arg2) {
    3938             :       {
    3939           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    3940             :       };
    3941             :     }
    3942             :   }
    3943           0 :   result = (double)OSRSpatialReferenceShadow_GetNormProjParm__SWIG_0(arg1,(char const *)arg2);
    3944           0 :   jresult = (jdouble)result; 
    3945           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    3946           0 :   return jresult;
    3947             : }
    3948             : 
    3949             : 
    3950           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetSemiMajor(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    3951           0 :   jdouble jresult = 0 ;
    3952           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3953             :   double result;
    3954             :   
    3955             :   (void)jenv;
    3956             :   (void)jcls;
    3957             :   (void)jarg1_;
    3958           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3959           0 :   result = (double)OSRSpatialReferenceShadow_GetSemiMajor(arg1);
    3960           0 :   jresult = (jdouble)result; 
    3961           0 :   return jresult;
    3962             : }
    3963             : 
    3964             : 
    3965           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetSemiMinor(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    3966           0 :   jdouble jresult = 0 ;
    3967           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3968             :   double result;
    3969             :   
    3970             :   (void)jenv;
    3971             :   (void)jcls;
    3972             :   (void)jarg1_;
    3973           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3974           0 :   result = (double)OSRSpatialReferenceShadow_GetSemiMinor(arg1);
    3975           0 :   jresult = (jdouble)result; 
    3976           0 :   return jresult;
    3977             : }
    3978             : 
    3979             : 
    3980           0 : SWIGEXPORT jdouble JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetInvFlattening(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    3981           0 :   jdouble jresult = 0 ;
    3982           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3983             :   double result;
    3984             :   
    3985             :   (void)jenv;
    3986             :   (void)jcls;
    3987             :   (void)jarg1_;
    3988           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    3989           0 :   result = (double)OSRSpatialReferenceShadow_GetInvFlattening(arg1);
    3990           0 :   jresult = (jdouble)result; 
    3991           0 :   return jresult;
    3992             : }
    3993             : 
    3994             : 
    3995           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetACEA(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6, jdouble jarg7) {
    3996           0 :   jint jresult = 0 ;
    3997           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    3998             :   double arg2 ;
    3999             :   double arg3 ;
    4000             :   double arg4 ;
    4001             :   double arg5 ;
    4002             :   double arg6 ;
    4003             :   double arg7 ;
    4004             :   OGRErr result;
    4005             :   
    4006             :   (void)jenv;
    4007             :   (void)jcls;
    4008             :   (void)jarg1_;
    4009           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4010           0 :   arg2 = (double)jarg2; 
    4011           0 :   arg3 = (double)jarg3; 
    4012           0 :   arg4 = (double)jarg4; 
    4013           0 :   arg5 = (double)jarg5; 
    4014           0 :   arg6 = (double)jarg6; 
    4015           0 :   arg7 = (double)jarg7; 
    4016           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetACEA(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
    4017             :   {
    4018             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4019           0 :     if (result != 0 && bUseExceptions) {
    4020           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4021             :         OGRErrMessages(result));
    4022           0 :       return 0;
    4023             :     }
    4024           0 :     jresult = (jint)result;
    4025             :   }
    4026             :   {
    4027             :     /* %typemap(ret) OGRErr */
    4028             :   }
    4029           0 :   return jresult;
    4030             : }
    4031             : 
    4032             : 
    4033           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetAE(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    4034           0 :   jint jresult = 0 ;
    4035           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4036             :   double arg2 ;
    4037             :   double arg3 ;
    4038             :   double arg4 ;
    4039             :   double arg5 ;
    4040             :   OGRErr result;
    4041             :   
    4042             :   (void)jenv;
    4043             :   (void)jcls;
    4044             :   (void)jarg1_;
    4045           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4046           0 :   arg2 = (double)jarg2; 
    4047           0 :   arg3 = (double)jarg3; 
    4048           0 :   arg4 = (double)jarg4; 
    4049           0 :   arg5 = (double)jarg5; 
    4050           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetAE(arg1,arg2,arg3,arg4,arg5);
    4051             :   {
    4052             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4053           0 :     if (result != 0 && bUseExceptions) {
    4054           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4055             :         OGRErrMessages(result));
    4056           0 :       return 0;
    4057             :     }
    4058           0 :     jresult = (jint)result;
    4059             :   }
    4060             :   {
    4061             :     /* %typemap(ret) OGRErr */
    4062             :   }
    4063           0 :   return jresult;
    4064             : }
    4065             : 
    4066             : 
    4067           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetBonne(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    4068           0 :   jint jresult = 0 ;
    4069           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4070             :   double arg2 ;
    4071             :   double arg3 ;
    4072             :   double arg4 ;
    4073             :   double arg5 ;
    4074             :   OGRErr result;
    4075             :   
    4076             :   (void)jenv;
    4077             :   (void)jcls;
    4078             :   (void)jarg1_;
    4079           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4080           0 :   arg2 = (double)jarg2; 
    4081           0 :   arg3 = (double)jarg3; 
    4082           0 :   arg4 = (double)jarg4; 
    4083           0 :   arg5 = (double)jarg5; 
    4084           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetBonne(arg1,arg2,arg3,arg4,arg5);
    4085             :   {
    4086             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4087           0 :     if (result != 0 && bUseExceptions) {
    4088           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4089             :         OGRErrMessages(result));
    4090           0 :       return 0;
    4091             :     }
    4092           0 :     jresult = (jint)result;
    4093             :   }
    4094             :   {
    4095             :     /* %typemap(ret) OGRErr */
    4096             :   }
    4097           0 :   return jresult;
    4098             : }
    4099             : 
    4100             : 
    4101           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetCEA(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    4102           0 :   jint jresult = 0 ;
    4103           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4104             :   double arg2 ;
    4105             :   double arg3 ;
    4106             :   double arg4 ;
    4107             :   double arg5 ;
    4108             :   OGRErr result;
    4109             :   
    4110             :   (void)jenv;
    4111             :   (void)jcls;
    4112             :   (void)jarg1_;
    4113           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4114           0 :   arg2 = (double)jarg2; 
    4115           0 :   arg3 = (double)jarg3; 
    4116           0 :   arg4 = (double)jarg4; 
    4117           0 :   arg5 = (double)jarg5; 
    4118           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetCEA(arg1,arg2,arg3,arg4,arg5);
    4119             :   {
    4120             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4121           0 :     if (result != 0 && bUseExceptions) {
    4122           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4123             :         OGRErrMessages(result));
    4124           0 :       return 0;
    4125             :     }
    4126           0 :     jresult = (jint)result;
    4127             :   }
    4128             :   {
    4129             :     /* %typemap(ret) OGRErr */
    4130             :   }
    4131           0 :   return jresult;
    4132             : }
    4133             : 
    4134             : 
    4135           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetCS(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    4136           0 :   jint jresult = 0 ;
    4137           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4138             :   double arg2 ;
    4139             :   double arg3 ;
    4140             :   double arg4 ;
    4141             :   double arg5 ;
    4142             :   OGRErr result;
    4143             :   
    4144             :   (void)jenv;
    4145             :   (void)jcls;
    4146             :   (void)jarg1_;
    4147           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4148           0 :   arg2 = (double)jarg2; 
    4149           0 :   arg3 = (double)jarg3; 
    4150           0 :   arg4 = (double)jarg4; 
    4151           0 :   arg5 = (double)jarg5; 
    4152           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetCS(arg1,arg2,arg3,arg4,arg5);
    4153             :   {
    4154             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4155           0 :     if (result != 0 && bUseExceptions) {
    4156           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4157             :         OGRErrMessages(result));
    4158           0 :       return 0;
    4159             :     }
    4160           0 :     jresult = (jint)result;
    4161             :   }
    4162             :   {
    4163             :     /* %typemap(ret) OGRErr */
    4164             :   }
    4165           0 :   return jresult;
    4166             : }
    4167             : 
    4168             : 
    4169           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetEC(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6, jdouble jarg7) {
    4170           0 :   jint jresult = 0 ;
    4171           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4172             :   double arg2 ;
    4173             :   double arg3 ;
    4174             :   double arg4 ;
    4175             :   double arg5 ;
    4176             :   double arg6 ;
    4177             :   double arg7 ;
    4178             :   OGRErr result;
    4179             :   
    4180             :   (void)jenv;
    4181             :   (void)jcls;
    4182             :   (void)jarg1_;
    4183           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4184           0 :   arg2 = (double)jarg2; 
    4185           0 :   arg3 = (double)jarg3; 
    4186           0 :   arg4 = (double)jarg4; 
    4187           0 :   arg5 = (double)jarg5; 
    4188           0 :   arg6 = (double)jarg6; 
    4189           0 :   arg7 = (double)jarg7; 
    4190           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetEC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
    4191             :   {
    4192             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4193           0 :     if (result != 0 && bUseExceptions) {
    4194           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4195             :         OGRErrMessages(result));
    4196           0 :       return 0;
    4197             :     }
    4198           0 :     jresult = (jint)result;
    4199             :   }
    4200             :   {
    4201             :     /* %typemap(ret) OGRErr */
    4202             :   }
    4203           0 :   return jresult;
    4204             : }
    4205             : 
    4206             : 
    4207           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetEckertIV(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4) {
    4208           0 :   jint jresult = 0 ;
    4209           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4210             :   double arg2 ;
    4211             :   double arg3 ;
    4212             :   double arg4 ;
    4213             :   OGRErr result;
    4214             :   
    4215             :   (void)jenv;
    4216             :   (void)jcls;
    4217             :   (void)jarg1_;
    4218           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4219           0 :   arg2 = (double)jarg2; 
    4220           0 :   arg3 = (double)jarg3; 
    4221           0 :   arg4 = (double)jarg4; 
    4222           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetEckertIV(arg1,arg2,arg3,arg4);
    4223             :   {
    4224             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4225           0 :     if (result != 0 && bUseExceptions) {
    4226           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4227             :         OGRErrMessages(result));
    4228           0 :       return 0;
    4229             :     }
    4230           0 :     jresult = (jint)result;
    4231             :   }
    4232             :   {
    4233             :     /* %typemap(ret) OGRErr */
    4234             :   }
    4235           0 :   return jresult;
    4236             : }
    4237             : 
    4238             : 
    4239           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetEckertVI(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4) {
    4240           0 :   jint jresult = 0 ;
    4241           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4242             :   double arg2 ;
    4243             :   double arg3 ;
    4244             :   double arg4 ;
    4245             :   OGRErr result;
    4246             :   
    4247             :   (void)jenv;
    4248             :   (void)jcls;
    4249             :   (void)jarg1_;
    4250           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4251           0 :   arg2 = (double)jarg2; 
    4252           0 :   arg3 = (double)jarg3; 
    4253           0 :   arg4 = (double)jarg4; 
    4254           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetEckertVI(arg1,arg2,arg3,arg4);
    4255             :   {
    4256             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4257           0 :     if (result != 0 && bUseExceptions) {
    4258           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4259             :         OGRErrMessages(result));
    4260           0 :       return 0;
    4261             :     }
    4262           0 :     jresult = (jint)result;
    4263             :   }
    4264             :   {
    4265             :     /* %typemap(ret) OGRErr */
    4266             :   }
    4267           0 :   return jresult;
    4268             : }
    4269             : 
    4270             : 
    4271           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetEquirectangular(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    4272           0 :   jint jresult = 0 ;
    4273           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4274             :   double arg2 ;
    4275             :   double arg3 ;
    4276             :   double arg4 ;
    4277             :   double arg5 ;
    4278             :   OGRErr result;
    4279             :   
    4280             :   (void)jenv;
    4281             :   (void)jcls;
    4282             :   (void)jarg1_;
    4283           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4284           0 :   arg2 = (double)jarg2; 
    4285           0 :   arg3 = (double)jarg3; 
    4286           0 :   arg4 = (double)jarg4; 
    4287           0 :   arg5 = (double)jarg5; 
    4288           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular(arg1,arg2,arg3,arg4,arg5);
    4289             :   {
    4290             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4291           0 :     if (result != 0 && bUseExceptions) {
    4292           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4293             :         OGRErrMessages(result));
    4294           0 :       return 0;
    4295             :     }
    4296           0 :     jresult = (jint)result;
    4297             :   }
    4298             :   {
    4299             :     /* %typemap(ret) OGRErr */
    4300             :   }
    4301           0 :   return jresult;
    4302             : }
    4303             : 
    4304             : 
    4305           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetEquirectangular2(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6) {
    4306           0 :   jint jresult = 0 ;
    4307           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4308             :   double arg2 ;
    4309             :   double arg3 ;
    4310             :   double arg4 ;
    4311             :   double arg5 ;
    4312             :   double arg6 ;
    4313             :   OGRErr result;
    4314             :   
    4315             :   (void)jenv;
    4316             :   (void)jcls;
    4317             :   (void)jarg1_;
    4318           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4319           0 :   arg2 = (double)jarg2; 
    4320           0 :   arg3 = (double)jarg3; 
    4321           0 :   arg4 = (double)jarg4; 
    4322           0 :   arg5 = (double)jarg5; 
    4323           0 :   arg6 = (double)jarg6; 
    4324           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular2(arg1,arg2,arg3,arg4,arg5,arg6);
    4325             :   {
    4326             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4327           0 :     if (result != 0 && bUseExceptions) {
    4328           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4329             :         OGRErrMessages(result));
    4330           0 :       return 0;
    4331             :     }
    4332           0 :     jresult = (jint)result;
    4333             :   }
    4334             :   {
    4335             :     /* %typemap(ret) OGRErr */
    4336             :   }
    4337           0 :   return jresult;
    4338             : }
    4339             : 
    4340             : 
    4341           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetGaussSchreiberTMercator(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6) {
    4342           0 :   jint jresult = 0 ;
    4343           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4344             :   double arg2 ;
    4345             :   double arg3 ;
    4346             :   double arg4 ;
    4347             :   double arg5 ;
    4348             :   double arg6 ;
    4349             :   OGRErr result;
    4350             :   
    4351             :   (void)jenv;
    4352             :   (void)jcls;
    4353             :   (void)jarg1_;
    4354           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4355           0 :   arg2 = (double)jarg2; 
    4356           0 :   arg3 = (double)jarg3; 
    4357           0 :   arg4 = (double)jarg4; 
    4358           0 :   arg5 = (double)jarg5; 
    4359           0 :   arg6 = (double)jarg6; 
    4360           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(arg1,arg2,arg3,arg4,arg5,arg6);
    4361             :   {
    4362             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4363           0 :     if (result != 0 && bUseExceptions) {
    4364           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4365             :         OGRErrMessages(result));
    4366           0 :       return 0;
    4367             :     }
    4368           0 :     jresult = (jint)result;
    4369             :   }
    4370             :   {
    4371             :     /* %typemap(ret) OGRErr */
    4372             :   }
    4373           0 :   return jresult;
    4374             : }
    4375             : 
    4376             : 
    4377           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetGS(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4) {
    4378           0 :   jint jresult = 0 ;
    4379           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4380             :   double arg2 ;
    4381             :   double arg3 ;
    4382             :   double arg4 ;
    4383             :   OGRErr result;
    4384             :   
    4385             :   (void)jenv;
    4386             :   (void)jcls;
    4387             :   (void)jarg1_;
    4388           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4389           0 :   arg2 = (double)jarg2; 
    4390           0 :   arg3 = (double)jarg3; 
    4391           0 :   arg4 = (double)jarg4; 
    4392           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetGS(arg1,arg2,arg3,arg4);
    4393             :   {
    4394             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4395           0 :     if (result != 0 && bUseExceptions) {
    4396           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4397             :         OGRErrMessages(result));
    4398           0 :       return 0;
    4399             :     }
    4400           0 :     jresult = (jint)result;
    4401             :   }
    4402             :   {
    4403             :     /* %typemap(ret) OGRErr */
    4404             :   }
    4405           0 :   return jresult;
    4406             : }
    4407             : 
    4408             : 
    4409           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetGH(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4) {
    4410           0 :   jint jresult = 0 ;
    4411           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4412             :   double arg2 ;
    4413             :   double arg3 ;
    4414             :   double arg4 ;
    4415             :   OGRErr result;
    4416             :   
    4417             :   (void)jenv;
    4418             :   (void)jcls;
    4419             :   (void)jarg1_;
    4420           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4421           0 :   arg2 = (double)jarg2; 
    4422           0 :   arg3 = (double)jarg3; 
    4423           0 :   arg4 = (double)jarg4; 
    4424           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetGH(arg1,arg2,arg3,arg4);
    4425             :   {
    4426             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4427           0 :     if (result != 0 && bUseExceptions) {
    4428           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4429             :         OGRErrMessages(result));
    4430           0 :       return 0;
    4431             :     }
    4432           0 :     jresult = (jint)result;
    4433             :   }
    4434             :   {
    4435             :     /* %typemap(ret) OGRErr */
    4436             :   }
    4437           0 :   return jresult;
    4438             : }
    4439             : 
    4440             : 
    4441           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetIGH(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    4442           0 :   jint jresult = 0 ;
    4443           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4444             :   OGRErr result;
    4445             :   
    4446             :   (void)jenv;
    4447             :   (void)jcls;
    4448             :   (void)jarg1_;
    4449           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4450           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetIGH(arg1);
    4451             :   {
    4452             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4453           0 :     if (result != 0 && bUseExceptions) {
    4454           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4455             :         OGRErrMessages(result));
    4456           0 :       return 0;
    4457             :     }
    4458           0 :     jresult = (jint)result;
    4459             :   }
    4460             :   {
    4461             :     /* %typemap(ret) OGRErr */
    4462             :   }
    4463           0 :   return jresult;
    4464             : }
    4465             : 
    4466             : 
    4467           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetGEOS(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    4468           0 :   jint jresult = 0 ;
    4469           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4470             :   double arg2 ;
    4471             :   double arg3 ;
    4472             :   double arg4 ;
    4473             :   double arg5 ;
    4474             :   OGRErr result;
    4475             :   
    4476             :   (void)jenv;
    4477             :   (void)jcls;
    4478             :   (void)jarg1_;
    4479           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4480           0 :   arg2 = (double)jarg2; 
    4481           0 :   arg3 = (double)jarg3; 
    4482           0 :   arg4 = (double)jarg4; 
    4483           0 :   arg5 = (double)jarg5; 
    4484           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetGEOS(arg1,arg2,arg3,arg4,arg5);
    4485             :   {
    4486             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4487           0 :     if (result != 0 && bUseExceptions) {
    4488           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4489             :         OGRErrMessages(result));
    4490           0 :       return 0;
    4491             :     }
    4492           0 :     jresult = (jint)result;
    4493             :   }
    4494             :   {
    4495             :     /* %typemap(ret) OGRErr */
    4496             :   }
    4497           0 :   return jresult;
    4498             : }
    4499             : 
    4500             : 
    4501           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetGnomonic(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    4502           0 :   jint jresult = 0 ;
    4503           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4504             :   double arg2 ;
    4505             :   double arg3 ;
    4506             :   double arg4 ;
    4507             :   double arg5 ;
    4508             :   OGRErr result;
    4509             :   
    4510             :   (void)jenv;
    4511             :   (void)jcls;
    4512             :   (void)jarg1_;
    4513           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4514           0 :   arg2 = (double)jarg2; 
    4515           0 :   arg3 = (double)jarg3; 
    4516           0 :   arg4 = (double)jarg4; 
    4517           0 :   arg5 = (double)jarg5; 
    4518           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetGnomonic(arg1,arg2,arg3,arg4,arg5);
    4519             :   {
    4520             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4521           0 :     if (result != 0 && bUseExceptions) {
    4522           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4523             :         OGRErrMessages(result));
    4524           0 :       return 0;
    4525             :     }
    4526           0 :     jresult = (jint)result;
    4527             :   }
    4528             :   {
    4529             :     /* %typemap(ret) OGRErr */
    4530             :   }
    4531           0 :   return jresult;
    4532             : }
    4533             : 
    4534             : 
    4535           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetHOM(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6, jdouble jarg7, jdouble jarg8) {
    4536           0 :   jint jresult = 0 ;
    4537           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4538             :   double arg2 ;
    4539             :   double arg3 ;
    4540             :   double arg4 ;
    4541             :   double arg5 ;
    4542             :   double arg6 ;
    4543             :   double arg7 ;
    4544             :   double arg8 ;
    4545             :   OGRErr result;
    4546             :   
    4547             :   (void)jenv;
    4548             :   (void)jcls;
    4549             :   (void)jarg1_;
    4550           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4551           0 :   arg2 = (double)jarg2; 
    4552           0 :   arg3 = (double)jarg3; 
    4553           0 :   arg4 = (double)jarg4; 
    4554           0 :   arg5 = (double)jarg5; 
    4555           0 :   arg6 = (double)jarg6; 
    4556           0 :   arg7 = (double)jarg7; 
    4557           0 :   arg8 = (double)jarg8; 
    4558           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetHOM(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    4559             :   {
    4560             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4561           0 :     if (result != 0 && bUseExceptions) {
    4562           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4563             :         OGRErrMessages(result));
    4564           0 :       return 0;
    4565             :     }
    4566           0 :     jresult = (jint)result;
    4567             :   }
    4568             :   {
    4569             :     /* %typemap(ret) OGRErr */
    4570             :   }
    4571           0 :   return jresult;
    4572             : }
    4573             : 
    4574             : 
    4575           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetHOM2PNO(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6, jdouble jarg7, jdouble jarg8, jdouble jarg9) {
    4576           0 :   jint jresult = 0 ;
    4577           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4578             :   double arg2 ;
    4579             :   double arg3 ;
    4580             :   double arg4 ;
    4581             :   double arg5 ;
    4582             :   double arg6 ;
    4583             :   double arg7 ;
    4584             :   double arg8 ;
    4585             :   double arg9 ;
    4586             :   OGRErr result;
    4587             :   
    4588             :   (void)jenv;
    4589             :   (void)jcls;
    4590             :   (void)jarg1_;
    4591           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4592           0 :   arg2 = (double)jarg2; 
    4593           0 :   arg3 = (double)jarg3; 
    4594           0 :   arg4 = (double)jarg4; 
    4595           0 :   arg5 = (double)jarg5; 
    4596           0 :   arg6 = (double)jarg6; 
    4597           0 :   arg7 = (double)jarg7; 
    4598           0 :   arg8 = (double)jarg8; 
    4599           0 :   arg9 = (double)jarg9; 
    4600           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetHOM2PNO(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
    4601             :   {
    4602             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4603           0 :     if (result != 0 && bUseExceptions) {
    4604           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4605             :         OGRErrMessages(result));
    4606           0 :       return 0;
    4607             :     }
    4608           0 :     jresult = (jint)result;
    4609             :   }
    4610             :   {
    4611             :     /* %typemap(ret) OGRErr */
    4612             :   }
    4613           0 :   return jresult;
    4614             : }
    4615             : 
    4616             : 
    4617           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetKrovak(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6, jdouble jarg7, jdouble jarg8) {
    4618           0 :   jint jresult = 0 ;
    4619           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4620             :   double arg2 ;
    4621             :   double arg3 ;
    4622             :   double arg4 ;
    4623             :   double arg5 ;
    4624             :   double arg6 ;
    4625             :   double arg7 ;
    4626             :   double arg8 ;
    4627             :   OGRErr result;
    4628             :   
    4629             :   (void)jenv;
    4630             :   (void)jcls;
    4631             :   (void)jarg1_;
    4632           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4633           0 :   arg2 = (double)jarg2; 
    4634           0 :   arg3 = (double)jarg3; 
    4635           0 :   arg4 = (double)jarg4; 
    4636           0 :   arg5 = (double)jarg5; 
    4637           0 :   arg6 = (double)jarg6; 
    4638           0 :   arg7 = (double)jarg7; 
    4639           0 :   arg8 = (double)jarg8; 
    4640           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetKrovak(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    4641             :   {
    4642             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4643           0 :     if (result != 0 && bUseExceptions) {
    4644           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4645             :         OGRErrMessages(result));
    4646           0 :       return 0;
    4647             :     }
    4648           0 :     jresult = (jint)result;
    4649             :   }
    4650             :   {
    4651             :     /* %typemap(ret) OGRErr */
    4652             :   }
    4653           0 :   return jresult;
    4654             : }
    4655             : 
    4656             : 
    4657           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetLAEA(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    4658           0 :   jint jresult = 0 ;
    4659           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4660             :   double arg2 ;
    4661             :   double arg3 ;
    4662             :   double arg4 ;
    4663             :   double arg5 ;
    4664             :   OGRErr result;
    4665             :   
    4666             :   (void)jenv;
    4667             :   (void)jcls;
    4668             :   (void)jarg1_;
    4669           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4670           0 :   arg2 = (double)jarg2; 
    4671           0 :   arg3 = (double)jarg3; 
    4672           0 :   arg4 = (double)jarg4; 
    4673           0 :   arg5 = (double)jarg5; 
    4674           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetLAEA(arg1,arg2,arg3,arg4,arg5);
    4675             :   {
    4676             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4677           0 :     if (result != 0 && bUseExceptions) {
    4678           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4679             :         OGRErrMessages(result));
    4680           0 :       return 0;
    4681             :     }
    4682           0 :     jresult = (jint)result;
    4683             :   }
    4684             :   {
    4685             :     /* %typemap(ret) OGRErr */
    4686             :   }
    4687           0 :   return jresult;
    4688             : }
    4689             : 
    4690             : 
    4691           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetLCC(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6, jdouble jarg7) {
    4692           0 :   jint jresult = 0 ;
    4693           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4694             :   double arg2 ;
    4695             :   double arg3 ;
    4696             :   double arg4 ;
    4697             :   double arg5 ;
    4698             :   double arg6 ;
    4699             :   double arg7 ;
    4700             :   OGRErr result;
    4701             :   
    4702             :   (void)jenv;
    4703             :   (void)jcls;
    4704             :   (void)jarg1_;
    4705           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4706           0 :   arg2 = (double)jarg2; 
    4707           0 :   arg3 = (double)jarg3; 
    4708           0 :   arg4 = (double)jarg4; 
    4709           0 :   arg5 = (double)jarg5; 
    4710           0 :   arg6 = (double)jarg6; 
    4711           0 :   arg7 = (double)jarg7; 
    4712           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetLCC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
    4713             :   {
    4714             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4715           0 :     if (result != 0 && bUseExceptions) {
    4716           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4717             :         OGRErrMessages(result));
    4718           0 :       return 0;
    4719             :     }
    4720           0 :     jresult = (jint)result;
    4721             :   }
    4722             :   {
    4723             :     /* %typemap(ret) OGRErr */
    4724             :   }
    4725           0 :   return jresult;
    4726             : }
    4727             : 
    4728             : 
    4729           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetLCC1SP(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6) {
    4730           0 :   jint jresult = 0 ;
    4731           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4732             :   double arg2 ;
    4733             :   double arg3 ;
    4734             :   double arg4 ;
    4735             :   double arg5 ;
    4736             :   double arg6 ;
    4737             :   OGRErr result;
    4738             :   
    4739             :   (void)jenv;
    4740             :   (void)jcls;
    4741             :   (void)jarg1_;
    4742           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4743           0 :   arg2 = (double)jarg2; 
    4744           0 :   arg3 = (double)jarg3; 
    4745           0 :   arg4 = (double)jarg4; 
    4746           0 :   arg5 = (double)jarg5; 
    4747           0 :   arg6 = (double)jarg6; 
    4748           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetLCC1SP(arg1,arg2,arg3,arg4,arg5,arg6);
    4749             :   {
    4750             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4751           0 :     if (result != 0 && bUseExceptions) {
    4752           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4753             :         OGRErrMessages(result));
    4754           0 :       return 0;
    4755             :     }
    4756           0 :     jresult = (jint)result;
    4757             :   }
    4758             :   {
    4759             :     /* %typemap(ret) OGRErr */
    4760             :   }
    4761           0 :   return jresult;
    4762             : }
    4763             : 
    4764             : 
    4765           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetLCCB(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6, jdouble jarg7) {
    4766           0 :   jint jresult = 0 ;
    4767           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4768             :   double arg2 ;
    4769             :   double arg3 ;
    4770             :   double arg4 ;
    4771             :   double arg5 ;
    4772             :   double arg6 ;
    4773             :   double arg7 ;
    4774             :   OGRErr result;
    4775             :   
    4776             :   (void)jenv;
    4777             :   (void)jcls;
    4778             :   (void)jarg1_;
    4779           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4780           0 :   arg2 = (double)jarg2; 
    4781           0 :   arg3 = (double)jarg3; 
    4782           0 :   arg4 = (double)jarg4; 
    4783           0 :   arg5 = (double)jarg5; 
    4784           0 :   arg6 = (double)jarg6; 
    4785           0 :   arg7 = (double)jarg7; 
    4786           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetLCCB(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
    4787             :   {
    4788             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4789           0 :     if (result != 0 && bUseExceptions) {
    4790           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4791             :         OGRErrMessages(result));
    4792           0 :       return 0;
    4793             :     }
    4794           0 :     jresult = (jint)result;
    4795             :   }
    4796             :   {
    4797             :     /* %typemap(ret) OGRErr */
    4798             :   }
    4799           0 :   return jresult;
    4800             : }
    4801             : 
    4802             : 
    4803           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetMC(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    4804           0 :   jint jresult = 0 ;
    4805           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4806             :   double arg2 ;
    4807             :   double arg3 ;
    4808             :   double arg4 ;
    4809             :   double arg5 ;
    4810             :   OGRErr result;
    4811             :   
    4812             :   (void)jenv;
    4813             :   (void)jcls;
    4814             :   (void)jarg1_;
    4815           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4816           0 :   arg2 = (double)jarg2; 
    4817           0 :   arg3 = (double)jarg3; 
    4818           0 :   arg4 = (double)jarg4; 
    4819           0 :   arg5 = (double)jarg5; 
    4820           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetMC(arg1,arg2,arg3,arg4,arg5);
    4821             :   {
    4822             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4823           0 :     if (result != 0 && bUseExceptions) {
    4824           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4825             :         OGRErrMessages(result));
    4826           0 :       return 0;
    4827             :     }
    4828           0 :     jresult = (jint)result;
    4829             :   }
    4830             :   {
    4831             :     /* %typemap(ret) OGRErr */
    4832             :   }
    4833           0 :   return jresult;
    4834             : }
    4835             : 
    4836             : 
    4837           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetMercator(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6) {
    4838           0 :   jint jresult = 0 ;
    4839           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4840             :   double arg2 ;
    4841             :   double arg3 ;
    4842             :   double arg4 ;
    4843             :   double arg5 ;
    4844             :   double arg6 ;
    4845             :   OGRErr result;
    4846             :   
    4847             :   (void)jenv;
    4848             :   (void)jcls;
    4849             :   (void)jarg1_;
    4850           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4851           0 :   arg2 = (double)jarg2; 
    4852           0 :   arg3 = (double)jarg3; 
    4853           0 :   arg4 = (double)jarg4; 
    4854           0 :   arg5 = (double)jarg5; 
    4855           0 :   arg6 = (double)jarg6; 
    4856           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetMercator(arg1,arg2,arg3,arg4,arg5,arg6);
    4857             :   {
    4858             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4859           0 :     if (result != 0 && bUseExceptions) {
    4860           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4861             :         OGRErrMessages(result));
    4862           0 :       return 0;
    4863             :     }
    4864           0 :     jresult = (jint)result;
    4865             :   }
    4866             :   {
    4867             :     /* %typemap(ret) OGRErr */
    4868             :   }
    4869           0 :   return jresult;
    4870             : }
    4871             : 
    4872             : 
    4873           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetMercator2SP(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6) {
    4874           0 :   jint jresult = 0 ;
    4875           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4876             :   double arg2 ;
    4877             :   double arg3 ;
    4878             :   double arg4 ;
    4879             :   double arg5 ;
    4880             :   double arg6 ;
    4881             :   OGRErr result;
    4882             :   
    4883             :   (void)jenv;
    4884             :   (void)jcls;
    4885             :   (void)jarg1_;
    4886           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4887           0 :   arg2 = (double)jarg2; 
    4888           0 :   arg3 = (double)jarg3; 
    4889           0 :   arg4 = (double)jarg4; 
    4890           0 :   arg5 = (double)jarg5; 
    4891           0 :   arg6 = (double)jarg6; 
    4892           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetMercator2SP(arg1,arg2,arg3,arg4,arg5,arg6);
    4893             :   {
    4894             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4895           0 :     if (result != 0 && bUseExceptions) {
    4896           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4897             :         OGRErrMessages(result));
    4898           0 :       return 0;
    4899             :     }
    4900           0 :     jresult = (jint)result;
    4901             :   }
    4902             :   {
    4903             :     /* %typemap(ret) OGRErr */
    4904             :   }
    4905           0 :   return jresult;
    4906             : }
    4907             : 
    4908             : 
    4909           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetMollweide(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4) {
    4910           0 :   jint jresult = 0 ;
    4911           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4912             :   double arg2 ;
    4913             :   double arg3 ;
    4914             :   double arg4 ;
    4915             :   OGRErr result;
    4916             :   
    4917             :   (void)jenv;
    4918             :   (void)jcls;
    4919             :   (void)jarg1_;
    4920           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4921           0 :   arg2 = (double)jarg2; 
    4922           0 :   arg3 = (double)jarg3; 
    4923           0 :   arg4 = (double)jarg4; 
    4924           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetMollweide(arg1,arg2,arg3,arg4);
    4925             :   {
    4926             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4927           0 :     if (result != 0 && bUseExceptions) {
    4928           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4929             :         OGRErrMessages(result));
    4930           0 :       return 0;
    4931             :     }
    4932           0 :     jresult = (jint)result;
    4933             :   }
    4934             :   {
    4935             :     /* %typemap(ret) OGRErr */
    4936             :   }
    4937           0 :   return jresult;
    4938             : }
    4939             : 
    4940             : 
    4941           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetNZMG(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    4942           0 :   jint jresult = 0 ;
    4943           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4944             :   double arg2 ;
    4945             :   double arg3 ;
    4946             :   double arg4 ;
    4947             :   double arg5 ;
    4948             :   OGRErr result;
    4949             :   
    4950             :   (void)jenv;
    4951             :   (void)jcls;
    4952             :   (void)jarg1_;
    4953           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4954           0 :   arg2 = (double)jarg2; 
    4955           0 :   arg3 = (double)jarg3; 
    4956           0 :   arg4 = (double)jarg4; 
    4957           0 :   arg5 = (double)jarg5; 
    4958           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetNZMG(arg1,arg2,arg3,arg4,arg5);
    4959             :   {
    4960             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4961           0 :     if (result != 0 && bUseExceptions) {
    4962           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4963             :         OGRErrMessages(result));
    4964           0 :       return 0;
    4965             :     }
    4966           0 :     jresult = (jint)result;
    4967             :   }
    4968             :   {
    4969             :     /* %typemap(ret) OGRErr */
    4970             :   }
    4971           0 :   return jresult;
    4972             : }
    4973             : 
    4974             : 
    4975           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetOS(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6) {
    4976           0 :   jint jresult = 0 ;
    4977           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    4978             :   double arg2 ;
    4979             :   double arg3 ;
    4980             :   double arg4 ;
    4981             :   double arg5 ;
    4982             :   double arg6 ;
    4983             :   OGRErr result;
    4984             :   
    4985             :   (void)jenv;
    4986             :   (void)jcls;
    4987             :   (void)jarg1_;
    4988           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    4989           0 :   arg2 = (double)jarg2; 
    4990           0 :   arg3 = (double)jarg3; 
    4991           0 :   arg4 = (double)jarg4; 
    4992           0 :   arg5 = (double)jarg5; 
    4993           0 :   arg6 = (double)jarg6; 
    4994           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetOS(arg1,arg2,arg3,arg4,arg5,arg6);
    4995             :   {
    4996             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    4997           0 :     if (result != 0 && bUseExceptions) {
    4998           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    4999             :         OGRErrMessages(result));
    5000           0 :       return 0;
    5001             :     }
    5002           0 :     jresult = (jint)result;
    5003             :   }
    5004             :   {
    5005             :     /* %typemap(ret) OGRErr */
    5006             :   }
    5007           0 :   return jresult;
    5008             : }
    5009             : 
    5010             : 
    5011           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetOrthographic(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    5012           0 :   jint jresult = 0 ;
    5013           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5014             :   double arg2 ;
    5015             :   double arg3 ;
    5016             :   double arg4 ;
    5017             :   double arg5 ;
    5018             :   OGRErr result;
    5019             :   
    5020             :   (void)jenv;
    5021             :   (void)jcls;
    5022             :   (void)jarg1_;
    5023           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5024           0 :   arg2 = (double)jarg2; 
    5025           0 :   arg3 = (double)jarg3; 
    5026           0 :   arg4 = (double)jarg4; 
    5027           0 :   arg5 = (double)jarg5; 
    5028           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetOrthographic(arg1,arg2,arg3,arg4,arg5);
    5029             :   {
    5030             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5031           0 :     if (result != 0 && bUseExceptions) {
    5032           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5033             :         OGRErrMessages(result));
    5034           0 :       return 0;
    5035             :     }
    5036           0 :     jresult = (jint)result;
    5037             :   }
    5038             :   {
    5039             :     /* %typemap(ret) OGRErr */
    5040             :   }
    5041           0 :   return jresult;
    5042             : }
    5043             : 
    5044             : 
    5045           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetPolyconic(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    5046           0 :   jint jresult = 0 ;
    5047           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5048             :   double arg2 ;
    5049             :   double arg3 ;
    5050             :   double arg4 ;
    5051             :   double arg5 ;
    5052             :   OGRErr result;
    5053             :   
    5054             :   (void)jenv;
    5055             :   (void)jcls;
    5056             :   (void)jarg1_;
    5057           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5058           0 :   arg2 = (double)jarg2; 
    5059           0 :   arg3 = (double)jarg3; 
    5060           0 :   arg4 = (double)jarg4; 
    5061           0 :   arg5 = (double)jarg5; 
    5062           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetPolyconic(arg1,arg2,arg3,arg4,arg5);
    5063             :   {
    5064             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5065           0 :     if (result != 0 && bUseExceptions) {
    5066           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5067             :         OGRErrMessages(result));
    5068           0 :       return 0;
    5069             :     }
    5070           0 :     jresult = (jint)result;
    5071             :   }
    5072             :   {
    5073             :     /* %typemap(ret) OGRErr */
    5074             :   }
    5075           0 :   return jresult;
    5076             : }
    5077             : 
    5078             : 
    5079           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetPS(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6) {
    5080           0 :   jint jresult = 0 ;
    5081           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5082             :   double arg2 ;
    5083             :   double arg3 ;
    5084             :   double arg4 ;
    5085             :   double arg5 ;
    5086             :   double arg6 ;
    5087             :   OGRErr result;
    5088             :   
    5089             :   (void)jenv;
    5090             :   (void)jcls;
    5091             :   (void)jarg1_;
    5092           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5093           0 :   arg2 = (double)jarg2; 
    5094           0 :   arg3 = (double)jarg3; 
    5095           0 :   arg4 = (double)jarg4; 
    5096           0 :   arg5 = (double)jarg5; 
    5097           0 :   arg6 = (double)jarg6; 
    5098           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetPS(arg1,arg2,arg3,arg4,arg5,arg6);
    5099             :   {
    5100             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5101           0 :     if (result != 0 && bUseExceptions) {
    5102           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5103             :         OGRErrMessages(result));
    5104           0 :       return 0;
    5105             :     }
    5106           0 :     jresult = (jint)result;
    5107             :   }
    5108             :   {
    5109             :     /* %typemap(ret) OGRErr */
    5110             :   }
    5111           0 :   return jresult;
    5112             : }
    5113             : 
    5114             : 
    5115           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetRobinson(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4) {
    5116           0 :   jint jresult = 0 ;
    5117           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5118             :   double arg2 ;
    5119             :   double arg3 ;
    5120             :   double arg4 ;
    5121             :   OGRErr result;
    5122             :   
    5123             :   (void)jenv;
    5124             :   (void)jcls;
    5125             :   (void)jarg1_;
    5126           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5127           0 :   arg2 = (double)jarg2; 
    5128           0 :   arg3 = (double)jarg3; 
    5129           0 :   arg4 = (double)jarg4; 
    5130           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetRobinson(arg1,arg2,arg3,arg4);
    5131             :   {
    5132             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5133           0 :     if (result != 0 && bUseExceptions) {
    5134           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5135             :         OGRErrMessages(result));
    5136           0 :       return 0;
    5137             :     }
    5138           0 :     jresult = (jint)result;
    5139             :   }
    5140             :   {
    5141             :     /* %typemap(ret) OGRErr */
    5142             :   }
    5143           0 :   return jresult;
    5144             : }
    5145             : 
    5146             : 
    5147           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetSinusoidal(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4) {
    5148           0 :   jint jresult = 0 ;
    5149           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5150             :   double arg2 ;
    5151             :   double arg3 ;
    5152             :   double arg4 ;
    5153             :   OGRErr result;
    5154             :   
    5155             :   (void)jenv;
    5156             :   (void)jcls;
    5157             :   (void)jarg1_;
    5158           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5159           0 :   arg2 = (double)jarg2; 
    5160           0 :   arg3 = (double)jarg3; 
    5161           0 :   arg4 = (double)jarg4; 
    5162           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetSinusoidal(arg1,arg2,arg3,arg4);
    5163             :   {
    5164             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5165           0 :     if (result != 0 && bUseExceptions) {
    5166           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5167             :         OGRErrMessages(result));
    5168           0 :       return 0;
    5169             :     }
    5170           0 :     jresult = (jint)result;
    5171             :   }
    5172             :   {
    5173             :     /* %typemap(ret) OGRErr */
    5174             :   }
    5175           0 :   return jresult;
    5176             : }
    5177             : 
    5178             : 
    5179           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetStereographic(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6) {
    5180           0 :   jint jresult = 0 ;
    5181           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5182             :   double arg2 ;
    5183             :   double arg3 ;
    5184             :   double arg4 ;
    5185             :   double arg5 ;
    5186             :   double arg6 ;
    5187             :   OGRErr result;
    5188             :   
    5189             :   (void)jenv;
    5190             :   (void)jcls;
    5191             :   (void)jarg1_;
    5192           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5193           0 :   arg2 = (double)jarg2; 
    5194           0 :   arg3 = (double)jarg3; 
    5195           0 :   arg4 = (double)jarg4; 
    5196           0 :   arg5 = (double)jarg5; 
    5197           0 :   arg6 = (double)jarg6; 
    5198           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetStereographic(arg1,arg2,arg3,arg4,arg5,arg6);
    5199             :   {
    5200             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5201           0 :     if (result != 0 && bUseExceptions) {
    5202           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5203             :         OGRErrMessages(result));
    5204           0 :       return 0;
    5205             :     }
    5206           0 :     jresult = (jint)result;
    5207             :   }
    5208             :   {
    5209             :     /* %typemap(ret) OGRErr */
    5210             :   }
    5211           0 :   return jresult;
    5212             : }
    5213             : 
    5214             : 
    5215           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetSOC(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    5216           0 :   jint jresult = 0 ;
    5217           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5218             :   double arg2 ;
    5219             :   double arg3 ;
    5220             :   double arg4 ;
    5221             :   double arg5 ;
    5222             :   OGRErr result;
    5223             :   
    5224             :   (void)jenv;
    5225             :   (void)jcls;
    5226             :   (void)jarg1_;
    5227           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5228           0 :   arg2 = (double)jarg2; 
    5229           0 :   arg3 = (double)jarg3; 
    5230           0 :   arg4 = (double)jarg4; 
    5231           0 :   arg5 = (double)jarg5; 
    5232           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetSOC(arg1,arg2,arg3,arg4,arg5);
    5233             :   {
    5234             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5235           0 :     if (result != 0 && bUseExceptions) {
    5236           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5237             :         OGRErrMessages(result));
    5238           0 :       return 0;
    5239             :     }
    5240           0 :     jresult = (jint)result;
    5241             :   }
    5242             :   {
    5243             :     /* %typemap(ret) OGRErr */
    5244             :   }
    5245           0 :   return jresult;
    5246             : }
    5247             : 
    5248             : 
    5249           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetTM(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6) {
    5250           0 :   jint jresult = 0 ;
    5251           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5252             :   double arg2 ;
    5253             :   double arg3 ;
    5254             :   double arg4 ;
    5255             :   double arg5 ;
    5256             :   double arg6 ;
    5257             :   OGRErr result;
    5258             :   
    5259             :   (void)jenv;
    5260             :   (void)jcls;
    5261             :   (void)jarg1_;
    5262           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5263           0 :   arg2 = (double)jarg2; 
    5264           0 :   arg3 = (double)jarg3; 
    5265           0 :   arg4 = (double)jarg4; 
    5266           0 :   arg5 = (double)jarg5; 
    5267           0 :   arg6 = (double)jarg6; 
    5268           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetTM(arg1,arg2,arg3,arg4,arg5,arg6);
    5269             :   {
    5270             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5271           0 :     if (result != 0 && bUseExceptions) {
    5272           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5273             :         OGRErrMessages(result));
    5274           0 :       return 0;
    5275             :     }
    5276           0 :     jresult = (jint)result;
    5277             :   }
    5278             :   {
    5279             :     /* %typemap(ret) OGRErr */
    5280             :   }
    5281           0 :   return jresult;
    5282             : }
    5283             : 
    5284             : 
    5285           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetTMVariant(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6, jdouble jarg7) {
    5286           0 :   jint jresult = 0 ;
    5287           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5288           0 :   char *arg2 = (char *) 0 ;
    5289             :   double arg3 ;
    5290             :   double arg4 ;
    5291             :   double arg5 ;
    5292             :   double arg6 ;
    5293             :   double arg7 ;
    5294             :   OGRErr result;
    5295             :   
    5296             :   (void)jenv;
    5297             :   (void)jcls;
    5298             :   (void)jarg1_;
    5299           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5300           0 :   arg2 = 0;
    5301           0 :   if (jarg2) {
    5302           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    5303           0 :     if (!arg2) return 0;
    5304             :   }
    5305           0 :   arg3 = (double)jarg3; 
    5306           0 :   arg4 = (double)jarg4; 
    5307           0 :   arg5 = (double)jarg5; 
    5308           0 :   arg6 = (double)jarg6; 
    5309           0 :   arg7 = (double)jarg7; 
    5310           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetTMVariant(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
    5311             :   {
    5312             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5313           0 :     if (result != 0 && bUseExceptions) {
    5314           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5315             :         OGRErrMessages(result));
    5316           0 :       return 0;
    5317             :     }
    5318           0 :     jresult = (jint)result;
    5319             :   }
    5320           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    5321             :   {
    5322             :     /* %typemap(ret) OGRErr */
    5323             :   }
    5324           0 :   return jresult;
    5325             : }
    5326             : 
    5327             : 
    5328           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetTMG(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    5329           0 :   jint jresult = 0 ;
    5330           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5331             :   double arg2 ;
    5332             :   double arg3 ;
    5333             :   double arg4 ;
    5334             :   double arg5 ;
    5335             :   OGRErr result;
    5336             :   
    5337             :   (void)jenv;
    5338             :   (void)jcls;
    5339             :   (void)jarg1_;
    5340           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5341           0 :   arg2 = (double)jarg2; 
    5342           0 :   arg3 = (double)jarg3; 
    5343           0 :   arg4 = (double)jarg4; 
    5344           0 :   arg5 = (double)jarg5; 
    5345           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetTMG(arg1,arg2,arg3,arg4,arg5);
    5346             :   {
    5347             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5348           0 :     if (result != 0 && bUseExceptions) {
    5349           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5350             :         OGRErrMessages(result));
    5351           0 :       return 0;
    5352             :     }
    5353           0 :     jresult = (jint)result;
    5354             :   }
    5355             :   {
    5356             :     /* %typemap(ret) OGRErr */
    5357             :   }
    5358           0 :   return jresult;
    5359             : }
    5360             : 
    5361             : 
    5362           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetTMSO(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6) {
    5363           0 :   jint jresult = 0 ;
    5364           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5365             :   double arg2 ;
    5366             :   double arg3 ;
    5367             :   double arg4 ;
    5368             :   double arg5 ;
    5369             :   double arg6 ;
    5370             :   OGRErr result;
    5371             :   
    5372             :   (void)jenv;
    5373             :   (void)jcls;
    5374             :   (void)jarg1_;
    5375           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5376           0 :   arg2 = (double)jarg2; 
    5377           0 :   arg3 = (double)jarg3; 
    5378           0 :   arg4 = (double)jarg4; 
    5379           0 :   arg5 = (double)jarg5; 
    5380           0 :   arg6 = (double)jarg6; 
    5381           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetTMSO(arg1,arg2,arg3,arg4,arg5,arg6);
    5382             :   {
    5383             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5384           0 :     if (result != 0 && bUseExceptions) {
    5385           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5386             :         OGRErrMessages(result));
    5387           0 :       return 0;
    5388             :     }
    5389           0 :     jresult = (jint)result;
    5390             :   }
    5391             :   {
    5392             :     /* %typemap(ret) OGRErr */
    5393             :   }
    5394           0 :   return jresult;
    5395             : }
    5396             : 
    5397             : 
    5398           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetVDG(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4) {
    5399           0 :   jint jresult = 0 ;
    5400           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5401             :   double arg2 ;
    5402             :   double arg3 ;
    5403             :   double arg4 ;
    5404             :   OGRErr result;
    5405             :   
    5406             :   (void)jenv;
    5407             :   (void)jcls;
    5408             :   (void)jarg1_;
    5409           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5410           0 :   arg2 = (double)jarg2; 
    5411           0 :   arg3 = (double)jarg3; 
    5412           0 :   arg4 = (double)jarg4; 
    5413           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetVDG(arg1,arg2,arg3,arg4);
    5414             :   {
    5415             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5416           0 :     if (result != 0 && bUseExceptions) {
    5417           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5418             :         OGRErrMessages(result));
    5419           0 :       return 0;
    5420             :     }
    5421           0 :     jresult = (jint)result;
    5422             :   }
    5423             :   {
    5424             :     /* %typemap(ret) OGRErr */
    5425             :   }
    5426           0 :   return jresult;
    5427             : }
    5428             : 
    5429             : 
    5430           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetVerticalPerspective(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6, jdouble jarg7) {
    5431           0 :   jint jresult = 0 ;
    5432           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5433             :   double arg2 ;
    5434             :   double arg3 ;
    5435             :   double arg4 ;
    5436             :   double arg5 ;
    5437             :   double arg6 ;
    5438             :   double arg7 ;
    5439             :   OGRErr result;
    5440             :   
    5441             :   (void)jenv;
    5442             :   (void)jcls;
    5443             :   (void)jarg1_;
    5444           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5445           0 :   arg2 = (double)jarg2; 
    5446           0 :   arg3 = (double)jarg3; 
    5447           0 :   arg4 = (double)jarg4; 
    5448           0 :   arg5 = (double)jarg5; 
    5449           0 :   arg6 = (double)jarg6; 
    5450           0 :   arg7 = (double)jarg7; 
    5451           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetVerticalPerspective(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
    5452             :   {
    5453             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5454           0 :     if (result != 0 && bUseExceptions) {
    5455           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5456             :         OGRErrMessages(result));
    5457           0 :       return 0;
    5458             :     }
    5459           0 :     jresult = (jint)result;
    5460             :   }
    5461             :   {
    5462             :     /* %typemap(ret) OGRErr */
    5463             :   }
    5464           0 :   return jresult;
    5465             : }
    5466             : 
    5467             : 
    5468           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetWellKnownGeogCS(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    5469           0 :   jint jresult = 0 ;
    5470           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5471           0 :   char *arg2 = (char *) 0 ;
    5472             :   OGRErr result;
    5473             :   
    5474             :   (void)jenv;
    5475             :   (void)jcls;
    5476             :   (void)jarg1_;
    5477           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5478           0 :   arg2 = 0;
    5479           0 :   if (jarg2) {
    5480           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    5481           0 :     if (!arg2) return 0;
    5482             :   }
    5483             :   {
    5484           0 :     if (!arg2) {
    5485             :       {
    5486           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    5487             :       };
    5488             :     }
    5489             :   }
    5490           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetWellKnownGeogCS(arg1,(char const *)arg2);
    5491             :   {
    5492             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5493           0 :     if (result != 0 && bUseExceptions) {
    5494           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5495             :         OGRErrMessages(result));
    5496           0 :       return 0;
    5497             :     }
    5498           0 :     jresult = (jint)result;
    5499             :   }
    5500           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    5501             :   {
    5502             :     /* %typemap(ret) OGRErr */
    5503             :   }
    5504           0 :   return jresult;
    5505             : }
    5506             : 
    5507             : 
    5508           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetFromUserInput_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jobject jarg3) {
    5509           0 :   jint jresult = 0 ;
    5510           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5511           0 :   char *arg2 = (char *) 0 ;
    5512           0 :   char **arg3 = (char **) 0 ;
    5513             :   OGRErr result;
    5514             :   
    5515             :   (void)jenv;
    5516             :   (void)jcls;
    5517             :   (void)jarg1_;
    5518           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5519           0 :   arg2 = 0;
    5520           0 :   if (jarg2) {
    5521           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    5522           0 :     if (!arg2) return 0;
    5523             :   }
    5524             :   {
    5525             :     /* %typemap(in) char **options */
    5526           0 :     arg3 = NULL;
    5527           0 :     if(jarg3 != 0) {
    5528           0 :       const jclass vector = jenv->FindClass("java/util/Vector");
    5529           0 :       const jclass enumeration = jenv->FindClass("java/util/Enumeration");
    5530           0 :       const jclass stringClass = jenv->FindClass("java/lang/String");
    5531           0 :       const jmethodID elements = jenv->GetMethodID(vector, "elements",
    5532             :         "()Ljava/util/Enumeration;");
    5533           0 :       const jmethodID hasMoreElements = jenv->GetMethodID(enumeration,
    5534             :         "hasMoreElements", "()Z");
    5535           0 :       const jmethodID getNextElement = jenv->GetMethodID(enumeration,
    5536             :         "nextElement", "()Ljava/lang/Object;");
    5537           0 :       if(vector == NULL || enumeration == NULL || elements == NULL ||
    5538           0 :         hasMoreElements == NULL || getNextElement == NULL) {
    5539           0 :         fprintf(stderr, "Could not load (options **) jni types.\n");
    5540           0 :         return 0;
    5541             :       }
    5542           0 :       for (jobject keys = jenv->CallObjectMethod(jarg3, elements);
    5543           0 :         jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
    5544           0 :         jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
    5545           0 :         if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
    5546             :         {
    5547           0 :           CSLDestroy(arg3);
    5548           0 :           SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
    5549           0 :           return 0;
    5550             :         }
    5551           0 :         const char *valptr = jenv->GetStringUTFChars(value, 0);
    5552           0 :         arg3 = CSLAddString(arg3,  valptr);
    5553           0 :         jenv->ReleaseStringUTFChars(value, valptr);
    5554             :       }
    5555             :     }
    5556             :   }
    5557             :   {
    5558           0 :     if (!arg2) {
    5559             :       {
    5560           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    5561             :       };
    5562             :     }
    5563             :   }
    5564           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetFromUserInput__SWIG_0(arg1,(char const *)arg2,arg3);
    5565             :   {
    5566             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5567           0 :     if (result != 0 && bUseExceptions) {
    5568           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5569             :         OGRErrMessages(result));
    5570           0 :       return 0;
    5571             :     }
    5572           0 :     jresult = (jint)result;
    5573             :   }
    5574           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    5575             :   {
    5576             :     /* %typemap(freearg) char **options */
    5577           0 :     CSLDestroy( arg3 );
    5578             :   }
    5579             :   {
    5580             :     /* %typemap(ret) OGRErr */
    5581             :   }
    5582           0 :   return jresult;
    5583             : }
    5584             : 
    5585             : 
    5586           4 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetFromUserInput_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    5587           4 :   jint jresult = 0 ;
    5588           4 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5589           4 :   char *arg2 = (char *) 0 ;
    5590             :   OGRErr result;
    5591             :   
    5592             :   (void)jenv;
    5593             :   (void)jcls;
    5594             :   (void)jarg1_;
    5595           4 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5596           4 :   arg2 = 0;
    5597           4 :   if (jarg2) {
    5598           4 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    5599           4 :     if (!arg2) return 0;
    5600             :   }
    5601             :   {
    5602           4 :     if (!arg2) {
    5603             :       {
    5604           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    5605             :       };
    5606             :     }
    5607             :   }
    5608           4 :   result = (OGRErr)OSRSpatialReferenceShadow_SetFromUserInput__SWIG_0(arg1,(char const *)arg2);
    5609             :   {
    5610             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5611           4 :     if (result != 0 && bUseExceptions) {
    5612           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5613             :         OGRErrMessages(result));
    5614           0 :       return 0;
    5615             :     }
    5616           4 :     jresult = (jint)result;
    5617             :   }
    5618           4 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    5619             :   {
    5620             :     /* %typemap(ret) OGRErr */
    5621             :   }
    5622           4 :   return jresult;
    5623             : }
    5624             : 
    5625             : 
    5626           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1CopyGeogCSFrom(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    5627           0 :   jint jresult = 0 ;
    5628           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5629           0 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    5630             :   OGRErr result;
    5631             :   
    5632             :   (void)jenv;
    5633             :   (void)jcls;
    5634             :   (void)jarg1_;
    5635             :   (void)jarg2_;
    5636           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5637           0 :   arg2 = *(OSRSpatialReferenceShadow **)&jarg2; 
    5638             :   {
    5639           0 :     if (!arg2) {
    5640             :       {
    5641           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    5642             :       };
    5643             :     }
    5644             :   }
    5645           0 :   result = (OGRErr)OSRSpatialReferenceShadow_CopyGeogCSFrom(arg1,arg2);
    5646             :   {
    5647             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5648           0 :     if (result != 0 && bUseExceptions) {
    5649           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5650             :         OGRErrMessages(result));
    5651           0 :       return 0;
    5652             :     }
    5653           0 :     jresult = (jint)result;
    5654             :   }
    5655             :   {
    5656             :     /* %typemap(ret) OGRErr */
    5657             :   }
    5658           0 :   return jresult;
    5659             : }
    5660             : 
    5661             : 
    5662           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetTOWGS84(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6, jdouble jarg7, jdouble jarg8) {
    5663           0 :   jint jresult = 0 ;
    5664           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5665             :   double arg2 ;
    5666             :   double arg3 ;
    5667             :   double arg4 ;
    5668             :   double arg5 ;
    5669             :   double arg6 ;
    5670             :   double arg7 ;
    5671             :   double arg8 ;
    5672             :   OGRErr result;
    5673             :   
    5674             :   (void)jenv;
    5675             :   (void)jcls;
    5676             :   (void)jarg1_;
    5677           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5678           0 :   arg2 = (double)jarg2; 
    5679           0 :   arg3 = (double)jarg3; 
    5680           0 :   arg4 = (double)jarg4; 
    5681           0 :   arg5 = (double)jarg5; 
    5682           0 :   arg6 = (double)jarg6; 
    5683           0 :   arg7 = (double)jarg7; 
    5684           0 :   arg8 = (double)jarg8; 
    5685           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetTOWGS84(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    5686             :   {
    5687             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5688           0 :     if (result != 0 && bUseExceptions) {
    5689           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5690             :         OGRErrMessages(result));
    5691           0 :       return 0;
    5692             :     }
    5693           0 :     jresult = (jint)result;
    5694             :   }
    5695             :   {
    5696             :     /* %typemap(ret) OGRErr */
    5697             :   }
    5698           0 :   return jresult;
    5699             : }
    5700             : 
    5701             : 
    5702           0 : SWIGEXPORT jboolean JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1HasTOWGS84(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    5703           0 :   jboolean jresult = 0 ;
    5704           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5705             :   bool result;
    5706             :   
    5707             :   (void)jenv;
    5708             :   (void)jcls;
    5709             :   (void)jarg1_;
    5710           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5711           0 :   result = (bool)OSRSpatialReferenceShadow_HasTOWGS84(arg1);
    5712           0 :   jresult = (jboolean)result; 
    5713           0 :   return jresult;
    5714             : }
    5715             : 
    5716             : 
    5717           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1GetTOWGS84(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdoubleArray jarg2) {
    5718           0 :   jint jresult = 0 ;
    5719           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5720             :   double *arg2 ;
    5721             :   OGRErr result;
    5722             :   
    5723             :   (void)jenv;
    5724             :   (void)jcls;
    5725             :   (void)jarg1_;
    5726           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5727             :   {
    5728             :     /* %typemap(in) (double argout[ANY]) */
    5729           0 :     if(jarg2 == NULL || jenv->GetArrayLength(jarg2) != 7) {
    5730             :       char errorMsg[128];
    5731           0 :       snprintf(errorMsg, sizeof(errorMsg), "array of size %d expected", 7);
    5732           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, errorMsg);
    5733           0 :       return 0;
    5734             :     }
    5735           0 :     arg2 = (double *)jenv->GetDoubleArrayElements(jarg2, NULL);
    5736             :   }
    5737           0 :   result = (OGRErr)OSRSpatialReferenceShadow_GetTOWGS84(arg1,arg2);
    5738             :   {
    5739             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5740           0 :     if (result != 0 && bUseExceptions) {
    5741           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5742             :         OGRErrMessages(result));
    5743           0 :       return 0;
    5744             :     }
    5745           0 :     jresult = (jint)result;
    5746             :   }
    5747             :   {
    5748             :     /* %typemap(argout) (double argout[ANY]) */
    5749             :   }
    5750             :   {
    5751             :     /* %typemap(freearg) (double argout[ANY]) */
    5752           0 :     jenv->ReleaseDoubleArrayElements(jarg2, (jdouble *)arg2, 0);
    5753             :   }
    5754             :   {
    5755             :     /* %typemap(ret) OGRErr */
    5756             :   }
    5757           0 :   return jresult;
    5758             : }
    5759             : 
    5760             : 
    5761           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1AddGuessedTOWGS84(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    5762           0 :   jint jresult = 0 ;
    5763           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5764             :   OGRErr result;
    5765             :   
    5766             :   (void)jenv;
    5767             :   (void)jcls;
    5768             :   (void)jarg1_;
    5769           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5770           0 :   result = (OGRErr)OSRSpatialReferenceShadow_AddGuessedTOWGS84(arg1);
    5771             :   {
    5772             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5773           0 :     if (result != 0 && bUseExceptions) {
    5774           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5775             :         OGRErrMessages(result));
    5776           0 :       return 0;
    5777             :     }
    5778           0 :     jresult = (jint)result;
    5779             :   }
    5780             :   {
    5781             :     /* %typemap(ret) OGRErr */
    5782             :   }
    5783           0 :   return jresult;
    5784             : }
    5785             : 
    5786             : 
    5787           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetLocalCS(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    5788           0 :   jint jresult = 0 ;
    5789           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5790           0 :   char *arg2 = (char *) 0 ;
    5791             :   OGRErr result;
    5792             :   
    5793             :   (void)jenv;
    5794             :   (void)jcls;
    5795             :   (void)jarg1_;
    5796           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5797           0 :   arg2 = 0;
    5798           0 :   if (jarg2) {
    5799           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    5800           0 :     if (!arg2) return 0;
    5801             :   }
    5802           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetLocalCS(arg1,(char const *)arg2);
    5803             :   {
    5804             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5805           0 :     if (result != 0 && bUseExceptions) {
    5806           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5807             :         OGRErrMessages(result));
    5808           0 :       return 0;
    5809             :     }
    5810           0 :     jresult = (jint)result;
    5811             :   }
    5812           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    5813             :   {
    5814             :     /* %typemap(ret) OGRErr */
    5815             :   }
    5816           0 :   return jresult;
    5817             : }
    5818             : 
    5819             : 
    5820           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetGeogCS_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4, jdouble jarg5, jdouble jarg6, jstring jarg7, jdouble jarg8, jstring jarg9, jdouble jarg10) {
    5821           0 :   jint jresult = 0 ;
    5822           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5823           0 :   char *arg2 = (char *) 0 ;
    5824           0 :   char *arg3 = (char *) 0 ;
    5825           0 :   char *arg4 = (char *) 0 ;
    5826             :   double arg5 ;
    5827             :   double arg6 ;
    5828           0 :   char *arg7 = (char *) 0 ;
    5829             :   double arg8 ;
    5830           0 :   char *arg9 = (char *) 0 ;
    5831             :   double arg10 ;
    5832             :   OGRErr result;
    5833             :   
    5834             :   (void)jenv;
    5835             :   (void)jcls;
    5836             :   (void)jarg1_;
    5837           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5838           0 :   arg2 = 0;
    5839           0 :   if (jarg2) {
    5840           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    5841           0 :     if (!arg2) return 0;
    5842             :   }
    5843           0 :   arg3 = 0;
    5844           0 :   if (jarg3) {
    5845           0 :     arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    5846           0 :     if (!arg3) return 0;
    5847             :   }
    5848           0 :   arg4 = 0;
    5849           0 :   if (jarg4) {
    5850           0 :     arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
    5851           0 :     if (!arg4) return 0;
    5852             :   }
    5853           0 :   arg5 = (double)jarg5; 
    5854           0 :   arg6 = (double)jarg6; 
    5855           0 :   arg7 = 0;
    5856           0 :   if (jarg7) {
    5857           0 :     arg7 = (char *)jenv->GetStringUTFChars(jarg7, 0);
    5858           0 :     if (!arg7) return 0;
    5859             :   }
    5860           0 :   arg8 = (double)jarg8; 
    5861           0 :   arg9 = 0;
    5862           0 :   if (jarg9) {
    5863           0 :     arg9 = (char *)jenv->GetStringUTFChars(jarg9, 0);
    5864           0 :     if (!arg9) return 0;
    5865             :   }
    5866           0 :   arg10 = (double)jarg10; 
    5867           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetGeogCS__SWIG_0(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,(char const *)arg7,arg8,(char const *)arg9,arg10);
    5868             :   {
    5869             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5870           0 :     if (result != 0 && bUseExceptions) {
    5871           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5872             :         OGRErrMessages(result));
    5873           0 :       return 0;
    5874             :     }
    5875           0 :     jresult = (jint)result;
    5876             :   }
    5877           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    5878           0 :   if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    5879           0 :   if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
    5880           0 :   if (arg7) jenv->ReleaseStringUTFChars(jarg7, (const char *)arg7);
    5881           0 :   if (arg9) jenv->ReleaseStringUTFChars(jarg9, (const char *)arg9);
    5882             :   {
    5883             :     /* %typemap(ret) OGRErr */
    5884             :   }
    5885           0 :   return jresult;
    5886             : }
    5887             : 
    5888             : 
    5889           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetGeogCS_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4, jdouble jarg5, jdouble jarg6, jstring jarg7, jdouble jarg8, jstring jarg9) {
    5890           0 :   jint jresult = 0 ;
    5891           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5892           0 :   char *arg2 = (char *) 0 ;
    5893           0 :   char *arg3 = (char *) 0 ;
    5894           0 :   char *arg4 = (char *) 0 ;
    5895             :   double arg5 ;
    5896             :   double arg6 ;
    5897           0 :   char *arg7 = (char *) 0 ;
    5898             :   double arg8 ;
    5899           0 :   char *arg9 = (char *) 0 ;
    5900             :   OGRErr result;
    5901             :   
    5902             :   (void)jenv;
    5903             :   (void)jcls;
    5904             :   (void)jarg1_;
    5905           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5906           0 :   arg2 = 0;
    5907           0 :   if (jarg2) {
    5908           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    5909           0 :     if (!arg2) return 0;
    5910             :   }
    5911           0 :   arg3 = 0;
    5912           0 :   if (jarg3) {
    5913           0 :     arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    5914           0 :     if (!arg3) return 0;
    5915             :   }
    5916           0 :   arg4 = 0;
    5917           0 :   if (jarg4) {
    5918           0 :     arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
    5919           0 :     if (!arg4) return 0;
    5920             :   }
    5921           0 :   arg5 = (double)jarg5; 
    5922           0 :   arg6 = (double)jarg6; 
    5923           0 :   arg7 = 0;
    5924           0 :   if (jarg7) {
    5925           0 :     arg7 = (char *)jenv->GetStringUTFChars(jarg7, 0);
    5926           0 :     if (!arg7) return 0;
    5927             :   }
    5928           0 :   arg8 = (double)jarg8; 
    5929           0 :   arg9 = 0;
    5930           0 :   if (jarg9) {
    5931           0 :     arg9 = (char *)jenv->GetStringUTFChars(jarg9, 0);
    5932           0 :     if (!arg9) return 0;
    5933             :   }
    5934           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetGeogCS__SWIG_0(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,(char const *)arg7,arg8,(char const *)arg9);
    5935             :   {
    5936             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5937           0 :     if (result != 0 && bUseExceptions) {
    5938           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    5939             :         OGRErrMessages(result));
    5940           0 :       return 0;
    5941             :     }
    5942           0 :     jresult = (jint)result;
    5943             :   }
    5944           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    5945           0 :   if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    5946           0 :   if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
    5947           0 :   if (arg7) jenv->ReleaseStringUTFChars(jarg7, (const char *)arg7);
    5948           0 :   if (arg9) jenv->ReleaseStringUTFChars(jarg9, (const char *)arg9);
    5949             :   {
    5950             :     /* %typemap(ret) OGRErr */
    5951             :   }
    5952           0 :   return jresult;
    5953             : }
    5954             : 
    5955             : 
    5956           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetGeogCS_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4, jdouble jarg5, jdouble jarg6, jstring jarg7, jdouble jarg8) {
    5957           0 :   jint jresult = 0 ;
    5958           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    5959           0 :   char *arg2 = (char *) 0 ;
    5960           0 :   char *arg3 = (char *) 0 ;
    5961           0 :   char *arg4 = (char *) 0 ;
    5962             :   double arg5 ;
    5963             :   double arg6 ;
    5964           0 :   char *arg7 = (char *) 0 ;
    5965             :   double arg8 ;
    5966             :   OGRErr result;
    5967             :   
    5968             :   (void)jenv;
    5969             :   (void)jcls;
    5970             :   (void)jarg1_;
    5971           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    5972           0 :   arg2 = 0;
    5973           0 :   if (jarg2) {
    5974           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    5975           0 :     if (!arg2) return 0;
    5976             :   }
    5977           0 :   arg3 = 0;
    5978           0 :   if (jarg3) {
    5979           0 :     arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    5980           0 :     if (!arg3) return 0;
    5981             :   }
    5982           0 :   arg4 = 0;
    5983           0 :   if (jarg4) {
    5984           0 :     arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
    5985           0 :     if (!arg4) return 0;
    5986             :   }
    5987           0 :   arg5 = (double)jarg5; 
    5988           0 :   arg6 = (double)jarg6; 
    5989           0 :   arg7 = 0;
    5990           0 :   if (jarg7) {
    5991           0 :     arg7 = (char *)jenv->GetStringUTFChars(jarg7, 0);
    5992           0 :     if (!arg7) return 0;
    5993             :   }
    5994           0 :   arg8 = (double)jarg8; 
    5995           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetGeogCS__SWIG_0(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,(char const *)arg7,arg8);
    5996             :   {
    5997             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    5998           0 :     if (result != 0 && bUseExceptions) {
    5999           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6000             :         OGRErrMessages(result));
    6001           0 :       return 0;
    6002             :     }
    6003           0 :     jresult = (jint)result;
    6004             :   }
    6005           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    6006           0 :   if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    6007           0 :   if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
    6008           0 :   if (arg7) jenv->ReleaseStringUTFChars(jarg7, (const char *)arg7);
    6009             :   {
    6010             :     /* %typemap(ret) OGRErr */
    6011             :   }
    6012           0 :   return jresult;
    6013             : }
    6014             : 
    6015             : 
    6016           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetGeogCS_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4, jdouble jarg5, jdouble jarg6, jstring jarg7) {
    6017           0 :   jint jresult = 0 ;
    6018           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6019           0 :   char *arg2 = (char *) 0 ;
    6020           0 :   char *arg3 = (char *) 0 ;
    6021           0 :   char *arg4 = (char *) 0 ;
    6022             :   double arg5 ;
    6023             :   double arg6 ;
    6024           0 :   char *arg7 = (char *) 0 ;
    6025             :   OGRErr result;
    6026             :   
    6027             :   (void)jenv;
    6028             :   (void)jcls;
    6029             :   (void)jarg1_;
    6030           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6031           0 :   arg2 = 0;
    6032           0 :   if (jarg2) {
    6033           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    6034           0 :     if (!arg2) return 0;
    6035             :   }
    6036           0 :   arg3 = 0;
    6037           0 :   if (jarg3) {
    6038           0 :     arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    6039           0 :     if (!arg3) return 0;
    6040             :   }
    6041           0 :   arg4 = 0;
    6042           0 :   if (jarg4) {
    6043           0 :     arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
    6044           0 :     if (!arg4) return 0;
    6045             :   }
    6046           0 :   arg5 = (double)jarg5; 
    6047           0 :   arg6 = (double)jarg6; 
    6048           0 :   arg7 = 0;
    6049           0 :   if (jarg7) {
    6050           0 :     arg7 = (char *)jenv->GetStringUTFChars(jarg7, 0);
    6051           0 :     if (!arg7) return 0;
    6052             :   }
    6053           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetGeogCS__SWIG_0(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,(char const *)arg7);
    6054             :   {
    6055             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6056           0 :     if (result != 0 && bUseExceptions) {
    6057           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6058             :         OGRErrMessages(result));
    6059           0 :       return 0;
    6060             :     }
    6061           0 :     jresult = (jint)result;
    6062             :   }
    6063           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    6064           0 :   if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    6065           0 :   if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
    6066           0 :   if (arg7) jenv->ReleaseStringUTFChars(jarg7, (const char *)arg7);
    6067             :   {
    6068             :     /* %typemap(ret) OGRErr */
    6069             :   }
    6070           0 :   return jresult;
    6071             : }
    6072             : 
    6073             : 
    6074           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetGeogCS_1_1SWIG_14(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4, jdouble jarg5, jdouble jarg6) {
    6075           0 :   jint jresult = 0 ;
    6076           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6077           0 :   char *arg2 = (char *) 0 ;
    6078           0 :   char *arg3 = (char *) 0 ;
    6079           0 :   char *arg4 = (char *) 0 ;
    6080             :   double arg5 ;
    6081             :   double arg6 ;
    6082             :   OGRErr result;
    6083             :   
    6084             :   (void)jenv;
    6085             :   (void)jcls;
    6086             :   (void)jarg1_;
    6087           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6088           0 :   arg2 = 0;
    6089           0 :   if (jarg2) {
    6090           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    6091           0 :     if (!arg2) return 0;
    6092             :   }
    6093           0 :   arg3 = 0;
    6094           0 :   if (jarg3) {
    6095           0 :     arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    6096           0 :     if (!arg3) return 0;
    6097             :   }
    6098           0 :   arg4 = 0;
    6099           0 :   if (jarg4) {
    6100           0 :     arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
    6101           0 :     if (!arg4) return 0;
    6102             :   }
    6103           0 :   arg5 = (double)jarg5; 
    6104           0 :   arg6 = (double)jarg6; 
    6105           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetGeogCS__SWIG_0(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6);
    6106             :   {
    6107             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6108           0 :     if (result != 0 && bUseExceptions) {
    6109           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6110             :         OGRErrMessages(result));
    6111           0 :       return 0;
    6112             :     }
    6113           0 :     jresult = (jint)result;
    6114             :   }
    6115           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    6116           0 :   if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    6117           0 :   if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
    6118             :   {
    6119             :     /* %typemap(ret) OGRErr */
    6120             :   }
    6121           0 :   return jresult;
    6122             : }
    6123             : 
    6124             : 
    6125           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetProjCS_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    6126           0 :   jint jresult = 0 ;
    6127           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6128           0 :   char *arg2 = (char *) 0 ;
    6129             :   OGRErr result;
    6130             :   
    6131             :   (void)jenv;
    6132             :   (void)jcls;
    6133             :   (void)jarg1_;
    6134           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6135           0 :   arg2 = 0;
    6136           0 :   if (jarg2) {
    6137           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    6138           0 :     if (!arg2) return 0;
    6139             :   }
    6140             :   {
    6141           0 :     if (!arg2) {
    6142             :       {
    6143           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    6144             :       };
    6145             :     }
    6146             :   }
    6147           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetProjCS__SWIG_0(arg1,(char const *)arg2);
    6148             :   {
    6149             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6150           0 :     if (result != 0 && bUseExceptions) {
    6151           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6152             :         OGRErrMessages(result));
    6153           0 :       return 0;
    6154             :     }
    6155           0 :     jresult = (jint)result;
    6156             :   }
    6157           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    6158             :   {
    6159             :     /* %typemap(ret) OGRErr */
    6160             :   }
    6161           0 :   return jresult;
    6162             : }
    6163             : 
    6164             : 
    6165           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetProjCS_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    6166           0 :   jint jresult = 0 ;
    6167           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6168             :   OGRErr result;
    6169             :   
    6170             :   (void)jenv;
    6171             :   (void)jcls;
    6172             :   (void)jarg1_;
    6173           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6174           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetProjCS__SWIG_0(arg1);
    6175             :   {
    6176             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6177           0 :     if (result != 0 && bUseExceptions) {
    6178           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6179             :         OGRErrMessages(result));
    6180           0 :       return 0;
    6181             :     }
    6182           0 :     jresult = (jint)result;
    6183             :   }
    6184             :   {
    6185             :     /* %typemap(ret) OGRErr */
    6186             :   }
    6187           0 :   return jresult;
    6188             : }
    6189             : 
    6190             : 
    6191           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetGeocCS_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    6192           0 :   jint jresult = 0 ;
    6193           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6194           0 :   char *arg2 = (char *) 0 ;
    6195             :   OGRErr result;
    6196             :   
    6197             :   (void)jenv;
    6198             :   (void)jcls;
    6199             :   (void)jarg1_;
    6200           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6201           0 :   arg2 = 0;
    6202           0 :   if (jarg2) {
    6203           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    6204           0 :     if (!arg2) return 0;
    6205             :   }
    6206             :   {
    6207           0 :     if (!arg2) {
    6208             :       {
    6209           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    6210             :       };
    6211             :     }
    6212             :   }
    6213           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetGeocCS__SWIG_0(arg1,(char const *)arg2);
    6214             :   {
    6215             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6216           0 :     if (result != 0 && bUseExceptions) {
    6217           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6218             :         OGRErrMessages(result));
    6219           0 :       return 0;
    6220             :     }
    6221           0 :     jresult = (jint)result;
    6222             :   }
    6223           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    6224             :   {
    6225             :     /* %typemap(ret) OGRErr */
    6226             :   }
    6227           0 :   return jresult;
    6228             : }
    6229             : 
    6230             : 
    6231           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetGeocCS_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    6232           0 :   jint jresult = 0 ;
    6233           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6234             :   OGRErr result;
    6235             :   
    6236             :   (void)jenv;
    6237             :   (void)jcls;
    6238             :   (void)jarg1_;
    6239           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6240           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetGeocCS__SWIG_0(arg1);
    6241             :   {
    6242             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6243           0 :     if (result != 0 && bUseExceptions) {
    6244           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6245             :         OGRErrMessages(result));
    6246           0 :       return 0;
    6247             :     }
    6248           0 :     jresult = (jint)result;
    6249             :   }
    6250             :   {
    6251             :     /* %typemap(ret) OGRErr */
    6252             :   }
    6253           0 :   return jresult;
    6254             : }
    6255             : 
    6256             : 
    6257           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetVertCS_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jint jarg4) {
    6258           0 :   jint jresult = 0 ;
    6259           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6260           0 :   char *arg2 = (char *) 0 ;
    6261           0 :   char *arg3 = (char *) 0 ;
    6262             :   int arg4 ;
    6263             :   OGRErr result;
    6264             :   
    6265             :   (void)jenv;
    6266             :   (void)jcls;
    6267             :   (void)jarg1_;
    6268           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6269           0 :   arg2 = 0;
    6270           0 :   if (jarg2) {
    6271           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    6272           0 :     if (!arg2) return 0;
    6273             :   }
    6274           0 :   arg3 = 0;
    6275           0 :   if (jarg3) {
    6276           0 :     arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    6277           0 :     if (!arg3) return 0;
    6278             :   }
    6279           0 :   arg4 = (int)jarg4; 
    6280           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetVertCS__SWIG_0(arg1,(char const *)arg2,(char const *)arg3,arg4);
    6281             :   {
    6282             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6283           0 :     if (result != 0 && bUseExceptions) {
    6284           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6285             :         OGRErrMessages(result));
    6286           0 :       return 0;
    6287             :     }
    6288           0 :     jresult = (jint)result;
    6289             :   }
    6290           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    6291           0 :   if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    6292             :   {
    6293             :     /* %typemap(ret) OGRErr */
    6294             :   }
    6295           0 :   return jresult;
    6296             : }
    6297             : 
    6298             : 
    6299           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetVertCS_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
    6300           0 :   jint jresult = 0 ;
    6301           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6302           0 :   char *arg2 = (char *) 0 ;
    6303           0 :   char *arg3 = (char *) 0 ;
    6304             :   OGRErr result;
    6305             :   
    6306             :   (void)jenv;
    6307             :   (void)jcls;
    6308             :   (void)jarg1_;
    6309           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6310           0 :   arg2 = 0;
    6311           0 :   if (jarg2) {
    6312           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    6313           0 :     if (!arg2) return 0;
    6314             :   }
    6315           0 :   arg3 = 0;
    6316           0 :   if (jarg3) {
    6317           0 :     arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    6318           0 :     if (!arg3) return 0;
    6319             :   }
    6320           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetVertCS__SWIG_0(arg1,(char const *)arg2,(char const *)arg3);
    6321             :   {
    6322             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6323           0 :     if (result != 0 && bUseExceptions) {
    6324           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6325             :         OGRErrMessages(result));
    6326           0 :       return 0;
    6327             :     }
    6328           0 :     jresult = (jint)result;
    6329             :   }
    6330           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    6331           0 :   if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    6332             :   {
    6333             :     /* %typemap(ret) OGRErr */
    6334             :   }
    6335           0 :   return jresult;
    6336             : }
    6337             : 
    6338             : 
    6339           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetVertCS_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    6340           0 :   jint jresult = 0 ;
    6341           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6342           0 :   char *arg2 = (char *) 0 ;
    6343             :   OGRErr result;
    6344             :   
    6345             :   (void)jenv;
    6346             :   (void)jcls;
    6347             :   (void)jarg1_;
    6348           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6349           0 :   arg2 = 0;
    6350           0 :   if (jarg2) {
    6351           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    6352           0 :     if (!arg2) return 0;
    6353             :   }
    6354           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetVertCS__SWIG_0(arg1,(char const *)arg2);
    6355             :   {
    6356             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6357           0 :     if (result != 0 && bUseExceptions) {
    6358           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6359             :         OGRErrMessages(result));
    6360           0 :       return 0;
    6361             :     }
    6362           0 :     jresult = (jint)result;
    6363             :   }
    6364           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    6365             :   {
    6366             :     /* %typemap(ret) OGRErr */
    6367             :   }
    6368           0 :   return jresult;
    6369             : }
    6370             : 
    6371             : 
    6372           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetVertCS_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    6373           0 :   jint jresult = 0 ;
    6374           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6375             :   OGRErr result;
    6376             :   
    6377             :   (void)jenv;
    6378             :   (void)jcls;
    6379             :   (void)jarg1_;
    6380           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6381           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetVertCS__SWIG_0(arg1);
    6382             :   {
    6383             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6384           0 :     if (result != 0 && bUseExceptions) {
    6385           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6386             :         OGRErrMessages(result));
    6387           0 :       return 0;
    6388             :     }
    6389           0 :     jresult = (jint)result;
    6390             :   }
    6391             :   {
    6392             :     /* %typemap(ret) OGRErr */
    6393             :   }
    6394           0 :   return jresult;
    6395             : }
    6396             : 
    6397             : 
    6398           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1SetCompoundCS(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_, jlong jarg4, jobject jarg4_) {
    6399           0 :   jint jresult = 0 ;
    6400           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6401           0 :   char *arg2 = (char *) 0 ;
    6402           0 :   OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) 0 ;
    6403           0 :   OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
    6404             :   OGRErr result;
    6405             :   
    6406             :   (void)jenv;
    6407             :   (void)jcls;
    6408             :   (void)jarg1_;
    6409             :   (void)jarg3_;
    6410             :   (void)jarg4_;
    6411           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6412           0 :   arg2 = 0;
    6413           0 :   if (jarg2) {
    6414           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    6415           0 :     if (!arg2) return 0;
    6416             :   }
    6417           0 :   arg3 = *(OSRSpatialReferenceShadow **)&jarg3; 
    6418           0 :   arg4 = *(OSRSpatialReferenceShadow **)&jarg4; 
    6419             :   {
    6420           0 :     if (!arg2) {
    6421             :       {
    6422           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    6423             :       };
    6424             :     }
    6425             :   }
    6426             :   {
    6427           0 :     if (!arg3) {
    6428             :       {
    6429           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    6430             :       };
    6431             :     }
    6432             :   }
    6433             :   {
    6434           0 :     if (!arg4) {
    6435             :       {
    6436           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    6437             :       };
    6438             :     }
    6439             :   }
    6440           0 :   result = (OGRErr)OSRSpatialReferenceShadow_SetCompoundCS(arg1,(char const *)arg2,arg3,arg4);
    6441             :   {
    6442             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6443           0 :     if (result != 0 && bUseExceptions) {
    6444           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6445             :         OGRErrMessages(result));
    6446           0 :       return 0;
    6447             :     }
    6448           0 :     jresult = (jint)result;
    6449             :   }
    6450           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    6451             :   {
    6452             :     /* %typemap(ret) OGRErr */
    6453             :   }
    6454           0 :   return jresult;
    6455             : }
    6456             : 
    6457             : 
    6458           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromWkt(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    6459           0 :   jint jresult = 0 ;
    6460           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6461           0 :   char **arg2 = (char **) 0 ;
    6462             :   char *ori_val2 ;
    6463             :   char *val2 ;
    6464             :   OGRErr result;
    6465             :   
    6466             :   (void)jenv;
    6467             :   (void)jcls;
    6468             :   (void)jarg1_;
    6469           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6470             :   {
    6471             :     /* %typemap(in) (char **ignorechange) */
    6472           0 :     ori_val2 = val2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    6473           0 :     arg2 = &val2;
    6474             :   }
    6475           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromWkt(arg1,arg2);
    6476             :   {
    6477             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6478           0 :     if (result != 0 && bUseExceptions) {
    6479           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6480             :         OGRErrMessages(result));
    6481           0 :       return 0;
    6482             :     }
    6483           0 :     jresult = (jint)result;
    6484             :   }
    6485             :   {
    6486             :     /* %typemap(freearg) (char **ignorechange) */
    6487           0 :     jenv->ReleaseStringUTFChars(jarg2, ori_val2);
    6488             :   }
    6489             :   {
    6490             :     /* %typemap(ret) OGRErr */
    6491             :   }
    6492           0 :   return jresult;
    6493             : }
    6494             : 
    6495             : 
    6496           2 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromProj4(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    6497           2 :   jint jresult = 0 ;
    6498           2 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6499           2 :   char *arg2 = (char *) 0 ;
    6500             :   OGRErr result;
    6501             :   
    6502             :   (void)jenv;
    6503             :   (void)jcls;
    6504             :   (void)jarg1_;
    6505           2 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6506           2 :   arg2 = 0;
    6507           2 :   if (jarg2) {
    6508           2 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    6509           2 :     if (!arg2) return 0;
    6510             :   }
    6511           2 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromProj4(arg1,arg2);
    6512             :   {
    6513             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6514           2 :     if (result != 0 && bUseExceptions) {
    6515           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6516             :         OGRErrMessages(result));
    6517           0 :       return 0;
    6518             :     }
    6519           2 :     jresult = (jint)result;
    6520             :   }
    6521           2 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    6522             :   {
    6523             :     /* %typemap(ret) OGRErr */
    6524             :   }
    6525           2 :   return jresult;
    6526             : }
    6527             : 
    6528             : 
    6529           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromUrl(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    6530           0 :   jint jresult = 0 ;
    6531           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6532           0 :   char *arg2 = (char *) 0 ;
    6533             :   OGRErr result;
    6534             :   
    6535             :   (void)jenv;
    6536             :   (void)jcls;
    6537             :   (void)jarg1_;
    6538           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6539           0 :   arg2 = 0;
    6540           0 :   if (jarg2) {
    6541           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    6542           0 :     if (!arg2) return 0;
    6543             :   }
    6544             :   {
    6545           0 :     if (!arg2) {
    6546             :       {
    6547           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    6548             :       };
    6549             :     }
    6550             :   }
    6551           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUrl(arg1,arg2);
    6552             :   {
    6553             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6554           0 :     if (result != 0 && bUseExceptions) {
    6555           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6556             :         OGRErrMessages(result));
    6557           0 :       return 0;
    6558             :     }
    6559           0 :     jresult = (jint)result;
    6560             :   }
    6561           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    6562             :   {
    6563             :     /* %typemap(ret) OGRErr */
    6564             :   }
    6565           0 :   return jresult;
    6566             : }
    6567             : 
    6568             : 
    6569           1 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromESRI(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobject jarg2) {
    6570           1 :   jint jresult = 0 ;
    6571           1 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6572           1 :   char **arg2 = (char **) 0 ;
    6573             :   OGRErr result;
    6574             :   
    6575             :   (void)jenv;
    6576             :   (void)jcls;
    6577             :   (void)jarg1_;
    6578           1 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6579             :   {
    6580             :     /* %typemap(in) char **options */
    6581           1 :     arg2 = NULL;
    6582           1 :     if(jarg2 != 0) {
    6583           1 :       const jclass vector = jenv->FindClass("java/util/Vector");
    6584           1 :       const jclass enumeration = jenv->FindClass("java/util/Enumeration");
    6585           1 :       const jclass stringClass = jenv->FindClass("java/lang/String");
    6586           1 :       const jmethodID elements = jenv->GetMethodID(vector, "elements",
    6587             :         "()Ljava/util/Enumeration;");
    6588           1 :       const jmethodID hasMoreElements = jenv->GetMethodID(enumeration,
    6589             :         "hasMoreElements", "()Z");
    6590           1 :       const jmethodID getNextElement = jenv->GetMethodID(enumeration,
    6591             :         "nextElement", "()Ljava/lang/Object;");
    6592           1 :       if(vector == NULL || enumeration == NULL || elements == NULL ||
    6593           1 :         hasMoreElements == NULL || getNextElement == NULL) {
    6594           0 :         fprintf(stderr, "Could not load (options **) jni types.\n");
    6595           0 :         return 0;
    6596             :       }
    6597          19 :       for (jobject keys = jenv->CallObjectMethod(jarg2, elements);
    6598          19 :         jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
    6599          18 :         jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
    6600          18 :         if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
    6601             :         {
    6602           0 :           CSLDestroy(arg2);
    6603           0 :           SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
    6604           0 :           return 0;
    6605             :         }
    6606          18 :         const char *valptr = jenv->GetStringUTFChars(value, 0);
    6607          18 :         arg2 = CSLAddString(arg2,  valptr);
    6608          18 :         jenv->ReleaseStringUTFChars(value, valptr);
    6609             :       }
    6610             :     }
    6611             :   }
    6612           1 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromESRI(arg1,arg2);
    6613             :   {
    6614             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6615           1 :     if (result != 0 && bUseExceptions) {
    6616           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6617             :         OGRErrMessages(result));
    6618           0 :       return 0;
    6619             :     }
    6620           1 :     jresult = (jint)result;
    6621             :   }
    6622             :   {
    6623             :     /* %typemap(freearg) char **options */
    6624           1 :     CSLDestroy( arg2 );
    6625             :   }
    6626             :   {
    6627             :     /* %typemap(ret) OGRErr */
    6628             :   }
    6629           1 :   return jresult;
    6630             : }
    6631             : 
    6632             : 
    6633           3 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromEPSG(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    6634           3 :   jint jresult = 0 ;
    6635           3 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6636             :   int arg2 ;
    6637             :   OGRErr result;
    6638             :   
    6639             :   (void)jenv;
    6640             :   (void)jcls;
    6641             :   (void)jarg1_;
    6642           3 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6643           3 :   arg2 = (int)jarg2; 
    6644           3 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSG(arg1,arg2);
    6645             :   {
    6646             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6647           3 :     if (result != 0 && bUseExceptions) {
    6648           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6649             :         OGRErrMessages(result));
    6650           0 :       return 0;
    6651             :     }
    6652           3 :     jresult = (jint)result;
    6653             :   }
    6654             :   {
    6655             :     /* %typemap(ret) OGRErr */
    6656             :   }
    6657           3 :   return jresult;
    6658             : }
    6659             : 
    6660             : 
    6661           1 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromEPSGA(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    6662           1 :   jint jresult = 0 ;
    6663           1 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6664             :   int arg2 ;
    6665             :   OGRErr result;
    6666             :   
    6667             :   (void)jenv;
    6668             :   (void)jcls;
    6669             :   (void)jarg1_;
    6670           1 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6671           1 :   arg2 = (int)jarg2; 
    6672           1 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSGA(arg1,arg2);
    6673             :   {
    6674             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6675           1 :     if (result != 0 && bUseExceptions) {
    6676           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6677             :         OGRErrMessages(result));
    6678           0 :       return 0;
    6679             :     }
    6680           1 :     jresult = (jint)result;
    6681             :   }
    6682             :   {
    6683             :     /* %typemap(ret) OGRErr */
    6684             :   }
    6685           1 :   return jresult;
    6686             : }
    6687             : 
    6688             : 
    6689           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromPCI_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jdoubleArray jarg4) {
    6690           0 :   jint jresult = 0 ;
    6691           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6692           0 :   char *arg2 = (char *) 0 ;
    6693           0 :   char *arg3 = (char *) 0 ;
    6694             :   double *arg4 ;
    6695             :   OGRErr result;
    6696             :   
    6697             :   (void)jenv;
    6698             :   (void)jcls;
    6699             :   (void)jarg1_;
    6700           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6701           0 :   arg2 = 0;
    6702           0 :   if (jarg2) {
    6703           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    6704           0 :     if (!arg2) return 0;
    6705             :   }
    6706           0 :   arg3 = 0;
    6707           0 :   if (jarg3) {
    6708           0 :     arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    6709           0 :     if (!arg3) return 0;
    6710             :   }
    6711             :   {
    6712             :     /* %typemap(in) (double argin[ANY]) */
    6713           0 :     if(jarg4 == NULL || jenv->GetArrayLength(jarg4) != 17) {
    6714             :       char errorMsg[128];
    6715           0 :       snprintf(errorMsg, sizeof(errorMsg), "array of size %d expected", 17);
    6716           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, errorMsg);
    6717           0 :       return 0;
    6718             :     }
    6719           0 :     arg4 = (double *)jenv->GetDoubleArrayElements(jarg4, NULL);
    6720             :   }
    6721           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromPCI__SWIG_0(arg1,(char const *)arg2,(char const *)arg3,arg4);
    6722             :   {
    6723             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6724           0 :     if (result != 0 && bUseExceptions) {
    6725           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6726             :         OGRErrMessages(result));
    6727           0 :       return 0;
    6728             :     }
    6729           0 :     jresult = (jint)result;
    6730             :   }
    6731             :   {
    6732             :     /* %typemap(argout) (double argin[ANY]) */
    6733             :   }
    6734           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    6735           0 :   if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    6736             :   {
    6737             :     /* %typemap(freearg) (double argin[ANY]) */
    6738           0 :     if(arg4) {
    6739           0 :       jenv->ReleaseDoubleArrayElements(jarg4, (jdouble *)arg4, JNI_ABORT);
    6740             :     }
    6741             :   }
    6742             :   {
    6743             :     /* %typemap(ret) OGRErr */
    6744             :   }
    6745           0 :   return jresult;
    6746             : }
    6747             : 
    6748             : 
    6749           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromPCI_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3) {
    6750           0 :   jint jresult = 0 ;
    6751           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6752           0 :   char *arg2 = (char *) 0 ;
    6753           0 :   char *arg3 = (char *) 0 ;
    6754             :   OGRErr result;
    6755             :   
    6756             :   (void)jenv;
    6757             :   (void)jcls;
    6758             :   (void)jarg1_;
    6759           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6760           0 :   arg2 = 0;
    6761           0 :   if (jarg2) {
    6762           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    6763           0 :     if (!arg2) return 0;
    6764             :   }
    6765           0 :   arg3 = 0;
    6766           0 :   if (jarg3) {
    6767           0 :     arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    6768           0 :     if (!arg3) return 0;
    6769             :   }
    6770           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromPCI__SWIG_0(arg1,(char const *)arg2,(char const *)arg3);
    6771             :   {
    6772             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6773           0 :     if (result != 0 && bUseExceptions) {
    6774           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6775             :         OGRErrMessages(result));
    6776           0 :       return 0;
    6777             :     }
    6778           0 :     jresult = (jint)result;
    6779             :   }
    6780           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    6781           0 :   if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    6782             :   {
    6783             :     /* %typemap(ret) OGRErr */
    6784             :   }
    6785           0 :   return jresult;
    6786             : }
    6787             : 
    6788             : 
    6789           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromPCI_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    6790           0 :   jint jresult = 0 ;
    6791           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6792           0 :   char *arg2 = (char *) 0 ;
    6793             :   OGRErr result;
    6794             :   
    6795             :   (void)jenv;
    6796             :   (void)jcls;
    6797             :   (void)jarg1_;
    6798           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6799           0 :   arg2 = 0;
    6800           0 :   if (jarg2) {
    6801           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    6802           0 :     if (!arg2) return 0;
    6803             :   }
    6804           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromPCI__SWIG_0(arg1,(char const *)arg2);
    6805             :   {
    6806             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6807           0 :     if (result != 0 && bUseExceptions) {
    6808           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6809             :         OGRErrMessages(result));
    6810           0 :       return 0;
    6811             :     }
    6812           0 :     jresult = (jint)result;
    6813             :   }
    6814           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    6815             :   {
    6816             :     /* %typemap(ret) OGRErr */
    6817             :   }
    6818           0 :   return jresult;
    6819             : }
    6820             : 
    6821             : 
    6822           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromUSGS_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jdoubleArray jarg4, jint jarg5) {
    6823           0 :   jint jresult = 0 ;
    6824           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6825             :   long arg2 ;
    6826             :   long arg3 ;
    6827             :   double *arg4 ;
    6828             :   long arg5 ;
    6829             :   OGRErr result;
    6830             :   
    6831             :   (void)jenv;
    6832             :   (void)jcls;
    6833             :   (void)jarg1_;
    6834           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6835           0 :   arg2 = (long)jarg2; 
    6836           0 :   arg3 = (long)jarg3; 
    6837             :   {
    6838             :     /* %typemap(in) (double argin[ANY]) */
    6839           0 :     if(jarg4 == NULL || jenv->GetArrayLength(jarg4) != 15) {
    6840             :       char errorMsg[128];
    6841           0 :       snprintf(errorMsg, sizeof(errorMsg), "array of size %d expected", 15);
    6842           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, errorMsg);
    6843           0 :       return 0;
    6844             :     }
    6845           0 :     arg4 = (double *)jenv->GetDoubleArrayElements(jarg4, NULL);
    6846             :   }
    6847           0 :   arg5 = (long)jarg5; 
    6848           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUSGS__SWIG_0(arg1,arg2,arg3,arg4,arg5);
    6849             :   {
    6850             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6851           0 :     if (result != 0 && bUseExceptions) {
    6852           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6853             :         OGRErrMessages(result));
    6854           0 :       return 0;
    6855             :     }
    6856           0 :     jresult = (jint)result;
    6857             :   }
    6858             :   {
    6859             :     /* %typemap(argout) (double argin[ANY]) */
    6860             :   }
    6861             :   {
    6862             :     /* %typemap(freearg) (double argin[ANY]) */
    6863           0 :     if(arg4) {
    6864           0 :       jenv->ReleaseDoubleArrayElements(jarg4, (jdouble *)arg4, JNI_ABORT);
    6865             :     }
    6866             :   }
    6867             :   {
    6868             :     /* %typemap(ret) OGRErr */
    6869             :   }
    6870           0 :   return jresult;
    6871             : }
    6872             : 
    6873             : 
    6874           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromUSGS_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3, jdoubleArray jarg4) {
    6875           0 :   jint jresult = 0 ;
    6876           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6877             :   long arg2 ;
    6878             :   long arg3 ;
    6879             :   double *arg4 ;
    6880             :   OGRErr result;
    6881             :   
    6882             :   (void)jenv;
    6883             :   (void)jcls;
    6884             :   (void)jarg1_;
    6885           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6886           0 :   arg2 = (long)jarg2; 
    6887           0 :   arg3 = (long)jarg3; 
    6888             :   {
    6889             :     /* %typemap(in) (double argin[ANY]) */
    6890           0 :     if(jarg4 == NULL || jenv->GetArrayLength(jarg4) != 15) {
    6891             :       char errorMsg[128];
    6892           0 :       snprintf(errorMsg, sizeof(errorMsg), "array of size %d expected", 15);
    6893           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, errorMsg);
    6894           0 :       return 0;
    6895             :     }
    6896           0 :     arg4 = (double *)jenv->GetDoubleArrayElements(jarg4, NULL);
    6897             :   }
    6898           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUSGS__SWIG_0(arg1,arg2,arg3,arg4);
    6899             :   {
    6900             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6901           0 :     if (result != 0 && bUseExceptions) {
    6902           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6903             :         OGRErrMessages(result));
    6904           0 :       return 0;
    6905             :     }
    6906           0 :     jresult = (jint)result;
    6907             :   }
    6908             :   {
    6909             :     /* %typemap(argout) (double argin[ANY]) */
    6910             :   }
    6911             :   {
    6912             :     /* %typemap(freearg) (double argin[ANY]) */
    6913           0 :     if(arg4) {
    6914           0 :       jenv->ReleaseDoubleArrayElements(jarg4, (jdouble *)arg4, JNI_ABORT);
    6915             :     }
    6916             :   }
    6917             :   {
    6918             :     /* %typemap(ret) OGRErr */
    6919             :   }
    6920           0 :   return jresult;
    6921             : }
    6922             : 
    6923             : 
    6924           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromUSGS_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3) {
    6925           0 :   jint jresult = 0 ;
    6926           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6927             :   long arg2 ;
    6928             :   long arg3 ;
    6929             :   OGRErr result;
    6930             :   
    6931             :   (void)jenv;
    6932             :   (void)jcls;
    6933             :   (void)jarg1_;
    6934           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6935           0 :   arg2 = (long)jarg2; 
    6936           0 :   arg3 = (long)jarg3; 
    6937           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUSGS__SWIG_0(arg1,arg2,arg3);
    6938             :   {
    6939             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6940           0 :     if (result != 0 && bUseExceptions) {
    6941           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6942             :         OGRErrMessages(result));
    6943           0 :       return 0;
    6944             :     }
    6945           0 :     jresult = (jint)result;
    6946             :   }
    6947             :   {
    6948             :     /* %typemap(ret) OGRErr */
    6949             :   }
    6950           0 :   return jresult;
    6951             : }
    6952             : 
    6953             : 
    6954           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromUSGS_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
    6955           0 :   jint jresult = 0 ;
    6956           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6957             :   long arg2 ;
    6958             :   OGRErr result;
    6959             :   
    6960             :   (void)jenv;
    6961             :   (void)jcls;
    6962             :   (void)jarg1_;
    6963           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6964           0 :   arg2 = (long)jarg2; 
    6965           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUSGS__SWIG_0(arg1,arg2);
    6966             :   {
    6967             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    6968           0 :     if (result != 0 && bUseExceptions) {
    6969           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    6970             :         OGRErrMessages(result));
    6971           0 :       return 0;
    6972             :     }
    6973           0 :     jresult = (jint)result;
    6974             :   }
    6975             :   {
    6976             :     /* %typemap(ret) OGRErr */
    6977             :   }
    6978           0 :   return jresult;
    6979             : }
    6980             : 
    6981             : 
    6982           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromXML(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    6983           0 :   jint jresult = 0 ;
    6984           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    6985           0 :   char *arg2 = (char *) 0 ;
    6986             :   OGRErr result;
    6987             :   
    6988             :   (void)jenv;
    6989             :   (void)jcls;
    6990             :   (void)jarg1_;
    6991           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    6992           0 :   arg2 = 0;
    6993           0 :   if (jarg2) {
    6994           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    6995           0 :     if (!arg2) return 0;
    6996             :   }
    6997           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromXML(arg1,(char const *)arg2);
    6998             :   {
    6999             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    7000           0 :     if (result != 0 && bUseExceptions) {
    7001           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    7002             :         OGRErrMessages(result));
    7003           0 :       return 0;
    7004             :     }
    7005           0 :     jresult = (jint)result;
    7006             :   }
    7007           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    7008             :   {
    7009             :     /* %typemap(ret) OGRErr */
    7010             :   }
    7011           0 :   return jresult;
    7012             : }
    7013             : 
    7014             : 
    7015           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromERM(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jstring jarg4) {
    7016           0 :   jint jresult = 0 ;
    7017           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    7018           0 :   char *arg2 = (char *) 0 ;
    7019           0 :   char *arg3 = (char *) 0 ;
    7020           0 :   char *arg4 = (char *) 0 ;
    7021             :   OGRErr result;
    7022             :   
    7023             :   (void)jenv;
    7024             :   (void)jcls;
    7025             :   (void)jarg1_;
    7026           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    7027           0 :   arg2 = 0;
    7028           0 :   if (jarg2) {
    7029           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    7030           0 :     if (!arg2) return 0;
    7031             :   }
    7032           0 :   arg3 = 0;
    7033           0 :   if (jarg3) {
    7034           0 :     arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    7035           0 :     if (!arg3) return 0;
    7036             :   }
    7037           0 :   arg4 = 0;
    7038           0 :   if (jarg4) {
    7039           0 :     arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
    7040           0 :     if (!arg4) return 0;
    7041             :   }
    7042             :   {
    7043           0 :     if (!arg2) {
    7044             :       {
    7045           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    7046             :       };
    7047             :     }
    7048             :   }
    7049             :   {
    7050           0 :     if (!arg3) {
    7051             :       {
    7052           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    7053             :       };
    7054             :     }
    7055             :   }
    7056           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromERM(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
    7057             :   {
    7058             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    7059           0 :     if (result != 0 && bUseExceptions) {
    7060           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    7061             :         OGRErrMessages(result));
    7062           0 :       return 0;
    7063             :     }
    7064           0 :     jresult = (jint)result;
    7065             :   }
    7066           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    7067           0 :   if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    7068           0 :   if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
    7069             :   {
    7070             :     /* %typemap(ret) OGRErr */
    7071             :   }
    7072           0 :   return jresult;
    7073             : }
    7074             : 
    7075             : 
    7076           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromMICoordSys(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    7077           0 :   jint jresult = 0 ;
    7078           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    7079           0 :   char *arg2 = (char *) 0 ;
    7080             :   OGRErr result;
    7081             :   
    7082             :   (void)jenv;
    7083             :   (void)jcls;
    7084             :   (void)jarg1_;
    7085           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    7086           0 :   arg2 = 0;
    7087           0 :   if (jarg2) {
    7088           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    7089           0 :     if (!arg2) return 0;
    7090             :   }
    7091           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromMICoordSys(arg1,(char const *)arg2);
    7092             :   {
    7093             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    7094           0 :     if (result != 0 && bUseExceptions) {
    7095           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    7096             :         OGRErrMessages(result));
    7097           0 :       return 0;
    7098             :     }
    7099           0 :     jresult = (jint)result;
    7100             :   }
    7101           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    7102             :   {
    7103             :     /* %typemap(ret) OGRErr */
    7104             :   }
    7105           0 :   return jresult;
    7106             : }
    7107             : 
    7108             : 
    7109           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromISISPVL(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    7110           0 :   jint jresult = 0 ;
    7111           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    7112           0 :   char *arg2 = (char *) 0 ;
    7113             :   OGRErr result;
    7114             :   
    7115             :   (void)jenv;
    7116             :   (void)jcls;
    7117             :   (void)jarg1_;
    7118           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    7119           0 :   arg2 = 0;
    7120           0 :   if (jarg2) {
    7121           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    7122           0 :     if (!arg2) return 0;
    7123             :   }
    7124           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromISISPVL(arg1,(char const *)arg2);
    7125             :   {
    7126             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    7127           0 :     if (result != 0 && bUseExceptions) {
    7128           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    7129             :         OGRErrMessages(result));
    7130           0 :       return 0;
    7131             :     }
    7132           0 :     jresult = (jint)result;
    7133             :   }
    7134           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    7135             :   {
    7136             :     /* %typemap(ret) OGRErr */
    7137             :   }
    7138           0 :   return jresult;
    7139             : }
    7140             : 
    7141             : 
    7142           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromOzi(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobject jarg2) {
    7143           0 :   jint jresult = 0 ;
    7144           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    7145           0 :   char **arg2 = (char **) 0 ;
    7146             :   OGRErr result;
    7147             :   
    7148             :   (void)jenv;
    7149             :   (void)jcls;
    7150             :   (void)jarg1_;
    7151           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    7152             :   {
    7153             :     /* %typemap(in) char **options */
    7154           0 :     arg2 = NULL;
    7155           0 :     if(jarg2 != 0) {
    7156           0 :       const jclass vector = jenv->FindClass("java/util/Vector");
    7157           0 :       const jclass enumeration = jenv->FindClass("java/util/Enumeration");
    7158           0 :       const jclass stringClass = jenv->FindClass("java/lang/String");
    7159           0 :       const jmethodID elements = jenv->GetMethodID(vector, "elements",
    7160             :         "()Ljava/util/Enumeration;");
    7161           0 :       const jmethodID hasMoreElements = jenv->GetMethodID(enumeration,
    7162             :         "hasMoreElements", "()Z");
    7163           0 :       const jmethodID getNextElement = jenv->GetMethodID(enumeration,
    7164             :         "nextElement", "()Ljava/lang/Object;");
    7165           0 :       if(vector == NULL || enumeration == NULL || elements == NULL ||
    7166           0 :         hasMoreElements == NULL || getNextElement == NULL) {
    7167           0 :         fprintf(stderr, "Could not load (options **) jni types.\n");
    7168           0 :         return 0;
    7169             :       }
    7170           0 :       for (jobject keys = jenv->CallObjectMethod(jarg2, elements);
    7171           0 :         jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
    7172           0 :         jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
    7173           0 :         if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
    7174             :         {
    7175           0 :           CSLDestroy(arg2);
    7176           0 :           SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
    7177           0 :           return 0;
    7178             :         }
    7179           0 :         const char *valptr = jenv->GetStringUTFChars(value, 0);
    7180           0 :         arg2 = CSLAddString(arg2,  valptr);
    7181           0 :         jenv->ReleaseStringUTFChars(value, valptr);
    7182             :       }
    7183             :     }
    7184             :   }
    7185             :   {
    7186           0 :     if (!arg2) {
    7187             :       {
    7188           0 :         SWIG_JavaException(jenv, SWIG_ValueError, "Received a NULL pointer."); return 0; 
    7189             :       };
    7190             :     }
    7191             :   }
    7192           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromOzi(arg1,(char const *const *)arg2);
    7193             :   {
    7194             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    7195           0 :     if (result != 0 && bUseExceptions) {
    7196           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    7197             :         OGRErrMessages(result));
    7198           0 :       return 0;
    7199             :     }
    7200           0 :     jresult = (jint)result;
    7201             :   }
    7202             :   {
    7203             :     /* %typemap(freearg) char **options */
    7204           0 :     CSLDestroy( arg2 );
    7205             :   }
    7206             :   {
    7207             :     /* %typemap(ret) OGRErr */
    7208             :   }
    7209           0 :   return jresult;
    7210             : }
    7211             : 
    7212             : 
    7213           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromCF1_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobject jarg2, jstring jarg3) {
    7214           0 :   jint jresult = 0 ;
    7215           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    7216           0 :   char **arg2 = (char **) 0 ;
    7217           0 :   char *arg3 = (char *) 0 ;
    7218             :   OGRErr result;
    7219             :   
    7220             :   (void)jenv;
    7221             :   (void)jcls;
    7222             :   (void)jarg1_;
    7223           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    7224             :   {
    7225             :     /* %typemap(in) char **options */
    7226           0 :     arg2 = NULL;
    7227           0 :     if(jarg2 != 0) {
    7228           0 :       const jclass vector = jenv->FindClass("java/util/Vector");
    7229           0 :       const jclass enumeration = jenv->FindClass("java/util/Enumeration");
    7230           0 :       const jclass stringClass = jenv->FindClass("java/lang/String");
    7231           0 :       const jmethodID elements = jenv->GetMethodID(vector, "elements",
    7232             :         "()Ljava/util/Enumeration;");
    7233           0 :       const jmethodID hasMoreElements = jenv->GetMethodID(enumeration,
    7234             :         "hasMoreElements", "()Z");
    7235           0 :       const jmethodID getNextElement = jenv->GetMethodID(enumeration,
    7236             :         "nextElement", "()Ljava/lang/Object;");
    7237           0 :       if(vector == NULL || enumeration == NULL || elements == NULL ||
    7238           0 :         hasMoreElements == NULL || getNextElement == NULL) {
    7239           0 :         fprintf(stderr, "Could not load (options **) jni types.\n");
    7240           0 :         return 0;
    7241             :       }
    7242           0 :       for (jobject keys = jenv->CallObjectMethod(jarg2, elements);
    7243           0 :         jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
    7244           0 :         jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
    7245           0 :         if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
    7246             :         {
    7247           0 :           CSLDestroy(arg2);
    7248           0 :           SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
    7249           0 :           return 0;
    7250             :         }
    7251           0 :         const char *valptr = jenv->GetStringUTFChars(value, 0);
    7252           0 :         arg2 = CSLAddString(arg2,  valptr);
    7253           0 :         jenv->ReleaseStringUTFChars(value, valptr);
    7254             :       }
    7255             :     }
    7256             :   }
    7257           0 :   arg3 = 0;
    7258           0 :   if (jarg3) {
    7259           0 :     arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    7260           0 :     if (!arg3) return 0;
    7261             :   }
    7262           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromCF1__SWIG_0(arg1,arg2,(char const *)arg3);
    7263             :   {
    7264             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    7265           0 :     if (result != 0 && bUseExceptions) {
    7266           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    7267             :         OGRErrMessages(result));
    7268           0 :       return 0;
    7269             :     }
    7270           0 :     jresult = (jint)result;
    7271             :   }
    7272             :   {
    7273             :     /* %typemap(freearg) char **options */
    7274           0 :     CSLDestroy( arg2 );
    7275             :   }
    7276           0 :   if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    7277             :   {
    7278             :     /* %typemap(ret) OGRErr */
    7279             :   }
    7280           0 :   return jresult;
    7281             : }
    7282             : 
    7283             : 
    7284           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ImportFromCF1_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobject jarg2) {
    7285           0 :   jint jresult = 0 ;
    7286           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    7287           0 :   char **arg2 = (char **) 0 ;
    7288             :   OGRErr result;
    7289             :   
    7290             :   (void)jenv;
    7291             :   (void)jcls;
    7292             :   (void)jarg1_;
    7293           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    7294             :   {
    7295             :     /* %typemap(in) char **options */
    7296           0 :     arg2 = NULL;
    7297           0 :     if(jarg2 != 0) {
    7298           0 :       const jclass vector = jenv->FindClass("java/util/Vector");
    7299           0 :       const jclass enumeration = jenv->FindClass("java/util/Enumeration");
    7300           0 :       const jclass stringClass = jenv->FindClass("java/lang/String");
    7301           0 :       const jmethodID elements = jenv->GetMethodID(vector, "elements",
    7302             :         "()Ljava/util/Enumeration;");
    7303           0 :       const jmethodID hasMoreElements = jenv->GetMethodID(enumeration,
    7304             :         "hasMoreElements", "()Z");
    7305           0 :       const jmethodID getNextElement = jenv->GetMethodID(enumeration,
    7306             :         "nextElement", "()Ljava/lang/Object;");
    7307           0 :       if(vector == NULL || enumeration == NULL || elements == NULL ||
    7308           0 :         hasMoreElements == NULL || getNextElement == NULL) {
    7309           0 :         fprintf(stderr, "Could not load (options **) jni types.\n");
    7310           0 :         return 0;
    7311             :       }
    7312           0 :       for (jobject keys = jenv->CallObjectMethod(jarg2, elements);
    7313           0 :         jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
    7314           0 :         jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
    7315           0 :         if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
    7316             :         {
    7317           0 :           CSLDestroy(arg2);
    7318           0 :           SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
    7319           0 :           return 0;
    7320             :         }
    7321           0 :         const char *valptr = jenv->GetStringUTFChars(value, 0);
    7322           0 :         arg2 = CSLAddString(arg2,  valptr);
    7323           0 :         jenv->ReleaseStringUTFChars(value, valptr);
    7324             :       }
    7325             :     }
    7326             :   }
    7327           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ImportFromCF1__SWIG_0(arg1,arg2);
    7328             :   {
    7329             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    7330           0 :     if (result != 0 && bUseExceptions) {
    7331           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    7332             :         OGRErrMessages(result));
    7333           0 :       return 0;
    7334             :     }
    7335           0 :     jresult = (jint)result;
    7336             :   }
    7337             :   {
    7338             :     /* %typemap(freearg) char **options */
    7339           0 :     CSLDestroy( arg2 );
    7340             :   }
    7341             :   {
    7342             :     /* %typemap(ret) OGRErr */
    7343             :   }
    7344           0 :   return jresult;
    7345             : }
    7346             : 
    7347             : 
    7348           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ExportToWkt_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2, jobject jarg3) {
    7349           0 :   jint jresult = 0 ;
    7350           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    7351           0 :   char **arg2 = (char **) 0 ;
    7352           0 :   char **arg3 = (char **) 0 ;
    7353           0 :   char *argout2 = 0 ;
    7354             :   OGRErr result;
    7355             :   
    7356             :   (void)jenv;
    7357             :   (void)jcls;
    7358             :   (void)jarg1_;
    7359           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    7360             :   {
    7361             :     /* %typemap(in) (char **argout2) */
    7362           0 :     arg2 = &argout2;
    7363             :   }
    7364             :   {
    7365             :     /* %typemap(in) char **options */
    7366           0 :     arg3 = NULL;
    7367           0 :     if(jarg3 != 0) {
    7368           0 :       const jclass vector = jenv->FindClass("java/util/Vector");
    7369           0 :       const jclass enumeration = jenv->FindClass("java/util/Enumeration");
    7370           0 :       const jclass stringClass = jenv->FindClass("java/lang/String");
    7371           0 :       const jmethodID elements = jenv->GetMethodID(vector, "elements",
    7372             :         "()Ljava/util/Enumeration;");
    7373           0 :       const jmethodID hasMoreElements = jenv->GetMethodID(enumeration,
    7374             :         "hasMoreElements", "()Z");
    7375           0 :       const jmethodID getNextElement = jenv->GetMethodID(enumeration,
    7376             :         "nextElement", "()Ljava/lang/Object;");
    7377           0 :       if(vector == NULL || enumeration == NULL || elements == NULL ||
    7378           0 :         hasMoreElements == NULL || getNextElement == NULL) {
    7379           0 :         fprintf(stderr, "Could not load (options **) jni types.\n");
    7380           0 :         return 0;
    7381             :       }
    7382           0 :       for (jobject keys = jenv->CallObjectMethod(jarg3, elements);
    7383           0 :         jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
    7384           0 :         jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
    7385           0 :         if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
    7386             :         {
    7387           0 :           CSLDestroy(arg3);
    7388           0 :           SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
    7389           0 :           return 0;
    7390             :         }
    7391           0 :         const char *valptr = jenv->GetStringUTFChars(value, 0);
    7392           0 :         arg3 = CSLAddString(arg3,  valptr);
    7393           0 :         jenv->ReleaseStringUTFChars(value, valptr);
    7394             :       }
    7395             :     }
    7396             :   }
    7397           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ExportToWkt__SWIG_0(arg1,arg2,arg3);
    7398             :   {
    7399             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    7400           0 :     if (result != 0 && bUseExceptions) {
    7401           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    7402             :         OGRErrMessages(result));
    7403           0 :       return 0;
    7404             :     }
    7405           0 :     jresult = (jint)result;
    7406             :   }
    7407             :   {
    7408             :     /* %typemap(argout) (char **argout) */
    7409             :     jstring temp_string;
    7410             :     
    7411           0 :     if(jarg2 != NULL && (int)jenv->GetArrayLength(jarg2) >= 1) {
    7412           0 :       temp_string = SafeNewStringUTF8(jenv, argout2);
    7413           0 :       jenv->SetObjectArrayElement(jarg2, 0, temp_string);
    7414           0 :       jenv->DeleteLocalRef(temp_string);
    7415             :     }
    7416             :   }
    7417             :   {
    7418             :     /* %typemap(freearg) (char **argout) */
    7419           0 :     if(arg2) {
    7420           0 :       CPLFree((void *) argout2);
    7421             :     }
    7422             :   }
    7423             :   {
    7424             :     /* %typemap(freearg) char **options */
    7425           0 :     CSLDestroy( arg3 );
    7426             :   }
    7427             :   {
    7428             :     /* %typemap(ret) OGRErr */
    7429             :   }
    7430           0 :   return jresult;
    7431             : }
    7432             : 
    7433             : 
    7434           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ExportToWkt_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2) {
    7435           0 :   jint jresult = 0 ;
    7436           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    7437           0 :   char **arg2 = (char **) 0 ;
    7438           0 :   char *argout2 = 0 ;
    7439             :   OGRErr result;
    7440             :   
    7441             :   (void)jenv;
    7442             :   (void)jcls;
    7443             :   (void)jarg1_;
    7444           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    7445             :   {
    7446             :     /* %typemap(in) (char **argout2) */
    7447           0 :     arg2 = &argout2;
    7448             :   }
    7449           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ExportToWkt__SWIG_0(arg1,arg2);
    7450             :   {
    7451             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    7452           0 :     if (result != 0 && bUseExceptions) {
    7453           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    7454             :         OGRErrMessages(result));
    7455           0 :       return 0;
    7456             :     }
    7457           0 :     jresult = (jint)result;
    7458             :   }
    7459             :   {
    7460             :     /* %typemap(argout) (char **argout) */
    7461             :     jstring temp_string;
    7462             :     
    7463           0 :     if(jarg2 != NULL && (int)jenv->GetArrayLength(jarg2) >= 1) {
    7464           0 :       temp_string = SafeNewStringUTF8(jenv, argout2);
    7465           0 :       jenv->SetObjectArrayElement(jarg2, 0, temp_string);
    7466           0 :       jenv->DeleteLocalRef(temp_string);
    7467             :     }
    7468             :   }
    7469             :   {
    7470             :     /* %typemap(freearg) (char **argout) */
    7471           0 :     if(arg2) {
    7472           0 :       CPLFree((void *) argout2);
    7473             :     }
    7474             :   }
    7475             :   {
    7476             :     /* %typemap(ret) OGRErr */
    7477             :   }
    7478           0 :   return jresult;
    7479             : }
    7480             : 
    7481             : 
    7482           1 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ExportToPrettyWkt_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2, jint jarg3) {
    7483           1 :   jint jresult = 0 ;
    7484           1 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    7485           1 :   char **arg2 = (char **) 0 ;
    7486             :   int arg3 ;
    7487           1 :   char *argout2 = 0 ;
    7488             :   OGRErr result;
    7489             :   
    7490             :   (void)jenv;
    7491             :   (void)jcls;
    7492             :   (void)jarg1_;
    7493           1 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    7494             :   {
    7495             :     /* %typemap(in) (char **argout2) */
    7496           1 :     arg2 = &argout2;
    7497             :   }
    7498           1 :   arg3 = (int)jarg3; 
    7499           1 :   result = (OGRErr)OSRSpatialReferenceShadow_ExportToPrettyWkt__SWIG_0(arg1,arg2,arg3);
    7500             :   {
    7501             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    7502           1 :     if (result != 0 && bUseExceptions) {
    7503           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    7504             :         OGRErrMessages(result));
    7505           0 :       return 0;
    7506             :     }
    7507           1 :     jresult = (jint)result;
    7508             :   }
    7509             :   {
    7510             :     /* %typemap(argout) (char **argout) */
    7511             :     jstring temp_string;
    7512             :     
    7513           1 :     if(jarg2 != NULL && (int)jenv->GetArrayLength(jarg2) >= 1) {
    7514           1 :       temp_string = SafeNewStringUTF8(jenv, argout2);
    7515           1 :       jenv->SetObjectArrayElement(jarg2, 0, temp_string);
    7516           1 :       jenv->DeleteLocalRef(temp_string);
    7517             :     }
    7518             :   }
    7519             :   {
    7520             :     /* %typemap(freearg) (char **argout) */
    7521           1 :     if(arg2) {
    7522           1 :       CPLFree((void *) argout2);
    7523             :     }
    7524             :   }
    7525             :   {
    7526             :     /* %typemap(ret) OGRErr */
    7527             :   }
    7528           1 :   return jresult;
    7529             : }
    7530             : 
    7531             : 
    7532           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ExportToPrettyWkt_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2) {
    7533           0 :   jint jresult = 0 ;
    7534           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    7535           0 :   char **arg2 = (char **) 0 ;
    7536           0 :   char *argout2 = 0 ;
    7537             :   OGRErr result;
    7538             :   
    7539             :   (void)jenv;
    7540             :   (void)jcls;
    7541             :   (void)jarg1_;
    7542           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    7543             :   {
    7544             :     /* %typemap(in) (char **argout2) */
    7545           0 :     arg2 = &argout2;
    7546             :   }
    7547           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ExportToPrettyWkt__SWIG_0(arg1,arg2);
    7548             :   {
    7549             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    7550           0 :     if (result != 0 && bUseExceptions) {
    7551           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    7552             :         OGRErrMessages(result));
    7553           0 :       return 0;
    7554             :     }
    7555           0 :     jresult = (jint)result;
    7556             :   }
    7557             :   {
    7558             :     /* %typemap(argout) (char **argout) */
    7559             :     jstring temp_string;
    7560             :     
    7561           0 :     if(jarg2 != NULL && (int)jenv->GetArrayLength(jarg2) >= 1) {
    7562           0 :       temp_string = SafeNewStringUTF8(jenv, argout2);
    7563           0 :       jenv->SetObjectArrayElement(jarg2, 0, temp_string);
    7564           0 :       jenv->DeleteLocalRef(temp_string);
    7565             :     }
    7566             :   }
    7567             :   {
    7568             :     /* %typemap(freearg) (char **argout) */
    7569           0 :     if(arg2) {
    7570           0 :       CPLFree((void *) argout2);
    7571             :     }
    7572             :   }
    7573             :   {
    7574             :     /* %typemap(ret) OGRErr */
    7575             :   }
    7576           0 :   return jresult;
    7577             : }
    7578             : 
    7579             : 
    7580           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ExportToPROJJSON_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2, jobject jarg3) {
    7581           0 :   jint jresult = 0 ;
    7582           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    7583           0 :   char **arg2 = (char **) 0 ;
    7584           0 :   char **arg3 = (char **) 0 ;
    7585           0 :   char *argout2 = 0 ;
    7586             :   OGRErr result;
    7587             :   
    7588             :   (void)jenv;
    7589             :   (void)jcls;
    7590             :   (void)jarg1_;
    7591           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    7592             :   {
    7593             :     /* %typemap(in) (char **argout2) */
    7594           0 :     arg2 = &argout2;
    7595             :   }
    7596             :   {
    7597             :     /* %typemap(in) char **options */
    7598           0 :     arg3 = NULL;
    7599           0 :     if(jarg3 != 0) {
    7600           0 :       const jclass vector = jenv->FindClass("java/util/Vector");
    7601           0 :       const jclass enumeration = jenv->FindClass("java/util/Enumeration");
    7602           0 :       const jclass stringClass = jenv->FindClass("java/lang/String");
    7603           0 :       const jmethodID elements = jenv->GetMethodID(vector, "elements",
    7604             :         "()Ljava/util/Enumeration;");
    7605           0 :       const jmethodID hasMoreElements = jenv->GetMethodID(enumeration,
    7606             :         "hasMoreElements", "()Z");
    7607           0 :       const jmethodID getNextElement = jenv->GetMethodID(enumeration,
    7608             :         "nextElement", "()Ljava/lang/Object;");
    7609           0 :       if(vector == NULL || enumeration == NULL || elements == NULL ||
    7610           0 :         hasMoreElements == NULL || getNextElement == NULL) {
    7611           0 :         fprintf(stderr, "Could not load (options **) jni types.\n");
    7612           0 :         return 0;
    7613             :       }
    7614           0 :       for (jobject keys = jenv->CallObjectMethod(jarg3, elements);
    7615           0 :         jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
    7616           0 :         jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
    7617           0 :         if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
    7618             :         {
    7619           0 :           CSLDestroy(arg3);
    7620           0 :           SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
    7621           0 :           return 0;
    7622             :         }
    7623           0 :         const char *valptr = jenv->GetStringUTFChars(value, 0);
    7624           0 :         arg3 = CSLAddString(arg3,  valptr);
    7625           0 :         jenv->ReleaseStringUTFChars(value, valptr);
    7626             :       }
    7627             :     }
    7628             :   }
    7629           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ExportToPROJJSON__SWIG_0(arg1,arg2,arg3);
    7630             :   {
    7631             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    7632           0 :     if (result != 0 && bUseExceptions) {
    7633           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    7634             :         OGRErrMessages(result));
    7635           0 :       return 0;
    7636             :     }
    7637           0 :     jresult = (jint)result;
    7638             :   }
    7639             :   {
    7640             :     /* %typemap(argout) (char **argout) */
    7641             :     jstring temp_string;
    7642             :     
    7643           0 :     if(jarg2 != NULL && (int)jenv->GetArrayLength(jarg2) >= 1) {
    7644           0 :       temp_string = SafeNewStringUTF8(jenv, argout2);
    7645           0 :       jenv->SetObjectArrayElement(jarg2, 0, temp_string);
    7646           0 :       jenv->DeleteLocalRef(temp_string);
    7647             :     }
    7648             :   }
    7649             :   {
    7650             :     /* %typemap(freearg) (char **argout) */
    7651           0 :     if(arg2) {
    7652           0 :       CPLFree((void *) argout2);
    7653             :     }
    7654             :   }
    7655             :   {
    7656             :     /* %typemap(freearg) char **options */
    7657           0 :     CSLDestroy( arg3 );
    7658             :   }
    7659             :   {
    7660             :     /* %typemap(ret) OGRErr */
    7661             :   }
    7662           0 :   return jresult;
    7663             : }
    7664             : 
    7665             : 
    7666           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ExportToPROJJSON_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2) {
    7667           0 :   jint jresult = 0 ;
    7668           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    7669           0 :   char **arg2 = (char **) 0 ;
    7670           0 :   char *argout2 = 0 ;
    7671             :   OGRErr result;
    7672             :   
    7673             :   (void)jenv;
    7674             :   (void)jcls;
    7675             :   (void)jarg1_;
    7676           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    7677             :   {
    7678             :     /* %typemap(in) (char **argout2) */
    7679           0 :     arg2 = &argout2;
    7680             :   }
    7681           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ExportToPROJJSON__SWIG_0(arg1,arg2);
    7682             :   {
    7683             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    7684           0 :     if (result != 0 && bUseExceptions) {
    7685           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    7686             :         OGRErrMessages(result));
    7687           0 :       return 0;
    7688             :     }
    7689           0 :     jresult = (jint)result;
    7690             :   }
    7691             :   {
    7692             :     /* %typemap(argout) (char **argout) */
    7693             :     jstring temp_string;
    7694             :     
    7695           0 :     if(jarg2 != NULL && (int)jenv->GetArrayLength(jarg2) >= 1) {
    7696           0 :       temp_string = SafeNewStringUTF8(jenv, argout2);
    7697           0 :       jenv->SetObjectArrayElement(jarg2, 0, temp_string);
    7698           0 :       jenv->DeleteLocalRef(temp_string);
    7699             :     }
    7700             :   }
    7701             :   {
    7702             :     /* %typemap(freearg) (char **argout) */
    7703           0 :     if(arg2) {
    7704           0 :       CPLFree((void *) argout2);
    7705             :     }
    7706             :   }
    7707             :   {
    7708             :     /* %typemap(ret) OGRErr */
    7709             :   }
    7710           0 :   return jresult;
    7711             : }
    7712             : 
    7713             : 
    7714           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ExportToProj4(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2) {
    7715           0 :   jint jresult = 0 ;
    7716           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    7717           0 :   char **arg2 = (char **) 0 ;
    7718           0 :   char *argout2 = 0 ;
    7719             :   OGRErr result;
    7720             :   
    7721             :   (void)jenv;
    7722             :   (void)jcls;
    7723             :   (void)jarg1_;
    7724           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    7725             :   {
    7726             :     /* %typemap(in) (char **argout2) */
    7727           0 :     arg2 = &argout2;
    7728             :   }
    7729           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ExportToProj4(arg1,arg2);
    7730             :   {
    7731             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    7732           0 :     if (result != 0 && bUseExceptions) {
    7733           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    7734             :         OGRErrMessages(result));
    7735           0 :       return 0;
    7736             :     }
    7737           0 :     jresult = (jint)result;
    7738             :   }
    7739             :   {
    7740             :     /* %typemap(argout) (char **argout) */
    7741             :     jstring temp_string;
    7742             :     
    7743           0 :     if(jarg2 != NULL && (int)jenv->GetArrayLength(jarg2) >= 1) {
    7744           0 :       temp_string = SafeNewStringUTF8(jenv, argout2);
    7745           0 :       jenv->SetObjectArrayElement(jarg2, 0, temp_string);
    7746           0 :       jenv->DeleteLocalRef(temp_string);
    7747             :     }
    7748             :   }
    7749             :   {
    7750             :     /* %typemap(freearg) (char **argout) */
    7751           0 :     if(arg2) {
    7752           0 :       CPLFree((void *) argout2);
    7753             :     }
    7754             :   }
    7755             :   {
    7756             :     /* %typemap(ret) OGRErr */
    7757             :   }
    7758           0 :   return jresult;
    7759             : }
    7760             : 
    7761             : 
    7762           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ExportToPCI(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2, jobjectArray jarg3, jdoubleArray jarg4) {
    7763           0 :   jint jresult = 0 ;
    7764           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    7765           0 :   char **arg2 = (char **) 0 ;
    7766           0 :   char **arg3 = (char **) 0 ;
    7767             :   double **arg4 ;
    7768           0 :   char *argout2 = 0 ;
    7769           0 :   char *argout3 = 0 ;
    7770             :   double *argout4 ;
    7771             :   OGRErr result;
    7772             :   
    7773             :   (void)jenv;
    7774             :   (void)jcls;
    7775             :   (void)jarg1_;
    7776           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    7777             :   {
    7778             :     /* %typemap(in) (char **argout2) */
    7779           0 :     arg2 = &argout2;
    7780             :   }
    7781             :   {
    7782             :     /* %typemap(in) (char **argout3) */
    7783           0 :     arg3 = &argout3;
    7784             :   }
    7785             :   {
    7786             :     /* %typemap(in) (double *argout4[ANY]) */
    7787           0 :     if(jarg4 == NULL || jenv->GetArrayLength(jarg4) != 17) {
    7788             :       char errorMsg[128];
    7789           0 :       snprintf(errorMsg, sizeof(errorMsg), "array of size %d expected", 17);
    7790           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, errorMsg);
    7791           0 :       return 0;
    7792             :     }
    7793           0 :     arg4 = &argout4;
    7794             :   }
    7795           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ExportToPCI(arg1,arg2,arg3,arg4);
    7796             :   {
    7797             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    7798           0 :     if (result != 0 && bUseExceptions) {
    7799           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    7800             :         OGRErrMessages(result));
    7801           0 :       return 0;
    7802             :     }
    7803           0 :     jresult = (jint)result;
    7804             :   }
    7805             :   {
    7806             :     /* %typemap(argout) (char **argout) */
    7807             :     jstring temp_string;
    7808             :     
    7809           0 :     if(jarg2 != NULL && (int)jenv->GetArrayLength(jarg2) >= 1) {
    7810           0 :       temp_string = SafeNewStringUTF8(jenv, argout2);
    7811           0 :       jenv->SetObjectArrayElement(jarg2, 0, temp_string);
    7812           0 :       jenv->DeleteLocalRef(temp_string);
    7813             :     }
    7814             :   }
    7815             :   {
    7816             :     /* %typemap(argout) (char **argout) */
    7817             :     jstring temp_string;
    7818             :     
    7819           0 :     if(jarg3 != NULL && (int)jenv->GetArrayLength(jarg3) >= 1) {
    7820           0 :       temp_string = SafeNewStringUTF8(jenv, argout3);
    7821           0 :       jenv->SetObjectArrayElement(jarg3, 0, temp_string);
    7822           0 :       jenv->DeleteLocalRef(temp_string);
    7823             :     }
    7824             :   }
    7825             :   {
    7826             :     /* %typemap(argout) (double *argout[ANY]) */
    7827           0 :     jenv->SetDoubleArrayRegion(jarg4, (jsize)0, (jsize)17, *arg4);
    7828             :   }
    7829             :   {
    7830             :     /* %typemap(freearg) (char **argout) */
    7831           0 :     if(arg2) {
    7832           0 :       CPLFree((void *) argout2);
    7833             :     }
    7834             :   }
    7835             :   {
    7836             :     /* %typemap(freearg) (char **argout) */
    7837           0 :     if(arg3) {
    7838           0 :       CPLFree((void *) argout3);
    7839             :     }
    7840             :   }
    7841             :   {
    7842             :     /* %typemap(freearg) (double *argout[ANY]) */
    7843           0 :     CPLFree(*arg4);
    7844             :   }
    7845             :   {
    7846             :     /* %typemap(ret) OGRErr */
    7847             :   }
    7848           0 :   return jresult;
    7849             : }
    7850             : 
    7851             : 
    7852           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ExportToUSGS(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jintArray jarg2, jintArray jarg3, jdoubleArray jarg4, jintArray jarg5) {
    7853           0 :   jint jresult = 0 ;
    7854           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    7855           0 :   long *arg2 = (long *) 0 ;
    7856           0 :   long *arg3 = (long *) 0 ;
    7857             :   double **arg4 ;
    7858           0 :   long *arg5 = (long *) 0 ;
    7859             :   long temp2 ;
    7860             :   long temp3 ;
    7861             :   double *argout4 ;
    7862             :   long temp5 ;
    7863             :   OGRErr result;
    7864             :   
    7865             :   (void)jenv;
    7866             :   (void)jcls;
    7867             :   (void)jarg1_;
    7868           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    7869             :   {
    7870           0 :     if (!jarg2) {
    7871           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
    7872           0 :       return 0;
    7873             :     }
    7874           0 :     if (jenv->GetArrayLength(jarg2) == 0) {
    7875           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
    7876           0 :       return 0;
    7877             :     }
    7878           0 :     temp2 = (long)0;
    7879           0 :     arg2 = &temp2; 
    7880             :   }
    7881             :   {
    7882           0 :     if (!jarg3) {
    7883           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
    7884           0 :       return 0;
    7885             :     }
    7886           0 :     if (jenv->GetArrayLength(jarg3) == 0) {
    7887           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
    7888           0 :       return 0;
    7889             :     }
    7890           0 :     temp3 = (long)0;
    7891           0 :     arg3 = &temp3; 
    7892             :   }
    7893             :   {
    7894             :     /* %typemap(in) (double *argout4[ANY]) */
    7895           0 :     if(jarg4 == NULL || jenv->GetArrayLength(jarg4) != 15) {
    7896             :       char errorMsg[128];
    7897           0 :       snprintf(errorMsg, sizeof(errorMsg), "array of size %d expected", 15);
    7898           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, errorMsg);
    7899           0 :       return 0;
    7900             :     }
    7901           0 :     arg4 = &argout4;
    7902             :   }
    7903             :   {
    7904           0 :     if (!jarg5) {
    7905           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "array null");
    7906           0 :       return 0;
    7907             :     }
    7908           0 :     if (jenv->GetArrayLength(jarg5) == 0) {
    7909           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, "Array must contain at least 1 element");
    7910           0 :       return 0;
    7911             :     }
    7912           0 :     temp5 = (long)0;
    7913           0 :     arg5 = &temp5; 
    7914             :   }
    7915           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ExportToUSGS(arg1,arg2,arg3,arg4,arg5);
    7916             :   {
    7917             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    7918           0 :     if (result != 0 && bUseExceptions) {
    7919           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    7920             :         OGRErrMessages(result));
    7921           0 :       return 0;
    7922             :     }
    7923           0 :     jresult = (jint)result;
    7924             :   }
    7925             :   {
    7926           0 :     jint jvalue = (jint)temp2;
    7927           0 :     jenv->SetIntArrayRegion(jarg2, 0, 1, &jvalue);
    7928             :   }
    7929             :   {
    7930           0 :     jint jvalue = (jint)temp3;
    7931           0 :     jenv->SetIntArrayRegion(jarg3, 0, 1, &jvalue);
    7932             :   }
    7933             :   {
    7934             :     /* %typemap(argout) (double *argout[ANY]) */
    7935           0 :     jenv->SetDoubleArrayRegion(jarg4, (jsize)0, (jsize)15, *arg4);
    7936             :   }
    7937             :   {
    7938           0 :     jint jvalue = (jint)temp5;
    7939           0 :     jenv->SetIntArrayRegion(jarg5, 0, 1, &jvalue);
    7940             :   }
    7941             :   
    7942             :   
    7943             :   {
    7944             :     /* %typemap(freearg) (double *argout[ANY]) */
    7945           0 :     CPLFree(*arg4);
    7946             :   }
    7947             :   
    7948             :   {
    7949             :     /* %typemap(ret) OGRErr */
    7950             :   }
    7951           0 :   return jresult;
    7952             : }
    7953             : 
    7954             : 
    7955           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ExportToERM(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2, jobjectArray jarg3, jobjectArray jarg4) {
    7956           0 :   jint jresult = 0 ;
    7957           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    7958           0 :   char **arg2 = (char **) 0 ;
    7959           0 :   char **arg3 = (char **) 0 ;
    7960           0 :   char **arg4 = (char **) 0 ;
    7961           0 :   char *argout2 = 0 ;
    7962           0 :   char *argout3 = 0 ;
    7963           0 :   char *argout4 = 0 ;
    7964             :   OGRErr result;
    7965             :   
    7966             :   (void)jenv;
    7967             :   (void)jcls;
    7968             :   (void)jarg1_;
    7969           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    7970             :   {
    7971             :     /* %typemap(in) (char **argout2) */
    7972           0 :     arg2 = &argout2;
    7973             :   }
    7974             :   {
    7975             :     /* %typemap(in) (char **argout3) */
    7976           0 :     arg3 = &argout3;
    7977             :   }
    7978             :   {
    7979             :     /* %typemap(in) (char **argout4) */
    7980           0 :     arg4 = &argout4;
    7981             :   }
    7982           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ExportToERM(arg1,arg2,arg3,arg4);
    7983             :   {
    7984             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    7985           0 :     if (result != 0 && bUseExceptions) {
    7986           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    7987             :         OGRErrMessages(result));
    7988           0 :       return 0;
    7989             :     }
    7990           0 :     jresult = (jint)result;
    7991             :   }
    7992             :   {
    7993             :     /* %typemap(argout) (char **argout) */
    7994             :     jstring temp_string;
    7995             :     
    7996           0 :     if(jarg2 != NULL && (int)jenv->GetArrayLength(jarg2) >= 1) {
    7997           0 :       temp_string = SafeNewStringUTF8(jenv, argout2);
    7998           0 :       jenv->SetObjectArrayElement(jarg2, 0, temp_string);
    7999           0 :       jenv->DeleteLocalRef(temp_string);
    8000             :     }
    8001             :   }
    8002             :   {
    8003             :     /* %typemap(argout) (char **argout) */
    8004             :     jstring temp_string;
    8005             :     
    8006           0 :     if(jarg3 != NULL && (int)jenv->GetArrayLength(jarg3) >= 1) {
    8007           0 :       temp_string = SafeNewStringUTF8(jenv, argout3);
    8008           0 :       jenv->SetObjectArrayElement(jarg3, 0, temp_string);
    8009           0 :       jenv->DeleteLocalRef(temp_string);
    8010             :     }
    8011             :   }
    8012             :   {
    8013             :     /* %typemap(argout) (char **argout) */
    8014             :     jstring temp_string;
    8015             :     
    8016           0 :     if(jarg4 != NULL && (int)jenv->GetArrayLength(jarg4) >= 1) {
    8017           0 :       temp_string = SafeNewStringUTF8(jenv, argout4);
    8018           0 :       jenv->SetObjectArrayElement(jarg4, 0, temp_string);
    8019           0 :       jenv->DeleteLocalRef(temp_string);
    8020             :     }
    8021             :   }
    8022             :   {
    8023             :     /* %typemap(freearg) (char **argout) */
    8024           0 :     if(arg2) {
    8025           0 :       CPLFree((void *) argout2);
    8026             :     }
    8027             :   }
    8028             :   {
    8029             :     /* %typemap(freearg) (char **argout) */
    8030           0 :     if(arg3) {
    8031           0 :       CPLFree((void *) argout3);
    8032             :     }
    8033             :   }
    8034             :   {
    8035             :     /* %typemap(freearg) (char **argout) */
    8036           0 :     if(arg4) {
    8037           0 :       CPLFree((void *) argout4);
    8038             :     }
    8039             :   }
    8040             :   {
    8041             :     /* %typemap(ret) OGRErr */
    8042             :   }
    8043           0 :   return jresult;
    8044             : }
    8045             : 
    8046             : 
    8047           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ExportToXML_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2, jstring jarg3) {
    8048           0 :   jint jresult = 0 ;
    8049           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8050           0 :   char **arg2 = (char **) 0 ;
    8051           0 :   char *arg3 = (char *) 0 ;
    8052           0 :   char *argout2 = 0 ;
    8053             :   OGRErr result;
    8054             :   
    8055             :   (void)jenv;
    8056             :   (void)jcls;
    8057             :   (void)jarg1_;
    8058           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8059             :   {
    8060             :     /* %typemap(in) (char **argout2) */
    8061           0 :     arg2 = &argout2;
    8062             :   }
    8063           0 :   arg3 = 0;
    8064           0 :   if (jarg3) {
    8065           0 :     arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    8066           0 :     if (!arg3) return 0;
    8067             :   }
    8068           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ExportToXML__SWIG_0(arg1,arg2,(char const *)arg3);
    8069             :   {
    8070             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    8071           0 :     if (result != 0 && bUseExceptions) {
    8072           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    8073             :         OGRErrMessages(result));
    8074           0 :       return 0;
    8075             :     }
    8076           0 :     jresult = (jint)result;
    8077             :   }
    8078             :   {
    8079             :     /* %typemap(argout) (char **argout) */
    8080             :     jstring temp_string;
    8081             :     
    8082           0 :     if(jarg2 != NULL && (int)jenv->GetArrayLength(jarg2) >= 1) {
    8083           0 :       temp_string = SafeNewStringUTF8(jenv, argout2);
    8084           0 :       jenv->SetObjectArrayElement(jarg2, 0, temp_string);
    8085           0 :       jenv->DeleteLocalRef(temp_string);
    8086             :     }
    8087             :   }
    8088             :   {
    8089             :     /* %typemap(freearg) (char **argout) */
    8090           0 :     if(arg2) {
    8091           0 :       CPLFree((void *) argout2);
    8092             :     }
    8093             :   }
    8094           0 :   if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
    8095             :   {
    8096             :     /* %typemap(ret) OGRErr */
    8097             :   }
    8098           0 :   return jresult;
    8099             : }
    8100             : 
    8101             : 
    8102           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ExportToXML_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2) {
    8103           0 :   jint jresult = 0 ;
    8104           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8105           0 :   char **arg2 = (char **) 0 ;
    8106           0 :   char *argout2 = 0 ;
    8107             :   OGRErr result;
    8108             :   
    8109             :   (void)jenv;
    8110             :   (void)jcls;
    8111             :   (void)jarg1_;
    8112           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8113             :   {
    8114             :     /* %typemap(in) (char **argout2) */
    8115           0 :     arg2 = &argout2;
    8116             :   }
    8117           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ExportToXML__SWIG_0(arg1,arg2);
    8118             :   {
    8119             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    8120           0 :     if (result != 0 && bUseExceptions) {
    8121           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    8122             :         OGRErrMessages(result));
    8123           0 :       return 0;
    8124             :     }
    8125           0 :     jresult = (jint)result;
    8126             :   }
    8127             :   {
    8128             :     /* %typemap(argout) (char **argout) */
    8129             :     jstring temp_string;
    8130             :     
    8131           0 :     if(jarg2 != NULL && (int)jenv->GetArrayLength(jarg2) >= 1) {
    8132           0 :       temp_string = SafeNewStringUTF8(jenv, argout2);
    8133           0 :       jenv->SetObjectArrayElement(jarg2, 0, temp_string);
    8134           0 :       jenv->DeleteLocalRef(temp_string);
    8135             :     }
    8136             :   }
    8137             :   {
    8138             :     /* %typemap(freearg) (char **argout) */
    8139           0 :     if(arg2) {
    8140           0 :       CPLFree((void *) argout2);
    8141             :     }
    8142             :   }
    8143             :   {
    8144             :     /* %typemap(ret) OGRErr */
    8145             :   }
    8146           0 :   return jresult;
    8147             : }
    8148             : 
    8149             : 
    8150           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ExportToMICoordSys(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2) {
    8151           0 :   jint jresult = 0 ;
    8152           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8153           0 :   char **arg2 = (char **) 0 ;
    8154           0 :   char *argout2 = 0 ;
    8155             :   OGRErr result;
    8156             :   
    8157             :   (void)jenv;
    8158             :   (void)jcls;
    8159             :   (void)jarg1_;
    8160           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8161             :   {
    8162             :     /* %typemap(in) (char **argout2) */
    8163           0 :     arg2 = &argout2;
    8164             :   }
    8165           0 :   result = (OGRErr)OSRSpatialReferenceShadow_ExportToMICoordSys(arg1,arg2);
    8166             :   {
    8167             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    8168           0 :     if (result != 0 && bUseExceptions) {
    8169           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    8170             :         OGRErrMessages(result));
    8171           0 :       return 0;
    8172             :     }
    8173           0 :     jresult = (jint)result;
    8174             :   }
    8175             :   {
    8176             :     /* %typemap(argout) (char **argout) */
    8177             :     jstring temp_string;
    8178             :     
    8179           0 :     if(jarg2 != NULL && (int)jenv->GetArrayLength(jarg2) >= 1) {
    8180           0 :       temp_string = SafeNewStringUTF8(jenv, argout2);
    8181           0 :       jenv->SetObjectArrayElement(jarg2, 0, temp_string);
    8182           0 :       jenv->DeleteLocalRef(temp_string);
    8183             :     }
    8184             :   }
    8185             :   {
    8186             :     /* %typemap(freearg) (char **argout) */
    8187           0 :     if(arg2) {
    8188           0 :       CPLFree((void *) argout2);
    8189             :     }
    8190             :   }
    8191             :   {
    8192             :     /* %typemap(ret) OGRErr */
    8193             :   }
    8194           0 :   return jresult;
    8195             : }
    8196             : 
    8197             : 
    8198           0 : SWIGEXPORT jobject JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ExportToCF1_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobject jarg2) {
    8199           0 :   jobject jresult = 0 ;
    8200           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8201           0 :   char **arg2 = (char **) 0 ;
    8202           0 :   char **result = 0 ;
    8203             :   
    8204             :   (void)jenv;
    8205             :   (void)jcls;
    8206             :   (void)jarg1_;
    8207           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8208             :   {
    8209             :     /* %typemap(in) char **options */
    8210           0 :     arg2 = NULL;
    8211           0 :     if(jarg2 != 0) {
    8212           0 :       const jclass vector = jenv->FindClass("java/util/Vector");
    8213           0 :       const jclass enumeration = jenv->FindClass("java/util/Enumeration");
    8214           0 :       const jclass stringClass = jenv->FindClass("java/lang/String");
    8215           0 :       const jmethodID elements = jenv->GetMethodID(vector, "elements",
    8216             :         "()Ljava/util/Enumeration;");
    8217           0 :       const jmethodID hasMoreElements = jenv->GetMethodID(enumeration,
    8218             :         "hasMoreElements", "()Z");
    8219           0 :       const jmethodID getNextElement = jenv->GetMethodID(enumeration,
    8220             :         "nextElement", "()Ljava/lang/Object;");
    8221           0 :       if(vector == NULL || enumeration == NULL || elements == NULL ||
    8222           0 :         hasMoreElements == NULL || getNextElement == NULL) {
    8223           0 :         fprintf(stderr, "Could not load (options **) jni types.\n");
    8224           0 :         return 0;
    8225             :       }
    8226           0 :       for (jobject keys = jenv->CallObjectMethod(jarg2, elements);
    8227           0 :         jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
    8228           0 :         jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
    8229           0 :         if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
    8230             :         {
    8231           0 :           CSLDestroy(arg2);
    8232           0 :           SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
    8233           0 :           return 0;
    8234             :         }
    8235           0 :         const char *valptr = jenv->GetStringUTFChars(value, 0);
    8236           0 :         arg2 = CSLAddString(arg2,  valptr);
    8237           0 :         jenv->ReleaseStringUTFChars(value, valptr);
    8238             :       }
    8239             :     }
    8240             :   }
    8241           0 :   result = (char **)OSRSpatialReferenceShadow_ExportToCF1__SWIG_0(arg1,arg2);
    8242             :   {
    8243             :     /* %typemap(out) char **dictAndCSLDestroy */
    8244           0 :     jresult = GetCSLStringAsHashTable(jenv, result, true);
    8245             :   }
    8246             :   {
    8247             :     /* %typemap(freearg) char **options */
    8248           0 :     CSLDestroy( arg2 );
    8249             :   }
    8250           0 :   return jresult;
    8251             : }
    8252             : 
    8253             : 
    8254           0 : SWIGEXPORT jobject JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ExportToCF1_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    8255           0 :   jobject jresult = 0 ;
    8256           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8257           0 :   char **result = 0 ;
    8258             :   
    8259             :   (void)jenv;
    8260             :   (void)jcls;
    8261             :   (void)jarg1_;
    8262           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8263           0 :   result = (char **)OSRSpatialReferenceShadow_ExportToCF1__SWIG_0(arg1);
    8264             :   {
    8265             :     /* %typemap(out) char **dictAndCSLDestroy */
    8266           0 :     jresult = GetCSLStringAsHashTable(jenv, result, true);
    8267             :   }
    8268           0 :   return jresult;
    8269             : }
    8270             : 
    8271             : 
    8272           0 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ExportToCF1Units_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobject jarg2) {
    8273           0 :   jstring jresult = 0 ;
    8274           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8275           0 :   char **arg2 = (char **) 0 ;
    8276           0 :   retStringAndCPLFree *result = 0 ;
    8277             :   
    8278             :   (void)jenv;
    8279             :   (void)jcls;
    8280             :   (void)jarg1_;
    8281           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8282             :   {
    8283             :     /* %typemap(in) char **options */
    8284           0 :     arg2 = NULL;
    8285           0 :     if(jarg2 != 0) {
    8286           0 :       const jclass vector = jenv->FindClass("java/util/Vector");
    8287           0 :       const jclass enumeration = jenv->FindClass("java/util/Enumeration");
    8288           0 :       const jclass stringClass = jenv->FindClass("java/lang/String");
    8289           0 :       const jmethodID elements = jenv->GetMethodID(vector, "elements",
    8290             :         "()Ljava/util/Enumeration;");
    8291           0 :       const jmethodID hasMoreElements = jenv->GetMethodID(enumeration,
    8292             :         "hasMoreElements", "()Z");
    8293           0 :       const jmethodID getNextElement = jenv->GetMethodID(enumeration,
    8294             :         "nextElement", "()Ljava/lang/Object;");
    8295           0 :       if(vector == NULL || enumeration == NULL || elements == NULL ||
    8296           0 :         hasMoreElements == NULL || getNextElement == NULL) {
    8297           0 :         fprintf(stderr, "Could not load (options **) jni types.\n");
    8298           0 :         return 0;
    8299             :       }
    8300           0 :       for (jobject keys = jenv->CallObjectMethod(jarg2, elements);
    8301           0 :         jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
    8302           0 :         jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
    8303           0 :         if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
    8304             :         {
    8305           0 :           CSLDestroy(arg2);
    8306           0 :           SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
    8307           0 :           return 0;
    8308             :         }
    8309           0 :         const char *valptr = jenv->GetStringUTFChars(value, 0);
    8310           0 :         arg2 = CSLAddString(arg2,  valptr);
    8311           0 :         jenv->ReleaseStringUTFChars(value, valptr);
    8312             :       }
    8313             :     }
    8314             :   }
    8315           0 :   result = (retStringAndCPLFree *)OSRSpatialReferenceShadow_ExportToCF1Units__SWIG_0(arg1,arg2);
    8316             :   {
    8317             :     /* %typemap(out) (retStringAndCPLFree*) */
    8318           0 :     if(result)
    8319             :     {
    8320           0 :       jresult = SafeNewStringUTF8(jenv, (const char *)result);
    8321           0 :       CPLFree(result);
    8322             :     }
    8323             :   }
    8324             :   {
    8325             :     /* %typemap(freearg) char **options */
    8326           0 :     CSLDestroy( arg2 );
    8327             :   }
    8328           0 :   return jresult;
    8329             : }
    8330             : 
    8331             : 
    8332           0 : SWIGEXPORT jstring JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ExportToCF1Units_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    8333           0 :   jstring jresult = 0 ;
    8334           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8335           0 :   retStringAndCPLFree *result = 0 ;
    8336             :   
    8337             :   (void)jenv;
    8338             :   (void)jcls;
    8339             :   (void)jarg1_;
    8340           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8341           0 :   result = (retStringAndCPLFree *)OSRSpatialReferenceShadow_ExportToCF1Units__SWIG_0(arg1);
    8342             :   {
    8343             :     /* %typemap(out) (retStringAndCPLFree*) */
    8344           0 :     if(result)
    8345             :     {
    8346           0 :       jresult = SafeNewStringUTF8(jenv, (const char *)result);
    8347           0 :       CPLFree(result);
    8348             :     }
    8349             :   }
    8350           0 :   return jresult;
    8351             : }
    8352             : 
    8353             : 
    8354           5 : SWIGEXPORT jlong JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1CloneGeogCS(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    8355           5 :   jlong jresult = 0 ;
    8356           5 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8357           5 :   OSRSpatialReferenceShadow *result = 0 ;
    8358             :   
    8359             :   (void)jenv;
    8360             :   (void)jcls;
    8361             :   (void)jarg1_;
    8362           5 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8363           5 :   result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_CloneGeogCS(arg1);
    8364           5 :   *(OSRSpatialReferenceShadow **)&jresult = result; 
    8365           5 :   return jresult;
    8366             : }
    8367             : 
    8368             : 
    8369           2 : SWIGEXPORT jlong JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1Clone(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    8370           2 :   jlong jresult = 0 ;
    8371           2 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8372           2 :   OSRSpatialReferenceShadow *result = 0 ;
    8373             :   
    8374             :   (void)jenv;
    8375             :   (void)jcls;
    8376             :   (void)jarg1_;
    8377           2 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8378           2 :   result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_Clone(arg1);
    8379           2 :   *(OSRSpatialReferenceShadow **)&jresult = result; 
    8380           2 :   return jresult;
    8381             : }
    8382             : 
    8383             : 
    8384           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1StripVertical(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    8385           0 :   jint jresult = 0 ;
    8386           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8387             :   OGRErr result;
    8388             :   
    8389             :   (void)jenv;
    8390             :   (void)jcls;
    8391             :   (void)jarg1_;
    8392           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8393           0 :   result = (OGRErr)OSRSpatialReferenceShadow_StripVertical(arg1);
    8394             :   {
    8395             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    8396           0 :     if (result != 0 && bUseExceptions) {
    8397           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    8398             :         OGRErrMessages(result));
    8399           0 :       return 0;
    8400             :     }
    8401           0 :     jresult = (jint)result;
    8402             :   }
    8403             :   {
    8404             :     /* %typemap(ret) OGRErr */
    8405             :   }
    8406           0 :   return jresult;
    8407             : }
    8408             : 
    8409             : 
    8410           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1Validate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    8411           0 :   jint jresult = 0 ;
    8412           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8413             :   OGRErr result;
    8414             :   
    8415             :   (void)jenv;
    8416             :   (void)jcls;
    8417             :   (void)jarg1_;
    8418           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8419           0 :   result = (OGRErr)OSRSpatialReferenceShadow_Validate(arg1);
    8420             :   {
    8421             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    8422           0 :     if (result != 0 && bUseExceptions) {
    8423           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    8424             :         OGRErrMessages(result));
    8425           0 :       return 0;
    8426             :     }
    8427           0 :     jresult = (jint)result;
    8428             :   }
    8429             :   {
    8430             :     /* %typemap(ret) OGRErr */
    8431             :   }
    8432           0 :   return jresult;
    8433             : }
    8434             : 
    8435             : 
    8436           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1MorphToESRI(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    8437           0 :   jint jresult = 0 ;
    8438           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8439             :   OGRErr result;
    8440             :   
    8441             :   (void)jenv;
    8442             :   (void)jcls;
    8443             :   (void)jarg1_;
    8444           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8445           0 :   result = (OGRErr)OSRSpatialReferenceShadow_MorphToESRI(arg1);
    8446             :   {
    8447             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    8448           0 :     if (result != 0 && bUseExceptions) {
    8449           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    8450             :         OGRErrMessages(result));
    8451           0 :       return 0;
    8452             :     }
    8453           0 :     jresult = (jint)result;
    8454             :   }
    8455             :   {
    8456             :     /* %typemap(ret) OGRErr */
    8457             :   }
    8458           0 :   return jresult;
    8459             : }
    8460             : 
    8461             : 
    8462           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1MorphFromESRI(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    8463           0 :   jint jresult = 0 ;
    8464           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8465             :   OGRErr result;
    8466             :   
    8467             :   (void)jenv;
    8468             :   (void)jcls;
    8469             :   (void)jarg1_;
    8470           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8471           0 :   result = (OGRErr)OSRSpatialReferenceShadow_MorphFromESRI(arg1);
    8472             :   {
    8473             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    8474           0 :     if (result != 0 && bUseExceptions) {
    8475           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    8476             :         OGRErrMessages(result));
    8477           0 :       return 0;
    8478             :     }
    8479           0 :     jresult = (jint)result;
    8480             :   }
    8481             :   {
    8482             :     /* %typemap(ret) OGRErr */
    8483             :   }
    8484           0 :   return jresult;
    8485             : }
    8486             : 
    8487             : 
    8488           0 : SWIGEXPORT jlong JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ConvertToOtherProjection_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jobject jarg3) {
    8489           0 :   jlong jresult = 0 ;
    8490           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8491           0 :   char *arg2 = (char *) 0 ;
    8492           0 :   char **arg3 = (char **) 0 ;
    8493           0 :   OSRSpatialReferenceShadow *result = 0 ;
    8494             :   
    8495             :   (void)jenv;
    8496             :   (void)jcls;
    8497             :   (void)jarg1_;
    8498           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8499           0 :   arg2 = 0;
    8500           0 :   if (jarg2) {
    8501           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    8502           0 :     if (!arg2) return 0;
    8503             :   }
    8504             :   {
    8505             :     /* %typemap(in) char **options */
    8506           0 :     arg3 = NULL;
    8507           0 :     if(jarg3 != 0) {
    8508           0 :       const jclass vector = jenv->FindClass("java/util/Vector");
    8509           0 :       const jclass enumeration = jenv->FindClass("java/util/Enumeration");
    8510           0 :       const jclass stringClass = jenv->FindClass("java/lang/String");
    8511           0 :       const jmethodID elements = jenv->GetMethodID(vector, "elements",
    8512             :         "()Ljava/util/Enumeration;");
    8513           0 :       const jmethodID hasMoreElements = jenv->GetMethodID(enumeration,
    8514             :         "hasMoreElements", "()Z");
    8515           0 :       const jmethodID getNextElement = jenv->GetMethodID(enumeration,
    8516             :         "nextElement", "()Ljava/lang/Object;");
    8517           0 :       if(vector == NULL || enumeration == NULL || elements == NULL ||
    8518           0 :         hasMoreElements == NULL || getNextElement == NULL) {
    8519           0 :         fprintf(stderr, "Could not load (options **) jni types.\n");
    8520           0 :         return 0;
    8521             :       }
    8522           0 :       for (jobject keys = jenv->CallObjectMethod(jarg3, elements);
    8523           0 :         jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
    8524           0 :         jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
    8525           0 :         if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
    8526             :         {
    8527           0 :           CSLDestroy(arg3);
    8528           0 :           SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
    8529           0 :           return 0;
    8530             :         }
    8531           0 :         const char *valptr = jenv->GetStringUTFChars(value, 0);
    8532           0 :         arg3 = CSLAddString(arg3,  valptr);
    8533           0 :         jenv->ReleaseStringUTFChars(value, valptr);
    8534             :       }
    8535             :     }
    8536             :   }
    8537           0 :   result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_ConvertToOtherProjection__SWIG_0(arg1,(char const *)arg2,arg3);
    8538           0 :   *(OSRSpatialReferenceShadow **)&jresult = result; 
    8539           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    8540             :   {
    8541             :     /* %typemap(freearg) char **options */
    8542           0 :     CSLDestroy( arg3 );
    8543             :   }
    8544           0 :   return jresult;
    8545             : }
    8546             : 
    8547             : 
    8548           0 : SWIGEXPORT jlong JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1ConvertToOtherProjection_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    8549           0 :   jlong jresult = 0 ;
    8550           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8551           0 :   char *arg2 = (char *) 0 ;
    8552           0 :   OSRSpatialReferenceShadow *result = 0 ;
    8553             :   
    8554             :   (void)jenv;
    8555             :   (void)jcls;
    8556             :   (void)jarg1_;
    8557           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8558           0 :   arg2 = 0;
    8559           0 :   if (jarg2) {
    8560           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    8561           0 :     if (!arg2) return 0;
    8562             :   }
    8563           0 :   result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_ConvertToOtherProjection__SWIG_0(arg1,(char const *)arg2);
    8564           0 :   *(OSRSpatialReferenceShadow **)&jresult = result; 
    8565           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    8566           0 :   return jresult;
    8567             : }
    8568             : 
    8569             : 
    8570           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1PromoteTo3D_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    8571           0 :   jint jresult = 0 ;
    8572           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8573           0 :   char *arg2 = (char *) 0 ;
    8574             :   OGRErr result;
    8575             :   
    8576             :   (void)jenv;
    8577             :   (void)jcls;
    8578             :   (void)jarg1_;
    8579           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8580           0 :   arg2 = 0;
    8581           0 :   if (jarg2) {
    8582           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    8583           0 :     if (!arg2) return 0;
    8584             :   }
    8585           0 :   result = (OGRErr)OSRSpatialReferenceShadow_PromoteTo3D__SWIG_0(arg1,(char const *)arg2);
    8586             :   {
    8587             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    8588           0 :     if (result != 0 && bUseExceptions) {
    8589           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    8590             :         OGRErrMessages(result));
    8591           0 :       return 0;
    8592             :     }
    8593           0 :     jresult = (jint)result;
    8594             :   }
    8595           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    8596             :   {
    8597             :     /* %typemap(ret) OGRErr */
    8598             :   }
    8599           0 :   return jresult;
    8600             : }
    8601             : 
    8602             : 
    8603           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1PromoteTo3D_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    8604           0 :   jint jresult = 0 ;
    8605           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8606             :   OGRErr result;
    8607             :   
    8608             :   (void)jenv;
    8609             :   (void)jcls;
    8610             :   (void)jarg1_;
    8611           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8612           0 :   result = (OGRErr)OSRSpatialReferenceShadow_PromoteTo3D__SWIG_0(arg1);
    8613             :   {
    8614             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    8615           0 :     if (result != 0 && bUseExceptions) {
    8616           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    8617             :         OGRErrMessages(result));
    8618           0 :       return 0;
    8619             :     }
    8620           0 :     jresult = (jint)result;
    8621             :   }
    8622             :   {
    8623             :     /* %typemap(ret) OGRErr */
    8624             :   }
    8625           0 :   return jresult;
    8626             : }
    8627             : 
    8628             : 
    8629           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1DemoteTo2D_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    8630           0 :   jint jresult = 0 ;
    8631           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8632           0 :   char *arg2 = (char *) 0 ;
    8633             :   OGRErr result;
    8634             :   
    8635             :   (void)jenv;
    8636             :   (void)jcls;
    8637             :   (void)jarg1_;
    8638           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8639           0 :   arg2 = 0;
    8640           0 :   if (jarg2) {
    8641           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    8642           0 :     if (!arg2) return 0;
    8643             :   }
    8644           0 :   result = (OGRErr)OSRSpatialReferenceShadow_DemoteTo2D__SWIG_0(arg1,(char const *)arg2);
    8645             :   {
    8646             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    8647           0 :     if (result != 0 && bUseExceptions) {
    8648           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    8649             :         OGRErrMessages(result));
    8650           0 :       return 0;
    8651             :     }
    8652           0 :     jresult = (jint)result;
    8653             :   }
    8654           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    8655             :   {
    8656             :     /* %typemap(ret) OGRErr */
    8657             :   }
    8658           0 :   return jresult;
    8659             : }
    8660             : 
    8661             : 
    8662           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_SpatialReference_1DemoteTo2D_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    8663           0 :   jint jresult = 0 ;
    8664           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8665             :   OGRErr result;
    8666             :   
    8667             :   (void)jenv;
    8668             :   (void)jcls;
    8669             :   (void)jarg1_;
    8670           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8671           0 :   result = (OGRErr)OSRSpatialReferenceShadow_DemoteTo2D__SWIG_0(arg1);
    8672             :   {
    8673             :     /* %typemap(out,fragment="OGRErrMessages") OGRErr */
    8674           0 :     if (result != 0 && bUseExceptions) {
    8675           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaRuntimeException,
    8676             :         OGRErrMessages(result));
    8677           0 :       return 0;
    8678             :     }
    8679           0 :     jresult = (jint)result;
    8680             :   }
    8681             :   {
    8682             :     /* %typemap(ret) OGRErr */
    8683             :   }
    8684           0 :   return jresult;
    8685             : }
    8686             : 
    8687             : 
    8688           2 : SWIGEXPORT jlong JNICALL Java_org_gdal_osr_osrJNI_new_1CoordinateTransformationOptions(JNIEnv *jenv, jclass jcls) {
    8689           2 :   jlong jresult = 0 ;
    8690           2 :   OGRCoordinateTransformationOptions *result = 0 ;
    8691             :   
    8692             :   (void)jenv;
    8693             :   (void)jcls;
    8694           2 :   result = (OGRCoordinateTransformationOptions *)new_OGRCoordinateTransformationOptions();
    8695           2 :   *(OGRCoordinateTransformationOptions **)&jresult = result; 
    8696           2 :   return jresult;
    8697             : }
    8698             : 
    8699             : 
    8700           0 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_delete_1CoordinateTransformationOptions(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    8701           0 :   OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
    8702             :   
    8703             :   (void)jenv;
    8704             :   (void)jcls;
    8705           0 :   arg1 = *(OGRCoordinateTransformationOptions **)&jarg1; 
    8706           0 :   delete_OGRCoordinateTransformationOptions(arg1);
    8707           0 : }
    8708             : 
    8709             : 
    8710           0 : SWIGEXPORT jboolean JNICALL Java_org_gdal_osr_osrJNI_CoordinateTransformationOptions_1SetAreaOfInterest(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    8711           0 :   jboolean jresult = 0 ;
    8712           0 :   OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
    8713             :   double arg2 ;
    8714             :   double arg3 ;
    8715             :   double arg4 ;
    8716             :   double arg5 ;
    8717             :   bool result;
    8718             :   
    8719             :   (void)jenv;
    8720             :   (void)jcls;
    8721             :   (void)jarg1_;
    8722           0 :   arg1 = *(OGRCoordinateTransformationOptions **)&jarg1; 
    8723           0 :   arg2 = (double)jarg2; 
    8724           0 :   arg3 = (double)jarg3; 
    8725           0 :   arg4 = (double)jarg4; 
    8726           0 :   arg5 = (double)jarg5; 
    8727           0 :   result = (bool)OGRCoordinateTransformationOptions_SetAreaOfInterest(arg1,arg2,arg3,arg4,arg5);
    8728           0 :   jresult = (jboolean)result; 
    8729           0 :   return jresult;
    8730             : }
    8731             : 
    8732             : 
    8733           0 : SWIGEXPORT jboolean JNICALL Java_org_gdal_osr_osrJNI_CoordinateTransformationOptions_1SetOperation_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jboolean jarg3) {
    8734           0 :   jboolean jresult = 0 ;
    8735           0 :   OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
    8736           0 :   char *arg2 = (char *) 0 ;
    8737             :   bool arg3 ;
    8738             :   bool result;
    8739             :   
    8740             :   (void)jenv;
    8741             :   (void)jcls;
    8742             :   (void)jarg1_;
    8743           0 :   arg1 = *(OGRCoordinateTransformationOptions **)&jarg1; 
    8744           0 :   arg2 = 0;
    8745           0 :   if (jarg2) {
    8746           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    8747           0 :     if (!arg2) return 0;
    8748             :   }
    8749           0 :   arg3 = jarg3 ? true : false; 
    8750           0 :   result = (bool)OGRCoordinateTransformationOptions_SetOperation__SWIG_0(arg1,(char const *)arg2,arg3);
    8751           0 :   jresult = (jboolean)result; 
    8752           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    8753           0 :   return jresult;
    8754             : }
    8755             : 
    8756             : 
    8757           0 : SWIGEXPORT jboolean JNICALL Java_org_gdal_osr_osrJNI_CoordinateTransformationOptions_1SetOperation_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
    8758           0 :   jboolean jresult = 0 ;
    8759           0 :   OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
    8760           0 :   char *arg2 = (char *) 0 ;
    8761             :   bool result;
    8762             :   
    8763             :   (void)jenv;
    8764             :   (void)jcls;
    8765             :   (void)jarg1_;
    8766           0 :   arg1 = *(OGRCoordinateTransformationOptions **)&jarg1; 
    8767           0 :   arg2 = 0;
    8768           0 :   if (jarg2) {
    8769           0 :     arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    8770           0 :     if (!arg2) return 0;
    8771             :   }
    8772           0 :   result = (bool)OGRCoordinateTransformationOptions_SetOperation__SWIG_0(arg1,(char const *)arg2);
    8773           0 :   jresult = (jboolean)result; 
    8774           0 :   if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
    8775           0 :   return jresult;
    8776             : }
    8777             : 
    8778             : 
    8779           1 : SWIGEXPORT jboolean JNICALL Java_org_gdal_osr_osrJNI_CoordinateTransformationOptions_1SetDesiredAccuracy(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdouble jarg2) {
    8780           1 :   jboolean jresult = 0 ;
    8781           1 :   OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
    8782             :   double arg2 ;
    8783             :   bool result;
    8784             :   
    8785             :   (void)jenv;
    8786             :   (void)jcls;
    8787             :   (void)jarg1_;
    8788           1 :   arg1 = *(OGRCoordinateTransformationOptions **)&jarg1; 
    8789           1 :   arg2 = (double)jarg2; 
    8790           1 :   result = (bool)OGRCoordinateTransformationOptions_SetDesiredAccuracy(arg1,arg2);
    8791           1 :   jresult = (jboolean)result; 
    8792           1 :   return jresult;
    8793             : }
    8794             : 
    8795             : 
    8796           1 : SWIGEXPORT jboolean JNICALL Java_org_gdal_osr_osrJNI_CoordinateTransformationOptions_1SetBallparkAllowed(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
    8797           1 :   jboolean jresult = 0 ;
    8798           1 :   OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
    8799             :   bool arg2 ;
    8800             :   bool result;
    8801             :   
    8802             :   (void)jenv;
    8803             :   (void)jcls;
    8804             :   (void)jarg1_;
    8805           1 :   arg1 = *(OGRCoordinateTransformationOptions **)&jarg1; 
    8806           1 :   arg2 = jarg2 ? true : false; 
    8807           1 :   result = (bool)OGRCoordinateTransformationOptions_SetBallparkAllowed(arg1,arg2);
    8808           1 :   jresult = (jboolean)result; 
    8809           1 :   return jresult;
    8810             : }
    8811             : 
    8812             : 
    8813           0 : SWIGEXPORT jboolean JNICALL Java_org_gdal_osr_osrJNI_CoordinateTransformationOptions_1SetOnlyBest(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
    8814           0 :   jboolean jresult = 0 ;
    8815           0 :   OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
    8816             :   bool arg2 ;
    8817             :   bool result;
    8818             :   
    8819             :   (void)jenv;
    8820             :   (void)jcls;
    8821             :   (void)jarg1_;
    8822           0 :   arg1 = *(OGRCoordinateTransformationOptions **)&jarg1; 
    8823           0 :   arg2 = jarg2 ? true : false; 
    8824           0 :   result = (bool)OGRCoordinateTransformationOptions_SetOnlyBest(arg1,arg2);
    8825           0 :   jresult = (jboolean)result; 
    8826           0 :   return jresult;
    8827             : }
    8828             : 
    8829             : 
    8830           0 : SWIGEXPORT jlong JNICALL Java_org_gdal_osr_osrJNI_new_1CoordinateTransformation_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    8831           0 :   jlong jresult = 0 ;
    8832           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8833           0 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    8834           0 :   OSRCoordinateTransformationShadow *result = 0 ;
    8835             :   
    8836             :   (void)jenv;
    8837             :   (void)jcls;
    8838             :   (void)jarg1_;
    8839             :   (void)jarg2_;
    8840           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8841           0 :   arg2 = *(OSRSpatialReferenceShadow **)&jarg2; 
    8842           0 :   result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow__SWIG_0(arg1,arg2);
    8843           0 :   *(OSRCoordinateTransformationShadow **)&jresult = result; 
    8844           0 :   return jresult;
    8845             : }
    8846             : 
    8847             : 
    8848           0 : SWIGEXPORT jlong JNICALL Java_org_gdal_osr_osrJNI_new_1CoordinateTransformation_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) {
    8849           0 :   jlong jresult = 0 ;
    8850           0 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    8851           0 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    8852           0 :   OGRCoordinateTransformationOptions *arg3 = (OGRCoordinateTransformationOptions *) 0 ;
    8853           0 :   OSRCoordinateTransformationShadow *result = 0 ;
    8854             :   
    8855             :   (void)jenv;
    8856             :   (void)jcls;
    8857             :   (void)jarg1_;
    8858             :   (void)jarg2_;
    8859             :   (void)jarg3_;
    8860           0 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    8861           0 :   arg2 = *(OSRSpatialReferenceShadow **)&jarg2; 
    8862           0 :   arg3 = *(OGRCoordinateTransformationOptions **)&jarg3; 
    8863           0 :   result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow__SWIG_1(arg1,arg2,arg3);
    8864           0 :   *(OSRCoordinateTransformationShadow **)&jresult = result; 
    8865           0 :   return jresult;
    8866             : }
    8867             : 
    8868             : 
    8869           5 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_delete_1CoordinateTransformation(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    8870           5 :   OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
    8871             :   
    8872             :   (void)jenv;
    8873             :   (void)jcls;
    8874           5 :   arg1 = *(OSRCoordinateTransformationShadow **)&jarg1; 
    8875           5 :   delete_OSRCoordinateTransformationShadow(arg1);
    8876           5 : }
    8877             : 
    8878             : 
    8879           1 : SWIGEXPORT jlong JNICALL Java_org_gdal_osr_osrJNI_CoordinateTransformation_1GetSource(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    8880           1 :   jlong jresult = 0 ;
    8881           1 :   OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
    8882           1 :   OSRSpatialReferenceShadow *result = 0 ;
    8883             :   
    8884             :   (void)jenv;
    8885             :   (void)jcls;
    8886             :   (void)jarg1_;
    8887           1 :   arg1 = *(OSRCoordinateTransformationShadow **)&jarg1; 
    8888           1 :   result = (OSRSpatialReferenceShadow *)OSRCoordinateTransformationShadow_GetSource(arg1);
    8889           1 :   *(OSRSpatialReferenceShadow **)&jresult = result; 
    8890           1 :   return jresult;
    8891             : }
    8892             : 
    8893             : 
    8894           1 : SWIGEXPORT jlong JNICALL Java_org_gdal_osr_osrJNI_CoordinateTransformation_1GetTarget(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    8895           1 :   jlong jresult = 0 ;
    8896           1 :   OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
    8897           1 :   OSRSpatialReferenceShadow *result = 0 ;
    8898             :   
    8899             :   (void)jenv;
    8900             :   (void)jcls;
    8901             :   (void)jarg1_;
    8902           1 :   arg1 = *(OSRCoordinateTransformationShadow **)&jarg1; 
    8903           1 :   result = (OSRSpatialReferenceShadow *)OSRCoordinateTransformationShadow_GetTarget(arg1);
    8904           1 :   *(OSRSpatialReferenceShadow **)&jresult = result; 
    8905           1 :   return jresult;
    8906             : }
    8907             : 
    8908             : 
    8909           1 : SWIGEXPORT jlong JNICALL Java_org_gdal_osr_osrJNI_CoordinateTransformation_1GetInverse(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
    8910           1 :   jlong jresult = 0 ;
    8911           1 :   OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
    8912           1 :   OSRCoordinateTransformationShadow *result = 0 ;
    8913             :   
    8914             :   (void)jenv;
    8915             :   (void)jcls;
    8916             :   (void)jarg1_;
    8917           1 :   arg1 = *(OSRCoordinateTransformationShadow **)&jarg1; 
    8918           1 :   result = (OSRCoordinateTransformationShadow *)OSRCoordinateTransformationShadow_GetInverse(arg1);
    8919           1 :   *(OSRCoordinateTransformationShadow **)&jresult = result; 
    8920           1 :   return jresult;
    8921             : }
    8922             : 
    8923             : 
    8924           1 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_CoordinateTransformation_1TransformPoint_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdoubleArray jarg2) {
    8925           1 :   OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
    8926             :   double *arg2 ;
    8927             :   
    8928             :   (void)jenv;
    8929             :   (void)jcls;
    8930             :   (void)jarg1_;
    8931           1 :   arg1 = *(OSRCoordinateTransformationShadow **)&jarg1; 
    8932             :   {
    8933             :     /* %typemap(in) (double argout[ANY]) */
    8934           1 :     if(jarg2 == NULL || jenv->GetArrayLength(jarg2) != 3) {
    8935             :       char errorMsg[128];
    8936           0 :       snprintf(errorMsg, sizeof(errorMsg), "array of size %d expected", 3);
    8937           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, errorMsg);
    8938           0 :       return ;
    8939             :     }
    8940           1 :     arg2 = (double *)jenv->GetDoubleArrayElements(jarg2, NULL);
    8941             :   }
    8942           1 :   OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(arg1,arg2);
    8943             :   {
    8944             :     /* %typemap(argout) (double argout[ANY]) */
    8945             :   }
    8946             :   {
    8947             :     /* %typemap(freearg) (double argout[ANY]) */
    8948           1 :     jenv->ReleaseDoubleArrayElements(jarg2, (jdouble *)arg2, 0);
    8949             :   }
    8950             : }
    8951             : 
    8952             : 
    8953           6 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_CoordinateTransformation_1TransformPoint_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdoubleArray jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5) {
    8954           6 :   OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
    8955             :   double *arg2 ;
    8956             :   double arg3 ;
    8957             :   double arg4 ;
    8958             :   double arg5 ;
    8959             :   
    8960             :   (void)jenv;
    8961             :   (void)jcls;
    8962             :   (void)jarg1_;
    8963           6 :   arg1 = *(OSRCoordinateTransformationShadow **)&jarg1; 
    8964             :   {
    8965             :     /* %typemap(in) (double argout[ANY]) */
    8966           6 :     if(jarg2 == NULL || jenv->GetArrayLength(jarg2) != 3) {
    8967             :       char errorMsg[128];
    8968           0 :       snprintf(errorMsg, sizeof(errorMsg), "array of size %d expected", 3);
    8969           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, errorMsg);
    8970           0 :       return ;
    8971             :     }
    8972           6 :     arg2 = (double *)jenv->GetDoubleArrayElements(jarg2, NULL);
    8973             :   }
    8974           6 :   arg3 = (double)jarg3; 
    8975           6 :   arg4 = (double)jarg4; 
    8976           6 :   arg5 = (double)jarg5; 
    8977           6 :   OSRCoordinateTransformationShadow_TransformPoint__SWIG_2(arg1,arg2,arg3,arg4,arg5);
    8978             :   {
    8979             :     /* %typemap(argout) (double argout[ANY]) */
    8980             :   }
    8981             :   {
    8982             :     /* %typemap(freearg) (double argout[ANY]) */
    8983           6 :     jenv->ReleaseDoubleArrayElements(jarg2, (jdouble *)arg2, 0);
    8984             :   }
    8985             : }
    8986             : 
    8987             : 
    8988           0 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_CoordinateTransformation_1TransformPoint_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdoubleArray jarg2, jdouble jarg3, jdouble jarg4) {
    8989           0 :   OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
    8990             :   double *arg2 ;
    8991             :   double arg3 ;
    8992             :   double arg4 ;
    8993             :   
    8994             :   (void)jenv;
    8995             :   (void)jcls;
    8996             :   (void)jarg1_;
    8997           0 :   arg1 = *(OSRCoordinateTransformationShadow **)&jarg1; 
    8998             :   {
    8999             :     /* %typemap(in) (double argout[ANY]) */
    9000           0 :     if(jarg2 == NULL || jenv->GetArrayLength(jarg2) != 3) {
    9001             :       char errorMsg[128];
    9002           0 :       snprintf(errorMsg, sizeof(errorMsg), "array of size %d expected", 3);
    9003           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, errorMsg);
    9004           0 :       return ;
    9005             :     }
    9006           0 :     arg2 = (double *)jenv->GetDoubleArrayElements(jarg2, NULL);
    9007             :   }
    9008           0 :   arg3 = (double)jarg3; 
    9009           0 :   arg4 = (double)jarg4; 
    9010           0 :   OSRCoordinateTransformationShadow_TransformPoint__SWIG_2(arg1,arg2,arg3,arg4);
    9011             :   {
    9012             :     /* %typemap(argout) (double argout[ANY]) */
    9013             :   }
    9014             :   {
    9015             :     /* %typemap(freearg) (double argout[ANY]) */
    9016           0 :     jenv->ReleaseDoubleArrayElements(jarg2, (jdouble *)arg2, 0);
    9017             :   }
    9018             : }
    9019             : 
    9020             : 
    9021           0 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_CoordinateTransformation_1TransformPoint_1_1SWIG_14(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdoubleArray jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6) {
    9022           0 :   OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
    9023             :   double *arg2 ;
    9024             :   double arg3 ;
    9025             :   double arg4 ;
    9026             :   double arg5 ;
    9027             :   double arg6 ;
    9028             :   
    9029             :   (void)jenv;
    9030             :   (void)jcls;
    9031             :   (void)jarg1_;
    9032           0 :   arg1 = *(OSRCoordinateTransformationShadow **)&jarg1; 
    9033             :   {
    9034             :     /* %typemap(in) (double argout[ANY]) */
    9035           0 :     if(jarg2 == NULL || jenv->GetArrayLength(jarg2) != 4) {
    9036             :       char errorMsg[128];
    9037           0 :       snprintf(errorMsg, sizeof(errorMsg), "array of size %d expected", 4);
    9038           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, errorMsg);
    9039           0 :       return ;
    9040             :     }
    9041           0 :     arg2 = (double *)jenv->GetDoubleArrayElements(jarg2, NULL);
    9042             :   }
    9043           0 :   arg3 = (double)jarg3; 
    9044           0 :   arg4 = (double)jarg4; 
    9045           0 :   arg5 = (double)jarg5; 
    9046           0 :   arg6 = (double)jarg6; 
    9047           0 :   OSRCoordinateTransformationShadow_TransformPoint__SWIG_4(arg1,arg2,arg3,arg4,arg5,arg6);
    9048             :   {
    9049             :     /* %typemap(argout) (double argout[ANY]) */
    9050             :   }
    9051             :   {
    9052             :     /* %typemap(freearg) (double argout[ANY]) */
    9053           0 :     jenv->ReleaseDoubleArrayElements(jarg2, (jdouble *)arg2, 0);
    9054             :   }
    9055             : }
    9056             : 
    9057             : 
    9058           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_CoordinateTransformation_1TransformPointWithErrorCode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdoubleArray jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6) {
    9059           0 :   jint jresult = 0 ;
    9060           0 :   OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
    9061             :   double *arg2 ;
    9062             :   double arg3 ;
    9063             :   double arg4 ;
    9064             :   double arg5 ;
    9065             :   double arg6 ;
    9066             :   int result;
    9067             :   
    9068             :   (void)jenv;
    9069             :   (void)jcls;
    9070             :   (void)jarg1_;
    9071           0 :   arg1 = *(OSRCoordinateTransformationShadow **)&jarg1; 
    9072             :   {
    9073             :     /* %typemap(in) (double argout[ANY]) */
    9074           0 :     if(jarg2 == NULL || jenv->GetArrayLength(jarg2) != 4) {
    9075             :       char errorMsg[128];
    9076           0 :       snprintf(errorMsg, sizeof(errorMsg), "array of size %d expected", 4);
    9077           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, errorMsg);
    9078           0 :       return 0;
    9079             :     }
    9080           0 :     arg2 = (double *)jenv->GetDoubleArrayElements(jarg2, NULL);
    9081             :   }
    9082           0 :   arg3 = (double)jarg3; 
    9083           0 :   arg4 = (double)jarg4; 
    9084           0 :   arg5 = (double)jarg5; 
    9085           0 :   arg6 = (double)jarg6; 
    9086           0 :   result = (int)OSRCoordinateTransformationShadow_TransformPointWithErrorCode(arg1,arg2,arg3,arg4,arg5,arg6);
    9087           0 :   jresult = (jint)result; 
    9088             :   {
    9089             :     /* %typemap(argout) (double argout[ANY]) */
    9090             :   }
    9091             :   {
    9092             :     /* %typemap(freearg) (double argout[ANY]) */
    9093           0 :     jenv->ReleaseDoubleArrayElements(jarg2, (jdouble *)arg2, 0);
    9094             :   }
    9095           0 :   return jresult;
    9096             : }
    9097             : 
    9098             : 
    9099           0 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_CoordinateTransformation_1TransformPoints(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2) {
    9100           0 :   OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
    9101             :   int arg2 ;
    9102           0 :   double *arg3 = (double *) 0 ;
    9103           0 :   double *arg4 = (double *) 0 ;
    9104           0 :   double *arg5 = (double *) 0 ;
    9105             :   int xyzLen2 ;
    9106             :   
    9107             :   (void)jenv;
    9108             :   (void)jcls;
    9109             :   (void)jarg1_;
    9110           0 :   arg1 = *(OSRCoordinateTransformationShadow **)&jarg1; 
    9111             :   {
    9112             :     /* %typemap(in) ( int nCount, double *x, double *y, double *z ) */
    9113           0 :     arg2 = (jarg2) ? jenv->GetArrayLength(jarg2) : 0;
    9114           0 :     xyzLen2 = arg2;
    9115           0 :     arg3 = (double*)CPLMalloc(arg2 * sizeof(double));
    9116           0 :     arg4 = (double*)CPLMalloc(arg2 * sizeof(double));
    9117           0 :     arg5 = (double*)CPLMalloc(arg2 * sizeof(double));
    9118             :     int i;
    9119           0 :     for (i=0; i<arg2; i++) {
    9120           0 :       jdoubleArray doubleArray = (jdoubleArray)jenv->GetObjectArrayElement(jarg2, i);
    9121           0 :       if (doubleArray == NULL)
    9122             :       {
    9123           0 :         CPLFree (arg3);
    9124           0 :         CPLFree (arg4);
    9125           0 :         CPLFree (arg5);
    9126           0 :         SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null object in array");
    9127           0 :         return ;
    9128             :       }
    9129           0 :       int nDim = jenv->GetArrayLength(doubleArray);
    9130           0 :       if (nDim != 2 && nDim != 3)
    9131             :       {
    9132           0 :         CPLFree (arg3);
    9133           0 :         CPLFree (arg4);
    9134           0 :         CPLFree (arg5);
    9135           0 :         SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "wrong array dimensions");
    9136           0 :         return ;
    9137             :       }
    9138           0 :       double* pElements = jenv->GetDoubleArrayElements(doubleArray, NULL);
    9139           0 :       arg3[i] = pElements[0];
    9140           0 :       arg4[i] = pElements[1];
    9141           0 :       if (nDim == 3)
    9142           0 :       arg5[i] = pElements[2];
    9143             :       else
    9144           0 :       arg5[i] = 0;
    9145           0 :       jenv->ReleaseDoubleArrayElements(doubleArray, pElements, JNI_ABORT);
    9146             :     }
    9147             :   }
    9148           0 :   OSRCoordinateTransformationShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5);
    9149             :   {
    9150             :     /* %typemap(argout) ( int nCount, double *x, double *y, double *z ) */
    9151             :     int i;
    9152           0 :     for (i=0; i<arg2; i++) {
    9153           0 :       jdoubleArray doubleArray = (jdoubleArray)jenv->GetObjectArrayElement(jarg2, i);
    9154           0 :       int nDim = jenv->GetArrayLength(doubleArray);
    9155           0 :       jenv->SetDoubleArrayRegion(doubleArray, (jsize)0, (jsize)1, &arg3[i]);
    9156           0 :       jenv->SetDoubleArrayRegion(doubleArray, (jsize)1, (jsize)1, &arg4[i]);
    9157           0 :       if (nDim == 3)
    9158           0 :       jenv->SetDoubleArrayRegion(doubleArray, (jsize)2, (jsize)1, &arg5[i]);
    9159             :     }
    9160           0 :     CPLFree(arg3);
    9161           0 :     CPLFree(arg4);
    9162           0 :     CPLFree(arg5);
    9163             :   }
    9164             : }
    9165             : 
    9166             : 
    9167           0 : SWIGEXPORT jintArray JNICALL Java_org_gdal_osr_osrJNI_CoordinateTransformation_1TransformPointsWithErrorCodes(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2) {
    9168           0 :   jintArray jresult = 0 ;
    9169           0 :   OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
    9170             :   int arg2 ;
    9171           0 :   double *arg3 = (double *) 0 ;
    9172           0 :   double *arg4 = (double *) 0 ;
    9173           0 :   double *arg5 = (double *) 0 ;
    9174           0 :   double *arg6 = (double *) 0 ;
    9175           0 :   int *arg7 = (int *) 0 ;
    9176           0 :   int **arg8 = (int **) 0 ;
    9177             :   int xyzLen2 ;
    9178           0 :   int nPoints7 = 0 ;
    9179           0 :   int *errorCodes7 = NULL ;
    9180           0 :   int *result = 0 ;
    9181             :   
    9182             :   (void)jenv;
    9183             :   (void)jcls;
    9184             :   {
    9185             :     /* %typemap(in,numinputs=0) (int* pnCountOut, int** outErrorCodes) */
    9186           0 :     arg7 = &nPoints7;
    9187           0 :     arg8 = &errorCodes7;
    9188             :   }
    9189             :   (void)jarg1_;
    9190           0 :   arg1 = *(OSRCoordinateTransformationShadow **)&jarg1; 
    9191             :   {
    9192             :     /* %typemap(in) ( int nCount, double *x, double *y, double *z, double *t ) */
    9193           0 :     arg2 = (jarg2) ? jenv->GetArrayLength(jarg2) : 0;
    9194           0 :     xyzLen2 = arg2;
    9195           0 :     arg3 = (double*)CPLMalloc(arg2 * sizeof(double));
    9196           0 :     arg4 = (double*)CPLMalloc(arg2 * sizeof(double));
    9197           0 :     arg5 = (double*)CPLMalloc(arg2 * sizeof(double));
    9198           0 :     arg6 = (double*)CPLMalloc(arg2 * sizeof(double));
    9199             :     int i;
    9200           0 :     for (i=0; i<arg2; i++) {
    9201           0 :       jdoubleArray doubleArray = (jdoubleArray)jenv->GetObjectArrayElement(jarg2, i);
    9202           0 :       if (doubleArray == NULL)
    9203             :       {
    9204           0 :         CPLFree (arg3);
    9205           0 :         CPLFree (arg4);
    9206           0 :         CPLFree (arg5);
    9207           0 :         CPLFree (arg6);
    9208           0 :         SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "null object in array");
    9209           0 :         return 0;
    9210             :       }
    9211           0 :       int nDim = jenv->GetArrayLength(doubleArray);
    9212           0 :       if (nDim != 2 && nDim != 3 && nDim != 4)
    9213             :       {
    9214           0 :         CPLFree (arg3);
    9215           0 :         CPLFree (arg4);
    9216           0 :         CPLFree (arg5);
    9217           0 :         CPLFree (arg6);
    9218           0 :         SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "wrong array dimensions");
    9219           0 :         return 0;
    9220             :       }
    9221           0 :       double* pElements = jenv->GetDoubleArrayElements(doubleArray, NULL);
    9222           0 :       arg3[i] = pElements[0];
    9223           0 :       arg4[i] = pElements[1];
    9224           0 :       if (nDim == 3 || nDim == 4)
    9225           0 :       arg5[i] = pElements[2];
    9226             :       else
    9227           0 :       arg5[i] = 0;
    9228           0 :       if (nDim == 4)
    9229           0 :       arg6[i] = pElements[3];
    9230             :       else
    9231           0 :       arg6[i] = 0;
    9232           0 :       jenv->ReleaseDoubleArrayElements(doubleArray, pElements, JNI_ABORT);
    9233             :     }
    9234             :   }
    9235           0 :   result = (int *)OSRCoordinateTransformationShadow_TransformPointsWithErrorCodes(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
    9236           0 :   *(int **)&jresult = result; 
    9237             :   {
    9238             :     /* %typemap(argout) ( int nCount, double *x, double *y, double *z, double *t ) */
    9239             :     int i;
    9240           0 :     for (i=0; i<arg2; i++) {
    9241           0 :       jdoubleArray doubleArray = (jdoubleArray)jenv->GetObjectArrayElement(jarg2, i);
    9242           0 :       int nDim = jenv->GetArrayLength(doubleArray);
    9243           0 :       jenv->SetDoubleArrayRegion(doubleArray, (jsize)0, (jsize)1, &arg3[i]);
    9244           0 :       jenv->SetDoubleArrayRegion(doubleArray, (jsize)1, (jsize)1, &arg4[i]);
    9245           0 :       if (nDim == 3 || nDim == 4)
    9246           0 :       jenv->SetDoubleArrayRegion(doubleArray, (jsize)2, (jsize)1, &arg5[i]);
    9247           0 :       if (nDim == 4)
    9248           0 :       jenv->SetDoubleArrayRegion(doubleArray, (jsize)3, (jsize)1, &arg6[i]);
    9249             :     }
    9250           0 :     CPLFree(arg3);
    9251           0 :     CPLFree(arg4);
    9252           0 :     CPLFree(arg5);
    9253           0 :     CPLFree(arg6);
    9254             :   }
    9255             :   {
    9256             :     /* %typemap(argout) (int* pnCountOut, int** outErrorCodes) */
    9257           0 :     int nPointCount = *(arg7);
    9258           0 :     const int* errorCodes = *(arg8);
    9259           0 :     jintArray intArray = jenv->NewIntArray(nPointCount);
    9260           0 :     jenv->SetIntArrayRegion(intArray, (jsize)0, (jsize)nPointCount, (jint*)errorCodes);
    9261           0 :     *(jintArray *)&jresult = intArray;
    9262             :   }
    9263             :   {
    9264             :     /* %typemap(freearg) (int* pnCountOut, int** outErrorCodes) */
    9265           0 :     int* errorCodes = *(arg8);
    9266           0 :     VSIFree(errorCodes);
    9267             :   }
    9268           0 :   return jresult;
    9269             : }
    9270             : 
    9271             : 
    9272           0 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_CoordinateTransformation_1TransformBounds(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jdoubleArray jarg2, jdouble jarg3, jdouble jarg4, jdouble jarg5, jdouble jarg6, jint jarg7) {
    9273           0 :   OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
    9274             :   double *arg2 ;
    9275             :   double arg3 ;
    9276             :   double arg4 ;
    9277             :   double arg5 ;
    9278             :   double arg6 ;
    9279             :   int arg7 ;
    9280             :   
    9281             :   (void)jenv;
    9282             :   (void)jcls;
    9283             :   (void)jarg1_;
    9284           0 :   arg1 = *(OSRCoordinateTransformationShadow **)&jarg1; 
    9285             :   {
    9286             :     /* %typemap(in) (double argout[ANY]) */
    9287           0 :     if(jarg2 == NULL || jenv->GetArrayLength(jarg2) != 4) {
    9288             :       char errorMsg[128];
    9289           0 :       snprintf(errorMsg, sizeof(errorMsg), "array of size %d expected", 4);
    9290           0 :       SWIG_JavaThrowException(jenv, SWIG_JavaIndexOutOfBoundsException, errorMsg);
    9291           0 :       return ;
    9292             :     }
    9293           0 :     arg2 = (double *)jenv->GetDoubleArrayElements(jarg2, NULL);
    9294             :   }
    9295           0 :   arg3 = (double)jarg3; 
    9296           0 :   arg4 = (double)jarg4; 
    9297           0 :   arg5 = (double)jarg5; 
    9298           0 :   arg6 = (double)jarg6; 
    9299           0 :   arg7 = (int)jarg7; 
    9300           0 :   OSRCoordinateTransformationShadow_TransformBounds(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
    9301             :   {
    9302             :     /* %typemap(argout) (double argout[ANY]) */
    9303             :   }
    9304             :   {
    9305             :     /* %typemap(freearg) (double argout[ANY]) */
    9306           0 :     jenv->ReleaseDoubleArrayElements(jarg2, (jdouble *)arg2, 0);
    9307             :   }
    9308             : }
    9309             : 
    9310             : 
    9311           2 : SWIGEXPORT jlong JNICALL Java_org_gdal_osr_osrJNI_CreateCoordinateTransformation_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) {
    9312           2 :   jlong jresult = 0 ;
    9313           2 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    9314           2 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    9315           2 :   OGRCoordinateTransformationOptions *arg3 = (OGRCoordinateTransformationOptions *) 0 ;
    9316           2 :   OSRCoordinateTransformationShadow *result = 0 ;
    9317             :   
    9318             :   (void)jenv;
    9319             :   (void)jcls;
    9320             :   (void)jarg1_;
    9321             :   (void)jarg2_;
    9322             :   (void)jarg3_;
    9323           2 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    9324           2 :   arg2 = *(OSRSpatialReferenceShadow **)&jarg2; 
    9325           2 :   arg3 = *(OGRCoordinateTransformationOptions **)&jarg3; 
    9326           2 :   result = (OSRCoordinateTransformationShadow *)CreateCoordinateTransformation(arg1,arg2,arg3);
    9327           2 :   *(OSRCoordinateTransformationShadow **)&jresult = result; 
    9328           2 :   return jresult;
    9329             : }
    9330             : 
    9331             : 
    9332           7 : SWIGEXPORT jlong JNICALL Java_org_gdal_osr_osrJNI_CreateCoordinateTransformation_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
    9333           7 :   jlong jresult = 0 ;
    9334           7 :   OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
    9335           7 :   OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
    9336           7 :   OSRCoordinateTransformationShadow *result = 0 ;
    9337             :   
    9338             :   (void)jenv;
    9339             :   (void)jcls;
    9340             :   (void)jarg1_;
    9341             :   (void)jarg2_;
    9342           7 :   arg1 = *(OSRSpatialReferenceShadow **)&jarg1; 
    9343           7 :   arg2 = *(OSRSpatialReferenceShadow **)&jarg2; 
    9344           7 :   result = (OSRCoordinateTransformationShadow *)CreateCoordinateTransformation(arg1,arg2);
    9345           7 :   *(OSRCoordinateTransformationShadow **)&jresult = result; 
    9346           7 :   return jresult;
    9347             : }
    9348             : 
    9349             : 
    9350           0 : SWIGEXPORT jobject JNICALL Java_org_gdal_osr_osrJNI_GetAuthorityListFromDatabase(JNIEnv *jenv, jclass jcls) {
    9351           0 :   jobject jresult = 0 ;
    9352           0 :   char **result = 0 ;
    9353             :   
    9354             :   (void)jenv;
    9355             :   (void)jcls;
    9356           0 :   result = (char **)GetAuthorityListFromDatabase();
    9357             :   {
    9358             :     /* %typemap(out) char **CSL */
    9359           0 :     char **stringarray = result;
    9360           0 :     const jclass vector = jenv->FindClass("java/util/Vector");
    9361           0 :     const jmethodID constructor = jenv->GetMethodID(vector, "<init>", "()V");
    9362           0 :     const jmethodID add = jenv->GetMethodID(vector, "add", "(Ljava/lang/Object;)Z");
    9363             :     
    9364           0 :     jresult = jenv->NewObject(vector, constructor);
    9365           0 :     if ( stringarray != NULL ) {
    9366           0 :       while(*stringarray != NULL) {
    9367           0 :         jstring value = SafeNewStringUTF8(jenv, *stringarray);
    9368           0 :         jenv->CallBooleanMethod(jresult, add, value);
    9369           0 :         jenv->DeleteLocalRef(value);
    9370           0 :         stringarray++;
    9371             :       }
    9372             :     }
    9373           0 :     CSLDestroy(result);
    9374             :   }
    9375           0 :   return jresult;
    9376             : }
    9377             : 
    9378             : 
    9379           0 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_SetPROJSearchPath(JNIEnv *jenv, jclass jcls, jstring jarg1) {
    9380           0 :   char *arg1 = (char *) 0 ;
    9381             :   
    9382             :   (void)jenv;
    9383             :   (void)jcls;
    9384           0 :   arg1 = 0;
    9385           0 :   if (jarg1) {
    9386           0 :     arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    9387           0 :     if (!arg1) return ;
    9388             :   }
    9389           0 :   SetPROJSearchPath((char const *)arg1);
    9390           0 :   if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    9391             : }
    9392             : 
    9393             : 
    9394           0 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_SetPROJSearchPaths(JNIEnv *jenv, jclass jcls, jobject jarg1) {
    9395           0 :   char **arg1 = (char **) 0 ;
    9396             :   
    9397             :   (void)jenv;
    9398             :   (void)jcls;
    9399             :   {
    9400             :     /* %typemap(in) char **options */
    9401           0 :     arg1 = NULL;
    9402           0 :     if(jarg1 != 0) {
    9403           0 :       const jclass vector = jenv->FindClass("java/util/Vector");
    9404           0 :       const jclass enumeration = jenv->FindClass("java/util/Enumeration");
    9405           0 :       const jclass stringClass = jenv->FindClass("java/lang/String");
    9406           0 :       const jmethodID elements = jenv->GetMethodID(vector, "elements",
    9407             :         "()Ljava/util/Enumeration;");
    9408           0 :       const jmethodID hasMoreElements = jenv->GetMethodID(enumeration,
    9409             :         "hasMoreElements", "()Z");
    9410           0 :       const jmethodID getNextElement = jenv->GetMethodID(enumeration,
    9411             :         "nextElement", "()Ljava/lang/Object;");
    9412           0 :       if(vector == NULL || enumeration == NULL || elements == NULL ||
    9413           0 :         hasMoreElements == NULL || getNextElement == NULL) {
    9414           0 :         fprintf(stderr, "Could not load (options **) jni types.\n");
    9415           0 :         return ;
    9416             :       }
    9417           0 :       for (jobject keys = jenv->CallObjectMethod(jarg1, elements);
    9418           0 :         jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
    9419           0 :         jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
    9420           0 :         if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
    9421             :         {
    9422           0 :           CSLDestroy(arg1);
    9423           0 :           SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
    9424           0 :           return ;
    9425             :         }
    9426           0 :         const char *valptr = jenv->GetStringUTFChars(value, 0);
    9427           0 :         arg1 = CSLAddString(arg1,  valptr);
    9428           0 :         jenv->ReleaseStringUTFChars(value, valptr);
    9429             :       }
    9430             :     }
    9431             :   }
    9432           0 :   SetPROJSearchPaths(arg1);
    9433             :   {
    9434             :     /* %typemap(freearg) char **options */
    9435           0 :     CSLDestroy( arg1 );
    9436             :   }
    9437             : }
    9438             : 
    9439             : 
    9440           0 : SWIGEXPORT jobject JNICALL Java_org_gdal_osr_osrJNI_GetPROJSearchPaths(JNIEnv *jenv, jclass jcls) {
    9441           0 :   jobject jresult = 0 ;
    9442           0 :   char **result = 0 ;
    9443             :   
    9444             :   (void)jenv;
    9445             :   (void)jcls;
    9446           0 :   result = (char **)GetPROJSearchPaths();
    9447             :   {
    9448             :     /* %typemap(out) char **CSL */
    9449           0 :     char **stringarray = result;
    9450           0 :     const jclass vector = jenv->FindClass("java/util/Vector");
    9451           0 :     const jmethodID constructor = jenv->GetMethodID(vector, "<init>", "()V");
    9452           0 :     const jmethodID add = jenv->GetMethodID(vector, "add", "(Ljava/lang/Object;)Z");
    9453             :     
    9454           0 :     jresult = jenv->NewObject(vector, constructor);
    9455           0 :     if ( stringarray != NULL ) {
    9456           0 :       while(*stringarray != NULL) {
    9457           0 :         jstring value = SafeNewStringUTF8(jenv, *stringarray);
    9458           0 :         jenv->CallBooleanMethod(jresult, add, value);
    9459           0 :         jenv->DeleteLocalRef(value);
    9460           0 :         stringarray++;
    9461             :       }
    9462             :     }
    9463           0 :     CSLDestroy(result);
    9464             :   }
    9465           0 :   return jresult;
    9466             : }
    9467             : 
    9468             : 
    9469           2 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_GetPROJVersionMajor(JNIEnv *jenv, jclass jcls) {
    9470           2 :   jint jresult = 0 ;
    9471             :   int result;
    9472             :   
    9473             :   (void)jenv;
    9474             :   (void)jcls;
    9475           2 :   result = (int)GetPROJVersionMajor();
    9476           2 :   jresult = (jint)result; 
    9477           2 :   return jresult;
    9478             : }
    9479             : 
    9480             : 
    9481           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_GetPROJVersionMinor(JNIEnv *jenv, jclass jcls) {
    9482           0 :   jint jresult = 0 ;
    9483             :   int result;
    9484             :   
    9485             :   (void)jenv;
    9486             :   (void)jcls;
    9487           0 :   result = (int)GetPROJVersionMinor();
    9488           0 :   jresult = (jint)result; 
    9489           0 :   return jresult;
    9490             : }
    9491             : 
    9492             : 
    9493           0 : SWIGEXPORT jint JNICALL Java_org_gdal_osr_osrJNI_GetPROJVersionMicro(JNIEnv *jenv, jclass jcls) {
    9494           0 :   jint jresult = 0 ;
    9495             :   int result;
    9496             :   
    9497             :   (void)jenv;
    9498             :   (void)jcls;
    9499           0 :   result = (int)GetPROJVersionMicro();
    9500           0 :   jresult = (jint)result; 
    9501           0 :   return jresult;
    9502             : }
    9503             : 
    9504             : 
    9505           0 : SWIGEXPORT jboolean JNICALL Java_org_gdal_osr_osrJNI_GetPROJEnableNetwork(JNIEnv *jenv, jclass jcls) {
    9506           0 :   jboolean jresult = 0 ;
    9507             :   bool result;
    9508             :   
    9509             :   (void)jenv;
    9510             :   (void)jcls;
    9511           0 :   result = (bool)GetPROJEnableNetwork();
    9512           0 :   jresult = (jboolean)result; 
    9513           0 :   return jresult;
    9514             : }
    9515             : 
    9516             : 
    9517           0 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_SetPROJEnableNetwork(JNIEnv *jenv, jclass jcls, jboolean jarg1) {
    9518             :   bool arg1 ;
    9519             :   
    9520             :   (void)jenv;
    9521             :   (void)jcls;
    9522           0 :   arg1 = jarg1 ? true : false; 
    9523           0 :   SetPROJEnableNetwork(arg1);
    9524           0 : }
    9525             : 
    9526             : 
    9527           0 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_SetPROJAuxDbPath(JNIEnv *jenv, jclass jcls, jstring jarg1) {
    9528           0 :   char *arg1 = (char *) 0 ;
    9529             :   
    9530             :   (void)jenv;
    9531             :   (void)jcls;
    9532           0 :   arg1 = 0;
    9533           0 :   if (jarg1) {
    9534           0 :     arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    9535           0 :     if (!arg1) return ;
    9536             :   }
    9537           0 :   SetPROJAuxDbPath((char const *)arg1);
    9538           0 :   if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
    9539             : }
    9540             : 
    9541             : 
    9542           0 : SWIGEXPORT void JNICALL Java_org_gdal_osr_osrJNI_SetPROJAuxDbPaths(JNIEnv *jenv, jclass jcls, jobject jarg1) {
    9543           0 :   char **arg1 = (char **) 0 ;
    9544             :   
    9545             :   (void)jenv;
    9546             :   (void)jcls;
    9547             :   {
    9548             :     /* %typemap(in) char **options */
    9549           0 :     arg1 = NULL;
    9550           0 :     if(jarg1 != 0) {
    9551           0 :       const jclass vector = jenv->FindClass("java/util/Vector");
    9552           0 :       const jclass enumeration = jenv->FindClass("java/util/Enumeration");
    9553           0 :       const jclass stringClass = jenv->FindClass("java/lang/String");
    9554           0 :       const jmethodID elements = jenv->GetMethodID(vector, "elements",
    9555             :         "()Ljava/util/Enumeration;");
    9556           0 :       const jmethodID hasMoreElements = jenv->GetMethodID(enumeration,
    9557             :         "hasMoreElements", "()Z");
    9558           0 :       const jmethodID getNextElement = jenv->GetMethodID(enumeration,
    9559             :         "nextElement", "()Ljava/lang/Object;");
    9560           0 :       if(vector == NULL || enumeration == NULL || elements == NULL ||
    9561           0 :         hasMoreElements == NULL || getNextElement == NULL) {
    9562           0 :         fprintf(stderr, "Could not load (options **) jni types.\n");
    9563           0 :         return ;
    9564             :       }
    9565           0 :       for (jobject keys = jenv->CallObjectMethod(jarg1, elements);
    9566           0 :         jenv->CallBooleanMethod(keys, hasMoreElements) == JNI_TRUE;) {
    9567           0 :         jstring value = (jstring)jenv->CallObjectMethod(keys, getNextElement);
    9568           0 :         if (value == NULL || !jenv->IsInstanceOf(value, stringClass))
    9569             :         {
    9570           0 :           CSLDestroy(arg1);
    9571           0 :           SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, "an element in the vector is not a string");
    9572           0 :           return ;
    9573             :         }
    9574           0 :         const char *valptr = jenv->GetStringUTFChars(value, 0);
    9575           0 :         arg1 = CSLAddString(arg1,  valptr);
    9576           0 :         jenv->ReleaseStringUTFChars(value, valptr);
    9577             :       }
    9578             :     }
    9579             :   }
    9580           0 :   SetPROJAuxDbPaths(arg1);
    9581             :   {
    9582             :     /* %typemap(freearg) char **options */
    9583           0 :     CSLDestroy( arg1 );
    9584             :   }
    9585             : }
    9586             : 
    9587             : 
    9588           0 : SWIGEXPORT jobject JNICALL Java_org_gdal_osr_osrJNI_GetPROJAuxDbPaths(JNIEnv *jenv, jclass jcls) {
    9589           0 :   jobject jresult = 0 ;
    9590           0 :   char **result = 0 ;
    9591             :   
    9592             :   (void)jenv;
    9593             :   (void)jcls;
    9594           0 :   result = (char **)GetPROJAuxDbPaths();
    9595             :   {
    9596             :     /* %typemap(out) char **CSL */
    9597           0 :     char **stringarray = result;
    9598           0 :     const jclass vector = jenv->FindClass("java/util/Vector");
    9599           0 :     const jmethodID constructor = jenv->GetMethodID(vector, "<init>", "()V");
    9600           0 :     const jmethodID add = jenv->GetMethodID(vector, "add", "(Ljava/lang/Object;)Z");
    9601             :     
    9602           0 :     jresult = jenv->NewObject(vector, constructor);
    9603           0 :     if ( stringarray != NULL ) {
    9604           0 :       while(*stringarray != NULL) {
    9605           0 :         jstring value = SafeNewStringUTF8(jenv, *stringarray);
    9606           0 :         jenv->CallBooleanMethod(jresult, add, value);
    9607           0 :         jenv->DeleteLocalRef(value);
    9608           0 :         stringarray++;
    9609             :       }
    9610             :     }
    9611           0 :     CSLDestroy(result);
    9612             :   }
    9613           0 :   return jresult;
    9614             : }
    9615             : 
    9616             : 
    9617             : #ifdef __cplusplus
    9618             : }
    9619             : #endif
    9620             : 

Generated by: LCOV version 1.14