~ubuntu-branches/debian/sid/gdal/sid

« back to all changes in this revision

Viewing changes to swig/python/extensions/osr_wrap.cpp

  • Committer: Package Import Robot
  • Author(s): Francesco Paolo Lovergine
  • Date: 2012-05-07 15:04:42 UTC
  • mfrom: (5.5.16 experimental)
  • Revision ID: package-import@ubuntu.com-20120507150442-2eks97loeh6rq005
Tags: 1.9.0-1
* Ready for sid, starting transition.
* All symfiles updated to latest builds.
* Added dh_numpy call in debian/rules to depend on numpy ABI.
* Policy bumped to 3.9.3, no changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* ----------------------------------------------------------------------------
2
2
 * This file was automatically generated by SWIG (http://www.swig.org).
3
 
 * Version 1.3.39
 
3
 * Version 1.3.40
4
4
 * 
5
5
 * This file is not intended to be easily readable and contains a number of 
6
6
 * coding conventions designed to improve portability and efficiency. Do not make
749
749
 
750
750
 
751
751
 
752
 
/* Compatibility marcos for Python 3 */
 
752
/* Compatibility macros for Python 3 */
753
753
#if PY_VERSION_HEX >= 0x03000000
754
754
 
755
755
#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
782
782
#if PY_VERSION_HEX >= 0x03000000
783
783
  char *cstr;
784
784
  char *newstr;
785
 
  int len;
 
785
  Py_ssize_t len;
786
786
  str = PyUnicode_AsUTF8String(str);
787
787
  PyBytes_AsStringAndSize(str, &cstr, &len);
788
788
  newstr = (char *) malloc(len+1);
1129
1129
 
1130
1130
/* Runtime API */
1131
1131
 
 
1132
#if PY_VERSION_HEX >= 0x03020000
 
1133
#define SWIG_PYTHON_USE_CAPSULE
 
1134
#endif
 
1135
 
1132
1136
#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule()
1133
1137
#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
1134
1138
#define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)
1472
1476
#endif
1473
1477
{
1474
1478
  const char *name = SWIG_TypePrettyName(v->ty);
1475
 
  PyObject *hex = SwigPyObject_hex(v);    
1476
 
  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, hex);
1477
 
  Py_DECREF(hex);
 
1479
  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v);
1478
1480
  if (v->next) {
1479
1481
#ifdef METH_NOARGS
1480
1482
    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1529
1531
  return (i < j) ? -1 : ((i > j) ? 1 : 0);
1530
1532
}
1531
1533
 
1532
 
/* Added for Python 3.x, whould it also useful for Python 2.x? */
 
