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: 280 4583 6.1 %
Date: 2026-05-08 18:52:02 Functions: 48 464 10.3 %

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

Generated by: LCOV version 1.14