1534
/* Added for Python 3.x, would it also be useful for Python 2.x? */
1533
1535
SWIGRUNTIME PyObject*
1534
1536
SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
1535
1537
{
1577
1579
      /* destroy is always a VARARGS method */
1578
1580
      PyObject *res;
1579
1581
      if (data->delargs) {
1580
 
        /* we need to create a temporal object to carry the destroy operation */
 
1582
        /* we need to create a temporary object to carry the destroy operation */
1581
1583
        PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1582
1584
        res = SWIG_Python_CallFunctor(destroy, tmp);
1583
1585
        Py_DECREF(tmp);
1778
1780
  if (!type_init) {
1779
1781
    const PyTypeObject tmp
1780
1782
      = {
1781
 
        /* PyOjbect header changed in Python 3 */
 
1783
        /* PyObject header changed in Python 3 */
1782
1784
#if PY_VERSION_HEX >= 0x03000000
1783
1785
        PyVarObject_HEAD_INIT(&PyType_Type, 0)
1784
1786
#else    
1797
1799
#endif
1798
1800
        (setattrfunc)0,                     /* tp_setattr */ 
1799
1801
#if PY_VERSION_HEX >= 0x03000000
1800
 
    0, /* tp_reserved in 3.0.1 */
 
1802
    0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1801
1803
#else
1802
1804
        (cmpfunc)SwigPyObject_compare,      /* tp_compare */
1803
1805
#endif
1847
1849
#endif
1848
1850
      };
1849
1851
    swigpyobject_type = tmp;
1850
 
    /* for Python 3 we already assigned the ob_type in PyVarObject_HEAD_INIT() */
 
1852
    /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
1851
1853
#if PY_VERSION_HEX < 0x03000000
1852
1854
    swigpyobject_type.ob_type = &PyType_Type;
1853
1855
#endif
2254
2256
    /* here we get the method pointer for callbacks */
2255
2257
    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2256
2258
    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2257
 
    if (desc) {
 
2259
    if (desc)
2258
2260
      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2259
 
      if (!desc) return SWIG_ERROR;
2260
 
    }
 
2261
    if (!desc) 
 
2262
      return SWIG_ERROR;
2261
2263
    if (ty) {
2262
2264
      swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
2263
2265
      if (tc) {
2295
2297
 * ----------------------------------------------------------------------------- */
2296
2298
 
2297
2299
/*
2298
 
  Create a new instance object, whitout calling __init__, and set the
 
2300
  Create a new instance object, without calling __init__, and set the
2299
2301
  'this' attribute.
2300
2302
*/
2301
2303
 
2450
2452
#ifdef SWIG_LINK_RUNTIME
2451
2453
    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2452
2454
#else
 
2455
#ifdef SWIG_PYTHON_USE_CAPSULE
 
2456
    type_pointer = PyCapsule_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer" SWIG_TYPE_TABLE_NAME, 0);
 
2457
#else
2453
2458
    type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2454
2459
                                    (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
 
2460
#endif
2455
2461
    if (PyErr_Occurred()) {
2456
2462
      PyErr_Clear();
2457
2463
      type_pointer = (void *)0;
2494
2500
#endif
2495
2501
 
2496
2502
SWIGRUNTIME void
 
2503
#ifdef SWIG_PYTHON_USE_CAPSULE
 
2504
SWIG_Python_DestroyModule(PyObject *capsule)
 
2505
{
 
2506
  swig_module_info *swig_module;
 
2507
  swig_type_info **types;
 
2508
  size_t i;
 
2509
  swig_module = (swig_module_info *)PyCapsule_GetPointer(capsule, (char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
 
2510
  if (swig_module == NULL)
 
2511
  {
 
2512
    PyErr_Clear();
 
2513
    return;
 
2514
  }
 
2515
  types = swig_module->types;
 
2516
#else
2497
2517
SWIG_Python_DestroyModule(void *vptr)
2498
2518
{
2499
2519
  swig_module_info *swig_module = (swig_module_info *) vptr;
2500
2520
  swig_type_info **types = swig_module->types;
2501
2521
  size_t i;
 
2522
#endif
2502
2523
  for (i =0; i < swig_module->size; ++i) {
2503
2524
    swig_type_info *ty = types[i];
2504
2525
    if (ty->owndata) {
2520
2541
  PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2521
2542
                                   swig_empty_runtime_method_table);
2522
2543
#endif
 
2544
#ifdef SWIG_PYTHON_USE_CAPSULE
 
2545
  PyObject *pointer = PyCapsule_New((void *) swig_module,
 
2546
                                    (char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer" SWIG_TYPE_TABLE_NAME,
 
2547
                                    SWIG_Python_DestroyModule);
 
2548
#else
2523
2549
  PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
 
2550
#endif
2524
2551
  if (pointer && module) {
2525
2552
    PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2526
2553
  } else {
2543
2570
  PyObject *obj = PyDict_GetItem(cache, key);
2544
2571
  swig_type_info *descriptor;
2545
2572
  if (obj) {
 
2573
#ifdef SWIG_PYTHON_USE_CAPSULE
 
2574
    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, (char*)"swig_type_info");
 
2575
#else
2546
2576
    descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
 
2577
#endif
2547
2578
  } else {
2548
2579
    swig_module_info *swig_module = SWIG_Python_GetModule();
2549
2580
    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2550
2581
    if (descriptor) {
 
2582
#ifdef SWIG_PYTHON_USE_CAPSULE
 
2583
      obj = PyCapsule_New(descriptor, (char*)"swig_type_info", NULL);
 
2584
#else
2551
2585
      obj = PyCObject_FromVoidPtr(descriptor, NULL);
 
2586
#endif
2552
2587
      PyDict_SetItem(cache, key, obj);
2553
2588
      Py_DECREF(obj);
2554
2589
    }
2720
2755
#endif
2721
2756
#define SWIG_name    "_osr"
2722
2757
 
2723
 
#define SWIGVERSION 0x010339 
 
2758
#define SWIGVERSION 0x010340 
2724
2759
#define SWIG_VERSION SWIGVERSION
2725
2760
 
2726
2761
 
2837
2872
  #define SWIG_From_double   PyFloat_FromDouble 
2838
2873
 
2839
2874
 
 
2875
typedef char retStringAndCPLFree;
 
2876
 
 
2877
 
2840
2878
#include <iostream>
2841
2879
using namespace std;
2842
2880
 
2854
2892
typedef void OSRCoordinateTransformationShadow;
2855
2893
#endif
2856
2894
 
2857
 
typedef char retStringAndCPLFree;
2858
 
 
2859
 
 
2860
2895
 
2861
2896
int bUseExceptions=0;
 
2897
CPLErrorHandler pfnPreviousHandler = CPLDefaultErrorHandler;
2862
2898
 
2863
2899
void CPL_STDCALL 
2864
 
VeryQuietErrorHandler(CPLErr eclass, int code, const char *msg ) 
 
2900
PythonBindingErrorHandler(CPLErr eclass, int code, const char *msg ) 
2865
2901
{
 
2902
  /* 
 
2903
  ** Generally we want to supress error reporting if we have exceptions
 
2904
  ** enabled as the error message will be in the exception thrown in 
 
2905
  ** Python.  
 
2906
  */
 
2907
 
2866
2908
  /* If the error class is CE_Fatal, we want to have a message issued
2867
2909
     because the CPL support code does an abort() before any exception
2868
2910
     can be generated */
2869
2911
  if (eclass == CE_Fatal ) {
2870
 
    CPLDefaultErrorHandler(eclass, code, msg );
2871
 
  }
2872
 
}
2873
 
 
 
2912
    pfnPreviousHandler(eclass, code, msg );
 
2913
  }
 
2914
 
 
2915
  /*
 
2916
  ** We do not want to interfere with warnings or debug messages since
 
2917
  ** they won't be translated into exceptions.
 
2918
  */
 
2919
  if (eclass == CE_Warning || eclass == CE_Debug ) {
 
2920
    pfnPreviousHandler(eclass, code, msg );
 
2921
  }
 
2922
}
 
2923
 
 
2924
 
 
2925
 
 
2926
int GetUseExceptions() {
 
2927
  return bUseExceptions;
 
2928
}
2874
2929
 
2875
2930
void UseExceptions() {
2876
2931
  bUseExceptions = 1;
2877
 
  CPLSetErrorHandler( (CPLErrorHandler) VeryQuietErrorHandler );
 
2932
  pfnPreviousHandler = 
 
2933
    CPLSetErrorHandler( (CPLErrorHandler) PythonBindingErrorHandler );
2878
2934
}
2879
2935
 
2880
2936
void DontUseExceptions() {
2881
2937
  bUseExceptions = 0;
2882
 
  CPLSetErrorHandler( CPLDefaultErrorHandler );
 
2938
  CPLSetErrorHandler( pfnPreviousHandler );
 
2939
}
 
2940
 
 
2941
 
 
2942
  #define SWIG_From_long   PyInt_FromLong 
 
2943
 
 
2944
 
 
2945
SWIGINTERNINLINE PyObject *
 
2946
SWIG_From_int  (int value)
 
2947
{    
 
2948
  return SWIG_From_long  (value);
2883
2949
}
2884
2950
 
2885
2951
 
2887
2953
/* Return a PyObject* from a NULL terminated C String */
2888
2954
static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
2889
2955
{
2890
 
#if PY_VERSION_HEX >= 0x03000000
2891
2956
  const unsigned char* pszIter = (const unsigned char*) pszStr;
2892
2957
  while(*pszIter != 0)
2893
2958
  {
2894
2959
    if (*pszIter > 127)
2895
 
        return PyBytes_FromString( pszStr );
 
2960
    {
 
2961
        PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "ignore");
 
2962
        if (pyObj != NULL)
 
2963
            return pyObj;
 
2964
#if PY_VERSION_HEX >= 0x03000000
 
2965
        return PyBytes_FromString(pszStr);
 
2966
#else
 
2967
        return PyString_FromString(pszStr);
 
2968
#endif
 
2969
    }
2896
2970
    pszIter ++;
2897
2971
  }
 
2972
#if PY_VERSION_HEX >= 0x03000000
2898
2973
  return PyUnicode_FromString(pszStr); 
2899
2974
#else
2900
2975
  return PyString_FromString(pszStr);
2903
2978
 
2904
2979
/* Return a NULL terminated c String from a PyObject */
2905
2980
/* Result must be freed with GDALPythonFreeCStr */
2906
 
static char* GDALPythonObjectToCStr(PyObject* pyObject)
 
2981
static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
2907
2982
{
2908
 
#if PY_VERSION_HEX >= 0x03000000
 
2983
  *pbToFree = 0;
2909
2984
  if (PyUnicode_Check(pyObject))
2910
2985
  {
2911
2986
      char *pszStr;
2912
2987
      char *pszNewStr;
2913
 
      int nLen;
 
2988
      Py_ssize_t nLen;
2914
2989
      PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
 
2990
#if PY_VERSION_HEX >= 0x03000000
2915
2991
      PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
 
2992
#else
 
2993
      PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
 
2994
#endif
2916
2995
      pszNewStr = (char *) malloc(nLen+1);
2917
2996
      memcpy(pszNewStr, pszStr, nLen+1);
2918
2997
      Py_XDECREF(pyUTF8Str);
2919
 
      return pszNewStr;
2920
 
  }
2921
 
  else if (PyBytes_Check(pyObject))
2922
 
  {
2923
 
      char *pszStr;
2924
 
      char *pszNewStr;
2925
 
      int nLen;
2926
 
      PyBytes_AsStringAndSize(pyObject, &pszStr, &nLen);
2927
 
      pszNewStr = (char *) malloc(nLen+1);
2928
 
      memcpy(pszNewStr, pszStr, nLen+1);
2929
 
      return pszNewStr;
2930
 
  }
2931
 
  else
2932
 
  {
2933
 
      char *pszStr = (char *) malloc(1);
2934
 
      pszStr[0] = '\0';
2935
 
      return pszStr;
2936
 
  }
2937
 
#else
2938
 
  return PyString_AsString(pyObject);
2939
 
#endif
2940
 
}
2941
 
 
 
2998
      *pbToFree = 1;
 
2999
      return pszNewStr;
 
3000
  }
 
3001
  else 
 
3002
  {
2942
3003
#if PY_VERSION_HEX >= 0x03000000
2943
 
#define GDALPythonFreeCStr(x) free( (void*) (x) )
 
3004
      return PyBytes_AsString(pyObject);
2944
3005
#else
2945
 
#define GDALPythonFreeCStr(x) 
 
3006
      return PyString_AsString(pyObject);
2946
3007
#endif
 
3008
  }
 
3009
}
 
3010
 
 
3011
static void GDALPythonFreeCStr(void* ptr, int bToFree)
 
3012
{
 
3013
   if (bToFree)
 
3014
       free(ptr);
 
3015
}
2947
3016
 
2948
3017
 
2949
3018
 
3153
3222
SWIGINTERN int OSRSpatialReferenceShadow_IsSame(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
3154
3223
    return OSRIsSame( self, rhs );
3155
3224
  }
3156
 
 
3157
 
  #define SWIG_From_long   PyInt_FromLong 
3158
 
 
3159
 
 
3160
 
SWIGINTERNINLINE PyObject *
3161
 
SWIG_From_int  (int value)
3162
 
{    
3163
 
  return SWIG_From_long  (value);
3164
 
}
3165
 
 
3166
3225
SWIGINTERN int OSRSpatialReferenceShadow_IsSameGeogCS(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
3167
3226
    return OSRIsSameGeogCS( self, rhs );
3168
3227
  }
 
3228
SWIGINTERN int OSRSpatialReferenceShadow_IsSameVertCS(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
 
3229
    return OSRIsSameVertCS( self, rhs );
 
3230
  }
3169
3231
SWIGINTERN int OSRSpatialReferenceShadow_IsGeographic(OSRSpatialReferenceShadow *self){
3170
3232
    return OSRIsGeographic(self);
3171
3233
  }
3172
3234
SWIGINTERN int OSRSpatialReferenceShadow_IsProjected(OSRSpatialReferenceShadow *self){
3173
3235
    return OSRIsProjected(self);
3174
3236
  }
 
3237
SWIGINTERN int OSRSpatialReferenceShadow_IsCompound(OSRSpatialReferenceShadow *self){
 
3238
    return OSRIsCompound(self);
 
3239
  }
 
3240
SWIGINTERN int OSRSpatialReferenceShadow_IsGeocentric(OSRSpatialReferenceShadow *self){
 
3241
    return OSRIsGeocentric(self);
 
3242
  }
3175
3243
SWIGINTERN int OSRSpatialReferenceShadow_IsLocal(OSRSpatialReferenceShadow *self){
3176
3244
    return OSRIsLocal(self);
3177
3245
  }
 
3246
SWIGINTERN int OSRSpatialReferenceShadow_IsVertical(OSRSpatialReferenceShadow *self){
 
3247
    return OSRIsVertical(self);
 
3248
  }
3178
3249
SWIGINTERN int OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(OSRSpatialReferenceShadow *self){
3179
3250
    return OSREPSGTreatsAsLatLong(self);
3180
3251
  }
3339
3410
    // Return code ignored.
3340
3411
    return OSRGetAngularUnits( self, 0 );
3341
3412
  }
 
3413
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTargetLinearUnits(OSRSpatialReferenceShadow *self,char const *target,char const *name,double to_meters){
 
3414
    return OSRSetTargetLinearUnits( self, target, name, to_meters );
 
3415
  }
3342
3416
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLinearUnits(OSRSpatialReferenceShadow *self,char const *name,double to_meters){
3343
3417
    return OSRSetLinearUnits( self, name, to_meters );
3344
3418
  }
3372
3446
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetUTM(OSRSpatialReferenceShadow *self,int zone,int north=1){
3373
3447
    return OSRSetUTM( self, zone, north );
3374
3448
  }
 
3449
SWIGINTERN int OSRSpatialReferenceShadow_GetUTMZone(OSRSpatialReferenceShadow *self){
 
3450
    // Note: we will return south zones as negative since it is 
 
3451
    // hard to return two values as the C API does. 
 
3452
    int bNorth = FALSE;
 
3453
    int nZone = OSRGetUTMZone( self, &bNorth );
 
3454
    if( !bNorth )
 
3455
        nZone = -1 * ABS(nZone);
 
3456
    return nZone;
 
3457
  }
3375
3458
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetStatePlane(OSRSpatialReferenceShadow *self,int zone,int is_nad83=1,char const *unitsname="",double units=0.0){
3376
3459
    return OSRSetStatePlaneWithUnits( self, zone, is_nad83, unitsname, units );
3377
3460
  }
3395
3478
    // Return code ignored.
3396
3479
    return OSRGetNormProjParm( self, name, default_val, 0 );
3397
3480
  }
 
3481
SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMajor(OSRSpatialReferenceShadow *self){
 
3482
    // Return code ignored.
 
3483
    return OSRGetSemiMajor( self, 0 );
 
3484
  }
 
3485
SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMinor(OSRSpatialReferenceShadow *self){
 
3486
    // Return code ignored.
 
3487
    return OSRGetSemiMinor( self, 0 );
 
3488
  }
 
3489
SWIGINTERN double OSRSpatialReferenceShadow_GetInvFlattening(OSRSpatialReferenceShadow *self){
 
3490
    // Return code ignored.
 
3491
    return OSRGetInvFlattening( self, 0 );
 
3492
  }
3398
3493
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetACEA(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3399
3494
    return OSRSetACEA( self, stdp1, stdp2, clat, clong, 
3400
3495
                       fe, fn );
3442
3537
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGH(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3443
3538
    return OSRSetGH( self, cm, fe, fn );
3444
3539
  }
 
3540
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetIGH(OSRSpatialReferenceShadow *self){
 
3541
    return OSRSetIGH( self );
 
3542
  }
3445
3543
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGEOS(OSRSpatialReferenceShadow *self,double cm,double satelliteheight,double fe,double fn){
3446
3544
    return OSRSetGEOS( self, cm, satelliteheight,
3447
3545
                       fe, fn );
3583
3681
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjCS(OSRSpatialReferenceShadow *self,char const *name="unnamed"){
3584
3682
    return OSRSetProjCS( self, name );
3585
3683
  }
 
3684
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGeocCS(OSRSpatialReferenceShadow *self,char const *name="unnamed"){
 
3685
    return OSRSetGeocCS( self, name );
 
3686
  }
 
3687
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVertCS(OSRSpatialReferenceShadow *self,char const *VertCSName="unnamed",char const *VertDatumName="unnamed",int VertDatumType=0){
 
3688
    return OSRSetVertCS( self, VertCSName, VertDatumName, VertDatumType );
 
3689
  }
 
3690
SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCompoundCS(OSRSpatialReferenceShadow *self,char const *name,OSRSpatialReferenceShadow *horizcs,OSRSpatialReferenceShadow *vertcs){
 
3691
    return OSRSetCompoundCS( self, name, horizcs, vertcs );
 
3692
  }
3586
3693
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromWkt(OSRSpatialReferenceShadow *self,char **ppszInput){
3587
3694
    return OSRImportFromWkt( self, ppszInput );
3588
3695
  }
3610
3717
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromXML(OSRSpatialReferenceShadow *self,char const *xmlString){
3611
3718
    return OSRImportFromXML( self, xmlString );
3612
3719
  }
 
3720
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromERM(OSRSpatialReferenceShadow *self,char const *proj,char const *datum,char const *units){
 
3721
    return OSRImportFromERM( self, proj, datum, units );
 
3722
  }
3613
3723
SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromMICoordSys(OSRSpatialReferenceShadow *self,char const *pszCoordSys){
3614
3724
    return OSRImportFromMICoordSys( self, pszCoordSys );
3615
3725
  }
3666
3776
    OCTDestroyCoordinateTransformation( self );
3667
3777
  }
3668
3778
SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(OSRCoordinateTransformationShadow *self,double inout[3]){
 
3779
    if (self == NULL)
 
3780
        return;
3669
3781
    OCTTransform( self, 1, &inout[0], &inout[1], &inout[2] );
3670
3782
  }
3671
3783
SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(OSRCoordinateTransformationShadow *self,double argout[3],double x,double y,double z=0.0){
 
3784
    if (self == NULL)
 
3785
        return;
3672
3786
    argout[0] = x;
3673
3787
    argout[1] = y;
3674
3788
    argout[2] = z;
3750
3864
}
3751
3865
 
3752
3866
SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoints(OSRCoordinateTransformationShadow *self,int nCount,double *x,double *y,double *z){
 
3867
    if (self == NULL)
 
3868
        return;
3753
3869
    OCTTransform( self, nCount, x, y, z );
3754
3870
  }
3755
3871
#ifdef __cplusplus
3756
3872
extern "C" {
3757
3873
#endif
 
3874
SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 
3875
  PyObject *resultobj = 0;
 
3876
  int result;
 
3877
  
 
3878
  if (!PyArg_ParseTuple(args,(char *)":GetUseExceptions")) SWIG_fail;
 
3879
  result = (int)GetUseExceptions();
 
3880
  resultobj = SWIG_From_int(static_cast< int >(result));
 
3881
  return resultobj;
 
3882
fail:
 
3883
  return NULL;
 
3884
}
 
3885
 
 
3886
 
3758
3887
SWIGINTERN PyObject *_wrap_UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3759
3888
  PyObject *resultobj = 0;
3760
3889
  
3806
3935
    }
3807
3936
  }
3808
3937
  {
 
3938
    if ( bUseExceptions ) {
 
3939
      CPLErrorReset();
 
3940
    }
3809
3941
    result = (OGRErr)GetWellKnownGeogCSAsWKT((char const *)arg1,arg2);
3810
3942
    if ( bUseExceptions ) {
3811
3943
      CPLErr eclass = CPLGetLastErrorType();
3888
4020
    }
3889
4021
  }
3890
4022
  {
 
4023
    if ( bUseExceptions ) {
 
4024
      CPLErrorReset();
 
4025
    }
3891
4026
    result = (OGRErr)GetUserInputAsWKT((char const *)arg1,arg2);
3892
4027
    if ( bUseExceptions ) {
3893
4028
      CPLErr eclass = CPLGetLastErrorType();
3964
4099
    arg1 = reinterpret_cast< char * >(buf1);
3965
4100
  }
3966
4101
  {
 
4102
    if ( bUseExceptions ) {
 
4103
      CPLErrorReset();
 
4104
    }
3967
4105
    result = (OSRSpatialReferenceShadow *)new_OSRSpatialReferenceShadow((char const *)arg1);
3968
4106
    if ( bUseExceptions ) {
3969
4107
      CPLErr eclass = CPLGetLastErrorType();
3995
4133
  }
3996
4134
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
3997
4135
  {
 
4136
    if ( bUseExceptions ) {
 
4137
      CPLErrorReset();
 
4138
    }
3998
4139
    delete_OSRSpatialReferenceShadow(arg1);
3999
4140
    if ( bUseExceptions ) {
4000
4141
      CPLErr eclass = CPLGetLastErrorType();
4025
4166
  }
4026
4167
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4027
4168
  {
 
4169
    if ( bUseExceptions ) {
 
4170
      CPLErrorReset();
 
4171
    }
4028
4172
    result = (retStringAndCPLFree *)OSRSpatialReferenceShadow___str__(arg1);
4029
4173
    if ( bUseExceptions ) {
4030
4174
      CPLErr eclass = CPLGetLastErrorType();
4076
4220
    }
4077
4221
  }
4078
4222
  {
 
4223
    if ( bUseExceptions ) {
 
4224
      CPLErrorReset();
 
4225
    }
4079
4226
    result = (int)OSRSpatialReferenceShadow_IsSame(arg1,arg2);
4080
4227
    if ( bUseExceptions ) {
4081
4228
      CPLErr eclass = CPLGetLastErrorType();
4120
4267
    }
4121
4268
  }
4122
4269
  {
 
4270
    if ( bUseExceptions ) {
 
4271
      CPLErrorReset();
 
4272
    }
4123
4273
    result = (int)OSRSpatialReferenceShadow_IsSameGeogCS(arg1,arg2);
4124
4274
    if ( bUseExceptions ) {
4125
4275
      CPLErr eclass = CPLGetLastErrorType();
4135
4285
}
4136
4286
 
4137
4287
 
 
4288
SWIGINTERN PyObject *_wrap_SpatialReference_IsSameVertCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 
4289
  PyObject *resultobj = 0;
 
4290
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
 
4291
  OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
 
4292
  void *argp1 = 0 ;
 
4293
  int res1 = 0 ;
 
4294
  void *argp2 = 0 ;
 
4295
  int res2 = 0 ;
 
4296
  PyObject * obj0 = 0 ;
 
4297
  PyObject * obj1 = 0 ;
 
4298
  int result;
 
4299
  
 
4300
  if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_IsSameVertCS",&obj0,&obj1)) SWIG_fail;
 
4301
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
 
4302
  if (!SWIG_IsOK(res1)) {
 
4303
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSameVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'"); 
 
4304
  }
 
4305
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
 
4306
  res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
 
4307
  if (!SWIG_IsOK(res2)) {
 
4308
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSameVertCS" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'"); 
 
4309
  }
 
4310
  arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
 
4311
  {
 
4312
    if (!arg2) {
 
4313
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
 
4314
    }
 
4315
  }
 
4316
  {
 
4317
    if ( bUseExceptions ) {
 
4318
      CPLErrorReset();
 
4319
    }
 
4320
    result = (int)OSRSpatialReferenceShadow_IsSameVertCS(arg1,arg2);
 
4321
    if ( bUseExceptions ) {
 
4322
      CPLErr eclass = CPLGetLastErrorType();
 
4323
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
 
4324
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
 
4325
      }
 
4326
    }
 
4327
  }
 
4328
  resultobj = SWIG_From_int(static_cast< int >(result));
 
4329
  return resultobj;
 
4330
fail:
 
4331
  return NULL;
 
4332
}
 
4333
 
 
4334
 
4138
4335
SWIGINTERN PyObject *_wrap_SpatialReference_IsGeographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4139
4336
  PyObject *resultobj = 0;
4140
4337
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4150
4347
  }
4151
4348
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4152
4349
  {
 
4350
    if ( bUseExceptions ) {
 
4351
      CPLErrorReset();
 
4352
    }
4153
4353
    result = (int)OSRSpatialReferenceShadow_IsGeographic(arg1);
4154
4354
    if ( bUseExceptions ) {
4155
4355
      CPLErr eclass = CPLGetLastErrorType();
4180
4380
  }
4181
4381
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4182
4382
  {
 
4383
    if ( bUseExceptions ) {
 
4384
      CPLErrorReset();
 
4385
    }
4183
4386
    result = (int)OSRSpatialReferenceShadow_IsProjected(arg1);
4184
4387
    if ( bUseExceptions ) {
4185
4388
      CPLErr eclass = CPLGetLastErrorType();
4195
4398
}
4196
4399
 
4197
4400
 
 
4401
SWIGINTERN PyObject *_wrap_SpatialReference_IsCompound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 
4402
  PyObject *resultobj = 0;
 
4403
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
 
4404
  void *argp1 = 0 ;
 
4405
  int res1 = 0 ;
 
4406
  PyObject * obj0 = 0 ;
 
4407
  int result;
 
4408
  
 
4409
  if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_IsCompound",&obj0)) SWIG_fail;
 
4410
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
 
4411
  if (!SWIG_IsOK(res1)) {
 
4412
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsCompound" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'"); 
 
4413
  }
 
4414
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
 
4415
  {
 
4416
    if ( bUseExceptions ) {
 
4417
      CPLErrorReset();
 
4418
    }
 
4419
    result = (int)OSRSpatialReferenceShadow_IsCompound(arg1);
 
4420
    if ( bUseExceptions ) {
 
4421
      CPLErr eclass = CPLGetLastErrorType();
 
4422
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
 
4423
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
 
4424
      }
 
4425
    }
 
4426
  }
 
4427
  resultobj = SWIG_From_int(static_cast< int >(result));
 
4428
  return resultobj;
 
4429
fail:
 
4430
  return NULL;
 
4431
}
 
4432
 
 
4433
 
 
4434
SWIGINTERN PyObject *_wrap_SpatialReference_IsGeocentric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 
4435
  PyObject *resultobj = 0;
 
4436
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
 
4437
  void *argp1 = 0 ;
 
4438
  int res1 = 0 ;
 
4439
  PyObject * obj0 = 0 ;
 
4440
  int result;
 
4441
  
 
4442
  if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_IsGeocentric",&obj0)) SWIG_fail;
 
4443
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
 
4444
  if (!SWIG_IsOK(res1)) {
 
4445
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsGeocentric" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'"); 
 
4446
  }
 
4447
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
 
4448
  {
 
4449
    if ( bUseExceptions ) {
 
4450
      CPLErrorReset();
 
4451
    }
 
4452
    result = (int)OSRSpatialReferenceShadow_IsGeocentric(arg1);
 
4453
    if ( bUseExceptions ) {
 
4454
      CPLErr eclass = CPLGetLastErrorType();
 
4455
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
 
4456
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
 
4457
      }
 
4458
    }
 
4459
  }
 
4460
  resultobj = SWIG_From_int(static_cast< int >(result));
 
4461
  return resultobj;
 
4462
fail:
 
4463
  return NULL;
 
4464
}
 
4465
 
 
4466
 
4198
4467
SWIGINTERN PyObject *_wrap_SpatialReference_IsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4199
4468
  PyObject *resultobj = 0;
4200
4469
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4210
4479
  }
4211
4480
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4212
4481
  {
 
4482
    if ( bUseExceptions ) {
 
4483
      CPLErrorReset();
 
4484
    }
4213
4485
    result = (int)OSRSpatialReferenceShadow_IsLocal(arg1);
4214
4486
    if ( bUseExceptions ) {
4215
4487
      CPLErr eclass = CPLGetLastErrorType();
4225
4497
}
4226
4498
 
4227
4499
 
 
4500
SWIGINTERN PyObject *_wrap_SpatialReference_IsVertical(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 
4501
  PyObject *resultobj = 0;
 
4502
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
 
4503
  void *argp1 = 0 ;
 
4504
  int res1 = 0 ;
 
4505
  PyObject * obj0 = 0 ;
 
4506
  int result;
 
4507
  
 
4508
  if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_IsVertical",&obj0)) SWIG_fail;
 
4509
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
 
4510
  if (!SWIG_IsOK(res1)) {
 
4511
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsVertical" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'"); 
 
4512
  }
 
4513
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
 
4514
  {
 
4515
    if ( bUseExceptions ) {
 
4516
      CPLErrorReset();
 
4517
    }
 
4518
    result = (int)OSRSpatialReferenceShadow_IsVertical(arg1);
 
4519
    if ( bUseExceptions ) {
 
4520
      CPLErr eclass = CPLGetLastErrorType();
 
4521
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
 
4522
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
 
4523
      }
 
4524
    }
 
4525
  }
 
4526
  resultobj = SWIG_From_int(static_cast< int >(result));
 
4527
  return resultobj;
 
4528
fail:
 
4529
  return NULL;
 
4530
}
 
4531
 
 
4532
 
4228
4533
SWIGINTERN PyObject *_wrap_SpatialReference_EPSGTreatsAsLatLong(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4229
4534
  PyObject *resultobj = 0;
4230
4535
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4240
4545
  }
4241
4546
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4242
4547
  {
 
4548
    if ( bUseExceptions ) {
 
4549
      CPLErrorReset();
 
4550
    }
4243
4551
    result = (int)OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(arg1);
4244
4552
    if ( bUseExceptions ) {
4245
4553
      CPLErr eclass = CPLGetLastErrorType();
4299
4607
  } 
4300
4608
  arg4 = static_cast< int >(val4);
4301
4609
  {
 
4610
    if ( bUseExceptions ) {
 
4611
      CPLErrorReset();
 
4612
    }
4302
4613
    result = (OGRErr)OSRSpatialReferenceShadow_SetAuthority(arg1,(char const *)arg2,(char const *)arg3,arg4);
4303
4614
    if ( bUseExceptions ) {
4304
4615
      CPLErr eclass = CPLGetLastErrorType();
4375
4686
    }
4376
4687
  }
4377
4688
  {
 
4689
    if ( bUseExceptions ) {
 
4690
      CPLErrorReset();
 
4691
    }
4378
4692
    result = (char *)OSRSpatialReferenceShadow_GetAttrValue(arg1,(char const *)arg2,arg3);
4379
4693
    if ( bUseExceptions ) {
4380
4694
      CPLErr eclass = CPLGetLastErrorType();
4432
4746
    }
4433
4747
  }
4434
4748
  {
 
4749
    if ( bUseExceptions ) {
 
4750
      CPLErrorReset();
 
4751
    }
4435
4752
    result = (OGRErr)OSRSpatialReferenceShadow_SetAttrValue(arg1,(char const *)arg2,(char const *)arg3);
4436
4753
    if ( bUseExceptions ) {
4437
4754
      CPLErr eclass = CPLGetLastErrorType();
4506
4823
    }
4507
4824
  }
4508
4825
  {
 
4826
    if ( bUseExceptions ) {
 
4827
      CPLErrorReset();
 
4828
    }
4509
4829
    result = (OGRErr)OSRSpatialReferenceShadow_SetAngularUnits(arg1,(char const *)arg2,arg3);
4510
4830
    if ( bUseExceptions ) {
4511
4831
      CPLErr eclass = CPLGetLastErrorType();
4554
4874
  }
4555
4875
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4556
4876
  {
 
4877
    if ( bUseExceptions ) {
 
4878
      CPLErrorReset();
 
4879
    }
4557
4880
    result = (double)OSRSpatialReferenceShadow_GetAngularUnits(arg1);
4558
4881
    if ( bUseExceptions ) {
4559
4882
      CPLErr eclass = CPLGetLastErrorType();
4569
4892
}
4570
4893
 
4571
4894
 
 
4895
SWIGINTERN PyObject *_wrap_SpatialReference_SetTargetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 
4896
  PyObject *resultobj = 0;
 
4897
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
 
4898
  char *arg2 = (char *) 0 ;
 
4899
  char *arg3 = (char *) 0 ;
 
4900
  double arg4 ;
 
4901
  void *argp1 = 0 ;
 
4902
  int res1 = 0 ;
 
4903
  int res2 ;
 
4904
  char *buf2 = 0 ;
 
4905
  int alloc2 = 0 ;
 
4906
  int res3 ;
 
4907
  char *buf3 = 0 ;
 
4908
  int alloc3 = 0 ;
 
4909
  double val4 ;
 
4910
  int ecode4 = 0 ;
 
4911
  PyObject * obj0 = 0 ;
 
4912
  PyObject * obj1 = 0 ;
 
4913
  PyObject * obj2 = 0 ;
 
4914
  PyObject * obj3 = 0 ;
 
4915
  OGRErr result;
 
4916
  
 
4917
  if (!PyArg_ParseTuple(args,(char *)"OOOO:SpatialReference_SetTargetLinearUnits",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
 
4918
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
 
4919
  if (!SWIG_IsOK(res1)) {
 
4920
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'"); 
 
4921
  }
 
4922
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
 
4923
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
 
4924
  if (!SWIG_IsOK(res2)) {
 
4925
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "2"" of type '" "char const *""'");
 
4926
  }
 
4927
  arg2 = reinterpret_cast< char * >(buf2);
 
4928
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
 
4929
  if (!SWIG_IsOK(res3)) {
 
4930
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "3"" of type '" "char const *""'");
 
4931
  }
 
4932
  arg3 = reinterpret_cast< char * >(buf3);
 
4933
  ecode4 = SWIG_AsVal_double(obj3, &val4);
 
4934
  if (!SWIG_IsOK(ecode4)) {
 
4935
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "4"" of type '" "double""'");
 
4936
  } 
 
4937
  arg4 = static_cast< double >(val4);
 
4938
  {
 
4939
    if (!arg3) {
 
4940
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
 
4941
    }
 
4942
  }
 
4943
  {
 
4944
    if ( bUseExceptions ) {
 
4945
      CPLErrorReset();
 
4946
    }
 
4947
    result = (OGRErr)OSRSpatialReferenceShadow_SetTargetLinearUnits(arg1,(char const *)arg2,(char const *)arg3,arg4);
 
4948
    if ( bUseExceptions ) {
 
4949
      CPLErr eclass = CPLGetLastErrorType();
 
4950
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
 
4951
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
 
4952
      }
 
4953
    }
 
4954
  }
 
4955
  {
 
4956
    /* %typemap(out) OGRErr */
 
4957
    if ( result != 0 && bUseExceptions) {
 
4958
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
 
4959
      SWIG_fail;
 
4960
    }
 
4961
  }
 
4962
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
 
4963
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
 
4964
  {
 
4965
    /* %typemap(ret) OGRErr */
 
4966
    if (resultobj == Py_None ) {
 
4967
      Py_DECREF(resultobj);
 
4968
      resultobj = 0;
 
4969
    }
 
4970
    if (resultobj == 0) {
 
4971
      resultobj = PyInt_FromLong( result );
 
4972
    }
 
4973
  }
 
4974
  return resultobj;
 
4975
fail:
 
4976
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
 
4977
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
 
4978
  return NULL;
 
4979
}
 
4980
 
 
4981
 
4572
4982
SWIGINTERN PyObject *_wrap_SpatialReference_SetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4573
4983
  PyObject *resultobj = 0;
4574
4984
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4608
5018
    }
4609
5019
  }
4610
5020
  {
 
5021
    if ( bUseExceptions ) {
 
5022
      CPLErrorReset();
 
5023
    }
4611
5024
    result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnits(arg1,(char const *)arg2,arg3);
4612
5025
    if ( bUseExceptions ) {
4613
5026
      CPLErr eclass = CPLGetLastErrorType();
4680
5093
    }
4681
5094
  }
4682
5095
  {
 
5096
    if ( bUseExceptions ) {
 
5097
      CPLErrorReset();
 
5098
    }
4683
5099
    result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(arg1,(char const *)arg2,arg3);
4684
5100
    if ( bUseExceptions ) {
4685
5101
      CPLErr eclass = CPLGetLastErrorType();
4728
5144
  }
4729
5145
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4730
5146
  {
 
5147
    if ( bUseExceptions ) {
 
5148
      CPLErrorReset();
 
5149
    }
4731
5150
    result = (double)OSRSpatialReferenceShadow_GetLinearUnits(arg1);
4732
5151
    if ( bUseExceptions ) {
4733
5152
      CPLErr eclass = CPLGetLastErrorType();
4758
5177
  }
4759
5178
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4760
5179
  {
 
5180
    if ( bUseExceptions ) {
 
5181
      CPLErrorReset();
 
5182
    }
4761
5183
    result = (char *)OSRSpatialReferenceShadow_GetLinearUnitsName(arg1);
4762
5184
    if ( bUseExceptions ) {
4763
5185
      CPLErr eclass = CPLGetLastErrorType();
4798
5220
  }
4799
5221
  arg2 = reinterpret_cast< char * >(buf2);
4800
5222
  {
 
5223
    if ( bUseExceptions ) {
 
5224
      CPLErrorReset();
 
5225
    }
4801
5226
    result = (char *)OSRSpatialReferenceShadow_GetAuthorityCode(arg1,(char const *)arg2);
4802
5227
    if ( bUseExceptions ) {
4803
5228
      CPLErr eclass = CPLGetLastErrorType();
4840
5265
  }
4841
5266
  arg2 = reinterpret_cast< char * >(buf2);
4842
5267
  {
 
5268
    if ( bUseExceptions ) {
 
5269
      CPLErrorReset();
 
5270
    }
4843
5271
    result = (char *)OSRSpatialReferenceShadow_GetAuthorityName(arg1,(char const *)arg2);
4844
5272
    if ( bUseExceptions ) {
4845
5273
      CPLErr eclass = CPLGetLastErrorType();
4892
5320
    arg3 = static_cast< int >(val3);
4893
5321
  }
4894
5322
  {
 
5323
    if ( bUseExceptions ) {
 
5324
      CPLErrorReset();
 
5325
    }
4895
5326
    result = (OGRErr)OSRSpatialReferenceShadow_SetUTM(arg1,arg2,arg3);
4896
5327
    if ( bUseExceptions ) {
4897
5328
      CPLErr eclass = CPLGetLastErrorType();
4923
5354
}
4924
5355
 
4925
5356
 
 
5357
SWIGINTERN PyObject *_wrap_SpatialReference_GetUTMZone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 
5358
  PyObject *resultobj = 0;
 
5359
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
 
5360
  void *argp1 = 0 ;
 
5361
  int res1 = 0 ;
 
5362
  PyObject * obj0 = 0 ;
 
5363
  int result;
 
5364
  
 
5365
  if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetUTMZone",&obj0)) SWIG_fail;
 
5366
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
 
5367
  if (!SWIG_IsOK(res1)) {
 
5368
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetUTMZone" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'"); 
 
5369
  }
 
5370
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
 
5371
  {
 
5372
    if ( bUseExceptions ) {
 
5373
      CPLErrorReset();
 
5374
    }
 
5375
    result = (int)OSRSpatialReferenceShadow_GetUTMZone(arg1);
 
5376
    if ( bUseExceptions ) {
 
5377
      CPLErr eclass = CPLGetLastErrorType();
 
5378
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
 
5379
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
 
5380
      }
 
5381
    }
 
5382
  }
 
5383
  resultobj = SWIG_From_int(static_cast< int >(result));
 
5384
  return resultobj;
 
5385
fail:
 
5386
  return NULL;
 
5387
}
 
5388
 
 
5389
 
4926
5390
SWIGINTERN PyObject *_wrap_SpatialReference_SetStatePlane(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4927
5391
  PyObject *resultobj = 0;
4928
5392
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4981
5445
    arg5 = static_cast< double >(val5);
4982
5446
  }
4983
5447
  {
 
5448
    if ( bUseExceptions ) {
 
5449
      CPLErrorReset();
 
5450
    }
4984
5451
    result = (OGRErr)OSRSpatialReferenceShadow_SetStatePlane(arg1,arg2,arg3,(char const *)arg4,arg5);
4985
5452
    if ( bUseExceptions ) {
4986
5453
      CPLErr eclass = CPLGetLastErrorType();
5029
5496
  }
5030
5497
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5031
5498
  {
 
5499
    if ( bUseExceptions ) {
 
5500
      CPLErrorReset();
 
5501
    }
5032
5502
    result = (OGRErr)OSRSpatialReferenceShadow_AutoIdentifyEPSG(arg1);
5033
5503
    if ( bUseExceptions ) {
5034
5504
      CPLErr eclass = CPLGetLastErrorType();
5085
5555
  }
5086
5556
  arg2 = reinterpret_cast< char * >(buf2);
5087
5557
  {
 
5558
    if ( bUseExceptions ) {
 
5559
      CPLErrorReset();
 
5560
    }
5088
5561
    result = (OGRErr)OSRSpatialReferenceShadow_SetProjection(arg1,(char const *)arg2);
5089
5562
    if ( bUseExceptions ) {
5090
5563
      CPLErr eclass = CPLGetLastErrorType();
5157
5630
    }
5158
5631
  }
5159
5632
  {
 
5633
    if ( bUseExceptions ) {
 
5634
      CPLErrorReset();
 
5635
    }
5160
5636
    result = (OGRErr)OSRSpatialReferenceShadow_SetProjParm(arg1,(char const *)arg2,arg3);
5161
5637
    if ( bUseExceptions ) {
5162
5638
      CPLErr eclass = CPLGetLastErrorType();
5231
5707
    }
5232
5708
  }
5233
5709
  {
 
5710
    if ( bUseExceptions ) {
 
5711
      CPLErrorReset();
 
5712
    }
5234
5713
    result = (double)OSRSpatialReferenceShadow_GetProjParm(arg1,(char const *)arg2,arg3);
5235
5714
    if ( bUseExceptions ) {
5236
5715
      CPLErr eclass = CPLGetLastErrorType();
5287
5766
    }
5288
5767
  }
5289
5768
  {
 
5769
    if ( bUseExceptions ) {
 
5770
      CPLErrorReset();
 
5771
    }
5290
5772
    result = (OGRErr)OSRSpatialReferenceShadow_SetNormProjParm(arg1,(char const *)arg2,arg3);
5291
5773
    if ( bUseExceptions ) {
5292
5774
      CPLErr eclass = CPLGetLastErrorType();
5361
5843
    }
5362
5844
  }
5363
5845
  {
 
5846
    if ( bUseExceptions ) {
 
5847
      CPLErrorReset();
 
5848
    }
5364
5849
    result = (double)OSRSpatialReferenceShadow_GetNormProjParm(arg1,(char const *)arg2,arg3);
5365
5850
    if ( bUseExceptions ) {
5366
5851
      CPLErr eclass = CPLGetLastErrorType();
5378
5863
}
5379
5864
 
5380
5865
 
 
5866
SWIGINTERN PyObject *_wrap_SpatialReference_GetSemiMajor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 
5867
  PyObject *resultobj = 0;
 
5868
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
 
5869
  void *argp1 = 0 ;
 
5870
  int res1 = 0 ;
 
5871
  PyObject * obj0 = 0 ;
 
5872
  double result;
 
5873
  
 
5874
  if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetSemiMajor",&obj0)) SWIG_fail;
 
5875
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
 
5876
  if (!SWIG_IsOK(res1)) {
 
5877
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMajor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'"); 
 
5878
  }
 
5879
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
 
5880
  {
 
5881
    if ( bUseExceptions ) {
 
5882
      CPLErrorReset();
 
5883
    }
 
5884
    result = (double)OSRSpatialReferenceShadow_GetSemiMajor(arg1);
 
5885
    if ( bUseExceptions ) {
 
5886
      CPLErr eclass = CPLGetLastErrorType();
 
5887
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
 
5888
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
 
5889
      }
 
5890
    }
 
5891
  }
 
5892
  resultobj = SWIG_From_double(static_cast< double >(result));
 
5893
  return resultobj;
 
5894
fail:
 
5895
  return NULL;
 
5896
}
 
5897
 
 
5898
 
 
5899
SWIGINTERN PyObject *_wrap_SpatialReference_GetSemiMinor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 
5900
  PyObject *resultobj = 0;
 
5901
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
 
5902
  void *argp1 = 0 ;
 
5903
  int res1 = 0 ;
 
5904
  PyObject * obj0 = 0 ;
 
5905
  double result;
 
5906
  
 
5907
  if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetSemiMinor",&obj0)) SWIG_fail;
 
5908
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
 
5909
  if (!SWIG_IsOK(res1)) {
 
5910
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMinor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'"); 
 
5911
  }
 
5912
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
 
5913
  {
 
5914
    if ( bUseExceptions ) {
 
5915
      CPLErrorReset();
 
5916
    }
 
5917
    result = (double)OSRSpatialReferenceShadow_GetSemiMinor(arg1);
 
5918
    if ( bUseExceptions ) {
 
5919
      CPLErr eclass = CPLGetLastErrorType();
 
5920
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
 
5921
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
 
5922
      }
 
5923
    }
 
5924
  }
 
5925
  resultobj = SWIG_From_double(static_cast< double >(result));
 
5926
  return resultobj;
 
5927
fail:
 
5928
  return NULL;
 
5929
}
 
5930
 
 
5931
 
 
5932
SWIGINTERN PyObject *_wrap_SpatialReference_GetInvFlattening(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 
5933
  PyObject *resultobj = 0;
 
5934
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
 
5935
  void *argp1 = 0 ;
 
5936
  int res1 = 0 ;
 
5937
  PyObject * obj0 = 0 ;
 
5938
  double result;
 
5939
  
 
5940
  if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetInvFlattening",&obj0)) SWIG_fail;
 
5941
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
 
5942
  if (!SWIG_IsOK(res1)) {
 
5943
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetInvFlattening" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'"); 
 
5944
  }
 
5945
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
 
5946
  {
 
5947
    if ( bUseExceptions ) {
 
5948
      CPLErrorReset();
 
5949
    }
 
5950
    result = (double)OSRSpatialReferenceShadow_GetInvFlattening(arg1);
 
5951
    if ( bUseExceptions ) {
 
5952
      CPLErr eclass = CPLGetLastErrorType();
 
5953
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
 
5954
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
 
5955
      }
 
5956
    }
 
5957
  }
 
5958
  resultobj = SWIG_From_double(static_cast< double >(result));
 
5959
  return resultobj;
 
5960
fail:
 
5961
  return NULL;
 
5962
}
 
5963
 
 
5964
 
5381
5965
SWIGINTERN PyObject *_wrap_SpatialReference_SetACEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5382
5966
  PyObject *resultobj = 0;
5383
5967
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5450
6034
  } 
5451
6035
  arg7 = static_cast< double >(val7);
5452
6036
  {
 
6037
    if ( bUseExceptions ) {
 
6038
      CPLErrorReset();
 
6039
    }
5453
6040
    result = (OGRErr)OSRSpatialReferenceShadow_SetACEA(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
5454
6041
    if ( bUseExceptions ) {
5455
6042
      CPLErr eclass = CPLGetLastErrorType();
5535
6122
  } 
5536
6123
  arg5 = static_cast< double >(val5);
5537
6124
  {
 
6125
    if ( bUseExceptions ) {
 
6126
      CPLErrorReset();
 
6127
    }
5538
6128
    result = (OGRErr)OSRSpatialReferenceShadow_SetAE(arg1,arg2,arg3,arg4,arg5);
5539
6129
    if ( bUseExceptions ) {
5540
6130
      CPLErr eclass = CPLGetLastErrorType();
5620
6210
  } 
5621
6211
  arg5 = static_cast< double >(val5);
5622
6212
  {
 
6213
    if ( bUseExceptions ) {
 
6214
      CPLErrorReset();
 
6215
    }
5623
6216
    result = (OGRErr)OSRSpatialReferenceShadow_SetBonne(arg1,arg2,arg3,arg4,arg5);
5624
6217
    if ( bUseExceptions ) {
5625
6218
      CPLErr eclass = CPLGetLastErrorType();
5705
6298
  } 
5706
6299
  arg5 = static_cast< double >(val5);
5707
6300
  {
 
6301
    if ( bUseExceptions ) {
 
6302
      CPLErrorReset();
 
6303
    }
5708
6304
    result = (OGRErr)OSRSpatialReferenceShadow_SetCEA(arg1,arg2,arg3,arg4,arg5);
5709
6305
    if ( bUseExceptions ) {
5710
6306
      CPLErr eclass = CPLGetLastErrorType();
5790
6386
  } 
5791
6387
  arg5 = static_cast< double >(val5);
5792
6388
  {
 
6389
    if ( bUseExceptions ) {
 
6390
      CPLErrorReset();
 
6391
    }
5793
6392
    result = (OGRErr)OSRSpatialReferenceShadow_SetCS(arg1,arg2,arg3,arg4,arg5);
5794
6393
    if ( bUseExceptions ) {
5795
6394
      CPLErr eclass = CPLGetLastErrorType();
5893
6492
  } 
5894
6493
  arg7 = static_cast< double >(val7);
5895
6494
  {
 
6495
    if ( bUseExceptions ) {
 
6496
      CPLErrorReset();
 
6497
    }
5896
6498
    result = (OGRErr)OSRSpatialReferenceShadow_SetEC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
5897
6499
    if ( bUseExceptions ) {
5898
6500
      CPLErr eclass = CPLGetLastErrorType();
5969
6571
  } 
5970
6572
  arg4 = static_cast< double >(val4);
5971
6573
  {
 
6574
    if ( bUseExceptions ) {
 
6575
      CPLErrorReset();
 
6576
    }
5972
6577
    result = (OGRErr)OSRSpatialReferenceShadow_SetEckertIV(arg1,arg2,arg3,arg4);
5973
6578
    if ( bUseExceptions ) {
5974
6579
      CPLErr eclass = CPLGetLastErrorType();
6045
6650
  } 
6046
6651
  arg4 = static_cast< double >(val4);
6047
6652
  {
 
6653
    if ( bUseExceptions ) {
 
6654
      CPLErrorReset();
 
6655
    }
6048
6656
    result = (OGRErr)OSRSpatialReferenceShadow_SetEckertVI(arg1,arg2,arg3,arg4);
6049
6657
    if ( bUseExceptions ) {
6050
6658
      CPLErr eclass = CPLGetLastErrorType();
6130
6738
  } 
6131
6739
  arg5 = static_cast< double >(val5);
6132
6740
  {
 
6741
    if ( bUseExceptions ) {
 
6742
      CPLErrorReset();
 
6743
    }
6133
6744
    result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular(arg1,arg2,arg3,arg4,arg5);
6134
6745
    if ( bUseExceptions ) {
6135
6746
      CPLErr eclass = CPLGetLastErrorType();
6224
6835
  } 
6225
6836
  arg6 = static_cast< double >(val6);
6226
6837
  {
 
6838
    if ( bUseExceptions ) {
 
6839
      CPLErrorReset();
 
6840
    }
6227
6841
    result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular2(arg1,arg2,arg3,arg4,arg5,arg6);
6228
6842
    if ( bUseExceptions ) {
6229
6843
      CPLErr eclass = CPLGetLastErrorType();
6318
6932
  } 
6319
6933
  arg6 = static_cast< double >(val6);
6320
6934
  {
 
6935
    if ( bUseExceptions ) {
 
6936
      CPLErrorReset();
 
6937
    }
6321
6938
    result = (OGRErr)OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(arg1,arg2,arg3,arg4,arg5,arg6);
6322
6939
    if ( bUseExceptions ) {
6323
6940
      CPLErr eclass = CPLGetLastErrorType();
6394
7011
  } 
6395
7012
  arg4 = static_cast< double >(val4);
6396
7013
  {
 
7014
    if ( bUseExceptions ) {
 
7015
      CPLErrorReset();
 
7016
    }
6397
7017
    result = (OGRErr)OSRSpatialReferenceShadow_SetGS(arg1,arg2,arg3,arg4);
6398
7018
    if ( bUseExceptions ) {
6399
7019
      CPLErr eclass = CPLGetLastErrorType();
6470
7090
  } 
6471
7091
  arg4 = static_cast< double >(val4);
6472
7092
  {
 
7093
    if ( bUseExceptions ) {
 
7094
      CPLErrorReset();
 
7095
    }
6473
7096
    result = (OGRErr)OSRSpatialReferenceShadow_SetGH(arg1,arg2,arg3,arg4);
6474
7097
    if ( bUseExceptions ) {
6475
7098
      CPLErr eclass = CPLGetLastErrorType();
6501
7124
}
6502
7125
 
6503
7126
 
 
7127
SWIGINTERN PyObject *_wrap_SpatialReference_SetIGH(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 
7128
  PyObject *resultobj = 0;
 
7129
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
 
7130
  void *argp1 = 0 ;
 
7131
  int res1 = 0 ;
 
7132
  PyObject * obj0 = 0 ;
 
7133
  OGRErr result;
 
7134
  
 
7135
  if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_SetIGH",&obj0)) SWIG_fail;
 
7136
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
 
7137
  if (!SWIG_IsOK(res1)) {
 
7138
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetIGH" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'"); 
 
7139
  }
 
7140
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
 
7141
  {
 
7142
    if ( bUseExceptions ) {
 
7143
      CPLErrorReset();
 
7144
    }
 
7145
    result = (OGRErr)OSRSpatialReferenceShadow_SetIGH(arg1);
 
7146
    if ( bUseExceptions ) {
 
7147
      CPLErr eclass = CPLGetLastErrorType();
 
7148
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
 
7149
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
 
7150
      }
 
7151
    }
 
7152
  }
 
7153
  {
 
7154
    /* %typemap(out) OGRErr */
 
7155
    if ( result != 0 && bUseExceptions) {
 
7156
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
 
7157
      SWIG_fail;
 
7158
    }
 
7159
  }
 
7160
  {
 
7161
    /* %typemap(ret) OGRErr */
 
7162
    if (resultobj == Py_None ) {
 
7163
      Py_DECREF(resultobj);
 
7164
      resultobj = 0;
 
7165
    }
 
7166
    if (resultobj == 0) {
 
7167
      resultobj = PyInt_FromLong( result );
 
7168
    }
 
7169
  }
 
7170
  return resultobj;
 
7171
fail:
 
7172
  return NULL;
 
7173
}
 
7174
 
 
7175
 
6504
7176
SWIGINTERN PyObject *_wrap_SpatialReference_SetGEOS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6505
7177
  PyObject *resultobj = 0;
6506
7178
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6555
7227
  } 
6556
7228
  arg5 = static_cast< double >(val5);
6557
7229
  {
 
7230
    if ( bUseExceptions ) {
 
7231
      CPLErrorReset();
 
7232
    }
6558
7233
    result = (OGRErr)OSRSpatialReferenceShadow_SetGEOS(arg1,arg2,arg3,arg4,arg5);
6559
7234
    if ( bUseExceptions ) {
6560
7235
      CPLErr eclass = CPLGetLastErrorType();
6640
7315
  } 
6641
7316
  arg5 = static_cast< double >(val5);
6642
7317
  {
 
7318
    if ( bUseExceptions ) {
 
7319
      CPLErrorReset();
 
7320
    }
6643
7321
    result = (OGRErr)OSRSpatialReferenceShadow_SetGnomonic(arg1,arg2,arg3,arg4,arg5);
6644
7322
    if ( bUseExceptions ) {
6645
7323
      CPLErr eclass = CPLGetLastErrorType();
6752
7430
  } 
6753
7431
  arg8 = static_cast< double >(val8);
6754
7432
  {
 
7433
    if ( bUseExceptions ) {
 
7434
      CPLErrorReset();
 
7435
    }
6755
7436
    result = (OGRErr)OSRSpatialReferenceShadow_SetHOM(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
6756
7437
    if ( bUseExceptions ) {
6757
7438
      CPLErr eclass = CPLGetLastErrorType();
6873
7554
  } 
6874
7555
  arg9 = static_cast< double >(val9);
6875
7556
  {
 
7557
    if ( bUseExceptions ) {
 
7558
      CPLErrorReset();
 
7559
    }
6876
7560
    result = (OGRErr)OSRSpatialReferenceShadow_SetHOM2PNO(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
6877
7561
    if ( bUseExceptions ) {
6878
7562
      CPLErr eclass = CPLGetLastErrorType();
6985
7669
  } 
6986
7670
  arg8 = static_cast< double >(val8);
6987
7671
  {
 
7672
    if ( bUseExceptions ) {
 
7673
      CPLErrorReset();
 
7674
    }
6988
7675
    result = (OGRErr)OSRSpatialReferenceShadow_SetKrovak(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
6989
7676
    if ( bUseExceptions ) {
6990
7677
      CPLErr eclass = CPLGetLastErrorType();
7070
7757
  } 
7071
7758
  arg5 = static_cast< double >(val5);
7072
7759
  {
 
7760
    if ( bUseExceptions ) {
 
7761
      CPLErrorReset();
 
7762
    }
7073
7763
    result = (OGRErr)OSRSpatialReferenceShadow_SetLAEA(arg1,arg2,arg3,arg4,arg5);
7074
7764
    if ( bUseExceptions ) {
7075
7765
      CPLErr eclass = CPLGetLastErrorType();
7173
7863
  } 
7174
7864
  arg7 = static_cast< double >(val7);
7175
7865
  {
 
7866
    if ( bUseExceptions ) {
 
7867
      CPLErrorReset();
 
7868
    }
7176
7869
    result = (OGRErr)OSRSpatialReferenceShadow_SetLCC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
7177
7870
    if ( bUseExceptions ) {
7178
7871
      CPLErr eclass = CPLGetLastErrorType();
7267
7960
  } 
7268
7961
  arg6 = static_cast< double >(val6);
7269
7962
  {
 
7963
    if ( bUseExceptions ) {
 
7964
      CPLErrorReset();
 
7965
    }
7270
7966
    result = (OGRErr)OSRSpatialReferenceShadow_SetLCC1SP(arg1,arg2,arg3,arg4,arg5,arg6);
7271
7967
    if ( bUseExceptions ) {
7272
7968
      CPLErr eclass = CPLGetLastErrorType();
7370
8066
  } 
7371
8067
  arg7 = static_cast< double >(val7);
7372
8068
  {
 
8069
    if ( bUseExceptions ) {
 
8070
      CPLErrorReset();
 
8071
    }
7373
8072
    result = (OGRErr)OSRSpatialReferenceShadow_SetLCCB(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
7374
8073
    if ( bUseExceptions ) {
7375
8074
      CPLErr eclass = CPLGetLastErrorType();
7455
8154
  } 
7456
8155
  arg5 = static_cast< double >(val5);
7457
8156
  {
 
8157
    if ( bUseExceptions ) {
 
8158
      CPLErrorReset();
 
8159
    }
7458
8160
    result = (OGRErr)OSRSpatialReferenceShadow_SetMC(arg1,arg2,arg3,arg4,arg5);
7459
8161
    if ( bUseExceptions ) {
7460
8162
      CPLErr eclass = CPLGetLastErrorType();
7549
8251
  } 
7550
8252
  arg6 = static_cast< double >(val6);
7551
8253
  {
 
8254
    if ( bUseExceptions ) {
 
8255
      CPLErrorReset();
 
8256
    }
7552
8257
    result = (OGRErr)OSRSpatialReferenceShadow_SetMercator(arg1,arg2,arg3,arg4,arg5,arg6);
7553
8258
    if ( bUseExceptions ) {
7554
8259
      CPLErr eclass = CPLGetLastErrorType();
7625
8330
  } 
7626
8331
  arg4 = static_cast< double >(val4);
7627
8332
  {
 
8333
    if ( bUseExceptions ) {
 
8334
      CPLErrorReset();
 
8335
    }
7628
8336
    result = (OGRErr)OSRSpatialReferenceShadow_SetMollweide(arg1,arg2,arg3,arg4);
7629
8337
    if ( bUseExceptions ) {
7630
8338
      CPLErr eclass = CPLGetLastErrorType();
7710
8418
  } 
7711
8419
  arg5 = static_cast< double >(val5);
7712
8420
  {
 
8421
    if ( bUseExceptions ) {
 
8422
      CPLErrorReset();
 
8423
    }
7713
8424
    result = (OGRErr)OSRSpatialReferenceShadow_SetNZMG(arg1,arg2,arg3,arg4,arg5);
7714
8425
    if ( bUseExceptions ) {
7715
8426
      CPLErr eclass = CPLGetLastErrorType();
7804
8515
  } 
7805
8516
  arg6 = static_cast< double >(val6);
7806
8517
  {
 
8518
    if ( bUseExceptions ) {
 
8519
      CPLErrorReset();
 
8520
    }
7807
8521
    result = (OGRErr)OSRSpatialReferenceShadow_SetOS(arg1,arg2,arg3,arg4,arg5,arg6);
7808
8522
    if ( bUseExceptions ) {
7809
8523
      CPLErr eclass = CPLGetLastErrorType();
7889
8603
  } 
7890
8604
  arg5 = static_cast< double >(val5);
7891
8605
  {
 
8606
    if ( bUseExceptions ) {
 
8607
      CPLErrorReset();
 
8608
    }
7892
8609
    result = (OGRErr)OSRSpatialReferenceShadow_SetOrthographic(arg1,arg2,arg3,arg4,arg5);
7893
8610
    if ( bUseExceptions ) {
7894
8611
      CPLErr eclass = CPLGetLastErrorType();
7974
8691
  } 
7975
8692
  arg5 = static_cast< double >(val5);
7976
8693
  {
 
8694
    if ( bUseExceptions ) {
 
8695
      CPLErrorReset();
 
8696
    }
7977
8697
    result = (OGRErr)OSRSpatialReferenceShadow_SetPolyconic(arg1,arg2,arg3,arg4,arg5);
7978
8698
    if ( bUseExceptions ) {
7979
8699
      CPLErr eclass = CPLGetLastErrorType();
8068
8788
  } 
8069
8789
  arg6 = static_cast< double >(val6);
8070
8790
  {
 
8791
    if ( bUseExceptions ) {
 
8792
      CPLErrorReset();
 
8793
    }
8071
8794
    result = (OGRErr)OSRSpatialReferenceShadow_SetPS(arg1,arg2,arg3,arg4,arg5,arg6);
8072
8795
    if ( bUseExceptions ) {
8073
8796
      CPLErr eclass = CPLGetLastErrorType();
8144
8867
  } 
8145
8868
  arg4 = static_cast< double >(val4);
8146
8869
  {
 
8870
    if ( bUseExceptions ) {
 
8871
      CPLErrorReset();
 
8872
    }
8147
8873
    result = (OGRErr)OSRSpatialReferenceShadow_SetRobinson(arg1,arg2,arg3,arg4);
8148
8874
    if ( bUseExceptions ) {
8149
8875
      CPLErr eclass = CPLGetLastErrorType();
8220
8946
  } 
8221
8947
  arg4 = static_cast< double >(val4);
8222
8948
  {
 
8949
    if ( bUseExceptions ) {
 
8950
      CPLErrorReset();
 
8951
    }
8223
8952
    result = (OGRErr)OSRSpatialReferenceShadow_SetSinusoidal(arg1,arg2,arg3,arg4);
8224
8953
    if ( bUseExceptions ) {
8225
8954
      CPLErr eclass = CPLGetLastErrorType();
8314
9043
  } 
8315
9044
  arg6 = static_cast< double >(val6);
8316
9045
  {
 
9046
    if ( bUseExceptions ) {
 
9047
      CPLErrorReset();
 
9048
    }
8317
9049
    result = (OGRErr)OSRSpatialReferenceShadow_SetStereographic(arg1,arg2,arg3,arg4,arg5,arg6);
8318
9050
    if ( bUseExceptions ) {
8319
9051
      CPLErr eclass = CPLGetLastErrorType();
8399
9131
  } 
8400
9132
  arg5 = static_cast< double >(val5);
8401
9133
  {
 
9134
    if ( bUseExceptions ) {
 
9135
      CPLErrorReset();
 
9136
    }
8402
9137
    result = (OGRErr)OSRSpatialReferenceShadow_SetSOC(arg1,arg2,arg3,arg4,arg5);
8403
9138
    if ( bUseExceptions ) {
8404
9139
      CPLErr eclass = CPLGetLastErrorType();
8493
9228
  } 
8494
9229
  arg6 = static_cast< double >(val6);
8495
9230
  {
 
9231
    if ( bUseExceptions ) {
 
9232
      CPLErrorReset();
 
9233
    }
8496
9234
    result = (OGRErr)OSRSpatialReferenceShadow_SetTM(arg1,arg2,arg3,arg4,arg5,arg6);
8497
9235
    if ( bUseExceptions ) {
8498
9236
      CPLErr eclass = CPLGetLastErrorType();
8597
9335
  } 
8598
9336
  arg7 = static_cast< double >(val7);
8599
9337
  {
 
9338
    if ( bUseExceptions ) {
 
9339
      CPLErrorReset();
 
9340
    }
8600
9341
    result = (OGRErr)OSRSpatialReferenceShadow_SetTMVariant(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
8601
9342
    if ( bUseExceptions ) {
8602
9343
      CPLErr eclass = CPLGetLastErrorType();
8684
9425
  } 
8685
9426
  arg5 = static_cast< double >(val5);
8686
9427
  {
 
9428
    if ( bUseExceptions ) {
 
9429
      CPLErrorReset();
 
9430
    }
8687
9431
    result = (OGRErr)OSRSpatialReferenceShadow_SetTMG(arg1,arg2,arg3,arg4,arg5);
8688
9432
    if ( bUseExceptions ) {
8689
9433
      CPLErr eclass = CPLGetLastErrorType();
8778
9522
  } 
8779
9523
  arg6 = static_cast< double >(val6);
8780
9524
  {
 
9525
    if ( bUseExceptions ) {
 
9526
      CPLErrorReset();
 
9527
    }
8781
9528
    result = (OGRErr)OSRSpatialReferenceShadow_SetTMSO(arg1,arg2,arg3,arg4,arg5,arg6);
8782
9529
    if ( bUseExceptions ) {
8783
9530
      CPLErr eclass = CPLGetLastErrorType();
8854
9601
  } 
8855
9602
  arg4 = static_cast< double >(val4);
8856
9603
  {
 
9604
    if ( bUseExceptions ) {
 
9605
      CPLErrorReset();
 
9606
    }
8857
9607
    result = (OGRErr)OSRSpatialReferenceShadow_SetVDG(arg1,arg2,arg3,arg4);
8858
9608
    if ( bUseExceptions ) {
8859
9609
      CPLErr eclass = CPLGetLastErrorType();
8915
9665
    }
8916
9666
  }
8917
9667
  {
 
9668
    if ( bUseExceptions ) {
 
9669
      CPLErrorReset();
 
9670
    }
8918
9671
    result = (OGRErr)OSRSpatialReferenceShadow_SetWellKnownGeogCS(arg1,(char const *)arg2);
8919
9672
    if ( bUseExceptions ) {
8920
9673
      CPLErr eclass = CPLGetLastErrorType();
8978
9731
    }
8979
9732
  }
8980
9733
  {
 
9734
    if ( bUseExceptions ) {
 
9735
      CPLErrorReset();
 
9736
    }
8981
9737
    result = (OGRErr)OSRSpatialReferenceShadow_SetFromUserInput(arg1,(char const *)arg2);
8982
9738
    if ( bUseExceptions ) {
8983
9739
      CPLErr eclass = CPLGetLastErrorType();
9040
9796
    }
9041
9797
  }
9042
9798
  {
 
9799
    if ( bUseExceptions ) {
 
9800
      CPLErrorReset();
 
9801
    }
9043
9802
    result = (OGRErr)OSRSpatialReferenceShadow_CopyGeogCSFrom(arg1,arg2);
9044
9803
    if ( bUseExceptions ) {
9045
9804
      CPLErr eclass = CPLGetLastErrorType();
9157
9916
    arg8 = static_cast< double >(val8);
9158
9917
  }
9159
9918
  {
 
9919
    if ( bUseExceptions ) {
 
9920
      CPLErrorReset();
 
9921
    }
9160
9922
    result = (OGRErr)OSRSpatialReferenceShadow_SetTOWGS84(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
9161
9923
    if ( bUseExceptions ) {
9162
9924
      CPLErr eclass = CPLGetLastErrorType();
9209
9971
  }
9210
9972
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9211
9973
  {
 
9974
    if ( bUseExceptions ) {
 
9975
      CPLErrorReset();
 
9976
    }
9212
9977
    result = (OGRErr)OSRSpatialReferenceShadow_GetTOWGS84(arg1,arg2);
9213
9978
    if ( bUseExceptions ) {
9214
9979
      CPLErr eclass = CPLGetLastErrorType();
9270
10035
  }
9271
10036
  arg2 = reinterpret_cast< char * >(buf2);
9272
10037
  {
 
10038
    if ( bUseExceptions ) {
 
10039
      CPLErrorReset();
 
10040
    }
9273
10041
    result = (OGRErr)OSRSpatialReferenceShadow_SetLocalCS(arg1,(char const *)arg2);
9274
10042
    if ( bUseExceptions ) {
9275
10043
      CPLErr eclass = CPLGetLastErrorType();
9412
10180
    arg10 = static_cast< double >(val10);
9413
10181
  }
9414
10182
  {
 
10183
    if ( bUseExceptions ) {
 
10184
      CPLErrorReset();
 
10185
    }
9415
10186
    result = (OGRErr)OSRSpatialReferenceShadow_SetGeogCS(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,(char const *)arg7,arg8,(char const *)arg9,arg10);
9416
10187
    if ( bUseExceptions ) {
9417
10188
      CPLErr eclass = CPLGetLastErrorType();
9485
10256
    }
9486
10257
  }
9487
10258
  {
 
10259
    if ( bUseExceptions ) {
 
10260
      CPLErrorReset();
 
10261
    }
9488
10262
    result = (OGRErr)OSRSpatialReferenceShadow_SetProjCS(arg1,(char const *)arg2);
9489
10263
    if ( bUseExceptions ) {
9490
10264
      CPLErr eclass = CPLGetLastErrorType();
9518
10292
}
9519
10293
 
9520
10294
 
 
10295
SWIGINTERN PyObject *_wrap_SpatialReference_SetGeocCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 
10296
  PyObject *resultobj = 0;
 
10297
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
 
10298
  char *arg2 = (char *) "unnamed" ;
 
10299
  void *argp1 = 0 ;
 
10300
  int res1 = 0 ;
 
10301
  int res2 ;
 
10302
  char *buf2 = 0 ;
 
10303
  int alloc2 = 0 ;
 
10304
  PyObject * obj0 = 0 ;
 
10305
  PyObject * obj1 = 0 ;
 
10306
  OGRErr result;
 
10307
  
 
10308
  if (!PyArg_ParseTuple(args,(char *)"O|O:SpatialReference_SetGeocCS",&obj0,&obj1)) SWIG_fail;
 
10309
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
 
10310
  if (!SWIG_IsOK(res1)) {
 
10311
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGeocCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'"); 
 
10312
  }
 
10313
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
 
10314
  if (obj1) {
 
10315
    res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
 
10316
    if (!SWIG_IsOK(res2)) {
 
10317
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetGeocCS" "', argument " "2"" of type '" "char const *""'");
 
10318
    }
 
10319
    arg2 = reinterpret_cast< char * >(buf2);
 
10320
  }
 
10321
  {
 
10322
    if (!arg2) {
 
10323
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
 
10324
    }
 
10325
  }
 
10326
  {
 
10327
    if ( bUseExceptions ) {
 
10328
      CPLErrorReset();
 
10329
    }
 
10330
    result = (OGRErr)OSRSpatialReferenceShadow_SetGeocCS(arg1,(char const *)arg2);
 
10331
    if ( bUseExceptions ) {
 
10332
      CPLErr eclass = CPLGetLastErrorType();
 
10333
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
 
10334
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
 
10335
      }
 
10336
    }
 
10337
  }
 
10338
  {
 
10339
    /* %typemap(out) OGRErr */
 
10340
    if ( result != 0 && bUseExceptions) {
 
10341
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
 
10342
      SWIG_fail;
 
10343
    }
 
10344
  }
 
10345
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
 
10346
  {
 
10347
    /* %typemap(ret) OGRErr */
 
10348
    if (resultobj == Py_None ) {
 
10349
      Py_DECREF(resultobj);
 
10350
      resultobj = 0;
 
10351
    }
 
10352
    if (resultobj == 0) {
 
10353
      resultobj = PyInt_FromLong( result );
 
10354
    }
 
10355
  }
 
10356
  return resultobj;
 
10357
fail:
 
10358
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
 
10359
  return NULL;
 
10360
}
 
10361
 
 
10362
 
 
10363
SWIGINTERN PyObject *_wrap_SpatialReference_SetVertCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 
10364
  PyObject *resultobj = 0;
 
10365
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
 
10366
  char *arg2 = (char *) "unnamed" ;
 
10367
  char *arg3 = (char *) "unnamed" ;
 
10368
  int arg4 = (int) 0 ;
 
10369
  void *argp1 = 0 ;
 
10370
  int res1 = 0 ;
 
10371
  int res2 ;
 
10372
  char *buf2 = 0 ;
 
10373
  int alloc2 = 0 ;
 
10374
  int res3 ;
 
10375
  char *buf3 = 0 ;
 
10376
  int alloc3 = 0 ;
 
10377
  int val4 ;
 
10378
  int ecode4 = 0 ;
 
10379
  PyObject * obj0 = 0 ;
 
10380
  PyObject * obj1 = 0 ;
 
10381
  PyObject * obj2 = 0 ;
 
10382
  PyObject * obj3 = 0 ;
 
10383
  OGRErr result;
 
10384
  
 
10385
  if (!PyArg_ParseTuple(args,(char *)"O|OOO:SpatialReference_SetVertCS",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
 
10386
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
 
10387
  if (!SWIG_IsOK(res1)) {
 
10388
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'"); 
 
10389
  }
 
10390
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
 
10391
  if (obj1) {
 
10392
    res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
 
10393
    if (!SWIG_IsOK(res2)) {
 
10394
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetVertCS" "', argument " "2"" of type '" "char const *""'");
 
10395
    }
 
10396
    arg2 = reinterpret_cast< char * >(buf2);
 
10397
  }
 
10398
  if (obj2) {
 
10399
    res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
 
10400
    if (!SWIG_IsOK(res3)) {
 
10401
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetVertCS" "', argument " "3"" of type '" "char const *""'");
 
10402
    }
 
10403
    arg3 = reinterpret_cast< char * >(buf3);
 
10404
  }
 
10405
  if (obj3) {
 
10406
    ecode4 = SWIG_AsVal_int(obj3, &val4);
 
10407
    if (!SWIG_IsOK(ecode4)) {
 
10408
      SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVertCS" "', argument " "4"" of type '" "int""'");
 
10409
    } 
 
10410
    arg4 = static_cast< int >(val4);
 
10411
  }
 
10412
  {
 
10413
    if ( bUseExceptions ) {
 
10414
      CPLErrorReset();
 
10415
    }
 
10416
    result = (OGRErr)OSRSpatialReferenceShadow_SetVertCS(arg1,(char const *)arg2,(char const *)arg3,arg4);
 
10417
    if ( bUseExceptions ) {
 
10418
      CPLErr eclass = CPLGetLastErrorType();
 
10419
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
 
10420
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
 
10421
      }
 
10422
    }
 
10423
  }
 
10424
  {
 
10425
    /* %typemap(out) OGRErr */
 
10426
    if ( result != 0 && bUseExceptions) {
 
10427
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
 
10428
      SWIG_fail;
 
10429
    }
 
10430
  }
 
10431
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
 
10432
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
 
10433
  {
 
10434
    /* %typemap(ret) OGRErr */
 
10435
    if (resultobj == Py_None ) {
 
10436
      Py_DECREF(resultobj);
 
10437
      resultobj = 0;
 
10438
    }
 
10439
    if (resultobj == 0) {
 
10440
      resultobj = PyInt_FromLong( result );
 
10441
    }
 
10442
  }
 
10443
  return resultobj;
 
10444
fail:
 
10445
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
 
10446
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
 
10447
  return NULL;
 
10448
}
 
10449
 
 
10450
 
 
10451
SWIGINTERN PyObject *_wrap_SpatialReference_SetCompoundCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 
10452
  PyObject *resultobj = 0;
 
10453
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
 
10454
  char *arg2 = (char *) 0 ;
 
10455
  OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) 0 ;
 
10456
  OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
 
10457
  void *argp1 = 0 ;
 
10458
  int res1 = 0 ;
 
10459
  int res2 ;
 
10460
  char *buf2 = 0 ;
 
10461
  int alloc2 = 0 ;
 
10462
  void *argp3 = 0 ;
 
10463
  int res3 = 0 ;
 
10464
  void *argp4 = 0 ;
 
10465
  int res4 = 0 ;
 
10466
  PyObject * obj0 = 0 ;
 
10467
  PyObject * obj1 = 0 ;
 
10468
  PyObject * obj2 = 0 ;
 
10469
  PyObject * obj3 = 0 ;
 
10470
  OGRErr result;
 
10471
  
 
10472
  if (!PyArg_ParseTuple(args,(char *)"OOOO:SpatialReference_SetCompoundCS",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
 
10473
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
 
10474
  if (!SWIG_IsOK(res1)) {
 
10475
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCompoundCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'"); 
 
10476
  }
 
10477
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
 
10478
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
 
10479
  if (!SWIG_IsOK(res2)) {
 
10480
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetCompoundCS" "', argument " "2"" of type '" "char const *""'");
 
10481
  }
 
10482
  arg2 = reinterpret_cast< char * >(buf2);
 
10483
  res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
 
10484
  if (!SWIG_IsOK(res3)) {
 
10485
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetCompoundCS" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'"); 
 
10486
  }
 
10487
  arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
 
10488
  res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
 
10489
  if (!SWIG_IsOK(res4)) {
 
10490
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetCompoundCS" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'"); 
 
10491
  }
 
10492
  arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
 
10493
  {
 
10494
    if (!arg2) {
 
10495
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
 
10496
    }
 
10497
  }
 
10498
  {
 
10499
    if (!arg3) {
 
10500
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
 
10501
    }
 
10502
  }
 
10503
  {
 
10504
    if (!arg4) {
 
10505
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
 
10506
    }
 
10507
  }
 
10508
  {
 
10509
    if ( bUseExceptions ) {
 
10510
      CPLErrorReset();
 
10511
    }
 
10512
    result = (OGRErr)OSRSpatialReferenceShadow_SetCompoundCS(arg1,(char const *)arg2,arg3,arg4);
 
10513
    if ( bUseExceptions ) {
 
10514
      CPLErr eclass = CPLGetLastErrorType();
 
10515
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
 
10516
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
 
10517
      }
 
10518
    }
 
10519
  }
 
10520
  {
 
10521
    /* %typemap(out) OGRErr */
 
10522
    if ( result != 0 && bUseExceptions) {
 
10523
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
 
10524
      SWIG_fail;
 
10525
    }
 
10526
  }
 
10527
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
 
10528
  {
 
10529
    /* %typemap(ret) OGRErr */
 
10530
    if (resultobj == Py_None ) {
 
10531
      Py_DECREF(resultobj);
 
10532
      resultobj = 0;
 
10533
    }
 
10534
    if (resultobj == 0) {
 
10535
      resultobj = PyInt_FromLong( result );
 
10536
    }
 
10537
  }
 
10538
  return resultobj;
 
10539
fail:
 
10540
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
 
10541
  return NULL;
 
10542
}
 
10543
 
 
10544
 
9521
10545
SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9522
10546
  PyObject *resultobj = 0;
9523
10547
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9541
10565
    arg2 = &val2;
9542
10566
  }
9543
10567
  {
 
10568
    if ( bUseExceptions ) {
 
10569
      CPLErrorReset();
 
10570
    }
9544
10571
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromWkt(arg1,arg2);
9545
10572
    if ( bUseExceptions ) {
9546
10573
      CPLErr eclass = CPLGetLastErrorType();
9597
10624
  }
9598
10625
  arg2 = reinterpret_cast< char * >(buf2);
9599
10626
  {
 
10627
    if ( bUseExceptions ) {
 
10628
      CPLErrorReset();
 
10629
    }
9600
10630
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromProj4(arg1,arg2);
9601
10631
    if ( bUseExceptions ) {
9602
10632
      CPLErr eclass = CPLGetLastErrorType();
9655
10685
  }
9656
10686
  arg2 = reinterpret_cast< char * >(buf2);
9657
10687
  {
 
10688
    if (!arg2) {
 
10689
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
 
10690
    }
 
10691
  }
 
10692
  {
 
10693
    if ( bUseExceptions ) {
 
10694
      CPLErrorReset();
 
10695
    }
9658
10696
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUrl(arg1,arg2);
9659
10697
    if ( bUseExceptions ) {
9660
10698
      CPLErr eclass = CPLGetLastErrorType();
9714
10752
    
9715
10753
    int size = PySequence_Size(obj1);
9716
10754
    for (int i = 0; i < size; i++) {
9717
 
      char *pszItem = NULL;
9718
10755
      PyObject* pyObj = PySequence_GetItem(obj1,i);
9719
 
      if ( ! PyArg_Parse( pyObj, "s", &pszItem ) ) {
 
10756
      if (PyUnicode_Check(pyObj))
 
10757
      {
 
10758
        char *pszStr;
 
10759
        Py_ssize_t nLen;
 
10760
        PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
 
10761
#if PY_VERSION_HEX >= 0x03000000
 
10762
        PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
 
10763
#else
 
10764
        PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
 
10765
#endif
 
10766
        arg2 = CSLAddString( arg2, pszStr );
 
10767
        Py_XDECREF(pyUTF8Str);
 
10768
      }
 
10769
#if PY_VERSION_HEX >= 0x03000000
 
10770
      else if (PyBytes_Check(pyObj))
 
10771
      arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
 
10772
#else
 
10773
      else if (PyString_Check(pyObj))
 
10774
      arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
 
10775
#endif
 
10776
      else
 
10777
      {
9720
10778
        Py_DECREF(pyObj);
9721
10779
        PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
9722
10780
        SWIG_fail;
9723
10781
      }
9724
 
      arg2 = CSLAddString( arg2, pszItem );
9725
10782
      Py_DECREF(pyObj);
9726
10783
    }
9727
10784
  }
9728
10785
  {
 
10786
    if ( bUseExceptions ) {
 
10787
      CPLErrorReset();
 
10788
    }
9729
10789
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromESRI(arg1,arg2);
9730
10790
    if ( bUseExceptions ) {
9731
10791
      CPLErr eclass = CPLGetLastErrorType();
9789
10849
  } 
9790
10850
  arg2 = static_cast< int >(val2);
9791
10851
  {
 
10852
    if ( bUseExceptions ) {
 
10853
      CPLErrorReset();
 
10854
    }
9792
10855
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSG(arg1,arg2);
9793
10856
    if ( bUseExceptions ) {
9794
10857
      CPLErr eclass = CPLGetLastErrorType();
9844
10907
  } 
9845
10908
  arg2 = static_cast< int >(val2);
9846
10909
  {
 
10910
    if ( bUseExceptions ) {
 
10911
      CPLErrorReset();
 
10912
    }
9847
10913
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSGA(arg1,arg2);
9848
10914
    if ( bUseExceptions ) {
9849
10915
      CPLErr eclass = CPLGetLastErrorType();
9941
11007
    }
9942
11008
  }
9943
11009
  {
 
11010
    if ( bUseExceptions ) {
 
11011
      CPLErrorReset();
 
11012
    }
9944
11013
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromPCI(arg1,(char const *)arg2,(char const *)arg3,arg4);
9945
11014
    if ( bUseExceptions ) {
9946
11015
      CPLErr eclass = CPLGetLastErrorType();
10051
11120
    arg5 = static_cast< long >(val5);
10052
11121
  }
10053
11122
  {
 
11123
    if ( bUseExceptions ) {
 
11124
      CPLErrorReset();
 
11125
    }
10054
11126
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUSGS(arg1,arg2,arg3,arg4,arg5);
10055
11127
    if ( bUseExceptions ) {
10056
11128
      CPLErr eclass = CPLGetLastErrorType();
10107
11179
  }
10108
11180
  arg2 = reinterpret_cast< char * >(buf2);
10109
11181
  {
 
11182
    if ( bUseExceptions ) {
 
11183
      CPLErrorReset();
 
11184
    }
10110
11185
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromXML(arg1,(char const *)arg2);
10111
11186
    if ( bUseExceptions ) {
10112
11187
      CPLErr eclass = CPLGetLastErrorType();
10140
11215
}
10141
11216
 
10142
11217
 
 
11218
SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromERM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
 
11219
  PyObject *resultobj = 0;
 
11220
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
 
11221
  char *arg2 = (char *) 0 ;
 
11222
  char *arg3 = (char *) 0 ;
 
11223
  char *arg4 = (char *) 0 ;
 
11224
  void *argp1 = 0 ;
 
11225
  int res1 = 0 ;
 
11226
  int res2 ;
 
11227
  char *buf2 = 0 ;
 
11228
  int alloc2 = 0 ;
 
11229
  int res3 ;
 
11230
  char *buf3 = 0 ;
 
11231
  int alloc3 = 0 ;
 
11232
  int res4 ;
 
11233
  char *buf4 = 0 ;
 
11234
  int alloc4 = 0 ;
 
11235
  PyObject * obj0 = 0 ;
 
11236
  PyObject * obj1 = 0 ;
 
11237
  PyObject * obj2 = 0 ;
 
11238
  PyObject * obj3 = 0 ;
 
11239
  OGRErr result;
 
11240
  
 
11241
  if (!PyArg_ParseTuple(args,(char *)"OOOO:SpatialReference_ImportFromERM",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
 
11242
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 );
 
11243
  if (!SWIG_IsOK(res1)) {
 
11244
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromERM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'"); 
 
11245
  }
 
11246
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
 
11247
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
 
11248
  if (!SWIG_IsOK(res2)) {
 
11249
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromERM" "', argument " "2"" of type '" "char const *""'");
 
11250
  }
 
11251
  arg2 = reinterpret_cast< char * >(buf2);
 
11252
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
 
11253
  if (!SWIG_IsOK(res3)) {
 
11254
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromERM" "', argument " "3"" of type '" "char const *""'");
 
11255
  }
 
11256
  arg3 = reinterpret_cast< char * >(buf3);
 
11257
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
 
11258
  if (!SWIG_IsOK(res4)) {
 
11259
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_ImportFromERM" "', argument " "4"" of type '" "char const *""'");
 
11260
  }
 
11261
  arg4 = reinterpret_cast< char * >(buf4);
 
11262
  {
 
11263
    if (!arg2) {
 
11264
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
 
11265
    }
 
11266
  }
 
11267
  {
 
11268
    if (!arg3) {
 
11269
      SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
 
11270
    }
 
11271
  }
 
11272
  {
 
11273
    if ( bUseExceptions ) {
 
11274
      CPLErrorReset();
 
11275
    }
 
11276
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromERM(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
 
11277
    if ( bUseExceptions ) {
 
11278
      CPLErr eclass = CPLGetLastErrorType();
 
11279
      if ( eclass == CE_Failure || eclass == CE_Fatal ) {
 
11280
        SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
 
11281
      }
 
11282
    }
 
11283
  }
 
11284
  {
 
11285
    /* %typemap(out) OGRErr */
 
11286
    if ( result != 0 && bUseExceptions) {
 
11287
      PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
 
11288
      SWIG_fail;
 
11289
    }
 
11290
  }
 
11291
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
 
11292
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
 
11293
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
 
11294
  {
 
11295
    /* %typemap(ret) OGRErr */
 
11296
    if (resultobj == Py_None ) {
 
11297
      Py_DECREF(resultobj);
 
11298
      resultobj = 0;
 
11299
    }
 
11300
    if (resultobj == 0) {
 
11301
      resultobj = PyInt_FromLong( result );
 
11302
    }
 
11303
  }
 
11304
  return resultobj;
 
11305
fail:
 
11306
  if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
 
11307
  if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
 
11308
  if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
 
11309
  return NULL;
 
11310
}
 
11311
 
 
11312
 
10143
11313
SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromMICoordSys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10144
11314
  PyObject *resultobj = 0;
10145
11315
  OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10165
11335
  }
10166
11336
  arg2 = reinterpret_cast< char * >(buf2);
10167
11337
  {
 
11338
    if ( bUseExceptions ) {
 
11339
      CPLErrorReset();
 
11340
    }
10168
11341
    result = (OGRErr)OSRSpatialReferenceShadow_ImportFromMICoordSys(arg1,(char const *)arg2);
10169
11342
    if ( bUseExceptions ) {
10170
11343
      CPLErr eclass = CPLGetLastErrorType();
10219
11392
  }
10220
11393
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10221
11394
  {
 
11395
    if ( bUseExceptions ) {
 
11396
      CPLErrorReset();
 
11397
    }
10222
11398
    result = (OGRErr)OSRSpatialReferenceShadow_ExportToWkt(arg1,arg2);
10223
11399
    if ( bUseExceptions ) {
10224
11400
      CPLErr eclass = CPLGetLastErrorType();
10304
11480
    arg3 = static_cast< int >(val3);
10305
11481
  }
10306
11482
  {
 
11483
    if ( bUseExceptions ) {
 
11484
      CPLErrorReset();
 
11485
    }
10307
11486
    result = (OGRErr)OSRSpatialReferenceShadow_ExportToPrettyWkt(arg1,arg2,arg3);
10308
11487
    if ( bUseExceptions ) {
10309
11488
      CPLErr eclass = CPLGetLastErrorType();
10378
11557
  }
10379
11558
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10380
11559
  {
 
11560
    if ( bUseExceptions ) {
 
11561
      CPLErrorReset();
 
11562
    }
10381
11563
    result = (OGRErr)OSRSpatialReferenceShadow_ExportToProj4(arg1,arg2);
10382
11564
    if ( bUseExceptions ) {
10383
11565
      CPLErr eclass = CPLGetLastErrorType();
10464
11646
  }
10465
11647
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10466
11648
  {
 
11649
    if ( bUseExceptions ) {
 
11650
      CPLErrorReset();
 
11651
    }
10467
11652
    result = (OGRErr)OSRSpatialReferenceShadow_ExportToPCI(arg1,arg2,arg3,arg4);
10468
11653
    if ( bUseExceptions ) {
10469
11654
      CPLErr eclass = CPLGetLastErrorType();
10585
11770
  }
10586
11771
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10587
11772
  {
 
11773
    if ( bUseExceptions ) {
 
11774
      CPLErrorReset();
 
11775
    }
10588
11776
    result = (OGRErr)OSRSpatialReferenceShadow_ExportToUSGS(arg1,arg2,arg3,arg4,arg5);
10589
11777
    if ( bUseExceptions ) {
10590
11778
      CPLErr eclass = CPLGetLastErrorType();
10680
11868
    arg3 = reinterpret_cast< char * >(buf3);
10681
11869
  }
10682
11870
  {
 
11871
    if ( bUseExceptions ) {
 
11872
      CPLErrorReset();
 
11873
    }
10683
11874
    result = (OGRErr)OSRSpatialReferenceShadow_ExportToXML(arg1,arg2,(char const *)arg3);
10684
11875
    if ( bUseExceptions ) {
10685
11876
      CPLErr eclass = CPLGetLastErrorType();
10756
11947
  }
10757
11948
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10758
11949
  {
 
11950
    if ( bUseExceptions ) {
 
11951
      CPLErrorReset();
 
11952
    }
10759
11953
    result = (OGRErr)OSRSpatialReferenceShadow_ExportToMICoordSys(arg1,arg2);
10760
11954
    if ( bUseExceptions ) {
10761
11955
      CPLErr eclass = CPLGetLastErrorType();
10824
12018
  }
10825
12019
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10826
12020
  {
 
12021
    if ( bUseExceptions ) {
 
12022
      CPLErrorReset();
 
12023
    }
10827
12024
    result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_CloneGeogCS(arg1);
10828
12025
    if ( bUseExceptions ) {
10829
12026
      CPLErr eclass = CPLGetLastErrorType();
10854
12051
  }
10855
12052
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10856
12053
  {
 
12054
    if ( bUseExceptions ) {
 
12055
      CPLErrorReset();
 
12056
    }
10857
12057
    result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_Clone(arg1);
10858
12058
    if ( bUseExceptions ) {
10859
12059
      CPLErr eclass = CPLGetLastErrorType();
10884
12084
  }
10885
12085
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10886
12086
  {
 
12087
    if ( bUseExceptions ) {
 
12088
      CPLErrorReset();
 
12089
    }
10887
12090
    result = (OGRErr)OSRSpatialReferenceShadow_Validate(arg1);
10888
12091
    if ( bUseExceptions ) {
10889
12092
      CPLErr eclass = CPLGetLastErrorType();
10930
12133
  }
10931
12134
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10932
12135
  {
 
12136
    if ( bUseExceptions ) {
 
12137
      CPLErrorReset();
 
12138
    }
10933
12139
    result = (OGRErr)OSRSpatialReferenceShadow_StripCTParms(arg1);
10934
12140
    if ( bUseExceptions ) {
10935
12141
      CPLErr eclass = CPLGetLastErrorType();
10976
12182
  }
10977
12183
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10978
12184
  {
 
12185
    if ( bUseExceptions ) {
 
12186
      CPLErrorReset();
 
12187
    }
10979
12188
    result = (OGRErr)OSRSpatialReferenceShadow_FixupOrdering(arg1);
10980
12189
    if ( bUseExceptions ) {
10981
12190
      CPLErr eclass = CPLGetLastErrorType();
11022
12231
  }
11023
12232
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11024
12233
  {
 
12234
    if ( bUseExceptions ) {
 
12235
      CPLErrorReset();
 
12236
    }
11025
12237
    result = (OGRErr)OSRSpatialReferenceShadow_Fixup(arg1);
11026
12238
    if ( bUseExceptions ) {
11027
12239
      CPLErr eclass = CPLGetLastErrorType();
11068
12280
  }
11069
12281
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11070
12282
  {
 
12283
    if ( bUseExceptions ) {
 
12284
      CPLErrorReset();
 
12285
    }
11071
12286
    result = (OGRErr)OSRSpatialReferenceShadow_MorphToESRI(arg1);
11072
12287
    if ( bUseExceptions ) {
11073
12288
      CPLErr eclass = CPLGetLastErrorType();
11114
12329
  }
11115
12330
  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11116
12331
  {
 
12332
    if ( bUseExceptions ) {
 
12333
      CPLErrorReset();
 
12334
    }
11117
12335
    result = (OGRErr)OSRSpatialReferenceShadow_MorphFromESRI(arg1);
11118
12336
    if ( bUseExceptions ) {
11119
12337
      CPLErr eclass = CPLGetLastErrorType();
11176
12394
  }
11177
12395
  arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
11178
12396
  {
 
12397
    if ( bUseExceptions ) {
 
12398
      CPLErrorReset();
 
12399
    }
11179
12400
    result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow(arg1,arg2);
11180
12401
    if ( bUseExceptions ) {
11181
12402
      CPLErr eclass = CPLGetLastErrorType();
11205
12426
  }
11206
12427
  arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
11207
12428
  {
 
12429
    if ( bUseExceptions ) {
 
12430
      CPLErrorReset();
 
12431
    }
11208
12432
    delete_OSRCoordinateTransformationShadow(arg1);
11209
12433
    if ( bUseExceptions ) {
11210
12434
      CPLErr eclass = CPLGetLastErrorType();
11261
12485
    }
11262
12486
  }
11263
12487
  {
 
12488
    if ( bUseExceptions ) {
 
12489
      CPLErrorReset();
 
12490
    }
11264
12491
    OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(arg1,arg2);
11265
12492
    if ( bUseExceptions ) {
11266
12493
      CPLErr eclass = CPLGetLastErrorType();
11330
12557
    arg5 = static_cast< double >(val5);
11331
12558
  }
11332
12559
  {
 
12560
    if ( bUseExceptions ) {
 
12561
      CPLErrorReset();
 
12562
    }
11333
12563
    OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5);
11334
12564
    if ( bUseExceptions ) {
11335
12565
      CPLErr eclass = CPLGetLastErrorType();
11454
12684
    }
11455
12685
  }
11456
12686
  {
 
12687
    if ( bUseExceptions ) {
 
12688
      CPLErrorReset();
 
12689
    }
11457
12690
    OSRCoordinateTransformationShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5);
11458
12691
    if ( bUseExceptions ) {
11459
12692
      CPLErr eclass = CPLGetLastErrorType();
11503
12736
 
11504
12737
static PyMethodDef SwigMethods[] = {
11505
12738
         { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
 
12739
         { (char *)"GetUseExceptions", _wrap_GetUseExceptions, METH_VARARGS, (char *)"GetUseExceptions() -> int"},
11506
12740
         { (char *)"UseExceptions", _wrap_UseExceptions, METH_VARARGS, (char *)"UseExceptions()"},
11507
12741
         { (char *)"DontUseExceptions", _wrap_DontUseExceptions, METH_VARARGS, (char *)"DontUseExceptions()"},
11508
12742
         { (char *)"GetProjectionMethods", py_OPTGetProjectionMethods, METH_VARARGS, NULL},
11513
12747
         { (char *)"SpatialReference___str__", _wrap_SpatialReference___str__, METH_VARARGS, (char *)"SpatialReference___str__(SpatialReference self) -> retStringAndCPLFree"},
11514
12748
         { (char *)"SpatialReference_IsSame", _wrap_SpatialReference_IsSame, METH_VARARGS, (char *)"SpatialReference_IsSame(SpatialReference self, SpatialReference rhs) -> int"},
11515
12749
         { (char *)"SpatialReference_IsSameGeogCS", _wrap_SpatialReference_IsSameGeogCS, METH_VARARGS, (char *)"SpatialReference_IsSameGeogCS(SpatialReference self, SpatialReference rhs) -> int"},
 
12750
         { (char *)"SpatialReference_IsSameVertCS", _wrap_SpatialReference_IsSameVertCS, METH_VARARGS, (char *)"SpatialReference_IsSameVertCS(SpatialReference self, SpatialReference rhs) -> int"},
11516
12751
         { (char *)"SpatialReference_IsGeographic", _wrap_SpatialReference_IsGeographic, METH_VARARGS, (char *)"SpatialReference_IsGeographic(SpatialReference self) -> int"},
11517
12752
         { (char *)"SpatialReference_IsProjected", _wrap_SpatialReference_IsProjected, METH_VARARGS, (char *)"SpatialReference_IsProjected(SpatialReference self) -> int"},
 
12753
         { (char *)"SpatialReference_IsCompound", _wrap_SpatialReference_IsCompound, METH_VARARGS, (char *)"SpatialReference_IsCompound(SpatialReference self) -> int"},
 
12754
         { (char *)"SpatialReference_IsGeocentric", _wrap_SpatialReference_IsGeocentric, METH_VARARGS, (char *)"SpatialReference_IsGeocentric(SpatialReference self) -> int"},
11518
12755
         { (char *)"SpatialReference_IsLocal", _wrap_SpatialReference_IsLocal, METH_VARARGS, (char *)"SpatialReference_IsLocal(SpatialReference self) -> int"},
 
12756
         { (char *)"SpatialReference_IsVertical", _wrap_SpatialReference_IsVertical, METH_VARARGS, (char *)"SpatialReference_IsVertical(SpatialReference self) -> int"},
11519
12757
         { (char *)"SpatialReference_EPSGTreatsAsLatLong", _wrap_SpatialReference_EPSGTreatsAsLatLong, METH_VARARGS, (char *)"SpatialReference_EPSGTreatsAsLatLong(SpatialReference self) -> int"},
11520
12758
         { (char *)"SpatialReference_SetAuthority", _wrap_SpatialReference_SetAuthority, METH_VARARGS, (char *)"\n"
11521
12759
                "SpatialReference_SetAuthority(SpatialReference self, char pszTargetKey, char pszAuthority, \n"
11525
12763
         { (char *)"SpatialReference_SetAttrValue", _wrap_SpatialReference_SetAttrValue, METH_VARARGS, (char *)"SpatialReference_SetAttrValue(SpatialReference self, char name, char value) -> OGRErr"},
11526
12764
         { (char *)"SpatialReference_SetAngularUnits", _wrap_SpatialReference_SetAngularUnits, METH_VARARGS, (char *)"SpatialReference_SetAngularUnits(SpatialReference self, char name, double to_radians) -> OGRErr"},
11527
12765
         { (char *)"SpatialReference_GetAngularUnits", _wrap_SpatialReference_GetAngularUnits, METH_VARARGS, (char *)"SpatialReference_GetAngularUnits(SpatialReference self) -> double"},
 
12766
         { (char *)"SpatialReference_SetTargetLinearUnits", _wrap_SpatialReference_SetTargetLinearUnits, METH_VARARGS, (char *)"SpatialReference_SetTargetLinearUnits(SpatialReference self, char target, char name, double to_meters) -> OGRErr"},
11528
12767
         { (char *)"SpatialReference_SetLinearUnits", _wrap_SpatialReference_SetLinearUnits, METH_VARARGS, (char *)"SpatialReference_SetLinearUnits(SpatialReference self, char name, double to_meters) -> OGRErr"},
11529
12768
         { (char *)"SpatialReference_SetLinearUnitsAndUpdateParameters", _wrap_SpatialReference_SetLinearUnitsAndUpdateParameters, METH_VARARGS, (char *)"SpatialReference_SetLinearUnitsAndUpdateParameters(SpatialReference self, char name, double to_meters) -> OGRErr"},
11530
12769
         { (char *)"SpatialReference_GetLinearUnits", _wrap_SpatialReference_GetLinearUnits, METH_VARARGS, (char *)"SpatialReference_GetLinearUnits(SpatialReference self) -> double"},
11532
12771
         { (char *)"SpatialReference_GetAuthorityCode", _wrap_SpatialReference_GetAuthorityCode, METH_VARARGS, (char *)"SpatialReference_GetAuthorityCode(SpatialReference self, char target_key) -> char"},
11533
12772
         { (char *)"SpatialReference_GetAuthorityName", _wrap_SpatialReference_GetAuthorityName, METH_VARARGS, (char *)"SpatialReference_GetAuthorityName(SpatialReference self, char target_key) -> char"},
11534
12773
         { (char *)"SpatialReference_SetUTM", _wrap_SpatialReference_SetUTM, METH_VARARGS, (char *)"SpatialReference_SetUTM(SpatialReference self, int zone, int north = 1) -> OGRErr"},
 
12774
         { (char *)"SpatialReference_GetUTMZone", _wrap_SpatialReference_GetUTMZone, METH_VARARGS, (char *)"SpatialReference_GetUTMZone(SpatialReference self) -> int"},
11535
12775
         { (char *)"SpatialReference_SetStatePlane", _wrap_SpatialReference_SetStatePlane, METH_VARARGS, (char *)"\n"
11536
12776
                "SpatialReference_SetStatePlane(SpatialReference self, int zone, int is_nad83 = 1, \n"
11537
12777
                "    char unitsname = \"\", double units = 0.0) -> OGRErr\n"
11542
12782
         { (char *)"SpatialReference_GetProjParm", _wrap_SpatialReference_GetProjParm, METH_VARARGS, (char *)"SpatialReference_GetProjParm(SpatialReference self, char name, double default_val = 0.0) -> double"},
11543
12783
         { (char *)"SpatialReference_SetNormProjParm", _wrap_SpatialReference_SetNormProjParm, METH_VARARGS, (char *)"SpatialReference_SetNormProjParm(SpatialReference self, char name, double val) -> OGRErr"},
11544
12784
         { (char *)"SpatialReference_GetNormProjParm", _wrap_SpatialReference_GetNormProjParm, METH_VARARGS, (char *)"SpatialReference_GetNormProjParm(SpatialReference self, char name, double default_val = 0.0) -> double"},
 
12785
         { (char *)"SpatialReference_GetSemiMajor", _wrap_SpatialReference_GetSemiMajor, METH_VARARGS, (char *)"SpatialReference_GetSemiMajor(SpatialReference self) -> double"},
 
12786
         { (char *)"SpatialReference_GetSemiMinor", _wrap_SpatialReference_GetSemiMinor, METH_VARARGS, (char *)"SpatialReference_GetSemiMinor(SpatialReference self) -> double"},
 
12787
         { (char *)"SpatialReference_GetInvFlattening", _wrap_SpatialReference_GetInvFlattening, METH_VARARGS, (char *)"SpatialReference_GetInvFlattening(SpatialReference self) -> double"},
11545
12788
         { (char *)"SpatialReference_SetACEA", (PyCFunction) _wrap_SpatialReference_SetACEA, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
11546
12789
                "SpatialReference_SetACEA(SpatialReference self, double stdp1, double stdp2, \n"
11547
12790
                "    double clat, double clong, double fe, double fn) -> OGRErr\n"
11582
12825
                ""},
11583
12826
         { (char *)"SpatialReference_SetGS", (PyCFunction) _wrap_SpatialReference_SetGS, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetGS(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
11584
12827
         { (char *)"SpatialReference_SetGH", (PyCFunction) _wrap_SpatialReference_SetGH, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetGH(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
 
12828
         { (char *)"SpatialReference_SetIGH", _wrap_SpatialReference_SetIGH, METH_VARARGS, (char *)"SpatialReference_SetIGH(SpatialReference self) -> OGRErr"},
11585
12829
         { (char *)"SpatialReference_SetGEOS", (PyCFunction) _wrap_SpatialReference_SetGEOS, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
11586
12830
                "SpatialReference_SetGEOS(SpatialReference self, double cm, double satelliteheight, \n"
11587
12831
                "    double fe, double fn) -> OGRErr\n"
11696
12940
                "    double dfConvertToRadians = 0.0174532925199433) -> OGRErr\n"
11697
12941
                ""},
11698
12942
         { (char *)"SpatialReference_SetProjCS", _wrap_SpatialReference_SetProjCS, METH_VARARGS, (char *)"SpatialReference_SetProjCS(SpatialReference self, char name = \"unnamed\") -> OGRErr"},
 
12943
         { (char *)"SpatialReference_SetGeocCS", _wrap_SpatialReference_SetGeocCS, METH_VARARGS, (char *)"SpatialReference_SetGeocCS(SpatialReference self, char name = \"unnamed\") -> OGRErr"},
 
12944
         { (char *)"SpatialReference_SetVertCS", _wrap_SpatialReference_SetVertCS, METH_VARARGS, (char *)"\n"
 
12945
                "SpatialReference_SetVertCS(SpatialReference self, char VertCSName = \"unnamed\", \n"
 
12946
                "    char VertDatumName = \"unnamed\", int VertDatumType = 0) -> OGRErr\n"
 
12947
                ""},
 
12948
         { (char *)"SpatialReference_SetCompoundCS", _wrap_SpatialReference_SetCompoundCS, METH_VARARGS, (char *)"\n"
 
12949
                "SpatialReference_SetCompoundCS(SpatialReference self, char name, SpatialReference horizcs, \n"
 
12950
                "    SpatialReference vertcs) -> OGRErr\n"
 
12951
                ""},
11699
12952
         { (char *)"SpatialReference_ImportFromWkt", _wrap_SpatialReference_ImportFromWkt, METH_VARARGS, (char *)"SpatialReference_ImportFromWkt(SpatialReference self, char ppszInput) -> OGRErr"},
11700
12953
         { (char *)"SpatialReference_ImportFromProj4", _wrap_SpatialReference_ImportFromProj4, METH_VARARGS, (char *)"SpatialReference_ImportFromProj4(SpatialReference self, char ppszInput) -> OGRErr"},
11701
12954
         { (char *)"SpatialReference_ImportFromUrl", _wrap_SpatialReference_ImportFromUrl, METH_VARARGS, (char *)"SpatialReference_ImportFromUrl(SpatialReference self, char url) -> OGRErr"},
11711
12964
                "    double argin = 0, long datum_code = 0) -> OGRErr\n"
11712
12965
                ""},
11713
12966
         { (char *)"SpatialReference_ImportFromXML", _wrap_SpatialReference_ImportFromXML, METH_VARARGS, (char *)"SpatialReference_ImportFromXML(SpatialReference self, char xmlString) -> OGRErr"},
 
12967
         { (char *)"SpatialReference_ImportFromERM", _wrap_SpatialReference_ImportFromERM, METH_VARARGS, (char *)"SpatialReference_ImportFromERM(SpatialReference self, char proj, char datum, char units) -> OGRErr"},
11714
12968
         { (char *)"SpatialReference_ImportFromMICoordSys", _wrap_SpatialReference_ImportFromMICoordSys, METH_VARARGS, (char *)"SpatialReference_ImportFromMICoordSys(SpatialReference self, char pszCoordSys) -> OGRErr"},
11715
12969
         { (char *)"SpatialReference_ExportToWkt", _wrap_SpatialReference_ExportToWkt, METH_VARARGS, (char *)"SpatialReference_ExportToWkt(SpatialReference self) -> OGRErr"},
11716
12970
         { (char *)"SpatialReference_ExportToPrettyWkt", _wrap_SpatialReference_ExportToPrettyWkt, METH_VARARGS, (char *)"SpatialReference_ExportToPrettyWkt(SpatialReference self, int simplify = 0) -> OGRErr"},
11745
12999
 
11746
13000
static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0};
11747
13001
static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
11748
 
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
 
13002
static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
11749
13003
static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
11750
13004
static swig_type_info _swigt__p_int = {"_p_int", "int *|OGRErr *", 0, 0, (void*)0, 0};
11751
13005
static swig_type_info _swigt__p_long = {"_p_long", "long *", 0, 0, (void*)0, 0};
12177
13431
        (char *)"swigvarlink",              /* Type name (tp_name) */
12178
13432
        sizeof(swig_varlinkobject),         /* Basic size (tp_basicsize) */
12179
13433
        0,                                  /* Itemsize (tp_itemsize) */
12180
 
        (destructor) swig_varlink_dealloc,   /* Deallocator (tp_dealloc) */ 
 
13434
        (destructor) swig_varlink_dealloc,  /* Deallocator (tp_dealloc) */ 
12181
13435
        (printfunc) swig_varlink_print,     /* Print (tp_print) */
12182
13436
        (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
12183
13437
        (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
12188
13442
        0,                                  /* tp_as_mapping */
12189
13443
        0,                                  /* tp_hash */
12190
13444
        0,                                  /* tp_call */
12191
 
        (reprfunc)swig_varlink_str,        /* tp_str */
 
13445
        (reprfunc) swig_varlink_str,        /* tp_str */
12192
13446
        0,                                  /* tp_getattro */
12193
13447
        0,                                  /* tp_setattro */
12194
13448
        0,                                  /* tp_as_buffer */
12209
13463
#endif
12210
13464
      };
12211
13465
      varlink_type = tmp;
12212
 
      /* for Python 3 we already assigned the ob_type in PyVarObject_HEAD_INIT() */
 
13466
      /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
12213
13467
#if PY_VERSION_HEX < 0x03000000
12214
13468
      varlink_type.ob_type = &PyType_Type;
12215
13469
#endif
12392
13646
  SWIG_Python_SetConstant(d, "SRS_PT_GAUSSSCHREIBERTMERCATOR",SWIG_FromCharPtr("Gauss_Schreiber_Transverse_Mercator"));
12393
13647
  SWIG_Python_SetConstant(d, "SRS_PT_GEOSTATIONARY_SATELLITE",SWIG_FromCharPtr("Geostationary_Satellite"));
12394
13648
  SWIG_Python_SetConstant(d, "SRS_PT_GOODE_HOMOLOSINE",SWIG_FromCharPtr("Goode_Homolosine"));
 
13649
  SWIG_Python_SetConstant(d, "SRS_PT_IGH",SWIG_FromCharPtr("Interrupted_Goode_Homolosine"));
12395
13650
  SWIG_Python_SetConstant(d, "SRS_PT_GNOMONIC",SWIG_FromCharPtr("Gnomonic"));
12396
13651
  SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR",SWIG_FromCharPtr("Hotine_Oblique_Mercator"));
12397
13652
  SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN",SWIG_FromCharPtr("Hotine_Oblique_Mercator_Two_Point_Natural_Origin"));
12474
13729
  SWIG_Python_SetConstant(d, "SRS_UL_CHAIN_CONV",SWIG_FromCharPtr("20.116684023368047"));
12475
13730
  SWIG_Python_SetConstant(d, "SRS_UL_ROD",SWIG_FromCharPtr("Rod"));
12476
13731
  SWIG_Python_SetConstant(d, "SRS_UL_ROD_CONV",SWIG_FromCharPtr("5.02921005842012"));
 
13732
  SWIG_Python_SetConstant(d, "SRS_UL_LINK_Clarke",SWIG_FromCharPtr("Link_Clarke"));
 
13733
  SWIG_Python_SetConstant(d, "SRS_UL_LINK_Clarke_CONV",SWIG_FromCharPtr("0.2011661949"));
12477
13734
  SWIG_Python_SetConstant(d, "SRS_UA_DEGREE",SWIG_FromCharPtr("degree"));
12478
13735
  SWIG_Python_SetConstant(d, "SRS_UA_DEGREE_CONV",SWIG_FromCharPtr("0.0174532925199433"));
12479
13736
  SWIG_Python_SetConstant(d, "SRS_UA_RADIAN",SWIG_FromCharPtr("radian"));