Line data Source code
1 : /* ----------------------------------------------------------------------------
2 : * This file was automatically generated by SWIG (http://www.swig.org).
3 : * Version 4.0.1
4 : *
5 : * This file is not intended to be easily readable and contains a number of
6 : * coding conventions designed to improve portability and efficiency. Do not make
7 : * changes to this file unless you know what you are doing--modify the SWIG
8 : * interface file instead.
9 : * ----------------------------------------------------------------------------- */
10 :
11 :
12 : #ifndef SWIGPYTHON
13 : #define SWIGPYTHON
14 : #define SED_HACKS
15 : #endif
16 :
17 : #define SWIG_PYTHON_THREADS
18 : #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
19 :
20 :
21 : #ifdef __cplusplus
22 : /* SwigValueWrapper is described in swig.swg */
23 : template<typename T> class SwigValueWrapper {
24 : struct SwigMovePointer {
25 : T *ptr;
26 : SwigMovePointer(T *p) : ptr(p) { }
27 : ~SwigMovePointer() { delete ptr; }
28 : SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
29 : } pointer;
30 : SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
31 : SwigValueWrapper(const SwigValueWrapper<T>& rhs);
32 : public:
33 : SwigValueWrapper() : pointer(0) { }
34 : SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
35 : operator T&() const { return *pointer.ptr; }
36 : T *operator&() { return pointer.ptr; }
37 : };
38 :
39 : template <typename T> T SwigValueInit() {
40 : return T();
41 : }
42 : #endif
43 :
44 : /* -----------------------------------------------------------------------------
45 : * This section contains generic SWIG labels for method/variable
46 : * declarations/attributes, and other compiler dependent labels.
47 : * ----------------------------------------------------------------------------- */
48 :
49 : /* template workaround for compilers that cannot correctly implement the C++ standard */
50 : #ifndef SWIGTEMPLATEDISAMBIGUATOR
51 : # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
52 : # define SWIGTEMPLATEDISAMBIGUATOR template
53 : # elif defined(__HP_aCC)
54 : /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
55 : /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
56 : # define SWIGTEMPLATEDISAMBIGUATOR template
57 : # else
58 : # define SWIGTEMPLATEDISAMBIGUATOR
59 : # endif
60 : #endif
61 :
62 : /* inline attribute */
63 : #ifndef SWIGINLINE
64 : # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
65 : # define SWIGINLINE inline
66 : # else
67 : # define SWIGINLINE
68 : # endif
69 : #endif
70 :
71 : /* attribute recognised by some compilers to avoid 'unused' warnings */
72 : #ifndef SWIGUNUSED
73 : # if defined(__GNUC__)
74 : # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
75 : # define SWIGUNUSED __attribute__ ((__unused__))
76 : # else
77 : # define SWIGUNUSED
78 : # endif
79 : # elif defined(__ICC)
80 : # define SWIGUNUSED __attribute__ ((__unused__))
81 : # else
82 : # define SWIGUNUSED
83 : # endif
84 : #endif
85 :
86 : #ifndef SWIG_MSC_UNSUPPRESS_4505
87 : # if defined(_MSC_VER)
88 : # pragma warning(disable : 4505) /* unreferenced local function has been removed */
89 : # endif
90 : #endif
91 :
92 : #ifndef SWIGUNUSEDPARM
93 : # ifdef __cplusplus
94 : # define SWIGUNUSEDPARM(p)
95 : # else
96 : # define SWIGUNUSEDPARM(p) p SWIGUNUSED
97 : # endif
98 : #endif
99 :
100 : /* internal SWIG method */
101 : #ifndef SWIGINTERN
102 : # define SWIGINTERN static SWIGUNUSED
103 : #endif
104 :
105 : /* internal inline SWIG method */
106 : #ifndef SWIGINTERNINLINE
107 : # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
108 : #endif
109 :
110 : /* exporting methods */
111 : #if defined(__GNUC__)
112 : # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
113 : # ifndef GCC_HASCLASSVISIBILITY
114 : # define GCC_HASCLASSVISIBILITY
115 : # endif
116 : # endif
117 : #endif
118 :
119 : #ifndef SWIGEXPORT
120 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
121 : # if defined(STATIC_LINKED)
122 : # define SWIGEXPORT
123 : # else
124 : # define SWIGEXPORT __declspec(dllexport)
125 : # endif
126 : # else
127 : # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
128 : # define SWIGEXPORT __attribute__ ((visibility("default")))
129 : # else
130 : # define SWIGEXPORT
131 : # endif
132 : # endif
133 : #endif
134 :
135 : /* calling conventions for Windows */
136 : #ifndef SWIGSTDCALL
137 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
138 : # define SWIGSTDCALL __stdcall
139 : # else
140 : # define SWIGSTDCALL
141 : # endif
142 : #endif
143 :
144 : /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
145 : #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
146 : # define _CRT_SECURE_NO_DEPRECATE
147 : #endif
148 :
149 : /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
150 : #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
151 : # define _SCL_SECURE_NO_DEPRECATE
152 : #endif
153 :
154 : /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
155 : #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
156 : # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
157 : #endif
158 :
159 : /* Intel's compiler complains if a variable which was never initialised is
160 : * cast to void, which is a common idiom which we use to indicate that we
161 : * are aware a variable isn't used. So we just silence that warning.
162 : * See: https://github.com/swig/swig/issues/192 for more discussion.
163 : */
164 : #ifdef __INTEL_COMPILER
165 : # pragma warning disable 592
166 : #endif
167 :
168 :
169 : #if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
170 : /* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
171 : # include <math.h>
172 : #endif
173 :
174 : #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
175 : /* Use debug wrappers with the Python release dll */
176 : # undef _DEBUG
177 : # include <Python.h>
178 : # define _DEBUG 1
179 : #else
180 : # include <Python.h>
181 : #endif
182 :
183 : /* -----------------------------------------------------------------------------
184 : * swigrun.swg
185 : *
186 : * This file contains generic C API SWIG runtime support for pointer
187 : * type checking.
188 : * ----------------------------------------------------------------------------- */
189 :
190 : /* This should only be incremented when either the layout of swig_type_info changes,
191 : or for whatever reason, the runtime changes incompatibly */
192 : #define SWIG_RUNTIME_VERSION "4"
193 :
194 : /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
195 : #ifdef SWIG_TYPE_TABLE
196 : # define SWIG_QUOTE_STRING(x) #x
197 : # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
198 : # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
199 : #else
200 : # define SWIG_TYPE_TABLE_NAME
201 : #endif
202 :
203 : /*
204 : You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
205 : creating a static or dynamic library from the SWIG runtime code.
206 : In 99.9% of the cases, SWIG just needs to declare them as 'static'.
207 :
208 : But only do this if strictly necessary, ie, if you have problems
209 : with your compiler or suchlike.
210 : */
211 :
212 : #ifndef SWIGRUNTIME
213 : # define SWIGRUNTIME SWIGINTERN
214 : #endif
215 :
216 : #ifndef SWIGRUNTIMEINLINE
217 : # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
218 : #endif
219 :
220 : /* Generic buffer size */
221 : #ifndef SWIG_BUFFER_SIZE
222 : # define SWIG_BUFFER_SIZE 1024
223 : #endif
224 :
225 : /* Flags for pointer conversions */
226 : #define SWIG_POINTER_DISOWN 0x1
227 : #define SWIG_CAST_NEW_MEMORY 0x2
228 : #define SWIG_POINTER_NO_NULL 0x4
229 :
230 : /* Flags for new pointer objects */
231 : #define SWIG_POINTER_OWN 0x1
232 :
233 :
234 : /*
235 : Flags/methods for returning states.
236 :
237 : The SWIG conversion methods, as ConvertPtr, return an integer
238 : that tells if the conversion was successful or not. And if not,
239 : an error code can be returned (see swigerrors.swg for the codes).
240 :
241 : Use the following macros/flags to set or process the returning
242 : states.
243 :
244 : In old versions of SWIG, code such as the following was usually written:
245 :
246 : if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
247 : // success code
248 : } else {
249 : //fail code
250 : }
251 :
252 : Now you can be more explicit:
253 :
254 : int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
255 : if (SWIG_IsOK(res)) {
256 : // success code
257 : } else {
258 : // fail code
259 : }
260 :
261 : which is the same really, but now you can also do
262 :
263 : Type *ptr;
264 : int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
265 : if (SWIG_IsOK(res)) {
266 : // success code
267 : if (SWIG_IsNewObj(res) {
268 : ...
269 : delete *ptr;
270 : } else {
271 : ...
272 : }
273 : } else {
274 : // fail code
275 : }
276 :
277 : I.e., now SWIG_ConvertPtr can return new objects and you can
278 : identify the case and take care of the deallocation. Of course that
279 : also requires SWIG_ConvertPtr to return new result values, such as
280 :
281 : int SWIG_ConvertPtr(obj, ptr,...) {
282 : if (<obj is ok>) {
283 : if (<need new object>) {
284 : *ptr = <ptr to new allocated object>;
285 : return SWIG_NEWOBJ;
286 : } else {
287 : *ptr = <ptr to old object>;
288 : return SWIG_OLDOBJ;
289 : }
290 : } else {
291 : return SWIG_BADOBJ;
292 : }
293 : }
294 :
295 : Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
296 : more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
297 : SWIG errors code.
298 :
299 : Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
300 : allows to return the 'cast rank', for example, if you have this
301 :
302 : int food(double)
303 : int fooi(int);
304 :
305 : and you call
306 :
307 : food(1) // cast rank '1' (1 -> 1.0)
308 : fooi(1) // cast rank '0'
309 :
310 : just use the SWIG_AddCast()/SWIG_CheckState()
311 : */
312 :
313 : #define SWIG_OK (0)
314 : #define SWIG_ERROR (-1)
315 : #define SWIG_IsOK(r) (r >= 0)
316 : #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
317 :
318 : /* The CastRankLimit says how many bits are used for the cast rank */
319 : #define SWIG_CASTRANKLIMIT (1 << 8)
320 : /* The NewMask denotes the object was created (using new/malloc) */
321 : #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
322 : /* The TmpMask is for in/out typemaps that use temporal objects */
323 : #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
324 : /* Simple returning values */
325 : #define SWIG_BADOBJ (SWIG_ERROR)
326 : #define SWIG_OLDOBJ (SWIG_OK)
327 : #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
328 : #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
329 : /* Check, add and del mask methods */
330 : #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
331 : #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
332 : #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
333 : #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
334 : #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
335 : #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
336 :
337 : /* Cast-Rank Mode */
338 : #if defined(SWIG_CASTRANK_MODE)
339 : # ifndef SWIG_TypeRank
340 : # define SWIG_TypeRank unsigned long
341 : # endif
342 : # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
343 : # define SWIG_MAXCASTRANK (2)
344 : # endif
345 : # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
346 : # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
347 : SWIGINTERNINLINE int SWIG_AddCast(int r) {
348 : return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
349 : }
350 : SWIGINTERNINLINE int SWIG_CheckState(int r) {
351 : return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
352 : }
353 : #else /* no cast-rank mode */
354 : # define SWIG_AddCast(r) (r)
355 : # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
356 : #endif
357 :
358 :
359 : #include <string.h>
360 :
361 : #ifdef __cplusplus
362 : extern "C" {
363 : #endif
364 :
365 : typedef void *(*swig_converter_func)(void *, int *);
366 : typedef struct swig_type_info *(*swig_dycast_func)(void **);
367 :
368 : /* Structure to store information on one type */
369 : typedef struct swig_type_info {
370 : const char *name; /* mangled name of this type */
371 : const char *str; /* human readable name of this type */
372 : swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
373 : struct swig_cast_info *cast; /* linked list of types that can cast into this type */
374 : void *clientdata; /* language specific type data */
375 : int owndata; /* flag if the structure owns the clientdata */
376 : } swig_type_info;
377 :
378 : /* Structure to store a type and conversion function used for casting */
379 : typedef struct swig_cast_info {
380 : swig_type_info *type; /* pointer to type that is equivalent to this type */
381 : swig_converter_func converter; /* function to cast the void pointers */
382 : struct swig_cast_info *next; /* pointer to next cast in linked list */
383 : struct swig_cast_info *prev; /* pointer to the previous cast */
384 : } swig_cast_info;
385 :
386 : /* Structure used to store module information
387 : * Each module generates one structure like this, and the runtime collects
388 : * all of these structures and stores them in a circularly linked list.*/
389 : typedef struct swig_module_info {
390 : swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
391 : size_t size; /* Number of types in this module */
392 : struct swig_module_info *next; /* Pointer to next element in circularly linked list */
393 : swig_type_info **type_initial; /* Array of initially generated type structures */
394 : swig_cast_info **cast_initial; /* Array of initially generated casting structures */
395 : void *clientdata; /* Language specific module data */
396 : } swig_module_info;
397 :
398 : /*
399 : Compare two type names skipping the space characters, therefore
400 : "char*" == "char *" and "Class<int>" == "Class<int >", etc.
401 :
402 : Return 0 when the two name types are equivalent, as in
403 : strncmp, but skipping ' '.
404 : */
405 : SWIGRUNTIME int
406 0 : SWIG_TypeNameComp(const char *f1, const char *l1,
407 : const char *f2, const char *l2) {
408 0 : for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
409 0 : while ((*f1 == ' ') && (f1 != l1)) ++f1;
410 0 : while ((*f2 == ' ') && (f2 != l2)) ++f2;
411 0 : if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
412 : }
413 0 : return (int)((l1 - f1) - (l2 - f2));
414 : }
415 :
416 : /*
417 : Check type equivalence in a name list like <name1>|<name2>|...
418 : Return 0 if equal, -1 if nb < tb, 1 if nb > tb
419 : */
420 : SWIGRUNTIME int
421 0 : SWIG_TypeCmp(const char *nb, const char *tb) {
422 0 : int equiv = 1;
423 0 : const char* te = tb + strlen(tb);
424 0 : const char* ne = nb;
425 0 : while (equiv != 0 && *ne) {
426 0 : for (nb = ne; *ne; ++ne) {
427 0 : if (*ne == '|') break;
428 : }
429 0 : equiv = SWIG_TypeNameComp(nb, ne, tb, te);
430 0 : if (*ne) ++ne;
431 : }
432 0 : return equiv;
433 : }
434 :
435 : /*
436 : Check type equivalence in a name list like <name1>|<name2>|...
437 : Return 0 if not equal, 1 if equal
438 : */
439 : SWIGRUNTIME int
440 0 : SWIG_TypeEquiv(const char *nb, const char *tb) {
441 0 : return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
442 : }
443 :
444 : /*
445 : Check the typename
446 : */
447 : SWIGRUNTIME swig_cast_info *
448 2279 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
449 2279 : if (ty) {
450 2279 : swig_cast_info *iter = ty->cast;
451 2279 : while (iter) {
452 2279 : if (strcmp(iter->type->name, c) == 0) {
453 2279 : if (iter == ty->cast)
454 : return iter;
455 : /* Move iter to the top of the linked list */
456 0 : iter->prev->next = iter->next;
457 0 : if (iter->next)
458 0 : iter->next->prev = iter->prev;
459 0 : iter->next = ty->cast;
460 0 : iter->prev = 0;
461 0 : if (ty->cast) ty->cast->prev = iter;
462 0 : ty->cast = iter;
463 0 : return iter;
464 : }
465 0 : iter = iter->next;
466 : }
467 : }
468 : return 0;
469 : }
470 :
471 : /*
472 : Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
473 : */
474 : SWIGRUNTIME swig_cast_info *
475 : SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
476 : if (ty) {
477 : swig_cast_info *iter = ty->cast;
478 : while (iter) {
479 : if (iter->type == from) {
480 : if (iter == ty->cast)
481 : return iter;
482 : /* Move iter to the top of the linked list */
483 : iter->prev->next = iter->next;
484 : if (iter->next)
485 : iter->next->prev = iter->prev;
486 : iter->next = ty->cast;
487 : iter->prev = 0;
488 : if (ty->cast) ty->cast->prev = iter;
489 : ty->cast = iter;
490 : return iter;
491 : }
492 : iter = iter->next;
493 : }
494 : }
495 : return 0;
496 : }
497 :
498 : /*
499 : Cast a pointer up an inheritance hierarchy
500 : */
501 : SWIGRUNTIMEINLINE void *
502 0 : SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
503 0 : return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
504 : }
505 :
506 : /*
507 : Dynamic pointer casting. Down an inheritance hierarchy
508 : */
509 : SWIGRUNTIME swig_type_info *
510 : SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
511 : swig_type_info *lastty = ty;
512 : if (!ty || !ty->dcast) return ty;
513 : while (ty && (ty->dcast)) {
514 : ty = (*ty->dcast)(ptr);
515 : if (ty) lastty = ty;
516 : }
517 : return lastty;
518 : }
519 :
520 : /*
521 : Return the name associated with this type
522 : */
523 : SWIGRUNTIMEINLINE const char *
524 : SWIG_TypeName(const swig_type_info *ty) {
525 : return ty->name;
526 : }
527 :
528 : /*
529 : Return the pretty name associated with this type,
530 : that is an unmangled type name in a form presentable to the user.
531 : */
532 : SWIGRUNTIME const char *
533 1 : SWIG_TypePrettyName(const swig_type_info *type) {
534 : /* The "str" field contains the equivalent pretty names of the
535 : type, separated by vertical-bar characters. We choose
536 : to print the last name, as it is often (?) the most
537 : specific. */
538 1 : if (!type) return NULL;
539 1 : if (type->str != NULL) {
540 : const char *last_name = type->str;
541 : const char *s;
542 28 : for (s = type->str; *s; s++)
543 27 : if (*s == '|') last_name = s+1;
544 : return last_name;
545 : }
546 : else
547 0 : return type->name;
548 : }
549 :
550 : /*
551 : Set the clientdata field for a type
552 : */
553 : SWIGRUNTIME void
554 : SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
555 : swig_cast_info *cast = ti->cast;
556 : /* if (ti->clientdata == clientdata) return; */
557 : ti->clientdata = clientdata;
558 :
559 : while (cast) {
560 : if (!cast->converter) {
561 : swig_type_info *tc = cast->type;
562 : if (!tc->clientdata) {
563 : SWIG_TypeClientData(tc, clientdata);
564 : }
565 : }
566 : cast = cast->next;
567 : }
568 : }
569 : SWIGRUNTIME void
570 1425 : SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
571 1425 : SWIG_TypeClientData(ti, clientdata);
572 1425 : ti->owndata = 1;
573 : }
574 :
575 : /*
576 : Search for a swig_type_info structure only by mangled name
577 : Search is a O(log #types)
578 :
579 : We start searching at module start, and finish searching when start == end.
580 : Note: if start == end at the beginning of the function, we go all the way around
581 : the circular list.
582 : */
583 : SWIGRUNTIME swig_type_info *
584 7991 : SWIG_MangledTypeQueryModule(swig_module_info *start,
585 : swig_module_info *end,
586 : const char *name) {
587 7991 : swig_module_info *iter = start;
588 14795 : do {
589 14795 : if (iter->size) {
590 14795 : size_t l = 0;
591 14795 : size_t r = iter->size - 1;
592 65535 : do {
593 : /* since l+r >= 0, we can (>> 1) instead (/ 2) */
594 65535 : size_t i = (l + r) >> 1;
595 65535 : const char *iname = iter->types[i]->name;
596 65535 : if (iname) {
597 65535 : int compare = strcmp(name, iname);
598 65535 : if (compare == 0) {
599 4569 : return iter->types[i];
600 60966 : } else if (compare < 0) {
601 24493 : if (i) {
602 22795 : r = i - 1;
603 : } else {
604 : break;
605 : }
606 36473 : } else if (compare > 0) {
607 36473 : l = i + 1;
608 : }
609 : } else {
610 : break; /* should never happen */
611 : }
612 59268 : } while (l <= r);
613 : }
614 10226 : iter = iter->next;
615 10226 : } while (iter != end);
616 : return 0;
617 : }
618 :
619 : /*
620 : Search for a swig_type_info structure for either a mangled name or a human readable name.
621 : It first searches the mangled names of the types, which is a O(log #types)
622 : If a type is not found it then searches the human readable names, which is O(#types).
623 :
624 : We start searching at module start, and finish searching when start == end.
625 : Note: if start == end at the beginning of the function, we go all the way around
626 : the circular list.
627 : */
628 : SWIGRUNTIME swig_type_info *
629 11 : SWIG_TypeQueryModule(swig_module_info *start,
630 : swig_module_info *end,
631 : const char *name) {
632 : /* STEP 1: Search the name field using binary search */
633 11 : swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
634 11 : if (ret) {
635 : return ret;
636 : } else {
637 : /* STEP 2: If the type hasn't been found, do a complete search
638 : of the str field (the human readable name) */
639 : swig_module_info *iter = start;
640 0 : do {
641 0 : size_t i = 0;
642 0 : for (; i < iter->size; ++i) {
643 0 : if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
644 0 : return iter->types[i];
645 : }
646 0 : iter = iter->next;
647 0 : } while (iter != end);
648 : }
649 :
650 : /* neither found a match */
651 : return 0;
652 : }
653 :
654 : /*
655 : Pack binary data into a string
656 : */
657 : SWIGRUNTIME char *
658 0 : SWIG_PackData(char *c, void *ptr, size_t sz) {
659 0 : static const char hex[17] = "0123456789abcdef";
660 0 : const unsigned char *u = (unsigned char *) ptr;
661 0 : const unsigned char *eu = u + sz;
662 0 : for (; u != eu; ++u) {
663 0 : unsigned char uu = *u;
664 0 : *(c++) = hex[(uu & 0xf0) >> 4];
665 0 : *(c++) = hex[uu & 0xf];
666 : }
667 0 : return c;
668 : }
669 :
670 : /*
671 : Unpack binary data from a string
672 : */
673 : SWIGRUNTIME const char *
674 : SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
675 : unsigned char *u = (unsigned char *) ptr;
676 : const unsigned char *eu = u + sz;
677 : for (; u != eu; ++u) {
678 : char d = *(c++);
679 : unsigned char uu;
680 : if ((d >= '0') && (d <= '9'))
681 : uu = (unsigned char)((d - '0') << 4);
682 : else if ((d >= 'a') && (d <= 'f'))
683 : uu = (unsigned char)((d - ('a'-10)) << 4);
684 : else
685 : return (char *) 0;
686 : d = *(c++);
687 : if ((d >= '0') && (d <= '9'))
688 : uu |= (unsigned char)(d - '0');
689 : else if ((d >= 'a') && (d <= 'f'))
690 : uu |= (unsigned char)(d - ('a'-10));
691 : else
692 : return (char *) 0;
693 : *u = uu;
694 : }
695 : return c;
696 : }
697 :
698 : /*
699 : Pack 'void *' into a string buffer.
700 : */
701 : SWIGRUNTIME char *
702 0 : SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
703 0 : char *r = buff;
704 0 : if ((2*sizeof(void *) + 2) > bsz) return 0;
705 0 : *(r++) = '_';
706 0 : r = SWIG_PackData(r,&ptr,sizeof(void *));
707 0 : if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
708 0 : strcpy(r,name);
709 0 : return buff;
710 : }
711 :
712 : SWIGRUNTIME const char *
713 : SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
714 : if (*c != '_') {
715 : if (strcmp(c,"NULL") == 0) {
716 : *ptr = (void *) 0;
717 : return name;
718 : } else {
719 : return 0;
720 : }
721 : }
722 : return SWIG_UnpackData(++c,ptr,sizeof(void *));
723 : }
724 :
725 : SWIGRUNTIME char *
726 0 : SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
727 0 : char *r = buff;
728 0 : size_t lname = (name ? strlen(name) : 0);
729 0 : if ((2*sz + 2 + lname) > bsz) return 0;
730 0 : *(r++) = '_';
731 0 : r = SWIG_PackData(r,ptr,sz);
732 0 : if (lname) {
733 0 : strncpy(r,name,lname+1);
734 : } else {
735 0 : *r = 0;
736 : }
737 : return buff;
738 : }
739 :
740 : SWIGRUNTIME const char *
741 : SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
742 : if (*c != '_') {
743 : if (strcmp(c,"NULL") == 0) {
744 : memset(ptr,0,sz);
745 : return name;
746 : } else {
747 : return 0;
748 : }
749 : }
750 : return SWIG_UnpackData(++c,ptr,sz);
751 : }
752 :
753 : #ifdef __cplusplus
754 : }
755 : #endif
756 :
757 : /* Errors in SWIG */
758 : #define SWIG_UnknownError -1
759 : #define SWIG_IOError -2
760 : #define SWIG_RuntimeError -3
761 : #define SWIG_IndexError -4
762 : #define SWIG_TypeError -5
763 : #define SWIG_DivisionByZero -6
764 : #define SWIG_OverflowError -7
765 : #define SWIG_SyntaxError -8
766 : #define SWIG_ValueError -9
767 : #define SWIG_SystemError -10
768 : #define SWIG_AttributeError -11
769 : #define SWIG_MemoryError -12
770 : #define SWIG_NullReferenceError -13
771 :
772 :
773 :
774 : /* Compatibility macros for Python 3 */
775 : #if PY_VERSION_HEX >= 0x03000000
776 :
777 : #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
778 : #define PyInt_Check(x) PyLong_Check(x)
779 : #define PyInt_AsLong(x) PyLong_AsLong(x)
780 : #define PyInt_FromLong(x) PyLong_FromLong(x)
781 : #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
782 : #define PyString_Check(name) PyBytes_Check(name)
783 : #define PyString_FromString(x) PyUnicode_FromString(x)
784 : #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
785 : #define PyString_AsString(str) PyBytes_AsString(str)
786 : #define PyString_Size(str) PyBytes_Size(str)
787 : #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
788 : #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
789 : #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
790 : #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
791 :
792 : #endif
793 :
794 : #ifndef Py_TYPE
795 : # define Py_TYPE(op) ((op)->ob_type)
796 : #endif
797 :
798 : /* SWIG APIs for compatibility of both Python 2 & 3 */
799 :
800 : #if PY_VERSION_HEX >= 0x03000000
801 : # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
802 : #else
803 : # define SWIG_Python_str_FromFormat PyString_FromFormat
804 : #endif
805 :
806 :
807 : /* Warning: This function will allocate a new string in Python 3,
808 : * so please call SWIG_Python_str_DelForPy3(x) to free the space.
809 : */
810 : SWIGINTERN char*
811 : SWIG_Python_str_AsChar(PyObject *str)
812 : {
813 : #if PY_VERSION_HEX >= 0x03000000
814 : char *newstr = 0;
815 : str = PyUnicode_AsUTF8String(str);
816 : if (str) {
817 : char *cstr;
818 : Py_ssize_t len;
819 : PyBytes_AsStringAndSize(str, &cstr, &len);
820 : newstr = (char *) malloc(len+1);
821 : memcpy(newstr, cstr, len+1);
822 : Py_XDECREF(str);
823 : }
824 : return newstr;
825 : #else
826 : return PyString_AsString(str);
827 : #endif
828 : }
829 :
830 : #if PY_VERSION_HEX >= 0x03000000
831 : # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
832 : #else
833 : # define SWIG_Python_str_DelForPy3(x)
834 : #endif
835 :
836 :
837 : SWIGINTERN PyObject*
838 296 : SWIG_Python_str_FromChar(const char *c)
839 : {
840 : #if PY_VERSION_HEX >= 0x03000000
841 296 : return PyUnicode_FromString(c);
842 : #else
843 : return PyString_FromString(c);
844 : #endif
845 : }
846 :
847 : #ifndef PyObject_DEL
848 : # define PyObject_DEL PyObject_Del
849 : #endif
850 :
851 : // SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user
852 : // interface files check for it.
853 : # define SWIGPY_USE_CAPSULE
854 : # define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
855 :
856 : #if PY_VERSION_HEX < 0x03020000
857 : #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
858 : #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
859 : #define Py_hash_t long
860 : #endif
861 :
862 : /* -----------------------------------------------------------------------------
863 : * error manipulation
864 : * ----------------------------------------------------------------------------- */
865 :
866 : SWIGRUNTIME PyObject*
867 6 : SWIG_Python_ErrorType(int code) {
868 6 : PyObject* type = 0;
869 0 : switch(code) {
870 0 : case SWIG_MemoryError:
871 0 : type = PyExc_MemoryError;
872 0 : break;
873 0 : case SWIG_IOError:
874 0 : type = PyExc_IOError;
875 0 : break;
876 6 : case SWIG_RuntimeError:
877 6 : type = PyExc_RuntimeError;
878 0 : break;
879 0 : case SWIG_IndexError:
880 0 : type = PyExc_IndexError;
881 0 : break;
882 0 : case SWIG_TypeError:
883 0 : type = PyExc_TypeError;
884 0 : break;
885 0 : case SWIG_DivisionByZero:
886 0 : type = PyExc_ZeroDivisionError;
887 0 : break;
888 0 : case SWIG_OverflowError:
889 0 : type = PyExc_OverflowError;
890 0 : break;
891 0 : case SWIG_SyntaxError:
892 0 : type = PyExc_SyntaxError;
893 0 : break;
894 0 : case SWIG_ValueError:
895 0 : type = PyExc_ValueError;
896 0 : break;
897 0 : case SWIG_SystemError:
898 0 : type = PyExc_SystemError;
899 0 : break;
900 0 : case SWIG_AttributeError:
901 0 : type = PyExc_AttributeError;
902 0 : break;
903 0 : default:
904 0 : type = PyExc_RuntimeError;
905 : }
906 6 : return type;
907 : }
908 :
909 :
910 : SWIGRUNTIME void
911 : SWIG_Python_AddErrorMsg(const char* mesg)
912 : {
913 : PyObject *type = 0;
914 : PyObject *value = 0;
915 : PyObject *traceback = 0;
916 :
917 : if (PyErr_Occurred())
918 : PyErr_Fetch(&type, &value, &traceback);
919 : if (value) {
920 : PyObject *old_str = PyObject_Str(value);
921 : const char *tmp = SWIG_Python_str_AsChar(old_str);
922 : PyErr_Clear();
923 : Py_XINCREF(type);
924 : if (tmp)
925 : PyErr_Format(type, "%s %s", tmp, mesg);
926 : else
927 : PyErr_Format(type, "%s", mesg);
928 : SWIG_Python_str_DelForPy3(tmp);
929 : Py_DECREF(old_str);
930 : Py_DECREF(value);
931 : } else {
932 : PyErr_SetString(PyExc_RuntimeError, mesg);
933 : }
934 : }
935 :
936 : SWIGRUNTIME int
937 2 : SWIG_Python_TypeErrorOccurred(PyObject *obj)
938 : {
939 2 : PyObject *error;
940 2 : if (obj)
941 : return 0;
942 2 : error = PyErr_Occurred();
943 2 : return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
944 : }
945 :
946 : SWIGRUNTIME void
947 2 : SWIG_Python_RaiseOrModifyTypeError(const char *message)
948 : {
949 2 : if (SWIG_Python_TypeErrorOccurred(NULL)) {
950 : /* Use existing TypeError to preserve stacktrace and enhance with given message */
951 0 : PyObject *newvalue;
952 0 : PyObject *type = NULL, *value = NULL, *traceback = NULL;
953 0 : PyErr_Fetch(&type, &value, &traceback);
954 : #if PY_VERSION_HEX >= 0x03000000
955 0 : newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message);
956 : #else
957 : newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message);
958 : #endif
959 0 : Py_XDECREF(value);
960 0 : PyErr_Restore(type, newvalue, traceback);
961 : } else {
962 : /* Raise TypeError using given message */
963 2 : PyErr_SetString(PyExc_TypeError, message);
964 : }
965 2 : }
966 :
967 : #if defined(SWIG_PYTHON_NO_THREADS)
968 : # if defined(SWIG_PYTHON_THREADS)
969 : # undef SWIG_PYTHON_THREADS
970 : # endif
971 : #endif
972 : #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
973 : # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
974 : # define SWIG_PYTHON_USE_GIL
975 : # endif
976 : # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
977 : # ifndef SWIG_PYTHON_INITIALIZE_THREADS
978 : # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
979 : # endif
980 : # ifdef __cplusplus /* C++ code */
981 : class SWIG_Python_Thread_Block {
982 : bool status;
983 : PyGILState_STATE state;
984 : public:
985 12 : void end() { if (status) { PyGILState_Release(state); status = false;} }
986 12 : SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
987 0 : ~SWIG_Python_Thread_Block() { end(); }
988 : };
989 : class SWIG_Python_Thread_Allow {
990 : bool status;
991 : PyThreadState *save;
992 : public:
993 : void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
994 : SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
995 : ~SWIG_Python_Thread_Allow() { end(); }
996 : };
997 : # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
998 : # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
999 : # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1000 : # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1001 : # else /* C code */
1002 : # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1003 : # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1004 : # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1005 : # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1006 : # endif
1007 : # else /* Old thread way, not implemented, user must provide it */
1008 : # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1009 : # define SWIG_PYTHON_INITIALIZE_THREADS
1010 : # endif
1011 : # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1012 : # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1013 : # endif
1014 : # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1015 : # define SWIG_PYTHON_THREAD_END_BLOCK
1016 : # endif
1017 : # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1018 : # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1019 : # endif
1020 : # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1021 : # define SWIG_PYTHON_THREAD_END_ALLOW
1022 : # endif
1023 : # endif
1024 : #else /* No thread support */
1025 : # define SWIG_PYTHON_INITIALIZE_THREADS
1026 : # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1027 : # define SWIG_PYTHON_THREAD_END_BLOCK
1028 : # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1029 : # define SWIG_PYTHON_THREAD_END_ALLOW
1030 : #endif
1031 :
1032 : /* -----------------------------------------------------------------------------
1033 : * Python API portion that goes into the runtime
1034 : * ----------------------------------------------------------------------------- */
1035 :
1036 : #ifdef __cplusplus
1037 : extern "C" {
1038 : #endif
1039 :
1040 : /* -----------------------------------------------------------------------------
1041 : * Constant declarations
1042 : * ----------------------------------------------------------------------------- */
1043 :
1044 : /* Constant Types */
1045 : #define SWIG_PY_POINTER 4
1046 : #define SWIG_PY_BINARY 5
1047 :
1048 : /* Constant information structure */
1049 : typedef struct swig_const_info {
1050 : int type;
1051 : const char *name;
1052 : long lvalue;
1053 : double dvalue;
1054 : void *pvalue;
1055 : swig_type_info **ptype;
1056 : } swig_const_info;
1057 :
1058 : #ifdef __cplusplus
1059 : }
1060 : #endif
1061 :
1062 :
1063 : /* -----------------------------------------------------------------------------
1064 : * pyrun.swg
1065 : *
1066 : * This file contains the runtime support for Python modules
1067 : * and includes code for managing global variables and pointer
1068 : * type checking.
1069 : *
1070 : * ----------------------------------------------------------------------------- */
1071 :
1072 : #if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */
1073 : # error "This version of SWIG only supports Python >= 2.7"
1074 : #endif
1075 :
1076 : #if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000
1077 : # error "This version of SWIG only supports Python 3 >= 3.2"
1078 : #endif
1079 :
1080 : /* Common SWIG API */
1081 :
1082 : /* for raw pointers */
1083 : #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1084 : #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1085 : #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1086 :
1087 : #ifdef SWIGPYTHON_BUILTIN
1088 : #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1089 : #else
1090 : #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1091 : #endif
1092 :
1093 : #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1094 :
1095 : #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1096 : #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1097 : #define swig_owntype int
1098 :
1099 : /* for raw packed data */
1100 : #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1101 : #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1102 :
1103 : /* for class or struct pointers */
1104 : #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1105 : #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1106 :
1107 : /* for C or C++ function pointers */
1108 : #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1109 : #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1110 :
1111 : /* for C++ member pointers, ie, member methods */
1112 : #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1113 : #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1114 :
1115 :
1116 : /* Runtime API */
1117 :
1118 : #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1119 : #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1120 : #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1121 :
1122 : #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1123 : #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1124 : #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1125 : #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1126 : #define SWIG_fail goto fail
1127 :
1128 :
1129 : /* Runtime API implementation */
1130 :
1131 : /* Error manipulation */
1132 :
1133 : SWIGINTERN void
1134 : SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1135 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1136 : PyErr_SetObject(errtype, obj);
1137 : Py_DECREF(obj);
1138 : SWIG_PYTHON_THREAD_END_BLOCK;
1139 : }
1140 :
1141 : SWIGINTERN void
1142 6 : SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1143 6 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1144 6 : PyErr_SetString(errtype, msg);
1145 6 : SWIG_PYTHON_THREAD_END_BLOCK;
1146 6 : }
1147 :
1148 : #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1149 :
1150 : /* Set a constant value */
1151 :
1152 : #if defined(SWIGPYTHON_BUILTIN)
1153 :
1154 : SWIGINTERN void
1155 : SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1156 : PyObject *s = PyString_InternFromString(key);
1157 : PyList_Append(seq, s);
1158 : Py_DECREF(s);
1159 : }
1160 :
1161 : SWIGINTERN void
1162 : SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
1163 : PyDict_SetItemString(d, name, obj);
1164 : Py_DECREF(obj);
1165 : if (public_interface)
1166 : SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1167 : }
1168 :
1169 : #else
1170 :
1171 : SWIGINTERN void
1172 56715 : SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1173 56715 : PyDict_SetItemString(d, name, obj);
1174 56715 : Py_DECREF(obj);
1175 56715 : }
1176 :
1177 : #endif
1178 :
1179 : /* Append a value to the result obj */
1180 :
1181 : SWIGINTERN PyObject*
1182 1910 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1183 1910 : if (!result) {
1184 : result = obj;
1185 222 : } else if (result == Py_None) {
1186 202 : Py_DECREF(result);
1187 : result = obj;
1188 : } else {
1189 20 : if (!PyList_Check(result)) {
1190 9 : PyObject *o2 = result;
1191 9 : result = PyList_New(1);
1192 9 : PyList_SetItem(result, 0, o2);
1193 : }
1194 20 : PyList_Append(result,obj);
1195 20 : Py_DECREF(obj);
1196 : }
1197 1910 : return result;
1198 : }
1199 :
1200 : /* Unpack the argument tuple */
1201 :
1202 : SWIGINTERN Py_ssize_t
1203 25837 : SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1204 : {
1205 25837 : if (!args) {
1206 16551 : if (!min && !max) {
1207 : return 1;
1208 : } else {
1209 0 : PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1210 : name, (min == max ? "" : "at least "), (int)min);
1211 0 : return 0;
1212 : }
1213 : }
1214 9286 : if (!PyTuple_Check(args)) {
1215 1425 : if (min <= 1 && max >= 1) {
1216 1425 : Py_ssize_t i;
1217 1425 : objs[0] = args;
1218 1425 : for (i = 1; i < max; ++i) {
1219 0 : objs[i] = 0;
1220 : }
1221 : return 2;
1222 : }
1223 0 : PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1224 0 : return 0;
1225 : } else {
1226 7861 : Py_ssize_t l = PyTuple_GET_SIZE(args);
1227 7861 : if (l < min) {
1228 0 : PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1229 : name, (min == max ? "" : "at least "), (int)min, (int)l);
1230 0 : return 0;
1231 7861 : } else if (l > max) {
1232 0 : PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1233 : name, (min == max ? "" : "at most "), (int)max, (int)l);
1234 0 : return 0;
1235 : } else {
1236 : Py_ssize_t i;
1237 22326 : for (i = 0; i < l; ++i) {
1238 14465 : objs[i] = PyTuple_GET_ITEM(args, i);
1239 : }
1240 10295 : for (; l < max; ++l) {
1241 2434 : objs[l] = 0;
1242 : }
1243 7861 : return i + 1;
1244 : }
1245 : }
1246 : }
1247 :
1248 : /* A functor is a function object with one single object argument */
1249 : #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1250 :
1251 : /*
1252 : Helper for static pointer initialization for both C and C++ code, for example
1253 : static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1254 : */
1255 : #ifdef __cplusplus
1256 : #define SWIG_STATIC_POINTER(var) var
1257 : #else
1258 : #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1259 : #endif
1260 :
1261 : /* -----------------------------------------------------------------------------
1262 : * Pointer declarations
1263 : * ----------------------------------------------------------------------------- */
1264 :
1265 : /* Flags for new pointer objects */
1266 : #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1267 : #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1268 :
1269 : #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1270 :
1271 : #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1272 : #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1273 :
1274 : #ifdef __cplusplus
1275 : extern "C" {
1276 : #endif
1277 :
1278 : /* The python void return value */
1279 :
1280 : SWIGRUNTIMEINLINE PyObject *
1281 44215 : SWIG_Py_Void(void)
1282 : {
1283 44215 : PyObject *none = Py_None;
1284 0 : Py_INCREF(none);
1285 4431 : return none;
1286 : }
1287 :
1288 : /* SwigPyClientData */
1289 :
1290 : typedef struct {
1291 : PyObject *klass;
1292 : PyObject *newraw;
1293 : PyObject *newargs;
1294 : PyObject *destroy;
1295 : int delargs;
1296 : int implicitconv;
1297 : PyTypeObject *pytype;
1298 : } SwigPyClientData;
1299 :
1300 : SWIGRUNTIMEINLINE int
1301 : SWIG_Python_CheckImplicit(swig_type_info *ty)
1302 : {
1303 : SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
1304 : int fail = data ? data->implicitconv : 0;
1305 : if (fail)
1306 : PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors.");
1307 : return fail;
1308 : }
1309 :
1310 : SWIGRUNTIMEINLINE PyObject *
1311 : SWIG_Python_ExceptionType(swig_type_info *desc) {
1312 : SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1313 : PyObject *klass = data ? data->klass : 0;
1314 : return (klass ? klass : PyExc_RuntimeError);
1315 : }
1316 :
1317 :
1318 : SWIGRUNTIME SwigPyClientData *
1319 1425 : SwigPyClientData_New(PyObject* obj)
1320 : {
1321 1425 : if (!obj) {
1322 : return 0;
1323 : } else {
1324 1425 : SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1325 : /* the klass element */
1326 1425 : data->klass = obj;
1327 1425 : Py_INCREF(data->klass);
1328 : /* the newraw method and newargs arguments used to create a new raw instance */
1329 1425 : if (PyClass_Check(obj)) {
1330 1425 : data->newraw = 0;
1331 1425 : data->newargs = obj;
1332 1425 : Py_INCREF(obj);
1333 : } else {
1334 0 : data->newraw = PyObject_GetAttrString(data->klass, "__new__");
1335 0 : if (data->newraw) {
1336 0 : Py_INCREF(data->newraw);
1337 0 : data->newargs = PyTuple_New(1);
1338 0 : PyTuple_SetItem(data->newargs, 0, obj);
1339 : } else {
1340 0 : data->newargs = obj;
1341 : }
1342 0 : Py_INCREF(data->newargs);
1343 : }
1344 : /* the destroy method, aka as the C++ delete method */
1345 1425 : data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
1346 1425 : if (PyErr_Occurred()) {
1347 0 : PyErr_Clear();
1348 0 : data->destroy = 0;
1349 : }
1350 1425 : if (data->destroy) {
1351 1425 : int flags;
1352 1425 : Py_INCREF(data->destroy);
1353 1425 : flags = PyCFunction_GET_FLAGS(data->destroy);
1354 1425 : data->delargs = !(flags & (METH_O));
1355 : } else {
1356 0 : data->delargs = 0;
1357 : }
1358 1425 : data->implicitconv = 0;
1359 1425 : data->pytype = 0;
1360 1425 : return data;
1361 : }
1362 : }
1363 :
1364 : SWIGRUNTIME void
1365 0 : SwigPyClientData_Del(SwigPyClientData *data) {
1366 0 : Py_XDECREF(data->newraw);
1367 0 : Py_XDECREF(data->newargs);
1368 0 : Py_XDECREF(data->destroy);
1369 0 : }
1370 :
1371 : /* =============== SwigPyObject =====================*/
1372 :
1373 : typedef struct {
1374 : PyObject_HEAD
1375 : void *ptr;
1376 : swig_type_info *ty;
1377 : int own;
1378 : PyObject *next;
1379 : #ifdef SWIGPYTHON_BUILTIN
1380 : PyObject *dict;
1381 : #endif
1382 : } SwigPyObject;
1383 :
1384 :
1385 : #ifdef SWIGPYTHON_BUILTIN
1386 :
1387 : SWIGRUNTIME PyObject *
1388 : SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1389 : {
1390 : SwigPyObject *sobj = (SwigPyObject *)v;
1391 :
1392 : if (!sobj->dict)
1393 : sobj->dict = PyDict_New();
1394 :
1395 : Py_INCREF(sobj->dict);
1396 : return sobj->dict;
1397 : }
1398 :
1399 : #endif
1400 :
1401 : SWIGRUNTIME PyObject *
1402 0 : SwigPyObject_long(SwigPyObject *v)
1403 : {
1404 0 : return PyLong_FromVoidPtr(v->ptr);
1405 : }
1406 :
1407 : SWIGRUNTIME PyObject *
1408 : SwigPyObject_format(const char* fmt, SwigPyObject *v)
1409 : {
1410 : PyObject *res = NULL;
1411 : PyObject *args = PyTuple_New(1);
1412 : if (args) {
1413 : if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1414 : PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1415 : if (ofmt) {
1416 : #if PY_VERSION_HEX >= 0x03000000
1417 : res = PyUnicode_Format(ofmt,args);
1418 : #else
1419 : res = PyString_Format(ofmt,args);
1420 : #endif
1421 : Py_DECREF(ofmt);
1422 : }
1423 : Py_DECREF(args);
1424 : }
1425 : }
1426 : return res;
1427 : }
1428 :
1429 : SWIGRUNTIME PyObject *
1430 : SwigPyObject_oct(SwigPyObject *v)
1431 : {
1432 : return SwigPyObject_format("%o",v);
1433 : }
1434 :
1435 : SWIGRUNTIME PyObject *
1436 : SwigPyObject_hex(SwigPyObject *v)
1437 : {
1438 : return SwigPyObject_format("%x",v);
1439 : }
1440 :
1441 : SWIGRUNTIME PyObject *
1442 1 : SwigPyObject_repr(SwigPyObject *v)
1443 : {
1444 1 : const char *name = SWIG_TypePrettyName(v->ty);
1445 1 : PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1446 1 : if (v->next) {
1447 0 : PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1448 : # if PY_VERSION_HEX >= 0x03000000
1449 0 : PyObject *joined = PyUnicode_Concat(repr, nrep);
1450 0 : Py_DecRef(repr);
1451 0 : Py_DecRef(nrep);
1452 0 : repr = joined;
1453 : # else
1454 : PyString_ConcatAndDel(&repr,nrep);
1455 : # endif
1456 : }
1457 1 : return repr;
1458 : }
1459 :
1460 : /* We need a version taking two PyObject* parameters so it's a valid
1461 : * PyCFunction to use in swigobject_methods[]. */
1462 : SWIGRUNTIME PyObject *
1463 0 : SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1464 : {
1465 0 : return SwigPyObject_repr((SwigPyObject*)v);
1466 : }
1467 :
1468 : SWIGRUNTIME int
1469 0 : SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
1470 : {
1471 0 : void *i = v->ptr;
1472 0 : void *j = w->ptr;
1473 0 : return (i < j) ? -1 : ((i > j) ? 1 : 0);
1474 : }
1475 :
1476 : /* Added for Python 3.x, would it also be useful for Python 2.x? */
1477 : SWIGRUNTIME PyObject*
1478 0 : SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
1479 : {
1480 0 : PyObject* res;
1481 0 : if( op != Py_EQ && op != Py_NE ) {
1482 0 : Py_INCREF(Py_NotImplemented);
1483 0 : return Py_NotImplemented;
1484 : }
1485 0 : res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1486 0 : return res;
1487 : }
1488 :
1489 :
1490 : SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1491 :
1492 : #ifdef SWIGPYTHON_BUILTIN
1493 : static swig_type_info *SwigPyObject_stype = 0;
1494 : SWIGRUNTIME PyTypeObject*
1495 : SwigPyObject_type(void) {
1496 : SwigPyClientData *cd;
1497 : assert(SwigPyObject_stype);
1498 : cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1499 : assert(cd);
1500 : assert(cd->pytype);
1501 : return cd->pytype;
1502 : }
1503 : #else
1504 : SWIGRUNTIME PyTypeObject*
1505 81543 : SwigPyObject_type(void) {
1506 81543 : static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1507 81543 : return type;
1508 : }
1509 : #endif
1510 :
1511 : SWIGRUNTIMEINLINE int
1512 : SwigPyObject_Check(PyObject *op) {
1513 : #ifdef SWIGPYTHON_BUILTIN
1514 : PyTypeObject *target_tp = SwigPyObject_type();
1515 : if (PyType_IsSubtype(op->ob_type, target_tp))
1516 : return 1;
1517 : return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
1518 : #else
1519 : return (Py_TYPE(op) == SwigPyObject_type())
1520 : || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1521 : #endif
1522 : }
1523 :
1524 : SWIGRUNTIME PyObject *
1525 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1526 :
1527 : SWIGRUNTIME void
1528 9622 : SwigPyObject_dealloc(PyObject *v)
1529 : {
1530 9622 : SwigPyObject *sobj = (SwigPyObject *) v;
1531 9622 : PyObject *next = sobj->next;
1532 9622 : if (sobj->own == SWIG_POINTER_OWN) {
1533 9622 : swig_type_info *ty = sobj->ty;
1534 9622 : SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1535 9622 : PyObject *destroy = data ? data->destroy : 0;
1536 9622 : if (destroy) {
1537 : /* destroy is always a VARARGS method */
1538 9622 : PyObject *res;
1539 :
1540 : /* PyObject_CallFunction() has the potential to silently drop
1541 : the active exception. In cases of unnamed temporary
1542 : variable or where we just finished iterating over a generator
1543 : StopIteration will be active right now, and this needs to
1544 : remain true upon return from SwigPyObject_dealloc. So save
1545 : and restore. */
1546 :
1547 9622 : PyObject *type = NULL, *value = NULL, *traceback = NULL;
1548 9622 : PyErr_Fetch(&type, &value, &traceback);
1549 :
1550 9622 : if (data->delargs) {
1551 : /* we need to create a temporary object to carry the destroy operation */
1552 0 : PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1553 0 : res = SWIG_Python_CallFunctor(destroy, tmp);
1554 0 : Py_DECREF(tmp);
1555 : } else {
1556 9622 : PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1557 9622 : PyObject *mself = PyCFunction_GET_SELF(destroy);
1558 9622 : res = ((*meth)(mself, v));
1559 : }
1560 9622 : if (!res)
1561 0 : PyErr_WriteUnraisable(destroy);
1562 :
1563 9622 : PyErr_Restore(type, value, traceback);
1564 :
1565 19244 : Py_XDECREF(res);
1566 : }
1567 : #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1568 : else {
1569 : const char *name = SWIG_TypePrettyName(ty);
1570 : printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1571 : }
1572 : #endif
1573 : }
1574 9622 : Py_XDECREF(next);
1575 9622 : PyObject_DEL(v);
1576 9622 : }
1577 :
1578 : SWIGRUNTIME PyObject*
1579 0 : SwigPyObject_append(PyObject* v, PyObject* next)
1580 : {
1581 0 : SwigPyObject *sobj = (SwigPyObject *) v;
1582 0 : if (!SwigPyObject_Check(next)) {
1583 0 : PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
1584 0 : return NULL;
1585 : }
1586 0 : sobj->next = next;
1587 0 : Py_INCREF(next);
1588 0 : return SWIG_Py_Void();
1589 : }
1590 :
1591 : SWIGRUNTIME PyObject*
1592 0 : SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1593 : {
1594 0 : SwigPyObject *sobj = (SwigPyObject *) v;
1595 0 : if (sobj->next) {
1596 0 : Py_INCREF(sobj->next);
1597 0 : return sobj->next;
1598 : } else {
1599 0 : return SWIG_Py_Void();
1600 : }
1601 : }
1602 :
1603 : SWIGINTERN PyObject*
1604 0 : SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1605 : {
1606 0 : SwigPyObject *sobj = (SwigPyObject *)v;
1607 0 : sobj->own = 0;
1608 0 : return SWIG_Py_Void();
1609 : }
1610 :
1611 : SWIGINTERN PyObject*
1612 0 : SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1613 : {
1614 0 : SwigPyObject *sobj = (SwigPyObject *)v;
1615 0 : sobj->own = SWIG_POINTER_OWN;
1616 0 : return SWIG_Py_Void();
1617 : }
1618 :
1619 : SWIGINTERN PyObject*
1620 0 : SwigPyObject_own(PyObject *v, PyObject *args)
1621 : {
1622 0 : PyObject *val = 0;
1623 0 : if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
1624 : return NULL;
1625 : } else {
1626 0 : SwigPyObject *sobj = (SwigPyObject *)v;
1627 0 : PyObject *obj = PyBool_FromLong(sobj->own);
1628 0 : if (val) {
1629 0 : if (PyObject_IsTrue(val)) {
1630 0 : SwigPyObject_acquire(v,args);
1631 : } else {
1632 0 : SwigPyObject_disown(v,args);
1633 : }
1634 : }
1635 0 : return obj;
1636 : }
1637 : }
1638 :
1639 : static PyMethodDef
1640 : swigobject_methods[] = {
1641 : {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"},
1642 : {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"},
1643 : {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"},
1644 : {"append", SwigPyObject_append, METH_O, "appends another 'this' object"},
1645 : {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"},
1646 : {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"},
1647 : {0, 0, 0, 0}
1648 : };
1649 :
1650 : SWIGRUNTIME PyTypeObject*
1651 285 : SwigPyObject_TypeOnce(void) {
1652 285 : static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1653 :
1654 285 : static PyNumberMethods SwigPyObject_as_number = {
1655 : (binaryfunc)0, /*nb_add*/
1656 : (binaryfunc)0, /*nb_subtract*/
1657 : (binaryfunc)0, /*nb_multiply*/
1658 : /* nb_divide removed in Python 3 */
1659 : #if PY_VERSION_HEX < 0x03000000
1660 : (binaryfunc)0, /*nb_divide*/
1661 : #endif
1662 : (binaryfunc)0, /*nb_remainder*/
1663 : (binaryfunc)0, /*nb_divmod*/
1664 : (ternaryfunc)0,/*nb_power*/
1665 : (unaryfunc)0, /*nb_negative*/
1666 : (unaryfunc)0, /*nb_positive*/
1667 : (unaryfunc)0, /*nb_absolute*/
1668 : (inquiry)0, /*nb_nonzero*/
1669 : 0, /*nb_invert*/
1670 : 0, /*nb_lshift*/
1671 : 0, /*nb_rshift*/
1672 : 0, /*nb_and*/
1673 : 0, /*nb_xor*/
1674 : 0, /*nb_or*/
1675 : #if PY_VERSION_HEX < 0x03000000
1676 : 0, /*nb_coerce*/
1677 : #endif
1678 : (unaryfunc)SwigPyObject_long, /*nb_int*/
1679 : #if PY_VERSION_HEX < 0x03000000
1680 : (unaryfunc)SwigPyObject_long, /*nb_long*/
1681 : #else
1682 : 0, /*nb_reserved*/
1683 : #endif
1684 : (unaryfunc)0, /*nb_float*/
1685 : #if PY_VERSION_HEX < 0x03000000
1686 : (unaryfunc)SwigPyObject_oct, /*nb_oct*/
1687 : (unaryfunc)SwigPyObject_hex, /*nb_hex*/
1688 : #endif
1689 : #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
1690 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
1691 : #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1692 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1693 : #else
1694 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1695 : #endif
1696 : };
1697 :
1698 285 : static PyTypeObject swigpyobject_type;
1699 285 : static int type_init = 0;
1700 285 : if (!type_init) {
1701 285 : const PyTypeObject tmp = {
1702 : #if PY_VERSION_HEX >= 0x03000000
1703 : PyVarObject_HEAD_INIT(NULL, 0)
1704 : #else
1705 : PyObject_HEAD_INIT(NULL)
1706 : 0, /* ob_size */
1707 : #endif
1708 : "SwigPyObject", /* tp_name */
1709 : sizeof(SwigPyObject), /* tp_basicsize */
1710 : 0, /* tp_itemsize */
1711 : (destructor)SwigPyObject_dealloc, /* tp_dealloc */
1712 : 0, /* tp_print */
1713 : (getattrfunc)0, /* tp_getattr */
1714 : (setattrfunc)0, /* tp_setattr */
1715 : #if PY_VERSION_HEX >= 0x03000000
1716 : 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1717 : #else
1718 : (cmpfunc)SwigPyObject_compare, /* tp_compare */
1719 : #endif
1720 : (reprfunc)SwigPyObject_repr, /* tp_repr */
1721 : &SwigPyObject_as_number, /* tp_as_number */
1722 : 0, /* tp_as_sequence */
1723 : 0, /* tp_as_mapping */
1724 : (hashfunc)0, /* tp_hash */
1725 : (ternaryfunc)0, /* tp_call */
1726 : 0, /* tp_str */
1727 : PyObject_GenericGetAttr, /* tp_getattro */
1728 : 0, /* tp_setattro */
1729 : 0, /* tp_as_buffer */
1730 : Py_TPFLAGS_DEFAULT, /* tp_flags */
1731 : swigobject_doc, /* tp_doc */
1732 : 0, /* tp_traverse */
1733 : 0, /* tp_clear */
1734 : (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
1735 : 0, /* tp_weaklistoffset */
1736 : 0, /* tp_iter */
1737 : 0, /* tp_iternext */
1738 : swigobject_methods, /* tp_methods */
1739 : 0, /* tp_members */
1740 : 0, /* tp_getset */
1741 : 0, /* tp_base */
1742 : 0, /* tp_dict */
1743 : 0, /* tp_descr_get */
1744 : 0, /* tp_descr_set */
1745 : 0, /* tp_dictoffset */
1746 : 0, /* tp_init */
1747 : 0, /* tp_alloc */
1748 : 0, /* tp_new */
1749 : 0, /* tp_free */
1750 : 0, /* tp_is_gc */
1751 : 0, /* tp_bases */
1752 : 0, /* tp_mro */
1753 : 0, /* tp_cache */
1754 : 0, /* tp_subclasses */
1755 : 0, /* tp_weaklist */
1756 : 0, /* tp_del */
1757 : 0, /* tp_version_tag */
1758 : #if PY_VERSION_HEX >= 0x03040000
1759 : 0, /* tp_finalize */
1760 : #endif
1761 : #ifdef COUNT_ALLOCS
1762 : 0, /* tp_allocs */
1763 : 0, /* tp_frees */
1764 : 0, /* tp_maxalloc */
1765 : 0, /* tp_prev */
1766 : 0 /* tp_next */
1767 : #endif
1768 : };
1769 285 : swigpyobject_type = tmp;
1770 285 : type_init = 1;
1771 285 : if (PyType_Ready(&swigpyobject_type) < 0)
1772 0 : return NULL;
1773 : }
1774 : return &swigpyobject_type;
1775 : }
1776 :
1777 : SWIGRUNTIME PyObject *
1778 9641 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1779 : {
1780 9641 : SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1781 9641 : if (sobj) {
1782 9641 : sobj->ptr = ptr;
1783 9641 : sobj->ty = ty;
1784 9641 : sobj->own = own;
1785 9641 : sobj->next = 0;
1786 : }
1787 9641 : return (PyObject *)sobj;
1788 : }
1789 :
1790 : /* -----------------------------------------------------------------------------
1791 : * Implements a simple Swig Packed type, and use it instead of string
1792 : * ----------------------------------------------------------------------------- */
1793 :
1794 : typedef struct {
1795 : PyObject_HEAD
1796 : void *pack;
1797 : swig_type_info *ty;
1798 : size_t size;
1799 : } SwigPyPacked;
1800 :
1801 : SWIGRUNTIME PyObject *
1802 0 : SwigPyPacked_repr(SwigPyPacked *v)
1803 : {
1804 0 : char result[SWIG_BUFFER_SIZE];
1805 0 : if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1806 0 : return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
1807 : } else {
1808 0 : return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
1809 : }
1810 : }
1811 :
1812 : SWIGRUNTIME PyObject *
1813 0 : SwigPyPacked_str(SwigPyPacked *v)
1814 : {
1815 0 : char result[SWIG_BUFFER_SIZE];
1816 0 : if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
1817 0 : return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
1818 : } else {
1819 0 : return SWIG_Python_str_FromChar(v->ty->name);
1820 : }
1821 : }
1822 :
1823 : SWIGRUNTIME int
1824 : SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
1825 : {
1826 : size_t i = v->size;
1827 : size_t j = w->size;
1828 : int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1829 : return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size);
1830 : }
1831 :
1832 : SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
1833 :
1834 : SWIGRUNTIME PyTypeObject*
1835 285 : SwigPyPacked_type(void) {
1836 285 : static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
1837 285 : return type;
1838 : }
1839 :
1840 : SWIGRUNTIMEINLINE int
1841 : SwigPyPacked_Check(PyObject *op) {
1842 : return ((op)->ob_type == SwigPyPacked_TypeOnce())
1843 : || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
1844 : }
1845 :
1846 : SWIGRUNTIME void
1847 0 : SwigPyPacked_dealloc(PyObject *v)
1848 : {
1849 0 : if (SwigPyPacked_Check(v)) {
1850 0 : SwigPyPacked *sobj = (SwigPyPacked *) v;
1851 0 : free(sobj->pack);
1852 : }
1853 0 : PyObject_DEL(v);
1854 0 : }
1855 :
1856 : SWIGRUNTIME PyTypeObject*
1857 285 : SwigPyPacked_TypeOnce(void) {
1858 285 : static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1859 285 : static PyTypeObject swigpypacked_type;
1860 285 : static int type_init = 0;
1861 285 : if (!type_init) {
1862 285 : const PyTypeObject tmp = {
1863 : #if PY_VERSION_HEX>=0x03000000
1864 : PyVarObject_HEAD_INIT(NULL, 0)
1865 : #else
1866 : PyObject_HEAD_INIT(NULL)
1867 : 0, /* ob_size */
1868 : #endif
1869 : "SwigPyPacked", /* tp_name */
1870 : sizeof(SwigPyPacked), /* tp_basicsize */
1871 : 0, /* tp_itemsize */
1872 : (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
1873 : 0, /* tp_print */
1874 : (getattrfunc)0, /* tp_getattr */
1875 : (setattrfunc)0, /* tp_setattr */
1876 : #if PY_VERSION_HEX>=0x03000000
1877 : 0, /* tp_reserved in 3.0.1 */
1878 : #else
1879 : (cmpfunc)SwigPyPacked_compare, /* tp_compare */
1880 : #endif
1881 : (reprfunc)SwigPyPacked_repr, /* tp_repr */
1882 : 0, /* tp_as_number */
1883 : 0, /* tp_as_sequence */
1884 : 0, /* tp_as_mapping */
1885 : (hashfunc)0, /* tp_hash */
1886 : (ternaryfunc)0, /* tp_call */
1887 : (reprfunc)SwigPyPacked_str, /* tp_str */
1888 : PyObject_GenericGetAttr, /* tp_getattro */
1889 : 0, /* tp_setattro */
1890 : 0, /* tp_as_buffer */
1891 : Py_TPFLAGS_DEFAULT, /* tp_flags */
1892 : swigpacked_doc, /* tp_doc */
1893 : 0, /* tp_traverse */
1894 : 0, /* tp_clear */
1895 : 0, /* tp_richcompare */
1896 : 0, /* tp_weaklistoffset */
1897 : 0, /* tp_iter */
1898 : 0, /* tp_iternext */
1899 : 0, /* tp_methods */
1900 : 0, /* tp_members */
1901 : 0, /* tp_getset */
1902 : 0, /* tp_base */
1903 : 0, /* tp_dict */
1904 : 0, /* tp_descr_get */
1905 : 0, /* tp_descr_set */
1906 : 0, /* tp_dictoffset */
1907 : 0, /* tp_init */
1908 : 0, /* tp_alloc */
1909 : 0, /* tp_new */
1910 : 0, /* tp_free */
1911 : 0, /* tp_is_gc */
1912 : 0, /* tp_bases */
1913 : 0, /* tp_mro */
1914 : 0, /* tp_cache */
1915 : 0, /* tp_subclasses */
1916 : 0, /* tp_weaklist */
1917 : 0, /* tp_del */
1918 : 0, /* tp_version_tag */
1919 : #if PY_VERSION_HEX >= 0x03040000
1920 : 0, /* tp_finalize */
1921 : #endif
1922 : #ifdef COUNT_ALLOCS
1923 : 0, /* tp_allocs */
1924 : 0, /* tp_frees */
1925 : 0, /* tp_maxalloc */
1926 : 0, /* tp_prev */
1927 : 0 /* tp_next */
1928 : #endif
1929 : };
1930 285 : swigpypacked_type = tmp;
1931 285 : type_init = 1;
1932 285 : if (PyType_Ready(&swigpypacked_type) < 0)
1933 0 : return NULL;
1934 : }
1935 : return &swigpypacked_type;
1936 : }
1937 :
1938 : SWIGRUNTIME PyObject *
1939 0 : SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
1940 : {
1941 0 : SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
1942 0 : if (sobj) {
1943 0 : void *pack = malloc(size);
1944 0 : if (pack) {
1945 0 : memcpy(pack, ptr, size);
1946 0 : sobj->pack = pack;
1947 0 : sobj->ty = ty;
1948 0 : sobj->size = size;
1949 : } else {
1950 0 : PyObject_DEL((PyObject *) sobj);
1951 0 : sobj = 0;
1952 : }
1953 : }
1954 0 : return (PyObject *) sobj;
1955 : }
1956 :
1957 : SWIGRUNTIME swig_type_info *
1958 : SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
1959 : {
1960 : if (SwigPyPacked_Check(obj)) {
1961 : SwigPyPacked *sobj = (SwigPyPacked *)obj;
1962 : if (sobj->size != size) return 0;
1963 : memcpy(ptr, sobj->pack, size);
1964 : return sobj->ty;
1965 : } else {
1966 : return 0;
1967 : }
1968 : }
1969 :
1970 : /* -----------------------------------------------------------------------------
1971 : * pointers/data manipulation
1972 : * ----------------------------------------------------------------------------- */
1973 :
1974 : static PyObject *Swig_This_global = NULL;
1975 :
1976 : SWIGRUNTIME PyObject *
1977 29672 : SWIG_This(void)
1978 : {
1979 29672 : if (Swig_This_global == NULL)
1980 285 : Swig_This_global = SWIG_Python_str_FromChar("this");
1981 29672 : return Swig_This_global;
1982 : }
1983 :
1984 : /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
1985 :
1986 : /* TODO: I don't know how to implement the fast getset in Python 3 right now */
1987 : #if PY_VERSION_HEX>=0x03000000
1988 : #define SWIG_PYTHON_SLOW_GETSET_THIS
1989 : #endif
1990 :
1991 : SWIGRUNTIME SwigPyObject *
1992 38469 : SWIG_Python_GetSwigThis(PyObject *pyobj)
1993 : {
1994 38471 : PyObject *obj;
1995 :
1996 38471 : if (SwigPyObject_Check(pyobj))
1997 : return (SwigPyObject *) pyobj;
1998 :
1999 : #ifdef SWIGPYTHON_BUILTIN
2000 : (void)obj;
2001 : # ifdef PyWeakref_CheckProxy
2002 : if (PyWeakref_CheckProxy(pyobj)) {
2003 : pyobj = PyWeakref_GET_OBJECT(pyobj);
2004 : if (pyobj && SwigPyObject_Check(pyobj))
2005 : return (SwigPyObject*) pyobj;
2006 : }
2007 : # endif
2008 : return NULL;
2009 : #else
2010 :
2011 26447 : obj = 0;
2012 :
2013 : #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2014 : if (PyInstance_Check(pyobj)) {
2015 : obj = _PyInstance_Lookup(pyobj, SWIG_This());
2016 : } else {
2017 : PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2018 : if (dictptr != NULL) {
2019 : PyObject *dict = *dictptr;
2020 : obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2021 : } else {
2022 : #ifdef PyWeakref_CheckProxy
2023 : if (PyWeakref_CheckProxy(pyobj)) {
2024 : PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2025 : return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2026 : }
2027 : #endif
2028 : obj = PyObject_GetAttr(pyobj,SWIG_This());
2029 : if (obj) {
2030 : Py_DECREF(obj);
2031 : } else {
2032 : if (PyErr_Occurred()) PyErr_Clear();
2033 : return 0;
2034 : }
2035 : }
2036 : }
2037 : #else
2038 26447 : obj = PyObject_GetAttr(pyobj,SWIG_This());
2039 26447 : if (obj) {
2040 23505 : Py_DECREF(obj);
2041 : } else {
2042 2942 : if (PyErr_Occurred()) PyErr_Clear();
2043 2942 : return 0;
2044 : }
2045 : #endif
2046 23505 : if (obj && !SwigPyObject_Check(obj)) {
2047 : /* a PyObject is called 'this', try to get the 'real this'
2048 : SwigPyObject from it */
2049 : return SWIG_Python_GetSwigThis(obj);
2050 : }
2051 : return (SwigPyObject *)obj;
2052 : #endif
2053 : }
2054 :
2055 : /* Acquire a pointer value */
2056 :
2057 : SWIGRUNTIME int
2058 : SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2059 : if (own == SWIG_POINTER_OWN) {
2060 : SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
2061 : if (sobj) {
2062 : int oldown = sobj->own;
2063 : sobj->own = own;
2064 : return oldown;
2065 : }
2066 : }
2067 : return 0;
2068 : }
2069 :
2070 : /* Convert a pointer value */
2071 :
2072 : SWIGRUNTIME int
2073 35619 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2074 35619 : int res;
2075 35619 : SwigPyObject *sobj;
2076 35619 : int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2077 :
2078 35619 : if (!obj)
2079 : return SWIG_ERROR;
2080 35619 : if (obj == Py_None && !implicit_conv) {
2081 90 : if (ptr)
2082 90 : *ptr = 0;
2083 180 : return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
2084 : }
2085 :
2086 35529 : res = SWIG_ERROR;
2087 :
2088 35529 : sobj = SWIG_Python_GetSwigThis(obj);
2089 35529 : if (own)
2090 0 : *own = 0;
2091 35529 : while (sobj) {
2092 35527 : void *vptr = sobj->ptr;
2093 35527 : if (ty) {
2094 35527 : swig_type_info *to = sobj->ty;
2095 35527 : if (to == ty) {
2096 : /* no type cast needed */
2097 35527 : if (ptr) *ptr = vptr;
2098 : break;
2099 : } else {
2100 0 : swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2101 0 : if (!tc) {
2102 0 : sobj = (SwigPyObject *)sobj->next;
2103 : } else {
2104 0 : if (ptr) {
2105 0 : int newmemory = 0;
2106 0 : *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2107 0 : if (newmemory == SWIG_CAST_NEW_MEMORY) {
2108 0 : assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2109 0 : if (own)
2110 0 : *own = *own | SWIG_CAST_NEW_MEMORY;
2111 : }
2112 : }
2113 : break;
2114 : }
2115 : }
2116 : } else {
2117 0 : if (ptr) *ptr = vptr;
2118 : break;
2119 : }
2120 : }
2121 35529 : if (sobj) {
2122 35527 : if (own)
2123 0 : *own = *own | sobj->own;
2124 35527 : if (flags & SWIG_POINTER_DISOWN) {
2125 12024 : sobj->own = 0;
2126 : }
2127 : res = SWIG_OK;
2128 : } else {
2129 2 : if (implicit_conv) {
2130 0 : SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2131 0 : if (data && !data->implicitconv) {
2132 0 : PyObject *klass = data->klass;
2133 0 : if (klass) {
2134 0 : PyObject *impconv;
2135 0 : data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2136 0 : impconv = SWIG_Python_CallFunctor(klass, obj);
2137 0 : data->implicitconv = 0;
2138 0 : if (PyErr_Occurred()) {
2139 0 : PyErr_Clear();
2140 0 : impconv = 0;
2141 : }
2142 0 : if (impconv) {
2143 0 : SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2144 0 : if (iobj) {
2145 0 : void *vptr;
2146 0 : res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2147 0 : if (SWIG_IsOK(res)) {
2148 0 : if (ptr) {
2149 0 : *ptr = vptr;
2150 : /* transfer the ownership to 'ptr' */
2151 0 : iobj->own = 0;
2152 0 : res = SWIG_AddCast(res);
2153 0 : res = SWIG_AddNewMask(res);
2154 : } else {
2155 : res = SWIG_AddCast(res);
2156 : }
2157 : }
2158 : }
2159 0 : Py_DECREF(impconv);
2160 : }
2161 : }
2162 : }
2163 0 : if (!SWIG_IsOK(res) && obj == Py_None) {
2164 0 : if (ptr)
2165 0 : *ptr = 0;
2166 0 : if (PyErr_Occurred())
2167 0 : PyErr_Clear();
2168 : res = SWIG_OK;
2169 : }
2170 : }
2171 : }
2172 : return res;
2173 : }
2174 :
2175 : /* Convert a function ptr value */
2176 :
2177 : SWIGRUNTIME int
2178 : SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2179 : if (!PyCFunction_Check(obj)) {
2180 : return SWIG_ConvertPtr(obj, ptr, ty, 0);
2181 : } else {
2182 : void *vptr = 0;
2183 : swig_cast_info *tc;
2184 :
2185 : /* here we get the method pointer for callbacks */
2186 : const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2187 : const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2188 : if (desc)
2189 : desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2190 : if (!desc)
2191 : return SWIG_ERROR;
2192 : tc = SWIG_TypeCheck(desc,ty);
2193 : if (tc) {
2194 : int newmemory = 0;
2195 : *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2196 : assert(!newmemory); /* newmemory handling not yet implemented */
2197 : } else {
2198 : return SWIG_ERROR;
2199 : }
2200 : return SWIG_OK;
2201 : }
2202 : }
2203 :
2204 : /* Convert a packed pointer value */
2205 :
2206 : SWIGRUNTIME int
2207 : SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2208 : swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2209 : if (!to) return SWIG_ERROR;
2210 : if (ty) {
2211 : if (to != ty) {
2212 : /* check type cast? */
2213 : swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2214 : if (!tc) return SWIG_ERROR;
2215 : }
2216 : }
2217 : return SWIG_OK;
2218 : }
2219 :
2220 : /* -----------------------------------------------------------------------------
2221 : * Create a new pointer object
2222 : * ----------------------------------------------------------------------------- */
2223 :
2224 : /*
2225 : Create a new instance object, without calling __init__, and set the
2226 : 'this' attribute.
2227 : */
2228 :
2229 : SWIGRUNTIME PyObject*
2230 : SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
2231 : {
2232 : PyObject *inst = 0;
2233 : PyObject *newraw = data->newraw;
2234 : if (newraw) {
2235 : inst = PyObject_Call(newraw, data->newargs, NULL);
2236 : if (inst) {
2237 : #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2238 : PyObject **dictptr = _PyObject_GetDictPtr(inst);
2239 : if (dictptr != NULL) {
2240 : PyObject *dict = *dictptr;
2241 : if (dict == NULL) {
2242 : dict = PyDict_New();
2243 : *dictptr = dict;
2244 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2245 : }
2246 : }
2247 : #else
2248 : PyObject *key = SWIG_This();
2249 : PyObject_SetAttr(inst, key, swig_this);
2250 : #endif
2251 : }
2252 : } else {
2253 : #if PY_VERSION_HEX >= 0x03000000
2254 : PyObject *empty_args = PyTuple_New(0);
2255 : if (empty_args) {
2256 : PyObject *empty_kwargs = PyDict_New();
2257 : if (empty_kwargs) {
2258 : inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs);
2259 : Py_DECREF(empty_kwargs);
2260 : if (inst) {
2261 : PyObject_SetAttr(inst, SWIG_This(), swig_this);
2262 : Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2263 : }
2264 : }
2265 : Py_DECREF(empty_args);
2266 : }
2267 : #else
2268 : PyObject *dict = PyDict_New();
2269 : if (dict) {
2270 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2271 : inst = PyInstance_NewRaw(data->newargs, dict);
2272 : Py_DECREF(dict);
2273 : }
2274 : #endif
2275 : }
2276 : return inst;
2277 : }
2278 :
2279 : SWIGRUNTIME void
2280 2940 : SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2281 : {
2282 2940 : PyObject *dict;
2283 : #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2284 : PyObject **dictptr = _PyObject_GetDictPtr(inst);
2285 : if (dictptr != NULL) {
2286 : dict = *dictptr;
2287 : if (dict == NULL) {
2288 : dict = PyDict_New();
2289 : *dictptr = dict;
2290 : }
2291 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2292 : return;
2293 : }
2294 : #endif
2295 2940 : dict = PyObject_GetAttrString(inst, "__dict__");
2296 2940 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2297 2940 : Py_DECREF(dict);
2298 2940 : }
2299 :
2300 :
2301 : SWIGINTERN PyObject *
2302 2940 : SWIG_Python_InitShadowInstance(PyObject *args) {
2303 2940 : PyObject *obj[2];
2304 2940 : if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2305 : return NULL;
2306 : } else {
2307 2940 : SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2308 2940 : if (sthis) {
2309 0 : SwigPyObject_append((PyObject*) sthis, obj[1]);
2310 : } else {
2311 2940 : SWIG_Python_SetSwigThis(obj[0], obj[1]);
2312 : }
2313 2940 : return SWIG_Py_Void();
2314 : }
2315 : }
2316 :
2317 : /* Create a new pointer object */
2318 :
2319 : SWIGRUNTIME PyObject *
2320 9661 : SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2321 9661 : SwigPyClientData *clientdata;
2322 9661 : PyObject * robj;
2323 9661 : int own;
2324 :
2325 9661 : if (!ptr)
2326 20 : return SWIG_Py_Void();
2327 :
2328 9641 : clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2329 9641 : own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2330 9641 : if (clientdata && clientdata->pytype) {
2331 0 : SwigPyObject *newobj;
2332 0 : if (flags & SWIG_BUILTIN_TP_INIT) {
2333 0 : newobj = (SwigPyObject*) self;
2334 0 : if (newobj->ptr) {
2335 0 : PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2336 0 : while (newobj->next)
2337 : newobj = (SwigPyObject *) newobj->next;
2338 0 : newobj->next = next_self;
2339 0 : newobj = (SwigPyObject *)next_self;
2340 : #ifdef SWIGPYTHON_BUILTIN
2341 : newobj->dict = 0;
2342 : #endif
2343 : }
2344 : } else {
2345 0 : newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2346 : #ifdef SWIGPYTHON_BUILTIN
2347 : newobj->dict = 0;
2348 : #endif
2349 : }
2350 0 : if (newobj) {
2351 0 : newobj->ptr = ptr;
2352 0 : newobj->ty = type;
2353 0 : newobj->own = own;
2354 0 : newobj->next = 0;
2355 0 : return (PyObject*) newobj;
2356 : }
2357 0 : return SWIG_Py_Void();
2358 : }
2359 :
2360 9641 : assert(!(flags & SWIG_BUILTIN_TP_INIT));
2361 :
2362 9641 : robj = SwigPyObject_New(ptr, type, own);
2363 9641 : if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2364 6703 : PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2365 6703 : Py_DECREF(robj);
2366 : robj = inst;
2367 : }
2368 : return robj;
2369 : }
2370 :
2371 : /* Create a new packed object */
2372 :
2373 : SWIGRUNTIMEINLINE PyObject *
2374 0 : SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2375 0 : return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2376 : }
2377 :
2378 : /* -----------------------------------------------------------------------------*
2379 : * Get type list
2380 : * -----------------------------------------------------------------------------*/
2381 :
2382 : #ifdef SWIG_LINK_RUNTIME
2383 : void *SWIG_ReturnGlobalTypeList(void *);
2384 : #endif
2385 :
2386 : SWIGRUNTIME swig_module_info *
2387 : SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
2388 : static void *type_pointer = (void *)0;
2389 : /* first check if module already created */
2390 : if (!type_pointer) {
2391 : #ifdef SWIG_LINK_RUNTIME
2392 : type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2393 : #else
2394 : type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2395 : if (PyErr_Occurred()) {
2396 : PyErr_Clear();
2397 : type_pointer = (void *)0;
2398 : }
2399 : #endif
2400 : }
2401 : return (swig_module_info *) type_pointer;
2402 : }
2403 :
2404 : SWIGRUNTIME void
2405 0 : SWIG_Python_DestroyModule(PyObject *obj)
2406 : {
2407 0 : swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2408 0 : swig_type_info **types = swig_module->types;
2409 0 : size_t i;
2410 0 : for (i =0; i < swig_module->size; ++i) {
2411 0 : swig_type_info *ty = types[i];
2412 0 : if (ty->owndata) {
2413 0 : SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
2414 0 : if (data) SwigPyClientData_Del(data);
2415 : }
2416 : }
2417 0 : Py_DECREF(SWIG_This());
2418 0 : Swig_This_global = NULL;
2419 0 : }
2420 :
2421 : SWIGRUNTIME void
2422 0 : SWIG_Python_SetModule(swig_module_info *swig_module) {
2423 : #if PY_VERSION_HEX >= 0x03000000
2424 : /* Add a dummy module object into sys.modules */
2425 0 : PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
2426 : #else
2427 : static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2428 : PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2429 : #endif
2430 0 : PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2431 0 : if (pointer && module) {
2432 0 : PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2433 : } else {
2434 0 : Py_XDECREF(pointer);
2435 : }
2436 0 : }
2437 :
2438 : /* The python cached type query */
2439 : SWIGRUNTIME PyObject *
2440 296 : SWIG_Python_TypeCache(void) {
2441 296 : static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2442 296 : return cache;
2443 : }
2444 :
2445 : SWIGRUNTIME swig_type_info *
2446 11 : SWIG_Python_TypeQuery(const char *type)
2447 : {
2448 11 : PyObject *cache = SWIG_Python_TypeCache();
2449 11 : PyObject *key = SWIG_Python_str_FromChar(type);
2450 11 : PyObject *obj = PyDict_GetItem(cache, key);
2451 11 : swig_type_info *descriptor;
2452 11 : if (obj) {
2453 0 : descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2454 : } else {
2455 11 : swig_module_info *swig_module = SWIG_GetModule(0);
2456 11 : descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2457 11 : if (descriptor) {
2458 11 : obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2459 11 : PyDict_SetItem(cache, key, obj);
2460 11 : Py_DECREF(obj);
2461 : }
2462 : }
2463 11 : Py_DECREF(key);
2464 11 : return descriptor;
2465 : }
2466 :
2467 : /*
2468 : For backward compatibility only
2469 : */
2470 : #define SWIG_POINTER_EXCEPTION 0
2471 : #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2472 : #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2473 :
2474 : SWIGRUNTIME int
2475 : SWIG_Python_AddErrMesg(const char* mesg, int infront)
2476 : {
2477 : if (PyErr_Occurred()) {
2478 : PyObject *type = 0;
2479 : PyObject *value = 0;
2480 : PyObject *traceback = 0;
2481 : PyErr_Fetch(&type, &value, &traceback);
2482 : if (value) {
2483 : PyObject *old_str = PyObject_Str(value);
2484 : const char *tmp = SWIG_Python_str_AsChar(old_str);
2485 : const char *errmesg = tmp ? tmp : "Invalid error message";
2486 : Py_XINCREF(type);
2487 : PyErr_Clear();
2488 : if (infront) {
2489 : PyErr_Format(type, "%s %s", mesg, errmesg);
2490 : } else {
2491 : PyErr_Format(type, "%s %s", errmesg, mesg);
2492 : }
2493 : SWIG_Python_str_DelForPy3(tmp);
2494 : Py_DECREF(old_str);
2495 : }
2496 : return 1;
2497 : } else {
2498 : return 0;
2499 : }
2500 : }
2501 :
2502 : SWIGRUNTIME int
2503 : SWIG_Python_ArgFail(int argnum)
2504 : {
2505 : if (PyErr_Occurred()) {
2506 : /* add information about failing argument */
2507 : char mesg[256];
2508 : PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2509 : return SWIG_Python_AddErrMesg(mesg, 1);
2510 : } else {
2511 : return 0;
2512 : }
2513 : }
2514 :
2515 : SWIGRUNTIMEINLINE const char *
2516 : SwigPyObject_GetDesc(PyObject *self)
2517 : {
2518 : SwigPyObject *v = (SwigPyObject *)self;
2519 : swig_type_info *ty = v ? v->ty : 0;
2520 : return ty ? ty->str : "";
2521 : }
2522 :
2523 : SWIGRUNTIME void
2524 : SWIG_Python_TypeError(const char *type, PyObject *obj)
2525 : {
2526 : if (type) {
2527 : #if defined(SWIG_COBJECT_TYPES)
2528 : if (obj && SwigPyObject_Check(obj)) {
2529 : const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2530 : if (otype) {
2531 : PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2532 : type, otype);
2533 : return;
2534 : }
2535 : } else
2536 : #endif
2537 : {
2538 : const char *otype = (obj ? obj->ob_type->tp_name : 0);
2539 : if (otype) {
2540 : PyObject *str = PyObject_Str(obj);
2541 : const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2542 : if (cstr) {
2543 : PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2544 : type, otype, cstr);
2545 : SWIG_Python_str_DelForPy3(cstr);
2546 : } else {
2547 : PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2548 : type, otype);
2549 : }
2550 : Py_XDECREF(str);
2551 : return;
2552 : }
2553 : }
2554 : PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2555 : } else {
2556 : PyErr_Format(PyExc_TypeError, "unexpected type is received");
2557 : }
2558 : }
2559 :
2560 :
2561 : /* Convert a pointer value, signal an exception on a type mismatch */
2562 : SWIGRUNTIME void *
2563 : SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2564 : void *result;
2565 : if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2566 : PyErr_Clear();
2567 : #if SWIG_POINTER_EXCEPTION
2568 : if (flags) {
2569 : SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2570 : SWIG_Python_ArgFail(argnum);
2571 : }
2572 : #endif
2573 : }
2574 : return result;
2575 : }
2576 :
2577 : #ifdef SWIGPYTHON_BUILTIN
2578 : SWIGRUNTIME int
2579 : SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2580 : PyTypeObject *tp = obj->ob_type;
2581 : PyObject *descr;
2582 : PyObject *encoded_name;
2583 : descrsetfunc f;
2584 : int res = -1;
2585 :
2586 : # ifdef Py_USING_UNICODE
2587 : if (PyString_Check(name)) {
2588 : name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2589 : if (!name)
2590 : return -1;
2591 : } else if (!PyUnicode_Check(name))
2592 : # else
2593 : if (!PyString_Check(name))
2594 : # endif
2595 : {
2596 : PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2597 : return -1;
2598 : } else {
2599 : Py_INCREF(name);
2600 : }
2601 :
2602 : if (!tp->tp_dict) {
2603 : if (PyType_Ready(tp) < 0)
2604 : goto done;
2605 : }
2606 :
2607 : descr = _PyType_Lookup(tp, name);
2608 : f = NULL;
2609 : if (descr != NULL)
2610 : f = descr->ob_type->tp_descr_set;
2611 : if (!f) {
2612 : if (PyString_Check(name)) {
2613 : encoded_name = name;
2614 : Py_INCREF(name);
2615 : } else {
2616 : encoded_name = PyUnicode_AsUTF8String(name);
2617 : if (!encoded_name)
2618 : return -1;
2619 : }
2620 : PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2621 : Py_DECREF(encoded_name);
2622 : } else {
2623 : res = f(descr, obj, value);
2624 : }
2625 :
2626 : done:
2627 : Py_DECREF(name);
2628 : return res;
2629 : }
2630 : #endif
2631 :
2632 :
2633 : #ifdef __cplusplus
2634 : }
2635 : #endif
2636 :
2637 :
2638 :
2639 : #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2640 :
2641 : #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2642 :
2643 :
2644 :
2645 : #ifdef __cplusplus
2646 : extern "C" {
2647 : #endif
2648 :
2649 : /* Method creation and docstring support functions */
2650 :
2651 : SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name);
2652 : SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
2653 : SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
2654 :
2655 : #ifdef __cplusplus
2656 : }
2657 : #endif
2658 :
2659 :
2660 : #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
2661 :
2662 :
2663 : /* -------- TYPES TABLE (BEGIN) -------- */
2664 :
2665 : #define SWIGTYPE_p_OGRCoordinateTransformationOptions swig_types[0]
2666 : #define SWIGTYPE_p_OSRAreaOfUse swig_types[1]
2667 : #define SWIGTYPE_p_OSRCRSInfo swig_types[2]
2668 : #define SWIGTYPE_p_OSRCoordinateTransformationShadow swig_types[3]
2669 : #define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[4]
2670 : #define SWIGTYPE_p_char swig_types[5]
2671 : #define SWIGTYPE_p_double swig_types[6]
2672 : #define SWIGTYPE_p_int swig_types[7]
2673 : #define SWIGTYPE_p_long swig_types[8]
2674 : #define SWIGTYPE_p_p_char swig_types[9]
2675 : #define SWIGTYPE_p_p_double swig_types[10]
2676 : #define SWIGTYPE_p_p_int swig_types[11]
2677 : #define SWIGTYPE_p_p_p_OSRCRSInfo swig_types[12]
2678 : #define SWIGTYPE_p_p_p_OSRSpatialReferenceShadow swig_types[13]
2679 : static swig_type_info *swig_types[15];
2680 : static swig_module_info swig_module = {swig_types, 14, 0, 0, 0, 0};
2681 : #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2682 : #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2683 :
2684 : /* -------- TYPES TABLE (END) -------- */
2685 :
2686 : #ifdef SWIG_TypeQuery
2687 : # undef SWIG_TypeQuery
2688 : #endif
2689 : #define SWIG_TypeQuery SWIG_Python_TypeQuery
2690 :
2691 : /*-----------------------------------------------
2692 : @(target):= _osr.so
2693 : ------------------------------------------------*/
2694 : #if PY_VERSION_HEX >= 0x03000000
2695 : # define SWIG_init PyInit__osr
2696 :
2697 : #else
2698 : # define SWIG_init init_osr
2699 :
2700 : #endif
2701 : #define SWIG_name "_osr"
2702 :
2703 : #define SWIGVERSION 0x040001
2704 : #define SWIG_VERSION SWIGVERSION
2705 :
2706 :
2707 : #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
2708 : #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
2709 :
2710 :
2711 : #include <stdexcept>
2712 :
2713 :
2714 : namespace swig {
2715 : class SwigPtr_PyObject {
2716 : protected:
2717 : PyObject *_obj;
2718 :
2719 : public:
2720 : SwigPtr_PyObject() :_obj(0)
2721 : {
2722 : }
2723 :
2724 : SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
2725 : {
2726 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2727 : Py_XINCREF(_obj);
2728 : SWIG_PYTHON_THREAD_END_BLOCK;
2729 : }
2730 :
2731 : SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
2732 : {
2733 : if (initial_ref) {
2734 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2735 : Py_XINCREF(_obj);
2736 : SWIG_PYTHON_THREAD_END_BLOCK;
2737 : }
2738 : }
2739 :
2740 : SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
2741 : {
2742 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2743 : Py_XINCREF(item._obj);
2744 : Py_XDECREF(_obj);
2745 : _obj = item._obj;
2746 : SWIG_PYTHON_THREAD_END_BLOCK;
2747 : return *this;
2748 : }
2749 :
2750 : ~SwigPtr_PyObject()
2751 : {
2752 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
2753 : Py_XDECREF(_obj);
2754 : SWIG_PYTHON_THREAD_END_BLOCK;
2755 : }
2756 :
2757 : operator PyObject *() const
2758 : {
2759 : return _obj;
2760 : }
2761 :
2762 : PyObject *operator->() const
2763 : {
2764 : return _obj;
2765 : }
2766 : };
2767 : }
2768 :
2769 :
2770 : namespace swig {
2771 : struct SwigVar_PyObject : SwigPtr_PyObject {
2772 : SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
2773 :
2774 : SwigVar_PyObject & operator = (PyObject* obj)
2775 : {
2776 : Py_XDECREF(_obj);
2777 : _obj = obj;
2778 : return *this;
2779 : }
2780 : };
2781 : }
2782 :
2783 :
2784 : SWIGINTERN swig_type_info*
2785 68 : SWIG_pchar_descriptor(void)
2786 : {
2787 68 : static int init = 0;
2788 68 : static swig_type_info* info = 0;
2789 68 : if (!init) {
2790 11 : info = SWIG_TypeQuery("_p_char");
2791 11 : init = 1;
2792 : }
2793 68 : return info;
2794 : }
2795 :
2796 :
2797 : SWIGINTERNINLINE PyObject *
2798 60855 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
2799 : {
2800 60855 : if (carray) {
2801 60809 : if (size > INT_MAX) {
2802 0 : swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
2803 0 : return pchar_descriptor ?
2804 0 : SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
2805 : } else {
2806 : #if PY_VERSION_HEX >= 0x03000000
2807 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
2808 : return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
2809 : #else
2810 60809 : return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
2811 : #endif
2812 : #else
2813 : return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
2814 : #endif
2815 : }
2816 : } else {
2817 46 : return SWIG_Py_Void();
2818 : }
2819 : }
2820 :
2821 :
2822 : SWIGINTERNINLINE PyObject *
2823 60855 : SWIG_FromCharPtr(const char *cptr)
2824 : {
2825 14115 : return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
2826 : }
2827 :
2828 :
2829 : #define SWIG_From_double PyFloat_FromDouble
2830 :
2831 :
2832 : SWIGINTERNINLINE PyObject*
2833 27704 : SWIG_From_int (int value)
2834 : {
2835 27704 : return PyInt_FromLong((long) value);
2836 : }
2837 :
2838 :
2839 : typedef char retStringAndCPLFree;
2840 :
2841 :
2842 : #include <iostream>
2843 : using namespace std;
2844 :
2845 : #define CPL_SUPRESS_CPLUSPLUS
2846 :
2847 : #include "cpl_string.h"
2848 : #include "cpl_conv.h"
2849 :
2850 : #include "ogr_srs_api.h"
2851 :
2852 : #ifdef DEBUG
2853 : typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
2854 : typedef struct OGRCoordinateTransformationHS OSRCoordinateTransformationShadow;
2855 : typedef struct OGRCoordinateTransformationHS OGRCoordinateTransformationShadow;
2856 : #else
2857 : typedef void OSRSpatialReferenceShadow;
2858 : typedef void OSRCoordinateTransformationShadow;
2859 : #endif
2860 :
2861 :
2862 : #define MODULE_NAME "osr"
2863 :
2864 :
2865 : #include "cpl_string.h"
2866 : #include "cpl_conv.h"
2867 :
2868 : static int bUseExceptions=0;
2869 : static int bUserHasSpecifiedIfUsingExceptions = FALSE;
2870 : static thread_local int bUseExceptionsLocal = -1;
2871 :
2872 33682 : struct PythonBindingErrorHandlerContext
2873 : {
2874 : std::string osInitialMsg{};
2875 : std::string osFailureMsg{};
2876 : CPLErrorNum nLastCode = CPLE_None;
2877 : bool bMemoryError = false;
2878 : };
2879 :
2880 : static void CPL_STDCALL
2881 36 : PythonBindingErrorHandler(CPLErr eclass, CPLErrorNum err_no, const char *msg )
2882 : {
2883 36 : PythonBindingErrorHandlerContext* ctxt = static_cast<
2884 36 : PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
2885 :
2886 : /*
2887 : ** Generally we want to suppress error reporting if we have exceptions
2888 : ** enabled as the error message will be in the exception thrown in
2889 : ** Python.
2890 : */
2891 :
2892 : /* If the error class is CE_Fatal, we want to have a message issued
2893 : because the CPL support code does an abort() before any exception
2894 : can be generated */
2895 36 : if (eclass == CE_Fatal ) {
2896 0 : CPLCallPreviousHandler(eclass, err_no, msg );
2897 : }
2898 :
2899 : /*
2900 : ** We do not want to interfere with non-failure messages since
2901 : ** they won't be translated into exceptions.
2902 : */
2903 36 : else if (eclass != CE_Failure ) {
2904 7 : CPLCallPreviousHandler(eclass, err_no, msg );
2905 : }
2906 : else {
2907 29 : ctxt->nLastCode = err_no;
2908 29 : try
2909 : {
2910 29 : if( ctxt->osFailureMsg.empty() ) {
2911 29 : ctxt->osFailureMsg = msg;
2912 29 : ctxt->osInitialMsg = ctxt->osFailureMsg;
2913 : } else {
2914 0 : if( ctxt->osFailureMsg.size() < 10000 ) {
2915 0 : std::string osTmp(msg);
2916 0 : osTmp += "\nMay be caused by: ";
2917 0 : osTmp += ctxt->osFailureMsg;
2918 0 : ctxt->osFailureMsg = std::move(osTmp);
2919 0 : ctxt->osInitialMsg = ctxt->osFailureMsg;
2920 : }
2921 : else
2922 : {
2923 0 : std::string osTmp(msg);
2924 0 : osTmp += "\n[...]\nMay be caused by: ";
2925 0 : osTmp += ctxt->osInitialMsg;
2926 0 : ctxt->osFailureMsg = std::move(osTmp);
2927 : }
2928 : }
2929 : }
2930 0 : catch( const std::exception& )
2931 : {
2932 0 : ctxt->bMemoryError = true;
2933 : }
2934 : }
2935 36 : }
2936 :
2937 :
2938 :
2939 :
2940 : static
2941 117380 : int GetUseExceptions() {
2942 74740 : return bUseExceptionsLocal >= 0 ? bUseExceptionsLocal : bUseExceptions;
2943 : }
2944 :
2945 13487 : static int _GetExceptionsLocal()
2946 : {
2947 13487 : return bUseExceptionsLocal;
2948 : }
2949 :
2950 26974 : static void _SetExceptionsLocal(int bVal)
2951 : {
2952 26974 : bUseExceptionsLocal = bVal;
2953 : }
2954 :
2955 : static
2956 32 : void _UseExceptions() {
2957 32 : CPLErrorReset();
2958 32 : bUserHasSpecifiedIfUsingExceptions = TRUE;
2959 32 : if( !bUseExceptions )
2960 : {
2961 26 : bUseExceptions = 1;
2962 : }
2963 : }
2964 :
2965 : static
2966 5 : void _DontUseExceptions() {
2967 5 : CPLErrorReset();
2968 5 : bUserHasSpecifiedIfUsingExceptions = TRUE;
2969 5 : if( bUseExceptions )
2970 : {
2971 0 : bUseExceptions = 0;
2972 : }
2973 : }
2974 :
2975 2772 : static int _UserHasSpecifiedIfUsingExceptions()
2976 : {
2977 256 : return bUserHasSpecifiedIfUsingExceptions || bUseExceptionsLocal >= 0;
2978 : }
2979 :
2980 :
2981 :
2982 : #include <limits.h>
2983 : #if !defined(SWIG_NO_LLONG_MAX)
2984 : # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
2985 : # define LLONG_MAX __LONG_LONG_MAX__
2986 : # define LLONG_MIN (-LLONG_MAX - 1LL)
2987 : # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
2988 : # endif
2989 : #endif
2990 :
2991 :
2992 : SWIGINTERN int
2993 1254 : SWIG_AsVal_double (PyObject *obj, double *val)
2994 : {
2995 1254 : int res = SWIG_TypeError;
2996 1254 : if (PyFloat_Check(obj)) {
2997 751 : if (val) *val = PyFloat_AsDouble(obj);
2998 751 : return SWIG_OK;
2999 : #if PY_VERSION_HEX < 0x03000000
3000 : } else if (PyInt_Check(obj)) {
3001 : if (val) *val = (double) PyInt_AsLong(obj);
3002 : return SWIG_OK;
3003 : #endif
3004 503 : } else if (PyLong_Check(obj)) {
3005 503 : double v = PyLong_AsDouble(obj);
3006 503 : if (!PyErr_Occurred()) {
3007 503 : if (val) *val = v;
3008 503 : return SWIG_OK;
3009 : } else {
3010 0 : PyErr_Clear();
3011 : }
3012 : }
3013 : #ifdef SWIG_PYTHON_CAST_MODE
3014 : {
3015 : int dispatch = 0;
3016 : double d = PyFloat_AsDouble(obj);
3017 : if (!PyErr_Occurred()) {
3018 : if (val) *val = d;
3019 : return SWIG_AddCast(SWIG_OK);
3020 : } else {
3021 : PyErr_Clear();
3022 : }
3023 : if (!dispatch) {
3024 : long v = PyLong_AsLong(obj);
3025 : if (!PyErr_Occurred()) {
3026 : if (val) *val = v;
3027 : return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3028 : } else {
3029 : PyErr_Clear();
3030 : }
3031 : }
3032 : }
3033 : #endif
3034 : return res;
3035 : }
3036 :
3037 :
3038 : #include <float.h>
3039 :
3040 :
3041 : #include <math.h>
3042 :
3043 :
3044 : SWIGINTERNINLINE int
3045 : SWIG_CanCastAsInteger(double *d, double min, double max) {
3046 : double x = *d;
3047 : if ((min <= x && x <= max)) {
3048 : double fx = floor(x);
3049 : double cx = ceil(x);
3050 : double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3051 : if ((errno == EDOM) || (errno == ERANGE)) {
3052 : errno = 0;
3053 : } else {
3054 : double summ, reps, diff;
3055 : if (rd < x) {
3056 : diff = x - rd;
3057 : } else if (rd > x) {
3058 : diff = rd - x;
3059 : } else {
3060 : return 1;
3061 : }
3062 : summ = rd + x;
3063 : reps = diff/summ;
3064 : if (reps < 8*DBL_EPSILON) {
3065 : *d = rd;
3066 : return 1;
3067 : }
3068 : }
3069 : }
3070 : return 0;
3071 : }
3072 :
3073 :
3074 : SWIGINTERN int
3075 28629 : SWIG_AsVal_long (PyObject *obj, long* val)
3076 : {
3077 : #if PY_VERSION_HEX < 0x03000000
3078 : if (PyInt_Check(obj)) {
3079 : if (val) *val = PyInt_AsLong(obj);
3080 : return SWIG_OK;
3081 : } else
3082 : #endif
3083 28629 : if (PyLong_Check(obj)) {
3084 28629 : long v = PyLong_AsLong(obj);
3085 28629 : if (!PyErr_Occurred()) {
3086 28629 : if (val) *val = v;
3087 28629 : return SWIG_OK;
3088 : } else {
3089 0 : PyErr_Clear();
3090 0 : return SWIG_OverflowError;
3091 : }
3092 : }
3093 : #ifdef SWIG_PYTHON_CAST_MODE
3094 : {
3095 : int dispatch = 0;
3096 : long v = PyInt_AsLong(obj);
3097 : if (!PyErr_Occurred()) {
3098 : if (val) *val = v;
3099 : return SWIG_AddCast(SWIG_OK);
3100 : } else {
3101 : PyErr_Clear();
3102 : }
3103 : if (!dispatch) {
3104 : double d;
3105 : int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3106 : if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3107 : if (val) *val = (long)(d);
3108 : return res;
3109 : }
3110 : }
3111 : }
3112 : #endif
3113 : return SWIG_TypeError;
3114 : }
3115 :
3116 :
3117 : SWIGINTERN int
3118 28623 : SWIG_AsVal_int (PyObject * obj, int *val)
3119 : {
3120 28623 : long v;
3121 57246 : int res = SWIG_AsVal_long (obj, &v);
3122 28623 : if (SWIG_IsOK(res)) {
3123 28623 : if ((v < INT_MIN || v > INT_MAX)) {
3124 : return SWIG_OverflowError;
3125 : } else {
3126 28623 : if (val) *val = static_cast< int >(v);
3127 : }
3128 : }
3129 : return res;
3130 : }
3131 :
3132 :
3133 : /* Completely unrelated: just to avoid Coverity warnings */
3134 :
3135 : static int bReturnSame = 1;
3136 :
3137 0 : void NeverCallMePlease() {
3138 0 : bReturnSame = 0;
3139 0 : }
3140 :
3141 : /* Some SWIG code generates dead code, which Coverity warns about */
3142 129837 : template<class T> static T ReturnSame(T x)
3143 : {
3144 1688 : if( bReturnSame )
3145 : return x;
3146 : return 0;
3147 : }
3148 :
3149 33682 : static void pushErrorHandler()
3150 : {
3151 33682 : CPLErrorReset();
3152 33682 : PythonBindingErrorHandlerContext* ctxt = new PythonBindingErrorHandlerContext();
3153 33682 : CPLPushErrorHandlerEx(PythonBindingErrorHandler, ctxt);
3154 33682 : }
3155 :
3156 33682 : static void popErrorHandler()
3157 : {
3158 33682 : PythonBindingErrorHandlerContext* ctxt = static_cast<
3159 33682 : PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
3160 33682 : CPLPopErrorHandler();
3161 33682 : if( ctxt->bMemoryError )
3162 : {
3163 0 : CPLErrorSetState(
3164 : CE_Failure, CPLE_OutOfMemory, "Out of memory");
3165 : }
3166 33682 : else if( !ctxt->osFailureMsg.empty() )
3167 : {
3168 29 : CPLErrorSetState(
3169 29 : CPLGetLastErrorType() == CE_Failure ? CE_Failure: CE_Warning,
3170 : ctxt->nLastCode, ctxt->osFailureMsg.c_str());
3171 : }
3172 33682 : delete ctxt;
3173 33682 : }
3174 :
3175 :
3176 :
3177 :
3178 : /* Return a PyObject* from a NULL terminated C String */
3179 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr) CPL_UNUSED;
3180 1776 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
3181 : {
3182 1776 : const unsigned char* pszIter = (const unsigned char*) pszStr;
3183 664692 : while(*pszIter != 0)
3184 : {
3185 662919 : if (*pszIter > 127)
3186 : {
3187 3 : PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "strict");
3188 3 : if (pyObj != NULL && !PyErr_Occurred())
3189 : return pyObj;
3190 0 : PyErr_Clear();
3191 0 : return PyBytes_FromString(pszStr);
3192 : }
3193 662916 : pszIter ++;
3194 : }
3195 1773 : return PyUnicode_FromString(pszStr);
3196 : }
3197 :
3198 : /* Return a NULL terminated c String from a PyObject */
3199 : /* Result must be freed with GDALPythonFreeCStr */
3200 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
3201 46 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
3202 : {
3203 46 : *pbToFree = 0;
3204 46 : if (PyUnicode_Check(pyObject))
3205 : {
3206 46 : char *pszStr;
3207 46 : char *pszNewStr;
3208 46 : Py_ssize_t nLen;
3209 46 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
3210 46 : if( pyUTF8Str == NULL )
3211 : return NULL;
3212 46 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
3213 46 : pszNewStr = (char *) malloc(nLen+1);
3214 46 : if( pszNewStr == NULL )
3215 : {
3216 0 : CPLError(CE_Failure, CPLE_OutOfMemory, "Failed to allocate %llu bytes",
3217 : (unsigned long long)(nLen + 1));
3218 0 : Py_XDECREF(pyUTF8Str);
3219 0 : return NULL;
3220 : }
3221 46 : memcpy(pszNewStr, pszStr, nLen+1);
3222 46 : Py_XDECREF(pyUTF8Str);
3223 46 : *pbToFree = 1;
3224 46 : return pszNewStr;
3225 : }
3226 0 : else if( PyBytes_Check(pyObject) )
3227 : {
3228 0 : char* ret = PyBytes_AsString(pyObject);
3229 :
3230 : // Check if there are \0 bytes inside the string
3231 0 : const Py_ssize_t size = PyBytes_Size(pyObject);
3232 0 : for( Py_ssize_t i = 0; i < size; i++ )
3233 : {
3234 0 : if( ret[i] == 0 )
3235 : {
3236 0 : CPLError(CE_Failure, CPLE_AppDefined,
3237 : "bytes object cast as string contains a zero-byte.");
3238 0 : return NULL;
3239 : }
3240 : }
3241 :
3242 : return ret;
3243 : }
3244 : else
3245 : {
3246 0 : CPLError(CE_Failure, CPLE_AppDefined,
3247 : "Passed object is neither of type string nor bytes");
3248 0 : return NULL;
3249 : }
3250 : }
3251 :
3252 : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree) CPL_UNUSED;
3253 0 : static char * GDALPythonPathToCStr(PyObject* pyObject, int* pbToFree)
3254 : {
3255 0 : PyObject* os = PyImport_ImportModule("os");
3256 0 : if (os == NULL)
3257 : {
3258 : return NULL;
3259 : }
3260 :
3261 0 : PyObject* pathLike = PyObject_GetAttrString(os, "PathLike");
3262 0 : if (pathLike == NULL)
3263 : {
3264 0 : Py_DECREF(os);
3265 0 : return NULL;
3266 : }
3267 :
3268 0 : if (!PyObject_IsInstance(pyObject, pathLike))
3269 : {
3270 0 : Py_DECREF(pathLike);
3271 0 : Py_DECREF(os);
3272 0 : return NULL;
3273 : }
3274 :
3275 0 : PyObject* str = PyObject_Str(pyObject);
3276 0 : char* ret = NULL;
3277 0 : if (str != NULL)
3278 : {
3279 0 : ret = GDALPythonObjectToCStr(str, pbToFree);
3280 0 : Py_DECREF(str);
3281 : }
3282 :
3283 0 : Py_DECREF(pathLike);
3284 0 : Py_DECREF(os);
3285 :
3286 : return ret;
3287 : }
3288 :
3289 :
3290 : static void GDALPythonFreeCStr(void* ptr, int bToFree) CPL_UNUSED;
3291 46 : static void GDALPythonFreeCStr(void* ptr, int bToFree)
3292 : {
3293 46 : if (bToFree)
3294 46 : free(ptr);
3295 : }
3296 :
3297 :
3298 :
3299 0 : OGRErr GetWellKnownGeogCSAsWKT( const char *name, char **argout ) {
3300 0 : OGRSpatialReferenceH srs = OSRNewSpatialReference("");
3301 0 : OGRErr rcode = OSRSetWellKnownGeogCS( srs, name );
3302 0 : if( rcode == OGRERR_NONE )
3303 0 : rcode = OSRExportToWkt ( srs, argout );
3304 0 : OSRRelease( srs );
3305 0 : return rcode;
3306 : }
3307 :
3308 :
3309 : SWIGINTERN int
3310 1997 : SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3311 : {
3312 : #if PY_VERSION_HEX>=0x03000000
3313 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3314 : if (PyBytes_Check(obj))
3315 : #else
3316 1997 : if (PyUnicode_Check(obj))
3317 : #endif
3318 : #else
3319 : if (PyString_Check(obj))
3320 : #endif
3321 : {
3322 1929 : char *cstr; Py_ssize_t len;
3323 1929 : int ret = SWIG_OK;
3324 : #if PY_VERSION_HEX>=0x03000000
3325 : #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3326 1929 : if (!alloc && cptr) {
3327 : /* We can't allow converting without allocation, since the internal
3328 : representation of string in Python 3 is UCS-2/UCS-4 but we require
3329 : a UTF-8 representation.
3330 : TODO(bhy) More detailed explanation */
3331 : return SWIG_RuntimeError;
3332 : }
3333 1929 : obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
3334 1929 : if (!obj)
3335 : return SWIG_TypeError;
3336 1929 : if (alloc)
3337 1929 : *alloc = SWIG_NEWOBJ;
3338 : #endif
3339 1929 : PyBytes_AsStringAndSize(obj, &cstr, &len);
3340 : #else
3341 : PyString_AsStringAndSize(obj, &cstr, &len);
3342 : #endif
3343 1929 : if (cptr) {
3344 1929 : if (alloc) {
3345 1929 : if (*alloc == SWIG_NEWOBJ) {
3346 1929 : *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3347 1929 : *alloc = SWIG_NEWOBJ;
3348 : } else {
3349 0 : *cptr = cstr;
3350 0 : *alloc = SWIG_OLDOBJ;
3351 : }
3352 : } else {
3353 : #if PY_VERSION_HEX>=0x03000000
3354 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3355 : *cptr = PyBytes_AsString(obj);
3356 : #else
3357 : assert(0); /* Should never reach here with Unicode strings in Python 3 */
3358 : #endif
3359 : #else
3360 : *cptr = SWIG_Python_str_AsChar(obj);
3361 : if (!*cptr)
3362 : ret = SWIG_TypeError;
3363 : #endif
3364 : }
3365 : }
3366 1929 : if (psize) *psize = len + 1;
3367 : #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3368 1929 : Py_XDECREF(obj);
3369 : #endif
3370 1929 : return ret;
3371 : } else {
3372 : #if defined(SWIG_PYTHON_2_UNICODE)
3373 : #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3374 : #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3375 : #endif
3376 : #if PY_VERSION_HEX<0x03000000
3377 : if (PyUnicode_Check(obj)) {
3378 : char *cstr; Py_ssize_t len;
3379 : if (!alloc && cptr) {
3380 : return SWIG_RuntimeError;
3381 : }
3382 : obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
3383 : if (!obj)
3384 : return SWIG_TypeError;
3385 : if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3386 : if (cptr) {
3387 : if (alloc) *alloc = SWIG_NEWOBJ;
3388 : *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3389 : }
3390 : if (psize) *psize = len + 1;
3391 :
3392 : Py_XDECREF(obj);
3393 : return SWIG_OK;
3394 : } else {
3395 : Py_XDECREF(obj);
3396 : }
3397 : }
3398 : #endif
3399 : #endif
3400 :
3401 68 : swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3402 68 : if (pchar_descriptor) {
3403 68 : void* vptr = 0;
3404 68 : if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3405 68 : if (cptr) *cptr = (char *) vptr;
3406 68 : if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3407 68 : if (alloc) *alloc = SWIG_OLDOBJ;
3408 68 : return SWIG_OK;
3409 : }
3410 : }
3411 : }
3412 : return SWIG_TypeError;
3413 : }
3414 :
3415 :
3416 :
3417 :
3418 :
3419 :
3420 : #include "ogr_core.h"
3421 : static char const *
3422 40 : OGRErrMessages( int rc ) {
3423 40 : switch( rc ) {
3424 : case OGRERR_NONE:
3425 : return "OGR Error: None";
3426 0 : case OGRERR_NOT_ENOUGH_DATA:
3427 0 : return "OGR Error: Not enough data to deserialize";
3428 0 : case OGRERR_NOT_ENOUGH_MEMORY:
3429 0 : return "OGR Error: Not enough memory";
3430 0 : case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
3431 0 : return "OGR Error: Unsupported geometry type";
3432 0 : case OGRERR_UNSUPPORTED_OPERATION:
3433 0 : return "OGR Error: Unsupported operation";
3434 38 : case OGRERR_CORRUPT_DATA:
3435 38 : return "OGR Error: Corrupt data";
3436 1 : case OGRERR_FAILURE:
3437 1 : return "OGR Error: General Error";
3438 1 : case OGRERR_UNSUPPORTED_SRS:
3439 1 : return "OGR Error: Unsupported SRS";
3440 0 : case OGRERR_INVALID_HANDLE:
3441 0 : return "OGR Error: Invalid handle";
3442 0 : case OGRERR_NON_EXISTING_FEATURE:
3443 0 : return "OGR Error: Non existing feature";
3444 0 : default:
3445 0 : return "OGR Error: Unknown";
3446 : }
3447 : }
3448 :
3449 :
3450 12 : OGRErr GetUserInputAsWKT( const char *name, char **argout ) {
3451 12 : OGRSpatialReferenceH srs = OSRNewSpatialReference("");
3452 12 : OGRErr rcode = OSRSetFromUserInput( srs, name );
3453 12 : if( rcode == OGRERR_NONE )
3454 12 : rcode = OSRExportToWkt ( srs, argout );
3455 12 : OSRRelease( srs );
3456 12 : return rcode;
3457 : }
3458 :
3459 :
3460 : typedef struct
3461 : {
3462 : double west_lon_degree;
3463 : double south_lat_degree;
3464 : double east_lon_degree;
3465 : double north_lat_degree;
3466 : char* name;
3467 : } OSRAreaOfUse;
3468 :
3469 1 : SWIGINTERN OSRAreaOfUse *new_OSRAreaOfUse(double west_lon_degree,double south_lat_degree,double east_lon_degree,double north_lat_degree,char *name){
3470 0 : OSRAreaOfUse *self = (OSRAreaOfUse*) CPLMalloc( sizeof( OSRAreaOfUse ) );
3471 1 : self->west_lon_degree = west_lon_degree;
3472 1 : self->south_lat_degree = south_lat_degree;
3473 1 : self->east_lon_degree = east_lon_degree;
3474 1 : self->north_lat_degree = north_lat_degree;
3475 0 : self->name = name ? CPLStrdup(name) : NULL;
3476 1 : return self;
3477 : }
3478 1 : SWIGINTERN void delete_OSRAreaOfUse(OSRAreaOfUse *self){
3479 1 : CPLFree( self->name );
3480 1 : CPLFree( self );
3481 : }
3482 :
3483 :
3484 1 : double OSRAreaOfUse_west_lon_degree_get( OSRAreaOfUse *area ) {
3485 1 : return area->west_lon_degree;
3486 : }
3487 :
3488 1 : double OSRAreaOfUse_south_lat_degree_get( OSRAreaOfUse *area ) {
3489 1 : return area->south_lat_degree;
3490 : }
3491 :
3492 1 : double OSRAreaOfUse_east_lon_degree_get( OSRAreaOfUse *area ) {
3493 1 : return area->east_lon_degree;
3494 : }
3495 :
3496 1 : double OSRAreaOfUse_north_lat_degree_get( OSRAreaOfUse *area ) {
3497 1 : return area->north_lat_degree;
3498 : }
3499 :
3500 1 : const char* OSRAreaOfUse_name_get( OSRAreaOfUse *area ) {
3501 1 : return area->name;
3502 : }
3503 :
3504 :
3505 2789 : SWIGINTERN OSRSpatialReferenceShadow *new_OSRSpatialReferenceShadow(char const *wkt=""){
3506 2789 : return (OSRSpatialReferenceShadow*) OSRNewSpatialReference(wkt);
3507 : }
3508 5263 : SWIGINTERN void delete_OSRSpatialReferenceShadow(OSRSpatialReferenceShadow *self){
3509 5263 : OSRRelease( self );
3510 : }
3511 4 : SWIGINTERN retStringAndCPLFree *OSRSpatialReferenceShadow___str__(OSRSpatialReferenceShadow *self){
3512 4 : char *buf = 0;
3513 4 : OSRExportToPrettyWkt( self, &buf, 0 );
3514 4 : return buf;
3515 : }
3516 47 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetName(OSRSpatialReferenceShadow *self){
3517 47 : return OSRGetName( self );
3518 : }
3519 1 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetCelestialBodyName(OSRSpatialReferenceShadow *self){
3520 1 : return OSRGetCelestialBodyName( self );
3521 : }
3522 :
3523 : /************************************************************************/
3524 : /* CSLFromPySequence() */
3525 : /************************************************************************/
3526 141 : static char **CSLFromPySequence( PyObject *pySeq, int *pbErr )
3527 :
3528 : {
3529 141 : *pbErr = FALSE;
3530 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
3531 141 : if ( ! PySequence_Check(pySeq) || PyUnicode_Check(pySeq) ) {
3532 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
3533 0 : *pbErr = TRUE;
3534 0 : return NULL;
3535 : }
3536 :
3537 141 : Py_ssize_t size = PySequence_Size(pySeq);
3538 141 : if( size > (Py_ssize_t)(INT_MAX - 1) ) {
3539 0 : PyErr_SetString(PyExc_TypeError, "too big sequence");
3540 0 : *pbErr = TRUE;
3541 0 : return NULL;
3542 : }
3543 141 : if( size == 0 ) {
3544 : return NULL;
3545 : }
3546 141 : char** papszRet = (char**) VSICalloc((int)size + 1, sizeof(char*));
3547 141 : if( !papszRet ) {
3548 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
3549 0 : *pbErr = TRUE;
3550 0 : return NULL;
3551 : }
3552 401 : for (int i = 0; i < (int)size; i++) {
3553 260 : PyObject* pyObj = PySequence_GetItem(pySeq,i);
3554 260 : if (PyUnicode_Check(pyObj))
3555 : {
3556 260 : char *pszStr;
3557 260 : Py_ssize_t nLen;
3558 260 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
3559 260 : if( !pyUTF8Str )
3560 : {
3561 0 : Py_DECREF(pyObj);
3562 0 : PyErr_SetString(PyExc_TypeError,"invalid Unicode sequence");
3563 0 : CSLDestroy(papszRet);
3564 0 : *pbErr = TRUE;
3565 0 : return NULL;
3566 : }
3567 260 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
3568 260 : papszRet[i] = VSIStrdup(pszStr);
3569 517 : Py_XDECREF(pyUTF8Str);
3570 : }
3571 0 : else if (PyBytes_Check(pyObj))
3572 0 : papszRet[i] = VSIStrdup(PyBytes_AsString(pyObj));
3573 : else
3574 : {
3575 0 : Py_DECREF(pyObj);
3576 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
3577 0 : CSLDestroy(papszRet);
3578 0 : *pbErr = TRUE;
3579 0 : return NULL;
3580 : }
3581 260 : Py_DECREF(pyObj);
3582 260 : if( !papszRet[i] )
3583 : {
3584 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
3585 0 : CSLDestroy(papszRet);
3586 0 : *pbErr = TRUE;
3587 0 : return NULL;
3588 : }
3589 : }
3590 : return papszRet;
3591 : }
3592 :
3593 :
3594 8 : static char **CSLFromPyMapping( PyObject *pyObj, int *pbErr )
3595 :
3596 : {
3597 8 : char** retCSL = NULL;
3598 8 : Py_ssize_t size = PyMapping_Length( pyObj );
3599 8 : if ( size > 0 && size == (int)size) {
3600 4 : PyObject *item_list = PyMapping_Items( pyObj );
3601 26 : for( int i=0; i<(int)size; i++ ) {
3602 22 : PyObject *it = PySequence_GetItem( item_list, i );
3603 :
3604 22 : PyObject *k, *v;
3605 22 : if ( ! PyArg_ParseTuple( it, "OO", &k, &v ) ) {
3606 0 : Py_DECREF(it);
3607 0 : Py_DECREF(item_list);
3608 0 : PyErr_SetString(PyExc_TypeError,"Cannot retrieve key/value");
3609 0 : CSLDestroy(retCSL);
3610 0 : *pbErr = TRUE;
3611 0 : return NULL;
3612 : }
3613 :
3614 22 : PyObject* kStr = PyObject_Str(k);
3615 22 : if( PyErr_Occurred() )
3616 : {
3617 0 : Py_DECREF(it);
3618 0 : Py_DECREF(item_list);
3619 0 : CSLDestroy(retCSL);
3620 0 : *pbErr = TRUE;
3621 0 : return NULL;
3622 : }
3623 :
3624 22 : PyObject* vStr;
3625 22 : if( PyBytes_Check(v) )
3626 : {
3627 0 : vStr = v;
3628 0 : Py_INCREF(vStr);
3629 : }
3630 : else
3631 : {
3632 22 : vStr = PyObject_Str(v);
3633 22 : if( PyErr_Occurred() )
3634 : {
3635 0 : Py_DECREF(it);
3636 0 : Py_DECREF(kStr);
3637 0 : Py_DECREF(item_list);
3638 0 : CSLDestroy(retCSL);
3639 0 : *pbErr = TRUE;
3640 0 : return NULL;
3641 : }
3642 : }
3643 :
3644 22 : int bFreeK, bFreeV;
3645 22 : char* pszK = GDALPythonObjectToCStr(kStr, &bFreeK);
3646 22 : char* pszV = GDALPythonObjectToCStr(vStr, &bFreeV);
3647 22 : if( pszK == NULL || pszV == NULL )
3648 : {
3649 0 : GDALPythonFreeCStr(pszK, bFreeK);
3650 0 : GDALPythonFreeCStr(pszV, bFreeV);
3651 0 : Py_DECREF(kStr);
3652 0 : Py_DECREF(vStr);
3653 0 : Py_DECREF(it);
3654 0 : Py_DECREF(item_list);
3655 0 : PyErr_SetString(PyExc_TypeError,"Cannot get key/value as string");
3656 0 : CSLDestroy(retCSL);
3657 0 : *pbErr = TRUE;
3658 0 : return NULL;
3659 : }
3660 22 : retCSL = CSLAddNameValue( retCSL, pszK, pszV );
3661 :
3662 22 : GDALPythonFreeCStr(pszK, bFreeK);
3663 22 : GDALPythonFreeCStr(pszV, bFreeV);
3664 22 : Py_DECREF(kStr);
3665 22 : Py_DECREF(vStr);
3666 22 : Py_DECREF(it);
3667 : }
3668 4 : Py_DECREF(item_list);
3669 : }
3670 8 : *pbErr = FALSE;
3671 8 : return retCSL;
3672 : }
3673 :
3674 671 : SWIGINTERN int OSRSpatialReferenceShadow_IsSame(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs,char **options=NULL){
3675 671 : return OSRIsSameEx( self, rhs, options );
3676 : }
3677 0 : SWIGINTERN int OSRSpatialReferenceShadow_IsSameGeogCS(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
3678 0 : return OSRIsSameGeogCS( self, rhs );
3679 : }
3680 0 : SWIGINTERN int OSRSpatialReferenceShadow_IsSameVertCS(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
3681 0 : return OSRIsSameVertCS( self, rhs );
3682 : }
3683 225 : SWIGINTERN int OSRSpatialReferenceShadow_IsGeographic(OSRSpatialReferenceShadow *self){
3684 225 : return OSRIsGeographic(self);
3685 : }
3686 1 : SWIGINTERN int OSRSpatialReferenceShadow_IsDerivedGeographic(OSRSpatialReferenceShadow *self){
3687 1 : return OSRIsDerivedGeographic(self);
3688 : }
3689 437 : SWIGINTERN int OSRSpatialReferenceShadow_IsProjected(OSRSpatialReferenceShadow *self){
3690 437 : return OSRIsProjected(self);
3691 : }
3692 0 : SWIGINTERN int OSRSpatialReferenceShadow_IsDerivedProjected(OSRSpatialReferenceShadow *self){
3693 0 : return OSRIsDerivedProjected(self);
3694 : }
3695 5 : SWIGINTERN int OSRSpatialReferenceShadow_IsCompound(OSRSpatialReferenceShadow *self){
3696 5 : return OSRIsCompound(self);
3697 : }
3698 2 : SWIGINTERN int OSRSpatialReferenceShadow_IsGeocentric(OSRSpatialReferenceShadow *self){
3699 2 : return OSRIsGeocentric(self);
3700 : }
3701 4 : SWIGINTERN int OSRSpatialReferenceShadow_IsLocal(OSRSpatialReferenceShadow *self){
3702 4 : return OSRIsLocal(self);
3703 : }
3704 0 : SWIGINTERN int OSRSpatialReferenceShadow_IsVertical(OSRSpatialReferenceShadow *self){
3705 0 : return OSRIsVertical(self);
3706 : }
3707 0 : SWIGINTERN bool OSRSpatialReferenceShadow_IsDynamic(OSRSpatialReferenceShadow *self){
3708 0 : return OSRIsDynamic(self);
3709 : }
3710 :
3711 : SWIGINTERNINLINE PyObject*
3712 21 : SWIG_From_bool (bool value)
3713 : {
3714 21 : return PyBool_FromLong(value ? 1 : 0);
3715 : }
3716 :
3717 0 : SWIGINTERN bool OSRSpatialReferenceShadow_HasPointMotionOperation(OSRSpatialReferenceShadow *self){
3718 0 : return OSRHasPointMotionOperation(self);
3719 : }
3720 30 : SWIGINTERN double OSRSpatialReferenceShadow_GetCoordinateEpoch(OSRSpatialReferenceShadow *self){
3721 30 : return OSRGetCoordinateEpoch(self);
3722 : }
3723 31 : SWIGINTERN void OSRSpatialReferenceShadow_SetCoordinateEpoch(OSRSpatialReferenceShadow *self,double coordinateEpoch){
3724 31 : OSRSetCoordinateEpoch(self, coordinateEpoch);
3725 : }
3726 207 : SWIGINTERN int OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(OSRSpatialReferenceShadow *self){
3727 207 : return OSREPSGTreatsAsLatLong(self);
3728 : }
3729 214 : SWIGINTERN int OSRSpatialReferenceShadow_EPSGTreatsAsNorthingEasting(OSRSpatialReferenceShadow *self){
3730 214 : return OSREPSGTreatsAsNorthingEasting(self);
3731 : }
3732 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAuthority(OSRSpatialReferenceShadow *self,char const *pszTargetKey,char const *pszAuthority,int nCode){
3733 0 : return OSRSetAuthority( self, pszTargetKey, pszAuthority, nCode );
3734 : }
3735 37 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAttrValue(OSRSpatialReferenceShadow *self,char const *name,int child=0){
3736 37 : return OSRGetAttrValue( self, name, child );
3737 : }
3738 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAttrValue(OSRSpatialReferenceShadow *self,char const *name,char const *value){
3739 1 : return OSRSetAttrValue( self, name, value );
3740 : }
3741 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAngularUnits(OSRSpatialReferenceShadow *self,char const *name,double to_radians){
3742 0 : return OSRSetAngularUnits( self, name, to_radians );
3743 : }
3744 0 : SWIGINTERN double OSRSpatialReferenceShadow_GetAngularUnits(OSRSpatialReferenceShadow *self){
3745 : // Return code ignored.
3746 0 : return OSRGetAngularUnits( self, 0 );
3747 : }
3748 1 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAngularUnitsName(OSRSpatialReferenceShadow *self){
3749 1 : char *name = 0;
3750 1 : OSRGetAngularUnits( self, &name );
3751 : // This is really a const char* that is returned and shouldn't be freed
3752 1 : return (const char*)name;
3753 : }
3754 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTargetLinearUnits(OSRSpatialReferenceShadow *self,char const *target,char const *name,double to_meters){
3755 1 : return OSRSetTargetLinearUnits( self, target, name, to_meters );
3756 : }
3757 6 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLinearUnits(OSRSpatialReferenceShadow *self,char const *name,double to_meters){
3758 6 : return OSRSetLinearUnits( self, name, to_meters );
3759 : }
3760 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(OSRSpatialReferenceShadow *self,char const *name,double to_meters){
3761 1 : return OSRSetLinearUnitsAndUpdateParameters( self, name, to_meters );
3762 : }
3763 4 : SWIGINTERN double OSRSpatialReferenceShadow_GetTargetLinearUnits(OSRSpatialReferenceShadow *self,char const *target_key){
3764 : // Return code ignored.
3765 4 : return OSRGetTargetLinearUnits( self, target_key, 0 );
3766 : }
3767 230 : SWIGINTERN double OSRSpatialReferenceShadow_GetLinearUnits(OSRSpatialReferenceShadow *self){
3768 : // Return code ignored.
3769 230 : return OSRGetLinearUnits( self, 0 );
3770 : }
3771 24 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetLinearUnitsName(OSRSpatialReferenceShadow *self){
3772 24 : char *name = NULL;
3773 : // Return code ignored.
3774 24 : OSRGetLinearUnits( self, &name );
3775 24 : return (const char*)name;
3776 : }
3777 748 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAuthorityCode(OSRSpatialReferenceShadow *self,char const *target_key=NULL){
3778 748 : return OSRGetAuthorityCode( self, target_key );
3779 : }
3780 28 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAuthorityName(OSRSpatialReferenceShadow *self,char const *target_key=NULL){
3781 28 : return OSRGetAuthorityName( self, target_key );
3782 : }
3783 1 : SWIGINTERN OSRAreaOfUse *OSRSpatialReferenceShadow_GetAreaOfUse(OSRSpatialReferenceShadow *self){
3784 1 : OSRAreaOfUse* pArea = new_OSRAreaOfUse(0,0,0,0,NULL);
3785 1 : const char* name = NULL;
3786 1 : if( !OSRGetAreaOfUse(self,
3787 : &pArea->west_lon_degree,
3788 : &pArea->south_lat_degree,
3789 : &pArea->east_lon_degree,
3790 : &pArea->north_lat_degree,
3791 : &name) )
3792 : {
3793 0 : delete_OSRAreaOfUse(pArea);
3794 0 : return NULL;
3795 : }
3796 1 : pArea->name = name ? CPLStrdup(name) : NULL;
3797 1 : return pArea;
3798 : }
3799 6 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAxisName(OSRSpatialReferenceShadow *self,char const *target_key,int iAxis){
3800 6 : return OSRGetAxis( self, target_key, iAxis, NULL );
3801 : }
3802 6 : SWIGINTERN int OSRSpatialReferenceShadow_GetAxesCount(OSRSpatialReferenceShadow *self){
3803 6 : return OSRGetAxesCount(self);
3804 : }
3805 5 : SWIGINTERN OGRAxisOrientation OSRSpatialReferenceShadow_GetAxisOrientation(OSRSpatialReferenceShadow *self,char const *target_key,int iAxis){
3806 5 : OGRAxisOrientation orientation = OAO_Other;
3807 5 : OSRGetAxis( self, target_key, iAxis, &orientation );
3808 5 : return orientation;
3809 : }
3810 37 : SWIGINTERN OSRAxisMappingStrategy OSRSpatialReferenceShadow_GetAxisMappingStrategy(OSRSpatialReferenceShadow *self){
3811 37 : return OSRGetAxisMappingStrategy(self);
3812 : }
3813 553 : SWIGINTERN void OSRSpatialReferenceShadow_SetAxisMappingStrategy(OSRSpatialReferenceShadow *self,OSRAxisMappingStrategy strategy){
3814 553 : OSRSetAxisMappingStrategy(self, strategy);
3815 : }
3816 103 : SWIGINTERN void OSRSpatialReferenceShadow_GetDataAxisToSRSAxisMapping(OSRSpatialReferenceShadow *self,int *nLen,int const **pList){
3817 206 : *pList = OSRGetDataAxisToSRSAxisMapping(self, nLen);
3818 : }
3819 :
3820 : static int*
3821 15 : CreateCIntListFromSequence( PyObject* pySeq, int* pnSize ) {
3822 : /* check if is List */
3823 15 : if ( !PySequence_Check(pySeq) ) {
3824 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
3825 0 : *pnSize = -1;
3826 0 : return NULL;
3827 : }
3828 15 : Py_ssize_t size = PySequence_Size(pySeq);
3829 15 : if( size > (Py_ssize_t)INT_MAX ) {
3830 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
3831 0 : *pnSize = -1;
3832 0 : return NULL;
3833 : }
3834 15 : if( (size_t)size > SIZE_MAX / sizeof(int) ) {
3835 0 : PyErr_SetString(PyExc_RuntimeError, "too big sequence");
3836 0 : *pnSize = -1;
3837 0 : return NULL;
3838 : }
3839 15 : *pnSize = (int)size;
3840 15 : int* ret = (int*) malloc((*pnSize)*sizeof(int));
3841 15 : if( !ret ) {
3842 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
3843 0 : *pnSize = -1;
3844 0 : return NULL;
3845 : }
3846 47 : for( int i = 0; i<*pnSize; i++ ) {
3847 32 : PyObject *o = PySequence_GetItem(pySeq,i);
3848 32 : if ( !PyArg_Parse(o,"i",&ret[i]) ) {
3849 0 : PyErr_SetString(PyExc_TypeError, "not an integer");
3850 0 : Py_DECREF(o);
3851 0 : free(ret);
3852 0 : *pnSize = -1;
3853 0 : return NULL;
3854 : }
3855 32 : Py_DECREF(o);
3856 : }
3857 : return ret;
3858 : }
3859 :
3860 15 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetDataAxisToSRSAxisMapping(OSRSpatialReferenceShadow *self,int nList,int *pList){
3861 15 : return OSRSetDataAxisToSRSAxisMapping(self, nList, pList);
3862 : }
3863 15 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetUTM(OSRSpatialReferenceShadow *self,int zone,int north=1){
3864 15 : return OSRSetUTM( self, zone, north );
3865 : }
3866 6 : SWIGINTERN int OSRSpatialReferenceShadow_GetUTMZone(OSRSpatialReferenceShadow *self){
3867 : // Note: we will return south zones as negative since it is
3868 : // hard to return two values as the C API does.
3869 6 : int bNorth = FALSE;
3870 12 : int nZone = OSRGetUTMZone( self, &bNorth );
3871 6 : if( !bNorth )
3872 3 : nZone = -nZone;
3873 6 : return nZone;
3874 : }
3875 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetStatePlane(OSRSpatialReferenceShadow *self,int zone,int is_nad83=1,char const *unitsname="",double units=0.0){
3876 2 : return OSRSetStatePlaneWithUnits( self, zone, is_nad83, unitsname, units );
3877 : }
3878 5 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_AutoIdentifyEPSG(OSRSpatialReferenceShadow *self){
3879 5 : return OSRAutoIdentifyEPSG( self );
3880 : }
3881 5 : SWIGINTERN void OSRSpatialReferenceShadow_FindMatches(OSRSpatialReferenceShadow *self,char **options=NULL,OSRSpatialReferenceShadow ***matches=NULL,int *nvalues=NULL,int **confidence_values=NULL){
3882 10 : *matches = OSRFindMatches(self, options, nvalues, confidence_values);
3883 : }
3884 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjection(OSRSpatialReferenceShadow *self,char const *arg){
3885 0 : return OSRSetProjection( self, arg );
3886 : }
3887 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
3888 0 : return OSRSetProjParm( self, name, val );
3889 : }
3890 65 : SWIGINTERN double OSRSpatialReferenceShadow_GetProjParm(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
3891 : // Return code ignored.
3892 65 : return OSRGetProjParm( self, name, default_val, 0 );
3893 : }
3894 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetNormProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
3895 0 : return OSRSetNormProjParm( self, name, val );
3896 : }
3897 1 : SWIGINTERN double OSRSpatialReferenceShadow_GetNormProjParm(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
3898 : // Return code ignored.
3899 1 : return OSRGetNormProjParm( self, name, default_val, 0 );
3900 : }
3901 8 : SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMajor(OSRSpatialReferenceShadow *self){
3902 : // Return code ignored.
3903 8 : return OSRGetSemiMajor( self, 0 );
3904 : }
3905 4 : SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMinor(OSRSpatialReferenceShadow *self){
3906 : // Return code ignored.
3907 4 : return OSRGetSemiMinor( self, 0 );
3908 : }
3909 10 : SWIGINTERN double OSRSpatialReferenceShadow_GetInvFlattening(OSRSpatialReferenceShadow *self){
3910 : // Return code ignored.
3911 10 : return OSRGetInvFlattening( self, 0 );
3912 : }
3913 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetACEA(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3914 0 : return OSRSetACEA( self, stdp1, stdp2, clat, clong,
3915 : fe, fn );
3916 : }
3917 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAE(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3918 0 : return OSRSetAE( self, clat, clong,
3919 : fe, fn );
3920 : }
3921 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetBonne(OSRSpatialReferenceShadow *self,double stdp,double cm,double fe,double fn){
3922 0 : return OSRSetBonne( self, stdp, cm, fe, fn );
3923 : }
3924 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCEA(OSRSpatialReferenceShadow *self,double stdp1,double cm,double fe,double fn){
3925 0 : return OSRSetCEA( self, stdp1, cm,
3926 : fe, fn );
3927 : }
3928 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCS(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3929 0 : return OSRSetCS( self, clat, clong,
3930 : fe, fn );
3931 : }
3932 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEC(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3933 0 : return OSRSetEC( self, stdp1, stdp2, clat, clong,
3934 : fe, fn );
3935 : }
3936 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEckertIV(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3937 0 : return OSRSetEckertIV( self, cm, fe, fn);
3938 : }
3939 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEckertVI(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3940 0 : return OSRSetEckertVI( self, cm, fe, fn);
3941 : }
3942 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEquirectangular(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3943 0 : return OSRSetEquirectangular( self, clat, clong,
3944 : fe, fn );
3945 : }
3946 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEquirectangular2(OSRSpatialReferenceShadow *self,double clat,double clong,double pseudostdparallellat,double fe,double fn){
3947 3 : return OSRSetEquirectangular2( self, clat, clong,
3948 : pseudostdparallellat,
3949 : fe, fn );
3950 : }
3951 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(OSRSpatialReferenceShadow *self,double clat,double clong,double sc,double fe,double fn){
3952 0 : return OSRSetGaussSchreiberTMercator( self, clat, clong, sc, fe, fn );
3953 : }
3954 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGS(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3955 1 : return OSRSetGS( self, cm, fe, fn );
3956 : }
3957 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGH(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3958 0 : return OSRSetGH( self, cm, fe, fn );
3959 : }
3960 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetIGH(OSRSpatialReferenceShadow *self){
3961 0 : return OSRSetIGH( self );
3962 : }
3963 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGEOS(OSRSpatialReferenceShadow *self,double cm,double satelliteheight,double fe,double fn){
3964 0 : return OSRSetGEOS( self, cm, satelliteheight,
3965 : fe, fn );
3966 : }
3967 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGnomonic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3968 0 : return OSRSetGnomonic( self, clat, clong,
3969 : fe, fn );
3970 : }
3971 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetHOM(OSRSpatialReferenceShadow *self,double clat,double clong,double azimuth,double recttoskew,double scale,double fe,double fn){
3972 0 : return OSRSetHOM( self, clat, clong, azimuth, recttoskew,
3973 : scale, fe, fn );
3974 : }
3975 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetHOM2PNO(OSRSpatialReferenceShadow *self,double clat,double dfLat1,double dfLong1,double dfLat2,double dfLong2,double scale,double fe,double fn){
3976 0 : return OSRSetHOM2PNO( self, clat, dfLat1, dfLong1, dfLat2, dfLong2,
3977 : scale, fe, fn );
3978 : }
3979 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetKrovak(OSRSpatialReferenceShadow *self,double clat,double clong,double azimuth,double pseudostdparallellat,double scale,double fe,double fn){
3980 0 : return OSRSetKrovak( self, clat, clong,
3981 : azimuth, pseudostdparallellat,
3982 : scale, fe, fn );
3983 : }
3984 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLAEA(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3985 0 : return OSRSetLAEA( self, clat, clong,
3986 : fe, fn );
3987 : }
3988 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCC(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3989 1 : return OSRSetLCC( self, stdp1, stdp2, clat, clong,
3990 : fe, fn );
3991 : }
3992 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCC1SP(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
3993 0 : return OSRSetLCC1SP( self, clat, clong, scale,
3994 : fe, fn );
3995 : }
3996 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCCB(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3997 0 : return OSRSetLCCB( self, stdp1, stdp2, clat, clong,
3998 : fe, fn );
3999 : }
4000 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMC(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
4001 0 : return OSRSetMC( self, clat, clong,
4002 : fe, fn );
4003 : }
4004 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMercator(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4005 2 : return OSRSetMercator( self, clat, clong,
4006 : scale, fe, fn );
4007 : }
4008 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMercator2SP(OSRSpatialReferenceShadow *self,double stdp1,double clat,double clong,double fe,double fn){
4009 1 : return OSRSetMercator2SP( self, stdp1, clat, clong, fe, fn );
4010 : }
4011 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMollweide(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
4012 0 : return OSRSetMollweide( self, cm,
4013 : fe, fn );
4014 : }
4015 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetNZMG(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
4016 0 : return OSRSetNZMG( self, clat, clong,
4017 : fe, fn );
4018 : }
4019 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetOS(OSRSpatialReferenceShadow *self,double dfOriginLat,double dfCMeridian,double scale,double fe,double fn){
4020 0 : return OSRSetOS( self, dfOriginLat, dfCMeridian, scale,
4021 : fe, fn );
4022 : }
4023 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetOrthographic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
4024 1 : return OSRSetOrthographic( self, clat, clong,
4025 : fe, fn );
4026 : }
4027 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetPolyconic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
4028 0 : return OSRSetPolyconic( self, clat, clong,
4029 : fe, fn );
4030 : }
4031 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetPS(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4032 1 : return OSRSetPS( self, clat, clong, scale,
4033 : fe, fn );
4034 : }
4035 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetRobinson(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
4036 0 : return OSRSetRobinson( self, clong, fe, fn );
4037 : }
4038 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetSinusoidal(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
4039 1 : return OSRSetSinusoidal( self, clong, fe, fn );
4040 : }
4041 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetStereographic(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4042 0 : return OSRSetStereographic( self, clat, clong, scale,
4043 : fe, fn );
4044 : }
4045 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetSOC(OSRSpatialReferenceShadow *self,double latitudeoforigin,double cm,double fe,double fn){
4046 0 : return OSRSetSOC( self, latitudeoforigin, cm,
4047 : fe, fn );
4048 : }
4049 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTM(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4050 1 : return OSRSetTM( self, clat, clong, scale,
4051 : fe, fn );
4052 : }
4053 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMVariant(OSRSpatialReferenceShadow *self,char const *pszVariantName,double clat,double clong,double scale,double fe,double fn){
4054 0 : return OSRSetTMVariant( self, pszVariantName, clat, clong,
4055 : scale, fe, fn );
4056 : }
4057 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMG(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
4058 0 : return OSRSetTMG( self, clat, clong,
4059 : fe, fn );
4060 : }
4061 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMSO(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4062 0 : return OSRSetTMSO( self, clat, clong, scale,
4063 : fe, fn );
4064 : }
4065 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVDG(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
4066 0 : return OSRSetVDG( self, clong, fe, fn );
4067 : }
4068 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVerticalPerspective(OSRSpatialReferenceShadow *self,double topoOriginLat,double topoOriginLon,double topoOriginHeight,double viewPointHeight,double fe,double fn){
4069 1 : return OSRSetVerticalPerspective( self,
4070 : topoOriginLat, topoOriginLon, topoOriginHeight, viewPointHeight, fe, fn );
4071 : }
4072 70 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetWellKnownGeogCS(OSRSpatialReferenceShadow *self,char const *name){
4073 70 : return OSRSetWellKnownGeogCS( self, name );
4074 : }
4075 1216 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetFromUserInput(OSRSpatialReferenceShadow *self,char const *name,char **options=NULL){
4076 1216 : return OSRSetFromUserInputEx( self, name, options );
4077 : }
4078 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_CopyGeogCSFrom(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
4079 1 : return OSRCopyGeogCSFrom( self, rhs );
4080 : }
4081 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTOWGS84(OSRSpatialReferenceShadow *self,double p1,double p2,double p3,double p4=0.0,double p5=0.0,double p6=0.0,double p7=0.0){
4082 :
4083 3 : return OSRSetTOWGS84( self, p1, p2, p3, p4, p5, p6, p7 );
4084 : }
4085 4 : SWIGINTERN bool OSRSpatialReferenceShadow_HasTOWGS84(OSRSpatialReferenceShadow *self){
4086 4 : double ignored[7];
4087 8 : return OSRGetTOWGS84( self, ignored, 7 ) == OGRERR_NONE;
4088 : }
4089 :
4090 : static PyObject *
4091 214 : CreateTupleFromDoubleArray( const double *first, size_t size ) {
4092 214 : PyObject *out = PyTuple_New( size );
4093 1010 : for( unsigned int i=0; i<size; i++ ) {
4094 796 : PyObject *val = PyFloat_FromDouble( *first );
4095 796 : ++first;
4096 796 : PyTuple_SetItem( out, i, val );
4097 : }
4098 214 : return out;
4099 : }
4100 :
4101 4 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_GetTOWGS84(OSRSpatialReferenceShadow *self,double argout[7]){
4102 4 : return OSRGetTOWGS84( self, argout, 7 );
4103 : }
4104 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_AddGuessedTOWGS84(OSRSpatialReferenceShadow *self){
4105 2 : return OSRAddGuessedTOWGS84( self );
4106 : }
4107 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLocalCS(OSRSpatialReferenceShadow *self,char const *pszName){
4108 1 : return OSRSetLocalCS( self, pszName );
4109 : }
4110 17 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGeogCS(OSRSpatialReferenceShadow *self,char const *pszGeogName,char const *pszDatumName,char const *pszEllipsoidName,double dfSemiMajor,double dfInvFlattening,char const *pszPMName="Greenwich",double dfPMOffset=0.0,char const *pszUnits="degree",double dfConvertToRadians=0.0174532925199433){
4111 17 : return OSRSetGeogCS( self, pszGeogName, pszDatumName, pszEllipsoidName,
4112 : dfSemiMajor, dfInvFlattening,
4113 : pszPMName, dfPMOffset, pszUnits, dfConvertToRadians );
4114 : }
4115 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjCS(OSRSpatialReferenceShadow *self,char const *name="unnamed"){
4116 1 : return OSRSetProjCS( self, name );
4117 : }
4118 4 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGeocCS(OSRSpatialReferenceShadow *self,char const *name="unnamed"){
4119 4 : return OSRSetGeocCS( self, name );
4120 : }
4121 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVertCS(OSRSpatialReferenceShadow *self,char const *VertCSName="unnamed",char const *VertDatumName="unnamed",int VertDatumType=0){
4122 0 : return OSRSetVertCS( self, VertCSName, VertDatumName, VertDatumType );
4123 : }
4124 8 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCompoundCS(OSRSpatialReferenceShadow *self,char const *name,OSRSpatialReferenceShadow *horizcs,OSRSpatialReferenceShadow *vertcs){
4125 8 : return OSRSetCompoundCS( self, name, horizcs, vertcs );
4126 : }
4127 261 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromWkt(OSRSpatialReferenceShadow *self,char **ppszInput){
4128 261 : return OSRImportFromWkt( self, ppszInput );
4129 : }
4130 213 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromProj4(OSRSpatialReferenceShadow *self,char *ppszInput){
4131 213 : return OSRImportFromProj4( self, ppszInput );
4132 : }
4133 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromUrl(OSRSpatialReferenceShadow *self,char *url){
4134 3 : return OSRImportFromUrl( self, url );
4135 : }
4136 11 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromESRI(OSRSpatialReferenceShadow *self,char **ppszInput){
4137 11 : return OSRImportFromESRI( self, ppszInput );
4138 : }
4139 1013 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromEPSG(OSRSpatialReferenceShadow *self,int arg){
4140 1013 : return OSRImportFromEPSG(self, arg);
4141 : }
4142 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromEPSGA(OSRSpatialReferenceShadow *self,int arg){
4143 2 : return OSRImportFromEPSGA(self, arg);
4144 : }
4145 7 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromPCI(OSRSpatialReferenceShadow *self,char const *proj,char const *units="METRE",double argin[17]=0){
4146 7 : return OSRImportFromPCI( self, proj, units, argin );
4147 : }
4148 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromUSGS(OSRSpatialReferenceShadow *self,long proj_code,long zone=0,double argin[15]=0,long datum_code=0){
4149 2 : return OSRImportFromUSGS( self, proj_code, zone, argin, datum_code );
4150 : }
4151 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromXML(OSRSpatialReferenceShadow *self,char const *xmlString){
4152 1 : return OSRImportFromXML( self, xmlString );
4153 : }
4154 7 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromERM(OSRSpatialReferenceShadow *self,char const *proj,char const *datum,char const *units){
4155 7 : return OSRImportFromERM( self, proj, datum, units );
4156 : }
4157 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromMICoordSys(OSRSpatialReferenceShadow *self,char const *pszCoordSys){
4158 3 : return OSRImportFromMICoordSys( self, pszCoordSys );
4159 : }
4160 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromOzi(OSRSpatialReferenceShadow *self,char const *const *papszLines){
4161 3 : return OSRImportFromOzi( self, papszLines );
4162 : }
4163 4 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromCF1(OSRSpatialReferenceShadow *self,char **keyValues,char const *units=NULL){
4164 4 : return OSRImportFromCF1(self, keyValues, units);
4165 : }
4166 1300 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToWkt(OSRSpatialReferenceShadow *self,char **argout,char **options=NULL){
4167 1300 : return OSRExportToWktEx( self, argout, options );
4168 : }
4169 50 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPrettyWkt(OSRSpatialReferenceShadow *self,char **argout,int simplify=0){
4170 50 : return OSRExportToPrettyWkt( self, argout, simplify );
4171 : }
4172 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPROJJSON(OSRSpatialReferenceShadow *self,char **argout,char **options=NULL){
4173 2 : return OSRExportToPROJJSON( self, argout, options );
4174 : }
4175 308 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToProj4(OSRSpatialReferenceShadow *self,char **argout){
4176 308 : return OSRExportToProj4( self, argout );
4177 : }
4178 6 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPCI(OSRSpatialReferenceShadow *self,char **proj,char **units,double *params[17]){
4179 6 : return OSRExportToPCI( self, proj, units, params );
4180 : }
4181 :
4182 : #define SWIG_From_long PyInt_FromLong
4183 :
4184 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToUSGS(OSRSpatialReferenceShadow *self,long *code,long *zone,double *params[15],long *datum){
4185 2 : return OSRExportToUSGS( self, code, zone, params, datum );
4186 : }
4187 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToERM(OSRSpatialReferenceShadow *self,char **proj,char **datum,char **units){
4188 1 : char szProj[32] = {0}, szDatum[32] = {0}, szUnits[32] = {0};
4189 1 : OGRErr ret = OSRExportToERM( self, szProj, szDatum, szUnits );
4190 1 : *proj = CPLStrdup(szProj);
4191 1 : *datum = CPLStrdup(szDatum);
4192 1 : *units = CPLStrdup(szUnits);
4193 1 : return ret;
4194 : }
4195 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToXML(OSRSpatialReferenceShadow *self,char **argout,char const *dialect=""){
4196 2 : return OSRExportToXML( self, argout, dialect );
4197 : }
4198 5 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToMICoordSys(OSRSpatialReferenceShadow *self,char **argout){
4199 5 : return OSRExportToMICoordSys( self, argout );
4200 : }
4201 4 : SWIGINTERN char **OSRSpatialReferenceShadow_ExportToCF1(OSRSpatialReferenceShadow *self,char **options=NULL){
4202 4 : char** ret = NULL;
4203 4 : OSRExportToCF1(self, NULL, &ret, NULL, options);
4204 4 : return ret;
4205 : }
4206 :
4207 : /* Return a PyObject* from a C String */
4208 44 : static PyObject* GDALPythonObjectFromCStrAndSize(const char *pszStr, size_t nLen)
4209 : {
4210 44 : const unsigned char* pszIter = (const unsigned char*) pszStr;
4211 854 : for( size_t i = 0; i < nLen; ++i)
4212 : {
4213 810 : if (pszIter[i] > 127)
4214 : {
4215 0 : PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, nLen, "strict");
4216 0 : if (pyObj != NULL && !PyErr_Occurred())
4217 : return pyObj;
4218 0 : PyErr_Clear();
4219 0 : return PyBytes_FromStringAndSize(pszStr, nLen);
4220 : }
4221 : }
4222 44 : return PyUnicode_FromStringAndSize(pszStr, nLen);
4223 : }
4224 :
4225 :
4226 : static PyObject*
4227 4 : GetCSLStringAsPyDict( char **stringarray, bool bFreeCSL ) {
4228 4 : PyObject* dict = PyDict_New();
4229 4 : if ( stringarray != NULL ) {
4230 48 : for (char** iter = stringarray; *iter; ++iter ) {
4231 44 : const char* pszSep = strchr( *iter, '=' );
4232 44 : if ( pszSep != NULL) {
4233 44 : const char* keyptr = *iter;
4234 44 : const char* valptr = pszSep + 1;
4235 44 : PyObject *nm = GDALPythonObjectFromCStrAndSize( keyptr, (size_t)(pszSep - keyptr) );
4236 44 : PyObject *val = GDALPythonObjectFromCStr( valptr );
4237 44 : PyDict_SetItem(dict, nm, val );
4238 44 : Py_DECREF(nm);
4239 44 : Py_DECREF(val);
4240 : }
4241 : }
4242 : }
4243 4 : if( bFreeCSL )
4244 4 : CSLDestroy(stringarray);
4245 4 : return dict;
4246 : }
4247 :
4248 1 : SWIGINTERN retStringAndCPLFree *OSRSpatialReferenceShadow_ExportToCF1Units(OSRSpatialReferenceShadow *self,char **options=NULL){
4249 1 : char* units = NULL;
4250 1 : OSRExportToCF1(self, NULL, NULL, &units, options);
4251 1 : return units;
4252 : }
4253 16 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_CloneGeogCS(OSRSpatialReferenceShadow *self){
4254 16 : return (OSRSpatialReferenceShadow*) OSRCloneGeogCS(self);
4255 : }
4256 55 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_Clone(OSRSpatialReferenceShadow *self){
4257 55 : return (OSRSpatialReferenceShadow*) OSRClone(self);
4258 : }
4259 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_StripVertical(OSRSpatialReferenceShadow *self){
4260 1 : return OSRStripVertical(self);
4261 : }
4262 114 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_Validate(OSRSpatialReferenceShadow *self){
4263 114 : return OSRValidate(self);
4264 : }
4265 17 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphToESRI(OSRSpatialReferenceShadow *self){
4266 17 : return OSRMorphToESRI(self);
4267 : }
4268 19 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphFromESRI(OSRSpatialReferenceShadow *self){
4269 19 : return OSRMorphFromESRI(self);
4270 : }
4271 28 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_ConvertToOtherProjection(OSRSpatialReferenceShadow *self,char const *other_projection,char **options=NULL){
4272 28 : return (OSRSpatialReferenceShadow*)OSRConvertToOtherProjection(self, other_projection, options);
4273 : }
4274 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_PromoteTo3D(OSRSpatialReferenceShadow *self,char const *name=NULL){
4275 3 : return OSRPromoteTo3D(self, name);
4276 : }
4277 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_DemoteTo2D(OSRSpatialReferenceShadow *self,char const *name=NULL){
4278 1 : return OSRDemoteTo2D(self, name);
4279 : }
4280 11 : SWIGINTERN OGRCoordinateTransformationOptions *new_OGRCoordinateTransformationOptions(){
4281 11 : return OCTNewCoordinateTransformationOptions();
4282 : }
4283 11 : SWIGINTERN void delete_OGRCoordinateTransformationOptions(OGRCoordinateTransformationOptions *self){
4284 11 : OCTDestroyCoordinateTransformationOptions( self );
4285 : }
4286 5 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetAreaOfInterest(OGRCoordinateTransformationOptions *self,double westLongitudeDeg,double southLatitudeDeg,double eastLongitudeDeg,double northLatitudeDeg){
4287 5 : return OCTCoordinateTransformationOptionsSetAreaOfInterest(self,
4288 : westLongitudeDeg, southLatitudeDeg,
4289 5 : eastLongitudeDeg, northLatitudeDeg);
4290 : }
4291 :
4292 : SWIGINTERN int
4293 2 : SWIG_AsVal_bool (PyObject *obj, bool *val)
4294 : {
4295 2 : int r;
4296 2 : if (!PyBool_Check(obj))
4297 : return SWIG_ERROR;
4298 2 : r = PyObject_IsTrue(obj);
4299 2 : if (r == -1)
4300 : return SWIG_ERROR;
4301 2 : if (val) *val = r ? true : false;
4302 : return SWIG_OK;
4303 : }
4304 :
4305 8 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetOperation(OGRCoordinateTransformationOptions *self,char const *operation,bool inverseCT=false){
4306 16 : return OCTCoordinateTransformationOptionsSetOperation(self, operation, inverseCT);
4307 : }
4308 1 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetDesiredAccuracy(OGRCoordinateTransformationOptions *self,double accuracy){
4309 2 : return OCTCoordinateTransformationOptionsSetDesiredAccuracy(self, accuracy);
4310 : }
4311 1 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetBallparkAllowed(OGRCoordinateTransformationOptions *self,bool allowBallpark){
4312 2 : return OCTCoordinateTransformationOptionsSetBallparkAllowed(self, allowBallpark);
4313 : }
4314 0 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetOnlyBest(OGRCoordinateTransformationOptions *self,bool onlyBest){
4315 0 : return OCTCoordinateTransformationOptionsSetOnlyBest(self, onlyBest);
4316 : }
4317 : SWIGINTERN OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow__SWIG_0(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst){
4318 : return (OSRCoordinateTransformationShadow*) OCTNewCoordinateTransformation(src, dst);
4319 : }
4320 10 : SWIGINTERN OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow__SWIG_1(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst,OGRCoordinateTransformationOptions *options){
4321 10 : return (OSRCoordinateTransformationShadow*)
4322 10 : (options ? OCTNewCoordinateTransformationEx( src, dst, options ) : OCTNewCoordinateTransformation(src, dst));
4323 : }
4324 140 : SWIGINTERN void delete_OSRCoordinateTransformationShadow(OSRCoordinateTransformationShadow *self){
4325 140 : OCTDestroyCoordinateTransformation( self );
4326 : }
4327 1 : SWIGINTERN OSRCoordinateTransformationShadow *OSRCoordinateTransformationShadow_GetInverse(OSRCoordinateTransformationShadow *self){
4328 1 : return (OSRCoordinateTransformationShadow*) OCTGetInverse(self);
4329 : }
4330 1 : SWIGINTERN void OSRCoordinateTransformationShadow__TransformPoint3Double(OSRCoordinateTransformationShadow *self,double inout[3]){
4331 :
4332 :
4333 :
4334 1 : if (self == NULL)
4335 : return;
4336 1 : OCTTransform( self, 1, &inout[0], &inout[1], &inout[2] );
4337 : }
4338 1 : SWIGINTERN void OSRCoordinateTransformationShadow__TransformPoint4Double(OSRCoordinateTransformationShadow *self,double inout[4]){
4339 :
4340 :
4341 :
4342 :
4343 :
4344 1 : if (self == NULL)
4345 : return;
4346 1 : OCTTransform4D( self, 1, &inout[0], &inout[1], &inout[2], &inout[3], NULL );
4347 : }
4348 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(OSRCoordinateTransformationShadow *self,double argout[3],double x,double y,double z=0.0){
4349 : if (self == NULL)
4350 : return;
4351 : argout[0] = x;
4352 : argout[1] = y;
4353 : argout[2] = z;
4354 : OCTTransform( self, 1, &argout[0], &argout[1], &argout[2] );
4355 : }
4356 4 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(OSRCoordinateTransformationShadow *self,double argout[4],double x,double y,double z,double t){
4357 4 : if (self == NULL)
4358 : return;
4359 4 : argout[0] = x;
4360 4 : argout[1] = y;
4361 4 : argout[2] = z;
4362 4 : argout[3] = t;
4363 4 : OCTTransform4D( self, 1, &argout[0], &argout[1], &argout[2], &argout[3], NULL );
4364 : }
4365 0 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPointWithErrorCode(OSRCoordinateTransformationShadow *self,double argout[4],int errorCode[1],double x,double y,double z,double t){
4366 0 : if (self == NULL)
4367 : return;
4368 0 : argout[0] = x;
4369 0 : argout[1] = y;
4370 0 : argout[2] = z;
4371 0 : argout[3] = t;
4372 0 : OCTTransform4DWithErrorCodes( self, 1, &argout[0], &argout[1], &argout[2], &argout[3], errorCode );
4373 : }
4374 :
4375 : static int
4376 10 : DecomposeSequenceOf4DCoordinates( PyObject *seq, int nCount, double *x, double *y, double *z, double *t, int *pbFoundTime )
4377 : {
4378 10 : *pbFoundTime = FALSE;
4379 33 : for( int i = 0; i<nCount; ++i )
4380 : {
4381 :
4382 23 : PyObject *o = PySequence_GetItem(seq, i);
4383 23 : if ( !PySequence_Check(o) )
4384 : {
4385 0 : Py_DECREF(o);
4386 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
4387 :
4388 0 : return FALSE;
4389 : }
4390 :
4391 23 : Py_ssize_t len = PySequence_Size(o);
4392 :
4393 23 : if (len >= 2 && len <= 4)
4394 : {
4395 23 : PyObject *o1 = PySequence_GetItem(o, 0);
4396 23 : if (!PyNumber_Check(o1))
4397 : {
4398 0 : Py_DECREF(o); Py_DECREF(o1);
4399 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4400 :
4401 0 : return FALSE;
4402 : }
4403 23 : x[i] = PyFloat_AsDouble(o1);
4404 23 : Py_DECREF(o1);
4405 :
4406 23 : o1 = PySequence_GetItem(o, 1);
4407 23 : if (!PyNumber_Check(o1))
4408 : {
4409 0 : Py_DECREF(o); Py_DECREF(o1);
4410 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4411 :
4412 0 : return FALSE;
4413 : }
4414 23 : y[i] = PyFloat_AsDouble(o1);
4415 23 : Py_DECREF(o1);
4416 :
4417 : /* The 3rd coordinate is optional, default 0.0 */
4418 23 : if (len >= 3)
4419 : {
4420 16 : o1 = PySequence_GetItem(o, 2);
4421 16 : if (!PyNumber_Check(o1))
4422 : {
4423 0 : Py_DECREF(o); Py_DECREF(o1);
4424 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4425 :
4426 0 : return FALSE;
4427 : }
4428 16 : z[i] = PyFloat_AsDouble(o1);
4429 16 : Py_DECREF(o1);
4430 : }
4431 : else
4432 : {
4433 7 : z[i] = 0.0;
4434 : }
4435 :
4436 : /* The 4th coordinate is optional, default 0.0 */
4437 23 : if (len >= 4)
4438 : {
4439 8 : o1 = PySequence_GetItem(o, 3);
4440 8 : if (!PyNumber_Check(o1))
4441 : {
4442 0 : Py_DECREF(o); Py_DECREF(o1);
4443 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4444 :
4445 0 : return FALSE;
4446 : }
4447 8 : *pbFoundTime = TRUE;
4448 8 : t[i] = PyFloat_AsDouble(o1);
4449 8 : Py_DECREF(o1);
4450 : }
4451 : else
4452 : {
4453 15 : t[i] = 0.0;
4454 : }
4455 : }
4456 : else
4457 : {
4458 0 : Py_DECREF(o);
4459 0 : PyErr_SetString(PyExc_TypeError, "invalid coordinate");
4460 :
4461 0 : return FALSE;
4462 : }
4463 :
4464 23 : Py_DECREF(o);
4465 : }
4466 :
4467 : return TRUE;
4468 : }
4469 :
4470 10 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoints(OSRCoordinateTransformationShadow *self,int nCount,double *x,double *y,double *z,double *t){
4471 10 : if (self == NULL)
4472 : return;
4473 10 : OCTTransform4D( self, nCount, x, y, z, t, NULL );
4474 : }
4475 25 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformBounds(OSRCoordinateTransformationShadow *self,double argout[4],double minx,double miny,double maxx,double maxy,int densify_pts){
4476 25 : argout[0] = HUGE_VAL;
4477 25 : argout[1] = HUGE_VAL;
4478 25 : argout[2] = HUGE_VAL;
4479 25 : argout[3] = HUGE_VAL;
4480 25 : if (self == NULL)
4481 : return;
4482 25 : OCTTransformBounds(
4483 : self,
4484 : minx, miny, maxx, maxy,
4485 : &argout[0], &argout[1], &argout[2], &argout[3],
4486 : densify_pts
4487 : );
4488 : }
4489 :
4490 2 : OSRCoordinateTransformationShadow *CreateCoordinateTransformation( OSRSpatialReferenceShadow *src, OSRSpatialReferenceShadow *dst, OGRCoordinateTransformationOptions* options = NULL ) {
4491 2 : return (OSRCoordinateTransformationShadow*)
4492 2 : (options ? OCTNewCoordinateTransformationEx( src, dst, options ) : OCTNewCoordinateTransformation(src, dst));
4493 : }
4494 :
4495 6609 : SWIGINTERN OSRCRSInfo *new_OSRCRSInfo(char const *auth_name,char const *code,char const *name,OSRCRSType type,bool deprecated,bool bbox_valid,double west_lon_degree,double south_lat_degree,double east_lon_degree,double north_lat_degree,char const *area_name,char const *projection_method,char const *celestial_body_name){
4496 6609 : OSRCRSInfo *self = (OSRCRSInfo*) CPLMalloc( sizeof( OSRCRSInfo ) );
4497 6609 : self->pszAuthName = auth_name ? CPLStrdup(auth_name) : NULL;
4498 6609 : self->pszCode = code ? CPLStrdup(code) : NULL;
4499 6609 : self->pszName = name ? CPLStrdup(name) : NULL;
4500 6609 : self->eType = type;
4501 6609 : self->bDeprecated = deprecated;
4502 6609 : self->bBboxValid = bbox_valid;
4503 6609 : self->dfWestLongitudeDeg = west_lon_degree;
4504 6609 : self->dfSouthLatitudeDeg = south_lat_degree;
4505 6609 : self->dfEastLongitudeDeg = east_lon_degree;
4506 6609 : self->dfNorthLatitudeDeg = north_lat_degree;
4507 6609 : self->pszAreaName = area_name ? CPLStrdup(area_name) : NULL;
4508 6609 : self->pszProjectionMethod = projection_method ? CPLStrdup(projection_method) : NULL;
4509 6609 : self->pszCelestialBodyName = celestial_body_name ? CPLStrdup(celestial_body_name) : NULL;
4510 6609 : return self;
4511 : }
4512 6609 : SWIGINTERN void delete_OSRCRSInfo(OSRCRSInfo *self){
4513 6609 : CPLFree( self->pszAuthName );
4514 6609 : CPLFree( self->pszCode );
4515 6609 : CPLFree( self->pszName );
4516 6609 : CPLFree( self->pszAreaName );
4517 6609 : CPLFree( self->pszProjectionMethod );
4518 6609 : CPLFree( self->pszCelestialBodyName );
4519 6609 : CPLFree( self );
4520 6609 : }
4521 :
4522 :
4523 6609 : const char* OSRCRSInfo_auth_name_get( OSRCRSInfo *crsInfo ) {
4524 6609 : return crsInfo->pszAuthName;
4525 : }
4526 :
4527 6609 : const char* OSRCRSInfo_code_get( OSRCRSInfo *crsInfo ) {
4528 6609 : return crsInfo->pszCode;
4529 : }
4530 :
4531 1 : const char* OSRCRSInfo_name_get( OSRCRSInfo *crsInfo ) {
4532 1 : return crsInfo->pszName;
4533 : }
4534 :
4535 1 : OSRCRSType OSRCRSInfo_type_get( OSRCRSInfo *crsInfo ) {
4536 1 : return crsInfo->eType;
4537 : }
4538 :
4539 1 : bool OSRCRSInfo_deprecated_get( OSRCRSInfo *crsInfo ) {
4540 1 : return crsInfo->bDeprecated;
4541 : }
4542 :
4543 1 : bool OSRCRSInfo_bbox_valid_get( OSRCRSInfo *crsInfo ) {
4544 1 : return crsInfo->bBboxValid;
4545 : }
4546 :
4547 1 : double OSRCRSInfo_west_lon_degree_get( OSRCRSInfo *crsInfo ) {
4548 1 : return crsInfo->dfWestLongitudeDeg;
4549 : }
4550 :
4551 1 : double OSRCRSInfo_south_lat_degree_get( OSRCRSInfo *crsInfo ) {
4552 1 : return crsInfo->dfSouthLatitudeDeg;
4553 : }
4554 :
4555 1 : double OSRCRSInfo_east_lon_degree_get( OSRCRSInfo *crsInfo ) {
4556 1 : return crsInfo->dfEastLongitudeDeg;
4557 : }
4558 :
4559 1 : double OSRCRSInfo_north_lat_degree_get( OSRCRSInfo *crsInfo ) {
4560 1 : return crsInfo->dfNorthLatitudeDeg;
4561 : }
4562 :
4563 1 : const char* OSRCRSInfo_area_name_get( OSRCRSInfo *crsInfo ) {
4564 1 : return crsInfo->pszAreaName;
4565 : }
4566 :
4567 1 : const char* OSRCRSInfo_projection_method_get( OSRCRSInfo *crsInfo ) {
4568 1 : return crsInfo->pszProjectionMethod;
4569 : }
4570 :
4571 1 : const char* OSRCRSInfo_celestial_body_name_get( OSRCRSInfo *crsInfo ) {
4572 1 : return crsInfo->pszCelestialBodyName;
4573 : }
4574 :
4575 :
4576 :
4577 1 : char** GetAuthorityListFromDatabase()
4578 : {
4579 1 : return OSRGetAuthorityListFromDatabase();
4580 : }
4581 :
4582 :
4583 25 : static PyObject* CSLToList( char** stringarray, bool *pbErr )
4584 : {
4585 25 : PyObject* res;
4586 25 : if ( stringarray == NULL ) {
4587 0 : res = Py_None;
4588 0 : Py_INCREF( res );
4589 : }
4590 : else {
4591 25 : int len = CSLCount( stringarray );
4592 25 : res = PyList_New( len );
4593 25 : if( !res ) {
4594 0 : *pbErr = true;
4595 0 : return res;
4596 : }
4597 62 : for ( int i = 0; i < len; ++i ) {
4598 37 : PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
4599 37 : PyList_SetItem(res, i, o );
4600 : }
4601 : }
4602 25 : *pbErr = false;
4603 25 : return res;
4604 : }
4605 :
4606 :
4607 1 : void GetCRSInfoListFromDatabase( const char *authName,
4608 : OSRCRSInfo*** pList,
4609 : int* pnListCount)
4610 : {
4611 1 : *pList = OSRGetCRSInfoListFromDatabase(authName, NULL, pnListCount);
4612 1 : }
4613 :
4614 :
4615 1 : void SetPROJSearchPath( const char *utf8_string )
4616 : {
4617 1 : const char* const apszPaths[2] = { utf8_string, NULL };
4618 1 : OSRSetPROJSearchPaths(apszPaths);
4619 1 : }
4620 :
4621 :
4622 17 : void SetPROJSearchPaths( char** paths )
4623 : {
4624 17 : OSRSetPROJSearchPaths(paths);
4625 17 : }
4626 :
4627 :
4628 24 : char** GetPROJSearchPaths()
4629 : {
4630 24 : return OSRGetPROJSearchPaths();
4631 : }
4632 :
4633 :
4634 81 : int GetPROJVersionMajor()
4635 : {
4636 81 : int num;
4637 81 : OSRGetPROJVersion(&num, NULL, NULL);
4638 81 : return num;
4639 : }
4640 :
4641 75 : int GetPROJVersionMinor()
4642 : {
4643 75 : int num;
4644 75 : OSRGetPROJVersion(NULL, &num, NULL);
4645 75 : return num;
4646 : }
4647 :
4648 63 : int GetPROJVersionMicro()
4649 : {
4650 63 : int num;
4651 63 : OSRGetPROJVersion(NULL, NULL, &num);
4652 63 : return num;
4653 : }
4654 :
4655 0 : bool GetPROJEnableNetwork()
4656 : {
4657 0 : return OSRGetPROJEnableNetwork();
4658 : }
4659 :
4660 0 : void SetPROJEnableNetwork(bool enabled)
4661 : {
4662 0 : OSRSetPROJEnableNetwork(enabled);
4663 0 : }
4664 :
4665 :
4666 1 : void SetPROJAuxDbPath( const char *utf8_string )
4667 : {
4668 1 : const char* const apszPaths[2] = { utf8_string, NULL };
4669 1 : OSRSetPROJAuxDbPaths(apszPaths);
4670 1 : }
4671 :
4672 :
4673 0 : void SetPROJAuxDbPaths( char** paths )
4674 : {
4675 0 : OSRSetPROJAuxDbPaths(paths);
4676 0 : }
4677 :
4678 :
4679 0 : char** GetPROJAuxDbPaths()
4680 : {
4681 0 : return OSRGetPROJAuxDbPaths();
4682 : }
4683 :
4684 : #ifdef __cplusplus
4685 : extern "C" {
4686 : #endif
4687 0 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4688 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4689 0 : int result;
4690 :
4691 0 : if (!SWIG_Python_UnpackTuple(args, "GetUseExceptions", 0, 0, 0)) SWIG_fail;
4692 0 : {
4693 : #ifdef SED_HACKS
4694 0 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
4695 : #endif
4696 0 : result = GetUseExceptions();
4697 : }
4698 0 : resultobj = SWIG_From_int(static_cast< int >(result));
4699 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
4700 : return resultobj;
4701 0 : fail:
4702 0 : return NULL;
4703 : }
4704 :
4705 :
4706 13487 : SWIGINTERN PyObject *_wrap__GetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4707 13487 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4708 13487 : int result;
4709 :
4710 13487 : if (!SWIG_Python_UnpackTuple(args, "_GetExceptionsLocal", 0, 0, 0)) SWIG_fail;
4711 13487 : {
4712 : #ifdef SED_HACKS
4713 13487 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
4714 : #endif
4715 13487 : result = (int)_GetExceptionsLocal();
4716 : }
4717 13487 : resultobj = SWIG_From_int(static_cast< int >(result));
4718 13487 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
4719 : return resultobj;
4720 0 : fail:
4721 0 : return NULL;
4722 : }
4723 :
4724 :
4725 26974 : SWIGINTERN PyObject *_wrap__SetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4726 26974 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4727 26974 : int arg1 ;
4728 26974 : int val1 ;
4729 26974 : int ecode1 = 0 ;
4730 26974 : PyObject *swig_obj[1] ;
4731 :
4732 26974 : if (!args) SWIG_fail;
4733 26974 : swig_obj[0] = args;
4734 26974 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
4735 26974 : if (!SWIG_IsOK(ecode1)) {
4736 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_SetExceptionsLocal" "', argument " "1"" of type '" "int""'");
4737 : }
4738 26974 : arg1 = static_cast< int >(val1);
4739 26974 : {
4740 : #ifdef SED_HACKS
4741 26974 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
4742 : #endif
4743 26974 : _SetExceptionsLocal(arg1);
4744 : }
4745 26974 : resultobj = SWIG_Py_Void();
4746 26974 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
4747 : return resultobj;
4748 : fail:
4749 : return NULL;
4750 : }
4751 :
4752 :
4753 32 : SWIGINTERN PyObject *_wrap__UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4754 32 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4755 :
4756 32 : if (!SWIG_Python_UnpackTuple(args, "_UseExceptions", 0, 0, 0)) SWIG_fail;
4757 32 : _UseExceptions();
4758 32 : resultobj = SWIG_Py_Void();
4759 32 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
4760 : return resultobj;
4761 0 : fail:
4762 0 : return NULL;
4763 : }
4764 :
4765 :
4766 5 : SWIGINTERN PyObject *_wrap__DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4767 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4768 :
4769 5 : if (!SWIG_Python_UnpackTuple(args, "_DontUseExceptions", 0, 0, 0)) SWIG_fail;
4770 5 : _DontUseExceptions();
4771 5 : resultobj = SWIG_Py_Void();
4772 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
4773 : return resultobj;
4774 0 : fail:
4775 0 : return NULL;
4776 : }
4777 :
4778 :
4779 2772 : SWIGINTERN PyObject *_wrap__UserHasSpecifiedIfUsingExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4780 2772 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4781 2772 : int result;
4782 :
4783 2772 : if (!SWIG_Python_UnpackTuple(args, "_UserHasSpecifiedIfUsingExceptions", 0, 0, 0)) SWIG_fail;
4784 2772 : {
4785 : #ifdef SED_HACKS
4786 2772 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
4787 : #endif
4788 2772 : result = (int)_UserHasSpecifiedIfUsingExceptions();
4789 : }
4790 2772 : resultobj = SWIG_From_int(static_cast< int >(result));
4791 2772 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
4792 : return resultobj;
4793 0 : fail:
4794 0 : return NULL;
4795 : }
4796 :
4797 :
4798 0 : SWIGINTERN PyObject *_wrap_GetWellKnownGeogCSAsWKT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4799 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4800 0 : char *arg1 = (char *) 0 ;
4801 0 : char **arg2 = (char **) 0 ;
4802 0 : int res1 ;
4803 0 : char *buf1 = 0 ;
4804 0 : int alloc1 = 0 ;
4805 0 : char *argout2 = 0 ;
4806 0 : PyObject *swig_obj[1] ;
4807 0 : OGRErr result;
4808 :
4809 0 : {
4810 : /* %typemap(in,numinputs=0) (char **argout2) */
4811 0 : arg2 = &argout2;
4812 : }
4813 0 : if (!args) SWIG_fail;
4814 0 : swig_obj[0] = args;
4815 0 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
4816 0 : if (!SWIG_IsOK(res1)) {
4817 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetWellKnownGeogCSAsWKT" "', argument " "1"" of type '" "char const *""'");
4818 : }
4819 0 : arg1 = reinterpret_cast< char * >(buf1);
4820 0 : {
4821 0 : if (!arg1) {
4822 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4823 : }
4824 : }
4825 0 : {
4826 0 : const int bLocalUseExceptions = GetUseExceptions();
4827 0 : if ( bLocalUseExceptions ) {
4828 0 : pushErrorHandler();
4829 : }
4830 0 : result = (OGRErr)GetWellKnownGeogCSAsWKT((char const *)arg1,arg2);
4831 0 : if ( bLocalUseExceptions ) {
4832 0 : popErrorHandler();
4833 : }
4834 : #ifndef SED_HACKS
4835 : if ( bLocalUseExceptions ) {
4836 : CPLErr eclass = CPLGetLastErrorType();
4837 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4838 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4839 : }
4840 : }
4841 : #endif
4842 : }
4843 0 : {
4844 : /* %typemap(out) OGRErr */
4845 0 : if ( result != 0 && GetUseExceptions()) {
4846 0 : const char* pszMessage = CPLGetLastErrorMsg();
4847 0 : if( pszMessage[0] != '\0' )
4848 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
4849 : else
4850 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4851 0 : SWIG_fail;
4852 : }
4853 : }
4854 0 : {
4855 : /* %typemap(argout) (char **argout) */
4856 0 : PyObject *o;
4857 0 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
4858 0 : o = GDALPythonObjectFromCStr( *arg2 );
4859 : }
4860 : else {
4861 0 : o = Py_None;
4862 0 : Py_INCREF( o );
4863 : }
4864 : #if SWIG_VERSION >= 0x040300
4865 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
4866 : #else
4867 0 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
4868 : #endif
4869 : }
4870 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4871 0 : {
4872 : /* %typemap(freearg) (char **argout) */
4873 0 : if ( *arg2 )
4874 0 : CPLFree( *arg2 );
4875 : }
4876 0 : {
4877 : /* %typemap(ret) OGRErr */
4878 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
4879 0 : resultobj = PyInt_FromLong( result );
4880 : }
4881 : }
4882 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
4883 : return resultobj;
4884 0 : fail:
4885 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4886 0 : {
4887 : /* %typemap(freearg) (char **argout) */
4888 0 : if ( *arg2 )
4889 0 : CPLFree( *arg2 );
4890 : }
4891 : return NULL;
4892 : }
4893 :
4894 :
4895 12 : SWIGINTERN PyObject *_wrap_GetUserInputAsWKT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4896 12 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4897 12 : char *arg1 = (char *) 0 ;
4898 12 : char **arg2 = (char **) 0 ;
4899 12 : int res1 ;
4900 12 : char *buf1 = 0 ;
4901 12 : int alloc1 = 0 ;
4902 12 : char *argout2 = 0 ;
4903 12 : PyObject *swig_obj[1] ;
4904 12 : OGRErr result;
4905 :
4906 12 : {
4907 : /* %typemap(in,numinputs=0) (char **argout2) */
4908 12 : arg2 = &argout2;
4909 : }
4910 12 : if (!args) SWIG_fail;
4911 12 : swig_obj[0] = args;
4912 12 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
4913 12 : if (!SWIG_IsOK(res1)) {
4914 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetUserInputAsWKT" "', argument " "1"" of type '" "char const *""'");
4915 : }
4916 12 : arg1 = reinterpret_cast< char * >(buf1);
4917 12 : {
4918 12 : if (!arg1) {
4919 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4920 : }
4921 : }
4922 12 : {
4923 12 : const int bLocalUseExceptions = GetUseExceptions();
4924 12 : if ( bLocalUseExceptions ) {
4925 12 : pushErrorHandler();
4926 : }
4927 12 : result = (OGRErr)GetUserInputAsWKT((char const *)arg1,arg2);
4928 12 : if ( bLocalUseExceptions ) {
4929 12 : popErrorHandler();
4930 : }
4931 : #ifndef SED_HACKS
4932 : if ( bLocalUseExceptions ) {
4933 : CPLErr eclass = CPLGetLastErrorType();
4934 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4935 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4936 : }
4937 : }
4938 : #endif
4939 : }
4940 12 : {
4941 : /* %typemap(out) OGRErr */
4942 12 : if ( result != 0 && GetUseExceptions()) {
4943 0 : const char* pszMessage = CPLGetLastErrorMsg();
4944 0 : if( pszMessage[0] != '\0' )
4945 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
4946 : else
4947 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4948 0 : SWIG_fail;
4949 : }
4950 : }
4951 12 : {
4952 : /* %typemap(argout) (char **argout) */
4953 12 : PyObject *o;
4954 12 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
4955 12 : o = GDALPythonObjectFromCStr( *arg2 );
4956 : }
4957 : else {
4958 0 : o = Py_None;
4959 0 : Py_INCREF( o );
4960 : }
4961 : #if SWIG_VERSION >= 0x040300
4962 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
4963 : #else
4964 12 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
4965 : #endif
4966 : }
4967 12 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4968 12 : {
4969 : /* %typemap(freearg) (char **argout) */
4970 12 : if ( *arg2 )
4971 12 : CPLFree( *arg2 );
4972 : }
4973 12 : {
4974 : /* %typemap(ret) OGRErr */
4975 24 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
4976 0 : resultobj = PyInt_FromLong( result );
4977 : }
4978 : }
4979 12 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
4980 : return resultobj;
4981 0 : fail:
4982 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4983 0 : {
4984 : /* %typemap(freearg) (char **argout) */
4985 0 : if ( *arg2 )
4986 0 : CPLFree( *arg2 );
4987 : }
4988 : return NULL;
4989 : }
4990 :
4991 :
4992 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4993 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4994 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
4995 1 : void *argp1 = 0 ;
4996 1 : int res1 = 0 ;
4997 1 : PyObject *swig_obj[1] ;
4998 1 : double result;
4999 :
5000 1 : if (!args) SWIG_fail;
5001 1 : swig_obj[0] = args;
5002 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5003 1 : if (!SWIG_IsOK(res1)) {
5004 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_west_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5005 : }
5006 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5007 1 : {
5008 1 : const int bLocalUseExceptions = GetUseExceptions();
5009 1 : if ( bLocalUseExceptions ) {
5010 1 : pushErrorHandler();
5011 : }
5012 1 : result = (double)OSRAreaOfUse_west_lon_degree_get(arg1);
5013 1 : if ( bLocalUseExceptions ) {
5014 1 : popErrorHandler();
5015 : }
5016 : #ifndef SED_HACKS
5017 : if ( bLocalUseExceptions ) {
5018 : CPLErr eclass = CPLGetLastErrorType();
5019 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5020 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5021 : }
5022 : }
5023 : #endif
5024 : }
5025 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5026 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5027 : return resultobj;
5028 : fail:
5029 : return NULL;
5030 : }
5031 :
5032 :
5033 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5034 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5035 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5036 1 : void *argp1 = 0 ;
5037 1 : int res1 = 0 ;
5038 1 : PyObject *swig_obj[1] ;
5039 1 : double result;
5040 :
5041 1 : if (!args) SWIG_fail;
5042 1 : swig_obj[0] = args;
5043 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5044 1 : if (!SWIG_IsOK(res1)) {
5045 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_south_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5046 : }
5047 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5048 1 : {
5049 1 : const int bLocalUseExceptions = GetUseExceptions();
5050 1 : if ( bLocalUseExceptions ) {
5051 1 : pushErrorHandler();
5052 : }
5053 1 : result = (double)OSRAreaOfUse_south_lat_degree_get(arg1);
5054 1 : if ( bLocalUseExceptions ) {
5055 1 : popErrorHandler();
5056 : }
5057 : #ifndef SED_HACKS
5058 : if ( bLocalUseExceptions ) {
5059 : CPLErr eclass = CPLGetLastErrorType();
5060 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5061 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5062 : }
5063 : }
5064 : #endif
5065 : }
5066 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5067 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5068 : return resultobj;
5069 : fail:
5070 : return NULL;
5071 : }
5072 :
5073 :
5074 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5075 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5076 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5077 1 : void *argp1 = 0 ;
5078 1 : int res1 = 0 ;
5079 1 : PyObject *swig_obj[1] ;
5080 1 : double result;
5081 :
5082 1 : if (!args) SWIG_fail;
5083 1 : swig_obj[0] = args;
5084 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5085 1 : if (!SWIG_IsOK(res1)) {
5086 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_east_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5087 : }
5088 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5089 1 : {
5090 1 : const int bLocalUseExceptions = GetUseExceptions();
5091 1 : if ( bLocalUseExceptions ) {
5092 1 : pushErrorHandler();
5093 : }
5094 1 : result = (double)OSRAreaOfUse_east_lon_degree_get(arg1);
5095 1 : if ( bLocalUseExceptions ) {
5096 1 : popErrorHandler();
5097 : }
5098 : #ifndef SED_HACKS
5099 : if ( bLocalUseExceptions ) {
5100 : CPLErr eclass = CPLGetLastErrorType();
5101 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5102 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5103 : }
5104 : }
5105 : #endif
5106 : }
5107 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5108 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5109 : return resultobj;
5110 : fail:
5111 : return NULL;
5112 : }
5113 :
5114 :
5115 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5116 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5117 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5118 1 : void *argp1 = 0 ;
5119 1 : int res1 = 0 ;
5120 1 : PyObject *swig_obj[1] ;
5121 1 : double result;
5122 :
5123 1 : if (!args) SWIG_fail;
5124 1 : swig_obj[0] = args;
5125 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5126 1 : if (!SWIG_IsOK(res1)) {
5127 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_north_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5128 : }
5129 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5130 1 : {
5131 1 : const int bLocalUseExceptions = GetUseExceptions();
5132 1 : if ( bLocalUseExceptions ) {
5133 1 : pushErrorHandler();
5134 : }
5135 1 : result = (double)OSRAreaOfUse_north_lat_degree_get(arg1);
5136 1 : if ( bLocalUseExceptions ) {
5137 1 : popErrorHandler();
5138 : }
5139 : #ifndef SED_HACKS
5140 : if ( bLocalUseExceptions ) {
5141 : CPLErr eclass = CPLGetLastErrorType();
5142 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5143 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5144 : }
5145 : }
5146 : #endif
5147 : }
5148 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5149 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5150 : return resultobj;
5151 : fail:
5152 : return NULL;
5153 : }
5154 :
5155 :
5156 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5157 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5158 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5159 1 : void *argp1 = 0 ;
5160 1 : int res1 = 0 ;
5161 1 : PyObject *swig_obj[1] ;
5162 1 : char *result = 0 ;
5163 :
5164 1 : if (!args) SWIG_fail;
5165 1 : swig_obj[0] = args;
5166 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5167 1 : if (!SWIG_IsOK(res1)) {
5168 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_name_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5169 : }
5170 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5171 1 : {
5172 1 : const int bLocalUseExceptions = GetUseExceptions();
5173 1 : if ( bLocalUseExceptions ) {
5174 1 : pushErrorHandler();
5175 : }
5176 1 : result = (char *)OSRAreaOfUse_name_get(arg1);
5177 1 : if ( bLocalUseExceptions ) {
5178 1 : popErrorHandler();
5179 : }
5180 : #ifndef SED_HACKS
5181 : if ( bLocalUseExceptions ) {
5182 : CPLErr eclass = CPLGetLastErrorType();
5183 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5184 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5185 : }
5186 : }
5187 : #endif
5188 : }
5189 1 : resultobj = SWIG_FromCharPtr((const char *)result);
5190 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5191 : return resultobj;
5192 : fail:
5193 : return NULL;
5194 : }
5195 :
5196 :
5197 0 : SWIGINTERN PyObject *_wrap_new_AreaOfUse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5198 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5199 0 : double arg1 ;
5200 0 : double arg2 ;
5201 0 : double arg3 ;
5202 0 : double arg4 ;
5203 0 : char *arg5 = (char *) 0 ;
5204 0 : double val1 ;
5205 0 : int ecode1 = 0 ;
5206 0 : double val2 ;
5207 0 : int ecode2 = 0 ;
5208 0 : double val3 ;
5209 0 : int ecode3 = 0 ;
5210 0 : double val4 ;
5211 0 : int ecode4 = 0 ;
5212 0 : int res5 ;
5213 0 : char *buf5 = 0 ;
5214 0 : int alloc5 = 0 ;
5215 0 : PyObject *swig_obj[5] ;
5216 0 : OSRAreaOfUse *result = 0 ;
5217 :
5218 0 : if (!SWIG_Python_UnpackTuple(args, "new_AreaOfUse", 5, 5, swig_obj)) SWIG_fail;
5219 0 : ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
5220 0 : if (!SWIG_IsOK(ecode1)) {
5221 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_AreaOfUse" "', argument " "1"" of type '" "double""'");
5222 : }
5223 0 : arg1 = static_cast< double >(val1);
5224 0 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
5225 0 : if (!SWIG_IsOK(ecode2)) {
5226 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_AreaOfUse" "', argument " "2"" of type '" "double""'");
5227 : }
5228 0 : arg2 = static_cast< double >(val2);
5229 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
5230 0 : if (!SWIG_IsOK(ecode3)) {
5231 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_AreaOfUse" "', argument " "3"" of type '" "double""'");
5232 : }
5233 0 : arg3 = static_cast< double >(val3);
5234 0 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
5235 0 : if (!SWIG_IsOK(ecode4)) {
5236 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_AreaOfUse" "', argument " "4"" of type '" "double""'");
5237 : }
5238 0 : arg4 = static_cast< double >(val4);
5239 0 : res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
5240 0 : if (!SWIG_IsOK(res5)) {
5241 0 : SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_AreaOfUse" "', argument " "5"" of type '" "char *""'");
5242 : }
5243 0 : arg5 = reinterpret_cast< char * >(buf5);
5244 0 : {
5245 0 : const int bLocalUseExceptions = GetUseExceptions();
5246 0 : if ( bLocalUseExceptions ) {
5247 0 : pushErrorHandler();
5248 : }
5249 0 : result = (OSRAreaOfUse *)new_OSRAreaOfUse(arg1,arg2,arg3,arg4,arg5);
5250 0 : if ( bLocalUseExceptions ) {
5251 0 : popErrorHandler();
5252 : }
5253 : #ifndef SED_HACKS
5254 : if ( bLocalUseExceptions ) {
5255 : CPLErr eclass = CPLGetLastErrorType();
5256 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5257 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5258 : }
5259 : }
5260 : #endif
5261 : }
5262 0 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRAreaOfUse, SWIG_POINTER_NEW | 0 );
5263 0 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
5264 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5265 : return resultobj;
5266 0 : fail:
5267 0 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
5268 : return NULL;
5269 : }
5270 :
5271 :
5272 1 : SWIGINTERN PyObject *_wrap_delete_AreaOfUse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5273 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5274 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5275 1 : void *argp1 = 0 ;
5276 1 : int res1 = 0 ;
5277 1 : PyObject *swig_obj[1] ;
5278 :
5279 1 : if (!args) SWIG_fail;
5280 1 : swig_obj[0] = args;
5281 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, SWIG_POINTER_DISOWN | 0 );
5282 1 : if (!SWIG_IsOK(res1)) {
5283 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AreaOfUse" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5284 : }
5285 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5286 1 : {
5287 1 : const int bLocalUseExceptions = GetUseExceptions();
5288 1 : if ( bLocalUseExceptions ) {
5289 1 : pushErrorHandler();
5290 : }
5291 1 : delete_OSRAreaOfUse(arg1);
5292 1 : if ( bLocalUseExceptions ) {
5293 1 : popErrorHandler();
5294 : }
5295 : #ifndef SED_HACKS
5296 : if ( bLocalUseExceptions ) {
5297 : CPLErr eclass = CPLGetLastErrorType();
5298 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5299 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5300 : }
5301 : }
5302 : #endif
5303 : }
5304 1 : resultobj = SWIG_Py_Void();
5305 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5306 : return resultobj;
5307 : fail:
5308 : return NULL;
5309 : }
5310 :
5311 :
5312 285 : SWIGINTERN PyObject *AreaOfUse_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5313 285 : PyObject *obj;
5314 285 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
5315 285 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRAreaOfUse, SWIG_NewClientData(obj));
5316 285 : return SWIG_Py_Void();
5317 : }
5318 :
5319 0 : SWIGINTERN PyObject *AreaOfUse_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5320 0 : return SWIG_Python_InitShadowInstance(args);
5321 : }
5322 :
5323 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5324 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5325 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5326 0 : void *argp1 = 0 ;
5327 0 : int res1 = 0 ;
5328 0 : PyObject *swig_obj[1] ;
5329 0 : double result;
5330 :
5331 0 : if (!args) SWIG_fail;
5332 0 : swig_obj[0] = args;
5333 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5334 0 : if (!SWIG_IsOK(res1)) {
5335 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_west_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5336 : }
5337 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5338 0 : {
5339 0 : if (!arg1) {
5340 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5341 : }
5342 : }
5343 0 : {
5344 0 : const int bLocalUseExceptions = GetUseExceptions();
5345 0 : if ( bLocalUseExceptions ) {
5346 0 : pushErrorHandler();
5347 : }
5348 0 : result = (double)OSRAreaOfUse_west_lon_degree_get(arg1);
5349 0 : if ( bLocalUseExceptions ) {
5350 0 : popErrorHandler();
5351 : }
5352 : #ifndef SED_HACKS
5353 : if ( bLocalUseExceptions ) {
5354 : CPLErr eclass = CPLGetLastErrorType();
5355 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5356 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5357 : }
5358 : }
5359 : #endif
5360 : }
5361 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5362 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5363 : return resultobj;
5364 : fail:
5365 : return NULL;
5366 : }
5367 :
5368 :
5369 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5370 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5371 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5372 0 : void *argp1 = 0 ;
5373 0 : int res1 = 0 ;
5374 0 : PyObject *swig_obj[1] ;
5375 0 : double result;
5376 :
5377 0 : if (!args) SWIG_fail;
5378 0 : swig_obj[0] = args;
5379 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5380 0 : if (!SWIG_IsOK(res1)) {
5381 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_south_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5382 : }
5383 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5384 0 : {
5385 0 : if (!arg1) {
5386 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5387 : }
5388 : }
5389 0 : {
5390 0 : const int bLocalUseExceptions = GetUseExceptions();
5391 0 : if ( bLocalUseExceptions ) {
5392 0 : pushErrorHandler();
5393 : }
5394 0 : result = (double)OSRAreaOfUse_south_lat_degree_get(arg1);
5395 0 : if ( bLocalUseExceptions ) {
5396 0 : popErrorHandler();
5397 : }
5398 : #ifndef SED_HACKS
5399 : if ( bLocalUseExceptions ) {
5400 : CPLErr eclass = CPLGetLastErrorType();
5401 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5402 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5403 : }
5404 : }
5405 : #endif
5406 : }
5407 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5408 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5409 : return resultobj;
5410 : fail:
5411 : return NULL;
5412 : }
5413 :
5414 :
5415 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5416 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5417 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5418 0 : void *argp1 = 0 ;
5419 0 : int res1 = 0 ;
5420 0 : PyObject *swig_obj[1] ;
5421 0 : double result;
5422 :
5423 0 : if (!args) SWIG_fail;
5424 0 : swig_obj[0] = args;
5425 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5426 0 : if (!SWIG_IsOK(res1)) {
5427 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_east_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5428 : }
5429 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5430 0 : {
5431 0 : if (!arg1) {
5432 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5433 : }
5434 : }
5435 0 : {
5436 0 : const int bLocalUseExceptions = GetUseExceptions();
5437 0 : if ( bLocalUseExceptions ) {
5438 0 : pushErrorHandler();
5439 : }
5440 0 : result = (double)OSRAreaOfUse_east_lon_degree_get(arg1);
5441 0 : if ( bLocalUseExceptions ) {
5442 0 : popErrorHandler();
5443 : }
5444 : #ifndef SED_HACKS
5445 : if ( bLocalUseExceptions ) {
5446 : CPLErr eclass = CPLGetLastErrorType();
5447 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5448 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5449 : }
5450 : }
5451 : #endif
5452 : }
5453 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5454 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5455 : return resultobj;
5456 : fail:
5457 : return NULL;
5458 : }
5459 :
5460 :
5461 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5462 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5463 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5464 0 : void *argp1 = 0 ;
5465 0 : int res1 = 0 ;
5466 0 : PyObject *swig_obj[1] ;
5467 0 : double result;
5468 :
5469 0 : if (!args) SWIG_fail;
5470 0 : swig_obj[0] = args;
5471 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5472 0 : if (!SWIG_IsOK(res1)) {
5473 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_north_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5474 : }
5475 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5476 0 : {
5477 0 : if (!arg1) {
5478 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5479 : }
5480 : }
5481 0 : {
5482 0 : const int bLocalUseExceptions = GetUseExceptions();
5483 0 : if ( bLocalUseExceptions ) {
5484 0 : pushErrorHandler();
5485 : }
5486 0 : result = (double)OSRAreaOfUse_north_lat_degree_get(arg1);
5487 0 : if ( bLocalUseExceptions ) {
5488 0 : popErrorHandler();
5489 : }
5490 : #ifndef SED_HACKS
5491 : if ( bLocalUseExceptions ) {
5492 : CPLErr eclass = CPLGetLastErrorType();
5493 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5494 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5495 : }
5496 : }
5497 : #endif
5498 : }
5499 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5500 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5501 : return resultobj;
5502 : fail:
5503 : return NULL;
5504 : }
5505 :
5506 :
5507 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5508 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5509 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5510 0 : void *argp1 = 0 ;
5511 0 : int res1 = 0 ;
5512 0 : PyObject *swig_obj[1] ;
5513 0 : char *result = 0 ;
5514 :
5515 0 : if (!args) SWIG_fail;
5516 0 : swig_obj[0] = args;
5517 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5518 0 : if (!SWIG_IsOK(res1)) {
5519 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_name_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5520 : }
5521 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5522 0 : {
5523 0 : if (!arg1) {
5524 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5525 : }
5526 : }
5527 0 : {
5528 0 : const int bLocalUseExceptions = GetUseExceptions();
5529 0 : if ( bLocalUseExceptions ) {
5530 0 : pushErrorHandler();
5531 : }
5532 0 : result = (char *)OSRAreaOfUse_name_get(arg1);
5533 0 : if ( bLocalUseExceptions ) {
5534 0 : popErrorHandler();
5535 : }
5536 : #ifndef SED_HACKS
5537 : if ( bLocalUseExceptions ) {
5538 : CPLErr eclass = CPLGetLastErrorType();
5539 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5540 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5541 : }
5542 : }
5543 : #endif
5544 : }
5545 0 : resultobj = SWIG_FromCharPtr((const char *)result);
5546 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5547 : return resultobj;
5548 : fail:
5549 : return NULL;
5550 : }
5551 :
5552 :
5553 2789 : SWIGINTERN PyObject *_wrap_new_SpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5554 2789 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5555 2789 : char *arg1 = (char *) "" ;
5556 2789 : int res1 ;
5557 2789 : char *buf1 = 0 ;
5558 2789 : int alloc1 = 0 ;
5559 2789 : PyObject * obj0 = 0 ;
5560 2789 : char * kwnames[] = {
5561 : (char *)"wkt", NULL
5562 : };
5563 2789 : OSRSpatialReferenceShadow *result = 0 ;
5564 :
5565 2789 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:new_SpatialReference", kwnames, &obj0)) SWIG_fail;
5566 2789 : if (obj0) {
5567 0 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5568 0 : if (!SWIG_IsOK(res1)) {
5569 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpatialReference" "', argument " "1"" of type '" "char const *""'");
5570 : }
5571 0 : arg1 = reinterpret_cast< char * >(buf1);
5572 : }
5573 2789 : {
5574 2789 : const int bLocalUseExceptions = GetUseExceptions();
5575 2789 : if ( bLocalUseExceptions ) {
5576 2789 : pushErrorHandler();
5577 : }
5578 2789 : result = (OSRSpatialReferenceShadow *)new_OSRSpatialReferenceShadow((char const *)arg1);
5579 2789 : if ( bLocalUseExceptions ) {
5580 2789 : popErrorHandler();
5581 : }
5582 : #ifndef SED_HACKS
5583 : if ( bLocalUseExceptions ) {
5584 : CPLErr eclass = CPLGetLastErrorType();
5585 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5586 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5587 : }
5588 : }
5589 : #endif
5590 : }
5591 2789 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_NEW | 0 );
5592 2789 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5593 2789 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5594 : return resultobj;
5595 0 : fail:
5596 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5597 : return NULL;
5598 : }
5599 :
5600 :
5601 5263 : SWIGINTERN PyObject *_wrap_delete_SpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5602 5263 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5603 5263 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5604 5263 : void *argp1 = 0 ;
5605 5263 : int res1 = 0 ;
5606 5263 : PyObject *swig_obj[1] ;
5607 :
5608 5263 : if (!args) SWIG_fail;
5609 5263 : swig_obj[0] = args;
5610 5263 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_DISOWN | 0 );
5611 5263 : if (!SWIG_IsOK(res1)) {
5612 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SpatialReference" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5613 : }
5614 5263 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5615 5263 : {
5616 5263 : const int bLocalUseExceptions = GetUseExceptions();
5617 5263 : if ( bLocalUseExceptions ) {
5618 3776 : pushErrorHandler();
5619 : }
5620 5263 : delete_OSRSpatialReferenceShadow(arg1);
5621 5263 : if ( bLocalUseExceptions ) {
5622 3776 : popErrorHandler();
5623 : }
5624 : #ifndef SED_HACKS
5625 : if ( bLocalUseExceptions ) {
5626 : CPLErr eclass = CPLGetLastErrorType();
5627 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5628 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5629 : }
5630 : }
5631 : #endif
5632 : }
5633 5263 : resultobj = SWIG_Py_Void();
5634 5263 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5635 : return resultobj;
5636 : fail:
5637 : return NULL;
5638 : }
5639 :
5640 :
5641 4 : SWIGINTERN PyObject *_wrap_SpatialReference___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5642 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5643 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5644 4 : void *argp1 = 0 ;
5645 4 : int res1 = 0 ;
5646 4 : PyObject *swig_obj[1] ;
5647 4 : retStringAndCPLFree *result = 0 ;
5648 :
5649 4 : if (!args) SWIG_fail;
5650 4 : swig_obj[0] = args;
5651 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5652 4 : if (!SWIG_IsOK(res1)) {
5653 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference___str__" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5654 : }
5655 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5656 4 : {
5657 4 : const int bLocalUseExceptions = GetUseExceptions();
5658 4 : if ( bLocalUseExceptions ) {
5659 3 : pushErrorHandler();
5660 : }
5661 4 : result = (retStringAndCPLFree *)OSRSpatialReferenceShadow___str__(arg1);
5662 4 : if ( bLocalUseExceptions ) {
5663 3 : popErrorHandler();
5664 : }
5665 : #ifndef SED_HACKS
5666 : if ( bLocalUseExceptions ) {
5667 : CPLErr eclass = CPLGetLastErrorType();
5668 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5669 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5670 : }
5671 : }
5672 : #endif
5673 : }
5674 4 : {
5675 : /* %typemap(out) (retStringAndCPLFree*) */
5676 4 : Py_XDECREF(resultobj);
5677 4 : if(result)
5678 : {
5679 4 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
5680 4 : CPLFree(result);
5681 : }
5682 : else
5683 : {
5684 0 : resultobj = Py_None;
5685 0 : Py_INCREF(resultobj);
5686 : }
5687 : }
5688 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5689 : return resultobj;
5690 : fail:
5691 : return NULL;
5692 : }
5693 :
5694 :
5695 47 : SWIGINTERN PyObject *_wrap_SpatialReference_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5696 47 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5697 47 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5698 47 : void *argp1 = 0 ;
5699 47 : int res1 = 0 ;
5700 47 : PyObject *swig_obj[1] ;
5701 47 : char *result = 0 ;
5702 :
5703 47 : if (!args) SWIG_fail;
5704 47 : swig_obj[0] = args;
5705 47 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5706 47 : if (!SWIG_IsOK(res1)) {
5707 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5708 : }
5709 47 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5710 47 : {
5711 47 : const int bLocalUseExceptions = GetUseExceptions();
5712 47 : if ( bLocalUseExceptions ) {
5713 36 : pushErrorHandler();
5714 : }
5715 47 : result = (char *)OSRSpatialReferenceShadow_GetName(arg1);
5716 47 : if ( bLocalUseExceptions ) {
5717 36 : popErrorHandler();
5718 : }
5719 : #ifndef SED_HACKS
5720 : if ( bLocalUseExceptions ) {
5721 : CPLErr eclass = CPLGetLastErrorType();
5722 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5723 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5724 : }
5725 : }
5726 : #endif
5727 : }
5728 47 : resultobj = SWIG_FromCharPtr((const char *)result);
5729 47 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5730 : return resultobj;
5731 : fail:
5732 : return NULL;
5733 : }
5734 :
5735 :
5736 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetCelestialBodyName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5737 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5738 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5739 1 : void *argp1 = 0 ;
5740 1 : int res1 = 0 ;
5741 1 : PyObject *swig_obj[1] ;
5742 1 : char *result = 0 ;
5743 :
5744 1 : if (!args) SWIG_fail;
5745 1 : swig_obj[0] = args;
5746 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5747 1 : if (!SWIG_IsOK(res1)) {
5748 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetCelestialBodyName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5749 : }
5750 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5751 1 : {
5752 1 : const int bLocalUseExceptions = GetUseExceptions();
5753 1 : if ( bLocalUseExceptions ) {
5754 1 : pushErrorHandler();
5755 : }
5756 1 : result = (char *)OSRSpatialReferenceShadow_GetCelestialBodyName(arg1);
5757 1 : if ( bLocalUseExceptions ) {
5758 1 : popErrorHandler();
5759 : }
5760 : #ifndef SED_HACKS
5761 : if ( bLocalUseExceptions ) {
5762 : CPLErr eclass = CPLGetLastErrorType();
5763 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5764 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5765 : }
5766 : }
5767 : #endif
5768 : }
5769 1 : resultobj = SWIG_FromCharPtr((const char *)result);
5770 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5771 : return resultobj;
5772 : fail:
5773 : return NULL;
5774 : }
5775 :
5776 :
5777 671 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSame(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5778 671 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5779 671 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5780 671 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
5781 671 : char **arg3 = (char **) NULL ;
5782 671 : void *argp1 = 0 ;
5783 671 : int res1 = 0 ;
5784 671 : void *argp2 = 0 ;
5785 671 : int res2 = 0 ;
5786 671 : PyObject * obj0 = 0 ;
5787 671 : PyObject * obj1 = 0 ;
5788 671 : PyObject * obj2 = 0 ;
5789 671 : char * kwnames[] = {
5790 : (char *)"self", (char *)"rhs", (char *)"options", NULL
5791 : };
5792 671 : int result;
5793 :
5794 671 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:SpatialReference_IsSame", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
5795 671 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5796 671 : if (!SWIG_IsOK(res1)) {
5797 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSame" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5798 : }
5799 671 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5800 671 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5801 671 : if (!SWIG_IsOK(res2)) {
5802 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSame" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
5803 : }
5804 671 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
5805 671 : if (obj2) {
5806 81 : {
5807 : /* %typemap(in) char **dict */
5808 81 : arg3 = NULL;
5809 81 : if ( PySequence_Check( obj2 ) ) {
5810 81 : int bErr = FALSE;
5811 81 : arg3 = CSLFromPySequence(obj2, &bErr);
5812 81 : if ( bErr )
5813 : {
5814 0 : SWIG_fail;
5815 : }
5816 : }
5817 0 : else if ( PyMapping_Check( obj2 ) ) {
5818 0 : int bErr = FALSE;
5819 0 : arg3 = CSLFromPyMapping(obj2, &bErr);
5820 0 : if ( bErr )
5821 : {
5822 0 : SWIG_fail;
5823 : }
5824 : }
5825 : else {
5826 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
5827 0 : SWIG_fail;
5828 : }
5829 : }
5830 : }
5831 671 : {
5832 671 : if (!arg2) {
5833 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5834 : }
5835 : }
5836 671 : {
5837 671 : const int bLocalUseExceptions = GetUseExceptions();
5838 671 : if ( bLocalUseExceptions ) {
5839 405 : pushErrorHandler();
5840 : }
5841 671 : result = (int)OSRSpatialReferenceShadow_IsSame(arg1,arg2,arg3);
5842 671 : if ( bLocalUseExceptions ) {
5843 405 : popErrorHandler();
5844 : }
5845 : #ifndef SED_HACKS
5846 : if ( bLocalUseExceptions ) {
5847 : CPLErr eclass = CPLGetLastErrorType();
5848 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5849 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5850 : }
5851 : }
5852 : #endif
5853 : }
5854 671 : resultobj = SWIG_From_int(static_cast< int >(result));
5855 671 : {
5856 : /* %typemap(freearg) char **dict */
5857 671 : CSLDestroy( arg3 );
5858 : }
5859 671 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5860 : return resultobj;
5861 0 : fail:
5862 0 : {
5863 : /* %typemap(freearg) char **dict */
5864 0 : CSLDestroy( arg3 );
5865 : }
5866 : return NULL;
5867 : }
5868 :
5869 :
5870 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSameGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5871 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5872 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5873 0 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
5874 0 : void *argp1 = 0 ;
5875 0 : int res1 = 0 ;
5876 0 : void *argp2 = 0 ;
5877 0 : int res2 = 0 ;
5878 0 : PyObject *swig_obj[2] ;
5879 0 : int result;
5880 :
5881 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_IsSameGeogCS", 2, 2, swig_obj)) SWIG_fail;
5882 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5883 0 : if (!SWIG_IsOK(res1)) {
5884 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSameGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5885 : }
5886 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5887 0 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5888 0 : if (!SWIG_IsOK(res2)) {
5889 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSameGeogCS" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
5890 : }
5891 0 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
5892 0 : {
5893 0 : if (!arg2) {
5894 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5895 : }
5896 : }
5897 0 : {
5898 0 : const int bLocalUseExceptions = GetUseExceptions();
5899 0 : if ( bLocalUseExceptions ) {
5900 0 : pushErrorHandler();
5901 : }
5902 0 : result = (int)OSRSpatialReferenceShadow_IsSameGeogCS(arg1,arg2);
5903 0 : if ( bLocalUseExceptions ) {
5904 0 : popErrorHandler();
5905 : }
5906 : #ifndef SED_HACKS
5907 : if ( bLocalUseExceptions ) {
5908 : CPLErr eclass = CPLGetLastErrorType();
5909 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5910 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5911 : }
5912 : }
5913 : #endif
5914 : }
5915 0 : resultobj = SWIG_From_int(static_cast< int >(result));
5916 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5917 : return resultobj;
5918 : fail:
5919 : return NULL;
5920 : }
5921 :
5922 :
5923 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSameVertCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5924 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5925 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5926 0 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
5927 0 : void *argp1 = 0 ;
5928 0 : int res1 = 0 ;
5929 0 : void *argp2 = 0 ;
5930 0 : int res2 = 0 ;
5931 0 : PyObject *swig_obj[2] ;
5932 0 : int result;
5933 :
5934 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_IsSameVertCS", 2, 2, swig_obj)) SWIG_fail;
5935 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5936 0 : if (!SWIG_IsOK(res1)) {
5937 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSameVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5938 : }
5939 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5940 0 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5941 0 : if (!SWIG_IsOK(res2)) {
5942 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSameVertCS" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
5943 : }
5944 0 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
5945 0 : {
5946 0 : if (!arg2) {
5947 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5948 : }
5949 : }
5950 0 : {
5951 0 : const int bLocalUseExceptions = GetUseExceptions();
5952 0 : if ( bLocalUseExceptions ) {
5953 0 : pushErrorHandler();
5954 : }
5955 0 : result = (int)OSRSpatialReferenceShadow_IsSameVertCS(arg1,arg2);
5956 0 : if ( bLocalUseExceptions ) {
5957 0 : popErrorHandler();
5958 : }
5959 : #ifndef SED_HACKS
5960 : if ( bLocalUseExceptions ) {
5961 : CPLErr eclass = CPLGetLastErrorType();
5962 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5963 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5964 : }
5965 : }
5966 : #endif
5967 : }
5968 0 : resultobj = SWIG_From_int(static_cast< int >(result));
5969 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5970 : return resultobj;
5971 : fail:
5972 : return NULL;
5973 : }
5974 :
5975 :
5976 225 : SWIGINTERN PyObject *_wrap_SpatialReference_IsGeographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5977 225 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5978 225 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5979 225 : void *argp1 = 0 ;
5980 225 : int res1 = 0 ;
5981 225 : PyObject *swig_obj[1] ;
5982 225 : int result;
5983 :
5984 225 : if (!args) SWIG_fail;
5985 225 : swig_obj[0] = args;
5986 225 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5987 225 : if (!SWIG_IsOK(res1)) {
5988 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsGeographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5989 : }
5990 225 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5991 225 : {
5992 225 : const int bLocalUseExceptions = GetUseExceptions();
5993 225 : if ( bLocalUseExceptions ) {
5994 222 : pushErrorHandler();
5995 : }
5996 225 : result = (int)OSRSpatialReferenceShadow_IsGeographic(arg1);
5997 225 : if ( bLocalUseExceptions ) {
5998 222 : popErrorHandler();
5999 : }
6000 : #ifndef SED_HACKS
6001 : if ( bLocalUseExceptions ) {
6002 : CPLErr eclass = CPLGetLastErrorType();
6003 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6004 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6005 : }
6006 : }
6007 : #endif
6008 : }
6009 225 : resultobj = SWIG_From_int(static_cast< int >(result));
6010 225 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6011 : return resultobj;
6012 : fail:
6013 : return NULL;
6014 : }
6015 :
6016 :
6017 1 : SWIGINTERN PyObject *_wrap_SpatialReference_IsDerivedGeographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6018 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6019 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6020 1 : void *argp1 = 0 ;
6021 1 : int res1 = 0 ;
6022 1 : PyObject *swig_obj[1] ;
6023 1 : int result;
6024 :
6025 1 : if (!args) SWIG_fail;
6026 1 : swig_obj[0] = args;
6027 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6028 1 : if (!SWIG_IsOK(res1)) {
6029 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsDerivedGeographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6030 : }
6031 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6032 1 : {
6033 1 : const int bLocalUseExceptions = GetUseExceptions();
6034 1 : if ( bLocalUseExceptions ) {
6035 0 : pushErrorHandler();
6036 : }
6037 1 : result = (int)OSRSpatialReferenceShadow_IsDerivedGeographic(arg1);
6038 1 : if ( bLocalUseExceptions ) {
6039 0 : popErrorHandler();
6040 : }
6041 : #ifndef SED_HACKS
6042 : if ( bLocalUseExceptions ) {
6043 : CPLErr eclass = CPLGetLastErrorType();
6044 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6045 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6046 : }
6047 : }
6048 : #endif
6049 : }
6050 1 : resultobj = SWIG_From_int(static_cast< int >(result));
6051 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6052 : return resultobj;
6053 : fail:
6054 : return NULL;
6055 : }
6056 :
6057 :
6058 437 : SWIGINTERN PyObject *_wrap_SpatialReference_IsProjected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6059 437 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6060 437 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6061 437 : void *argp1 = 0 ;
6062 437 : int res1 = 0 ;
6063 437 : PyObject *swig_obj[1] ;
6064 437 : int result;
6065 :
6066 437 : if (!args) SWIG_fail;
6067 437 : swig_obj[0] = args;
6068 437 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6069 437 : if (!SWIG_IsOK(res1)) {
6070 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsProjected" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6071 : }
6072 437 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6073 437 : {
6074 437 : const int bLocalUseExceptions = GetUseExceptions();
6075 437 : if ( bLocalUseExceptions ) {
6076 435 : pushErrorHandler();
6077 : }
6078 437 : result = (int)OSRSpatialReferenceShadow_IsProjected(arg1);
6079 437 : if ( bLocalUseExceptions ) {
6080 435 : popErrorHandler();
6081 : }
6082 : #ifndef SED_HACKS
6083 : if ( bLocalUseExceptions ) {
6084 : CPLErr eclass = CPLGetLastErrorType();
6085 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6086 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6087 : }
6088 : }
6089 : #endif
6090 : }
6091 437 : resultobj = SWIG_From_int(static_cast< int >(result));
6092 437 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6093 : return resultobj;
6094 : fail:
6095 : return NULL;
6096 : }
6097 :
6098 :
6099 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsDerivedProjected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6100 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6101 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6102 0 : void *argp1 = 0 ;
6103 0 : int res1 = 0 ;
6104 0 : PyObject *swig_obj[1] ;
6105 0 : int result;
6106 :
6107 0 : if (!args) SWIG_fail;
6108 0 : swig_obj[0] = args;
6109 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6110 0 : if (!SWIG_IsOK(res1)) {
6111 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsDerivedProjected" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6112 : }
6113 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6114 0 : {
6115 0 : const int bLocalUseExceptions = GetUseExceptions();
6116 0 : if ( bLocalUseExceptions ) {
6117 0 : pushErrorHandler();
6118 : }
6119 0 : result = (int)OSRSpatialReferenceShadow_IsDerivedProjected(arg1);
6120 0 : if ( bLocalUseExceptions ) {
6121 0 : popErrorHandler();
6122 : }
6123 : #ifndef SED_HACKS
6124 : if ( bLocalUseExceptions ) {
6125 : CPLErr eclass = CPLGetLastErrorType();
6126 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6127 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6128 : }
6129 : }
6130 : #endif
6131 : }
6132 0 : resultobj = SWIG_From_int(static_cast< int >(result));
6133 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6134 : return resultobj;
6135 : fail:
6136 : return NULL;
6137 : }
6138 :
6139 :
6140 5 : SWIGINTERN PyObject *_wrap_SpatialReference_IsCompound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6141 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6142 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6143 5 : void *argp1 = 0 ;
6144 5 : int res1 = 0 ;
6145 5 : PyObject *swig_obj[1] ;
6146 5 : int result;
6147 :
6148 5 : if (!args) SWIG_fail;
6149 5 : swig_obj[0] = args;
6150 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6151 5 : if (!SWIG_IsOK(res1)) {
6152 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsCompound" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6153 : }
6154 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6155 5 : {
6156 5 : const int bLocalUseExceptions = GetUseExceptions();
6157 5 : if ( bLocalUseExceptions ) {
6158 3 : pushErrorHandler();
6159 : }
6160 5 : result = (int)OSRSpatialReferenceShadow_IsCompound(arg1);
6161 5 : if ( bLocalUseExceptions ) {
6162 3 : popErrorHandler();
6163 : }
6164 : #ifndef SED_HACKS
6165 : if ( bLocalUseExceptions ) {
6166 : CPLErr eclass = CPLGetLastErrorType();
6167 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6168 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6169 : }
6170 : }
6171 : #endif
6172 : }
6173 5 : resultobj = SWIG_From_int(static_cast< int >(result));
6174 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6175 : return resultobj;
6176 : fail:
6177 : return NULL;
6178 : }
6179 :
6180 :
6181 2 : SWIGINTERN PyObject *_wrap_SpatialReference_IsGeocentric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6182 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6183 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6184 2 : void *argp1 = 0 ;
6185 2 : int res1 = 0 ;
6186 2 : PyObject *swig_obj[1] ;
6187 2 : int result;
6188 :
6189 2 : if (!args) SWIG_fail;
6190 2 : swig_obj[0] = args;
6191 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6192 2 : if (!SWIG_IsOK(res1)) {
6193 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsGeocentric" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6194 : }
6195 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6196 2 : {
6197 2 : const int bLocalUseExceptions = GetUseExceptions();
6198 2 : if ( bLocalUseExceptions ) {
6199 2 : pushErrorHandler();
6200 : }
6201 2 : result = (int)OSRSpatialReferenceShadow_IsGeocentric(arg1);
6202 2 : if ( bLocalUseExceptions ) {
6203 2 : popErrorHandler();
6204 : }
6205 : #ifndef SED_HACKS
6206 : if ( bLocalUseExceptions ) {
6207 : CPLErr eclass = CPLGetLastErrorType();
6208 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6209 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6210 : }
6211 : }
6212 : #endif
6213 : }
6214 2 : resultobj = SWIG_From_int(static_cast< int >(result));
6215 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6216 : return resultobj;
6217 : fail:
6218 : return NULL;
6219 : }
6220 :
6221 :
6222 4 : SWIGINTERN PyObject *_wrap_SpatialReference_IsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6223 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6224 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6225 4 : void *argp1 = 0 ;
6226 4 : int res1 = 0 ;
6227 4 : PyObject *swig_obj[1] ;
6228 4 : int result;
6229 :
6230 4 : if (!args) SWIG_fail;
6231 4 : swig_obj[0] = args;
6232 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6233 4 : if (!SWIG_IsOK(res1)) {
6234 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsLocal" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6235 : }
6236 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6237 4 : {
6238 4 : const int bLocalUseExceptions = GetUseExceptions();
6239 4 : if ( bLocalUseExceptions ) {
6240 1 : pushErrorHandler();
6241 : }
6242 4 : result = (int)OSRSpatialReferenceShadow_IsLocal(arg1);
6243 4 : if ( bLocalUseExceptions ) {
6244 1 : popErrorHandler();
6245 : }
6246 : #ifndef SED_HACKS
6247 : if ( bLocalUseExceptions ) {
6248 : CPLErr eclass = CPLGetLastErrorType();
6249 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6250 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6251 : }
6252 : }
6253 : #endif
6254 : }
6255 4 : resultobj = SWIG_From_int(static_cast< int >(result));
6256 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6257 : return resultobj;
6258 : fail:
6259 : return NULL;
6260 : }
6261 :
6262 :
6263 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsVertical(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6264 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6265 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6266 0 : void *argp1 = 0 ;
6267 0 : int res1 = 0 ;
6268 0 : PyObject *swig_obj[1] ;
6269 0 : int result;
6270 :
6271 0 : if (!args) SWIG_fail;
6272 0 : swig_obj[0] = args;
6273 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6274 0 : if (!SWIG_IsOK(res1)) {
6275 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsVertical" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6276 : }
6277 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6278 0 : {
6279 0 : const int bLocalUseExceptions = GetUseExceptions();
6280 0 : if ( bLocalUseExceptions ) {
6281 0 : pushErrorHandler();
6282 : }
6283 0 : result = (int)OSRSpatialReferenceShadow_IsVertical(arg1);
6284 0 : if ( bLocalUseExceptions ) {
6285 0 : popErrorHandler();
6286 : }
6287 : #ifndef SED_HACKS
6288 : if ( bLocalUseExceptions ) {
6289 : CPLErr eclass = CPLGetLastErrorType();
6290 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6291 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6292 : }
6293 : }
6294 : #endif
6295 : }
6296 0 : resultobj = SWIG_From_int(static_cast< int >(result));
6297 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6298 : return resultobj;
6299 : fail:
6300 : return NULL;
6301 : }
6302 :
6303 :
6304 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsDynamic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6305 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6306 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6307 0 : void *argp1 = 0 ;
6308 0 : int res1 = 0 ;
6309 0 : PyObject *swig_obj[1] ;
6310 0 : bool result;
6311 :
6312 0 : if (!args) SWIG_fail;
6313 0 : swig_obj[0] = args;
6314 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6315 0 : if (!SWIG_IsOK(res1)) {
6316 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsDynamic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6317 : }
6318 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6319 0 : {
6320 0 : const int bLocalUseExceptions = GetUseExceptions();
6321 0 : if ( bLocalUseExceptions ) {
6322 0 : pushErrorHandler();
6323 : }
6324 0 : result = (bool)OSRSpatialReferenceShadow_IsDynamic(arg1);
6325 0 : if ( bLocalUseExceptions ) {
6326 0 : popErrorHandler();
6327 : }
6328 : #ifndef SED_HACKS
6329 : if ( bLocalUseExceptions ) {
6330 : CPLErr eclass = CPLGetLastErrorType();
6331 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6332 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6333 : }
6334 : }
6335 : #endif
6336 : }
6337 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
6338 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6339 : return resultobj;
6340 : fail:
6341 : return NULL;
6342 : }
6343 :
6344 :
6345 0 : SWIGINTERN PyObject *_wrap_SpatialReference_HasPointMotionOperation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6346 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6347 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6348 0 : void *argp1 = 0 ;
6349 0 : int res1 = 0 ;
6350 0 : PyObject *swig_obj[1] ;
6351 0 : bool result;
6352 :
6353 0 : if (!args) SWIG_fail;
6354 0 : swig_obj[0] = args;
6355 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6356 0 : if (!SWIG_IsOK(res1)) {
6357 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_HasPointMotionOperation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6358 : }
6359 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6360 0 : {
6361 0 : const int bLocalUseExceptions = GetUseExceptions();
6362 0 : if ( bLocalUseExceptions ) {
6363 0 : pushErrorHandler();
6364 : }
6365 0 : result = (bool)OSRSpatialReferenceShadow_HasPointMotionOperation(arg1);
6366 0 : if ( bLocalUseExceptions ) {
6367 0 : popErrorHandler();
6368 : }
6369 : #ifndef SED_HACKS
6370 : if ( bLocalUseExceptions ) {
6371 : CPLErr eclass = CPLGetLastErrorType();
6372 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6373 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6374 : }
6375 : }
6376 : #endif
6377 : }
6378 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
6379 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6380 : return resultobj;
6381 : fail:
6382 : return NULL;
6383 : }
6384 :
6385 :
6386 30 : SWIGINTERN PyObject *_wrap_SpatialReference_GetCoordinateEpoch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6387 30 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6388 30 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6389 30 : void *argp1 = 0 ;
6390 30 : int res1 = 0 ;
6391 30 : PyObject *swig_obj[1] ;
6392 30 : double result;
6393 :
6394 30 : if (!args) SWIG_fail;
6395 30 : swig_obj[0] = args;
6396 30 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6397 30 : if (!SWIG_IsOK(res1)) {
6398 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetCoordinateEpoch" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6399 : }
6400 30 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6401 30 : {
6402 30 : const int bLocalUseExceptions = GetUseExceptions();
6403 30 : if ( bLocalUseExceptions ) {
6404 16 : pushErrorHandler();
6405 : }
6406 30 : result = (double)OSRSpatialReferenceShadow_GetCoordinateEpoch(arg1);
6407 30 : if ( bLocalUseExceptions ) {
6408 16 : popErrorHandler();
6409 : }
6410 : #ifndef SED_HACKS
6411 : if ( bLocalUseExceptions ) {
6412 : CPLErr eclass = CPLGetLastErrorType();
6413 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6414 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6415 : }
6416 : }
6417 : #endif
6418 : }
6419 30 : resultobj = SWIG_From_double(static_cast< double >(result));
6420 30 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6421 : return resultobj;
6422 : fail:
6423 : return NULL;
6424 : }
6425 :
6426 :
6427 31 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCoordinateEpoch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6428 31 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6429 31 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6430 31 : double arg2 ;
6431 31 : void *argp1 = 0 ;
6432 31 : int res1 = 0 ;
6433 31 : double val2 ;
6434 31 : int ecode2 = 0 ;
6435 31 : PyObject *swig_obj[2] ;
6436 :
6437 31 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetCoordinateEpoch", 2, 2, swig_obj)) SWIG_fail;
6438 31 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6439 31 : if (!SWIG_IsOK(res1)) {
6440 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCoordinateEpoch" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6441 : }
6442 31 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6443 31 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
6444 31 : if (!SWIG_IsOK(ecode2)) {
6445 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCoordinateEpoch" "', argument " "2"" of type '" "double""'");
6446 : }
6447 31 : arg2 = static_cast< double >(val2);
6448 31 : {
6449 31 : const int bLocalUseExceptions = GetUseExceptions();
6450 31 : if ( bLocalUseExceptions ) {
6451 17 : pushErrorHandler();
6452 : }
6453 31 : OSRSpatialReferenceShadow_SetCoordinateEpoch(arg1,arg2);
6454 31 : if ( bLocalUseExceptions ) {
6455 17 : popErrorHandler();
6456 : }
6457 : #ifndef SED_HACKS
6458 : if ( bLocalUseExceptions ) {
6459 : CPLErr eclass = CPLGetLastErrorType();
6460 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6461 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6462 : }
6463 : }
6464 : #endif
6465 : }
6466 31 : resultobj = SWIG_Py_Void();
6467 31 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6468 : return resultobj;
6469 : fail:
6470 : return NULL;
6471 : }
6472 :
6473 :
6474 207 : SWIGINTERN PyObject *_wrap_SpatialReference_EPSGTreatsAsLatLong(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6475 207 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6476 207 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6477 207 : void *argp1 = 0 ;
6478 207 : int res1 = 0 ;
6479 207 : PyObject *swig_obj[1] ;
6480 207 : int result;
6481 :
6482 207 : if (!args) SWIG_fail;
6483 207 : swig_obj[0] = args;
6484 207 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6485 207 : if (!SWIG_IsOK(res1)) {
6486 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_EPSGTreatsAsLatLong" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6487 : }
6488 207 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6489 207 : {
6490 207 : const int bLocalUseExceptions = GetUseExceptions();
6491 207 : if ( bLocalUseExceptions ) {
6492 207 : pushErrorHandler();
6493 : }
6494 207 : result = (int)OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(arg1);
6495 207 : if ( bLocalUseExceptions ) {
6496 207 : popErrorHandler();
6497 : }
6498 : #ifndef SED_HACKS
6499 : if ( bLocalUseExceptions ) {
6500 : CPLErr eclass = CPLGetLastErrorType();
6501 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6502 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6503 : }
6504 : }
6505 : #endif
6506 : }
6507 207 : resultobj = SWIG_From_int(static_cast< int >(result));
6508 207 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6509 : return resultobj;
6510 : fail:
6511 : return NULL;
6512 : }
6513 :
6514 :
6515 214 : SWIGINTERN PyObject *_wrap_SpatialReference_EPSGTreatsAsNorthingEasting(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6516 214 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6517 214 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6518 214 : void *argp1 = 0 ;
6519 214 : int res1 = 0 ;
6520 214 : PyObject *swig_obj[1] ;
6521 214 : int result;
6522 :
6523 214 : if (!args) SWIG_fail;
6524 214 : swig_obj[0] = args;
6525 214 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6526 214 : if (!SWIG_IsOK(res1)) {
6527 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_EPSGTreatsAsNorthingEasting" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6528 : }
6529 214 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6530 214 : {
6531 214 : const int bLocalUseExceptions = GetUseExceptions();
6532 214 : if ( bLocalUseExceptions ) {
6533 214 : pushErrorHandler();
6534 : }
6535 214 : result = (int)OSRSpatialReferenceShadow_EPSGTreatsAsNorthingEasting(arg1);
6536 214 : if ( bLocalUseExceptions ) {
6537 214 : popErrorHandler();
6538 : }
6539 : #ifndef SED_HACKS
6540 : if ( bLocalUseExceptions ) {
6541 : CPLErr eclass = CPLGetLastErrorType();
6542 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6543 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6544 : }
6545 : }
6546 : #endif
6547 : }
6548 214 : resultobj = SWIG_From_int(static_cast< int >(result));
6549 214 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6550 : return resultobj;
6551 : fail:
6552 : return NULL;
6553 : }
6554 :
6555 :
6556 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAuthority(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6557 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6558 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6559 0 : char *arg2 = (char *) 0 ;
6560 0 : char *arg3 = (char *) 0 ;
6561 0 : int arg4 ;
6562 0 : void *argp1 = 0 ;
6563 0 : int res1 = 0 ;
6564 0 : int res2 ;
6565 0 : char *buf2 = 0 ;
6566 0 : int alloc2 = 0 ;
6567 0 : int res3 ;
6568 0 : char *buf3 = 0 ;
6569 0 : int alloc3 = 0 ;
6570 0 : int val4 ;
6571 0 : int ecode4 = 0 ;
6572 0 : PyObject *swig_obj[4] ;
6573 0 : OGRErr result;
6574 :
6575 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAuthority", 4, 4, swig_obj)) SWIG_fail;
6576 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6577 0 : if (!SWIG_IsOK(res1)) {
6578 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAuthority" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6579 : }
6580 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6581 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6582 0 : if (!SWIG_IsOK(res2)) {
6583 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAuthority" "', argument " "2"" of type '" "char const *""'");
6584 : }
6585 0 : arg2 = reinterpret_cast< char * >(buf2);
6586 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6587 0 : if (!SWIG_IsOK(res3)) {
6588 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetAuthority" "', argument " "3"" of type '" "char const *""'");
6589 : }
6590 0 : arg3 = reinterpret_cast< char * >(buf3);
6591 0 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
6592 0 : if (!SWIG_IsOK(ecode4)) {
6593 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetAuthority" "', argument " "4"" of type '" "int""'");
6594 : }
6595 0 : arg4 = static_cast< int >(val4);
6596 0 : {
6597 0 : const int bLocalUseExceptions = GetUseExceptions();
6598 0 : if ( bLocalUseExceptions ) {
6599 0 : pushErrorHandler();
6600 : }
6601 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAuthority(arg1,(char const *)arg2,(char const *)arg3,arg4);
6602 0 : if ( bLocalUseExceptions ) {
6603 0 : popErrorHandler();
6604 : }
6605 : #ifndef SED_HACKS
6606 : if ( bLocalUseExceptions ) {
6607 : CPLErr eclass = CPLGetLastErrorType();
6608 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6609 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6610 : }
6611 : }
6612 : #endif
6613 : }
6614 0 : {
6615 : /* %typemap(out) OGRErr */
6616 0 : if ( result != 0 && GetUseExceptions()) {
6617 0 : const char* pszMessage = CPLGetLastErrorMsg();
6618 0 : if( pszMessage[0] != '\0' )
6619 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
6620 : else
6621 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6622 0 : SWIG_fail;
6623 : }
6624 : }
6625 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6626 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6627 0 : {
6628 : /* %typemap(ret) OGRErr */
6629 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
6630 0 : resultobj = PyInt_FromLong( result );
6631 : }
6632 : }
6633 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6634 : return resultobj;
6635 0 : fail:
6636 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6637 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6638 : return NULL;
6639 : }
6640 :
6641 :
6642 37 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAttrValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6643 37 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6644 37 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6645 37 : char *arg2 = (char *) 0 ;
6646 37 : int arg3 = (int) 0 ;
6647 37 : void *argp1 = 0 ;
6648 37 : int res1 = 0 ;
6649 37 : int res2 ;
6650 37 : char *buf2 = 0 ;
6651 37 : int alloc2 = 0 ;
6652 37 : int val3 ;
6653 37 : int ecode3 = 0 ;
6654 37 : PyObject *swig_obj[3] ;
6655 37 : char *result = 0 ;
6656 :
6657 37 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAttrValue", 2, 3, swig_obj)) SWIG_fail;
6658 37 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6659 37 : if (!SWIG_IsOK(res1)) {
6660 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAttrValue" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6661 : }
6662 37 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6663 37 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6664 37 : if (!SWIG_IsOK(res2)) {
6665 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAttrValue" "', argument " "2"" of type '" "char const *""'");
6666 : }
6667 37 : arg2 = reinterpret_cast< char * >(buf2);
6668 37 : if (swig_obj[2]) {
6669 9 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
6670 9 : if (!SWIG_IsOK(ecode3)) {
6671 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAttrValue" "', argument " "3"" of type '" "int""'");
6672 : }
6673 : arg3 = static_cast< int >(val3);
6674 : }
6675 37 : {
6676 37 : if (!arg2) {
6677 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6678 : }
6679 : }
6680 37 : {
6681 37 : const int bLocalUseExceptions = GetUseExceptions();
6682 37 : if ( bLocalUseExceptions ) {
6683 22 : pushErrorHandler();
6684 : }
6685 37 : result = (char *)OSRSpatialReferenceShadow_GetAttrValue(arg1,(char const *)arg2,arg3);
6686 37 : if ( bLocalUseExceptions ) {
6687 22 : popErrorHandler();
6688 : }
6689 : #ifndef SED_HACKS
6690 : if ( bLocalUseExceptions ) {
6691 : CPLErr eclass = CPLGetLastErrorType();
6692 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6693 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6694 : }
6695 : }
6696 : #endif
6697 : }
6698 37 : resultobj = SWIG_FromCharPtr((const char *)result);
6699 37 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6700 37 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6701 : return resultobj;
6702 0 : fail:
6703 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6704 : return NULL;
6705 : }
6706 :
6707 :
6708 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAttrValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6709 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6710 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6711 1 : char *arg2 = (char *) 0 ;
6712 1 : char *arg3 = (char *) 0 ;
6713 1 : void *argp1 = 0 ;
6714 1 : int res1 = 0 ;
6715 1 : int res2 ;
6716 1 : char *buf2 = 0 ;
6717 1 : int alloc2 = 0 ;
6718 1 : int res3 ;
6719 1 : char *buf3 = 0 ;
6720 1 : int alloc3 = 0 ;
6721 1 : PyObject *swig_obj[3] ;
6722 1 : OGRErr result;
6723 :
6724 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAttrValue", 3, 3, swig_obj)) SWIG_fail;
6725 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6726 1 : if (!SWIG_IsOK(res1)) {
6727 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAttrValue" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6728 : }
6729 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6730 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6731 1 : if (!SWIG_IsOK(res2)) {
6732 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAttrValue" "', argument " "2"" of type '" "char const *""'");
6733 : }
6734 1 : arg2 = reinterpret_cast< char * >(buf2);
6735 1 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6736 1 : if (!SWIG_IsOK(res3)) {
6737 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetAttrValue" "', argument " "3"" of type '" "char const *""'");
6738 : }
6739 1 : arg3 = reinterpret_cast< char * >(buf3);
6740 1 : {
6741 1 : if (!arg2) {
6742 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6743 : }
6744 : }
6745 1 : {
6746 1 : const int bLocalUseExceptions = GetUseExceptions();
6747 1 : if ( bLocalUseExceptions ) {
6748 1 : pushErrorHandler();
6749 : }
6750 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetAttrValue(arg1,(char const *)arg2,(char const *)arg3);
6751 1 : if ( bLocalUseExceptions ) {
6752 1 : popErrorHandler();
6753 : }
6754 : #ifndef SED_HACKS
6755 : if ( bLocalUseExceptions ) {
6756 : CPLErr eclass = CPLGetLastErrorType();
6757 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6758 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6759 : }
6760 : }
6761 : #endif
6762 : }
6763 1 : {
6764 : /* %typemap(out) OGRErr */
6765 1 : if ( result != 0 && GetUseExceptions()) {
6766 0 : const char* pszMessage = CPLGetLastErrorMsg();
6767 0 : if( pszMessage[0] != '\0' )
6768 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
6769 : else
6770 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6771 0 : SWIG_fail;
6772 : }
6773 : }
6774 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6775 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6776 1 : {
6777 : /* %typemap(ret) OGRErr */
6778 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
6779 1 : resultobj = PyInt_FromLong( result );
6780 : }
6781 : }
6782 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6783 : return resultobj;
6784 0 : fail:
6785 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6786 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6787 : return NULL;
6788 : }
6789 :
6790 :
6791 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAngularUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6792 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6793 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6794 0 : char *arg2 = (char *) 0 ;
6795 0 : double arg3 ;
6796 0 : void *argp1 = 0 ;
6797 0 : int res1 = 0 ;
6798 0 : int res2 ;
6799 0 : char *buf2 = 0 ;
6800 0 : int alloc2 = 0 ;
6801 0 : double val3 ;
6802 0 : int ecode3 = 0 ;
6803 0 : PyObject *swig_obj[3] ;
6804 0 : OGRErr result;
6805 :
6806 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAngularUnits", 3, 3, swig_obj)) SWIG_fail;
6807 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6808 0 : if (!SWIG_IsOK(res1)) {
6809 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAngularUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6810 : }
6811 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6812 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6813 0 : if (!SWIG_IsOK(res2)) {
6814 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAngularUnits" "', argument " "2"" of type '" "char const *""'");
6815 : }
6816 0 : arg2 = reinterpret_cast< char * >(buf2);
6817 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
6818 0 : if (!SWIG_IsOK(ecode3)) {
6819 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetAngularUnits" "', argument " "3"" of type '" "double""'");
6820 : }
6821 0 : arg3 = static_cast< double >(val3);
6822 0 : {
6823 0 : if (!arg2) {
6824 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6825 : }
6826 : }
6827 0 : {
6828 0 : const int bLocalUseExceptions = GetUseExceptions();
6829 0 : if ( bLocalUseExceptions ) {
6830 0 : pushErrorHandler();
6831 : }
6832 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAngularUnits(arg1,(char const *)arg2,arg3);
6833 0 : if ( bLocalUseExceptions ) {
6834 0 : popErrorHandler();
6835 : }
6836 : #ifndef SED_HACKS
6837 : if ( bLocalUseExceptions ) {
6838 : CPLErr eclass = CPLGetLastErrorType();
6839 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6840 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6841 : }
6842 : }
6843 : #endif
6844 : }
6845 0 : {
6846 : /* %typemap(out) OGRErr */
6847 0 : if ( result != 0 && GetUseExceptions()) {
6848 0 : const char* pszMessage = CPLGetLastErrorMsg();
6849 0 : if( pszMessage[0] != '\0' )
6850 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
6851 : else
6852 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6853 0 : SWIG_fail;
6854 : }
6855 : }
6856 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6857 0 : {
6858 : /* %typemap(ret) OGRErr */
6859 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
6860 0 : resultobj = PyInt_FromLong( result );
6861 : }
6862 : }
6863 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6864 : return resultobj;
6865 0 : fail:
6866 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6867 : return NULL;
6868 : }
6869 :
6870 :
6871 0 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAngularUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6872 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6873 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6874 0 : void *argp1 = 0 ;
6875 0 : int res1 = 0 ;
6876 0 : PyObject *swig_obj[1] ;
6877 0 : double result;
6878 :
6879 0 : if (!args) SWIG_fail;
6880 0 : swig_obj[0] = args;
6881 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6882 0 : if (!SWIG_IsOK(res1)) {
6883 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAngularUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6884 : }
6885 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6886 0 : {
6887 0 : const int bLocalUseExceptions = GetUseExceptions();
6888 0 : if ( bLocalUseExceptions ) {
6889 0 : pushErrorHandler();
6890 : }
6891 0 : result = (double)OSRSpatialReferenceShadow_GetAngularUnits(arg1);
6892 0 : if ( bLocalUseExceptions ) {
6893 0 : popErrorHandler();
6894 : }
6895 : #ifndef SED_HACKS
6896 : if ( bLocalUseExceptions ) {
6897 : CPLErr eclass = CPLGetLastErrorType();
6898 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6899 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6900 : }
6901 : }
6902 : #endif
6903 : }
6904 0 : resultobj = SWIG_From_double(static_cast< double >(result));
6905 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6906 : return resultobj;
6907 : fail:
6908 : return NULL;
6909 : }
6910 :
6911 :
6912 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAngularUnitsName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6913 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6914 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6915 1 : void *argp1 = 0 ;
6916 1 : int res1 = 0 ;
6917 1 : PyObject *swig_obj[1] ;
6918 1 : char *result = 0 ;
6919 :
6920 1 : if (!args) SWIG_fail;
6921 1 : swig_obj[0] = args;
6922 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6923 1 : if (!SWIG_IsOK(res1)) {
6924 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAngularUnitsName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6925 : }
6926 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6927 1 : {
6928 1 : const int bLocalUseExceptions = GetUseExceptions();
6929 1 : if ( bLocalUseExceptions ) {
6930 1 : pushErrorHandler();
6931 : }
6932 1 : result = (char *)OSRSpatialReferenceShadow_GetAngularUnitsName(arg1);
6933 1 : if ( bLocalUseExceptions ) {
6934 1 : popErrorHandler();
6935 : }
6936 : #ifndef SED_HACKS
6937 : if ( bLocalUseExceptions ) {
6938 : CPLErr eclass = CPLGetLastErrorType();
6939 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6940 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6941 : }
6942 : }
6943 : #endif
6944 : }
6945 1 : resultobj = SWIG_FromCharPtr((const char *)result);
6946 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6947 : return resultobj;
6948 : fail:
6949 : return NULL;
6950 : }
6951 :
6952 :
6953 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTargetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6954 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6955 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6956 1 : char *arg2 = (char *) 0 ;
6957 1 : char *arg3 = (char *) 0 ;
6958 1 : double arg4 ;
6959 1 : void *argp1 = 0 ;
6960 1 : int res1 = 0 ;
6961 1 : int res2 ;
6962 1 : char *buf2 = 0 ;
6963 1 : int alloc2 = 0 ;
6964 1 : int res3 ;
6965 1 : char *buf3 = 0 ;
6966 1 : int alloc3 = 0 ;
6967 1 : double val4 ;
6968 1 : int ecode4 = 0 ;
6969 1 : PyObject *swig_obj[4] ;
6970 1 : OGRErr result;
6971 :
6972 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetTargetLinearUnits", 4, 4, swig_obj)) SWIG_fail;
6973 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6974 1 : if (!SWIG_IsOK(res1)) {
6975 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6976 : }
6977 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6978 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6979 1 : if (!SWIG_IsOK(res2)) {
6980 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "2"" of type '" "char const *""'");
6981 : }
6982 1 : arg2 = reinterpret_cast< char * >(buf2);
6983 1 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6984 1 : if (!SWIG_IsOK(res3)) {
6985 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "3"" of type '" "char const *""'");
6986 : }
6987 1 : arg3 = reinterpret_cast< char * >(buf3);
6988 1 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
6989 1 : if (!SWIG_IsOK(ecode4)) {
6990 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "4"" of type '" "double""'");
6991 : }
6992 1 : arg4 = static_cast< double >(val4);
6993 1 : {
6994 1 : if (!arg3) {
6995 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6996 : }
6997 : }
6998 1 : {
6999 1 : const int bLocalUseExceptions = GetUseExceptions();
7000 1 : if ( bLocalUseExceptions ) {
7001 1 : pushErrorHandler();
7002 : }
7003 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetTargetLinearUnits(arg1,(char const *)arg2,(char const *)arg3,arg4);
7004 1 : if ( bLocalUseExceptions ) {
7005 1 : popErrorHandler();
7006 : }
7007 : #ifndef SED_HACKS
7008 : if ( bLocalUseExceptions ) {
7009 : CPLErr eclass = CPLGetLastErrorType();
7010 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7011 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7012 : }
7013 : }
7014 : #endif
7015 : }
7016 1 : {
7017 : /* %typemap(out) OGRErr */
7018 1 : if ( result != 0 && GetUseExceptions()) {
7019 0 : const char* pszMessage = CPLGetLastErrorMsg();
7020 0 : if( pszMessage[0] != '\0' )
7021 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7022 : else
7023 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7024 0 : SWIG_fail;
7025 : }
7026 : }
7027 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7028 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7029 1 : {
7030 : /* %typemap(ret) OGRErr */
7031 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7032 1 : resultobj = PyInt_FromLong( result );
7033 : }
7034 : }
7035 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7036 : return resultobj;
7037 0 : fail:
7038 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7039 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7040 : return NULL;
7041 : }
7042 :
7043 :
7044 6 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7045 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7046 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7047 6 : char *arg2 = (char *) 0 ;
7048 6 : double arg3 ;
7049 6 : void *argp1 = 0 ;
7050 6 : int res1 = 0 ;
7051 6 : int res2 ;
7052 6 : char *buf2 = 0 ;
7053 6 : int alloc2 = 0 ;
7054 6 : double val3 ;
7055 6 : int ecode3 = 0 ;
7056 6 : PyObject *swig_obj[3] ;
7057 6 : OGRErr result;
7058 :
7059 6 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetLinearUnits", 3, 3, swig_obj)) SWIG_fail;
7060 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7061 6 : if (!SWIG_IsOK(res1)) {
7062 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7063 : }
7064 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7065 6 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7066 6 : if (!SWIG_IsOK(res2)) {
7067 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLinearUnits" "', argument " "2"" of type '" "char const *""'");
7068 : }
7069 6 : arg2 = reinterpret_cast< char * >(buf2);
7070 6 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
7071 6 : if (!SWIG_IsOK(ecode3)) {
7072 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLinearUnits" "', argument " "3"" of type '" "double""'");
7073 : }
7074 6 : arg3 = static_cast< double >(val3);
7075 6 : {
7076 6 : if (!arg2) {
7077 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
7078 : }
7079 : }
7080 6 : {
7081 6 : const int bLocalUseExceptions = GetUseExceptions();
7082 6 : if ( bLocalUseExceptions ) {
7083 6 : pushErrorHandler();
7084 : }
7085 6 : result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnits(arg1,(char const *)arg2,arg3);
7086 6 : if ( bLocalUseExceptions ) {
7087 6 : popErrorHandler();
7088 : }
7089 : #ifndef SED_HACKS
7090 : if ( bLocalUseExceptions ) {
7091 : CPLErr eclass = CPLGetLastErrorType();
7092 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7093 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7094 : }
7095 : }
7096 : #endif
7097 : }
7098 6 : {
7099 : /* %typemap(out) OGRErr */
7100 6 : if ( result != 0 && GetUseExceptions()) {
7101 0 : const char* pszMessage = CPLGetLastErrorMsg();
7102 0 : if( pszMessage[0] != '\0' )
7103 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7104 : else
7105 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7106 0 : SWIG_fail;
7107 : }
7108 : }
7109 6 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7110 6 : {
7111 : /* %typemap(ret) OGRErr */
7112 6 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7113 6 : resultobj = PyInt_FromLong( result );
7114 : }
7115 : }
7116 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7117 : return resultobj;
7118 0 : fail:
7119 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7120 : return NULL;
7121 : }
7122 :
7123 :
7124 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLinearUnitsAndUpdateParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7125 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7126 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7127 1 : char *arg2 = (char *) 0 ;
7128 1 : double arg3 ;
7129 1 : void *argp1 = 0 ;
7130 1 : int res1 = 0 ;
7131 1 : int res2 ;
7132 1 : char *buf2 = 0 ;
7133 1 : int alloc2 = 0 ;
7134 1 : double val3 ;
7135 1 : int ecode3 = 0 ;
7136 1 : PyObject *swig_obj[3] ;
7137 1 : OGRErr result;
7138 :
7139 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetLinearUnitsAndUpdateParameters", 3, 3, swig_obj)) SWIG_fail;
7140 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7141 1 : if (!SWIG_IsOK(res1)) {
7142 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7143 : }
7144 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7145 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7146 1 : if (!SWIG_IsOK(res2)) {
7147 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "2"" of type '" "char const *""'");
7148 : }
7149 1 : arg2 = reinterpret_cast< char * >(buf2);
7150 1 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
7151 1 : if (!SWIG_IsOK(ecode3)) {
7152 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "3"" of type '" "double""'");
7153 : }
7154 1 : arg3 = static_cast< double >(val3);
7155 1 : {
7156 1 : if (!arg2) {
7157 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
7158 : }
7159 : }
7160 1 : {
7161 1 : const int bLocalUseExceptions = GetUseExceptions();
7162 1 : if ( bLocalUseExceptions ) {
7163 1 : pushErrorHandler();
7164 : }
7165 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(arg1,(char const *)arg2,arg3);
7166 1 : if ( bLocalUseExceptions ) {
7167 1 : popErrorHandler();
7168 : }
7169 : #ifndef SED_HACKS
7170 : if ( bLocalUseExceptions ) {
7171 : CPLErr eclass = CPLGetLastErrorType();
7172 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7173 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7174 : }
7175 : }
7176 : #endif
7177 : }
7178 1 : {
7179 : /* %typemap(out) OGRErr */
7180 1 : if ( result != 0 && GetUseExceptions()) {
7181 0 : const char* pszMessage = CPLGetLastErrorMsg();
7182 0 : if( pszMessage[0] != '\0' )
7183 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7184 : else
7185 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7186 0 : SWIG_fail;
7187 : }
7188 : }
7189 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7190 1 : {
7191 : /* %typemap(ret) OGRErr */
7192 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7193 1 : resultobj = PyInt_FromLong( result );
7194 : }
7195 : }
7196 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7197 : return resultobj;
7198 0 : fail:
7199 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7200 : return NULL;
7201 : }
7202 :
7203 :
7204 4 : SWIGINTERN PyObject *_wrap_SpatialReference_GetTargetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7205 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7206 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7207 4 : char *arg2 = (char *) 0 ;
7208 4 : void *argp1 = 0 ;
7209 4 : int res1 = 0 ;
7210 4 : int res2 ;
7211 4 : char *buf2 = 0 ;
7212 4 : int alloc2 = 0 ;
7213 4 : PyObject *swig_obj[2] ;
7214 4 : double result;
7215 :
7216 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetTargetLinearUnits", 2, 2, swig_obj)) SWIG_fail;
7217 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7218 4 : if (!SWIG_IsOK(res1)) {
7219 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetTargetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7220 : }
7221 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7222 4 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7223 4 : if (!SWIG_IsOK(res2)) {
7224 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetTargetLinearUnits" "', argument " "2"" of type '" "char const *""'");
7225 : }
7226 4 : arg2 = reinterpret_cast< char * >(buf2);
7227 4 : {
7228 4 : const int bLocalUseExceptions = GetUseExceptions();
7229 4 : if ( bLocalUseExceptions ) {
7230 4 : pushErrorHandler();
7231 : }
7232 4 : result = (double)OSRSpatialReferenceShadow_GetTargetLinearUnits(arg1,(char const *)arg2);
7233 4 : if ( bLocalUseExceptions ) {
7234 4 : popErrorHandler();
7235 : }
7236 : #ifndef SED_HACKS
7237 : if ( bLocalUseExceptions ) {
7238 : CPLErr eclass = CPLGetLastErrorType();
7239 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7240 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7241 : }
7242 : }
7243 : #endif
7244 : }
7245 4 : resultobj = SWIG_From_double(static_cast< double >(result));
7246 4 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7247 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7248 : return resultobj;
7249 0 : fail:
7250 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7251 : return NULL;
7252 : }
7253 :
7254 :
7255 230 : SWIGINTERN PyObject *_wrap_SpatialReference_GetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7256 230 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7257 230 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7258 230 : void *argp1 = 0 ;
7259 230 : int res1 = 0 ;
7260 230 : PyObject *swig_obj[1] ;
7261 230 : double result;
7262 :
7263 230 : if (!args) SWIG_fail;
7264 230 : swig_obj[0] = args;
7265 230 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7266 230 : if (!SWIG_IsOK(res1)) {
7267 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7268 : }
7269 230 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7270 230 : {
7271 230 : const int bLocalUseExceptions = GetUseExceptions();
7272 230 : if ( bLocalUseExceptions ) {
7273 228 : pushErrorHandler();
7274 : }
7275 230 : result = (double)OSRSpatialReferenceShadow_GetLinearUnits(arg1);
7276 230 : if ( bLocalUseExceptions ) {
7277 228 : popErrorHandler();
7278 : }
7279 : #ifndef SED_HACKS
7280 : if ( bLocalUseExceptions ) {
7281 : CPLErr eclass = CPLGetLastErrorType();
7282 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7283 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7284 : }
7285 : }
7286 : #endif
7287 : }
7288 230 : resultobj = SWIG_From_double(static_cast< double >(result));
7289 230 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7290 : return resultobj;
7291 : fail:
7292 : return NULL;
7293 : }
7294 :
7295 :
7296 24 : SWIGINTERN PyObject *_wrap_SpatialReference_GetLinearUnitsName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7297 24 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7298 24 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7299 24 : void *argp1 = 0 ;
7300 24 : int res1 = 0 ;
7301 24 : PyObject *swig_obj[1] ;
7302 24 : char *result = 0 ;
7303 :
7304 24 : if (!args) SWIG_fail;
7305 24 : swig_obj[0] = args;
7306 24 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7307 24 : if (!SWIG_IsOK(res1)) {
7308 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetLinearUnitsName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7309 : }
7310 24 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7311 24 : {
7312 24 : const int bLocalUseExceptions = GetUseExceptions();
7313 24 : if ( bLocalUseExceptions ) {
7314 24 : pushErrorHandler();
7315 : }
7316 24 : result = (char *)OSRSpatialReferenceShadow_GetLinearUnitsName(arg1);
7317 24 : if ( bLocalUseExceptions ) {
7318 24 : popErrorHandler();
7319 : }
7320 : #ifndef SED_HACKS
7321 : if ( bLocalUseExceptions ) {
7322 : CPLErr eclass = CPLGetLastErrorType();
7323 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7324 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7325 : }
7326 : }
7327 : #endif
7328 : }
7329 24 : resultobj = SWIG_FromCharPtr((const char *)result);
7330 24 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7331 : return resultobj;
7332 : fail:
7333 : return NULL;
7334 : }
7335 :
7336 :
7337 748 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAuthorityCode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7338 748 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7339 748 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7340 748 : char *arg2 = (char *) NULL ;
7341 748 : void *argp1 = 0 ;
7342 748 : int res1 = 0 ;
7343 748 : int res2 ;
7344 748 : char *buf2 = 0 ;
7345 748 : int alloc2 = 0 ;
7346 748 : PyObject *swig_obj[2] ;
7347 748 : char *result = 0 ;
7348 :
7349 748 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAuthorityCode", 1, 2, swig_obj)) SWIG_fail;
7350 748 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7351 748 : if (!SWIG_IsOK(res1)) {
7352 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAuthorityCode" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7353 : }
7354 748 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7355 748 : if (swig_obj[1]) {
7356 186 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7357 186 : if (!SWIG_IsOK(res2)) {
7358 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAuthorityCode" "', argument " "2"" of type '" "char const *""'");
7359 : }
7360 186 : arg2 = reinterpret_cast< char * >(buf2);
7361 : }
7362 748 : {
7363 748 : const int bLocalUseExceptions = GetUseExceptions();
7364 748 : if ( bLocalUseExceptions ) {
7365 467 : pushErrorHandler();
7366 : }
7367 748 : result = (char *)OSRSpatialReferenceShadow_GetAuthorityCode(arg1,(char const *)arg2);
7368 748 : if ( bLocalUseExceptions ) {
7369 467 : popErrorHandler();
7370 : }
7371 : #ifndef SED_HACKS
7372 : if ( bLocalUseExceptions ) {
7373 : CPLErr eclass = CPLGetLastErrorType();
7374 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7375 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7376 : }
7377 : }
7378 : #endif
7379 : }
7380 748 : resultobj = SWIG_FromCharPtr((const char *)result);
7381 748 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7382 748 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7383 : return resultobj;
7384 0 : fail:
7385 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7386 : return NULL;
7387 : }
7388 :
7389 :
7390 28 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAuthorityName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7391 28 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7392 28 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7393 28 : char *arg2 = (char *) NULL ;
7394 28 : void *argp1 = 0 ;
7395 28 : int res1 = 0 ;
7396 28 : int res2 ;
7397 28 : char *buf2 = 0 ;
7398 28 : int alloc2 = 0 ;
7399 28 : PyObject *swig_obj[2] ;
7400 28 : char *result = 0 ;
7401 :
7402 28 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAuthorityName", 1, 2, swig_obj)) SWIG_fail;
7403 28 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7404 28 : if (!SWIG_IsOK(res1)) {
7405 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAuthorityName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7406 : }
7407 28 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7408 28 : if (swig_obj[1]) {
7409 16 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7410 16 : if (!SWIG_IsOK(res2)) {
7411 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAuthorityName" "', argument " "2"" of type '" "char const *""'");
7412 : }
7413 16 : arg2 = reinterpret_cast< char * >(buf2);
7414 : }
7415 28 : {
7416 28 : const int bLocalUseExceptions = GetUseExceptions();
7417 28 : if ( bLocalUseExceptions ) {
7418 26 : pushErrorHandler();
7419 : }
7420 28 : result = (char *)OSRSpatialReferenceShadow_GetAuthorityName(arg1,(char const *)arg2);
7421 28 : if ( bLocalUseExceptions ) {
7422 26 : popErrorHandler();
7423 : }
7424 : #ifndef SED_HACKS
7425 : if ( bLocalUseExceptions ) {
7426 : CPLErr eclass = CPLGetLastErrorType();
7427 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7428 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7429 : }
7430 : }
7431 : #endif
7432 : }
7433 28 : resultobj = SWIG_FromCharPtr((const char *)result);
7434 28 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7435 28 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7436 : return resultobj;
7437 0 : fail:
7438 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7439 : return NULL;
7440 : }
7441 :
7442 :
7443 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAreaOfUse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7444 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7445 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7446 1 : void *argp1 = 0 ;
7447 1 : int res1 = 0 ;
7448 1 : PyObject *swig_obj[1] ;
7449 1 : OSRAreaOfUse *result = 0 ;
7450 :
7451 1 : if (!args) SWIG_fail;
7452 1 : swig_obj[0] = args;
7453 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7454 1 : if (!SWIG_IsOK(res1)) {
7455 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAreaOfUse" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7456 : }
7457 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7458 1 : {
7459 1 : const int bLocalUseExceptions = GetUseExceptions();
7460 1 : if ( bLocalUseExceptions ) {
7461 1 : pushErrorHandler();
7462 : }
7463 1 : result = (OSRAreaOfUse *)OSRSpatialReferenceShadow_GetAreaOfUse(arg1);
7464 1 : if ( bLocalUseExceptions ) {
7465 1 : popErrorHandler();
7466 : }
7467 : #ifndef SED_HACKS
7468 : if ( bLocalUseExceptions ) {
7469 : CPLErr eclass = CPLGetLastErrorType();
7470 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7471 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7472 : }
7473 : }
7474 : #endif
7475 : }
7476 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRAreaOfUse, SWIG_POINTER_OWN | 0 );
7477 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7478 : return resultobj;
7479 : fail:
7480 : return NULL;
7481 : }
7482 :
7483 :
7484 6 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxisName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7485 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7486 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7487 6 : char *arg2 = (char *) 0 ;
7488 6 : int arg3 ;
7489 6 : void *argp1 = 0 ;
7490 6 : int res1 = 0 ;
7491 6 : int res2 ;
7492 6 : char *buf2 = 0 ;
7493 6 : int alloc2 = 0 ;
7494 6 : int val3 ;
7495 6 : int ecode3 = 0 ;
7496 6 : PyObject *swig_obj[3] ;
7497 6 : char *result = 0 ;
7498 :
7499 6 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAxisName", 3, 3, swig_obj)) SWIG_fail;
7500 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7501 6 : if (!SWIG_IsOK(res1)) {
7502 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7503 : }
7504 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7505 6 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7506 6 : if (!SWIG_IsOK(res2)) {
7507 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAxisName" "', argument " "2"" of type '" "char const *""'");
7508 : }
7509 6 : arg2 = reinterpret_cast< char * >(buf2);
7510 6 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
7511 6 : if (!SWIG_IsOK(ecode3)) {
7512 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAxisName" "', argument " "3"" of type '" "int""'");
7513 : }
7514 6 : arg3 = static_cast< int >(val3);
7515 6 : {
7516 6 : const int bLocalUseExceptions = GetUseExceptions();
7517 6 : if ( bLocalUseExceptions ) {
7518 5 : pushErrorHandler();
7519 : }
7520 6 : result = (char *)OSRSpatialReferenceShadow_GetAxisName(arg1,(char const *)arg2,arg3);
7521 6 : if ( bLocalUseExceptions ) {
7522 5 : popErrorHandler();
7523 : }
7524 : #ifndef SED_HACKS
7525 : if ( bLocalUseExceptions ) {
7526 : CPLErr eclass = CPLGetLastErrorType();
7527 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7528 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7529 : }
7530 : }
7531 : #endif
7532 : }
7533 6 : resultobj = SWIG_FromCharPtr((const char *)result);
7534 6 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7535 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7536 : return resultobj;
7537 0 : fail:
7538 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7539 : return NULL;
7540 : }
7541 :
7542 :
7543 6 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxesCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7544 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7545 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7546 6 : void *argp1 = 0 ;
7547 6 : int res1 = 0 ;
7548 6 : PyObject *swig_obj[1] ;
7549 6 : int result;
7550 :
7551 6 : if (!args) SWIG_fail;
7552 6 : swig_obj[0] = args;
7553 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7554 6 : if (!SWIG_IsOK(res1)) {
7555 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxesCount" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7556 : }
7557 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7558 6 : {
7559 6 : const int bLocalUseExceptions = GetUseExceptions();
7560 6 : if ( bLocalUseExceptions ) {
7561 5 : pushErrorHandler();
7562 : }
7563 6 : result = (int)OSRSpatialReferenceShadow_GetAxesCount(arg1);
7564 6 : if ( bLocalUseExceptions ) {
7565 5 : popErrorHandler();
7566 : }
7567 : #ifndef SED_HACKS
7568 : if ( bLocalUseExceptions ) {
7569 : CPLErr eclass = CPLGetLastErrorType();
7570 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7571 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7572 : }
7573 : }
7574 : #endif
7575 : }
7576 6 : resultobj = SWIG_From_int(static_cast< int >(result));
7577 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7578 : return resultobj;
7579 : fail:
7580 : return NULL;
7581 : }
7582 :
7583 :
7584 5 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxisOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7585 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7586 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7587 5 : char *arg2 = (char *) 0 ;
7588 5 : int arg3 ;
7589 5 : void *argp1 = 0 ;
7590 5 : int res1 = 0 ;
7591 5 : int res2 ;
7592 5 : char *buf2 = 0 ;
7593 5 : int alloc2 = 0 ;
7594 5 : int val3 ;
7595 5 : int ecode3 = 0 ;
7596 5 : PyObject *swig_obj[3] ;
7597 5 : OGRAxisOrientation result;
7598 :
7599 5 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAxisOrientation", 3, 3, swig_obj)) SWIG_fail;
7600 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7601 5 : if (!SWIG_IsOK(res1)) {
7602 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7603 : }
7604 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7605 5 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7606 5 : if (!SWIG_IsOK(res2)) {
7607 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "2"" of type '" "char const *""'");
7608 : }
7609 5 : arg2 = reinterpret_cast< char * >(buf2);
7610 5 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
7611 5 : if (!SWIG_IsOK(ecode3)) {
7612 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "3"" of type '" "int""'");
7613 : }
7614 5 : arg3 = static_cast< int >(val3);
7615 5 : {
7616 5 : const int bLocalUseExceptions = GetUseExceptions();
7617 5 : if ( bLocalUseExceptions ) {
7618 5 : pushErrorHandler();
7619 : }
7620 5 : result = (OGRAxisOrientation)OSRSpatialReferenceShadow_GetAxisOrientation(arg1,(char const *)arg2,arg3);
7621 5 : if ( bLocalUseExceptions ) {
7622 5 : popErrorHandler();
7623 : }
7624 : #ifndef SED_HACKS
7625 : if ( bLocalUseExceptions ) {
7626 : CPLErr eclass = CPLGetLastErrorType();
7627 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7628 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7629 : }
7630 : }
7631 : #endif
7632 : }
7633 5 : resultobj = SWIG_From_int(static_cast< int >(result));
7634 5 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7635 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7636 : return resultobj;
7637 0 : fail:
7638 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7639 : return NULL;
7640 : }
7641 :
7642 :
7643 37 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxisMappingStrategy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7644 37 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7645 37 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7646 37 : void *argp1 = 0 ;
7647 37 : int res1 = 0 ;
7648 37 : PyObject *swig_obj[1] ;
7649 37 : OSRAxisMappingStrategy result;
7650 :
7651 37 : if (!args) SWIG_fail;
7652 37 : swig_obj[0] = args;
7653 37 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7654 37 : if (!SWIG_IsOK(res1)) {
7655 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisMappingStrategy" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7656 : }
7657 37 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7658 37 : {
7659 37 : const int bLocalUseExceptions = GetUseExceptions();
7660 37 : if ( bLocalUseExceptions ) {
7661 36 : pushErrorHandler();
7662 : }
7663 37 : result = (OSRAxisMappingStrategy)OSRSpatialReferenceShadow_GetAxisMappingStrategy(arg1);
7664 37 : if ( bLocalUseExceptions ) {
7665 36 : popErrorHandler();
7666 : }
7667 : #ifndef SED_HACKS
7668 : if ( bLocalUseExceptions ) {
7669 : CPLErr eclass = CPLGetLastErrorType();
7670 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7671 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7672 : }
7673 : }
7674 : #endif
7675 : }
7676 37 : resultobj = SWIG_From_int(static_cast< int >(result));
7677 37 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7678 : return resultobj;
7679 : fail:
7680 : return NULL;
7681 : }
7682 :
7683 :
7684 553 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAxisMappingStrategy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7685 553 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7686 553 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7687 553 : OSRAxisMappingStrategy arg2 ;
7688 553 : void *argp1 = 0 ;
7689 553 : int res1 = 0 ;
7690 553 : int val2 ;
7691 553 : int ecode2 = 0 ;
7692 553 : PyObject *swig_obj[2] ;
7693 :
7694 553 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAxisMappingStrategy", 2, 2, swig_obj)) SWIG_fail;
7695 553 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7696 553 : if (!SWIG_IsOK(res1)) {
7697 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAxisMappingStrategy" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7698 : }
7699 553 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7700 553 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
7701 553 : if (!SWIG_IsOK(ecode2)) {
7702 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetAxisMappingStrategy" "', argument " "2"" of type '" "OSRAxisMappingStrategy""'");
7703 : }
7704 553 : arg2 = static_cast< OSRAxisMappingStrategy >(val2);
7705 553 : {
7706 553 : const int bLocalUseExceptions = GetUseExceptions();
7707 553 : if ( bLocalUseExceptions ) {
7708 443 : pushErrorHandler();
7709 : }
7710 553 : OSRSpatialReferenceShadow_SetAxisMappingStrategy(arg1,arg2);
7711 553 : if ( bLocalUseExceptions ) {
7712 443 : popErrorHandler();
7713 : }
7714 : #ifndef SED_HACKS
7715 : if ( bLocalUseExceptions ) {
7716 : CPLErr eclass = CPLGetLastErrorType();
7717 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7718 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7719 : }
7720 : }
7721 : #endif
7722 : }
7723 553 : resultobj = SWIG_Py_Void();
7724 553 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7725 : return resultobj;
7726 : fail:
7727 : return NULL;
7728 : }
7729 :
7730 :
7731 103 : SWIGINTERN PyObject *_wrap_SpatialReference_GetDataAxisToSRSAxisMapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7732 103 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7733 103 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7734 103 : int *arg2 = (int *) 0 ;
7735 103 : int **arg3 = (int **) 0 ;
7736 103 : void *argp1 = 0 ;
7737 103 : int res1 = 0 ;
7738 103 : int nLen2 = 0 ;
7739 103 : int *pList2 = NULL ;
7740 103 : PyObject *swig_obj[1] ;
7741 :
7742 103 : {
7743 : /* %typemap(in,numinputs=0) (int *nLen2, const int **pList2) (int nLen2, int *pList2) */
7744 103 : arg2 = &nLen2;
7745 103 : arg3 = &pList2;
7746 : }
7747 103 : if (!args) SWIG_fail;
7748 103 : swig_obj[0] = args;
7749 103 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7750 103 : if (!SWIG_IsOK(res1)) {
7751 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetDataAxisToSRSAxisMapping" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7752 : }
7753 103 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7754 103 : {
7755 103 : const int bLocalUseExceptions = GetUseExceptions();
7756 103 : if ( bLocalUseExceptions ) {
7757 51 : pushErrorHandler();
7758 : }
7759 103 : OSRSpatialReferenceShadow_GetDataAxisToSRSAxisMapping(arg1,arg2,(int const **)arg3);
7760 103 : if ( bLocalUseExceptions ) {
7761 51 : popErrorHandler();
7762 : }
7763 : #ifndef SED_HACKS
7764 : if ( bLocalUseExceptions ) {
7765 : CPLErr eclass = CPLGetLastErrorType();
7766 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7767 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7768 : }
7769 : }
7770 : #endif
7771 : }
7772 103 : resultobj = SWIG_Py_Void();
7773 103 : {
7774 : /* %typemap(argout) (int *nLen, const int **pList ) */
7775 103 : Py_DECREF(resultobj);
7776 103 : PyObject *out = PyList_New( *arg2 );
7777 103 : if( !out ) {
7778 0 : SWIG_fail;
7779 : }
7780 311 : for( int i=0; i<*arg2; i++ ) {
7781 208 : PyObject *val = PyInt_FromLong( (*arg3)[i] );
7782 208 : PyList_SetItem( out, i, val );
7783 : }
7784 103 : resultobj = out;
7785 : }
7786 103 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7787 : return resultobj;
7788 : fail:
7789 : return NULL;
7790 : }
7791 :
7792 :
7793 15 : SWIGINTERN PyObject *_wrap_SpatialReference_SetDataAxisToSRSAxisMapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7794 15 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7795 15 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7796 15 : int arg2 ;
7797 15 : int *arg3 = (int *) 0 ;
7798 15 : void *argp1 = 0 ;
7799 15 : int res1 = 0 ;
7800 15 : PyObject *swig_obj[2] ;
7801 15 : OGRErr result;
7802 :
7803 15 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetDataAxisToSRSAxisMapping", 2, 2, swig_obj)) SWIG_fail;
7804 15 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7805 15 : if (!SWIG_IsOK(res1)) {
7806 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetDataAxisToSRSAxisMapping" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7807 : }
7808 15 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7809 15 : {
7810 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
7811 15 : arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
7812 15 : if( arg2 < 0 ) {
7813 0 : SWIG_fail;
7814 : }
7815 : }
7816 15 : {
7817 15 : const int bLocalUseExceptions = GetUseExceptions();
7818 15 : if ( bLocalUseExceptions ) {
7819 9 : pushErrorHandler();
7820 : }
7821 15 : result = (OGRErr)OSRSpatialReferenceShadow_SetDataAxisToSRSAxisMapping(arg1,arg2,arg3);
7822 15 : if ( bLocalUseExceptions ) {
7823 9 : popErrorHandler();
7824 : }
7825 : #ifndef SED_HACKS
7826 : if ( bLocalUseExceptions ) {
7827 : CPLErr eclass = CPLGetLastErrorType();
7828 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7829 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7830 : }
7831 : }
7832 : #endif
7833 : }
7834 15 : {
7835 : /* %typemap(out) OGRErr */
7836 15 : if ( result != 0 && GetUseExceptions()) {
7837 0 : const char* pszMessage = CPLGetLastErrorMsg();
7838 0 : if( pszMessage[0] != '\0' )
7839 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7840 : else
7841 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7842 0 : SWIG_fail;
7843 : }
7844 : }
7845 15 : {
7846 : /* %typemap(freearg) (int nList, int* pList) */
7847 15 : free(arg3);
7848 : }
7849 15 : {
7850 : /* %typemap(ret) OGRErr */
7851 15 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7852 15 : resultobj = PyInt_FromLong( result );
7853 : }
7854 : }
7855 15 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7856 : return resultobj;
7857 0 : fail:
7858 0 : {
7859 : /* %typemap(freearg) (int nList, int* pList) */
7860 0 : free(arg3);
7861 : }
7862 0 : return NULL;
7863 : }
7864 :
7865 :
7866 15 : SWIGINTERN PyObject *_wrap_SpatialReference_SetUTM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7867 15 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7868 15 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7869 15 : int arg2 ;
7870 15 : int arg3 = (int) 1 ;
7871 15 : void *argp1 = 0 ;
7872 15 : int res1 = 0 ;
7873 15 : int val2 ;
7874 15 : int ecode2 = 0 ;
7875 15 : int val3 ;
7876 15 : int ecode3 = 0 ;
7877 15 : PyObject *swig_obj[3] ;
7878 15 : OGRErr result;
7879 :
7880 15 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetUTM", 2, 3, swig_obj)) SWIG_fail;
7881 15 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7882 15 : if (!SWIG_IsOK(res1)) {
7883 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetUTM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7884 : }
7885 15 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7886 15 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
7887 15 : if (!SWIG_IsOK(ecode2)) {
7888 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetUTM" "', argument " "2"" of type '" "int""'");
7889 : }
7890 15 : arg2 = static_cast< int >(val2);
7891 15 : if (swig_obj[2]) {
7892 3 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
7893 3 : if (!SWIG_IsOK(ecode3)) {
7894 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetUTM" "', argument " "3"" of type '" "int""'");
7895 : }
7896 : arg3 = static_cast< int >(val3);
7897 : }
7898 15 : {
7899 15 : const int bLocalUseExceptions = GetUseExceptions();
7900 15 : if ( bLocalUseExceptions ) {
7901 14 : pushErrorHandler();
7902 : }
7903 15 : result = (OGRErr)OSRSpatialReferenceShadow_SetUTM(arg1,arg2,arg3);
7904 15 : if ( bLocalUseExceptions ) {
7905 14 : popErrorHandler();
7906 : }
7907 : #ifndef SED_HACKS
7908 : if ( bLocalUseExceptions ) {
7909 : CPLErr eclass = CPLGetLastErrorType();
7910 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7911 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7912 : }
7913 : }
7914 : #endif
7915 : }
7916 15 : {
7917 : /* %typemap(out) OGRErr */
7918 15 : if ( result != 0 && GetUseExceptions()) {
7919 0 : const char* pszMessage = CPLGetLastErrorMsg();
7920 0 : if( pszMessage[0] != '\0' )
7921 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7922 : else
7923 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7924 0 : SWIG_fail;
7925 : }
7926 : }
7927 15 : {
7928 : /* %typemap(ret) OGRErr */
7929 15 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7930 15 : resultobj = PyInt_FromLong( result );
7931 : }
7932 : }
7933 15 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7934 : return resultobj;
7935 : fail:
7936 : return NULL;
7937 : }
7938 :
7939 :
7940 6 : SWIGINTERN PyObject *_wrap_SpatialReference_GetUTMZone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7941 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7942 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7943 6 : void *argp1 = 0 ;
7944 6 : int res1 = 0 ;
7945 6 : PyObject *swig_obj[1] ;
7946 6 : int result;
7947 :
7948 6 : if (!args) SWIG_fail;
7949 6 : swig_obj[0] = args;
7950 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7951 6 : if (!SWIG_IsOK(res1)) {
7952 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetUTMZone" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7953 : }
7954 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7955 6 : {
7956 6 : const int bLocalUseExceptions = GetUseExceptions();
7957 6 : if ( bLocalUseExceptions ) {
7958 6 : pushErrorHandler();
7959 : }
7960 6 : result = (int)OSRSpatialReferenceShadow_GetUTMZone(arg1);
7961 6 : if ( bLocalUseExceptions ) {
7962 6 : popErrorHandler();
7963 : }
7964 : #ifndef SED_HACKS
7965 : if ( bLocalUseExceptions ) {
7966 : CPLErr eclass = CPLGetLastErrorType();
7967 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7968 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7969 : }
7970 : }
7971 : #endif
7972 : }
7973 6 : resultobj = SWIG_From_int(static_cast< int >(result));
7974 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7975 : return resultobj;
7976 : fail:
7977 : return NULL;
7978 : }
7979 :
7980 :
7981 2 : SWIGINTERN PyObject *_wrap_SpatialReference_SetStatePlane(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7982 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7983 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7984 2 : int arg2 ;
7985 2 : int arg3 = (int) 1 ;
7986 2 : char *arg4 = (char *) "" ;
7987 2 : double arg5 = (double) 0.0 ;
7988 2 : void *argp1 = 0 ;
7989 2 : int res1 = 0 ;
7990 2 : int val2 ;
7991 2 : int ecode2 = 0 ;
7992 2 : int val3 ;
7993 2 : int ecode3 = 0 ;
7994 2 : int res4 ;
7995 2 : char *buf4 = 0 ;
7996 2 : int alloc4 = 0 ;
7997 2 : double val5 ;
7998 2 : int ecode5 = 0 ;
7999 2 : PyObject *swig_obj[5] ;
8000 2 : OGRErr result;
8001 :
8002 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetStatePlane", 2, 5, swig_obj)) SWIG_fail;
8003 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8004 2 : if (!SWIG_IsOK(res1)) {
8005 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetStatePlane" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8006 : }
8007 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8008 2 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
8009 2 : if (!SWIG_IsOK(ecode2)) {
8010 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetStatePlane" "', argument " "2"" of type '" "int""'");
8011 : }
8012 2 : arg2 = static_cast< int >(val2);
8013 2 : if (swig_obj[2]) {
8014 2 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
8015 2 : if (!SWIG_IsOK(ecode3)) {
8016 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetStatePlane" "', argument " "3"" of type '" "int""'");
8017 : }
8018 : arg3 = static_cast< int >(val3);
8019 : }
8020 2 : if (swig_obj[3]) {
8021 1 : res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
8022 1 : if (!SWIG_IsOK(res4)) {
8023 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetStatePlane" "', argument " "4"" of type '" "char const *""'");
8024 : }
8025 1 : arg4 = reinterpret_cast< char * >(buf4);
8026 : }
8027 2 : if (swig_obj[4]) {
8028 1 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
8029 1 : if (!SWIG_IsOK(ecode5)) {
8030 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetStatePlane" "', argument " "5"" of type '" "double""'");
8031 : }
8032 1 : arg5 = static_cast< double >(val5);
8033 : }
8034 2 : {
8035 2 : const int bLocalUseExceptions = GetUseExceptions();
8036 2 : if ( bLocalUseExceptions ) {
8037 2 : pushErrorHandler();
8038 : }
8039 2 : result = (OGRErr)OSRSpatialReferenceShadow_SetStatePlane(arg1,arg2,arg3,(char const *)arg4,arg5);
8040 2 : if ( bLocalUseExceptions ) {
8041 2 : popErrorHandler();
8042 : }
8043 : #ifndef SED_HACKS
8044 : if ( bLocalUseExceptions ) {
8045 : CPLErr eclass = CPLGetLastErrorType();
8046 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8047 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8048 : }
8049 : }
8050 : #endif
8051 : }
8052 2 : {
8053 : /* %typemap(out) OGRErr */
8054 2 : if ( result != 0 && GetUseExceptions()) {
8055 0 : const char* pszMessage = CPLGetLastErrorMsg();
8056 0 : if( pszMessage[0] != '\0' )
8057 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8058 : else
8059 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8060 0 : SWIG_fail;
8061 : }
8062 : }
8063 2 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
8064 2 : {
8065 : /* %typemap(ret) OGRErr */
8066 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8067 2 : resultobj = PyInt_FromLong( result );
8068 : }
8069 : }
8070 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8071 : return resultobj;
8072 0 : fail:
8073 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
8074 : return NULL;
8075 : }
8076 :
8077 :
8078 5 : SWIGINTERN PyObject *_wrap_SpatialReference_AutoIdentifyEPSG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8079 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8080 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8081 5 : void *argp1 = 0 ;
8082 5 : int res1 = 0 ;
8083 5 : PyObject *swig_obj[1] ;
8084 5 : OGRErr result;
8085 :
8086 5 : if (!args) SWIG_fail;
8087 5 : swig_obj[0] = args;
8088 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8089 5 : if (!SWIG_IsOK(res1)) {
8090 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_AutoIdentifyEPSG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8091 : }
8092 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8093 5 : {
8094 5 : const int bLocalUseExceptions = GetUseExceptions();
8095 5 : if ( bLocalUseExceptions ) {
8096 5 : pushErrorHandler();
8097 : }
8098 5 : result = (OGRErr)OSRSpatialReferenceShadow_AutoIdentifyEPSG(arg1);
8099 5 : if ( bLocalUseExceptions ) {
8100 5 : popErrorHandler();
8101 : }
8102 : #ifndef SED_HACKS
8103 : if ( bLocalUseExceptions ) {
8104 : CPLErr eclass = CPLGetLastErrorType();
8105 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8106 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8107 : }
8108 : }
8109 : #endif
8110 : }
8111 5 : {
8112 : /* %typemap(out) OGRErr */
8113 6 : if ( result != 0 && GetUseExceptions()) {
8114 1 : const char* pszMessage = CPLGetLastErrorMsg();
8115 1 : if( pszMessage[0] != '\0' )
8116 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8117 : else
8118 1 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8119 1 : SWIG_fail;
8120 : }
8121 : }
8122 4 : {
8123 : /* %typemap(ret) OGRErr */
8124 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8125 4 : resultobj = PyInt_FromLong( result );
8126 : }
8127 : }
8128 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8129 : return resultobj;
8130 : fail:
8131 : return NULL;
8132 : }
8133 :
8134 :
8135 5 : SWIGINTERN PyObject *_wrap_SpatialReference_FindMatches(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8136 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8137 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8138 5 : char **arg2 = (char **) NULL ;
8139 5 : OSRSpatialReferenceShadow ***arg3 = (OSRSpatialReferenceShadow ***) NULL ;
8140 5 : int *arg4 = (int *) NULL ;
8141 5 : int **arg5 = (int **) NULL ;
8142 5 : void *argp1 = 0 ;
8143 5 : int res1 = 0 ;
8144 5 : OGRSpatialReferenceH *pahSRS3 = NULL ;
8145 5 : int nvalues3 = 0 ;
8146 5 : int *confidence_values3 = NULL ;
8147 5 : PyObject *swig_obj[2] ;
8148 :
8149 5 : {
8150 : /* %typemap(in) (OSRSpatialReferenceShadow***, int* nvalues3, int** confidence_values3) */
8151 5 : arg3 = &pahSRS3;
8152 5 : arg4 = &nvalues3;
8153 5 : arg5 = &confidence_values3;
8154 : }
8155 5 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_FindMatches", 1, 2, swig_obj)) SWIG_fail;
8156 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8157 5 : if (!SWIG_IsOK(res1)) {
8158 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_FindMatches" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8159 : }
8160 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8161 5 : if (swig_obj[1]) {
8162 0 : {
8163 : /* %typemap(in) char **dict */
8164 0 : arg2 = NULL;
8165 0 : if ( PySequence_Check( swig_obj[1] ) ) {
8166 0 : int bErr = FALSE;
8167 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
8168 0 : if ( bErr )
8169 : {
8170 0 : SWIG_fail;
8171 : }
8172 : }
8173 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
8174 0 : int bErr = FALSE;
8175 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
8176 0 : if ( bErr )
8177 : {
8178 0 : SWIG_fail;
8179 : }
8180 : }
8181 : else {
8182 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
8183 0 : SWIG_fail;
8184 : }
8185 : }
8186 : }
8187 5 : {
8188 5 : const int bLocalUseExceptions = GetUseExceptions();
8189 5 : if ( bLocalUseExceptions ) {
8190 5 : pushErrorHandler();
8191 : }
8192 5 : OSRSpatialReferenceShadow_FindMatches(arg1,arg2,arg3,arg4,arg5);
8193 5 : if ( bLocalUseExceptions ) {
8194 5 : popErrorHandler();
8195 : }
8196 : #ifndef SED_HACKS
8197 : if ( bLocalUseExceptions ) {
8198 : CPLErr eclass = CPLGetLastErrorType();
8199 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8200 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8201 : }
8202 : }
8203 : #endif
8204 : }
8205 5 : resultobj = SWIG_Py_Void();
8206 5 : {
8207 : /* %typemap(argout) (OOSRSpatialReferenceShadow***, int* nvalues, int** confidence_values) */
8208 :
8209 5 : Py_DECREF(resultobj);
8210 :
8211 5 : resultobj = PyList_New( *(arg4));
8212 5 : if( !resultobj ) {
8213 0 : SWIG_fail;
8214 : }
8215 14 : for( int i = 0; i < *(arg4); i++ )
8216 : {
8217 9 : PyObject *tuple = PyTuple_New( 2 );
8218 9 : OSRReference((*(arg3))[i]);
8219 9 : PyTuple_SetItem( tuple, 0,
8220 : SWIG_NewPointerObj(SWIG_as_voidptr((*(arg3))[i]), SWIGTYPE_p_OSRSpatialReferenceShadow, 1 ) );
8221 9 : PyTuple_SetItem( tuple, 1, PyInt_FromLong((*(arg5))[i]) );
8222 9 : PyList_SetItem( resultobj, i, tuple );
8223 : }
8224 : }
8225 5 : {
8226 : /* %typemap(freearg) char **dict */
8227 5 : CSLDestroy( arg2 );
8228 : }
8229 5 : {
8230 : /* %typemap(freearg) (OOSRSpatialReferenceShadow***, int* nvalues, int** confidence_values) */
8231 5 : OSRFreeSRSArray( *(arg3) );
8232 5 : CPLFree( *(arg5) );
8233 : }
8234 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8235 : return resultobj;
8236 0 : fail:
8237 0 : {
8238 : /* %typemap(freearg) char **dict */
8239 0 : CSLDestroy( arg2 );
8240 : }
8241 0 : {
8242 : /* %typemap(freearg) (OOSRSpatialReferenceShadow***, int* nvalues, int** confidence_values) */
8243 0 : OSRFreeSRSArray( *(arg3) );
8244 0 : CPLFree( *(arg5) );
8245 : }
8246 : return NULL;
8247 : }
8248 :
8249 :
8250 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8251 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8252 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8253 0 : char *arg2 = (char *) 0 ;
8254 0 : void *argp1 = 0 ;
8255 0 : int res1 = 0 ;
8256 0 : int res2 ;
8257 0 : char *buf2 = 0 ;
8258 0 : int alloc2 = 0 ;
8259 0 : PyObject *swig_obj[2] ;
8260 0 : OGRErr result;
8261 :
8262 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetProjection", 2, 2, swig_obj)) SWIG_fail;
8263 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8264 0 : if (!SWIG_IsOK(res1)) {
8265 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjection" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8266 : }
8267 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8268 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8269 0 : if (!SWIG_IsOK(res2)) {
8270 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjection" "', argument " "2"" of type '" "char const *""'");
8271 : }
8272 0 : arg2 = reinterpret_cast< char * >(buf2);
8273 0 : {
8274 0 : const int bLocalUseExceptions = GetUseExceptions();
8275 0 : if ( bLocalUseExceptions ) {
8276 0 : pushErrorHandler();
8277 : }
8278 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjection(arg1,(char const *)arg2);
8279 0 : if ( bLocalUseExceptions ) {
8280 0 : popErrorHandler();
8281 : }
8282 : #ifndef SED_HACKS
8283 : if ( bLocalUseExceptions ) {
8284 : CPLErr eclass = CPLGetLastErrorType();
8285 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8286 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8287 : }
8288 : }
8289 : #endif
8290 : }
8291 0 : {
8292 : /* %typemap(out) OGRErr */
8293 0 : if ( result != 0 && GetUseExceptions()) {
8294 0 : const char* pszMessage = CPLGetLastErrorMsg();
8295 0 : if( pszMessage[0] != '\0' )
8296 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8297 : else
8298 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8299 0 : SWIG_fail;
8300 : }
8301 : }
8302 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8303 0 : {
8304 : /* %typemap(ret) OGRErr */
8305 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8306 0 : resultobj = PyInt_FromLong( result );
8307 : }
8308 : }
8309 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8310 : return resultobj;
8311 0 : fail:
8312 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8313 : return NULL;
8314 : }
8315 :
8316 :
8317 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8318 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8319 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8320 0 : char *arg2 = (char *) 0 ;
8321 0 : double arg3 ;
8322 0 : void *argp1 = 0 ;
8323 0 : int res1 = 0 ;
8324 0 : int res2 ;
8325 0 : char *buf2 = 0 ;
8326 0 : int alloc2 = 0 ;
8327 0 : double val3 ;
8328 0 : int ecode3 = 0 ;
8329 0 : PyObject *swig_obj[3] ;
8330 0 : OGRErr result;
8331 :
8332 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetProjParm", 3, 3, swig_obj)) SWIG_fail;
8333 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8334 0 : if (!SWIG_IsOK(res1)) {
8335 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8336 : }
8337 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8338 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8339 0 : if (!SWIG_IsOK(res2)) {
8340 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjParm" "', argument " "2"" of type '" "char const *""'");
8341 : }
8342 0 : arg2 = reinterpret_cast< char * >(buf2);
8343 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8344 0 : if (!SWIG_IsOK(ecode3)) {
8345 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetProjParm" "', argument " "3"" of type '" "double""'");
8346 : }
8347 0 : arg3 = static_cast< double >(val3);
8348 0 : {
8349 0 : if (!arg2) {
8350 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8351 : }
8352 : }
8353 0 : {
8354 0 : const int bLocalUseExceptions = GetUseExceptions();
8355 0 : if ( bLocalUseExceptions ) {
8356 0 : pushErrorHandler();
8357 : }
8358 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjParm(arg1,(char const *)arg2,arg3);
8359 0 : if ( bLocalUseExceptions ) {
8360 0 : popErrorHandler();
8361 : }
8362 : #ifndef SED_HACKS
8363 : if ( bLocalUseExceptions ) {
8364 : CPLErr eclass = CPLGetLastErrorType();
8365 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8366 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8367 : }
8368 : }
8369 : #endif
8370 : }
8371 0 : {
8372 : /* %typemap(out) OGRErr */
8373 0 : if ( result != 0 && GetUseExceptions()) {
8374 0 : const char* pszMessage = CPLGetLastErrorMsg();
8375 0 : if( pszMessage[0] != '\0' )
8376 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8377 : else
8378 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8379 0 : SWIG_fail;
8380 : }
8381 : }
8382 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8383 0 : {
8384 : /* %typemap(ret) OGRErr */
8385 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8386 0 : resultobj = PyInt_FromLong( result );
8387 : }
8388 : }
8389 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8390 : return resultobj;
8391 0 : fail:
8392 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8393 : return NULL;
8394 : }
8395 :
8396 :
8397 65 : SWIGINTERN PyObject *_wrap_SpatialReference_GetProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8398 65 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8399 65 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8400 65 : char *arg2 = (char *) 0 ;
8401 65 : double arg3 = (double) 0.0 ;
8402 65 : void *argp1 = 0 ;
8403 65 : int res1 = 0 ;
8404 65 : int res2 ;
8405 65 : char *buf2 = 0 ;
8406 65 : int alloc2 = 0 ;
8407 65 : double val3 ;
8408 65 : int ecode3 = 0 ;
8409 65 : PyObject *swig_obj[3] ;
8410 65 : double result;
8411 :
8412 65 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetProjParm", 2, 3, swig_obj)) SWIG_fail;
8413 65 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8414 65 : if (!SWIG_IsOK(res1)) {
8415 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8416 : }
8417 65 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8418 65 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8419 65 : if (!SWIG_IsOK(res2)) {
8420 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetProjParm" "', argument " "2"" of type '" "char const *""'");
8421 : }
8422 65 : arg2 = reinterpret_cast< char * >(buf2);
8423 65 : if (swig_obj[2]) {
8424 24 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8425 24 : if (!SWIG_IsOK(ecode3)) {
8426 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetProjParm" "', argument " "3"" of type '" "double""'");
8427 : }
8428 24 : arg3 = static_cast< double >(val3);
8429 : }
8430 65 : {
8431 65 : if (!arg2) {
8432 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8433 : }
8434 : }
8435 65 : {
8436 65 : const int bLocalUseExceptions = GetUseExceptions();
8437 65 : if ( bLocalUseExceptions ) {
8438 58 : pushErrorHandler();
8439 : }
8440 65 : result = (double)OSRSpatialReferenceShadow_GetProjParm(arg1,(char const *)arg2,arg3);
8441 65 : if ( bLocalUseExceptions ) {
8442 58 : popErrorHandler();
8443 : }
8444 : #ifndef SED_HACKS
8445 : if ( bLocalUseExceptions ) {
8446 : CPLErr eclass = CPLGetLastErrorType();
8447 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8448 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8449 : }
8450 : }
8451 : #endif
8452 : }
8453 65 : resultobj = SWIG_From_double(static_cast< double >(result));
8454 65 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8455 65 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8456 : return resultobj;
8457 0 : fail:
8458 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8459 : return NULL;
8460 : }
8461 :
8462 :
8463 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetNormProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8464 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8465 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8466 0 : char *arg2 = (char *) 0 ;
8467 0 : double arg3 ;
8468 0 : void *argp1 = 0 ;
8469 0 : int res1 = 0 ;
8470 0 : int res2 ;
8471 0 : char *buf2 = 0 ;
8472 0 : int alloc2 = 0 ;
8473 0 : double val3 ;
8474 0 : int ecode3 = 0 ;
8475 0 : PyObject *swig_obj[3] ;
8476 0 : OGRErr result;
8477 :
8478 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetNormProjParm", 3, 3, swig_obj)) SWIG_fail;
8479 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8480 0 : if (!SWIG_IsOK(res1)) {
8481 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetNormProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8482 : }
8483 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8484 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8485 0 : if (!SWIG_IsOK(res2)) {
8486 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetNormProjParm" "', argument " "2"" of type '" "char const *""'");
8487 : }
8488 0 : arg2 = reinterpret_cast< char * >(buf2);
8489 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8490 0 : if (!SWIG_IsOK(ecode3)) {
8491 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetNormProjParm" "', argument " "3"" of type '" "double""'");
8492 : }
8493 0 : arg3 = static_cast< double >(val3);
8494 0 : {
8495 0 : if (!arg2) {
8496 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8497 : }
8498 : }
8499 0 : {
8500 0 : const int bLocalUseExceptions = GetUseExceptions();
8501 0 : if ( bLocalUseExceptions ) {
8502 0 : pushErrorHandler();
8503 : }
8504 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetNormProjParm(arg1,(char const *)arg2,arg3);
8505 0 : if ( bLocalUseExceptions ) {
8506 0 : popErrorHandler();
8507 : }
8508 : #ifndef SED_HACKS
8509 : if ( bLocalUseExceptions ) {
8510 : CPLErr eclass = CPLGetLastErrorType();
8511 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8512 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8513 : }
8514 : }
8515 : #endif
8516 : }
8517 0 : {
8518 : /* %typemap(out) OGRErr */
8519 0 : if ( result != 0 && GetUseExceptions()) {
8520 0 : const char* pszMessage = CPLGetLastErrorMsg();
8521 0 : if( pszMessage[0] != '\0' )
8522 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8523 : else
8524 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8525 0 : SWIG_fail;
8526 : }
8527 : }
8528 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8529 0 : {
8530 : /* %typemap(ret) OGRErr */
8531 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8532 0 : resultobj = PyInt_FromLong( result );
8533 : }
8534 : }
8535 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8536 : return resultobj;
8537 0 : fail:
8538 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8539 : return NULL;
8540 : }
8541 :
8542 :
8543 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetNormProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8544 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8545 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8546 1 : char *arg2 = (char *) 0 ;
8547 1 : double arg3 = (double) 0.0 ;
8548 1 : void *argp1 = 0 ;
8549 1 : int res1 = 0 ;
8550 1 : int res2 ;
8551 1 : char *buf2 = 0 ;
8552 1 : int alloc2 = 0 ;
8553 1 : double val3 ;
8554 1 : int ecode3 = 0 ;
8555 1 : PyObject *swig_obj[3] ;
8556 1 : double result;
8557 :
8558 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetNormProjParm", 2, 3, swig_obj)) SWIG_fail;
8559 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8560 1 : if (!SWIG_IsOK(res1)) {
8561 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetNormProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8562 : }
8563 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8564 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8565 1 : if (!SWIG_IsOK(res2)) {
8566 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetNormProjParm" "', argument " "2"" of type '" "char const *""'");
8567 : }
8568 1 : arg2 = reinterpret_cast< char * >(buf2);
8569 1 : if (swig_obj[2]) {
8570 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8571 0 : if (!SWIG_IsOK(ecode3)) {
8572 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetNormProjParm" "', argument " "3"" of type '" "double""'");
8573 : }
8574 0 : arg3 = static_cast< double >(val3);
8575 : }
8576 1 : {
8577 1 : if (!arg2) {
8578 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8579 : }
8580 : }
8581 1 : {
8582 1 : const int bLocalUseExceptions = GetUseExceptions();
8583 1 : if ( bLocalUseExceptions ) {
8584 1 : pushErrorHandler();
8585 : }
8586 1 : result = (double)OSRSpatialReferenceShadow_GetNormProjParm(arg1,(char const *)arg2,arg3);
8587 1 : if ( bLocalUseExceptions ) {
8588 1 : popErrorHandler();
8589 : }
8590 : #ifndef SED_HACKS
8591 : if ( bLocalUseExceptions ) {
8592 : CPLErr eclass = CPLGetLastErrorType();
8593 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8594 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8595 : }
8596 : }
8597 : #endif
8598 : }
8599 1 : resultobj = SWIG_From_double(static_cast< double >(result));
8600 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8601 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8602 : return resultobj;
8603 0 : fail:
8604 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8605 : return NULL;
8606 : }
8607 :
8608 :
8609 8 : SWIGINTERN PyObject *_wrap_SpatialReference_GetSemiMajor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8610 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8611 8 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8612 8 : void *argp1 = 0 ;
8613 8 : int res1 = 0 ;
8614 8 : PyObject *swig_obj[1] ;
8615 8 : double result;
8616 :
8617 8 : if (!args) SWIG_fail;
8618 8 : swig_obj[0] = args;
8619 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8620 8 : if (!SWIG_IsOK(res1)) {
8621 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMajor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8622 : }
8623 8 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8624 8 : {
8625 8 : const int bLocalUseExceptions = GetUseExceptions();
8626 8 : if ( bLocalUseExceptions ) {
8627 7 : pushErrorHandler();
8628 : }
8629 8 : result = (double)OSRSpatialReferenceShadow_GetSemiMajor(arg1);
8630 8 : if ( bLocalUseExceptions ) {
8631 7 : popErrorHandler();
8632 : }
8633 : #ifndef SED_HACKS
8634 : if ( bLocalUseExceptions ) {
8635 : CPLErr eclass = CPLGetLastErrorType();
8636 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8637 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8638 : }
8639 : }
8640 : #endif
8641 : }
8642 8 : resultobj = SWIG_From_double(static_cast< double >(result));
8643 8 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8644 : return resultobj;
8645 : fail:
8646 : return NULL;
8647 : }
8648 :
8649 :
8650 4 : SWIGINTERN PyObject *_wrap_SpatialReference_GetSemiMinor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8651 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8652 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8653 4 : void *argp1 = 0 ;
8654 4 : int res1 = 0 ;
8655 4 : PyObject *swig_obj[1] ;
8656 4 : double result;
8657 :
8658 4 : if (!args) SWIG_fail;
8659 4 : swig_obj[0] = args;
8660 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8661 4 : if (!SWIG_IsOK(res1)) {
8662 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMinor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8663 : }
8664 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8665 4 : {
8666 4 : const int bLocalUseExceptions = GetUseExceptions();
8667 4 : if ( bLocalUseExceptions ) {
8668 3 : pushErrorHandler();
8669 : }
8670 4 : result = (double)OSRSpatialReferenceShadow_GetSemiMinor(arg1);
8671 4 : if ( bLocalUseExceptions ) {
8672 3 : popErrorHandler();
8673 : }
8674 : #ifndef SED_HACKS
8675 : if ( bLocalUseExceptions ) {
8676 : CPLErr eclass = CPLGetLastErrorType();
8677 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8678 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8679 : }
8680 : }
8681 : #endif
8682 : }
8683 4 : resultobj = SWIG_From_double(static_cast< double >(result));
8684 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8685 : return resultobj;
8686 : fail:
8687 : return NULL;
8688 : }
8689 :
8690 :
8691 10 : SWIGINTERN PyObject *_wrap_SpatialReference_GetInvFlattening(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8692 10 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8693 10 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8694 10 : void *argp1 = 0 ;
8695 10 : int res1 = 0 ;
8696 10 : PyObject *swig_obj[1] ;
8697 10 : double result;
8698 :
8699 10 : if (!args) SWIG_fail;
8700 10 : swig_obj[0] = args;
8701 10 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8702 10 : if (!SWIG_IsOK(res1)) {
8703 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetInvFlattening" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8704 : }
8705 10 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8706 10 : {
8707 10 : const int bLocalUseExceptions = GetUseExceptions();
8708 10 : if ( bLocalUseExceptions ) {
8709 7 : pushErrorHandler();
8710 : }
8711 10 : result = (double)OSRSpatialReferenceShadow_GetInvFlattening(arg1);
8712 10 : if ( bLocalUseExceptions ) {
8713 7 : popErrorHandler();
8714 : }
8715 : #ifndef SED_HACKS
8716 : if ( bLocalUseExceptions ) {
8717 : CPLErr eclass = CPLGetLastErrorType();
8718 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8719 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8720 : }
8721 : }
8722 : #endif
8723 : }
8724 10 : resultobj = SWIG_From_double(static_cast< double >(result));
8725 10 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8726 : return resultobj;
8727 : fail:
8728 : return NULL;
8729 : }
8730 :
8731 :
8732 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetACEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8733 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8734 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8735 0 : double arg2 ;
8736 0 : double arg3 ;
8737 0 : double arg4 ;
8738 0 : double arg5 ;
8739 0 : double arg6 ;
8740 0 : double arg7 ;
8741 0 : void *argp1 = 0 ;
8742 0 : int res1 = 0 ;
8743 0 : double val2 ;
8744 0 : int ecode2 = 0 ;
8745 0 : double val3 ;
8746 0 : int ecode3 = 0 ;
8747 0 : double val4 ;
8748 0 : int ecode4 = 0 ;
8749 0 : double val5 ;
8750 0 : int ecode5 = 0 ;
8751 0 : double val6 ;
8752 0 : int ecode6 = 0 ;
8753 0 : double val7 ;
8754 0 : int ecode7 = 0 ;
8755 0 : PyObject * obj0 = 0 ;
8756 0 : PyObject * obj1 = 0 ;
8757 0 : PyObject * obj2 = 0 ;
8758 0 : PyObject * obj3 = 0 ;
8759 0 : PyObject * obj4 = 0 ;
8760 0 : PyObject * obj5 = 0 ;
8761 0 : PyObject * obj6 = 0 ;
8762 0 : char * kwnames[] = {
8763 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
8764 : };
8765 0 : OGRErr result;
8766 :
8767 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetACEA", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
8768 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8769 0 : if (!SWIG_IsOK(res1)) {
8770 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetACEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8771 : }
8772 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8773 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8774 0 : if (!SWIG_IsOK(ecode2)) {
8775 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetACEA" "', argument " "2"" of type '" "double""'");
8776 : }
8777 0 : arg2 = static_cast< double >(val2);
8778 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8779 0 : if (!SWIG_IsOK(ecode3)) {
8780 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetACEA" "', argument " "3"" of type '" "double""'");
8781 : }
8782 0 : arg3 = static_cast< double >(val3);
8783 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8784 0 : if (!SWIG_IsOK(ecode4)) {
8785 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetACEA" "', argument " "4"" of type '" "double""'");
8786 : }
8787 0 : arg4 = static_cast< double >(val4);
8788 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8789 0 : if (!SWIG_IsOK(ecode5)) {
8790 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetACEA" "', argument " "5"" of type '" "double""'");
8791 : }
8792 0 : arg5 = static_cast< double >(val5);
8793 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
8794 0 : if (!SWIG_IsOK(ecode6)) {
8795 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetACEA" "', argument " "6"" of type '" "double""'");
8796 : }
8797 0 : arg6 = static_cast< double >(val6);
8798 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
8799 0 : if (!SWIG_IsOK(ecode7)) {
8800 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetACEA" "', argument " "7"" of type '" "double""'");
8801 : }
8802 0 : arg7 = static_cast< double >(val7);
8803 0 : {
8804 0 : const int bLocalUseExceptions = GetUseExceptions();
8805 0 : if ( bLocalUseExceptions ) {
8806 0 : pushErrorHandler();
8807 : }
8808 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetACEA(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
8809 0 : if ( bLocalUseExceptions ) {
8810 0 : popErrorHandler();
8811 : }
8812 : #ifndef SED_HACKS
8813 : if ( bLocalUseExceptions ) {
8814 : CPLErr eclass = CPLGetLastErrorType();
8815 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8816 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8817 : }
8818 : }
8819 : #endif
8820 : }
8821 0 : {
8822 : /* %typemap(out) OGRErr */
8823 0 : if ( result != 0 && GetUseExceptions()) {
8824 0 : const char* pszMessage = CPLGetLastErrorMsg();
8825 0 : if( pszMessage[0] != '\0' )
8826 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8827 : else
8828 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8829 0 : SWIG_fail;
8830 : }
8831 : }
8832 0 : {
8833 : /* %typemap(ret) OGRErr */
8834 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8835 0 : resultobj = PyInt_FromLong( result );
8836 : }
8837 : }
8838 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8839 : return resultobj;
8840 : fail:
8841 : return NULL;
8842 : }
8843 :
8844 :
8845 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAE(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8846 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8847 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8848 0 : double arg2 ;
8849 0 : double arg3 ;
8850 0 : double arg4 ;
8851 0 : double arg5 ;
8852 0 : void *argp1 = 0 ;
8853 0 : int res1 = 0 ;
8854 0 : double val2 ;
8855 0 : int ecode2 = 0 ;
8856 0 : double val3 ;
8857 0 : int ecode3 = 0 ;
8858 0 : double val4 ;
8859 0 : int ecode4 = 0 ;
8860 0 : double val5 ;
8861 0 : int ecode5 = 0 ;
8862 0 : PyObject * obj0 = 0 ;
8863 0 : PyObject * obj1 = 0 ;
8864 0 : PyObject * obj2 = 0 ;
8865 0 : PyObject * obj3 = 0 ;
8866 0 : PyObject * obj4 = 0 ;
8867 0 : char * kwnames[] = {
8868 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
8869 : };
8870 0 : OGRErr result;
8871 :
8872 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetAE", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
8873 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8874 0 : if (!SWIG_IsOK(res1)) {
8875 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAE" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8876 : }
8877 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8878 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8879 0 : if (!SWIG_IsOK(ecode2)) {
8880 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetAE" "', argument " "2"" of type '" "double""'");
8881 : }
8882 0 : arg2 = static_cast< double >(val2);
8883 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8884 0 : if (!SWIG_IsOK(ecode3)) {
8885 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetAE" "', argument " "3"" of type '" "double""'");
8886 : }
8887 0 : arg3 = static_cast< double >(val3);
8888 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8889 0 : if (!SWIG_IsOK(ecode4)) {
8890 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetAE" "', argument " "4"" of type '" "double""'");
8891 : }
8892 0 : arg4 = static_cast< double >(val4);
8893 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8894 0 : if (!SWIG_IsOK(ecode5)) {
8895 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetAE" "', argument " "5"" of type '" "double""'");
8896 : }
8897 0 : arg5 = static_cast< double >(val5);
8898 0 : {
8899 0 : const int bLocalUseExceptions = GetUseExceptions();
8900 0 : if ( bLocalUseExceptions ) {
8901 0 : pushErrorHandler();
8902 : }
8903 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAE(arg1,arg2,arg3,arg4,arg5);
8904 0 : if ( bLocalUseExceptions ) {
8905 0 : popErrorHandler();
8906 : }
8907 : #ifndef SED_HACKS
8908 : if ( bLocalUseExceptions ) {
8909 : CPLErr eclass = CPLGetLastErrorType();
8910 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8911 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8912 : }
8913 : }
8914 : #endif
8915 : }
8916 0 : {
8917 : /* %typemap(out) OGRErr */
8918 0 : if ( result != 0 && GetUseExceptions()) {
8919 0 : const char* pszMessage = CPLGetLastErrorMsg();
8920 0 : if( pszMessage[0] != '\0' )
8921 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8922 : else
8923 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8924 0 : SWIG_fail;
8925 : }
8926 : }
8927 0 : {
8928 : /* %typemap(ret) OGRErr */
8929 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8930 0 : resultobj = PyInt_FromLong( result );
8931 : }
8932 : }
8933 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
8934 : return resultobj;
8935 : fail:
8936 : return NULL;
8937 : }
8938 :
8939 :
8940 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetBonne(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8941 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8942 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8943 0 : double arg2 ;
8944 0 : double arg3 ;
8945 0 : double arg4 ;
8946 0 : double arg5 ;
8947 0 : void *argp1 = 0 ;
8948 0 : int res1 = 0 ;
8949 0 : double val2 ;
8950 0 : int ecode2 = 0 ;
8951 0 : double val3 ;
8952 0 : int ecode3 = 0 ;
8953 0 : double val4 ;
8954 0 : int ecode4 = 0 ;
8955 0 : double val5 ;
8956 0 : int ecode5 = 0 ;
8957 0 : PyObject * obj0 = 0 ;
8958 0 : PyObject * obj1 = 0 ;
8959 0 : PyObject * obj2 = 0 ;
8960 0 : PyObject * obj3 = 0 ;
8961 0 : PyObject * obj4 = 0 ;
8962 0 : char * kwnames[] = {
8963 : (char *)"self", (char *)"stdp", (char *)"cm", (char *)"fe", (char *)"fn", NULL
8964 : };
8965 0 : OGRErr result;
8966 :
8967 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetBonne", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
8968 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8969 0 : if (!SWIG_IsOK(res1)) {
8970 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetBonne" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8971 : }
8972 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8973 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8974 0 : if (!SWIG_IsOK(ecode2)) {
8975 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetBonne" "', argument " "2"" of type '" "double""'");
8976 : }
8977 0 : arg2 = static_cast< double >(val2);
8978 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8979 0 : if (!SWIG_IsOK(ecode3)) {
8980 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetBonne" "', argument " "3"" of type '" "double""'");
8981 : }
8982 0 : arg3 = static_cast< double >(val3);
8983 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8984 0 : if (!SWIG_IsOK(ecode4)) {
8985 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetBonne" "', argument " "4"" of type '" "double""'");
8986 : }
8987 0 : arg4 = static_cast< double >(val4);
8988 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8989 0 : if (!SWIG_IsOK(ecode5)) {
8990 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetBonne" "', argument " "5"" of type '" "double""'");
8991 : }
8992 0 : arg5 = static_cast< double >(val5);
8993 0 : {
8994 0 : const int bLocalUseExceptions = GetUseExceptions();
8995 0 : if ( bLocalUseExceptions ) {
8996 0 : pushErrorHandler();
8997 : }
8998 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetBonne(arg1,arg2,arg3,arg4,arg5);
8999 0 : if ( bLocalUseExceptions ) {
9000 0 : popErrorHandler();
9001 : }
9002 : #ifndef SED_HACKS
9003 : if ( bLocalUseExceptions ) {
9004 : CPLErr eclass = CPLGetLastErrorType();
9005 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9006 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9007 : }
9008 : }
9009 : #endif
9010 : }
9011 0 : {
9012 : /* %typemap(out) OGRErr */
9013 0 : if ( result != 0 && GetUseExceptions()) {
9014 0 : const char* pszMessage = CPLGetLastErrorMsg();
9015 0 : if( pszMessage[0] != '\0' )
9016 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9017 : else
9018 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9019 0 : SWIG_fail;
9020 : }
9021 : }
9022 0 : {
9023 : /* %typemap(ret) OGRErr */
9024 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9025 0 : resultobj = PyInt_FromLong( result );
9026 : }
9027 : }
9028 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9029 : return resultobj;
9030 : fail:
9031 : return NULL;
9032 : }
9033 :
9034 :
9035 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9036 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9037 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9038 0 : double arg2 ;
9039 0 : double arg3 ;
9040 0 : double arg4 ;
9041 0 : double arg5 ;
9042 0 : void *argp1 = 0 ;
9043 0 : int res1 = 0 ;
9044 0 : double val2 ;
9045 0 : int ecode2 = 0 ;
9046 0 : double val3 ;
9047 0 : int ecode3 = 0 ;
9048 0 : double val4 ;
9049 0 : int ecode4 = 0 ;
9050 0 : double val5 ;
9051 0 : int ecode5 = 0 ;
9052 0 : PyObject * obj0 = 0 ;
9053 0 : PyObject * obj1 = 0 ;
9054 0 : PyObject * obj2 = 0 ;
9055 0 : PyObject * obj3 = 0 ;
9056 0 : PyObject * obj4 = 0 ;
9057 0 : char * kwnames[] = {
9058 : (char *)"self", (char *)"stdp1", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9059 : };
9060 0 : OGRErr result;
9061 :
9062 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetCEA", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
9063 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9064 0 : if (!SWIG_IsOK(res1)) {
9065 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9066 : }
9067 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9068 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9069 0 : if (!SWIG_IsOK(ecode2)) {
9070 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCEA" "', argument " "2"" of type '" "double""'");
9071 : }
9072 0 : arg2 = static_cast< double >(val2);
9073 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9074 0 : if (!SWIG_IsOK(ecode3)) {
9075 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetCEA" "', argument " "3"" of type '" "double""'");
9076 : }
9077 0 : arg3 = static_cast< double >(val3);
9078 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9079 0 : if (!SWIG_IsOK(ecode4)) {
9080 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetCEA" "', argument " "4"" of type '" "double""'");
9081 : }
9082 0 : arg4 = static_cast< double >(val4);
9083 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9084 0 : if (!SWIG_IsOK(ecode5)) {
9085 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetCEA" "', argument " "5"" of type '" "double""'");
9086 : }
9087 0 : arg5 = static_cast< double >(val5);
9088 0 : {
9089 0 : const int bLocalUseExceptions = GetUseExceptions();
9090 0 : if ( bLocalUseExceptions ) {
9091 0 : pushErrorHandler();
9092 : }
9093 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetCEA(arg1,arg2,arg3,arg4,arg5);
9094 0 : if ( bLocalUseExceptions ) {
9095 0 : popErrorHandler();
9096 : }
9097 : #ifndef SED_HACKS
9098 : if ( bLocalUseExceptions ) {
9099 : CPLErr eclass = CPLGetLastErrorType();
9100 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9101 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9102 : }
9103 : }
9104 : #endif
9105 : }
9106 0 : {
9107 : /* %typemap(out) OGRErr */
9108 0 : if ( result != 0 && GetUseExceptions()) {
9109 0 : const char* pszMessage = CPLGetLastErrorMsg();
9110 0 : if( pszMessage[0] != '\0' )
9111 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9112 : else
9113 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9114 0 : SWIG_fail;
9115 : }
9116 : }
9117 0 : {
9118 : /* %typemap(ret) OGRErr */
9119 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9120 0 : resultobj = PyInt_FromLong( result );
9121 : }
9122 : }
9123 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9124 : return resultobj;
9125 : fail:
9126 : return NULL;
9127 : }
9128 :
9129 :
9130 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9131 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9132 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9133 0 : double arg2 ;
9134 0 : double arg3 ;
9135 0 : double arg4 ;
9136 0 : double arg5 ;
9137 0 : void *argp1 = 0 ;
9138 0 : int res1 = 0 ;
9139 0 : double val2 ;
9140 0 : int ecode2 = 0 ;
9141 0 : double val3 ;
9142 0 : int ecode3 = 0 ;
9143 0 : double val4 ;
9144 0 : int ecode4 = 0 ;
9145 0 : double val5 ;
9146 0 : int ecode5 = 0 ;
9147 0 : PyObject * obj0 = 0 ;
9148 0 : PyObject * obj1 = 0 ;
9149 0 : PyObject * obj2 = 0 ;
9150 0 : PyObject * obj3 = 0 ;
9151 0 : PyObject * obj4 = 0 ;
9152 0 : char * kwnames[] = {
9153 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
9154 : };
9155 0 : OGRErr result;
9156 :
9157 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetCS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
9158 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9159 0 : if (!SWIG_IsOK(res1)) {
9160 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9161 : }
9162 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9163 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9164 0 : if (!SWIG_IsOK(ecode2)) {
9165 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCS" "', argument " "2"" of type '" "double""'");
9166 : }
9167 0 : arg2 = static_cast< double >(val2);
9168 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9169 0 : if (!SWIG_IsOK(ecode3)) {
9170 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetCS" "', argument " "3"" of type '" "double""'");
9171 : }
9172 0 : arg3 = static_cast< double >(val3);
9173 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9174 0 : if (!SWIG_IsOK(ecode4)) {
9175 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetCS" "', argument " "4"" of type '" "double""'");
9176 : }
9177 0 : arg4 = static_cast< double >(val4);
9178 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9179 0 : if (!SWIG_IsOK(ecode5)) {
9180 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetCS" "', argument " "5"" of type '" "double""'");
9181 : }
9182 0 : arg5 = static_cast< double >(val5);
9183 0 : {
9184 0 : const int bLocalUseExceptions = GetUseExceptions();
9185 0 : if ( bLocalUseExceptions ) {
9186 0 : pushErrorHandler();
9187 : }
9188 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetCS(arg1,arg2,arg3,arg4,arg5);
9189 0 : if ( bLocalUseExceptions ) {
9190 0 : popErrorHandler();
9191 : }
9192 : #ifndef SED_HACKS
9193 : if ( bLocalUseExceptions ) {
9194 : CPLErr eclass = CPLGetLastErrorType();
9195 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9196 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9197 : }
9198 : }
9199 : #endif
9200 : }
9201 0 : {
9202 : /* %typemap(out) OGRErr */
9203 0 : if ( result != 0 && GetUseExceptions()) {
9204 0 : const char* pszMessage = CPLGetLastErrorMsg();
9205 0 : if( pszMessage[0] != '\0' )
9206 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9207 : else
9208 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9209 0 : SWIG_fail;
9210 : }
9211 : }
9212 0 : {
9213 : /* %typemap(ret) OGRErr */
9214 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9215 0 : resultobj = PyInt_FromLong( result );
9216 : }
9217 : }
9218 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9219 : return resultobj;
9220 : fail:
9221 : return NULL;
9222 : }
9223 :
9224 :
9225 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9226 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9227 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9228 0 : double arg2 ;
9229 0 : double arg3 ;
9230 0 : double arg4 ;
9231 0 : double arg5 ;
9232 0 : double arg6 ;
9233 0 : double arg7 ;
9234 0 : void *argp1 = 0 ;
9235 0 : int res1 = 0 ;
9236 0 : double val2 ;
9237 0 : int ecode2 = 0 ;
9238 0 : double val3 ;
9239 0 : int ecode3 = 0 ;
9240 0 : double val4 ;
9241 0 : int ecode4 = 0 ;
9242 0 : double val5 ;
9243 0 : int ecode5 = 0 ;
9244 0 : double val6 ;
9245 0 : int ecode6 = 0 ;
9246 0 : double val7 ;
9247 0 : int ecode7 = 0 ;
9248 0 : PyObject * obj0 = 0 ;
9249 0 : PyObject * obj1 = 0 ;
9250 0 : PyObject * obj2 = 0 ;
9251 0 : PyObject * obj3 = 0 ;
9252 0 : PyObject * obj4 = 0 ;
9253 0 : PyObject * obj5 = 0 ;
9254 0 : PyObject * obj6 = 0 ;
9255 0 : char * kwnames[] = {
9256 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
9257 : };
9258 0 : OGRErr result;
9259 :
9260 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetEC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
9261 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9262 0 : if (!SWIG_IsOK(res1)) {
9263 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9264 : }
9265 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9266 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9267 0 : if (!SWIG_IsOK(ecode2)) {
9268 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEC" "', argument " "2"" of type '" "double""'");
9269 : }
9270 0 : arg2 = static_cast< double >(val2);
9271 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9272 0 : if (!SWIG_IsOK(ecode3)) {
9273 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEC" "', argument " "3"" of type '" "double""'");
9274 : }
9275 0 : arg3 = static_cast< double >(val3);
9276 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9277 0 : if (!SWIG_IsOK(ecode4)) {
9278 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEC" "', argument " "4"" of type '" "double""'");
9279 : }
9280 0 : arg4 = static_cast< double >(val4);
9281 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9282 0 : if (!SWIG_IsOK(ecode5)) {
9283 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEC" "', argument " "5"" of type '" "double""'");
9284 : }
9285 0 : arg5 = static_cast< double >(val5);
9286 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9287 0 : if (!SWIG_IsOK(ecode6)) {
9288 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetEC" "', argument " "6"" of type '" "double""'");
9289 : }
9290 0 : arg6 = static_cast< double >(val6);
9291 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
9292 0 : if (!SWIG_IsOK(ecode7)) {
9293 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetEC" "', argument " "7"" of type '" "double""'");
9294 : }
9295 0 : arg7 = static_cast< double >(val7);
9296 0 : {
9297 0 : const int bLocalUseExceptions = GetUseExceptions();
9298 0 : if ( bLocalUseExceptions ) {
9299 0 : pushErrorHandler();
9300 : }
9301 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
9302 0 : if ( bLocalUseExceptions ) {
9303 0 : popErrorHandler();
9304 : }
9305 : #ifndef SED_HACKS
9306 : if ( bLocalUseExceptions ) {
9307 : CPLErr eclass = CPLGetLastErrorType();
9308 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9309 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9310 : }
9311 : }
9312 : #endif
9313 : }
9314 0 : {
9315 : /* %typemap(out) OGRErr */
9316 0 : if ( result != 0 && GetUseExceptions()) {
9317 0 : const char* pszMessage = CPLGetLastErrorMsg();
9318 0 : if( pszMessage[0] != '\0' )
9319 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9320 : else
9321 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9322 0 : SWIG_fail;
9323 : }
9324 : }
9325 0 : {
9326 : /* %typemap(ret) OGRErr */
9327 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9328 0 : resultobj = PyInt_FromLong( result );
9329 : }
9330 : }
9331 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9332 : return resultobj;
9333 : fail:
9334 : return NULL;
9335 : }
9336 :
9337 :
9338 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEckertIV(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9339 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9340 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9341 0 : double arg2 ;
9342 0 : double arg3 ;
9343 0 : double arg4 ;
9344 0 : void *argp1 = 0 ;
9345 0 : int res1 = 0 ;
9346 0 : double val2 ;
9347 0 : int ecode2 = 0 ;
9348 0 : double val3 ;
9349 0 : int ecode3 = 0 ;
9350 0 : double val4 ;
9351 0 : int ecode4 = 0 ;
9352 0 : PyObject * obj0 = 0 ;
9353 0 : PyObject * obj1 = 0 ;
9354 0 : PyObject * obj2 = 0 ;
9355 0 : PyObject * obj3 = 0 ;
9356 0 : char * kwnames[] = {
9357 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9358 : };
9359 0 : OGRErr result;
9360 :
9361 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetEckertIV", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9362 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9363 0 : if (!SWIG_IsOK(res1)) {
9364 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEckertIV" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9365 : }
9366 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9367 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9368 0 : if (!SWIG_IsOK(ecode2)) {
9369 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEckertIV" "', argument " "2"" of type '" "double""'");
9370 : }
9371 0 : arg2 = static_cast< double >(val2);
9372 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9373 0 : if (!SWIG_IsOK(ecode3)) {
9374 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEckertIV" "', argument " "3"" of type '" "double""'");
9375 : }
9376 0 : arg3 = static_cast< double >(val3);
9377 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9378 0 : if (!SWIG_IsOK(ecode4)) {
9379 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEckertIV" "', argument " "4"" of type '" "double""'");
9380 : }
9381 0 : arg4 = static_cast< double >(val4);
9382 0 : {
9383 0 : const int bLocalUseExceptions = GetUseExceptions();
9384 0 : if ( bLocalUseExceptions ) {
9385 0 : pushErrorHandler();
9386 : }
9387 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEckertIV(arg1,arg2,arg3,arg4);
9388 0 : if ( bLocalUseExceptions ) {
9389 0 : popErrorHandler();
9390 : }
9391 : #ifndef SED_HACKS
9392 : if ( bLocalUseExceptions ) {
9393 : CPLErr eclass = CPLGetLastErrorType();
9394 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9395 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9396 : }
9397 : }
9398 : #endif
9399 : }
9400 0 : {
9401 : /* %typemap(out) OGRErr */
9402 0 : if ( result != 0 && GetUseExceptions()) {
9403 0 : const char* pszMessage = CPLGetLastErrorMsg();
9404 0 : if( pszMessage[0] != '\0' )
9405 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9406 : else
9407 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9408 0 : SWIG_fail;
9409 : }
9410 : }
9411 0 : {
9412 : /* %typemap(ret) OGRErr */
9413 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9414 0 : resultobj = PyInt_FromLong( result );
9415 : }
9416 : }
9417 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9418 : return resultobj;
9419 : fail:
9420 : return NULL;
9421 : }
9422 :
9423 :
9424 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEckertVI(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9425 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9426 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9427 0 : double arg2 ;
9428 0 : double arg3 ;
9429 0 : double arg4 ;
9430 0 : void *argp1 = 0 ;
9431 0 : int res1 = 0 ;
9432 0 : double val2 ;
9433 0 : int ecode2 = 0 ;
9434 0 : double val3 ;
9435 0 : int ecode3 = 0 ;
9436 0 : double val4 ;
9437 0 : int ecode4 = 0 ;
9438 0 : PyObject * obj0 = 0 ;
9439 0 : PyObject * obj1 = 0 ;
9440 0 : PyObject * obj2 = 0 ;
9441 0 : PyObject * obj3 = 0 ;
9442 0 : char * kwnames[] = {
9443 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9444 : };
9445 0 : OGRErr result;
9446 :
9447 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetEckertVI", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9448 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9449 0 : if (!SWIG_IsOK(res1)) {
9450 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEckertVI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9451 : }
9452 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9453 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9454 0 : if (!SWIG_IsOK(ecode2)) {
9455 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEckertVI" "', argument " "2"" of type '" "double""'");
9456 : }
9457 0 : arg2 = static_cast< double >(val2);
9458 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9459 0 : if (!SWIG_IsOK(ecode3)) {
9460 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEckertVI" "', argument " "3"" of type '" "double""'");
9461 : }
9462 0 : arg3 = static_cast< double >(val3);
9463 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9464 0 : if (!SWIG_IsOK(ecode4)) {
9465 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEckertVI" "', argument " "4"" of type '" "double""'");
9466 : }
9467 0 : arg4 = static_cast< double >(val4);
9468 0 : {
9469 0 : const int bLocalUseExceptions = GetUseExceptions();
9470 0 : if ( bLocalUseExceptions ) {
9471 0 : pushErrorHandler();
9472 : }
9473 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEckertVI(arg1,arg2,arg3,arg4);
9474 0 : if ( bLocalUseExceptions ) {
9475 0 : popErrorHandler();
9476 : }
9477 : #ifndef SED_HACKS
9478 : if ( bLocalUseExceptions ) {
9479 : CPLErr eclass = CPLGetLastErrorType();
9480 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9481 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9482 : }
9483 : }
9484 : #endif
9485 : }
9486 0 : {
9487 : /* %typemap(out) OGRErr */
9488 0 : if ( result != 0 && GetUseExceptions()) {
9489 0 : const char* pszMessage = CPLGetLastErrorMsg();
9490 0 : if( pszMessage[0] != '\0' )
9491 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9492 : else
9493 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9494 0 : SWIG_fail;
9495 : }
9496 : }
9497 0 : {
9498 : /* %typemap(ret) OGRErr */
9499 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9500 0 : resultobj = PyInt_FromLong( result );
9501 : }
9502 : }
9503 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9504 : return resultobj;
9505 : fail:
9506 : return NULL;
9507 : }
9508 :
9509 :
9510 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEquirectangular(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9511 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9512 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9513 0 : double arg2 ;
9514 0 : double arg3 ;
9515 0 : double arg4 ;
9516 0 : double arg5 ;
9517 0 : void *argp1 = 0 ;
9518 0 : int res1 = 0 ;
9519 0 : double val2 ;
9520 0 : int ecode2 = 0 ;
9521 0 : double val3 ;
9522 0 : int ecode3 = 0 ;
9523 0 : double val4 ;
9524 0 : int ecode4 = 0 ;
9525 0 : double val5 ;
9526 0 : int ecode5 = 0 ;
9527 0 : PyObject * obj0 = 0 ;
9528 0 : PyObject * obj1 = 0 ;
9529 0 : PyObject * obj2 = 0 ;
9530 0 : PyObject * obj3 = 0 ;
9531 0 : PyObject * obj4 = 0 ;
9532 0 : char * kwnames[] = {
9533 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
9534 : };
9535 0 : OGRErr result;
9536 :
9537 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetEquirectangular", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
9538 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9539 0 : if (!SWIG_IsOK(res1)) {
9540 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEquirectangular" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9541 : }
9542 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9543 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9544 0 : if (!SWIG_IsOK(ecode2)) {
9545 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEquirectangular" "', argument " "2"" of type '" "double""'");
9546 : }
9547 0 : arg2 = static_cast< double >(val2);
9548 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9549 0 : if (!SWIG_IsOK(ecode3)) {
9550 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEquirectangular" "', argument " "3"" of type '" "double""'");
9551 : }
9552 0 : arg3 = static_cast< double >(val3);
9553 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9554 0 : if (!SWIG_IsOK(ecode4)) {
9555 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEquirectangular" "', argument " "4"" of type '" "double""'");
9556 : }
9557 0 : arg4 = static_cast< double >(val4);
9558 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9559 0 : if (!SWIG_IsOK(ecode5)) {
9560 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEquirectangular" "', argument " "5"" of type '" "double""'");
9561 : }
9562 0 : arg5 = static_cast< double >(val5);
9563 0 : {
9564 0 : const int bLocalUseExceptions = GetUseExceptions();
9565 0 : if ( bLocalUseExceptions ) {
9566 0 : pushErrorHandler();
9567 : }
9568 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular(arg1,arg2,arg3,arg4,arg5);
9569 0 : if ( bLocalUseExceptions ) {
9570 0 : popErrorHandler();
9571 : }
9572 : #ifndef SED_HACKS
9573 : if ( bLocalUseExceptions ) {
9574 : CPLErr eclass = CPLGetLastErrorType();
9575 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9576 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9577 : }
9578 : }
9579 : #endif
9580 : }
9581 0 : {
9582 : /* %typemap(out) OGRErr */
9583 0 : if ( result != 0 && GetUseExceptions()) {
9584 0 : const char* pszMessage = CPLGetLastErrorMsg();
9585 0 : if( pszMessage[0] != '\0' )
9586 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9587 : else
9588 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9589 0 : SWIG_fail;
9590 : }
9591 : }
9592 0 : {
9593 : /* %typemap(ret) OGRErr */
9594 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9595 0 : resultobj = PyInt_FromLong( result );
9596 : }
9597 : }
9598 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9599 : return resultobj;
9600 : fail:
9601 : return NULL;
9602 : }
9603 :
9604 :
9605 3 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEquirectangular2(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9606 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9607 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9608 3 : double arg2 ;
9609 3 : double arg3 ;
9610 3 : double arg4 ;
9611 3 : double arg5 ;
9612 3 : double arg6 ;
9613 3 : void *argp1 = 0 ;
9614 3 : int res1 = 0 ;
9615 3 : double val2 ;
9616 3 : int ecode2 = 0 ;
9617 3 : double val3 ;
9618 3 : int ecode3 = 0 ;
9619 3 : double val4 ;
9620 3 : int ecode4 = 0 ;
9621 3 : double val5 ;
9622 3 : int ecode5 = 0 ;
9623 3 : double val6 ;
9624 3 : int ecode6 = 0 ;
9625 3 : PyObject * obj0 = 0 ;
9626 3 : PyObject * obj1 = 0 ;
9627 3 : PyObject * obj2 = 0 ;
9628 3 : PyObject * obj3 = 0 ;
9629 3 : PyObject * obj4 = 0 ;
9630 3 : PyObject * obj5 = 0 ;
9631 3 : char * kwnames[] = {
9632 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"pseudostdparallellat", (char *)"fe", (char *)"fn", NULL
9633 : };
9634 3 : OGRErr result;
9635 :
9636 3 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetEquirectangular2", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
9637 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9638 3 : if (!SWIG_IsOK(res1)) {
9639 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9640 : }
9641 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9642 3 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9643 3 : if (!SWIG_IsOK(ecode2)) {
9644 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "2"" of type '" "double""'");
9645 : }
9646 3 : arg2 = static_cast< double >(val2);
9647 3 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9648 3 : if (!SWIG_IsOK(ecode3)) {
9649 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "3"" of type '" "double""'");
9650 : }
9651 3 : arg3 = static_cast< double >(val3);
9652 3 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9653 3 : if (!SWIG_IsOK(ecode4)) {
9654 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "4"" of type '" "double""'");
9655 : }
9656 3 : arg4 = static_cast< double >(val4);
9657 3 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9658 3 : if (!SWIG_IsOK(ecode5)) {
9659 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "5"" of type '" "double""'");
9660 : }
9661 3 : arg5 = static_cast< double >(val5);
9662 3 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9663 3 : if (!SWIG_IsOK(ecode6)) {
9664 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "6"" of type '" "double""'");
9665 : }
9666 3 : arg6 = static_cast< double >(val6);
9667 3 : {
9668 3 : const int bLocalUseExceptions = GetUseExceptions();
9669 3 : if ( bLocalUseExceptions ) {
9670 3 : pushErrorHandler();
9671 : }
9672 3 : result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular2(arg1,arg2,arg3,arg4,arg5,arg6);
9673 3 : if ( bLocalUseExceptions ) {
9674 3 : popErrorHandler();
9675 : }
9676 : #ifndef SED_HACKS
9677 : if ( bLocalUseExceptions ) {
9678 : CPLErr eclass = CPLGetLastErrorType();
9679 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9680 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9681 : }
9682 : }
9683 : #endif
9684 : }
9685 3 : {
9686 : /* %typemap(out) OGRErr */
9687 3 : if ( result != 0 && GetUseExceptions()) {
9688 0 : const char* pszMessage = CPLGetLastErrorMsg();
9689 0 : if( pszMessage[0] != '\0' )
9690 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9691 : else
9692 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9693 0 : SWIG_fail;
9694 : }
9695 : }
9696 3 : {
9697 : /* %typemap(ret) OGRErr */
9698 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9699 3 : resultobj = PyInt_FromLong( result );
9700 : }
9701 : }
9702 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9703 : return resultobj;
9704 : fail:
9705 : return NULL;
9706 : }
9707 :
9708 :
9709 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGaussSchreiberTMercator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9710 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9711 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9712 0 : double arg2 ;
9713 0 : double arg3 ;
9714 0 : double arg4 ;
9715 0 : double arg5 ;
9716 0 : double arg6 ;
9717 0 : void *argp1 = 0 ;
9718 0 : int res1 = 0 ;
9719 0 : double val2 ;
9720 0 : int ecode2 = 0 ;
9721 0 : double val3 ;
9722 0 : int ecode3 = 0 ;
9723 0 : double val4 ;
9724 0 : int ecode4 = 0 ;
9725 0 : double val5 ;
9726 0 : int ecode5 = 0 ;
9727 0 : double val6 ;
9728 0 : int ecode6 = 0 ;
9729 0 : PyObject * obj0 = 0 ;
9730 0 : PyObject * obj1 = 0 ;
9731 0 : PyObject * obj2 = 0 ;
9732 0 : PyObject * obj3 = 0 ;
9733 0 : PyObject * obj4 = 0 ;
9734 0 : PyObject * obj5 = 0 ;
9735 0 : char * kwnames[] = {
9736 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"sc", (char *)"fe", (char *)"fn", NULL
9737 : };
9738 0 : OGRErr result;
9739 :
9740 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetGaussSchreiberTMercator", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
9741 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9742 0 : if (!SWIG_IsOK(res1)) {
9743 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9744 : }
9745 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9746 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9747 0 : if (!SWIG_IsOK(ecode2)) {
9748 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "2"" of type '" "double""'");
9749 : }
9750 0 : arg2 = static_cast< double >(val2);
9751 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9752 0 : if (!SWIG_IsOK(ecode3)) {
9753 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "3"" of type '" "double""'");
9754 : }
9755 0 : arg3 = static_cast< double >(val3);
9756 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9757 0 : if (!SWIG_IsOK(ecode4)) {
9758 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "4"" of type '" "double""'");
9759 : }
9760 0 : arg4 = static_cast< double >(val4);
9761 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9762 0 : if (!SWIG_IsOK(ecode5)) {
9763 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "5"" of type '" "double""'");
9764 : }
9765 0 : arg5 = static_cast< double >(val5);
9766 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9767 0 : if (!SWIG_IsOK(ecode6)) {
9768 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "6"" of type '" "double""'");
9769 : }
9770 0 : arg6 = static_cast< double >(val6);
9771 0 : {
9772 0 : const int bLocalUseExceptions = GetUseExceptions();
9773 0 : if ( bLocalUseExceptions ) {
9774 0 : pushErrorHandler();
9775 : }
9776 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(arg1,arg2,arg3,arg4,arg5,arg6);
9777 0 : if ( bLocalUseExceptions ) {
9778 0 : popErrorHandler();
9779 : }
9780 : #ifndef SED_HACKS
9781 : if ( bLocalUseExceptions ) {
9782 : CPLErr eclass = CPLGetLastErrorType();
9783 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9784 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9785 : }
9786 : }
9787 : #endif
9788 : }
9789 0 : {
9790 : /* %typemap(out) OGRErr */
9791 0 : if ( result != 0 && GetUseExceptions()) {
9792 0 : const char* pszMessage = CPLGetLastErrorMsg();
9793 0 : if( pszMessage[0] != '\0' )
9794 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9795 : else
9796 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9797 0 : SWIG_fail;
9798 : }
9799 : }
9800 0 : {
9801 : /* %typemap(ret) OGRErr */
9802 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9803 0 : resultobj = PyInt_FromLong( result );
9804 : }
9805 : }
9806 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9807 : return resultobj;
9808 : fail:
9809 : return NULL;
9810 : }
9811 :
9812 :
9813 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9814 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9815 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9816 1 : double arg2 ;
9817 1 : double arg3 ;
9818 1 : double arg4 ;
9819 1 : void *argp1 = 0 ;
9820 1 : int res1 = 0 ;
9821 1 : double val2 ;
9822 1 : int ecode2 = 0 ;
9823 1 : double val3 ;
9824 1 : int ecode3 = 0 ;
9825 1 : double val4 ;
9826 1 : int ecode4 = 0 ;
9827 1 : PyObject * obj0 = 0 ;
9828 1 : PyObject * obj1 = 0 ;
9829 1 : PyObject * obj2 = 0 ;
9830 1 : PyObject * obj3 = 0 ;
9831 1 : char * kwnames[] = {
9832 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9833 : };
9834 1 : OGRErr result;
9835 :
9836 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetGS", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9837 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9838 1 : if (!SWIG_IsOK(res1)) {
9839 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9840 : }
9841 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9842 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9843 1 : if (!SWIG_IsOK(ecode2)) {
9844 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGS" "', argument " "2"" of type '" "double""'");
9845 : }
9846 1 : arg2 = static_cast< double >(val2);
9847 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9848 1 : if (!SWIG_IsOK(ecode3)) {
9849 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGS" "', argument " "3"" of type '" "double""'");
9850 : }
9851 1 : arg3 = static_cast< double >(val3);
9852 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9853 1 : if (!SWIG_IsOK(ecode4)) {
9854 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGS" "', argument " "4"" of type '" "double""'");
9855 : }
9856 1 : arg4 = static_cast< double >(val4);
9857 1 : {
9858 1 : const int bLocalUseExceptions = GetUseExceptions();
9859 1 : if ( bLocalUseExceptions ) {
9860 1 : pushErrorHandler();
9861 : }
9862 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetGS(arg1,arg2,arg3,arg4);
9863 1 : if ( bLocalUseExceptions ) {
9864 1 : popErrorHandler();
9865 : }
9866 : #ifndef SED_HACKS
9867 : if ( bLocalUseExceptions ) {
9868 : CPLErr eclass = CPLGetLastErrorType();
9869 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9870 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9871 : }
9872 : }
9873 : #endif
9874 : }
9875 1 : {
9876 : /* %typemap(out) OGRErr */
9877 1 : if ( result != 0 && GetUseExceptions()) {
9878 0 : const char* pszMessage = CPLGetLastErrorMsg();
9879 0 : if( pszMessage[0] != '\0' )
9880 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9881 : else
9882 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9883 0 : SWIG_fail;
9884 : }
9885 : }
9886 1 : {
9887 : /* %typemap(ret) OGRErr */
9888 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9889 1 : resultobj = PyInt_FromLong( result );
9890 : }
9891 : }
9892 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9893 : return resultobj;
9894 : fail:
9895 : return NULL;
9896 : }
9897 :
9898 :
9899 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGH(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9900 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9901 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9902 0 : double arg2 ;
9903 0 : double arg3 ;
9904 0 : double arg4 ;
9905 0 : void *argp1 = 0 ;
9906 0 : int res1 = 0 ;
9907 0 : double val2 ;
9908 0 : int ecode2 = 0 ;
9909 0 : double val3 ;
9910 0 : int ecode3 = 0 ;
9911 0 : double val4 ;
9912 0 : int ecode4 = 0 ;
9913 0 : PyObject * obj0 = 0 ;
9914 0 : PyObject * obj1 = 0 ;
9915 0 : PyObject * obj2 = 0 ;
9916 0 : PyObject * obj3 = 0 ;
9917 0 : char * kwnames[] = {
9918 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9919 : };
9920 0 : OGRErr result;
9921 :
9922 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetGH", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9923 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9924 0 : if (!SWIG_IsOK(res1)) {
9925 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGH" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9926 : }
9927 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9928 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9929 0 : if (!SWIG_IsOK(ecode2)) {
9930 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGH" "', argument " "2"" of type '" "double""'");
9931 : }
9932 0 : arg2 = static_cast< double >(val2);
9933 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9934 0 : if (!SWIG_IsOK(ecode3)) {
9935 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGH" "', argument " "3"" of type '" "double""'");
9936 : }
9937 0 : arg3 = static_cast< double >(val3);
9938 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9939 0 : if (!SWIG_IsOK(ecode4)) {
9940 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGH" "', argument " "4"" of type '" "double""'");
9941 : }
9942 0 : arg4 = static_cast< double >(val4);
9943 0 : {
9944 0 : const int bLocalUseExceptions = GetUseExceptions();
9945 0 : if ( bLocalUseExceptions ) {
9946 0 : pushErrorHandler();
9947 : }
9948 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGH(arg1,arg2,arg3,arg4);
9949 0 : if ( bLocalUseExceptions ) {
9950 0 : popErrorHandler();
9951 : }
9952 : #ifndef SED_HACKS
9953 : if ( bLocalUseExceptions ) {
9954 : CPLErr eclass = CPLGetLastErrorType();
9955 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9956 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9957 : }
9958 : }
9959 : #endif
9960 : }
9961 0 : {
9962 : /* %typemap(out) OGRErr */
9963 0 : if ( result != 0 && GetUseExceptions()) {
9964 0 : const char* pszMessage = CPLGetLastErrorMsg();
9965 0 : if( pszMessage[0] != '\0' )
9966 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9967 : else
9968 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9969 0 : SWIG_fail;
9970 : }
9971 : }
9972 0 : {
9973 : /* %typemap(ret) OGRErr */
9974 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9975 0 : resultobj = PyInt_FromLong( result );
9976 : }
9977 : }
9978 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
9979 : return resultobj;
9980 : fail:
9981 : return NULL;
9982 : }
9983 :
9984 :
9985 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetIGH(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9986 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9987 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9988 0 : void *argp1 = 0 ;
9989 0 : int res1 = 0 ;
9990 0 : PyObject *swig_obj[1] ;
9991 0 : OGRErr result;
9992 :
9993 0 : if (!args) SWIG_fail;
9994 0 : swig_obj[0] = args;
9995 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9996 0 : if (!SWIG_IsOK(res1)) {
9997 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetIGH" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9998 : }
9999 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10000 0 : {
10001 0 : const int bLocalUseExceptions = GetUseExceptions();
10002 0 : if ( bLocalUseExceptions ) {
10003 0 : pushErrorHandler();
10004 : }
10005 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetIGH(arg1);
10006 0 : if ( bLocalUseExceptions ) {
10007 0 : popErrorHandler();
10008 : }
10009 : #ifndef SED_HACKS
10010 : if ( bLocalUseExceptions ) {
10011 : CPLErr eclass = CPLGetLastErrorType();
10012 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10013 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10014 : }
10015 : }
10016 : #endif
10017 : }
10018 0 : {
10019 : /* %typemap(out) OGRErr */
10020 0 : if ( result != 0 && GetUseExceptions()) {
10021 0 : const char* pszMessage = CPLGetLastErrorMsg();
10022 0 : if( pszMessage[0] != '\0' )
10023 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10024 : else
10025 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10026 0 : SWIG_fail;
10027 : }
10028 : }
10029 0 : {
10030 : /* %typemap(ret) OGRErr */
10031 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10032 0 : resultobj = PyInt_FromLong( result );
10033 : }
10034 : }
10035 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10036 : return resultobj;
10037 : fail:
10038 : return NULL;
10039 : }
10040 :
10041 :
10042 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGEOS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10043 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10044 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10045 0 : double arg2 ;
10046 0 : double arg3 ;
10047 0 : double arg4 ;
10048 0 : double arg5 ;
10049 0 : void *argp1 = 0 ;
10050 0 : int res1 = 0 ;
10051 0 : double val2 ;
10052 0 : int ecode2 = 0 ;
10053 0 : double val3 ;
10054 0 : int ecode3 = 0 ;
10055 0 : double val4 ;
10056 0 : int ecode4 = 0 ;
10057 0 : double val5 ;
10058 0 : int ecode5 = 0 ;
10059 0 : PyObject * obj0 = 0 ;
10060 0 : PyObject * obj1 = 0 ;
10061 0 : PyObject * obj2 = 0 ;
10062 0 : PyObject * obj3 = 0 ;
10063 0 : PyObject * obj4 = 0 ;
10064 0 : char * kwnames[] = {
10065 : (char *)"self", (char *)"cm", (char *)"satelliteheight", (char *)"fe", (char *)"fn", NULL
10066 : };
10067 0 : OGRErr result;
10068 :
10069 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetGEOS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
10070 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10071 0 : if (!SWIG_IsOK(res1)) {
10072 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGEOS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10073 : }
10074 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10075 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10076 0 : if (!SWIG_IsOK(ecode2)) {
10077 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGEOS" "', argument " "2"" of type '" "double""'");
10078 : }
10079 0 : arg2 = static_cast< double >(val2);
10080 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10081 0 : if (!SWIG_IsOK(ecode3)) {
10082 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGEOS" "', argument " "3"" of type '" "double""'");
10083 : }
10084 0 : arg3 = static_cast< double >(val3);
10085 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10086 0 : if (!SWIG_IsOK(ecode4)) {
10087 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGEOS" "', argument " "4"" of type '" "double""'");
10088 : }
10089 0 : arg4 = static_cast< double >(val4);
10090 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10091 0 : if (!SWIG_IsOK(ecode5)) {
10092 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGEOS" "', argument " "5"" of type '" "double""'");
10093 : }
10094 0 : arg5 = static_cast< double >(val5);
10095 0 : {
10096 0 : const int bLocalUseExceptions = GetUseExceptions();
10097 0 : if ( bLocalUseExceptions ) {
10098 0 : pushErrorHandler();
10099 : }
10100 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGEOS(arg1,arg2,arg3,arg4,arg5);
10101 0 : if ( bLocalUseExceptions ) {
10102 0 : popErrorHandler();
10103 : }
10104 : #ifndef SED_HACKS
10105 : if ( bLocalUseExceptions ) {
10106 : CPLErr eclass = CPLGetLastErrorType();
10107 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10108 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10109 : }
10110 : }
10111 : #endif
10112 : }
10113 0 : {
10114 : /* %typemap(out) OGRErr */
10115 0 : if ( result != 0 && GetUseExceptions()) {
10116 0 : const char* pszMessage = CPLGetLastErrorMsg();
10117 0 : if( pszMessage[0] != '\0' )
10118 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10119 : else
10120 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10121 0 : SWIG_fail;
10122 : }
10123 : }
10124 0 : {
10125 : /* %typemap(ret) OGRErr */
10126 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10127 0 : resultobj = PyInt_FromLong( result );
10128 : }
10129 : }
10130 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10131 : return resultobj;
10132 : fail:
10133 : return NULL;
10134 : }
10135 :
10136 :
10137 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGnomonic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10138 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10139 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10140 0 : double arg2 ;
10141 0 : double arg3 ;
10142 0 : double arg4 ;
10143 0 : double arg5 ;
10144 0 : void *argp1 = 0 ;
10145 0 : int res1 = 0 ;
10146 0 : double val2 ;
10147 0 : int ecode2 = 0 ;
10148 0 : double val3 ;
10149 0 : int ecode3 = 0 ;
10150 0 : double val4 ;
10151 0 : int ecode4 = 0 ;
10152 0 : double val5 ;
10153 0 : int ecode5 = 0 ;
10154 0 : PyObject * obj0 = 0 ;
10155 0 : PyObject * obj1 = 0 ;
10156 0 : PyObject * obj2 = 0 ;
10157 0 : PyObject * obj3 = 0 ;
10158 0 : PyObject * obj4 = 0 ;
10159 0 : char * kwnames[] = {
10160 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10161 : };
10162 0 : OGRErr result;
10163 :
10164 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetGnomonic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
10165 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10166 0 : if (!SWIG_IsOK(res1)) {
10167 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGnomonic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10168 : }
10169 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10170 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10171 0 : if (!SWIG_IsOK(ecode2)) {
10172 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGnomonic" "', argument " "2"" of type '" "double""'");
10173 : }
10174 0 : arg2 = static_cast< double >(val2);
10175 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10176 0 : if (!SWIG_IsOK(ecode3)) {
10177 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGnomonic" "', argument " "3"" of type '" "double""'");
10178 : }
10179 0 : arg3 = static_cast< double >(val3);
10180 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10181 0 : if (!SWIG_IsOK(ecode4)) {
10182 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGnomonic" "', argument " "4"" of type '" "double""'");
10183 : }
10184 0 : arg4 = static_cast< double >(val4);
10185 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10186 0 : if (!SWIG_IsOK(ecode5)) {
10187 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGnomonic" "', argument " "5"" of type '" "double""'");
10188 : }
10189 0 : arg5 = static_cast< double >(val5);
10190 0 : {
10191 0 : const int bLocalUseExceptions = GetUseExceptions();
10192 0 : if ( bLocalUseExceptions ) {
10193 0 : pushErrorHandler();
10194 : }
10195 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGnomonic(arg1,arg2,arg3,arg4,arg5);
10196 0 : if ( bLocalUseExceptions ) {
10197 0 : popErrorHandler();
10198 : }
10199 : #ifndef SED_HACKS
10200 : if ( bLocalUseExceptions ) {
10201 : CPLErr eclass = CPLGetLastErrorType();
10202 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10203 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10204 : }
10205 : }
10206 : #endif
10207 : }
10208 0 : {
10209 : /* %typemap(out) OGRErr */
10210 0 : if ( result != 0 && GetUseExceptions()) {
10211 0 : const char* pszMessage = CPLGetLastErrorMsg();
10212 0 : if( pszMessage[0] != '\0' )
10213 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10214 : else
10215 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10216 0 : SWIG_fail;
10217 : }
10218 : }
10219 0 : {
10220 : /* %typemap(ret) OGRErr */
10221 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10222 0 : resultobj = PyInt_FromLong( result );
10223 : }
10224 : }
10225 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10226 : return resultobj;
10227 : fail:
10228 : return NULL;
10229 : }
10230 :
10231 :
10232 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetHOM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10233 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10234 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10235 0 : double arg2 ;
10236 0 : double arg3 ;
10237 0 : double arg4 ;
10238 0 : double arg5 ;
10239 0 : double arg6 ;
10240 0 : double arg7 ;
10241 0 : double arg8 ;
10242 0 : void *argp1 = 0 ;
10243 0 : int res1 = 0 ;
10244 0 : double val2 ;
10245 0 : int ecode2 = 0 ;
10246 0 : double val3 ;
10247 0 : int ecode3 = 0 ;
10248 0 : double val4 ;
10249 0 : int ecode4 = 0 ;
10250 0 : double val5 ;
10251 0 : int ecode5 = 0 ;
10252 0 : double val6 ;
10253 0 : int ecode6 = 0 ;
10254 0 : double val7 ;
10255 0 : int ecode7 = 0 ;
10256 0 : double val8 ;
10257 0 : int ecode8 = 0 ;
10258 0 : PyObject * obj0 = 0 ;
10259 0 : PyObject * obj1 = 0 ;
10260 0 : PyObject * obj2 = 0 ;
10261 0 : PyObject * obj3 = 0 ;
10262 0 : PyObject * obj4 = 0 ;
10263 0 : PyObject * obj5 = 0 ;
10264 0 : PyObject * obj6 = 0 ;
10265 0 : PyObject * obj7 = 0 ;
10266 0 : char * kwnames[] = {
10267 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"azimuth", (char *)"recttoskew", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10268 : };
10269 0 : OGRErr result;
10270 :
10271 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:SpatialReference_SetHOM", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
10272 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10273 0 : if (!SWIG_IsOK(res1)) {
10274 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetHOM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10275 : }
10276 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10277 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10278 0 : if (!SWIG_IsOK(ecode2)) {
10279 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetHOM" "', argument " "2"" of type '" "double""'");
10280 : }
10281 0 : arg2 = static_cast< double >(val2);
10282 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10283 0 : if (!SWIG_IsOK(ecode3)) {
10284 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetHOM" "', argument " "3"" of type '" "double""'");
10285 : }
10286 0 : arg3 = static_cast< double >(val3);
10287 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10288 0 : if (!SWIG_IsOK(ecode4)) {
10289 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetHOM" "', argument " "4"" of type '" "double""'");
10290 : }
10291 0 : arg4 = static_cast< double >(val4);
10292 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10293 0 : if (!SWIG_IsOK(ecode5)) {
10294 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetHOM" "', argument " "5"" of type '" "double""'");
10295 : }
10296 0 : arg5 = static_cast< double >(val5);
10297 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10298 0 : if (!SWIG_IsOK(ecode6)) {
10299 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetHOM" "', argument " "6"" of type '" "double""'");
10300 : }
10301 0 : arg6 = static_cast< double >(val6);
10302 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10303 0 : if (!SWIG_IsOK(ecode7)) {
10304 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetHOM" "', argument " "7"" of type '" "double""'");
10305 : }
10306 0 : arg7 = static_cast< double >(val7);
10307 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
10308 0 : if (!SWIG_IsOK(ecode8)) {
10309 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetHOM" "', argument " "8"" of type '" "double""'");
10310 : }
10311 0 : arg8 = static_cast< double >(val8);
10312 0 : {
10313 0 : const int bLocalUseExceptions = GetUseExceptions();
10314 0 : if ( bLocalUseExceptions ) {
10315 0 : pushErrorHandler();
10316 : }
10317 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetHOM(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
10318 0 : if ( bLocalUseExceptions ) {
10319 0 : popErrorHandler();
10320 : }
10321 : #ifndef SED_HACKS
10322 : if ( bLocalUseExceptions ) {
10323 : CPLErr eclass = CPLGetLastErrorType();
10324 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10325 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10326 : }
10327 : }
10328 : #endif
10329 : }
10330 0 : {
10331 : /* %typemap(out) OGRErr */
10332 0 : if ( result != 0 && GetUseExceptions()) {
10333 0 : const char* pszMessage = CPLGetLastErrorMsg();
10334 0 : if( pszMessage[0] != '\0' )
10335 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10336 : else
10337 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10338 0 : SWIG_fail;
10339 : }
10340 : }
10341 0 : {
10342 : /* %typemap(ret) OGRErr */
10343 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10344 0 : resultobj = PyInt_FromLong( result );
10345 : }
10346 : }
10347 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10348 : return resultobj;
10349 : fail:
10350 : return NULL;
10351 : }
10352 :
10353 :
10354 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetHOM2PNO(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10355 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10356 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10357 0 : double arg2 ;
10358 0 : double arg3 ;
10359 0 : double arg4 ;
10360 0 : double arg5 ;
10361 0 : double arg6 ;
10362 0 : double arg7 ;
10363 0 : double arg8 ;
10364 0 : double arg9 ;
10365 0 : void *argp1 = 0 ;
10366 0 : int res1 = 0 ;
10367 0 : double val2 ;
10368 0 : int ecode2 = 0 ;
10369 0 : double val3 ;
10370 0 : int ecode3 = 0 ;
10371 0 : double val4 ;
10372 0 : int ecode4 = 0 ;
10373 0 : double val5 ;
10374 0 : int ecode5 = 0 ;
10375 0 : double val6 ;
10376 0 : int ecode6 = 0 ;
10377 0 : double val7 ;
10378 0 : int ecode7 = 0 ;
10379 0 : double val8 ;
10380 0 : int ecode8 = 0 ;
10381 0 : double val9 ;
10382 0 : int ecode9 = 0 ;
10383 0 : PyObject * obj0 = 0 ;
10384 0 : PyObject * obj1 = 0 ;
10385 0 : PyObject * obj2 = 0 ;
10386 0 : PyObject * obj3 = 0 ;
10387 0 : PyObject * obj4 = 0 ;
10388 0 : PyObject * obj5 = 0 ;
10389 0 : PyObject * obj6 = 0 ;
10390 0 : PyObject * obj7 = 0 ;
10391 0 : PyObject * obj8 = 0 ;
10392 0 : char * kwnames[] = {
10393 : (char *)"self", (char *)"clat", (char *)"dfLat1", (char *)"dfLong1", (char *)"dfLat2", (char *)"dfLong2", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10394 : };
10395 0 : OGRErr result;
10396 :
10397 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOO:SpatialReference_SetHOM2PNO", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
10398 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10399 0 : if (!SWIG_IsOK(res1)) {
10400 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10401 : }
10402 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10403 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10404 0 : if (!SWIG_IsOK(ecode2)) {
10405 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "2"" of type '" "double""'");
10406 : }
10407 0 : arg2 = static_cast< double >(val2);
10408 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10409 0 : if (!SWIG_IsOK(ecode3)) {
10410 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "3"" of type '" "double""'");
10411 : }
10412 0 : arg3 = static_cast< double >(val3);
10413 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10414 0 : if (!SWIG_IsOK(ecode4)) {
10415 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "4"" of type '" "double""'");
10416 : }
10417 0 : arg4 = static_cast< double >(val4);
10418 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10419 0 : if (!SWIG_IsOK(ecode5)) {
10420 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "5"" of type '" "double""'");
10421 : }
10422 0 : arg5 = static_cast< double >(val5);
10423 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10424 0 : if (!SWIG_IsOK(ecode6)) {
10425 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "6"" of type '" "double""'");
10426 : }
10427 0 : arg6 = static_cast< double >(val6);
10428 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10429 0 : if (!SWIG_IsOK(ecode7)) {
10430 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "7"" of type '" "double""'");
10431 : }
10432 0 : arg7 = static_cast< double >(val7);
10433 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
10434 0 : if (!SWIG_IsOK(ecode8)) {
10435 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "8"" of type '" "double""'");
10436 : }
10437 0 : arg8 = static_cast< double >(val8);
10438 0 : ecode9 = SWIG_AsVal_double(obj8, &val9);
10439 0 : if (!SWIG_IsOK(ecode9)) {
10440 0 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "9"" of type '" "double""'");
10441 : }
10442 0 : arg9 = static_cast< double >(val9);
10443 0 : {
10444 0 : const int bLocalUseExceptions = GetUseExceptions();
10445 0 : if ( bLocalUseExceptions ) {
10446 0 : pushErrorHandler();
10447 : }
10448 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetHOM2PNO(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
10449 0 : if ( bLocalUseExceptions ) {
10450 0 : popErrorHandler();
10451 : }
10452 : #ifndef SED_HACKS
10453 : if ( bLocalUseExceptions ) {
10454 : CPLErr eclass = CPLGetLastErrorType();
10455 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10456 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10457 : }
10458 : }
10459 : #endif
10460 : }
10461 0 : {
10462 : /* %typemap(out) OGRErr */
10463 0 : if ( result != 0 && GetUseExceptions()) {
10464 0 : const char* pszMessage = CPLGetLastErrorMsg();
10465 0 : if( pszMessage[0] != '\0' )
10466 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10467 : else
10468 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10469 0 : SWIG_fail;
10470 : }
10471 : }
10472 0 : {
10473 : /* %typemap(ret) OGRErr */
10474 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10475 0 : resultobj = PyInt_FromLong( result );
10476 : }
10477 : }
10478 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10479 : return resultobj;
10480 : fail:
10481 : return NULL;
10482 : }
10483 :
10484 :
10485 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetKrovak(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10486 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10487 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10488 0 : double arg2 ;
10489 0 : double arg3 ;
10490 0 : double arg4 ;
10491 0 : double arg5 ;
10492 0 : double arg6 ;
10493 0 : double arg7 ;
10494 0 : double arg8 ;
10495 0 : void *argp1 = 0 ;
10496 0 : int res1 = 0 ;
10497 0 : double val2 ;
10498 0 : int ecode2 = 0 ;
10499 0 : double val3 ;
10500 0 : int ecode3 = 0 ;
10501 0 : double val4 ;
10502 0 : int ecode4 = 0 ;
10503 0 : double val5 ;
10504 0 : int ecode5 = 0 ;
10505 0 : double val6 ;
10506 0 : int ecode6 = 0 ;
10507 0 : double val7 ;
10508 0 : int ecode7 = 0 ;
10509 0 : double val8 ;
10510 0 : int ecode8 = 0 ;
10511 0 : PyObject * obj0 = 0 ;
10512 0 : PyObject * obj1 = 0 ;
10513 0 : PyObject * obj2 = 0 ;
10514 0 : PyObject * obj3 = 0 ;
10515 0 : PyObject * obj4 = 0 ;
10516 0 : PyObject * obj5 = 0 ;
10517 0 : PyObject * obj6 = 0 ;
10518 0 : PyObject * obj7 = 0 ;
10519 0 : char * kwnames[] = {
10520 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"azimuth", (char *)"pseudostdparallellat", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10521 : };
10522 0 : OGRErr result;
10523 :
10524 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:SpatialReference_SetKrovak", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
10525 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10526 0 : if (!SWIG_IsOK(res1)) {
10527 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetKrovak" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10528 : }
10529 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10530 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10531 0 : if (!SWIG_IsOK(ecode2)) {
10532 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetKrovak" "', argument " "2"" of type '" "double""'");
10533 : }
10534 0 : arg2 = static_cast< double >(val2);
10535 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10536 0 : if (!SWIG_IsOK(ecode3)) {
10537 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetKrovak" "', argument " "3"" of type '" "double""'");
10538 : }
10539 0 : arg3 = static_cast< double >(val3);
10540 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10541 0 : if (!SWIG_IsOK(ecode4)) {
10542 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetKrovak" "', argument " "4"" of type '" "double""'");
10543 : }
10544 0 : arg4 = static_cast< double >(val4);
10545 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10546 0 : if (!SWIG_IsOK(ecode5)) {
10547 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetKrovak" "', argument " "5"" of type '" "double""'");
10548 : }
10549 0 : arg5 = static_cast< double >(val5);
10550 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10551 0 : if (!SWIG_IsOK(ecode6)) {
10552 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetKrovak" "', argument " "6"" of type '" "double""'");
10553 : }
10554 0 : arg6 = static_cast< double >(val6);
10555 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10556 0 : if (!SWIG_IsOK(ecode7)) {
10557 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetKrovak" "', argument " "7"" of type '" "double""'");
10558 : }
10559 0 : arg7 = static_cast< double >(val7);
10560 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
10561 0 : if (!SWIG_IsOK(ecode8)) {
10562 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetKrovak" "', argument " "8"" of type '" "double""'");
10563 : }
10564 0 : arg8 = static_cast< double >(val8);
10565 0 : {
10566 0 : const int bLocalUseExceptions = GetUseExceptions();
10567 0 : if ( bLocalUseExceptions ) {
10568 0 : pushErrorHandler();
10569 : }
10570 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetKrovak(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
10571 0 : if ( bLocalUseExceptions ) {
10572 0 : popErrorHandler();
10573 : }
10574 : #ifndef SED_HACKS
10575 : if ( bLocalUseExceptions ) {
10576 : CPLErr eclass = CPLGetLastErrorType();
10577 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10578 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10579 : }
10580 : }
10581 : #endif
10582 : }
10583 0 : {
10584 : /* %typemap(out) OGRErr */
10585 0 : if ( result != 0 && GetUseExceptions()) {
10586 0 : const char* pszMessage = CPLGetLastErrorMsg();
10587 0 : if( pszMessage[0] != '\0' )
10588 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10589 : else
10590 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10591 0 : SWIG_fail;
10592 : }
10593 : }
10594 0 : {
10595 : /* %typemap(ret) OGRErr */
10596 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10597 0 : resultobj = PyInt_FromLong( result );
10598 : }
10599 : }
10600 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10601 : return resultobj;
10602 : fail:
10603 : return NULL;
10604 : }
10605 :
10606 :
10607 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLAEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10608 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10609 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10610 0 : double arg2 ;
10611 0 : double arg3 ;
10612 0 : double arg4 ;
10613 0 : double arg5 ;
10614 0 : void *argp1 = 0 ;
10615 0 : int res1 = 0 ;
10616 0 : double val2 ;
10617 0 : int ecode2 = 0 ;
10618 0 : double val3 ;
10619 0 : int ecode3 = 0 ;
10620 0 : double val4 ;
10621 0 : int ecode4 = 0 ;
10622 0 : double val5 ;
10623 0 : int ecode5 = 0 ;
10624 0 : PyObject * obj0 = 0 ;
10625 0 : PyObject * obj1 = 0 ;
10626 0 : PyObject * obj2 = 0 ;
10627 0 : PyObject * obj3 = 0 ;
10628 0 : PyObject * obj4 = 0 ;
10629 0 : char * kwnames[] = {
10630 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10631 : };
10632 0 : OGRErr result;
10633 :
10634 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetLAEA", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
10635 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10636 0 : if (!SWIG_IsOK(res1)) {
10637 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLAEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10638 : }
10639 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10640 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10641 0 : if (!SWIG_IsOK(ecode2)) {
10642 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLAEA" "', argument " "2"" of type '" "double""'");
10643 : }
10644 0 : arg2 = static_cast< double >(val2);
10645 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10646 0 : if (!SWIG_IsOK(ecode3)) {
10647 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLAEA" "', argument " "3"" of type '" "double""'");
10648 : }
10649 0 : arg3 = static_cast< double >(val3);
10650 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10651 0 : if (!SWIG_IsOK(ecode4)) {
10652 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLAEA" "', argument " "4"" of type '" "double""'");
10653 : }
10654 0 : arg4 = static_cast< double >(val4);
10655 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10656 0 : if (!SWIG_IsOK(ecode5)) {
10657 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLAEA" "', argument " "5"" of type '" "double""'");
10658 : }
10659 0 : arg5 = static_cast< double >(val5);
10660 0 : {
10661 0 : const int bLocalUseExceptions = GetUseExceptions();
10662 0 : if ( bLocalUseExceptions ) {
10663 0 : pushErrorHandler();
10664 : }
10665 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLAEA(arg1,arg2,arg3,arg4,arg5);
10666 0 : if ( bLocalUseExceptions ) {
10667 0 : popErrorHandler();
10668 : }
10669 : #ifndef SED_HACKS
10670 : if ( bLocalUseExceptions ) {
10671 : CPLErr eclass = CPLGetLastErrorType();
10672 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10673 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10674 : }
10675 : }
10676 : #endif
10677 : }
10678 0 : {
10679 : /* %typemap(out) OGRErr */
10680 0 : if ( result != 0 && GetUseExceptions()) {
10681 0 : const char* pszMessage = CPLGetLastErrorMsg();
10682 0 : if( pszMessage[0] != '\0' )
10683 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10684 : else
10685 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10686 0 : SWIG_fail;
10687 : }
10688 : }
10689 0 : {
10690 : /* %typemap(ret) OGRErr */
10691 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10692 0 : resultobj = PyInt_FromLong( result );
10693 : }
10694 : }
10695 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10696 : return resultobj;
10697 : fail:
10698 : return NULL;
10699 : }
10700 :
10701 :
10702 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10703 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10704 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10705 1 : double arg2 ;
10706 1 : double arg3 ;
10707 1 : double arg4 ;
10708 1 : double arg5 ;
10709 1 : double arg6 ;
10710 1 : double arg7 ;
10711 1 : void *argp1 = 0 ;
10712 1 : int res1 = 0 ;
10713 1 : double val2 ;
10714 1 : int ecode2 = 0 ;
10715 1 : double val3 ;
10716 1 : int ecode3 = 0 ;
10717 1 : double val4 ;
10718 1 : int ecode4 = 0 ;
10719 1 : double val5 ;
10720 1 : int ecode5 = 0 ;
10721 1 : double val6 ;
10722 1 : int ecode6 = 0 ;
10723 1 : double val7 ;
10724 1 : int ecode7 = 0 ;
10725 1 : PyObject * obj0 = 0 ;
10726 1 : PyObject * obj1 = 0 ;
10727 1 : PyObject * obj2 = 0 ;
10728 1 : PyObject * obj3 = 0 ;
10729 1 : PyObject * obj4 = 0 ;
10730 1 : PyObject * obj5 = 0 ;
10731 1 : PyObject * obj6 = 0 ;
10732 1 : char * kwnames[] = {
10733 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10734 : };
10735 1 : OGRErr result;
10736 :
10737 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetLCC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
10738 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10739 1 : if (!SWIG_IsOK(res1)) {
10740 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10741 : }
10742 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10743 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10744 1 : if (!SWIG_IsOK(ecode2)) {
10745 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCC" "', argument " "2"" of type '" "double""'");
10746 : }
10747 1 : arg2 = static_cast< double >(val2);
10748 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10749 1 : if (!SWIG_IsOK(ecode3)) {
10750 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCC" "', argument " "3"" of type '" "double""'");
10751 : }
10752 1 : arg3 = static_cast< double >(val3);
10753 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10754 1 : if (!SWIG_IsOK(ecode4)) {
10755 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCC" "', argument " "4"" of type '" "double""'");
10756 : }
10757 1 : arg4 = static_cast< double >(val4);
10758 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10759 1 : if (!SWIG_IsOK(ecode5)) {
10760 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCC" "', argument " "5"" of type '" "double""'");
10761 : }
10762 1 : arg5 = static_cast< double >(val5);
10763 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10764 1 : if (!SWIG_IsOK(ecode6)) {
10765 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCC" "', argument " "6"" of type '" "double""'");
10766 : }
10767 1 : arg6 = static_cast< double >(val6);
10768 1 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10769 1 : if (!SWIG_IsOK(ecode7)) {
10770 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetLCC" "', argument " "7"" of type '" "double""'");
10771 : }
10772 1 : arg7 = static_cast< double >(val7);
10773 1 : {
10774 1 : const int bLocalUseExceptions = GetUseExceptions();
10775 1 : if ( bLocalUseExceptions ) {
10776 1 : pushErrorHandler();
10777 : }
10778 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
10779 1 : if ( bLocalUseExceptions ) {
10780 1 : popErrorHandler();
10781 : }
10782 : #ifndef SED_HACKS
10783 : if ( bLocalUseExceptions ) {
10784 : CPLErr eclass = CPLGetLastErrorType();
10785 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10786 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10787 : }
10788 : }
10789 : #endif
10790 : }
10791 1 : {
10792 : /* %typemap(out) OGRErr */
10793 1 : if ( result != 0 && GetUseExceptions()) {
10794 0 : const char* pszMessage = CPLGetLastErrorMsg();
10795 0 : if( pszMessage[0] != '\0' )
10796 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10797 : else
10798 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10799 0 : SWIG_fail;
10800 : }
10801 : }
10802 1 : {
10803 : /* %typemap(ret) OGRErr */
10804 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10805 1 : resultobj = PyInt_FromLong( result );
10806 : }
10807 : }
10808 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10809 : return resultobj;
10810 : fail:
10811 : return NULL;
10812 : }
10813 :
10814 :
10815 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCC1SP(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10816 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10817 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10818 0 : double arg2 ;
10819 0 : double arg3 ;
10820 0 : double arg4 ;
10821 0 : double arg5 ;
10822 0 : double arg6 ;
10823 0 : void *argp1 = 0 ;
10824 0 : int res1 = 0 ;
10825 0 : double val2 ;
10826 0 : int ecode2 = 0 ;
10827 0 : double val3 ;
10828 0 : int ecode3 = 0 ;
10829 0 : double val4 ;
10830 0 : int ecode4 = 0 ;
10831 0 : double val5 ;
10832 0 : int ecode5 = 0 ;
10833 0 : double val6 ;
10834 0 : int ecode6 = 0 ;
10835 0 : PyObject * obj0 = 0 ;
10836 0 : PyObject * obj1 = 0 ;
10837 0 : PyObject * obj2 = 0 ;
10838 0 : PyObject * obj3 = 0 ;
10839 0 : PyObject * obj4 = 0 ;
10840 0 : PyObject * obj5 = 0 ;
10841 0 : char * kwnames[] = {
10842 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10843 : };
10844 0 : OGRErr result;
10845 :
10846 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetLCC1SP", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
10847 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10848 0 : if (!SWIG_IsOK(res1)) {
10849 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCC1SP" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10850 : }
10851 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10852 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10853 0 : if (!SWIG_IsOK(ecode2)) {
10854 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCC1SP" "', argument " "2"" of type '" "double""'");
10855 : }
10856 0 : arg2 = static_cast< double >(val2);
10857 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10858 0 : if (!SWIG_IsOK(ecode3)) {
10859 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCC1SP" "', argument " "3"" of type '" "double""'");
10860 : }
10861 0 : arg3 = static_cast< double >(val3);
10862 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10863 0 : if (!SWIG_IsOK(ecode4)) {
10864 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCC1SP" "', argument " "4"" of type '" "double""'");
10865 : }
10866 0 : arg4 = static_cast< double >(val4);
10867 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10868 0 : if (!SWIG_IsOK(ecode5)) {
10869 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCC1SP" "', argument " "5"" of type '" "double""'");
10870 : }
10871 0 : arg5 = static_cast< double >(val5);
10872 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10873 0 : if (!SWIG_IsOK(ecode6)) {
10874 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCC1SP" "', argument " "6"" of type '" "double""'");
10875 : }
10876 0 : arg6 = static_cast< double >(val6);
10877 0 : {
10878 0 : const int bLocalUseExceptions = GetUseExceptions();
10879 0 : if ( bLocalUseExceptions ) {
10880 0 : pushErrorHandler();
10881 : }
10882 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCC1SP(arg1,arg2,arg3,arg4,arg5,arg6);
10883 0 : if ( bLocalUseExceptions ) {
10884 0 : popErrorHandler();
10885 : }
10886 : #ifndef SED_HACKS
10887 : if ( bLocalUseExceptions ) {
10888 : CPLErr eclass = CPLGetLastErrorType();
10889 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10890 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10891 : }
10892 : }
10893 : #endif
10894 : }
10895 0 : {
10896 : /* %typemap(out) OGRErr */
10897 0 : if ( result != 0 && GetUseExceptions()) {
10898 0 : const char* pszMessage = CPLGetLastErrorMsg();
10899 0 : if( pszMessage[0] != '\0' )
10900 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10901 : else
10902 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10903 0 : SWIG_fail;
10904 : }
10905 : }
10906 0 : {
10907 : /* %typemap(ret) OGRErr */
10908 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10909 0 : resultobj = PyInt_FromLong( result );
10910 : }
10911 : }
10912 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
10913 : return resultobj;
10914 : fail:
10915 : return NULL;
10916 : }
10917 :
10918 :
10919 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCCB(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10920 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10921 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10922 0 : double arg2 ;
10923 0 : double arg3 ;
10924 0 : double arg4 ;
10925 0 : double arg5 ;
10926 0 : double arg6 ;
10927 0 : double arg7 ;
10928 0 : void *argp1 = 0 ;
10929 0 : int res1 = 0 ;
10930 0 : double val2 ;
10931 0 : int ecode2 = 0 ;
10932 0 : double val3 ;
10933 0 : int ecode3 = 0 ;
10934 0 : double val4 ;
10935 0 : int ecode4 = 0 ;
10936 0 : double val5 ;
10937 0 : int ecode5 = 0 ;
10938 0 : double val6 ;
10939 0 : int ecode6 = 0 ;
10940 0 : double val7 ;
10941 0 : int ecode7 = 0 ;
10942 0 : PyObject * obj0 = 0 ;
10943 0 : PyObject * obj1 = 0 ;
10944 0 : PyObject * obj2 = 0 ;
10945 0 : PyObject * obj3 = 0 ;
10946 0 : PyObject * obj4 = 0 ;
10947 0 : PyObject * obj5 = 0 ;
10948 0 : PyObject * obj6 = 0 ;
10949 0 : char * kwnames[] = {
10950 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10951 : };
10952 0 : OGRErr result;
10953 :
10954 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetLCCB", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
10955 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10956 0 : if (!SWIG_IsOK(res1)) {
10957 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCCB" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10958 : }
10959 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10960 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10961 0 : if (!SWIG_IsOK(ecode2)) {
10962 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCCB" "', argument " "2"" of type '" "double""'");
10963 : }
10964 0 : arg2 = static_cast< double >(val2);
10965 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10966 0 : if (!SWIG_IsOK(ecode3)) {
10967 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCCB" "', argument " "3"" of type '" "double""'");
10968 : }
10969 0 : arg3 = static_cast< double >(val3);
10970 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10971 0 : if (!SWIG_IsOK(ecode4)) {
10972 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCCB" "', argument " "4"" of type '" "double""'");
10973 : }
10974 0 : arg4 = static_cast< double >(val4);
10975 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10976 0 : if (!SWIG_IsOK(ecode5)) {
10977 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCCB" "', argument " "5"" of type '" "double""'");
10978 : }
10979 0 : arg5 = static_cast< double >(val5);
10980 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10981 0 : if (!SWIG_IsOK(ecode6)) {
10982 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCCB" "', argument " "6"" of type '" "double""'");
10983 : }
10984 0 : arg6 = static_cast< double >(val6);
10985 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10986 0 : if (!SWIG_IsOK(ecode7)) {
10987 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetLCCB" "', argument " "7"" of type '" "double""'");
10988 : }
10989 0 : arg7 = static_cast< double >(val7);
10990 0 : {
10991 0 : const int bLocalUseExceptions = GetUseExceptions();
10992 0 : if ( bLocalUseExceptions ) {
10993 0 : pushErrorHandler();
10994 : }
10995 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCCB(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
10996 0 : if ( bLocalUseExceptions ) {
10997 0 : popErrorHandler();
10998 : }
10999 : #ifndef SED_HACKS
11000 : if ( bLocalUseExceptions ) {
11001 : CPLErr eclass = CPLGetLastErrorType();
11002 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11003 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11004 : }
11005 : }
11006 : #endif
11007 : }
11008 0 : {
11009 : /* %typemap(out) OGRErr */
11010 0 : if ( result != 0 && GetUseExceptions()) {
11011 0 : const char* pszMessage = CPLGetLastErrorMsg();
11012 0 : if( pszMessage[0] != '\0' )
11013 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11014 : else
11015 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11016 0 : SWIG_fail;
11017 : }
11018 : }
11019 0 : {
11020 : /* %typemap(ret) OGRErr */
11021 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11022 0 : resultobj = PyInt_FromLong( result );
11023 : }
11024 : }
11025 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11026 : return resultobj;
11027 : fail:
11028 : return NULL;
11029 : }
11030 :
11031 :
11032 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11033 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11034 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11035 0 : double arg2 ;
11036 0 : double arg3 ;
11037 0 : double arg4 ;
11038 0 : double arg5 ;
11039 0 : void *argp1 = 0 ;
11040 0 : int res1 = 0 ;
11041 0 : double val2 ;
11042 0 : int ecode2 = 0 ;
11043 0 : double val3 ;
11044 0 : int ecode3 = 0 ;
11045 0 : double val4 ;
11046 0 : int ecode4 = 0 ;
11047 0 : double val5 ;
11048 0 : int ecode5 = 0 ;
11049 0 : PyObject * obj0 = 0 ;
11050 0 : PyObject * obj1 = 0 ;
11051 0 : PyObject * obj2 = 0 ;
11052 0 : PyObject * obj3 = 0 ;
11053 0 : PyObject * obj4 = 0 ;
11054 0 : char * kwnames[] = {
11055 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11056 : };
11057 0 : OGRErr result;
11058 :
11059 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetMC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11060 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11061 0 : if (!SWIG_IsOK(res1)) {
11062 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11063 : }
11064 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11065 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11066 0 : if (!SWIG_IsOK(ecode2)) {
11067 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMC" "', argument " "2"" of type '" "double""'");
11068 : }
11069 0 : arg2 = static_cast< double >(val2);
11070 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11071 0 : if (!SWIG_IsOK(ecode3)) {
11072 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMC" "', argument " "3"" of type '" "double""'");
11073 : }
11074 0 : arg3 = static_cast< double >(val3);
11075 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11076 0 : if (!SWIG_IsOK(ecode4)) {
11077 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMC" "', argument " "4"" of type '" "double""'");
11078 : }
11079 0 : arg4 = static_cast< double >(val4);
11080 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11081 0 : if (!SWIG_IsOK(ecode5)) {
11082 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMC" "', argument " "5"" of type '" "double""'");
11083 : }
11084 0 : arg5 = static_cast< double >(val5);
11085 0 : {
11086 0 : const int bLocalUseExceptions = GetUseExceptions();
11087 0 : if ( bLocalUseExceptions ) {
11088 0 : pushErrorHandler();
11089 : }
11090 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetMC(arg1,arg2,arg3,arg4,arg5);
11091 0 : if ( bLocalUseExceptions ) {
11092 0 : popErrorHandler();
11093 : }
11094 : #ifndef SED_HACKS
11095 : if ( bLocalUseExceptions ) {
11096 : CPLErr eclass = CPLGetLastErrorType();
11097 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11098 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11099 : }
11100 : }
11101 : #endif
11102 : }
11103 0 : {
11104 : /* %typemap(out) OGRErr */
11105 0 : if ( result != 0 && GetUseExceptions()) {
11106 0 : const char* pszMessage = CPLGetLastErrorMsg();
11107 0 : if( pszMessage[0] != '\0' )
11108 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11109 : else
11110 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11111 0 : SWIG_fail;
11112 : }
11113 : }
11114 0 : {
11115 : /* %typemap(ret) OGRErr */
11116 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11117 0 : resultobj = PyInt_FromLong( result );
11118 : }
11119 : }
11120 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11121 : return resultobj;
11122 : fail:
11123 : return NULL;
11124 : }
11125 :
11126 :
11127 2 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMercator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11128 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11129 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11130 2 : double arg2 ;
11131 2 : double arg3 ;
11132 2 : double arg4 ;
11133 2 : double arg5 ;
11134 2 : double arg6 ;
11135 2 : void *argp1 = 0 ;
11136 2 : int res1 = 0 ;
11137 2 : double val2 ;
11138 2 : int ecode2 = 0 ;
11139 2 : double val3 ;
11140 2 : int ecode3 = 0 ;
11141 2 : double val4 ;
11142 2 : int ecode4 = 0 ;
11143 2 : double val5 ;
11144 2 : int ecode5 = 0 ;
11145 2 : double val6 ;
11146 2 : int ecode6 = 0 ;
11147 2 : PyObject * obj0 = 0 ;
11148 2 : PyObject * obj1 = 0 ;
11149 2 : PyObject * obj2 = 0 ;
11150 2 : PyObject * obj3 = 0 ;
11151 2 : PyObject * obj4 = 0 ;
11152 2 : PyObject * obj5 = 0 ;
11153 2 : char * kwnames[] = {
11154 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
11155 : };
11156 2 : OGRErr result;
11157 :
11158 2 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetMercator", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11159 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11160 2 : if (!SWIG_IsOK(res1)) {
11161 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMercator" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11162 : }
11163 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11164 2 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11165 2 : if (!SWIG_IsOK(ecode2)) {
11166 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMercator" "', argument " "2"" of type '" "double""'");
11167 : }
11168 2 : arg2 = static_cast< double >(val2);
11169 2 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11170 2 : if (!SWIG_IsOK(ecode3)) {
11171 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMercator" "', argument " "3"" of type '" "double""'");
11172 : }
11173 2 : arg3 = static_cast< double >(val3);
11174 2 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11175 2 : if (!SWIG_IsOK(ecode4)) {
11176 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMercator" "', argument " "4"" of type '" "double""'");
11177 : }
11178 2 : arg4 = static_cast< double >(val4);
11179 2 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11180 2 : if (!SWIG_IsOK(ecode5)) {
11181 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMercator" "', argument " "5"" of type '" "double""'");
11182 : }
11183 2 : arg5 = static_cast< double >(val5);
11184 2 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11185 2 : if (!SWIG_IsOK(ecode6)) {
11186 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetMercator" "', argument " "6"" of type '" "double""'");
11187 : }
11188 2 : arg6 = static_cast< double >(val6);
11189 2 : {
11190 2 : const int bLocalUseExceptions = GetUseExceptions();
11191 2 : if ( bLocalUseExceptions ) {
11192 2 : pushErrorHandler();
11193 : }
11194 2 : result = (OGRErr)OSRSpatialReferenceShadow_SetMercator(arg1,arg2,arg3,arg4,arg5,arg6);
11195 2 : if ( bLocalUseExceptions ) {
11196 2 : popErrorHandler();
11197 : }
11198 : #ifndef SED_HACKS
11199 : if ( bLocalUseExceptions ) {
11200 : CPLErr eclass = CPLGetLastErrorType();
11201 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11202 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11203 : }
11204 : }
11205 : #endif
11206 : }
11207 2 : {
11208 : /* %typemap(out) OGRErr */
11209 2 : if ( result != 0 && GetUseExceptions()) {
11210 0 : const char* pszMessage = CPLGetLastErrorMsg();
11211 0 : if( pszMessage[0] != '\0' )
11212 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11213 : else
11214 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11215 0 : SWIG_fail;
11216 : }
11217 : }
11218 2 : {
11219 : /* %typemap(ret) OGRErr */
11220 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11221 2 : resultobj = PyInt_FromLong( result );
11222 : }
11223 : }
11224 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11225 : return resultobj;
11226 : fail:
11227 : return NULL;
11228 : }
11229 :
11230 :
11231 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMercator2SP(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11232 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11233 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11234 1 : double arg2 ;
11235 1 : double arg3 ;
11236 1 : double arg4 ;
11237 1 : double arg5 ;
11238 1 : double arg6 ;
11239 1 : void *argp1 = 0 ;
11240 1 : int res1 = 0 ;
11241 1 : double val2 ;
11242 1 : int ecode2 = 0 ;
11243 1 : double val3 ;
11244 1 : int ecode3 = 0 ;
11245 1 : double val4 ;
11246 1 : int ecode4 = 0 ;
11247 1 : double val5 ;
11248 1 : int ecode5 = 0 ;
11249 1 : double val6 ;
11250 1 : int ecode6 = 0 ;
11251 1 : PyObject * obj0 = 0 ;
11252 1 : PyObject * obj1 = 0 ;
11253 1 : PyObject * obj2 = 0 ;
11254 1 : PyObject * obj3 = 0 ;
11255 1 : PyObject * obj4 = 0 ;
11256 1 : PyObject * obj5 = 0 ;
11257 1 : char * kwnames[] = {
11258 : (char *)"self", (char *)"stdp1", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11259 : };
11260 1 : OGRErr result;
11261 :
11262 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetMercator2SP", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11263 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11264 1 : if (!SWIG_IsOK(res1)) {
11265 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMercator2SP" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11266 : }
11267 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11268 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11269 1 : if (!SWIG_IsOK(ecode2)) {
11270 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMercator2SP" "', argument " "2"" of type '" "double""'");
11271 : }
11272 1 : arg2 = static_cast< double >(val2);
11273 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11274 1 : if (!SWIG_IsOK(ecode3)) {
11275 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMercator2SP" "', argument " "3"" of type '" "double""'");
11276 : }
11277 1 : arg3 = static_cast< double >(val3);
11278 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11279 1 : if (!SWIG_IsOK(ecode4)) {
11280 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMercator2SP" "', argument " "4"" of type '" "double""'");
11281 : }
11282 1 : arg4 = static_cast< double >(val4);
11283 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11284 1 : if (!SWIG_IsOK(ecode5)) {
11285 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMercator2SP" "', argument " "5"" of type '" "double""'");
11286 : }
11287 1 : arg5 = static_cast< double >(val5);
11288 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11289 1 : if (!SWIG_IsOK(ecode6)) {
11290 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetMercator2SP" "', argument " "6"" of type '" "double""'");
11291 : }
11292 1 : arg6 = static_cast< double >(val6);
11293 1 : {
11294 1 : const int bLocalUseExceptions = GetUseExceptions();
11295 1 : if ( bLocalUseExceptions ) {
11296 1 : pushErrorHandler();
11297 : }
11298 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetMercator2SP(arg1,arg2,arg3,arg4,arg5,arg6);
11299 1 : if ( bLocalUseExceptions ) {
11300 1 : popErrorHandler();
11301 : }
11302 : #ifndef SED_HACKS
11303 : if ( bLocalUseExceptions ) {
11304 : CPLErr eclass = CPLGetLastErrorType();
11305 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11306 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11307 : }
11308 : }
11309 : #endif
11310 : }
11311 1 : {
11312 : /* %typemap(out) OGRErr */
11313 1 : if ( result != 0 && GetUseExceptions()) {
11314 0 : const char* pszMessage = CPLGetLastErrorMsg();
11315 0 : if( pszMessage[0] != '\0' )
11316 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11317 : else
11318 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11319 0 : SWIG_fail;
11320 : }
11321 : }
11322 1 : {
11323 : /* %typemap(ret) OGRErr */
11324 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11325 1 : resultobj = PyInt_FromLong( result );
11326 : }
11327 : }
11328 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11329 : return resultobj;
11330 : fail:
11331 : return NULL;
11332 : }
11333 :
11334 :
11335 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMollweide(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11336 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11337 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11338 0 : double arg2 ;
11339 0 : double arg3 ;
11340 0 : double arg4 ;
11341 0 : void *argp1 = 0 ;
11342 0 : int res1 = 0 ;
11343 0 : double val2 ;
11344 0 : int ecode2 = 0 ;
11345 0 : double val3 ;
11346 0 : int ecode3 = 0 ;
11347 0 : double val4 ;
11348 0 : int ecode4 = 0 ;
11349 0 : PyObject * obj0 = 0 ;
11350 0 : PyObject * obj1 = 0 ;
11351 0 : PyObject * obj2 = 0 ;
11352 0 : PyObject * obj3 = 0 ;
11353 0 : char * kwnames[] = {
11354 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
11355 : };
11356 0 : OGRErr result;
11357 :
11358 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetMollweide", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
11359 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11360 0 : if (!SWIG_IsOK(res1)) {
11361 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMollweide" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11362 : }
11363 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11364 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11365 0 : if (!SWIG_IsOK(ecode2)) {
11366 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMollweide" "', argument " "2"" of type '" "double""'");
11367 : }
11368 0 : arg2 = static_cast< double >(val2);
11369 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11370 0 : if (!SWIG_IsOK(ecode3)) {
11371 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMollweide" "', argument " "3"" of type '" "double""'");
11372 : }
11373 0 : arg3 = static_cast< double >(val3);
11374 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11375 0 : if (!SWIG_IsOK(ecode4)) {
11376 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMollweide" "', argument " "4"" of type '" "double""'");
11377 : }
11378 0 : arg4 = static_cast< double >(val4);
11379 0 : {
11380 0 : const int bLocalUseExceptions = GetUseExceptions();
11381 0 : if ( bLocalUseExceptions ) {
11382 0 : pushErrorHandler();
11383 : }
11384 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetMollweide(arg1,arg2,arg3,arg4);
11385 0 : if ( bLocalUseExceptions ) {
11386 0 : popErrorHandler();
11387 : }
11388 : #ifndef SED_HACKS
11389 : if ( bLocalUseExceptions ) {
11390 : CPLErr eclass = CPLGetLastErrorType();
11391 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11392 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11393 : }
11394 : }
11395 : #endif
11396 : }
11397 0 : {
11398 : /* %typemap(out) OGRErr */
11399 0 : if ( result != 0 && GetUseExceptions()) {
11400 0 : const char* pszMessage = CPLGetLastErrorMsg();
11401 0 : if( pszMessage[0] != '\0' )
11402 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11403 : else
11404 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11405 0 : SWIG_fail;
11406 : }
11407 : }
11408 0 : {
11409 : /* %typemap(ret) OGRErr */
11410 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11411 0 : resultobj = PyInt_FromLong( result );
11412 : }
11413 : }
11414 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11415 : return resultobj;
11416 : fail:
11417 : return NULL;
11418 : }
11419 :
11420 :
11421 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetNZMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11422 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11423 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11424 0 : double arg2 ;
11425 0 : double arg3 ;
11426 0 : double arg4 ;
11427 0 : double arg5 ;
11428 0 : void *argp1 = 0 ;
11429 0 : int res1 = 0 ;
11430 0 : double val2 ;
11431 0 : int ecode2 = 0 ;
11432 0 : double val3 ;
11433 0 : int ecode3 = 0 ;
11434 0 : double val4 ;
11435 0 : int ecode4 = 0 ;
11436 0 : double val5 ;
11437 0 : int ecode5 = 0 ;
11438 0 : PyObject * obj0 = 0 ;
11439 0 : PyObject * obj1 = 0 ;
11440 0 : PyObject * obj2 = 0 ;
11441 0 : PyObject * obj3 = 0 ;
11442 0 : PyObject * obj4 = 0 ;
11443 0 : char * kwnames[] = {
11444 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11445 : };
11446 0 : OGRErr result;
11447 :
11448 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetNZMG", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11449 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11450 0 : if (!SWIG_IsOK(res1)) {
11451 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetNZMG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11452 : }
11453 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11454 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11455 0 : if (!SWIG_IsOK(ecode2)) {
11456 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetNZMG" "', argument " "2"" of type '" "double""'");
11457 : }
11458 0 : arg2 = static_cast< double >(val2);
11459 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11460 0 : if (!SWIG_IsOK(ecode3)) {
11461 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetNZMG" "', argument " "3"" of type '" "double""'");
11462 : }
11463 0 : arg3 = static_cast< double >(val3);
11464 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11465 0 : if (!SWIG_IsOK(ecode4)) {
11466 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetNZMG" "', argument " "4"" of type '" "double""'");
11467 : }
11468 0 : arg4 = static_cast< double >(val4);
11469 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11470 0 : if (!SWIG_IsOK(ecode5)) {
11471 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetNZMG" "', argument " "5"" of type '" "double""'");
11472 : }
11473 0 : arg5 = static_cast< double >(val5);
11474 0 : {
11475 0 : const int bLocalUseExceptions = GetUseExceptions();
11476 0 : if ( bLocalUseExceptions ) {
11477 0 : pushErrorHandler();
11478 : }
11479 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetNZMG(arg1,arg2,arg3,arg4,arg5);
11480 0 : if ( bLocalUseExceptions ) {
11481 0 : popErrorHandler();
11482 : }
11483 : #ifndef SED_HACKS
11484 : if ( bLocalUseExceptions ) {
11485 : CPLErr eclass = CPLGetLastErrorType();
11486 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11487 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11488 : }
11489 : }
11490 : #endif
11491 : }
11492 0 : {
11493 : /* %typemap(out) OGRErr */
11494 0 : if ( result != 0 && GetUseExceptions()) {
11495 0 : const char* pszMessage = CPLGetLastErrorMsg();
11496 0 : if( pszMessage[0] != '\0' )
11497 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11498 : else
11499 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11500 0 : SWIG_fail;
11501 : }
11502 : }
11503 0 : {
11504 : /* %typemap(ret) OGRErr */
11505 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11506 0 : resultobj = PyInt_FromLong( result );
11507 : }
11508 : }
11509 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11510 : return resultobj;
11511 : fail:
11512 : return NULL;
11513 : }
11514 :
11515 :
11516 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetOS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11517 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11518 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11519 0 : double arg2 ;
11520 0 : double arg3 ;
11521 0 : double arg4 ;
11522 0 : double arg5 ;
11523 0 : double arg6 ;
11524 0 : void *argp1 = 0 ;
11525 0 : int res1 = 0 ;
11526 0 : double val2 ;
11527 0 : int ecode2 = 0 ;
11528 0 : double val3 ;
11529 0 : int ecode3 = 0 ;
11530 0 : double val4 ;
11531 0 : int ecode4 = 0 ;
11532 0 : double val5 ;
11533 0 : int ecode5 = 0 ;
11534 0 : double val6 ;
11535 0 : int ecode6 = 0 ;
11536 0 : PyObject * obj0 = 0 ;
11537 0 : PyObject * obj1 = 0 ;
11538 0 : PyObject * obj2 = 0 ;
11539 0 : PyObject * obj3 = 0 ;
11540 0 : PyObject * obj4 = 0 ;
11541 0 : PyObject * obj5 = 0 ;
11542 0 : char * kwnames[] = {
11543 : (char *)"self", (char *)"dfOriginLat", (char *)"dfCMeridian", (char *)"scale", (char *)"fe", (char *)"fn", NULL
11544 : };
11545 0 : OGRErr result;
11546 :
11547 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetOS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11548 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11549 0 : if (!SWIG_IsOK(res1)) {
11550 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetOS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11551 : }
11552 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11553 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11554 0 : if (!SWIG_IsOK(ecode2)) {
11555 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetOS" "', argument " "2"" of type '" "double""'");
11556 : }
11557 0 : arg2 = static_cast< double >(val2);
11558 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11559 0 : if (!SWIG_IsOK(ecode3)) {
11560 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetOS" "', argument " "3"" of type '" "double""'");
11561 : }
11562 0 : arg3 = static_cast< double >(val3);
11563 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11564 0 : if (!SWIG_IsOK(ecode4)) {
11565 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetOS" "', argument " "4"" of type '" "double""'");
11566 : }
11567 0 : arg4 = static_cast< double >(val4);
11568 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11569 0 : if (!SWIG_IsOK(ecode5)) {
11570 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetOS" "', argument " "5"" of type '" "double""'");
11571 : }
11572 0 : arg5 = static_cast< double >(val5);
11573 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11574 0 : if (!SWIG_IsOK(ecode6)) {
11575 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetOS" "', argument " "6"" of type '" "double""'");
11576 : }
11577 0 : arg6 = static_cast< double >(val6);
11578 0 : {
11579 0 : const int bLocalUseExceptions = GetUseExceptions();
11580 0 : if ( bLocalUseExceptions ) {
11581 0 : pushErrorHandler();
11582 : }
11583 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetOS(arg1,arg2,arg3,arg4,arg5,arg6);
11584 0 : if ( bLocalUseExceptions ) {
11585 0 : popErrorHandler();
11586 : }
11587 : #ifndef SED_HACKS
11588 : if ( bLocalUseExceptions ) {
11589 : CPLErr eclass = CPLGetLastErrorType();
11590 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11591 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11592 : }
11593 : }
11594 : #endif
11595 : }
11596 0 : {
11597 : /* %typemap(out) OGRErr */
11598 0 : if ( result != 0 && GetUseExceptions()) {
11599 0 : const char* pszMessage = CPLGetLastErrorMsg();
11600 0 : if( pszMessage[0] != '\0' )
11601 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11602 : else
11603 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11604 0 : SWIG_fail;
11605 : }
11606 : }
11607 0 : {
11608 : /* %typemap(ret) OGRErr */
11609 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11610 0 : resultobj = PyInt_FromLong( result );
11611 : }
11612 : }
11613 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11614 : return resultobj;
11615 : fail:
11616 : return NULL;
11617 : }
11618 :
11619 :
11620 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetOrthographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11621 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11622 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11623 1 : double arg2 ;
11624 1 : double arg3 ;
11625 1 : double arg4 ;
11626 1 : double arg5 ;
11627 1 : void *argp1 = 0 ;
11628 1 : int res1 = 0 ;
11629 1 : double val2 ;
11630 1 : int ecode2 = 0 ;
11631 1 : double val3 ;
11632 1 : int ecode3 = 0 ;
11633 1 : double val4 ;
11634 1 : int ecode4 = 0 ;
11635 1 : double val5 ;
11636 1 : int ecode5 = 0 ;
11637 1 : PyObject * obj0 = 0 ;
11638 1 : PyObject * obj1 = 0 ;
11639 1 : PyObject * obj2 = 0 ;
11640 1 : PyObject * obj3 = 0 ;
11641 1 : PyObject * obj4 = 0 ;
11642 1 : char * kwnames[] = {
11643 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11644 : };
11645 1 : OGRErr result;
11646 :
11647 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetOrthographic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11648 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11649 1 : if (!SWIG_IsOK(res1)) {
11650 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetOrthographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11651 : }
11652 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11653 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11654 1 : if (!SWIG_IsOK(ecode2)) {
11655 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetOrthographic" "', argument " "2"" of type '" "double""'");
11656 : }
11657 1 : arg2 = static_cast< double >(val2);
11658 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11659 1 : if (!SWIG_IsOK(ecode3)) {
11660 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetOrthographic" "', argument " "3"" of type '" "double""'");
11661 : }
11662 1 : arg3 = static_cast< double >(val3);
11663 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11664 1 : if (!SWIG_IsOK(ecode4)) {
11665 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetOrthographic" "', argument " "4"" of type '" "double""'");
11666 : }
11667 1 : arg4 = static_cast< double >(val4);
11668 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11669 1 : if (!SWIG_IsOK(ecode5)) {
11670 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetOrthographic" "', argument " "5"" of type '" "double""'");
11671 : }
11672 1 : arg5 = static_cast< double >(val5);
11673 1 : {
11674 1 : const int bLocalUseExceptions = GetUseExceptions();
11675 1 : if ( bLocalUseExceptions ) {
11676 1 : pushErrorHandler();
11677 : }
11678 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetOrthographic(arg1,arg2,arg3,arg4,arg5);
11679 1 : if ( bLocalUseExceptions ) {
11680 1 : popErrorHandler();
11681 : }
11682 : #ifndef SED_HACKS
11683 : if ( bLocalUseExceptions ) {
11684 : CPLErr eclass = CPLGetLastErrorType();
11685 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11686 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11687 : }
11688 : }
11689 : #endif
11690 : }
11691 1 : {
11692 : /* %typemap(out) OGRErr */
11693 1 : if ( result != 0 && GetUseExceptions()) {
11694 0 : const char* pszMessage = CPLGetLastErrorMsg();
11695 0 : if( pszMessage[0] != '\0' )
11696 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11697 : else
11698 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11699 0 : SWIG_fail;
11700 : }
11701 : }
11702 1 : {
11703 : /* %typemap(ret) OGRErr */
11704 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11705 1 : resultobj = PyInt_FromLong( result );
11706 : }
11707 : }
11708 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11709 : return resultobj;
11710 : fail:
11711 : return NULL;
11712 : }
11713 :
11714 :
11715 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetPolyconic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11716 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11717 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11718 0 : double arg2 ;
11719 0 : double arg3 ;
11720 0 : double arg4 ;
11721 0 : double arg5 ;
11722 0 : void *argp1 = 0 ;
11723 0 : int res1 = 0 ;
11724 0 : double val2 ;
11725 0 : int ecode2 = 0 ;
11726 0 : double val3 ;
11727 0 : int ecode3 = 0 ;
11728 0 : double val4 ;
11729 0 : int ecode4 = 0 ;
11730 0 : double val5 ;
11731 0 : int ecode5 = 0 ;
11732 0 : PyObject * obj0 = 0 ;
11733 0 : PyObject * obj1 = 0 ;
11734 0 : PyObject * obj2 = 0 ;
11735 0 : PyObject * obj3 = 0 ;
11736 0 : PyObject * obj4 = 0 ;
11737 0 : char * kwnames[] = {
11738 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11739 : };
11740 0 : OGRErr result;
11741 :
11742 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetPolyconic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11743 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11744 0 : if (!SWIG_IsOK(res1)) {
11745 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetPolyconic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11746 : }
11747 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11748 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11749 0 : if (!SWIG_IsOK(ecode2)) {
11750 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetPolyconic" "', argument " "2"" of type '" "double""'");
11751 : }
11752 0 : arg2 = static_cast< double >(val2);
11753 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11754 0 : if (!SWIG_IsOK(ecode3)) {
11755 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetPolyconic" "', argument " "3"" of type '" "double""'");
11756 : }
11757 0 : arg3 = static_cast< double >(val3);
11758 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11759 0 : if (!SWIG_IsOK(ecode4)) {
11760 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetPolyconic" "', argument " "4"" of type '" "double""'");
11761 : }
11762 0 : arg4 = static_cast< double >(val4);
11763 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11764 0 : if (!SWIG_IsOK(ecode5)) {
11765 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetPolyconic" "', argument " "5"" of type '" "double""'");
11766 : }
11767 0 : arg5 = static_cast< double >(val5);
11768 0 : {
11769 0 : const int bLocalUseExceptions = GetUseExceptions();
11770 0 : if ( bLocalUseExceptions ) {
11771 0 : pushErrorHandler();
11772 : }
11773 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetPolyconic(arg1,arg2,arg3,arg4,arg5);
11774 0 : if ( bLocalUseExceptions ) {
11775 0 : popErrorHandler();
11776 : }
11777 : #ifndef SED_HACKS
11778 : if ( bLocalUseExceptions ) {
11779 : CPLErr eclass = CPLGetLastErrorType();
11780 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11781 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11782 : }
11783 : }
11784 : #endif
11785 : }
11786 0 : {
11787 : /* %typemap(out) OGRErr */
11788 0 : if ( result != 0 && GetUseExceptions()) {
11789 0 : const char* pszMessage = CPLGetLastErrorMsg();
11790 0 : if( pszMessage[0] != '\0' )
11791 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11792 : else
11793 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11794 0 : SWIG_fail;
11795 : }
11796 : }
11797 0 : {
11798 : /* %typemap(ret) OGRErr */
11799 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11800 0 : resultobj = PyInt_FromLong( result );
11801 : }
11802 : }
11803 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11804 : return resultobj;
11805 : fail:
11806 : return NULL;
11807 : }
11808 :
11809 :
11810 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetPS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11811 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11812 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11813 1 : double arg2 ;
11814 1 : double arg3 ;
11815 1 : double arg4 ;
11816 1 : double arg5 ;
11817 1 : double arg6 ;
11818 1 : void *argp1 = 0 ;
11819 1 : int res1 = 0 ;
11820 1 : double val2 ;
11821 1 : int ecode2 = 0 ;
11822 1 : double val3 ;
11823 1 : int ecode3 = 0 ;
11824 1 : double val4 ;
11825 1 : int ecode4 = 0 ;
11826 1 : double val5 ;
11827 1 : int ecode5 = 0 ;
11828 1 : double val6 ;
11829 1 : int ecode6 = 0 ;
11830 1 : PyObject * obj0 = 0 ;
11831 1 : PyObject * obj1 = 0 ;
11832 1 : PyObject * obj2 = 0 ;
11833 1 : PyObject * obj3 = 0 ;
11834 1 : PyObject * obj4 = 0 ;
11835 1 : PyObject * obj5 = 0 ;
11836 1 : char * kwnames[] = {
11837 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
11838 : };
11839 1 : OGRErr result;
11840 :
11841 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetPS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11842 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11843 1 : if (!SWIG_IsOK(res1)) {
11844 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetPS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11845 : }
11846 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11847 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11848 1 : if (!SWIG_IsOK(ecode2)) {
11849 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetPS" "', argument " "2"" of type '" "double""'");
11850 : }
11851 1 : arg2 = static_cast< double >(val2);
11852 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11853 1 : if (!SWIG_IsOK(ecode3)) {
11854 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetPS" "', argument " "3"" of type '" "double""'");
11855 : }
11856 1 : arg3 = static_cast< double >(val3);
11857 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11858 1 : if (!SWIG_IsOK(ecode4)) {
11859 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetPS" "', argument " "4"" of type '" "double""'");
11860 : }
11861 1 : arg4 = static_cast< double >(val4);
11862 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11863 1 : if (!SWIG_IsOK(ecode5)) {
11864 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetPS" "', argument " "5"" of type '" "double""'");
11865 : }
11866 1 : arg5 = static_cast< double >(val5);
11867 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11868 1 : if (!SWIG_IsOK(ecode6)) {
11869 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetPS" "', argument " "6"" of type '" "double""'");
11870 : }
11871 1 : arg6 = static_cast< double >(val6);
11872 1 : {
11873 1 : const int bLocalUseExceptions = GetUseExceptions();
11874 1 : if ( bLocalUseExceptions ) {
11875 1 : pushErrorHandler();
11876 : }
11877 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetPS(arg1,arg2,arg3,arg4,arg5,arg6);
11878 1 : if ( bLocalUseExceptions ) {
11879 1 : popErrorHandler();
11880 : }
11881 : #ifndef SED_HACKS
11882 : if ( bLocalUseExceptions ) {
11883 : CPLErr eclass = CPLGetLastErrorType();
11884 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11885 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11886 : }
11887 : }
11888 : #endif
11889 : }
11890 1 : {
11891 : /* %typemap(out) OGRErr */
11892 1 : if ( result != 0 && GetUseExceptions()) {
11893 0 : const char* pszMessage = CPLGetLastErrorMsg();
11894 0 : if( pszMessage[0] != '\0' )
11895 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11896 : else
11897 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11898 0 : SWIG_fail;
11899 : }
11900 : }
11901 1 : {
11902 : /* %typemap(ret) OGRErr */
11903 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11904 1 : resultobj = PyInt_FromLong( result );
11905 : }
11906 : }
11907 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11908 : return resultobj;
11909 : fail:
11910 : return NULL;
11911 : }
11912 :
11913 :
11914 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetRobinson(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11915 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11916 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11917 0 : double arg2 ;
11918 0 : double arg3 ;
11919 0 : double arg4 ;
11920 0 : void *argp1 = 0 ;
11921 0 : int res1 = 0 ;
11922 0 : double val2 ;
11923 0 : int ecode2 = 0 ;
11924 0 : double val3 ;
11925 0 : int ecode3 = 0 ;
11926 0 : double val4 ;
11927 0 : int ecode4 = 0 ;
11928 0 : PyObject * obj0 = 0 ;
11929 0 : PyObject * obj1 = 0 ;
11930 0 : PyObject * obj2 = 0 ;
11931 0 : PyObject * obj3 = 0 ;
11932 0 : char * kwnames[] = {
11933 : (char *)"self", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11934 : };
11935 0 : OGRErr result;
11936 :
11937 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetRobinson", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
11938 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11939 0 : if (!SWIG_IsOK(res1)) {
11940 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetRobinson" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11941 : }
11942 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11943 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11944 0 : if (!SWIG_IsOK(ecode2)) {
11945 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetRobinson" "', argument " "2"" of type '" "double""'");
11946 : }
11947 0 : arg2 = static_cast< double >(val2);
11948 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11949 0 : if (!SWIG_IsOK(ecode3)) {
11950 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetRobinson" "', argument " "3"" of type '" "double""'");
11951 : }
11952 0 : arg3 = static_cast< double >(val3);
11953 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11954 0 : if (!SWIG_IsOK(ecode4)) {
11955 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetRobinson" "', argument " "4"" of type '" "double""'");
11956 : }
11957 0 : arg4 = static_cast< double >(val4);
11958 0 : {
11959 0 : const int bLocalUseExceptions = GetUseExceptions();
11960 0 : if ( bLocalUseExceptions ) {
11961 0 : pushErrorHandler();
11962 : }
11963 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetRobinson(arg1,arg2,arg3,arg4);
11964 0 : if ( bLocalUseExceptions ) {
11965 0 : popErrorHandler();
11966 : }
11967 : #ifndef SED_HACKS
11968 : if ( bLocalUseExceptions ) {
11969 : CPLErr eclass = CPLGetLastErrorType();
11970 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11971 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11972 : }
11973 : }
11974 : #endif
11975 : }
11976 0 : {
11977 : /* %typemap(out) OGRErr */
11978 0 : if ( result != 0 && GetUseExceptions()) {
11979 0 : const char* pszMessage = CPLGetLastErrorMsg();
11980 0 : if( pszMessage[0] != '\0' )
11981 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11982 : else
11983 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11984 0 : SWIG_fail;
11985 : }
11986 : }
11987 0 : {
11988 : /* %typemap(ret) OGRErr */
11989 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11990 0 : resultobj = PyInt_FromLong( result );
11991 : }
11992 : }
11993 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
11994 : return resultobj;
11995 : fail:
11996 : return NULL;
11997 : }
11998 :
11999 :
12000 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetSinusoidal(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12001 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12002 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12003 1 : double arg2 ;
12004 1 : double arg3 ;
12005 1 : double arg4 ;
12006 1 : void *argp1 = 0 ;
12007 1 : int res1 = 0 ;
12008 1 : double val2 ;
12009 1 : int ecode2 = 0 ;
12010 1 : double val3 ;
12011 1 : int ecode3 = 0 ;
12012 1 : double val4 ;
12013 1 : int ecode4 = 0 ;
12014 1 : PyObject * obj0 = 0 ;
12015 1 : PyObject * obj1 = 0 ;
12016 1 : PyObject * obj2 = 0 ;
12017 1 : PyObject * obj3 = 0 ;
12018 1 : char * kwnames[] = {
12019 : (char *)"self", (char *)"clong", (char *)"fe", (char *)"fn", NULL
12020 : };
12021 1 : OGRErr result;
12022 :
12023 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetSinusoidal", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
12024 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12025 1 : if (!SWIG_IsOK(res1)) {
12026 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetSinusoidal" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12027 : }
12028 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12029 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12030 1 : if (!SWIG_IsOK(ecode2)) {
12031 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetSinusoidal" "', argument " "2"" of type '" "double""'");
12032 : }
12033 1 : arg2 = static_cast< double >(val2);
12034 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12035 1 : if (!SWIG_IsOK(ecode3)) {
12036 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetSinusoidal" "', argument " "3"" of type '" "double""'");
12037 : }
12038 1 : arg3 = static_cast< double >(val3);
12039 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12040 1 : if (!SWIG_IsOK(ecode4)) {
12041 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetSinusoidal" "', argument " "4"" of type '" "double""'");
12042 : }
12043 1 : arg4 = static_cast< double >(val4);
12044 1 : {
12045 1 : const int bLocalUseExceptions = GetUseExceptions();
12046 1 : if ( bLocalUseExceptions ) {
12047 1 : pushErrorHandler();
12048 : }
12049 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetSinusoidal(arg1,arg2,arg3,arg4);
12050 1 : if ( bLocalUseExceptions ) {
12051 1 : popErrorHandler();
12052 : }
12053 : #ifndef SED_HACKS
12054 : if ( bLocalUseExceptions ) {
12055 : CPLErr eclass = CPLGetLastErrorType();
12056 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12057 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12058 : }
12059 : }
12060 : #endif
12061 : }
12062 1 : {
12063 : /* %typemap(out) OGRErr */
12064 1 : if ( result != 0 && GetUseExceptions()) {
12065 0 : const char* pszMessage = CPLGetLastErrorMsg();
12066 0 : if( pszMessage[0] != '\0' )
12067 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12068 : else
12069 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12070 0 : SWIG_fail;
12071 : }
12072 : }
12073 1 : {
12074 : /* %typemap(ret) OGRErr */
12075 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12076 1 : resultobj = PyInt_FromLong( result );
12077 : }
12078 : }
12079 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12080 : return resultobj;
12081 : fail:
12082 : return NULL;
12083 : }
12084 :
12085 :
12086 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetStereographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12087 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12088 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12089 0 : double arg2 ;
12090 0 : double arg3 ;
12091 0 : double arg4 ;
12092 0 : double arg5 ;
12093 0 : double arg6 ;
12094 0 : void *argp1 = 0 ;
12095 0 : int res1 = 0 ;
12096 0 : double val2 ;
12097 0 : int ecode2 = 0 ;
12098 0 : double val3 ;
12099 0 : int ecode3 = 0 ;
12100 0 : double val4 ;
12101 0 : int ecode4 = 0 ;
12102 0 : double val5 ;
12103 0 : int ecode5 = 0 ;
12104 0 : double val6 ;
12105 0 : int ecode6 = 0 ;
12106 0 : PyObject * obj0 = 0 ;
12107 0 : PyObject * obj1 = 0 ;
12108 0 : PyObject * obj2 = 0 ;
12109 0 : PyObject * obj3 = 0 ;
12110 0 : PyObject * obj4 = 0 ;
12111 0 : PyObject * obj5 = 0 ;
12112 0 : char * kwnames[] = {
12113 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12114 : };
12115 0 : OGRErr result;
12116 :
12117 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetStereographic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12118 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12119 0 : if (!SWIG_IsOK(res1)) {
12120 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetStereographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12121 : }
12122 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12123 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12124 0 : if (!SWIG_IsOK(ecode2)) {
12125 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetStereographic" "', argument " "2"" of type '" "double""'");
12126 : }
12127 0 : arg2 = static_cast< double >(val2);
12128 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12129 0 : if (!SWIG_IsOK(ecode3)) {
12130 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetStereographic" "', argument " "3"" of type '" "double""'");
12131 : }
12132 0 : arg3 = static_cast< double >(val3);
12133 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12134 0 : if (!SWIG_IsOK(ecode4)) {
12135 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetStereographic" "', argument " "4"" of type '" "double""'");
12136 : }
12137 0 : arg4 = static_cast< double >(val4);
12138 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12139 0 : if (!SWIG_IsOK(ecode5)) {
12140 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetStereographic" "', argument " "5"" of type '" "double""'");
12141 : }
12142 0 : arg5 = static_cast< double >(val5);
12143 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12144 0 : if (!SWIG_IsOK(ecode6)) {
12145 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetStereographic" "', argument " "6"" of type '" "double""'");
12146 : }
12147 0 : arg6 = static_cast< double >(val6);
12148 0 : {
12149 0 : const int bLocalUseExceptions = GetUseExceptions();
12150 0 : if ( bLocalUseExceptions ) {
12151 0 : pushErrorHandler();
12152 : }
12153 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetStereographic(arg1,arg2,arg3,arg4,arg5,arg6);
12154 0 : if ( bLocalUseExceptions ) {
12155 0 : popErrorHandler();
12156 : }
12157 : #ifndef SED_HACKS
12158 : if ( bLocalUseExceptions ) {
12159 : CPLErr eclass = CPLGetLastErrorType();
12160 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12161 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12162 : }
12163 : }
12164 : #endif
12165 : }
12166 0 : {
12167 : /* %typemap(out) OGRErr */
12168 0 : if ( result != 0 && GetUseExceptions()) {
12169 0 : const char* pszMessage = CPLGetLastErrorMsg();
12170 0 : if( pszMessage[0] != '\0' )
12171 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12172 : else
12173 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12174 0 : SWIG_fail;
12175 : }
12176 : }
12177 0 : {
12178 : /* %typemap(ret) OGRErr */
12179 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12180 0 : resultobj = PyInt_FromLong( result );
12181 : }
12182 : }
12183 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12184 : return resultobj;
12185 : fail:
12186 : return NULL;
12187 : }
12188 :
12189 :
12190 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetSOC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12191 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12192 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12193 0 : double arg2 ;
12194 0 : double arg3 ;
12195 0 : double arg4 ;
12196 0 : double arg5 ;
12197 0 : void *argp1 = 0 ;
12198 0 : int res1 = 0 ;
12199 0 : double val2 ;
12200 0 : int ecode2 = 0 ;
12201 0 : double val3 ;
12202 0 : int ecode3 = 0 ;
12203 0 : double val4 ;
12204 0 : int ecode4 = 0 ;
12205 0 : double val5 ;
12206 0 : int ecode5 = 0 ;
12207 0 : PyObject * obj0 = 0 ;
12208 0 : PyObject * obj1 = 0 ;
12209 0 : PyObject * obj2 = 0 ;
12210 0 : PyObject * obj3 = 0 ;
12211 0 : PyObject * obj4 = 0 ;
12212 0 : char * kwnames[] = {
12213 : (char *)"self", (char *)"latitudeoforigin", (char *)"cm", (char *)"fe", (char *)"fn", NULL
12214 : };
12215 0 : OGRErr result;
12216 :
12217 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetSOC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
12218 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12219 0 : if (!SWIG_IsOK(res1)) {
12220 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetSOC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12221 : }
12222 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12223 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12224 0 : if (!SWIG_IsOK(ecode2)) {
12225 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetSOC" "', argument " "2"" of type '" "double""'");
12226 : }
12227 0 : arg2 = static_cast< double >(val2);
12228 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12229 0 : if (!SWIG_IsOK(ecode3)) {
12230 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetSOC" "', argument " "3"" of type '" "double""'");
12231 : }
12232 0 : arg3 = static_cast< double >(val3);
12233 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12234 0 : if (!SWIG_IsOK(ecode4)) {
12235 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetSOC" "', argument " "4"" of type '" "double""'");
12236 : }
12237 0 : arg4 = static_cast< double >(val4);
12238 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12239 0 : if (!SWIG_IsOK(ecode5)) {
12240 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetSOC" "', argument " "5"" of type '" "double""'");
12241 : }
12242 0 : arg5 = static_cast< double >(val5);
12243 0 : {
12244 0 : const int bLocalUseExceptions = GetUseExceptions();
12245 0 : if ( bLocalUseExceptions ) {
12246 0 : pushErrorHandler();
12247 : }
12248 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetSOC(arg1,arg2,arg3,arg4,arg5);
12249 0 : if ( bLocalUseExceptions ) {
12250 0 : popErrorHandler();
12251 : }
12252 : #ifndef SED_HACKS
12253 : if ( bLocalUseExceptions ) {
12254 : CPLErr eclass = CPLGetLastErrorType();
12255 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12256 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12257 : }
12258 : }
12259 : #endif
12260 : }
12261 0 : {
12262 : /* %typemap(out) OGRErr */
12263 0 : if ( result != 0 && GetUseExceptions()) {
12264 0 : const char* pszMessage = CPLGetLastErrorMsg();
12265 0 : if( pszMessage[0] != '\0' )
12266 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12267 : else
12268 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12269 0 : SWIG_fail;
12270 : }
12271 : }
12272 0 : {
12273 : /* %typemap(ret) OGRErr */
12274 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12275 0 : resultobj = PyInt_FromLong( result );
12276 : }
12277 : }
12278 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12279 : return resultobj;
12280 : fail:
12281 : return NULL;
12282 : }
12283 :
12284 :
12285 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12286 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12287 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12288 1 : double arg2 ;
12289 1 : double arg3 ;
12290 1 : double arg4 ;
12291 1 : double arg5 ;
12292 1 : double arg6 ;
12293 1 : void *argp1 = 0 ;
12294 1 : int res1 = 0 ;
12295 1 : double val2 ;
12296 1 : int ecode2 = 0 ;
12297 1 : double val3 ;
12298 1 : int ecode3 = 0 ;
12299 1 : double val4 ;
12300 1 : int ecode4 = 0 ;
12301 1 : double val5 ;
12302 1 : int ecode5 = 0 ;
12303 1 : double val6 ;
12304 1 : int ecode6 = 0 ;
12305 1 : PyObject * obj0 = 0 ;
12306 1 : PyObject * obj1 = 0 ;
12307 1 : PyObject * obj2 = 0 ;
12308 1 : PyObject * obj3 = 0 ;
12309 1 : PyObject * obj4 = 0 ;
12310 1 : PyObject * obj5 = 0 ;
12311 1 : char * kwnames[] = {
12312 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12313 : };
12314 1 : OGRErr result;
12315 :
12316 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetTM", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12317 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12318 1 : if (!SWIG_IsOK(res1)) {
12319 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12320 : }
12321 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12322 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12323 1 : if (!SWIG_IsOK(ecode2)) {
12324 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTM" "', argument " "2"" of type '" "double""'");
12325 : }
12326 1 : arg2 = static_cast< double >(val2);
12327 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12328 1 : if (!SWIG_IsOK(ecode3)) {
12329 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTM" "', argument " "3"" of type '" "double""'");
12330 : }
12331 1 : arg3 = static_cast< double >(val3);
12332 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12333 1 : if (!SWIG_IsOK(ecode4)) {
12334 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTM" "', argument " "4"" of type '" "double""'");
12335 : }
12336 1 : arg4 = static_cast< double >(val4);
12337 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12338 1 : if (!SWIG_IsOK(ecode5)) {
12339 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTM" "', argument " "5"" of type '" "double""'");
12340 : }
12341 1 : arg5 = static_cast< double >(val5);
12342 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12343 1 : if (!SWIG_IsOK(ecode6)) {
12344 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTM" "', argument " "6"" of type '" "double""'");
12345 : }
12346 1 : arg6 = static_cast< double >(val6);
12347 1 : {
12348 1 : const int bLocalUseExceptions = GetUseExceptions();
12349 1 : if ( bLocalUseExceptions ) {
12350 1 : pushErrorHandler();
12351 : }
12352 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetTM(arg1,arg2,arg3,arg4,arg5,arg6);
12353 1 : if ( bLocalUseExceptions ) {
12354 1 : popErrorHandler();
12355 : }
12356 : #ifndef SED_HACKS
12357 : if ( bLocalUseExceptions ) {
12358 : CPLErr eclass = CPLGetLastErrorType();
12359 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12360 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12361 : }
12362 : }
12363 : #endif
12364 : }
12365 1 : {
12366 : /* %typemap(out) OGRErr */
12367 1 : if ( result != 0 && GetUseExceptions()) {
12368 0 : const char* pszMessage = CPLGetLastErrorMsg();
12369 0 : if( pszMessage[0] != '\0' )
12370 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12371 : else
12372 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12373 0 : SWIG_fail;
12374 : }
12375 : }
12376 1 : {
12377 : /* %typemap(ret) OGRErr */
12378 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12379 1 : resultobj = PyInt_FromLong( result );
12380 : }
12381 : }
12382 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12383 : return resultobj;
12384 : fail:
12385 : return NULL;
12386 : }
12387 :
12388 :
12389 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMVariant(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12390 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12391 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12392 0 : char *arg2 = (char *) 0 ;
12393 0 : double arg3 ;
12394 0 : double arg4 ;
12395 0 : double arg5 ;
12396 0 : double arg6 ;
12397 0 : double arg7 ;
12398 0 : void *argp1 = 0 ;
12399 0 : int res1 = 0 ;
12400 0 : int res2 ;
12401 0 : char *buf2 = 0 ;
12402 0 : int alloc2 = 0 ;
12403 0 : double val3 ;
12404 0 : int ecode3 = 0 ;
12405 0 : double val4 ;
12406 0 : int ecode4 = 0 ;
12407 0 : double val5 ;
12408 0 : int ecode5 = 0 ;
12409 0 : double val6 ;
12410 0 : int ecode6 = 0 ;
12411 0 : double val7 ;
12412 0 : int ecode7 = 0 ;
12413 0 : PyObject * obj0 = 0 ;
12414 0 : PyObject * obj1 = 0 ;
12415 0 : PyObject * obj2 = 0 ;
12416 0 : PyObject * obj3 = 0 ;
12417 0 : PyObject * obj4 = 0 ;
12418 0 : PyObject * obj5 = 0 ;
12419 0 : PyObject * obj6 = 0 ;
12420 0 : char * kwnames[] = {
12421 : (char *)"self", (char *)"pszVariantName", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12422 : };
12423 0 : OGRErr result;
12424 :
12425 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetTMVariant", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
12426 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12427 0 : if (!SWIG_IsOK(res1)) {
12428 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMVariant" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12429 : }
12430 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12431 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
12432 0 : if (!SWIG_IsOK(res2)) {
12433 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetTMVariant" "', argument " "2"" of type '" "char const *""'");
12434 : }
12435 0 : arg2 = reinterpret_cast< char * >(buf2);
12436 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12437 0 : if (!SWIG_IsOK(ecode3)) {
12438 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMVariant" "', argument " "3"" of type '" "double""'");
12439 : }
12440 0 : arg3 = static_cast< double >(val3);
12441 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12442 0 : if (!SWIG_IsOK(ecode4)) {
12443 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMVariant" "', argument " "4"" of type '" "double""'");
12444 : }
12445 0 : arg4 = static_cast< double >(val4);
12446 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12447 0 : if (!SWIG_IsOK(ecode5)) {
12448 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMVariant" "', argument " "5"" of type '" "double""'");
12449 : }
12450 0 : arg5 = static_cast< double >(val5);
12451 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12452 0 : if (!SWIG_IsOK(ecode6)) {
12453 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTMVariant" "', argument " "6"" of type '" "double""'");
12454 : }
12455 0 : arg6 = static_cast< double >(val6);
12456 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
12457 0 : if (!SWIG_IsOK(ecode7)) {
12458 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetTMVariant" "', argument " "7"" of type '" "double""'");
12459 : }
12460 0 : arg7 = static_cast< double >(val7);
12461 0 : {
12462 0 : const int bLocalUseExceptions = GetUseExceptions();
12463 0 : if ( bLocalUseExceptions ) {
12464 0 : pushErrorHandler();
12465 : }
12466 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMVariant(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
12467 0 : if ( bLocalUseExceptions ) {
12468 0 : popErrorHandler();
12469 : }
12470 : #ifndef SED_HACKS
12471 : if ( bLocalUseExceptions ) {
12472 : CPLErr eclass = CPLGetLastErrorType();
12473 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12474 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12475 : }
12476 : }
12477 : #endif
12478 : }
12479 0 : {
12480 : /* %typemap(out) OGRErr */
12481 0 : if ( result != 0 && GetUseExceptions()) {
12482 0 : const char* pszMessage = CPLGetLastErrorMsg();
12483 0 : if( pszMessage[0] != '\0' )
12484 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12485 : else
12486 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12487 0 : SWIG_fail;
12488 : }
12489 : }
12490 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12491 0 : {
12492 : /* %typemap(ret) OGRErr */
12493 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12494 0 : resultobj = PyInt_FromLong( result );
12495 : }
12496 : }
12497 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12498 : return resultobj;
12499 0 : fail:
12500 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12501 : return NULL;
12502 : }
12503 :
12504 :
12505 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12506 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12507 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12508 0 : double arg2 ;
12509 0 : double arg3 ;
12510 0 : double arg4 ;
12511 0 : double arg5 ;
12512 0 : void *argp1 = 0 ;
12513 0 : int res1 = 0 ;
12514 0 : double val2 ;
12515 0 : int ecode2 = 0 ;
12516 0 : double val3 ;
12517 0 : int ecode3 = 0 ;
12518 0 : double val4 ;
12519 0 : int ecode4 = 0 ;
12520 0 : double val5 ;
12521 0 : int ecode5 = 0 ;
12522 0 : PyObject * obj0 = 0 ;
12523 0 : PyObject * obj1 = 0 ;
12524 0 : PyObject * obj2 = 0 ;
12525 0 : PyObject * obj3 = 0 ;
12526 0 : PyObject * obj4 = 0 ;
12527 0 : char * kwnames[] = {
12528 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
12529 : };
12530 0 : OGRErr result;
12531 :
12532 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetTMG", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
12533 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12534 0 : if (!SWIG_IsOK(res1)) {
12535 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12536 : }
12537 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12538 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12539 0 : if (!SWIG_IsOK(ecode2)) {
12540 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTMG" "', argument " "2"" of type '" "double""'");
12541 : }
12542 0 : arg2 = static_cast< double >(val2);
12543 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12544 0 : if (!SWIG_IsOK(ecode3)) {
12545 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMG" "', argument " "3"" of type '" "double""'");
12546 : }
12547 0 : arg3 = static_cast< double >(val3);
12548 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12549 0 : if (!SWIG_IsOK(ecode4)) {
12550 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMG" "', argument " "4"" of type '" "double""'");
12551 : }
12552 0 : arg4 = static_cast< double >(val4);
12553 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12554 0 : if (!SWIG_IsOK(ecode5)) {
12555 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMG" "', argument " "5"" of type '" "double""'");
12556 : }
12557 0 : arg5 = static_cast< double >(val5);
12558 0 : {
12559 0 : const int bLocalUseExceptions = GetUseExceptions();
12560 0 : if ( bLocalUseExceptions ) {
12561 0 : pushErrorHandler();
12562 : }
12563 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMG(arg1,arg2,arg3,arg4,arg5);
12564 0 : if ( bLocalUseExceptions ) {
12565 0 : popErrorHandler();
12566 : }
12567 : #ifndef SED_HACKS
12568 : if ( bLocalUseExceptions ) {
12569 : CPLErr eclass = CPLGetLastErrorType();
12570 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12571 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12572 : }
12573 : }
12574 : #endif
12575 : }
12576 0 : {
12577 : /* %typemap(out) OGRErr */
12578 0 : if ( result != 0 && GetUseExceptions()) {
12579 0 : const char* pszMessage = CPLGetLastErrorMsg();
12580 0 : if( pszMessage[0] != '\0' )
12581 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12582 : else
12583 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12584 0 : SWIG_fail;
12585 : }
12586 : }
12587 0 : {
12588 : /* %typemap(ret) OGRErr */
12589 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12590 0 : resultobj = PyInt_FromLong( result );
12591 : }
12592 : }
12593 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12594 : return resultobj;
12595 : fail:
12596 : return NULL;
12597 : }
12598 :
12599 :
12600 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMSO(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12601 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12602 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12603 0 : double arg2 ;
12604 0 : double arg3 ;
12605 0 : double arg4 ;
12606 0 : double arg5 ;
12607 0 : double arg6 ;
12608 0 : void *argp1 = 0 ;
12609 0 : int res1 = 0 ;
12610 0 : double val2 ;
12611 0 : int ecode2 = 0 ;
12612 0 : double val3 ;
12613 0 : int ecode3 = 0 ;
12614 0 : double val4 ;
12615 0 : int ecode4 = 0 ;
12616 0 : double val5 ;
12617 0 : int ecode5 = 0 ;
12618 0 : double val6 ;
12619 0 : int ecode6 = 0 ;
12620 0 : PyObject * obj0 = 0 ;
12621 0 : PyObject * obj1 = 0 ;
12622 0 : PyObject * obj2 = 0 ;
12623 0 : PyObject * obj3 = 0 ;
12624 0 : PyObject * obj4 = 0 ;
12625 0 : PyObject * obj5 = 0 ;
12626 0 : char * kwnames[] = {
12627 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12628 : };
12629 0 : OGRErr result;
12630 :
12631 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetTMSO", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12632 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12633 0 : if (!SWIG_IsOK(res1)) {
12634 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMSO" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12635 : }
12636 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12637 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12638 0 : if (!SWIG_IsOK(ecode2)) {
12639 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTMSO" "', argument " "2"" of type '" "double""'");
12640 : }
12641 0 : arg2 = static_cast< double >(val2);
12642 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12643 0 : if (!SWIG_IsOK(ecode3)) {
12644 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMSO" "', argument " "3"" of type '" "double""'");
12645 : }
12646 0 : arg3 = static_cast< double >(val3);
12647 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12648 0 : if (!SWIG_IsOK(ecode4)) {
12649 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMSO" "', argument " "4"" of type '" "double""'");
12650 : }
12651 0 : arg4 = static_cast< double >(val4);
12652 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12653 0 : if (!SWIG_IsOK(ecode5)) {
12654 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMSO" "', argument " "5"" of type '" "double""'");
12655 : }
12656 0 : arg5 = static_cast< double >(val5);
12657 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12658 0 : if (!SWIG_IsOK(ecode6)) {
12659 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTMSO" "', argument " "6"" of type '" "double""'");
12660 : }
12661 0 : arg6 = static_cast< double >(val6);
12662 0 : {
12663 0 : const int bLocalUseExceptions = GetUseExceptions();
12664 0 : if ( bLocalUseExceptions ) {
12665 0 : pushErrorHandler();
12666 : }
12667 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMSO(arg1,arg2,arg3,arg4,arg5,arg6);
12668 0 : if ( bLocalUseExceptions ) {
12669 0 : popErrorHandler();
12670 : }
12671 : #ifndef SED_HACKS
12672 : if ( bLocalUseExceptions ) {
12673 : CPLErr eclass = CPLGetLastErrorType();
12674 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12675 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12676 : }
12677 : }
12678 : #endif
12679 : }
12680 0 : {
12681 : /* %typemap(out) OGRErr */
12682 0 : if ( result != 0 && GetUseExceptions()) {
12683 0 : const char* pszMessage = CPLGetLastErrorMsg();
12684 0 : if( pszMessage[0] != '\0' )
12685 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12686 : else
12687 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12688 0 : SWIG_fail;
12689 : }
12690 : }
12691 0 : {
12692 : /* %typemap(ret) OGRErr */
12693 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12694 0 : resultobj = PyInt_FromLong( result );
12695 : }
12696 : }
12697 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12698 : return resultobj;
12699 : fail:
12700 : return NULL;
12701 : }
12702 :
12703 :
12704 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVDG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12705 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12706 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12707 0 : double arg2 ;
12708 0 : double arg3 ;
12709 0 : double arg4 ;
12710 0 : void *argp1 = 0 ;
12711 0 : int res1 = 0 ;
12712 0 : double val2 ;
12713 0 : int ecode2 = 0 ;
12714 0 : double val3 ;
12715 0 : int ecode3 = 0 ;
12716 0 : double val4 ;
12717 0 : int ecode4 = 0 ;
12718 0 : PyObject * obj0 = 0 ;
12719 0 : PyObject * obj1 = 0 ;
12720 0 : PyObject * obj2 = 0 ;
12721 0 : PyObject * obj3 = 0 ;
12722 0 : char * kwnames[] = {
12723 : (char *)"self", (char *)"clong", (char *)"fe", (char *)"fn", NULL
12724 : };
12725 0 : OGRErr result;
12726 :
12727 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetVDG", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
12728 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12729 0 : if (!SWIG_IsOK(res1)) {
12730 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVDG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12731 : }
12732 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12733 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12734 0 : if (!SWIG_IsOK(ecode2)) {
12735 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetVDG" "', argument " "2"" of type '" "double""'");
12736 : }
12737 0 : arg2 = static_cast< double >(val2);
12738 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12739 0 : if (!SWIG_IsOK(ecode3)) {
12740 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetVDG" "', argument " "3"" of type '" "double""'");
12741 : }
12742 0 : arg3 = static_cast< double >(val3);
12743 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12744 0 : if (!SWIG_IsOK(ecode4)) {
12745 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVDG" "', argument " "4"" of type '" "double""'");
12746 : }
12747 0 : arg4 = static_cast< double >(val4);
12748 0 : {
12749 0 : const int bLocalUseExceptions = GetUseExceptions();
12750 0 : if ( bLocalUseExceptions ) {
12751 0 : pushErrorHandler();
12752 : }
12753 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetVDG(arg1,arg2,arg3,arg4);
12754 0 : if ( bLocalUseExceptions ) {
12755 0 : popErrorHandler();
12756 : }
12757 : #ifndef SED_HACKS
12758 : if ( bLocalUseExceptions ) {
12759 : CPLErr eclass = CPLGetLastErrorType();
12760 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12761 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12762 : }
12763 : }
12764 : #endif
12765 : }
12766 0 : {
12767 : /* %typemap(out) OGRErr */
12768 0 : if ( result != 0 && GetUseExceptions()) {
12769 0 : const char* pszMessage = CPLGetLastErrorMsg();
12770 0 : if( pszMessage[0] != '\0' )
12771 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12772 : else
12773 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12774 0 : SWIG_fail;
12775 : }
12776 : }
12777 0 : {
12778 : /* %typemap(ret) OGRErr */
12779 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12780 0 : resultobj = PyInt_FromLong( result );
12781 : }
12782 : }
12783 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12784 : return resultobj;
12785 : fail:
12786 : return NULL;
12787 : }
12788 :
12789 :
12790 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVerticalPerspective(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12791 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12792 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12793 1 : double arg2 ;
12794 1 : double arg3 ;
12795 1 : double arg4 ;
12796 1 : double arg5 ;
12797 1 : double arg6 ;
12798 1 : double arg7 ;
12799 1 : void *argp1 = 0 ;
12800 1 : int res1 = 0 ;
12801 1 : double val2 ;
12802 1 : int ecode2 = 0 ;
12803 1 : double val3 ;
12804 1 : int ecode3 = 0 ;
12805 1 : double val4 ;
12806 1 : int ecode4 = 0 ;
12807 1 : double val5 ;
12808 1 : int ecode5 = 0 ;
12809 1 : double val6 ;
12810 1 : int ecode6 = 0 ;
12811 1 : double val7 ;
12812 1 : int ecode7 = 0 ;
12813 1 : PyObject * obj0 = 0 ;
12814 1 : PyObject * obj1 = 0 ;
12815 1 : PyObject * obj2 = 0 ;
12816 1 : PyObject * obj3 = 0 ;
12817 1 : PyObject * obj4 = 0 ;
12818 1 : PyObject * obj5 = 0 ;
12819 1 : PyObject * obj6 = 0 ;
12820 1 : char * kwnames[] = {
12821 : (char *)"self", (char *)"topoOriginLat", (char *)"topoOriginLon", (char *)"topoOriginHeight", (char *)"viewPointHeight", (char *)"fe", (char *)"fn", NULL
12822 : };
12823 1 : OGRErr result;
12824 :
12825 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetVerticalPerspective", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
12826 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12827 1 : if (!SWIG_IsOK(res1)) {
12828 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12829 : }
12830 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12831 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12832 1 : if (!SWIG_IsOK(ecode2)) {
12833 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "2"" of type '" "double""'");
12834 : }
12835 1 : arg2 = static_cast< double >(val2);
12836 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12837 1 : if (!SWIG_IsOK(ecode3)) {
12838 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "3"" of type '" "double""'");
12839 : }
12840 1 : arg3 = static_cast< double >(val3);
12841 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12842 1 : if (!SWIG_IsOK(ecode4)) {
12843 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "4"" of type '" "double""'");
12844 : }
12845 1 : arg4 = static_cast< double >(val4);
12846 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12847 1 : if (!SWIG_IsOK(ecode5)) {
12848 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "5"" of type '" "double""'");
12849 : }
12850 1 : arg5 = static_cast< double >(val5);
12851 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12852 1 : if (!SWIG_IsOK(ecode6)) {
12853 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "6"" of type '" "double""'");
12854 : }
12855 1 : arg6 = static_cast< double >(val6);
12856 1 : ecode7 = SWIG_AsVal_double(obj6, &val7);
12857 1 : if (!SWIG_IsOK(ecode7)) {
12858 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "7"" of type '" "double""'");
12859 : }
12860 1 : arg7 = static_cast< double >(val7);
12861 1 : {
12862 1 : const int bLocalUseExceptions = GetUseExceptions();
12863 1 : if ( bLocalUseExceptions ) {
12864 1 : pushErrorHandler();
12865 : }
12866 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetVerticalPerspective(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
12867 1 : if ( bLocalUseExceptions ) {
12868 1 : popErrorHandler();
12869 : }
12870 : #ifndef SED_HACKS
12871 : if ( bLocalUseExceptions ) {
12872 : CPLErr eclass = CPLGetLastErrorType();
12873 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12874 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12875 : }
12876 : }
12877 : #endif
12878 : }
12879 1 : {
12880 : /* %typemap(out) OGRErr */
12881 1 : if ( result != 0 && GetUseExceptions()) {
12882 0 : const char* pszMessage = CPLGetLastErrorMsg();
12883 0 : if( pszMessage[0] != '\0' )
12884 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12885 : else
12886 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12887 0 : SWIG_fail;
12888 : }
12889 : }
12890 1 : {
12891 : /* %typemap(ret) OGRErr */
12892 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12893 1 : resultobj = PyInt_FromLong( result );
12894 : }
12895 : }
12896 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12897 : return resultobj;
12898 : fail:
12899 : return NULL;
12900 : }
12901 :
12902 :
12903 70 : SWIGINTERN PyObject *_wrap_SpatialReference_SetWellKnownGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12904 70 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12905 70 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12906 70 : char *arg2 = (char *) 0 ;
12907 70 : void *argp1 = 0 ;
12908 70 : int res1 = 0 ;
12909 70 : int res2 ;
12910 70 : char *buf2 = 0 ;
12911 70 : int alloc2 = 0 ;
12912 70 : PyObject *swig_obj[2] ;
12913 70 : OGRErr result;
12914 :
12915 70 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetWellKnownGeogCS", 2, 2, swig_obj)) SWIG_fail;
12916 70 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12917 70 : if (!SWIG_IsOK(res1)) {
12918 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetWellKnownGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12919 : }
12920 70 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12921 70 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
12922 70 : if (!SWIG_IsOK(res2)) {
12923 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetWellKnownGeogCS" "', argument " "2"" of type '" "char const *""'");
12924 : }
12925 70 : arg2 = reinterpret_cast< char * >(buf2);
12926 70 : {
12927 70 : if (!arg2) {
12928 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
12929 : }
12930 : }
12931 70 : {
12932 70 : const int bLocalUseExceptions = GetUseExceptions();
12933 70 : if ( bLocalUseExceptions ) {
12934 69 : pushErrorHandler();
12935 : }
12936 70 : result = (OGRErr)OSRSpatialReferenceShadow_SetWellKnownGeogCS(arg1,(char const *)arg2);
12937 70 : if ( bLocalUseExceptions ) {
12938 69 : popErrorHandler();
12939 : }
12940 : #ifndef SED_HACKS
12941 : if ( bLocalUseExceptions ) {
12942 : CPLErr eclass = CPLGetLastErrorType();
12943 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12944 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12945 : }
12946 : }
12947 : #endif
12948 : }
12949 70 : {
12950 : /* %typemap(out) OGRErr */
12951 70 : if ( result != 0 && GetUseExceptions()) {
12952 0 : const char* pszMessage = CPLGetLastErrorMsg();
12953 0 : if( pszMessage[0] != '\0' )
12954 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12955 : else
12956 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12957 0 : SWIG_fail;
12958 : }
12959 : }
12960 70 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12961 70 : {
12962 : /* %typemap(ret) OGRErr */
12963 70 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12964 70 : resultobj = PyInt_FromLong( result );
12965 : }
12966 : }
12967 70 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12968 : return resultobj;
12969 0 : fail:
12970 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12971 : return NULL;
12972 : }
12973 :
12974 :
12975 1216 : SWIGINTERN PyObject *_wrap_SpatialReference_SetFromUserInput(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12976 1216 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12977 1216 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12978 1216 : char *arg2 = (char *) 0 ;
12979 1216 : char **arg3 = (char **) NULL ;
12980 1216 : void *argp1 = 0 ;
12981 1216 : int res1 = 0 ;
12982 1216 : int res2 ;
12983 1216 : char *buf2 = 0 ;
12984 1216 : int alloc2 = 0 ;
12985 1216 : PyObject * obj0 = 0 ;
12986 1216 : PyObject * obj1 = 0 ;
12987 1216 : PyObject * obj2 = 0 ;
12988 1216 : char * kwnames[] = {
12989 : (char *)"self", (char *)"name", (char *)"options", NULL
12990 : };
12991 1216 : OGRErr result;
12992 :
12993 1216 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:SpatialReference_SetFromUserInput", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
12994 1216 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12995 1216 : if (!SWIG_IsOK(res1)) {
12996 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetFromUserInput" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12997 : }
12998 1216 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12999 1216 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
13000 1216 : if (!SWIG_IsOK(res2)) {
13001 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetFromUserInput" "', argument " "2"" of type '" "char const *""'");
13002 : }
13003 1216 : arg2 = reinterpret_cast< char * >(buf2);
13004 1216 : if (obj2) {
13005 1 : {
13006 : /* %typemap(in) char **dict */
13007 1 : arg3 = NULL;
13008 1 : if ( PySequence_Check( obj2 ) ) {
13009 1 : int bErr = FALSE;
13010 1 : arg3 = CSLFromPySequence(obj2, &bErr);
13011 1 : if ( bErr )
13012 : {
13013 0 : SWIG_fail;
13014 : }
13015 : }
13016 0 : else if ( PyMapping_Check( obj2 ) ) {
13017 0 : int bErr = FALSE;
13018 0 : arg3 = CSLFromPyMapping(obj2, &bErr);
13019 0 : if ( bErr )
13020 : {
13021 0 : SWIG_fail;
13022 : }
13023 : }
13024 : else {
13025 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
13026 0 : SWIG_fail;
13027 : }
13028 : }
13029 : }
13030 1216 : {
13031 1216 : if (!arg2) {
13032 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13033 : }
13034 : }
13035 1216 : {
13036 1216 : const int bLocalUseExceptions = GetUseExceptions();
13037 1216 : if ( bLocalUseExceptions ) {
13038 995 : pushErrorHandler();
13039 : }
13040 1216 : result = (OGRErr)OSRSpatialReferenceShadow_SetFromUserInput(arg1,(char const *)arg2,arg3);
13041 1216 : if ( bLocalUseExceptions ) {
13042 995 : popErrorHandler();
13043 : }
13044 : #ifndef SED_HACKS
13045 : if ( bLocalUseExceptions ) {
13046 : CPLErr eclass = CPLGetLastErrorType();
13047 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13048 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13049 : }
13050 : }
13051 : #endif
13052 : }
13053 1216 : {
13054 : /* %typemap(out) OGRErr */
13055 1227 : if ( result != 0 && GetUseExceptions()) {
13056 10 : const char* pszMessage = CPLGetLastErrorMsg();
13057 10 : if( pszMessage[0] != '\0' )
13058 8 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13059 : else
13060 2 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13061 10 : SWIG_fail;
13062 : }
13063 : }
13064 1206 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13065 1206 : {
13066 : /* %typemap(freearg) char **dict */
13067 1206 : CSLDestroy( arg3 );
13068 : }
13069 1206 : {
13070 : /* %typemap(ret) OGRErr */
13071 1206 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13072 1206 : resultobj = PyInt_FromLong( result );
13073 : }
13074 : }
13075 1216 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13076 : return resultobj;
13077 10 : fail:
13078 10 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13079 10 : {
13080 : /* %typemap(freearg) char **dict */
13081 10 : CSLDestroy( arg3 );
13082 : }
13083 : return NULL;
13084 : }
13085 :
13086 :
13087 1 : SWIGINTERN PyObject *_wrap_SpatialReference_CopyGeogCSFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13088 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13089 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13090 1 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
13091 1 : void *argp1 = 0 ;
13092 1 : int res1 = 0 ;
13093 1 : void *argp2 = 0 ;
13094 1 : int res2 = 0 ;
13095 1 : PyObject *swig_obj[2] ;
13096 1 : OGRErr result;
13097 :
13098 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_CopyGeogCSFrom", 2, 2, swig_obj)) SWIG_fail;
13099 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13100 1 : if (!SWIG_IsOK(res1)) {
13101 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_CopyGeogCSFrom" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13102 : }
13103 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13104 1 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13105 1 : if (!SWIG_IsOK(res2)) {
13106 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_CopyGeogCSFrom" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
13107 : }
13108 1 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
13109 1 : {
13110 1 : if (!arg2) {
13111 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13112 : }
13113 : }
13114 1 : {
13115 1 : const int bLocalUseExceptions = GetUseExceptions();
13116 1 : if ( bLocalUseExceptions ) {
13117 0 : pushErrorHandler();
13118 : }
13119 1 : result = (OGRErr)OSRSpatialReferenceShadow_CopyGeogCSFrom(arg1,arg2);
13120 1 : if ( bLocalUseExceptions ) {
13121 0 : popErrorHandler();
13122 : }
13123 : #ifndef SED_HACKS
13124 : if ( bLocalUseExceptions ) {
13125 : CPLErr eclass = CPLGetLastErrorType();
13126 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13127 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13128 : }
13129 : }
13130 : #endif
13131 : }
13132 1 : {
13133 : /* %typemap(out) OGRErr */
13134 1 : if ( result != 0 && GetUseExceptions()) {
13135 0 : const char* pszMessage = CPLGetLastErrorMsg();
13136 0 : if( pszMessage[0] != '\0' )
13137 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13138 : else
13139 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13140 0 : SWIG_fail;
13141 : }
13142 : }
13143 1 : {
13144 : /* %typemap(ret) OGRErr */
13145 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13146 1 : resultobj = PyInt_FromLong( result );
13147 : }
13148 : }
13149 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13150 : return resultobj;
13151 : fail:
13152 : return NULL;
13153 : }
13154 :
13155 :
13156 3 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13157 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13158 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13159 3 : double arg2 ;
13160 3 : double arg3 ;
13161 3 : double arg4 ;
13162 3 : double arg5 = (double) 0.0 ;
13163 3 : double arg6 = (double) 0.0 ;
13164 3 : double arg7 = (double) 0.0 ;
13165 3 : double arg8 = (double) 0.0 ;
13166 3 : void *argp1 = 0 ;
13167 3 : int res1 = 0 ;
13168 3 : double val2 ;
13169 3 : int ecode2 = 0 ;
13170 3 : double val3 ;
13171 3 : int ecode3 = 0 ;
13172 3 : double val4 ;
13173 3 : int ecode4 = 0 ;
13174 3 : double val5 ;
13175 3 : int ecode5 = 0 ;
13176 3 : double val6 ;
13177 3 : int ecode6 = 0 ;
13178 3 : double val7 ;
13179 3 : int ecode7 = 0 ;
13180 3 : double val8 ;
13181 3 : int ecode8 = 0 ;
13182 3 : PyObject *swig_obj[8] ;
13183 3 : OGRErr result;
13184 :
13185 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetTOWGS84", 4, 8, swig_obj)) SWIG_fail;
13186 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13187 3 : if (!SWIG_IsOK(res1)) {
13188 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13189 : }
13190 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13191 3 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
13192 3 : if (!SWIG_IsOK(ecode2)) {
13193 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTOWGS84" "', argument " "2"" of type '" "double""'");
13194 : }
13195 3 : arg2 = static_cast< double >(val2);
13196 3 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
13197 3 : if (!SWIG_IsOK(ecode3)) {
13198 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTOWGS84" "', argument " "3"" of type '" "double""'");
13199 : }
13200 3 : arg3 = static_cast< double >(val3);
13201 3 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
13202 3 : if (!SWIG_IsOK(ecode4)) {
13203 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTOWGS84" "', argument " "4"" of type '" "double""'");
13204 : }
13205 3 : arg4 = static_cast< double >(val4);
13206 3 : if (swig_obj[4]) {
13207 2 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
13208 2 : if (!SWIG_IsOK(ecode5)) {
13209 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTOWGS84" "', argument " "5"" of type '" "double""'");
13210 : }
13211 2 : arg5 = static_cast< double >(val5);
13212 : }
13213 3 : if (swig_obj[5]) {
13214 2 : ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
13215 2 : if (!SWIG_IsOK(ecode6)) {
13216 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTOWGS84" "', argument " "6"" of type '" "double""'");
13217 : }
13218 2 : arg6 = static_cast< double >(val6);
13219 : }
13220 3 : if (swig_obj[6]) {
13221 2 : ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
13222 2 : if (!SWIG_IsOK(ecode7)) {
13223 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetTOWGS84" "', argument " "7"" of type '" "double""'");
13224 : }
13225 2 : arg7 = static_cast< double >(val7);
13226 : }
13227 3 : if (swig_obj[7]) {
13228 2 : ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
13229 2 : if (!SWIG_IsOK(ecode8)) {
13230 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetTOWGS84" "', argument " "8"" of type '" "double""'");
13231 : }
13232 2 : arg8 = static_cast< double >(val8);
13233 : }
13234 3 : {
13235 3 : const int bLocalUseExceptions = GetUseExceptions();
13236 3 : if ( bLocalUseExceptions ) {
13237 1 : pushErrorHandler();
13238 : }
13239 3 : result = (OGRErr)OSRSpatialReferenceShadow_SetTOWGS84(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
13240 3 : if ( bLocalUseExceptions ) {
13241 1 : popErrorHandler();
13242 : }
13243 : #ifndef SED_HACKS
13244 : if ( bLocalUseExceptions ) {
13245 : CPLErr eclass = CPLGetLastErrorType();
13246 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13247 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13248 : }
13249 : }
13250 : #endif
13251 : }
13252 3 : {
13253 : /* %typemap(out) OGRErr */
13254 3 : if ( result != 0 && GetUseExceptions()) {
13255 0 : const char* pszMessage = CPLGetLastErrorMsg();
13256 0 : if( pszMessage[0] != '\0' )
13257 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13258 : else
13259 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13260 0 : SWIG_fail;
13261 : }
13262 : }
13263 3 : {
13264 : /* %typemap(ret) OGRErr */
13265 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13266 3 : resultobj = PyInt_FromLong( result );
13267 : }
13268 : }
13269 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13270 : return resultobj;
13271 : fail:
13272 : return NULL;
13273 : }
13274 :
13275 :
13276 4 : SWIGINTERN PyObject *_wrap_SpatialReference_HasTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13277 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13278 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13279 4 : void *argp1 = 0 ;
13280 4 : int res1 = 0 ;
13281 4 : PyObject *swig_obj[1] ;
13282 4 : bool result;
13283 :
13284 4 : if (!args) SWIG_fail;
13285 4 : swig_obj[0] = args;
13286 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13287 4 : if (!SWIG_IsOK(res1)) {
13288 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_HasTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13289 : }
13290 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13291 4 : {
13292 4 : const int bLocalUseExceptions = GetUseExceptions();
13293 4 : if ( bLocalUseExceptions ) {
13294 0 : pushErrorHandler();
13295 : }
13296 4 : result = (bool)OSRSpatialReferenceShadow_HasTOWGS84(arg1);
13297 4 : if ( bLocalUseExceptions ) {
13298 0 : popErrorHandler();
13299 : }
13300 : #ifndef SED_HACKS
13301 : if ( bLocalUseExceptions ) {
13302 : CPLErr eclass = CPLGetLastErrorType();
13303 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13304 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13305 : }
13306 : }
13307 : #endif
13308 : }
13309 4 : resultobj = SWIG_From_bool(static_cast< bool >(result));
13310 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13311 : return resultobj;
13312 : fail:
13313 : return NULL;
13314 : }
13315 :
13316 :
13317 4 : SWIGINTERN PyObject *_wrap_SpatialReference_GetTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13318 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13319 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13320 4 : double *arg2 ;
13321 4 : void *argp1 = 0 ;
13322 4 : int res1 = 0 ;
13323 4 : double argout2[7] ;
13324 4 : PyObject *swig_obj[1] ;
13325 4 : OGRErr result;
13326 :
13327 4 : {
13328 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
13329 4 : memset(argout2, 0, sizeof(argout2));
13330 4 : arg2 = argout2;
13331 : }
13332 4 : if (!args) SWIG_fail;
13333 4 : swig_obj[0] = args;
13334 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13335 4 : if (!SWIG_IsOK(res1)) {
13336 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13337 : }
13338 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13339 4 : {
13340 4 : const int bLocalUseExceptions = GetUseExceptions();
13341 4 : if ( bLocalUseExceptions ) {
13342 2 : pushErrorHandler();
13343 : }
13344 4 : result = (OGRErr)OSRSpatialReferenceShadow_GetTOWGS84(arg1,arg2);
13345 4 : if ( bLocalUseExceptions ) {
13346 2 : popErrorHandler();
13347 : }
13348 : #ifndef SED_HACKS
13349 : if ( bLocalUseExceptions ) {
13350 : CPLErr eclass = CPLGetLastErrorType();
13351 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13352 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13353 : }
13354 : }
13355 : #endif
13356 : }
13357 4 : {
13358 : /* %typemap(out) OGRErr */
13359 4 : if ( result != 0 && GetUseExceptions()) {
13360 0 : const char* pszMessage = CPLGetLastErrorMsg();
13361 0 : if( pszMessage[0] != '\0' )
13362 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13363 : else
13364 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13365 0 : SWIG_fail;
13366 : }
13367 : }
13368 4 : {
13369 : /* %typemap(argout) (double argout[ANY]) */
13370 4 : PyObject *out = CreateTupleFromDoubleArray( arg2, 7 );
13371 : #if SWIG_VERSION >= 0x040300
13372 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
13373 : #else
13374 4 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
13375 : #endif
13376 : }
13377 4 : {
13378 : /* %typemap(ret) OGRErr */
13379 8 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13380 0 : resultobj = PyInt_FromLong( result );
13381 : }
13382 : }
13383 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13384 : return resultobj;
13385 : fail:
13386 : return NULL;
13387 : }
13388 :
13389 :
13390 2 : SWIGINTERN PyObject *_wrap_SpatialReference_AddGuessedTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13391 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13392 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13393 2 : void *argp1 = 0 ;
13394 2 : int res1 = 0 ;
13395 2 : PyObject *swig_obj[1] ;
13396 2 : OGRErr result;
13397 :
13398 2 : if (!args) SWIG_fail;
13399 2 : swig_obj[0] = args;
13400 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13401 2 : if (!SWIG_IsOK(res1)) {
13402 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_AddGuessedTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13403 : }
13404 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13405 2 : {
13406 2 : const int bLocalUseExceptions = GetUseExceptions();
13407 2 : if ( bLocalUseExceptions ) {
13408 0 : pushErrorHandler();
13409 : }
13410 2 : result = (OGRErr)OSRSpatialReferenceShadow_AddGuessedTOWGS84(arg1);
13411 2 : if ( bLocalUseExceptions ) {
13412 0 : popErrorHandler();
13413 : }
13414 : #ifndef SED_HACKS
13415 : if ( bLocalUseExceptions ) {
13416 : CPLErr eclass = CPLGetLastErrorType();
13417 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13418 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13419 : }
13420 : }
13421 : #endif
13422 : }
13423 2 : {
13424 : /* %typemap(out) OGRErr */
13425 2 : if ( result != 0 && GetUseExceptions()) {
13426 0 : const char* pszMessage = CPLGetLastErrorMsg();
13427 0 : if( pszMessage[0] != '\0' )
13428 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13429 : else
13430 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13431 0 : SWIG_fail;
13432 : }
13433 : }
13434 2 : {
13435 : /* %typemap(ret) OGRErr */
13436 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13437 2 : resultobj = PyInt_FromLong( result );
13438 : }
13439 : }
13440 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13441 : return resultobj;
13442 : fail:
13443 : return NULL;
13444 : }
13445 :
13446 :
13447 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLocalCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13448 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13449 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13450 1 : char *arg2 = (char *) 0 ;
13451 1 : void *argp1 = 0 ;
13452 1 : int res1 = 0 ;
13453 1 : int res2 ;
13454 1 : char *buf2 = 0 ;
13455 1 : int alloc2 = 0 ;
13456 1 : PyObject *swig_obj[2] ;
13457 1 : OGRErr result;
13458 :
13459 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetLocalCS", 2, 2, swig_obj)) SWIG_fail;
13460 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13461 1 : if (!SWIG_IsOK(res1)) {
13462 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLocalCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13463 : }
13464 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13465 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13466 1 : if (!SWIG_IsOK(res2)) {
13467 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLocalCS" "', argument " "2"" of type '" "char const *""'");
13468 : }
13469 1 : arg2 = reinterpret_cast< char * >(buf2);
13470 1 : {
13471 1 : const int bLocalUseExceptions = GetUseExceptions();
13472 1 : if ( bLocalUseExceptions ) {
13473 1 : pushErrorHandler();
13474 : }
13475 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetLocalCS(arg1,(char const *)arg2);
13476 1 : if ( bLocalUseExceptions ) {
13477 1 : popErrorHandler();
13478 : }
13479 : #ifndef SED_HACKS
13480 : if ( bLocalUseExceptions ) {
13481 : CPLErr eclass = CPLGetLastErrorType();
13482 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13483 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13484 : }
13485 : }
13486 : #endif
13487 : }
13488 1 : {
13489 : /* %typemap(out) OGRErr */
13490 1 : if ( result != 0 && GetUseExceptions()) {
13491 0 : const char* pszMessage = CPLGetLastErrorMsg();
13492 0 : if( pszMessage[0] != '\0' )
13493 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13494 : else
13495 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13496 0 : SWIG_fail;
13497 : }
13498 : }
13499 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13500 1 : {
13501 : /* %typemap(ret) OGRErr */
13502 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13503 1 : resultobj = PyInt_FromLong( result );
13504 : }
13505 : }
13506 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13507 : return resultobj;
13508 0 : fail:
13509 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13510 : return NULL;
13511 : }
13512 :
13513 :
13514 17 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13515 17 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13516 17 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13517 17 : char *arg2 = (char *) 0 ;
13518 17 : char *arg3 = (char *) 0 ;
13519 17 : char *arg4 = (char *) 0 ;
13520 17 : double arg5 ;
13521 17 : double arg6 ;
13522 17 : char *arg7 = (char *) "Greenwich" ;
13523 17 : double arg8 = (double) 0.0 ;
13524 17 : char *arg9 = (char *) "degree" ;
13525 17 : double arg10 = (double) 0.0174532925199433 ;
13526 17 : void *argp1 = 0 ;
13527 17 : int res1 = 0 ;
13528 17 : int res2 ;
13529 17 : char *buf2 = 0 ;
13530 17 : int alloc2 = 0 ;
13531 17 : int res3 ;
13532 17 : char *buf3 = 0 ;
13533 17 : int alloc3 = 0 ;
13534 17 : int res4 ;
13535 17 : char *buf4 = 0 ;
13536 17 : int alloc4 = 0 ;
13537 17 : double val5 ;
13538 17 : int ecode5 = 0 ;
13539 17 : double val6 ;
13540 17 : int ecode6 = 0 ;
13541 17 : int res7 ;
13542 17 : char *buf7 = 0 ;
13543 17 : int alloc7 = 0 ;
13544 17 : double val8 ;
13545 17 : int ecode8 = 0 ;
13546 17 : int res9 ;
13547 17 : char *buf9 = 0 ;
13548 17 : int alloc9 = 0 ;
13549 17 : double val10 ;
13550 17 : int ecode10 = 0 ;
13551 17 : PyObject *swig_obj[10] ;
13552 17 : OGRErr result;
13553 :
13554 17 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetGeogCS", 6, 10, swig_obj)) SWIG_fail;
13555 17 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13556 17 : if (!SWIG_IsOK(res1)) {
13557 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13558 : }
13559 17 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13560 17 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13561 17 : if (!SWIG_IsOK(res2)) {
13562 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetGeogCS" "', argument " "2"" of type '" "char const *""'");
13563 : }
13564 17 : arg2 = reinterpret_cast< char * >(buf2);
13565 17 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
13566 17 : if (!SWIG_IsOK(res3)) {
13567 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetGeogCS" "', argument " "3"" of type '" "char const *""'");
13568 : }
13569 17 : arg3 = reinterpret_cast< char * >(buf3);
13570 17 : res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
13571 17 : if (!SWIG_IsOK(res4)) {
13572 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetGeogCS" "', argument " "4"" of type '" "char const *""'");
13573 : }
13574 17 : arg4 = reinterpret_cast< char * >(buf4);
13575 17 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
13576 17 : if (!SWIG_IsOK(ecode5)) {
13577 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGeogCS" "', argument " "5"" of type '" "double""'");
13578 : }
13579 17 : arg5 = static_cast< double >(val5);
13580 17 : ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
13581 17 : if (!SWIG_IsOK(ecode6)) {
13582 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetGeogCS" "', argument " "6"" of type '" "double""'");
13583 : }
13584 17 : arg6 = static_cast< double >(val6);
13585 17 : if (swig_obj[6]) {
13586 3 : res7 = SWIG_AsCharPtrAndSize(swig_obj[6], &buf7, NULL, &alloc7);
13587 3 : if (!SWIG_IsOK(res7)) {
13588 0 : SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "SpatialReference_SetGeogCS" "', argument " "7"" of type '" "char const *""'");
13589 : }
13590 3 : arg7 = reinterpret_cast< char * >(buf7);
13591 : }
13592 17 : if (swig_obj[7]) {
13593 3 : ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
13594 3 : if (!SWIG_IsOK(ecode8)) {
13595 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetGeogCS" "', argument " "8"" of type '" "double""'");
13596 : }
13597 3 : arg8 = static_cast< double >(val8);
13598 : }
13599 17 : if (swig_obj[8]) {
13600 3 : res9 = SWIG_AsCharPtrAndSize(swig_obj[8], &buf9, NULL, &alloc9);
13601 3 : if (!SWIG_IsOK(res9)) {
13602 0 : SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "SpatialReference_SetGeogCS" "', argument " "9"" of type '" "char const *""'");
13603 : }
13604 3 : arg9 = reinterpret_cast< char * >(buf9);
13605 : }
13606 17 : if (swig_obj[9]) {
13607 3 : ecode10 = SWIG_AsVal_double(swig_obj[9], &val10);
13608 3 : if (!SWIG_IsOK(ecode10)) {
13609 0 : SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "SpatialReference_SetGeogCS" "', argument " "10"" of type '" "double""'");
13610 : }
13611 3 : arg10 = static_cast< double >(val10);
13612 : }
13613 17 : {
13614 17 : const int bLocalUseExceptions = GetUseExceptions();
13615 17 : if ( bLocalUseExceptions ) {
13616 15 : pushErrorHandler();
13617 : }
13618 17 : result = (OGRErr)OSRSpatialReferenceShadow_SetGeogCS(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,(char const *)arg7,arg8,(char const *)arg9,arg10);
13619 17 : if ( bLocalUseExceptions ) {
13620 15 : popErrorHandler();
13621 : }
13622 : #ifndef SED_HACKS
13623 : if ( bLocalUseExceptions ) {
13624 : CPLErr eclass = CPLGetLastErrorType();
13625 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13626 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13627 : }
13628 : }
13629 : #endif
13630 : }
13631 17 : {
13632 : /* %typemap(out) OGRErr */
13633 17 : if ( result != 0 && GetUseExceptions()) {
13634 0 : const char* pszMessage = CPLGetLastErrorMsg();
13635 0 : if( pszMessage[0] != '\0' )
13636 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13637 : else
13638 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13639 0 : SWIG_fail;
13640 : }
13641 : }
13642 17 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13643 17 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13644 17 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
13645 17 : if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
13646 17 : if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
13647 17 : {
13648 : /* %typemap(ret) OGRErr */
13649 17 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13650 17 : resultobj = PyInt_FromLong( result );
13651 : }
13652 : }
13653 17 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13654 : return resultobj;
13655 0 : fail:
13656 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13657 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13658 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
13659 0 : if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
13660 0 : if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
13661 : return NULL;
13662 : }
13663 :
13664 :
13665 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13666 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13667 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13668 1 : char *arg2 = (char *) "unnamed" ;
13669 1 : void *argp1 = 0 ;
13670 1 : int res1 = 0 ;
13671 1 : int res2 ;
13672 1 : char *buf2 = 0 ;
13673 1 : int alloc2 = 0 ;
13674 1 : PyObject *swig_obj[2] ;
13675 1 : OGRErr result;
13676 :
13677 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetProjCS", 1, 2, swig_obj)) SWIG_fail;
13678 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13679 1 : if (!SWIG_IsOK(res1)) {
13680 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13681 : }
13682 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13683 1 : if (swig_obj[1]) {
13684 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13685 1 : if (!SWIG_IsOK(res2)) {
13686 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjCS" "', argument " "2"" of type '" "char const *""'");
13687 : }
13688 1 : arg2 = reinterpret_cast< char * >(buf2);
13689 : }
13690 1 : {
13691 1 : if (!arg2) {
13692 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13693 : }
13694 : }
13695 1 : {
13696 1 : const int bLocalUseExceptions = GetUseExceptions();
13697 1 : if ( bLocalUseExceptions ) {
13698 1 : pushErrorHandler();
13699 : }
13700 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjCS(arg1,(char const *)arg2);
13701 1 : if ( bLocalUseExceptions ) {
13702 1 : popErrorHandler();
13703 : }
13704 : #ifndef SED_HACKS
13705 : if ( bLocalUseExceptions ) {
13706 : CPLErr eclass = CPLGetLastErrorType();
13707 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13708 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13709 : }
13710 : }
13711 : #endif
13712 : }
13713 1 : {
13714 : /* %typemap(out) OGRErr */
13715 1 : if ( result != 0 && GetUseExceptions()) {
13716 0 : const char* pszMessage = CPLGetLastErrorMsg();
13717 0 : if( pszMessage[0] != '\0' )
13718 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13719 : else
13720 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13721 0 : SWIG_fail;
13722 : }
13723 : }
13724 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13725 1 : {
13726 : /* %typemap(ret) OGRErr */
13727 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13728 1 : resultobj = PyInt_FromLong( result );
13729 : }
13730 : }
13731 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13732 : return resultobj;
13733 0 : fail:
13734 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13735 : return NULL;
13736 : }
13737 :
13738 :
13739 4 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGeocCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13740 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13741 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13742 4 : char *arg2 = (char *) "unnamed" ;
13743 4 : void *argp1 = 0 ;
13744 4 : int res1 = 0 ;
13745 4 : int res2 ;
13746 4 : char *buf2 = 0 ;
13747 4 : int alloc2 = 0 ;
13748 4 : PyObject *swig_obj[2] ;
13749 4 : OGRErr result;
13750 :
13751 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetGeocCS", 1, 2, swig_obj)) SWIG_fail;
13752 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13753 4 : if (!SWIG_IsOK(res1)) {
13754 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGeocCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13755 : }
13756 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13757 4 : if (swig_obj[1]) {
13758 4 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13759 4 : if (!SWIG_IsOK(res2)) {
13760 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetGeocCS" "', argument " "2"" of type '" "char const *""'");
13761 : }
13762 4 : arg2 = reinterpret_cast< char * >(buf2);
13763 : }
13764 4 : {
13765 4 : if (!arg2) {
13766 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13767 : }
13768 : }
13769 4 : {
13770 4 : const int bLocalUseExceptions = GetUseExceptions();
13771 4 : if ( bLocalUseExceptions ) {
13772 4 : pushErrorHandler();
13773 : }
13774 4 : result = (OGRErr)OSRSpatialReferenceShadow_SetGeocCS(arg1,(char const *)arg2);
13775 4 : if ( bLocalUseExceptions ) {
13776 4 : popErrorHandler();
13777 : }
13778 : #ifndef SED_HACKS
13779 : if ( bLocalUseExceptions ) {
13780 : CPLErr eclass = CPLGetLastErrorType();
13781 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13782 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13783 : }
13784 : }
13785 : #endif
13786 : }
13787 4 : {
13788 : /* %typemap(out) OGRErr */
13789 5 : if ( result != 0 && GetUseExceptions()) {
13790 1 : const char* pszMessage = CPLGetLastErrorMsg();
13791 1 : if( pszMessage[0] != '\0' )
13792 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13793 : else
13794 1 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13795 1 : SWIG_fail;
13796 : }
13797 : }
13798 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13799 3 : {
13800 : /* %typemap(ret) OGRErr */
13801 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13802 3 : resultobj = PyInt_FromLong( result );
13803 : }
13804 : }
13805 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13806 : return resultobj;
13807 1 : fail:
13808 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13809 : return NULL;
13810 : }
13811 :
13812 :
13813 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVertCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13814 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13815 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13816 0 : char *arg2 = (char *) "unnamed" ;
13817 0 : char *arg3 = (char *) "unnamed" ;
13818 0 : int arg4 = (int) 0 ;
13819 0 : void *argp1 = 0 ;
13820 0 : int res1 = 0 ;
13821 0 : int res2 ;
13822 0 : char *buf2 = 0 ;
13823 0 : int alloc2 = 0 ;
13824 0 : int res3 ;
13825 0 : char *buf3 = 0 ;
13826 0 : int alloc3 = 0 ;
13827 0 : int val4 ;
13828 0 : int ecode4 = 0 ;
13829 0 : PyObject *swig_obj[4] ;
13830 0 : OGRErr result;
13831 :
13832 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetVertCS", 1, 4, swig_obj)) SWIG_fail;
13833 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13834 0 : if (!SWIG_IsOK(res1)) {
13835 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13836 : }
13837 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13838 0 : if (swig_obj[1]) {
13839 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13840 0 : if (!SWIG_IsOK(res2)) {
13841 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetVertCS" "', argument " "2"" of type '" "char const *""'");
13842 : }
13843 0 : arg2 = reinterpret_cast< char * >(buf2);
13844 : }
13845 0 : if (swig_obj[2]) {
13846 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
13847 0 : if (!SWIG_IsOK(res3)) {
13848 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetVertCS" "', argument " "3"" of type '" "char const *""'");
13849 : }
13850 0 : arg3 = reinterpret_cast< char * >(buf3);
13851 : }
13852 0 : if (swig_obj[3]) {
13853 0 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
13854 0 : if (!SWIG_IsOK(ecode4)) {
13855 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVertCS" "', argument " "4"" of type '" "int""'");
13856 : }
13857 : arg4 = static_cast< int >(val4);
13858 : }
13859 0 : {
13860 0 : const int bLocalUseExceptions = GetUseExceptions();
13861 0 : if ( bLocalUseExceptions ) {
13862 0 : pushErrorHandler();
13863 : }
13864 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetVertCS(arg1,(char const *)arg2,(char const *)arg3,arg4);
13865 0 : if ( bLocalUseExceptions ) {
13866 0 : popErrorHandler();
13867 : }
13868 : #ifndef SED_HACKS
13869 : if ( bLocalUseExceptions ) {
13870 : CPLErr eclass = CPLGetLastErrorType();
13871 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13872 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13873 : }
13874 : }
13875 : #endif
13876 : }
13877 0 : {
13878 : /* %typemap(out) OGRErr */
13879 0 : if ( result != 0 && GetUseExceptions()) {
13880 0 : const char* pszMessage = CPLGetLastErrorMsg();
13881 0 : if( pszMessage[0] != '\0' )
13882 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13883 : else
13884 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13885 0 : SWIG_fail;
13886 : }
13887 : }
13888 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13889 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13890 0 : {
13891 : /* %typemap(ret) OGRErr */
13892 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13893 0 : resultobj = PyInt_FromLong( result );
13894 : }
13895 : }
13896 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13897 : return resultobj;
13898 0 : fail:
13899 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13900 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13901 : return NULL;
13902 : }
13903 :
13904 :
13905 8 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCompoundCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13906 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13907 8 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13908 8 : char *arg2 = (char *) 0 ;
13909 8 : OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) 0 ;
13910 8 : OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
13911 8 : void *argp1 = 0 ;
13912 8 : int res1 = 0 ;
13913 8 : int res2 ;
13914 8 : char *buf2 = 0 ;
13915 8 : int alloc2 = 0 ;
13916 8 : void *argp3 = 0 ;
13917 8 : int res3 = 0 ;
13918 8 : void *argp4 = 0 ;
13919 8 : int res4 = 0 ;
13920 8 : PyObject *swig_obj[4] ;
13921 8 : OGRErr result;
13922 :
13923 8 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetCompoundCS", 4, 4, swig_obj)) SWIG_fail;
13924 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13925 8 : if (!SWIG_IsOK(res1)) {
13926 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCompoundCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13927 : }
13928 8 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13929 8 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13930 8 : if (!SWIG_IsOK(res2)) {
13931 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetCompoundCS" "', argument " "2"" of type '" "char const *""'");
13932 : }
13933 8 : arg2 = reinterpret_cast< char * >(buf2);
13934 8 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13935 8 : if (!SWIG_IsOK(res3)) {
13936 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetCompoundCS" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'");
13937 : }
13938 8 : arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
13939 8 : res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13940 8 : if (!SWIG_IsOK(res4)) {
13941 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetCompoundCS" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'");
13942 : }
13943 8 : arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
13944 8 : {
13945 8 : if (!arg2) {
13946 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13947 : }
13948 : }
13949 8 : {
13950 8 : if (!arg3) {
13951 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13952 : }
13953 : }
13954 8 : {
13955 8 : if (!arg4) {
13956 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13957 : }
13958 : }
13959 8 : {
13960 8 : const int bLocalUseExceptions = GetUseExceptions();
13961 8 : if ( bLocalUseExceptions ) {
13962 8 : pushErrorHandler();
13963 : }
13964 8 : result = (OGRErr)OSRSpatialReferenceShadow_SetCompoundCS(arg1,(char const *)arg2,arg3,arg4);
13965 8 : if ( bLocalUseExceptions ) {
13966 8 : popErrorHandler();
13967 : }
13968 : #ifndef SED_HACKS
13969 : if ( bLocalUseExceptions ) {
13970 : CPLErr eclass = CPLGetLastErrorType();
13971 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13972 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13973 : }
13974 : }
13975 : #endif
13976 : }
13977 8 : {
13978 : /* %typemap(out) OGRErr */
13979 8 : if ( result != 0 && GetUseExceptions()) {
13980 0 : const char* pszMessage = CPLGetLastErrorMsg();
13981 0 : if( pszMessage[0] != '\0' )
13982 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13983 : else
13984 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13985 0 : SWIG_fail;
13986 : }
13987 : }
13988 8 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13989 8 : {
13990 : /* %typemap(ret) OGRErr */
13991 8 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13992 8 : resultobj = PyInt_FromLong( result );
13993 : }
13994 : }
13995 8 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13996 : return resultobj;
13997 0 : fail:
13998 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13999 : return NULL;
14000 : }
14001 :
14002 :
14003 261 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14004 261 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14005 261 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14006 261 : char **arg2 = (char **) 0 ;
14007 261 : void *argp1 = 0 ;
14008 261 : int res1 = 0 ;
14009 261 : char *val2 ;
14010 261 : PyObject *swig_obj[2] ;
14011 261 : OGRErr result;
14012 :
14013 261 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromWkt", 2, 2, swig_obj)) SWIG_fail;
14014 261 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14015 261 : if (!SWIG_IsOK(res1)) {
14016 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14017 : }
14018 261 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14019 261 : {
14020 : /* %typemap(in) (char **ignorechange) */
14021 261 : if( !PyArg_Parse( swig_obj[1], "s", &val2 ) ) {
14022 0 : PyErr_SetString( PyExc_TypeError, "not a string" );
14023 0 : SWIG_fail;
14024 : }
14025 261 : arg2 = &val2;
14026 : }
14027 261 : {
14028 261 : const int bLocalUseExceptions = GetUseExceptions();
14029 261 : if ( bLocalUseExceptions ) {
14030 156 : pushErrorHandler();
14031 : }
14032 261 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromWkt(arg1,arg2);
14033 261 : if ( bLocalUseExceptions ) {
14034 156 : popErrorHandler();
14035 : }
14036 : #ifndef SED_HACKS
14037 : if ( bLocalUseExceptions ) {
14038 : CPLErr eclass = CPLGetLastErrorType();
14039 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14040 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14041 : }
14042 : }
14043 : #endif
14044 : }
14045 261 : {
14046 : /* %typemap(out) OGRErr */
14047 296 : if ( result != 0 && GetUseExceptions()) {
14048 0 : const char* pszMessage = CPLGetLastErrorMsg();
14049 0 : if( pszMessage[0] != '\0' )
14050 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14051 : else
14052 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14053 0 : SWIG_fail;
14054 : }
14055 : }
14056 261 : {
14057 : /* %typemap(ret) OGRErr */
14058 261 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14059 261 : resultobj = PyInt_FromLong( result );
14060 : }
14061 : }
14062 261 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14063 : return resultobj;
14064 : fail:
14065 : return NULL;
14066 : }
14067 :
14068 :
14069 213 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromProj4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14070 213 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14071 213 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14072 213 : char *arg2 = (char *) 0 ;
14073 213 : void *argp1 = 0 ;
14074 213 : int res1 = 0 ;
14075 213 : int res2 ;
14076 213 : char *buf2 = 0 ;
14077 213 : int alloc2 = 0 ;
14078 213 : PyObject *swig_obj[2] ;
14079 213 : OGRErr result;
14080 :
14081 213 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromProj4", 2, 2, swig_obj)) SWIG_fail;
14082 213 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14083 213 : if (!SWIG_IsOK(res1)) {
14084 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromProj4" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14085 : }
14086 213 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14087 213 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14088 213 : if (!SWIG_IsOK(res2)) {
14089 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromProj4" "', argument " "2"" of type '" "char *""'");
14090 : }
14091 213 : arg2 = reinterpret_cast< char * >(buf2);
14092 213 : {
14093 213 : const int bLocalUseExceptions = GetUseExceptions();
14094 213 : if ( bLocalUseExceptions ) {
14095 184 : pushErrorHandler();
14096 : }
14097 213 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromProj4(arg1,arg2);
14098 213 : if ( bLocalUseExceptions ) {
14099 184 : popErrorHandler();
14100 : }
14101 : #ifndef SED_HACKS
14102 : if ( bLocalUseExceptions ) {
14103 : CPLErr eclass = CPLGetLastErrorType();
14104 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14105 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14106 : }
14107 : }
14108 : #endif
14109 : }
14110 213 : {
14111 : /* %typemap(out) OGRErr */
14112 218 : if ( result != 0 && GetUseExceptions()) {
14113 5 : const char* pszMessage = CPLGetLastErrorMsg();
14114 5 : if( pszMessage[0] != '\0' )
14115 5 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14116 : else
14117 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14118 5 : SWIG_fail;
14119 : }
14120 : }
14121 208 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14122 208 : {
14123 : /* %typemap(ret) OGRErr */
14124 208 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14125 208 : resultobj = PyInt_FromLong( result );
14126 : }
14127 : }
14128 213 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14129 : return resultobj;
14130 5 : fail:
14131 5 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14132 : return NULL;
14133 : }
14134 :
14135 :
14136 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromUrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14137 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14138 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14139 3 : char *arg2 = (char *) 0 ;
14140 3 : void *argp1 = 0 ;
14141 3 : int res1 = 0 ;
14142 3 : int res2 ;
14143 3 : char *buf2 = 0 ;
14144 3 : int alloc2 = 0 ;
14145 3 : PyObject *swig_obj[2] ;
14146 3 : OGRErr result;
14147 :
14148 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromUrl", 2, 2, swig_obj)) SWIG_fail;
14149 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14150 3 : if (!SWIG_IsOK(res1)) {
14151 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromUrl" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14152 : }
14153 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14154 3 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14155 3 : if (!SWIG_IsOK(res2)) {
14156 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromUrl" "', argument " "2"" of type '" "char *""'");
14157 : }
14158 3 : arg2 = reinterpret_cast< char * >(buf2);
14159 3 : {
14160 3 : if (!arg2) {
14161 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14162 : }
14163 : }
14164 3 : {
14165 3 : const int bLocalUseExceptions = GetUseExceptions();
14166 3 : if ( bLocalUseExceptions ) {
14167 3 : pushErrorHandler();
14168 : }
14169 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUrl(arg1,arg2);
14170 3 : if ( bLocalUseExceptions ) {
14171 3 : popErrorHandler();
14172 : }
14173 : #ifndef SED_HACKS
14174 : if ( bLocalUseExceptions ) {
14175 : CPLErr eclass = CPLGetLastErrorType();
14176 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14177 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14178 : }
14179 : }
14180 : #endif
14181 : }
14182 3 : {
14183 : /* %typemap(out) OGRErr */
14184 3 : if ( result != 0 && GetUseExceptions()) {
14185 0 : const char* pszMessage = CPLGetLastErrorMsg();
14186 0 : if( pszMessage[0] != '\0' )
14187 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14188 : else
14189 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14190 0 : SWIG_fail;
14191 : }
14192 : }
14193 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14194 3 : {
14195 : /* %typemap(ret) OGRErr */
14196 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14197 3 : resultobj = PyInt_FromLong( result );
14198 : }
14199 : }
14200 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14201 : return resultobj;
14202 0 : fail:
14203 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14204 : return NULL;
14205 : }
14206 :
14207 :
14208 11 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14209 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14210 11 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14211 11 : char **arg2 = (char **) 0 ;
14212 11 : void *argp1 = 0 ;
14213 11 : int res1 = 0 ;
14214 11 : PyObject *swig_obj[2] ;
14215 11 : OGRErr result;
14216 :
14217 11 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromESRI", 2, 2, swig_obj)) SWIG_fail;
14218 11 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14219 11 : if (!SWIG_IsOK(res1)) {
14220 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14221 : }
14222 11 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14223 11 : {
14224 : /* %typemap(in) char **dict */
14225 11 : arg2 = NULL;
14226 11 : if ( PySequence_Check( swig_obj[1] ) ) {
14227 11 : int bErr = FALSE;
14228 11 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
14229 11 : if ( bErr )
14230 : {
14231 0 : SWIG_fail;
14232 : }
14233 : }
14234 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
14235 0 : int bErr = FALSE;
14236 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
14237 0 : if ( bErr )
14238 : {
14239 0 : SWIG_fail;
14240 : }
14241 : }
14242 : else {
14243 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
14244 0 : SWIG_fail;
14245 : }
14246 : }
14247 11 : {
14248 11 : const int bLocalUseExceptions = GetUseExceptions();
14249 11 : if ( bLocalUseExceptions ) {
14250 11 : pushErrorHandler();
14251 : }
14252 11 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromESRI(arg1,arg2);
14253 11 : if ( bLocalUseExceptions ) {
14254 11 : popErrorHandler();
14255 : }
14256 : #ifndef SED_HACKS
14257 : if ( bLocalUseExceptions ) {
14258 : CPLErr eclass = CPLGetLastErrorType();
14259 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14260 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14261 : }
14262 : }
14263 : #endif
14264 : }
14265 11 : {
14266 : /* %typemap(out) OGRErr */
14267 12 : if ( result != 0 && GetUseExceptions()) {
14268 1 : const char* pszMessage = CPLGetLastErrorMsg();
14269 1 : if( pszMessage[0] != '\0' )
14270 1 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14271 : else
14272 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14273 1 : SWIG_fail;
14274 : }
14275 : }
14276 10 : {
14277 : /* %typemap(freearg) char **dict */
14278 10 : CSLDestroy( arg2 );
14279 : }
14280 10 : {
14281 : /* %typemap(ret) OGRErr */
14282 10 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14283 10 : resultobj = PyInt_FromLong( result );
14284 : }
14285 : }
14286 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14287 : return resultobj;
14288 1 : fail:
14289 1 : {
14290 : /* %typemap(freearg) char **dict */
14291 1 : CSLDestroy( arg2 );
14292 : }
14293 : return NULL;
14294 : }
14295 :
14296 :
14297 1013 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromEPSG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14298 1013 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14299 1013 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14300 1013 : int arg2 ;
14301 1013 : void *argp1 = 0 ;
14302 1013 : int res1 = 0 ;
14303 1013 : int val2 ;
14304 1013 : int ecode2 = 0 ;
14305 1013 : PyObject *swig_obj[2] ;
14306 1013 : OGRErr result;
14307 :
14308 1013 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromEPSG", 2, 2, swig_obj)) SWIG_fail;
14309 1013 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14310 1013 : if (!SWIG_IsOK(res1)) {
14311 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromEPSG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14312 : }
14313 1013 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14314 1013 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14315 1013 : if (!SWIG_IsOK(ecode2)) {
14316 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromEPSG" "', argument " "2"" of type '" "int""'");
14317 : }
14318 1013 : arg2 = static_cast< int >(val2);
14319 1013 : {
14320 1013 : const int bLocalUseExceptions = GetUseExceptions();
14321 1013 : if ( bLocalUseExceptions ) {
14322 689 : pushErrorHandler();
14323 : }
14324 1013 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSG(arg1,arg2);
14325 1013 : if ( bLocalUseExceptions ) {
14326 689 : popErrorHandler();
14327 : }
14328 : #ifndef SED_HACKS
14329 : if ( bLocalUseExceptions ) {
14330 : CPLErr eclass = CPLGetLastErrorType();
14331 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14332 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14333 : }
14334 : }
14335 : #endif
14336 : }
14337 1013 : {
14338 : /* %typemap(out) OGRErr */
14339 1018 : if ( result != 0 && GetUseExceptions()) {
14340 5 : const char* pszMessage = CPLGetLastErrorMsg();
14341 5 : if( pszMessage[0] != '\0' )
14342 5 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14343 : else
14344 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14345 5 : SWIG_fail;
14346 : }
14347 : }
14348 1008 : {
14349 : /* %typemap(ret) OGRErr */
14350 1008 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14351 1008 : resultobj = PyInt_FromLong( result );
14352 : }
14353 : }
14354 1013 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14355 : return resultobj;
14356 : fail:
14357 : return NULL;
14358 : }
14359 :
14360 :
14361 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromEPSGA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14362 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14363 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14364 2 : int arg2 ;
14365 2 : void *argp1 = 0 ;
14366 2 : int res1 = 0 ;
14367 2 : int val2 ;
14368 2 : int ecode2 = 0 ;
14369 2 : PyObject *swig_obj[2] ;
14370 2 : OGRErr result;
14371 :
14372 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromEPSGA", 2, 2, swig_obj)) SWIG_fail;
14373 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14374 2 : if (!SWIG_IsOK(res1)) {
14375 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromEPSGA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14376 : }
14377 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14378 2 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14379 2 : if (!SWIG_IsOK(ecode2)) {
14380 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromEPSGA" "', argument " "2"" of type '" "int""'");
14381 : }
14382 2 : arg2 = static_cast< int >(val2);
14383 2 : {
14384 2 : const int bLocalUseExceptions = GetUseExceptions();
14385 2 : if ( bLocalUseExceptions ) {
14386 2 : pushErrorHandler();
14387 : }
14388 2 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSGA(arg1,arg2);
14389 2 : if ( bLocalUseExceptions ) {
14390 2 : popErrorHandler();
14391 : }
14392 : #ifndef SED_HACKS
14393 : if ( bLocalUseExceptions ) {
14394 : CPLErr eclass = CPLGetLastErrorType();
14395 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14396 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14397 : }
14398 : }
14399 : #endif
14400 : }
14401 2 : {
14402 : /* %typemap(out) OGRErr */
14403 2 : if ( result != 0 && GetUseExceptions()) {
14404 0 : const char* pszMessage = CPLGetLastErrorMsg();
14405 0 : if( pszMessage[0] != '\0' )
14406 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14407 : else
14408 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14409 0 : SWIG_fail;
14410 : }
14411 : }
14412 2 : {
14413 : /* %typemap(ret) OGRErr */
14414 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14415 2 : resultobj = PyInt_FromLong( result );
14416 : }
14417 : }
14418 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14419 : return resultobj;
14420 : fail:
14421 : return NULL;
14422 : }
14423 :
14424 :
14425 7 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromPCI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14426 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14427 7 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14428 7 : char *arg2 = (char *) 0 ;
14429 7 : char *arg3 = (char *) "METRE" ;
14430 7 : double *arg4 = (double *) (double *)0 ;
14431 7 : void *argp1 = 0 ;
14432 7 : int res1 = 0 ;
14433 7 : int res2 ;
14434 7 : char *buf2 = 0 ;
14435 7 : int alloc2 = 0 ;
14436 7 : int res3 ;
14437 7 : char *buf3 = 0 ;
14438 7 : int alloc3 = 0 ;
14439 7 : double argin4[17] ;
14440 7 : PyObject *swig_obj[4] ;
14441 7 : OGRErr result;
14442 :
14443 7 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromPCI", 2, 4, swig_obj)) SWIG_fail;
14444 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14445 7 : if (!SWIG_IsOK(res1)) {
14446 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromPCI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14447 : }
14448 7 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14449 7 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14450 7 : if (!SWIG_IsOK(res2)) {
14451 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromPCI" "', argument " "2"" of type '" "char const *""'");
14452 : }
14453 7 : arg2 = reinterpret_cast< char * >(buf2);
14454 7 : if (swig_obj[2]) {
14455 7 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
14456 7 : if (!SWIG_IsOK(res3)) {
14457 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromPCI" "', argument " "3"" of type '" "char const *""'");
14458 : }
14459 7 : arg3 = reinterpret_cast< char * >(buf3);
14460 : }
14461 7 : if (swig_obj[3]) {
14462 7 : {
14463 : /* %typemap(in) (double argin4[ANY]) */
14464 7 : arg4 = argin4;
14465 7 : if (! PySequence_Check(swig_obj[3]) ) {
14466 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
14467 0 : SWIG_fail;
14468 : }
14469 7 : Py_ssize_t seq_size = PySequence_Size(swig_obj[3]);
14470 7 : if ( seq_size != 17 ) {
14471 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
14472 0 : SWIG_fail;
14473 : }
14474 126 : for (unsigned int i=0; i<17; i++) {
14475 119 : PyObject *o = PySequence_GetItem(swig_obj[3],i);
14476 119 : double val;
14477 119 : if ( !PyArg_Parse(o, "d", &val ) ) {
14478 0 : PyErr_SetString(PyExc_TypeError, "not a number");
14479 0 : Py_DECREF(o);
14480 0 : SWIG_fail;
14481 : }
14482 119 : arg4[i] = val;
14483 119 : Py_DECREF(o);
14484 : }
14485 : }
14486 : }
14487 7 : {
14488 7 : const int bLocalUseExceptions = GetUseExceptions();
14489 7 : if ( bLocalUseExceptions ) {
14490 7 : pushErrorHandler();
14491 : }
14492 7 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromPCI(arg1,(char const *)arg2,(char const *)arg3,arg4);
14493 7 : if ( bLocalUseExceptions ) {
14494 7 : popErrorHandler();
14495 : }
14496 : #ifndef SED_HACKS
14497 : if ( bLocalUseExceptions ) {
14498 : CPLErr eclass = CPLGetLastErrorType();
14499 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14500 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14501 : }
14502 : }
14503 : #endif
14504 : }
14505 7 : {
14506 : /* %typemap(out) OGRErr */
14507 7 : if ( result != 0 && GetUseExceptions()) {
14508 0 : const char* pszMessage = CPLGetLastErrorMsg();
14509 0 : if( pszMessage[0] != '\0' )
14510 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14511 : else
14512 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14513 0 : SWIG_fail;
14514 : }
14515 : }
14516 7 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14517 7 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14518 7 : {
14519 : /* %typemap(ret) OGRErr */
14520 7 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14521 7 : resultobj = PyInt_FromLong( result );
14522 : }
14523 : }
14524 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14525 : return resultobj;
14526 0 : fail:
14527 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14528 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14529 : return NULL;
14530 : }
14531 :
14532 :
14533 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromUSGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14534 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14535 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14536 2 : long arg2 ;
14537 2 : long arg3 = (long) 0 ;
14538 2 : double *arg4 = (double *) (double *)0 ;
14539 2 : long arg5 = (long) 0 ;
14540 2 : void *argp1 = 0 ;
14541 2 : int res1 = 0 ;
14542 2 : long val2 ;
14543 2 : int ecode2 = 0 ;
14544 2 : long val3 ;
14545 2 : int ecode3 = 0 ;
14546 2 : double argin4[15] ;
14547 2 : long val5 ;
14548 2 : int ecode5 = 0 ;
14549 2 : PyObject *swig_obj[5] ;
14550 2 : OGRErr result;
14551 :
14552 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromUSGS", 2, 5, swig_obj)) SWIG_fail;
14553 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14554 2 : if (!SWIG_IsOK(res1)) {
14555 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14556 : }
14557 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14558 2 : ecode2 = SWIG_AsVal_long(swig_obj[1], &val2);
14559 2 : if (!SWIG_IsOK(ecode2)) {
14560 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "2"" of type '" "long""'");
14561 : }
14562 2 : arg2 = static_cast< long >(val2);
14563 2 : if (swig_obj[2]) {
14564 2 : ecode3 = SWIG_AsVal_long(swig_obj[2], &val3);
14565 2 : if (!SWIG_IsOK(ecode3)) {
14566 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "3"" of type '" "long""'");
14567 : }
14568 2 : arg3 = static_cast< long >(val3);
14569 : }
14570 2 : if (swig_obj[3]) {
14571 2 : {
14572 : /* %typemap(in) (double argin4[ANY]) */
14573 2 : arg4 = argin4;
14574 2 : if (! PySequence_Check(swig_obj[3]) ) {
14575 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
14576 0 : SWIG_fail;
14577 : }
14578 2 : Py_ssize_t seq_size = PySequence_Size(swig_obj[3]);
14579 2 : if ( seq_size != 15 ) {
14580 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
14581 0 : SWIG_fail;
14582 : }
14583 32 : for (unsigned int i=0; i<15; i++) {
14584 30 : PyObject *o = PySequence_GetItem(swig_obj[3],i);
14585 30 : double val;
14586 30 : if ( !PyArg_Parse(o, "d", &val ) ) {
14587 0 : PyErr_SetString(PyExc_TypeError, "not a number");
14588 0 : Py_DECREF(o);
14589 0 : SWIG_fail;
14590 : }
14591 30 : arg4[i] = val;
14592 30 : Py_DECREF(o);
14593 : }
14594 : }
14595 : }
14596 2 : if (swig_obj[4]) {
14597 2 : ecode5 = SWIG_AsVal_long(swig_obj[4], &val5);
14598 2 : if (!SWIG_IsOK(ecode5)) {
14599 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "5"" of type '" "long""'");
14600 : }
14601 2 : arg5 = static_cast< long >(val5);
14602 : }
14603 2 : {
14604 2 : const int bLocalUseExceptions = GetUseExceptions();
14605 2 : if ( bLocalUseExceptions ) {
14606 2 : pushErrorHandler();
14607 : }
14608 2 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUSGS(arg1,arg2,arg3,arg4,arg5);
14609 2 : if ( bLocalUseExceptions ) {
14610 2 : popErrorHandler();
14611 : }
14612 : #ifndef SED_HACKS
14613 : if ( bLocalUseExceptions ) {
14614 : CPLErr eclass = CPLGetLastErrorType();
14615 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14616 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14617 : }
14618 : }
14619 : #endif
14620 : }
14621 2 : {
14622 : /* %typemap(out) OGRErr */
14623 2 : if ( result != 0 && GetUseExceptions()) {
14624 0 : const char* pszMessage = CPLGetLastErrorMsg();
14625 0 : if( pszMessage[0] != '\0' )
14626 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14627 : else
14628 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14629 0 : SWIG_fail;
14630 : }
14631 : }
14632 2 : {
14633 : /* %typemap(ret) OGRErr */
14634 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14635 2 : resultobj = PyInt_FromLong( result );
14636 : }
14637 : }
14638 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14639 : return resultobj;
14640 : fail:
14641 : return NULL;
14642 : }
14643 :
14644 :
14645 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromXML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14646 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14647 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14648 1 : char *arg2 = (char *) 0 ;
14649 1 : void *argp1 = 0 ;
14650 1 : int res1 = 0 ;
14651 1 : int res2 ;
14652 1 : char *buf2 = 0 ;
14653 1 : int alloc2 = 0 ;
14654 1 : PyObject *swig_obj[2] ;
14655 1 : OGRErr result;
14656 :
14657 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromXML", 2, 2, swig_obj)) SWIG_fail;
14658 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14659 1 : if (!SWIG_IsOK(res1)) {
14660 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromXML" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14661 : }
14662 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14663 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14664 1 : if (!SWIG_IsOK(res2)) {
14665 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromXML" "', argument " "2"" of type '" "char const *""'");
14666 : }
14667 1 : arg2 = reinterpret_cast< char * >(buf2);
14668 1 : {
14669 1 : const int bLocalUseExceptions = GetUseExceptions();
14670 1 : if ( bLocalUseExceptions ) {
14671 1 : pushErrorHandler();
14672 : }
14673 1 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromXML(arg1,(char const *)arg2);
14674 1 : if ( bLocalUseExceptions ) {
14675 1 : popErrorHandler();
14676 : }
14677 : #ifndef SED_HACKS
14678 : if ( bLocalUseExceptions ) {
14679 : CPLErr eclass = CPLGetLastErrorType();
14680 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14681 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14682 : }
14683 : }
14684 : #endif
14685 : }
14686 1 : {
14687 : /* %typemap(out) OGRErr */
14688 1 : if ( result != 0 && GetUseExceptions()) {
14689 0 : const char* pszMessage = CPLGetLastErrorMsg();
14690 0 : if( pszMessage[0] != '\0' )
14691 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14692 : else
14693 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14694 0 : SWIG_fail;
14695 : }
14696 : }
14697 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14698 1 : {
14699 : /* %typemap(ret) OGRErr */
14700 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14701 1 : resultobj = PyInt_FromLong( result );
14702 : }
14703 : }
14704 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14705 : return resultobj;
14706 0 : fail:
14707 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14708 : return NULL;
14709 : }
14710 :
14711 :
14712 7 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromERM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14713 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14714 7 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14715 7 : char *arg2 = (char *) 0 ;
14716 7 : char *arg3 = (char *) 0 ;
14717 7 : char *arg4 = (char *) 0 ;
14718 7 : void *argp1 = 0 ;
14719 7 : int res1 = 0 ;
14720 7 : int res2 ;
14721 7 : char *buf2 = 0 ;
14722 7 : int alloc2 = 0 ;
14723 7 : int res3 ;
14724 7 : char *buf3 = 0 ;
14725 7 : int alloc3 = 0 ;
14726 7 : int res4 ;
14727 7 : char *buf4 = 0 ;
14728 7 : int alloc4 = 0 ;
14729 7 : PyObject *swig_obj[4] ;
14730 7 : OGRErr result;
14731 :
14732 7 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromERM", 4, 4, swig_obj)) SWIG_fail;
14733 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14734 7 : if (!SWIG_IsOK(res1)) {
14735 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromERM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14736 : }
14737 7 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14738 7 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14739 7 : if (!SWIG_IsOK(res2)) {
14740 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromERM" "', argument " "2"" of type '" "char const *""'");
14741 : }
14742 7 : arg2 = reinterpret_cast< char * >(buf2);
14743 7 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
14744 7 : if (!SWIG_IsOK(res3)) {
14745 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromERM" "', argument " "3"" of type '" "char const *""'");
14746 : }
14747 7 : arg3 = reinterpret_cast< char * >(buf3);
14748 7 : res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
14749 7 : if (!SWIG_IsOK(res4)) {
14750 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_ImportFromERM" "', argument " "4"" of type '" "char const *""'");
14751 : }
14752 7 : arg4 = reinterpret_cast< char * >(buf4);
14753 7 : {
14754 7 : if (!arg2) {
14755 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14756 : }
14757 : }
14758 7 : {
14759 7 : if (!arg3) {
14760 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14761 : }
14762 : }
14763 7 : {
14764 7 : const int bLocalUseExceptions = GetUseExceptions();
14765 7 : if ( bLocalUseExceptions ) {
14766 7 : pushErrorHandler();
14767 : }
14768 7 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromERM(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
14769 7 : if ( bLocalUseExceptions ) {
14770 7 : popErrorHandler();
14771 : }
14772 : #ifndef SED_HACKS
14773 : if ( bLocalUseExceptions ) {
14774 : CPLErr eclass = CPLGetLastErrorType();
14775 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14776 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14777 : }
14778 : }
14779 : #endif
14780 : }
14781 7 : {
14782 : /* %typemap(out) OGRErr */
14783 7 : if ( result != 0 && GetUseExceptions()) {
14784 0 : const char* pszMessage = CPLGetLastErrorMsg();
14785 0 : if( pszMessage[0] != '\0' )
14786 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14787 : else
14788 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14789 0 : SWIG_fail;
14790 : }
14791 : }
14792 7 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14793 7 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14794 7 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
14795 7 : {
14796 : /* %typemap(ret) OGRErr */
14797 7 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14798 7 : resultobj = PyInt_FromLong( result );
14799 : }
14800 : }
14801 7 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14802 : return resultobj;
14803 0 : fail:
14804 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14805 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14806 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
14807 : return NULL;
14808 : }
14809 :
14810 :
14811 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromMICoordSys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14812 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14813 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14814 3 : char *arg2 = (char *) 0 ;
14815 3 : void *argp1 = 0 ;
14816 3 : int res1 = 0 ;
14817 3 : int res2 ;
14818 3 : char *buf2 = 0 ;
14819 3 : int alloc2 = 0 ;
14820 3 : PyObject *swig_obj[2] ;
14821 3 : OGRErr result;
14822 :
14823 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromMICoordSys", 2, 2, swig_obj)) SWIG_fail;
14824 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14825 3 : if (!SWIG_IsOK(res1)) {
14826 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromMICoordSys" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14827 : }
14828 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14829 3 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14830 3 : if (!SWIG_IsOK(res2)) {
14831 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromMICoordSys" "', argument " "2"" of type '" "char const *""'");
14832 : }
14833 3 : arg2 = reinterpret_cast< char * >(buf2);
14834 3 : {
14835 3 : const int bLocalUseExceptions = GetUseExceptions();
14836 3 : if ( bLocalUseExceptions ) {
14837 2 : pushErrorHandler();
14838 : }
14839 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromMICoordSys(arg1,(char const *)arg2);
14840 3 : if ( bLocalUseExceptions ) {
14841 2 : popErrorHandler();
14842 : }
14843 : #ifndef SED_HACKS
14844 : if ( bLocalUseExceptions ) {
14845 : CPLErr eclass = CPLGetLastErrorType();
14846 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14847 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14848 : }
14849 : }
14850 : #endif
14851 : }
14852 3 : {
14853 : /* %typemap(out) OGRErr */
14854 3 : if ( result != 0 && GetUseExceptions()) {
14855 0 : const char* pszMessage = CPLGetLastErrorMsg();
14856 0 : if( pszMessage[0] != '\0' )
14857 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14858 : else
14859 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14860 0 : SWIG_fail;
14861 : }
14862 : }
14863 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14864 3 : {
14865 : /* %typemap(ret) OGRErr */
14866 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14867 3 : resultobj = PyInt_FromLong( result );
14868 : }
14869 : }
14870 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14871 : return resultobj;
14872 0 : fail:
14873 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14874 : return NULL;
14875 : }
14876 :
14877 :
14878 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromOzi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14879 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14880 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14881 3 : char **arg2 = (char **) 0 ;
14882 3 : void *argp1 = 0 ;
14883 3 : int res1 = 0 ;
14884 3 : PyObject *swig_obj[2] ;
14885 3 : OGRErr result;
14886 :
14887 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromOzi", 2, 2, swig_obj)) SWIG_fail;
14888 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14889 3 : if (!SWIG_IsOK(res1)) {
14890 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromOzi" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14891 : }
14892 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14893 3 : {
14894 : /* %typemap(in) char **dict */
14895 3 : arg2 = NULL;
14896 3 : if ( PySequence_Check( swig_obj[1] ) ) {
14897 3 : int bErr = FALSE;
14898 3 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
14899 3 : if ( bErr )
14900 : {
14901 0 : SWIG_fail;
14902 : }
14903 : }
14904 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
14905 0 : int bErr = FALSE;
14906 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
14907 0 : if ( bErr )
14908 : {
14909 0 : SWIG_fail;
14910 : }
14911 : }
14912 : else {
14913 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
14914 0 : SWIG_fail;
14915 : }
14916 : }
14917 3 : {
14918 3 : if (!arg2) {
14919 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14920 : }
14921 : }
14922 3 : {
14923 3 : const int bLocalUseExceptions = GetUseExceptions();
14924 3 : if ( bLocalUseExceptions ) {
14925 3 : pushErrorHandler();
14926 : }
14927 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromOzi(arg1,(char const *const *)arg2);
14928 3 : if ( bLocalUseExceptions ) {
14929 3 : popErrorHandler();
14930 : }
14931 : #ifndef SED_HACKS
14932 : if ( bLocalUseExceptions ) {
14933 : CPLErr eclass = CPLGetLastErrorType();
14934 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14935 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14936 : }
14937 : }
14938 : #endif
14939 : }
14940 3 : {
14941 : /* %typemap(out) OGRErr */
14942 3 : if ( result != 0 && GetUseExceptions()) {
14943 0 : const char* pszMessage = CPLGetLastErrorMsg();
14944 0 : if( pszMessage[0] != '\0' )
14945 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14946 : else
14947 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14948 0 : SWIG_fail;
14949 : }
14950 : }
14951 3 : {
14952 : /* %typemap(freearg) char **dict */
14953 3 : CSLDestroy( arg2 );
14954 : }
14955 3 : {
14956 : /* %typemap(ret) OGRErr */
14957 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14958 3 : resultobj = PyInt_FromLong( result );
14959 : }
14960 : }
14961 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14962 : return resultobj;
14963 0 : fail:
14964 0 : {
14965 : /* %typemap(freearg) char **dict */
14966 0 : CSLDestroy( arg2 );
14967 : }
14968 : return NULL;
14969 : }
14970 :
14971 :
14972 4 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromCF1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14973 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14974 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14975 4 : char **arg2 = (char **) 0 ;
14976 4 : char *arg3 = (char *) NULL ;
14977 4 : void *argp1 = 0 ;
14978 4 : int res1 = 0 ;
14979 4 : int res3 ;
14980 4 : char *buf3 = 0 ;
14981 4 : int alloc3 = 0 ;
14982 4 : PyObject *swig_obj[3] ;
14983 4 : OGRErr result;
14984 :
14985 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromCF1", 2, 3, swig_obj)) SWIG_fail;
14986 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14987 4 : if (!SWIG_IsOK(res1)) {
14988 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromCF1" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14989 : }
14990 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14991 4 : {
14992 : /* %typemap(in) char **dict */
14993 4 : arg2 = NULL;
14994 4 : if ( PySequence_Check( swig_obj[1] ) ) {
14995 0 : int bErr = FALSE;
14996 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
14997 0 : if ( bErr )
14998 : {
14999 0 : SWIG_fail;
15000 : }
15001 : }
15002 4 : else if ( PyMapping_Check( swig_obj[1] ) ) {
15003 4 : int bErr = FALSE;
15004 4 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
15005 4 : if ( bErr )
15006 : {
15007 0 : SWIG_fail;
15008 : }
15009 : }
15010 : else {
15011 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15012 0 : SWIG_fail;
15013 : }
15014 : }
15015 4 : if (swig_obj[2]) {
15016 4 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
15017 4 : if (!SWIG_IsOK(res3)) {
15018 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromCF1" "', argument " "3"" of type '" "char const *""'");
15019 : }
15020 4 : arg3 = reinterpret_cast< char * >(buf3);
15021 : }
15022 4 : {
15023 4 : const int bLocalUseExceptions = GetUseExceptions();
15024 4 : if ( bLocalUseExceptions ) {
15025 4 : pushErrorHandler();
15026 : }
15027 4 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromCF1(arg1,arg2,(char const *)arg3);
15028 4 : if ( bLocalUseExceptions ) {
15029 4 : popErrorHandler();
15030 : }
15031 : #ifndef SED_HACKS
15032 : if ( bLocalUseExceptions ) {
15033 : CPLErr eclass = CPLGetLastErrorType();
15034 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15035 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15036 : }
15037 : }
15038 : #endif
15039 : }
15040 4 : {
15041 : /* %typemap(out) OGRErr */
15042 4 : if ( result != 0 && GetUseExceptions()) {
15043 0 : const char* pszMessage = CPLGetLastErrorMsg();
15044 0 : if( pszMessage[0] != '\0' )
15045 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15046 : else
15047 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15048 0 : SWIG_fail;
15049 : }
15050 : }
15051 4 : {
15052 : /* %typemap(freearg) char **dict */
15053 4 : CSLDestroy( arg2 );
15054 : }
15055 4 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
15056 4 : {
15057 : /* %typemap(ret) OGRErr */
15058 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15059 4 : resultobj = PyInt_FromLong( result );
15060 : }
15061 : }
15062 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15063 : return resultobj;
15064 0 : fail:
15065 0 : {
15066 : /* %typemap(freearg) char **dict */
15067 0 : CSLDestroy( arg2 );
15068 : }
15069 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
15070 : return NULL;
15071 : }
15072 :
15073 :
15074 1300 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15075 1300 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15076 1300 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15077 1300 : char **arg2 = (char **) 0 ;
15078 1300 : char **arg3 = (char **) NULL ;
15079 1300 : void *argp1 = 0 ;
15080 1300 : int res1 = 0 ;
15081 1300 : char *argout2 = 0 ;
15082 1300 : PyObject *swig_obj[2] ;
15083 1300 : OGRErr result;
15084 :
15085 1300 : {
15086 : /* %typemap(in,numinputs=0) (char **argout2) */
15087 1300 : arg2 = &argout2;
15088 : }
15089 1300 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToWkt", 1, 2, swig_obj)) SWIG_fail;
15090 1300 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15091 1300 : if (!SWIG_IsOK(res1)) {
15092 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15093 : }
15094 1300 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15095 1300 : if (swig_obj[1]) {
15096 28 : {
15097 : /* %typemap(in) char **dict */
15098 28 : arg3 = NULL;
15099 28 : if ( PySequence_Check( swig_obj[1] ) ) {
15100 28 : int bErr = FALSE;
15101 28 : arg3 = CSLFromPySequence(swig_obj[1], &bErr);
15102 28 : if ( bErr )
15103 : {
15104 0 : SWIG_fail;
15105 : }
15106 : }
15107 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
15108 0 : int bErr = FALSE;
15109 0 : arg3 = CSLFromPyMapping(swig_obj[1], &bErr);
15110 0 : if ( bErr )
15111 : {
15112 0 : SWIG_fail;
15113 : }
15114 : }
15115 : else {
15116 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15117 0 : SWIG_fail;
15118 : }
15119 : }
15120 : }
15121 1300 : {
15122 1300 : const int bLocalUseExceptions = GetUseExceptions();
15123 1300 : if ( bLocalUseExceptions ) {
15124 987 : pushErrorHandler();
15125 : }
15126 1300 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToWkt(arg1,arg2,arg3);
15127 1300 : if ( bLocalUseExceptions ) {
15128 987 : popErrorHandler();
15129 : }
15130 : #ifndef SED_HACKS
15131 : if ( bLocalUseExceptions ) {
15132 : CPLErr eclass = CPLGetLastErrorType();
15133 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15134 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15135 : }
15136 : }
15137 : #endif
15138 : }
15139 1300 : {
15140 : /* %typemap(out) OGRErr */
15141 1300 : if ( result != 0 && GetUseExceptions()) {
15142 0 : const char* pszMessage = CPLGetLastErrorMsg();
15143 0 : if( pszMessage[0] != '\0' )
15144 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15145 : else
15146 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15147 0 : SWIG_fail;
15148 : }
15149 : }
15150 1300 : {
15151 : /* %typemap(argout) (char **argout) */
15152 1300 : PyObject *o;
15153 1300 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15154 1300 : o = GDALPythonObjectFromCStr( *arg2 );
15155 : }
15156 : else {
15157 0 : o = Py_None;
15158 0 : Py_INCREF( o );
15159 : }
15160 : #if SWIG_VERSION >= 0x040300
15161 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15162 : #else
15163 1300 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15164 : #endif
15165 : }
15166 1300 : {
15167 : /* %typemap(freearg) (char **argout) */
15168 1300 : if ( *arg2 )
15169 1300 : CPLFree( *arg2 );
15170 : }
15171 1300 : {
15172 : /* %typemap(freearg) char **dict */
15173 1300 : CSLDestroy( arg3 );
15174 : }
15175 1300 : {
15176 : /* %typemap(ret) OGRErr */
15177 2600 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15178 0 : resultobj = PyInt_FromLong( result );
15179 : }
15180 : }
15181 1300 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15182 : return resultobj;
15183 0 : fail:
15184 0 : {
15185 : /* %typemap(freearg) (char **argout) */
15186 0 : if ( *arg2 )
15187 0 : CPLFree( *arg2 );
15188 : }
15189 0 : {
15190 : /* %typemap(freearg) char **dict */
15191 0 : CSLDestroy( arg3 );
15192 : }
15193 : return NULL;
15194 : }
15195 :
15196 :
15197 50 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPrettyWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15198 50 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15199 50 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15200 50 : char **arg2 = (char **) 0 ;
15201 50 : int arg3 = (int) 0 ;
15202 50 : void *argp1 = 0 ;
15203 50 : int res1 = 0 ;
15204 50 : char *argout2 = 0 ;
15205 50 : int val3 ;
15206 50 : int ecode3 = 0 ;
15207 50 : PyObject *swig_obj[2] ;
15208 50 : OGRErr result;
15209 :
15210 50 : {
15211 : /* %typemap(in,numinputs=0) (char **argout2) */
15212 50 : arg2 = &argout2;
15213 : }
15214 50 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToPrettyWkt", 1, 2, swig_obj)) SWIG_fail;
15215 50 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15216 50 : if (!SWIG_IsOK(res1)) {
15217 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPrettyWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15218 : }
15219 50 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15220 50 : if (swig_obj[1]) {
15221 14 : ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
15222 14 : if (!SWIG_IsOK(ecode3)) {
15223 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_ExportToPrettyWkt" "', argument " "3"" of type '" "int""'");
15224 : }
15225 : arg3 = static_cast< int >(val3);
15226 : }
15227 50 : {
15228 50 : const int bLocalUseExceptions = GetUseExceptions();
15229 50 : if ( bLocalUseExceptions ) {
15230 21 : pushErrorHandler();
15231 : }
15232 50 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPrettyWkt(arg1,arg2,arg3);
15233 50 : if ( bLocalUseExceptions ) {
15234 21 : popErrorHandler();
15235 : }
15236 : #ifndef SED_HACKS
15237 : if ( bLocalUseExceptions ) {
15238 : CPLErr eclass = CPLGetLastErrorType();
15239 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15240 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15241 : }
15242 : }
15243 : #endif
15244 : }
15245 50 : {
15246 : /* %typemap(out) OGRErr */
15247 50 : if ( result != 0 && GetUseExceptions()) {
15248 0 : const char* pszMessage = CPLGetLastErrorMsg();
15249 0 : if( pszMessage[0] != '\0' )
15250 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15251 : else
15252 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15253 0 : SWIG_fail;
15254 : }
15255 : }
15256 50 : {
15257 : /* %typemap(argout) (char **argout) */
15258 50 : PyObject *o;
15259 50 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15260 50 : o = GDALPythonObjectFromCStr( *arg2 );
15261 : }
15262 : else {
15263 0 : o = Py_None;
15264 0 : Py_INCREF( o );
15265 : }
15266 : #if SWIG_VERSION >= 0x040300
15267 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15268 : #else
15269 50 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15270 : #endif
15271 : }
15272 50 : {
15273 : /* %typemap(freearg) (char **argout) */
15274 50 : if ( *arg2 )
15275 50 : CPLFree( *arg2 );
15276 : }
15277 50 : {
15278 : /* %typemap(ret) OGRErr */
15279 100 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15280 0 : resultobj = PyInt_FromLong( result );
15281 : }
15282 : }
15283 50 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15284 : return resultobj;
15285 0 : fail:
15286 0 : {
15287 : /* %typemap(freearg) (char **argout) */
15288 0 : if ( *arg2 )
15289 0 : CPLFree( *arg2 );
15290 : }
15291 : return NULL;
15292 : }
15293 :
15294 :
15295 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPROJJSON(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15296 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15297 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15298 2 : char **arg2 = (char **) 0 ;
15299 2 : char **arg3 = (char **) NULL ;
15300 2 : void *argp1 = 0 ;
15301 2 : int res1 = 0 ;
15302 2 : char *argout2 = 0 ;
15303 2 : PyObject *swig_obj[2] ;
15304 2 : OGRErr result;
15305 :
15306 2 : {
15307 : /* %typemap(in,numinputs=0) (char **argout2) */
15308 2 : arg2 = &argout2;
15309 : }
15310 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToPROJJSON", 1, 2, swig_obj)) SWIG_fail;
15311 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15312 2 : if (!SWIG_IsOK(res1)) {
15313 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPROJJSON" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15314 : }
15315 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15316 2 : if (swig_obj[1]) {
15317 0 : {
15318 : /* %typemap(in) char **dict */
15319 0 : arg3 = NULL;
15320 0 : if ( PySequence_Check( swig_obj[1] ) ) {
15321 0 : int bErr = FALSE;
15322 0 : arg3 = CSLFromPySequence(swig_obj[1], &bErr);
15323 0 : if ( bErr )
15324 : {
15325 0 : SWIG_fail;
15326 : }
15327 : }
15328 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
15329 0 : int bErr = FALSE;
15330 0 : arg3 = CSLFromPyMapping(swig_obj[1], &bErr);
15331 0 : if ( bErr )
15332 : {
15333 0 : SWIG_fail;
15334 : }
15335 : }
15336 : else {
15337 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15338 0 : SWIG_fail;
15339 : }
15340 : }
15341 : }
15342 2 : {
15343 2 : const int bLocalUseExceptions = GetUseExceptions();
15344 2 : if ( bLocalUseExceptions ) {
15345 2 : pushErrorHandler();
15346 : }
15347 2 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPROJJSON(arg1,arg2,arg3);
15348 2 : if ( bLocalUseExceptions ) {
15349 2 : popErrorHandler();
15350 : }
15351 : #ifndef SED_HACKS
15352 : if ( bLocalUseExceptions ) {
15353 : CPLErr eclass = CPLGetLastErrorType();
15354 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15355 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15356 : }
15357 : }
15358 : #endif
15359 : }
15360 2 : {
15361 : /* %typemap(out) OGRErr */
15362 2 : if ( result != 0 && GetUseExceptions()) {
15363 0 : const char* pszMessage = CPLGetLastErrorMsg();
15364 0 : if( pszMessage[0] != '\0' )
15365 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15366 : else
15367 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15368 0 : SWIG_fail;
15369 : }
15370 : }
15371 2 : {
15372 : /* %typemap(argout) (char **argout) */
15373 2 : PyObject *o;
15374 2 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15375 2 : o = GDALPythonObjectFromCStr( *arg2 );
15376 : }
15377 : else {
15378 0 : o = Py_None;
15379 0 : Py_INCREF( o );
15380 : }
15381 : #if SWIG_VERSION >= 0x040300
15382 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15383 : #else
15384 2 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15385 : #endif
15386 : }
15387 2 : {
15388 : /* %typemap(freearg) (char **argout) */
15389 2 : if ( *arg2 )
15390 2 : CPLFree( *arg2 );
15391 : }
15392 2 : {
15393 : /* %typemap(freearg) char **dict */
15394 2 : CSLDestroy( arg3 );
15395 : }
15396 2 : {
15397 : /* %typemap(ret) OGRErr */
15398 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15399 0 : resultobj = PyInt_FromLong( result );
15400 : }
15401 : }
15402 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15403 : return resultobj;
15404 0 : fail:
15405 0 : {
15406 : /* %typemap(freearg) (char **argout) */
15407 0 : if ( *arg2 )
15408 0 : CPLFree( *arg2 );
15409 : }
15410 0 : {
15411 : /* %typemap(freearg) char **dict */
15412 0 : CSLDestroy( arg3 );
15413 : }
15414 : return NULL;
15415 : }
15416 :
15417 :
15418 308 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToProj4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15419 308 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15420 308 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15421 308 : char **arg2 = (char **) 0 ;
15422 308 : void *argp1 = 0 ;
15423 308 : int res1 = 0 ;
15424 308 : char *argout2 = 0 ;
15425 308 : PyObject *swig_obj[1] ;
15426 308 : OGRErr result;
15427 :
15428 308 : {
15429 : /* %typemap(in,numinputs=0) (char **argout2) */
15430 308 : arg2 = &argout2;
15431 : }
15432 308 : if (!args) SWIG_fail;
15433 308 : swig_obj[0] = args;
15434 308 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15435 308 : if (!SWIG_IsOK(res1)) {
15436 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToProj4" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15437 : }
15438 308 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15439 308 : {
15440 308 : const int bLocalUseExceptions = GetUseExceptions();
15441 308 : if ( bLocalUseExceptions ) {
15442 195 : pushErrorHandler();
15443 : }
15444 308 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToProj4(arg1,arg2);
15445 308 : if ( bLocalUseExceptions ) {
15446 195 : popErrorHandler();
15447 : }
15448 : #ifndef SED_HACKS
15449 : if ( bLocalUseExceptions ) {
15450 : CPLErr eclass = CPLGetLastErrorType();
15451 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15452 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15453 : }
15454 : }
15455 : #endif
15456 : }
15457 308 : {
15458 : /* %typemap(out) OGRErr */
15459 312 : if ( result != 0 && GetUseExceptions()) {
15460 3 : const char* pszMessage = CPLGetLastErrorMsg();
15461 3 : if( pszMessage[0] != '\0' )
15462 3 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15463 : else
15464 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15465 3 : SWIG_fail;
15466 : }
15467 : }
15468 305 : {
15469 : /* %typemap(argout) (char **argout) */
15470 305 : PyObject *o;
15471 305 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15472 305 : o = GDALPythonObjectFromCStr( *arg2 );
15473 : }
15474 : else {
15475 0 : o = Py_None;
15476 0 : Py_INCREF( o );
15477 : }
15478 : #if SWIG_VERSION >= 0x040300
15479 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15480 : #else
15481 305 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15482 : #endif
15483 : }
15484 305 : {
15485 : /* %typemap(freearg) (char **argout) */
15486 305 : if ( *arg2 )
15487 305 : CPLFree( *arg2 );
15488 : }
15489 305 : {
15490 : /* %typemap(ret) OGRErr */
15491 610 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15492 0 : resultobj = PyInt_FromLong( result );
15493 : }
15494 : }
15495 308 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15496 : return resultobj;
15497 3 : fail:
15498 3 : {
15499 : /* %typemap(freearg) (char **argout) */
15500 3 : if ( *arg2 )
15501 3 : CPLFree( *arg2 );
15502 : }
15503 : return NULL;
15504 : }
15505 :
15506 :
15507 6 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPCI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15508 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15509 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15510 6 : char **arg2 = (char **) 0 ;
15511 6 : char **arg3 = (char **) 0 ;
15512 6 : double **arg4 ;
15513 6 : void *argp1 = 0 ;
15514 6 : int res1 = 0 ;
15515 6 : char *argout2 = 0 ;
15516 6 : char *argout3 = 0 ;
15517 6 : double *argout4 ;
15518 6 : PyObject *swig_obj[1] ;
15519 6 : OGRErr result;
15520 :
15521 6 : {
15522 : /* %typemap(in,numinputs=0) (char **argout2) */
15523 6 : arg2 = &argout2;
15524 : }
15525 6 : {
15526 : /* %typemap(in,numinputs=0) (char **argout3) */
15527 6 : arg3 = &argout3;
15528 : }
15529 6 : {
15530 : /* %typemap(in,numinputs=0) (double *argout4[ANY]) */
15531 6 : argout4 = NULL;
15532 6 : arg4 = &argout4;
15533 : }
15534 6 : if (!args) SWIG_fail;
15535 6 : swig_obj[0] = args;
15536 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15537 6 : if (!SWIG_IsOK(res1)) {
15538 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPCI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15539 : }
15540 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15541 6 : {
15542 6 : const int bLocalUseExceptions = GetUseExceptions();
15543 6 : if ( bLocalUseExceptions ) {
15544 6 : pushErrorHandler();
15545 : }
15546 6 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPCI(arg1,arg2,arg3,arg4);
15547 6 : if ( bLocalUseExceptions ) {
15548 6 : popErrorHandler();
15549 : }
15550 : #ifndef SED_HACKS
15551 : if ( bLocalUseExceptions ) {
15552 : CPLErr eclass = CPLGetLastErrorType();
15553 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15554 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15555 : }
15556 : }
15557 : #endif
15558 : }
15559 6 : {
15560 : /* %typemap(out) OGRErr */
15561 6 : if ( result != 0 && GetUseExceptions()) {
15562 0 : const char* pszMessage = CPLGetLastErrorMsg();
15563 0 : if( pszMessage[0] != '\0' )
15564 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15565 : else
15566 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15567 0 : SWIG_fail;
15568 : }
15569 : }
15570 6 : {
15571 : /* %typemap(argout) (char **argout) */
15572 6 : PyObject *o;
15573 6 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15574 6 : o = GDALPythonObjectFromCStr( *arg2 );
15575 : }
15576 : else {
15577 0 : o = Py_None;
15578 0 : Py_INCREF( o );
15579 : }
15580 : #if SWIG_VERSION >= 0x040300
15581 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15582 : #else
15583 6 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15584 : #endif
15585 : }
15586 6 : {
15587 : /* %typemap(argout) (char **argout) */
15588 6 : PyObject *o;
15589 6 : if ( ReturnSame(arg3) != NULL && *arg3 != NULL ) {
15590 6 : o = GDALPythonObjectFromCStr( *arg3 );
15591 : }
15592 : else {
15593 0 : o = Py_None;
15594 0 : Py_INCREF( o );
15595 : }
15596 : #if SWIG_VERSION >= 0x040300
15597 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15598 : #else
15599 6 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15600 : #endif
15601 : }
15602 6 : {
15603 : /* %typemap(argout) (double *argout[ANY]) */
15604 6 : PyObject *out = CreateTupleFromDoubleArray( *arg4, 17 );
15605 : #if SWIG_VERSION >= 0x040300
15606 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
15607 : #else
15608 6 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
15609 : #endif
15610 : }
15611 6 : {
15612 : /* %typemap(freearg) (char **argout) */
15613 6 : if ( *arg2 )
15614 6 : CPLFree( *arg2 );
15615 : }
15616 6 : {
15617 : /* %typemap(freearg) (char **argout) */
15618 6 : if ( *arg3 )
15619 6 : CPLFree( *arg3 );
15620 : }
15621 6 : {
15622 : /* %typemap(freearg) (double *argout[ANY]) */
15623 6 : CPLFree(*arg4);
15624 : }
15625 6 : {
15626 : /* %typemap(ret) OGRErr */
15627 12 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15628 0 : resultobj = PyInt_FromLong( result );
15629 : }
15630 : }
15631 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15632 : return resultobj;
15633 0 : fail:
15634 0 : {
15635 : /* %typemap(freearg) (char **argout) */
15636 0 : if ( *arg2 )
15637 0 : CPLFree( *arg2 );
15638 : }
15639 0 : {
15640 : /* %typemap(freearg) (char **argout) */
15641 0 : if ( *arg3 )
15642 0 : CPLFree( *arg3 );
15643 : }
15644 0 : {
15645 : /* %typemap(freearg) (double *argout[ANY]) */
15646 0 : CPLFree(*arg4);
15647 : }
15648 : return NULL;
15649 : }
15650 :
15651 :
15652 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToUSGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15653 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15654 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15655 2 : long *arg2 = (long *) 0 ;
15656 2 : long *arg3 = (long *) 0 ;
15657 2 : double **arg4 ;
15658 2 : long *arg5 = (long *) 0 ;
15659 2 : void *argp1 = 0 ;
15660 2 : int res1 = 0 ;
15661 2 : long temp2 ;
15662 2 : int res2 = SWIG_TMPOBJ ;
15663 2 : long temp3 ;
15664 2 : int res3 = SWIG_TMPOBJ ;
15665 2 : double *argout4 ;
15666 2 : long temp5 ;
15667 2 : int res5 = SWIG_TMPOBJ ;
15668 2 : PyObject *swig_obj[1] ;
15669 2 : OGRErr result;
15670 :
15671 2 : arg2 = &temp2;
15672 2 : arg3 = &temp3;
15673 2 : {
15674 : /* %typemap(in,numinputs=0) (double *argout4[ANY]) */
15675 2 : argout4 = NULL;
15676 2 : arg4 = &argout4;
15677 : }
15678 2 : arg5 = &temp5;
15679 2 : if (!args) SWIG_fail;
15680 2 : swig_obj[0] = args;
15681 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15682 2 : if (!SWIG_IsOK(res1)) {
15683 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToUSGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15684 : }
15685 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15686 2 : {
15687 2 : const int bLocalUseExceptions = GetUseExceptions();
15688 2 : if ( bLocalUseExceptions ) {
15689 2 : pushErrorHandler();
15690 : }
15691 2 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToUSGS(arg1,arg2,arg3,arg4,arg5);
15692 2 : if ( bLocalUseExceptions ) {
15693 2 : popErrorHandler();
15694 : }
15695 : #ifndef SED_HACKS
15696 : if ( bLocalUseExceptions ) {
15697 : CPLErr eclass = CPLGetLastErrorType();
15698 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15699 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15700 : }
15701 : }
15702 : #endif
15703 : }
15704 2 : {
15705 : /* %typemap(out) OGRErr */
15706 2 : if ( result != 0 && GetUseExceptions()) {
15707 0 : const char* pszMessage = CPLGetLastErrorMsg();
15708 0 : if( pszMessage[0] != '\0' )
15709 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15710 : else
15711 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15712 0 : SWIG_fail;
15713 : }
15714 : }
15715 2 : if (ReturnSame(SWIG_IsTmpObj(res2))) {
15716 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg2)));
15717 : } else {
15718 0 : int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
15719 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_long, new_flags));
15720 : }
15721 2 : if (ReturnSame(SWIG_IsTmpObj(res3))) {
15722 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg3)));
15723 : } else {
15724 0 : int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
15725 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_long, new_flags));
15726 : }
15727 2 : {
15728 : /* %typemap(argout) (double *argout[ANY]) */
15729 2 : PyObject *out = CreateTupleFromDoubleArray( *arg4, 15 );
15730 : #if SWIG_VERSION >= 0x040300
15731 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
15732 : #else
15733 2 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
15734 : #endif
15735 : }
15736 2 : if (ReturnSame(SWIG_IsTmpObj(res5))) {
15737 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg5)));
15738 : } else {
15739 0 : int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
15740 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_long, new_flags));
15741 : }
15742 2 : {
15743 : /* %typemap(freearg) (double *argout[ANY]) */
15744 2 : CPLFree(*arg4);
15745 : }
15746 2 : {
15747 : /* %typemap(ret) OGRErr */
15748 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15749 0 : resultobj = PyInt_FromLong( result );
15750 : }
15751 : }
15752 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15753 : return resultobj;
15754 0 : fail:
15755 0 : {
15756 : /* %typemap(freearg) (double *argout[ANY]) */
15757 0 : CPLFree(*arg4);
15758 : }
15759 : return NULL;
15760 : }
15761 :
15762 :
15763 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToERM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15764 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15765 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15766 1 : char **arg2 = (char **) 0 ;
15767 1 : char **arg3 = (char **) 0 ;
15768 1 : char **arg4 = (char **) 0 ;
15769 1 : void *argp1 = 0 ;
15770 1 : int res1 = 0 ;
15771 1 : char *argout2 = 0 ;
15772 1 : char *argout3 = 0 ;
15773 1 : char *argout4 = 0 ;
15774 1 : PyObject *swig_obj[1] ;
15775 1 : OGRErr result;
15776 :
15777 1 : {
15778 : /* %typemap(in,numinputs=0) (char **argout2) */
15779 1 : arg2 = &argout2;
15780 : }
15781 1 : {
15782 : /* %typemap(in,numinputs=0) (char **argout3) */
15783 1 : arg3 = &argout3;
15784 : }
15785 1 : {
15786 : /* %typemap(in,numinputs=0) (char **argout4) */
15787 1 : arg4 = &argout4;
15788 : }
15789 1 : if (!args) SWIG_fail;
15790 1 : swig_obj[0] = args;
15791 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15792 1 : if (!SWIG_IsOK(res1)) {
15793 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToERM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15794 : }
15795 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15796 1 : {
15797 1 : const int bLocalUseExceptions = GetUseExceptions();
15798 1 : if ( bLocalUseExceptions ) {
15799 1 : pushErrorHandler();
15800 : }
15801 1 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToERM(arg1,arg2,arg3,arg4);
15802 1 : if ( bLocalUseExceptions ) {
15803 1 : popErrorHandler();
15804 : }
15805 : #ifndef SED_HACKS
15806 : if ( bLocalUseExceptions ) {
15807 : CPLErr eclass = CPLGetLastErrorType();
15808 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15809 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15810 : }
15811 : }
15812 : #endif
15813 : }
15814 1 : {
15815 : /* %typemap(out) OGRErr */
15816 1 : if ( result != 0 && GetUseExceptions()) {
15817 0 : const char* pszMessage = CPLGetLastErrorMsg();
15818 0 : if( pszMessage[0] != '\0' )
15819 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15820 : else
15821 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15822 0 : SWIG_fail;
15823 : }
15824 : }
15825 1 : {
15826 : /* %typemap(argout) (char **argout) */
15827 1 : PyObject *o;
15828 1 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15829 1 : o = GDALPythonObjectFromCStr( *arg2 );
15830 : }
15831 : else {
15832 0 : o = Py_None;
15833 0 : Py_INCREF( o );
15834 : }
15835 : #if SWIG_VERSION >= 0x040300
15836 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15837 : #else
15838 1 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15839 : #endif
15840 : }
15841 1 : {
15842 : /* %typemap(argout) (char **argout) */
15843 1 : PyObject *o;
15844 1 : if ( ReturnSame(arg3) != NULL && *arg3 != NULL ) {
15845 1 : o = GDALPythonObjectFromCStr( *arg3 );
15846 : }
15847 : else {
15848 0 : o = Py_None;
15849 0 : Py_INCREF( o );
15850 : }
15851 : #if SWIG_VERSION >= 0x040300
15852 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15853 : #else
15854 1 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15855 : #endif
15856 : }
15857 1 : {
15858 : /* %typemap(argout) (char **argout) */
15859 1 : PyObject *o;
15860 1 : if ( ReturnSame(arg4) != NULL && *arg4 != NULL ) {
15861 1 : o = GDALPythonObjectFromCStr( *arg4 );
15862 : }
15863 : else {
15864 0 : o = Py_None;
15865 0 : Py_INCREF( o );
15866 : }
15867 : #if SWIG_VERSION >= 0x040300
15868 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15869 : #else
15870 1 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15871 : #endif
15872 : }
15873 1 : {
15874 : /* %typemap(freearg) (char **argout) */
15875 1 : if ( *arg2 )
15876 1 : CPLFree( *arg2 );
15877 : }
15878 1 : {
15879 : /* %typemap(freearg) (char **argout) */
15880 1 : if ( *arg3 )
15881 1 : CPLFree( *arg3 );
15882 : }
15883 1 : {
15884 : /* %typemap(freearg) (char **argout) */
15885 1 : if ( *arg4 )
15886 1 : CPLFree( *arg4 );
15887 : }
15888 1 : {
15889 : /* %typemap(ret) OGRErr */
15890 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15891 0 : resultobj = PyInt_FromLong( result );
15892 : }
15893 : }
15894 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15895 : return resultobj;
15896 0 : fail:
15897 0 : {
15898 : /* %typemap(freearg) (char **argout) */
15899 0 : if ( *arg2 )
15900 0 : CPLFree( *arg2 );
15901 : }
15902 0 : {
15903 : /* %typemap(freearg) (char **argout) */
15904 0 : if ( *arg3 )
15905 0 : CPLFree( *arg3 );
15906 : }
15907 0 : {
15908 : /* %typemap(freearg) (char **argout) */
15909 0 : if ( *arg4 )
15910 0 : CPLFree( *arg4 );
15911 : }
15912 : return NULL;
15913 : }
15914 :
15915 :
15916 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToXML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15917 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15918 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15919 2 : char **arg2 = (char **) 0 ;
15920 2 : char *arg3 = (char *) "" ;
15921 2 : void *argp1 = 0 ;
15922 2 : int res1 = 0 ;
15923 2 : char *argout2 = 0 ;
15924 2 : int res3 ;
15925 2 : char *buf3 = 0 ;
15926 2 : int alloc3 = 0 ;
15927 2 : PyObject *swig_obj[2] ;
15928 2 : OGRErr result;
15929 :
15930 2 : {
15931 : /* %typemap(in,numinputs=0) (char **argout2) */
15932 2 : arg2 = &argout2;
15933 : }
15934 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToXML", 1, 2, swig_obj)) SWIG_fail;
15935 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15936 2 : if (!SWIG_IsOK(res1)) {
15937 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToXML" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15938 : }
15939 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15940 2 : if (swig_obj[1]) {
15941 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf3, NULL, &alloc3);
15942 0 : if (!SWIG_IsOK(res3)) {
15943 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ExportToXML" "', argument " "3"" of type '" "char const *""'");
15944 : }
15945 0 : arg3 = reinterpret_cast< char * >(buf3);
15946 : }
15947 2 : {
15948 2 : const int bLocalUseExceptions = GetUseExceptions();
15949 2 : if ( bLocalUseExceptions ) {
15950 2 : pushErrorHandler();
15951 : }
15952 2 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToXML(arg1,arg2,(char const *)arg3);
15953 2 : if ( bLocalUseExceptions ) {
15954 2 : popErrorHandler();
15955 : }
15956 : #ifndef SED_HACKS
15957 : if ( bLocalUseExceptions ) {
15958 : CPLErr eclass = CPLGetLastErrorType();
15959 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15960 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15961 : }
15962 : }
15963 : #endif
15964 : }
15965 2 : {
15966 : /* %typemap(out) OGRErr */
15967 3 : if ( result != 0 && GetUseExceptions()) {
15968 1 : const char* pszMessage = CPLGetLastErrorMsg();
15969 1 : if( pszMessage[0] != '\0' )
15970 1 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15971 : else
15972 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15973 1 : SWIG_fail;
15974 : }
15975 : }
15976 1 : {
15977 : /* %typemap(argout) (char **argout) */
15978 1 : PyObject *o;
15979 1 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15980 1 : o = GDALPythonObjectFromCStr( *arg2 );
15981 : }
15982 : else {
15983 0 : o = Py_None;
15984 0 : Py_INCREF( o );
15985 : }
15986 : #if SWIG_VERSION >= 0x040300
15987 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15988 : #else
15989 1 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15990 : #endif
15991 : }
15992 1 : {
15993 : /* %typemap(freearg) (char **argout) */
15994 1 : if ( *arg2 )
15995 1 : CPLFree( *arg2 );
15996 : }
15997 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
15998 1 : {
15999 : /* %typemap(ret) OGRErr */
16000 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16001 0 : resultobj = PyInt_FromLong( result );
16002 : }
16003 : }
16004 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16005 : return resultobj;
16006 1 : fail:
16007 1 : {
16008 : /* %typemap(freearg) (char **argout) */
16009 1 : if ( *arg2 )
16010 0 : CPLFree( *arg2 );
16011 : }
16012 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
16013 : return NULL;
16014 : }
16015 :
16016 :
16017 5 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToMICoordSys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16018 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16019 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16020 5 : char **arg2 = (char **) 0 ;
16021 5 : void *argp1 = 0 ;
16022 5 : int res1 = 0 ;
16023 5 : char *argout2 = 0 ;
16024 5 : PyObject *swig_obj[1] ;
16025 5 : OGRErr result;
16026 :
16027 5 : {
16028 : /* %typemap(in,numinputs=0) (char **argout2) */
16029 5 : arg2 = &argout2;
16030 : }
16031 5 : if (!args) SWIG_fail;
16032 5 : swig_obj[0] = args;
16033 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16034 5 : if (!SWIG_IsOK(res1)) {
16035 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToMICoordSys" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16036 : }
16037 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16038 5 : {
16039 5 : const int bLocalUseExceptions = GetUseExceptions();
16040 5 : if ( bLocalUseExceptions ) {
16041 3 : pushErrorHandler();
16042 : }
16043 5 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToMICoordSys(arg1,arg2);
16044 5 : if ( bLocalUseExceptions ) {
16045 3 : popErrorHandler();
16046 : }
16047 : #ifndef SED_HACKS
16048 : if ( bLocalUseExceptions ) {
16049 : CPLErr eclass = CPLGetLastErrorType();
16050 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16051 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16052 : }
16053 : }
16054 : #endif
16055 : }
16056 5 : {
16057 : /* %typemap(out) OGRErr */
16058 5 : if ( result != 0 && GetUseExceptions()) {
16059 0 : const char* pszMessage = CPLGetLastErrorMsg();
16060 0 : if( pszMessage[0] != '\0' )
16061 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16062 : else
16063 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16064 0 : SWIG_fail;
16065 : }
16066 : }
16067 5 : {
16068 : /* %typemap(argout) (char **argout) */
16069 5 : PyObject *o;
16070 5 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
16071 5 : o = GDALPythonObjectFromCStr( *arg2 );
16072 : }
16073 : else {
16074 0 : o = Py_None;
16075 0 : Py_INCREF( o );
16076 : }
16077 : #if SWIG_VERSION >= 0x040300
16078 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
16079 : #else
16080 5 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
16081 : #endif
16082 : }
16083 5 : {
16084 : /* %typemap(freearg) (char **argout) */
16085 5 : if ( *arg2 )
16086 5 : CPLFree( *arg2 );
16087 : }
16088 5 : {
16089 : /* %typemap(ret) OGRErr */
16090 10 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16091 0 : resultobj = PyInt_FromLong( result );
16092 : }
16093 : }
16094 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16095 : return resultobj;
16096 0 : fail:
16097 0 : {
16098 : /* %typemap(freearg) (char **argout) */
16099 0 : if ( *arg2 )
16100 0 : CPLFree( *arg2 );
16101 : }
16102 : return NULL;
16103 : }
16104 :
16105 :
16106 4 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToCF1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16107 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16108 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16109 4 : char **arg2 = (char **) NULL ;
16110 4 : void *argp1 = 0 ;
16111 4 : int res1 = 0 ;
16112 4 : PyObject *swig_obj[2] ;
16113 4 : char **result = 0 ;
16114 :
16115 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToCF1", 1, 2, swig_obj)) SWIG_fail;
16116 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16117 4 : if (!SWIG_IsOK(res1)) {
16118 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToCF1" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16119 : }
16120 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16121 4 : if (swig_obj[1]) {
16122 4 : {
16123 : /* %typemap(in) char **dict */
16124 4 : arg2 = NULL;
16125 4 : if ( PySequence_Check( swig_obj[1] ) ) {
16126 0 : int bErr = FALSE;
16127 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
16128 0 : if ( bErr )
16129 : {
16130 0 : SWIG_fail;
16131 : }
16132 : }
16133 4 : else if ( PyMapping_Check( swig_obj[1] ) ) {
16134 4 : int bErr = FALSE;
16135 4 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
16136 4 : if ( bErr )
16137 : {
16138 0 : SWIG_fail;
16139 : }
16140 : }
16141 : else {
16142 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
16143 0 : SWIG_fail;
16144 : }
16145 : }
16146 : }
16147 4 : {
16148 4 : const int bLocalUseExceptions = GetUseExceptions();
16149 4 : if ( bLocalUseExceptions ) {
16150 4 : pushErrorHandler();
16151 : }
16152 4 : result = (char **)OSRSpatialReferenceShadow_ExportToCF1(arg1,arg2);
16153 4 : if ( bLocalUseExceptions ) {
16154 4 : popErrorHandler();
16155 : }
16156 : #ifndef SED_HACKS
16157 : if ( bLocalUseExceptions ) {
16158 : CPLErr eclass = CPLGetLastErrorType();
16159 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16160 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16161 : }
16162 : }
16163 : #endif
16164 : }
16165 4 : {
16166 : /* %typemap(out) char **dict */
16167 4 : resultobj = GetCSLStringAsPyDict(result, true);
16168 : }
16169 4 : {
16170 : /* %typemap(freearg) char **dict */
16171 4 : CSLDestroy( arg2 );
16172 : }
16173 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16174 : return resultobj;
16175 0 : fail:
16176 0 : {
16177 : /* %typemap(freearg) char **dict */
16178 0 : CSLDestroy( arg2 );
16179 : }
16180 : return NULL;
16181 : }
16182 :
16183 :
16184 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToCF1Units(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16185 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16186 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16187 1 : char **arg2 = (char **) NULL ;
16188 1 : void *argp1 = 0 ;
16189 1 : int res1 = 0 ;
16190 1 : PyObject *swig_obj[2] ;
16191 1 : retStringAndCPLFree *result = 0 ;
16192 :
16193 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToCF1Units", 1, 2, swig_obj)) SWIG_fail;
16194 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16195 1 : if (!SWIG_IsOK(res1)) {
16196 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToCF1Units" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16197 : }
16198 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16199 1 : if (swig_obj[1]) {
16200 0 : {
16201 : /* %typemap(in) char **dict */
16202 0 : arg2 = NULL;
16203 0 : if ( PySequence_Check( swig_obj[1] ) ) {
16204 0 : int bErr = FALSE;
16205 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
16206 0 : if ( bErr )
16207 : {
16208 0 : SWIG_fail;
16209 : }
16210 : }
16211 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
16212 0 : int bErr = FALSE;
16213 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
16214 0 : if ( bErr )
16215 : {
16216 0 : SWIG_fail;
16217 : }
16218 : }
16219 : else {
16220 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
16221 0 : SWIG_fail;
16222 : }
16223 : }
16224 : }
16225 1 : {
16226 1 : const int bLocalUseExceptions = GetUseExceptions();
16227 1 : if ( bLocalUseExceptions ) {
16228 1 : pushErrorHandler();
16229 : }
16230 1 : result = (retStringAndCPLFree *)OSRSpatialReferenceShadow_ExportToCF1Units(arg1,arg2);
16231 1 : if ( bLocalUseExceptions ) {
16232 1 : popErrorHandler();
16233 : }
16234 : #ifndef SED_HACKS
16235 : if ( bLocalUseExceptions ) {
16236 : CPLErr eclass = CPLGetLastErrorType();
16237 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16238 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16239 : }
16240 : }
16241 : #endif
16242 : }
16243 1 : {
16244 : /* %typemap(out) (retStringAndCPLFree*) */
16245 1 : Py_XDECREF(resultobj);
16246 1 : if(result)
16247 : {
16248 1 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
16249 1 : CPLFree(result);
16250 : }
16251 : else
16252 : {
16253 0 : resultobj = Py_None;
16254 0 : Py_INCREF(resultobj);
16255 : }
16256 : }
16257 1 : {
16258 : /* %typemap(freearg) char **dict */
16259 1 : CSLDestroy( arg2 );
16260 : }
16261 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16262 : return resultobj;
16263 0 : fail:
16264 0 : {
16265 : /* %typemap(freearg) char **dict */
16266 0 : CSLDestroy( arg2 );
16267 : }
16268 : return NULL;
16269 : }
16270 :
16271 :
16272 16 : SWIGINTERN PyObject *_wrap_SpatialReference_CloneGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16273 16 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16274 16 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16275 16 : void *argp1 = 0 ;
16276 16 : int res1 = 0 ;
16277 16 : PyObject *swig_obj[1] ;
16278 16 : OSRSpatialReferenceShadow *result = 0 ;
16279 :
16280 16 : if (!args) SWIG_fail;
16281 16 : swig_obj[0] = args;
16282 16 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16283 16 : if (!SWIG_IsOK(res1)) {
16284 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_CloneGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16285 : }
16286 16 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16287 16 : {
16288 16 : const int bLocalUseExceptions = GetUseExceptions();
16289 16 : if ( bLocalUseExceptions ) {
16290 3 : pushErrorHandler();
16291 : }
16292 16 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_CloneGeogCS(arg1);
16293 16 : if ( bLocalUseExceptions ) {
16294 3 : popErrorHandler();
16295 : }
16296 : #ifndef SED_HACKS
16297 : if ( bLocalUseExceptions ) {
16298 : CPLErr eclass = CPLGetLastErrorType();
16299 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16300 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16301 : }
16302 : }
16303 : #endif
16304 : }
16305 16 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
16306 16 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16307 : return resultobj;
16308 : fail:
16309 : return NULL;
16310 : }
16311 :
16312 :
16313 55 : SWIGINTERN PyObject *_wrap_SpatialReference_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16314 55 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16315 55 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16316 55 : void *argp1 = 0 ;
16317 55 : int res1 = 0 ;
16318 55 : PyObject *swig_obj[1] ;
16319 55 : OSRSpatialReferenceShadow *result = 0 ;
16320 :
16321 55 : if (!args) SWIG_fail;
16322 55 : swig_obj[0] = args;
16323 55 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16324 55 : if (!SWIG_IsOK(res1)) {
16325 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Clone" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16326 : }
16327 55 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16328 55 : {
16329 55 : const int bLocalUseExceptions = GetUseExceptions();
16330 55 : if ( bLocalUseExceptions ) {
16331 3 : pushErrorHandler();
16332 : }
16333 55 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_Clone(arg1);
16334 55 : if ( bLocalUseExceptions ) {
16335 3 : popErrorHandler();
16336 : }
16337 : #ifndef SED_HACKS
16338 : if ( bLocalUseExceptions ) {
16339 : CPLErr eclass = CPLGetLastErrorType();
16340 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16341 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16342 : }
16343 : }
16344 : #endif
16345 : }
16346 55 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
16347 55 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16348 : return resultobj;
16349 : fail:
16350 : return NULL;
16351 : }
16352 :
16353 :
16354 1 : SWIGINTERN PyObject *_wrap_SpatialReference_StripVertical(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16355 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16356 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16357 1 : void *argp1 = 0 ;
16358 1 : int res1 = 0 ;
16359 1 : PyObject *swig_obj[1] ;
16360 1 : OGRErr result;
16361 :
16362 1 : if (!args) SWIG_fail;
16363 1 : swig_obj[0] = args;
16364 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16365 1 : if (!SWIG_IsOK(res1)) {
16366 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_StripVertical" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16367 : }
16368 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16369 1 : {
16370 1 : const int bLocalUseExceptions = GetUseExceptions();
16371 1 : if ( bLocalUseExceptions ) {
16372 1 : pushErrorHandler();
16373 : }
16374 1 : result = (OGRErr)OSRSpatialReferenceShadow_StripVertical(arg1);
16375 1 : if ( bLocalUseExceptions ) {
16376 1 : popErrorHandler();
16377 : }
16378 : #ifndef SED_HACKS
16379 : if ( bLocalUseExceptions ) {
16380 : CPLErr eclass = CPLGetLastErrorType();
16381 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16382 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16383 : }
16384 : }
16385 : #endif
16386 : }
16387 1 : {
16388 : /* %typemap(out) OGRErr */
16389 1 : if ( result != 0 && GetUseExceptions()) {
16390 0 : const char* pszMessage = CPLGetLastErrorMsg();
16391 0 : if( pszMessage[0] != '\0' )
16392 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16393 : else
16394 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16395 0 : SWIG_fail;
16396 : }
16397 : }
16398 1 : {
16399 : /* %typemap(ret) OGRErr */
16400 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16401 1 : resultobj = PyInt_FromLong( result );
16402 : }
16403 : }
16404 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16405 : return resultobj;
16406 : fail:
16407 : return NULL;
16408 : }
16409 :
16410 :
16411 114 : SWIGINTERN PyObject *_wrap_SpatialReference_Validate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16412 114 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16413 114 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16414 114 : void *argp1 = 0 ;
16415 114 : int res1 = 0 ;
16416 114 : PyObject *swig_obj[1] ;
16417 114 : OGRErr result;
16418 :
16419 114 : if (!args) SWIG_fail;
16420 114 : swig_obj[0] = args;
16421 114 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16422 114 : if (!SWIG_IsOK(res1)) {
16423 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Validate" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16424 : }
16425 114 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16426 114 : {
16427 114 : const int bLocalUseExceptions = GetUseExceptions();
16428 114 : if ( bLocalUseExceptions ) {
16429 114 : pushErrorHandler();
16430 : }
16431 114 : result = (OGRErr)OSRSpatialReferenceShadow_Validate(arg1);
16432 114 : if ( bLocalUseExceptions ) {
16433 114 : popErrorHandler();
16434 : }
16435 : #ifndef SED_HACKS
16436 : if ( bLocalUseExceptions ) {
16437 : CPLErr eclass = CPLGetLastErrorType();
16438 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16439 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16440 : }
16441 : }
16442 : #endif
16443 : }
16444 114 : {
16445 : /* %typemap(out) OGRErr */
16446 150 : if ( result != 0 && GetUseExceptions()) {
16447 36 : const char* pszMessage = CPLGetLastErrorMsg();
16448 36 : if( pszMessage[0] != '\0' )
16449 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16450 : else
16451 36 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16452 36 : SWIG_fail;
16453 : }
16454 : }
16455 78 : {
16456 : /* %typemap(ret) OGRErr */
16457 78 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16458 78 : resultobj = PyInt_FromLong( result );
16459 : }
16460 : }
16461 114 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16462 : return resultobj;
16463 : fail:
16464 : return NULL;
16465 : }
16466 :
16467 :
16468 17 : SWIGINTERN PyObject *_wrap_SpatialReference_MorphToESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16469 17 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16470 17 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16471 17 : void *argp1 = 0 ;
16472 17 : int res1 = 0 ;
16473 17 : PyObject *swig_obj[1] ;
16474 17 : OGRErr result;
16475 :
16476 17 : if (!args) SWIG_fail;
16477 17 : swig_obj[0] = args;
16478 17 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16479 17 : if (!SWIG_IsOK(res1)) {
16480 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_MorphToESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16481 : }
16482 17 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16483 17 : {
16484 17 : const int bLocalUseExceptions = GetUseExceptions();
16485 17 : if ( bLocalUseExceptions ) {
16486 17 : pushErrorHandler();
16487 : }
16488 17 : result = (OGRErr)OSRSpatialReferenceShadow_MorphToESRI(arg1);
16489 17 : if ( bLocalUseExceptions ) {
16490 17 : popErrorHandler();
16491 : }
16492 : #ifndef SED_HACKS
16493 : if ( bLocalUseExceptions ) {
16494 : CPLErr eclass = CPLGetLastErrorType();
16495 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16496 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16497 : }
16498 : }
16499 : #endif
16500 : }
16501 17 : {
16502 : /* %typemap(out) OGRErr */
16503 17 : if ( result != 0 && GetUseExceptions()) {
16504 0 : const char* pszMessage = CPLGetLastErrorMsg();
16505 0 : if( pszMessage[0] != '\0' )
16506 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16507 : else
16508 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16509 0 : SWIG_fail;
16510 : }
16511 : }
16512 17 : {
16513 : /* %typemap(ret) OGRErr */
16514 17 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16515 17 : resultobj = PyInt_FromLong( result );
16516 : }
16517 : }
16518 17 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16519 : return resultobj;
16520 : fail:
16521 : return NULL;
16522 : }
16523 :
16524 :
16525 19 : SWIGINTERN PyObject *_wrap_SpatialReference_MorphFromESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16526 19 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16527 19 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16528 19 : void *argp1 = 0 ;
16529 19 : int res1 = 0 ;
16530 19 : PyObject *swig_obj[1] ;
16531 19 : OGRErr result;
16532 :
16533 19 : if (!args) SWIG_fail;
16534 19 : swig_obj[0] = args;
16535 19 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16536 19 : if (!SWIG_IsOK(res1)) {
16537 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_MorphFromESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16538 : }
16539 19 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16540 19 : {
16541 19 : const int bLocalUseExceptions = GetUseExceptions();
16542 19 : if ( bLocalUseExceptions ) {
16543 19 : pushErrorHandler();
16544 : }
16545 19 : result = (OGRErr)OSRSpatialReferenceShadow_MorphFromESRI(arg1);
16546 19 : if ( bLocalUseExceptions ) {
16547 19 : popErrorHandler();
16548 : }
16549 : #ifndef SED_HACKS
16550 : if ( bLocalUseExceptions ) {
16551 : CPLErr eclass = CPLGetLastErrorType();
16552 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16553 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16554 : }
16555 : }
16556 : #endif
16557 : }
16558 19 : {
16559 : /* %typemap(out) OGRErr */
16560 19 : if ( result != 0 && GetUseExceptions()) {
16561 0 : const char* pszMessage = CPLGetLastErrorMsg();
16562 0 : if( pszMessage[0] != '\0' )
16563 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16564 : else
16565 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16566 0 : SWIG_fail;
16567 : }
16568 : }
16569 19 : {
16570 : /* %typemap(ret) OGRErr */
16571 19 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16572 19 : resultobj = PyInt_FromLong( result );
16573 : }
16574 : }
16575 19 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16576 : return resultobj;
16577 : fail:
16578 : return NULL;
16579 : }
16580 :
16581 :
16582 28 : SWIGINTERN PyObject *_wrap_SpatialReference_ConvertToOtherProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16583 28 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16584 28 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16585 28 : char *arg2 = (char *) 0 ;
16586 28 : char **arg3 = (char **) NULL ;
16587 28 : void *argp1 = 0 ;
16588 28 : int res1 = 0 ;
16589 28 : int res2 ;
16590 28 : char *buf2 = 0 ;
16591 28 : int alloc2 = 0 ;
16592 28 : PyObject *swig_obj[3] ;
16593 28 : OSRSpatialReferenceShadow *result = 0 ;
16594 :
16595 28 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ConvertToOtherProjection", 2, 3, swig_obj)) SWIG_fail;
16596 28 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16597 28 : if (!SWIG_IsOK(res1)) {
16598 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ConvertToOtherProjection" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16599 : }
16600 28 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16601 28 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16602 28 : if (!SWIG_IsOK(res2)) {
16603 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ConvertToOtherProjection" "', argument " "2"" of type '" "char const *""'");
16604 : }
16605 28 : arg2 = reinterpret_cast< char * >(buf2);
16606 28 : if (swig_obj[2]) {
16607 0 : {
16608 : /* %typemap(in) char **dict */
16609 0 : arg3 = NULL;
16610 0 : if ( PySequence_Check( swig_obj[2] ) ) {
16611 0 : int bErr = FALSE;
16612 0 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
16613 0 : if ( bErr )
16614 : {
16615 0 : SWIG_fail;
16616 : }
16617 : }
16618 0 : else if ( PyMapping_Check( swig_obj[2] ) ) {
16619 0 : int bErr = FALSE;
16620 0 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
16621 0 : if ( bErr )
16622 : {
16623 0 : SWIG_fail;
16624 : }
16625 : }
16626 : else {
16627 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
16628 0 : SWIG_fail;
16629 : }
16630 : }
16631 : }
16632 28 : {
16633 28 : const int bLocalUseExceptions = GetUseExceptions();
16634 28 : if ( bLocalUseExceptions ) {
16635 14 : pushErrorHandler();
16636 : }
16637 28 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_ConvertToOtherProjection(arg1,(char const *)arg2,arg3);
16638 28 : if ( bLocalUseExceptions ) {
16639 14 : popErrorHandler();
16640 : }
16641 : #ifndef SED_HACKS
16642 : if ( bLocalUseExceptions ) {
16643 : CPLErr eclass = CPLGetLastErrorType();
16644 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16645 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16646 : }
16647 : }
16648 : #endif
16649 : }
16650 28 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
16651 28 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16652 28 : {
16653 : /* %typemap(freearg) char **dict */
16654 28 : CSLDestroy( arg3 );
16655 : }
16656 28 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16657 : return resultobj;
16658 0 : fail:
16659 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16660 0 : {
16661 : /* %typemap(freearg) char **dict */
16662 0 : CSLDestroy( arg3 );
16663 : }
16664 : return NULL;
16665 : }
16666 :
16667 :
16668 3 : SWIGINTERN PyObject *_wrap_SpatialReference_PromoteTo3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16669 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16670 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16671 3 : char *arg2 = (char *) NULL ;
16672 3 : void *argp1 = 0 ;
16673 3 : int res1 = 0 ;
16674 3 : int res2 ;
16675 3 : char *buf2 = 0 ;
16676 3 : int alloc2 = 0 ;
16677 3 : PyObject *swig_obj[2] ;
16678 3 : OGRErr result;
16679 :
16680 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_PromoteTo3D", 1, 2, swig_obj)) SWIG_fail;
16681 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16682 3 : if (!SWIG_IsOK(res1)) {
16683 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_PromoteTo3D" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16684 : }
16685 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16686 3 : if (swig_obj[1]) {
16687 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16688 0 : if (!SWIG_IsOK(res2)) {
16689 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_PromoteTo3D" "', argument " "2"" of type '" "char const *""'");
16690 : }
16691 0 : arg2 = reinterpret_cast< char * >(buf2);
16692 : }
16693 3 : {
16694 3 : const int bLocalUseExceptions = GetUseExceptions();
16695 3 : if ( bLocalUseExceptions ) {
16696 3 : pushErrorHandler();
16697 : }
16698 3 : result = (OGRErr)OSRSpatialReferenceShadow_PromoteTo3D(arg1,(char const *)arg2);
16699 3 : if ( bLocalUseExceptions ) {
16700 3 : popErrorHandler();
16701 : }
16702 : #ifndef SED_HACKS
16703 : if ( bLocalUseExceptions ) {
16704 : CPLErr eclass = CPLGetLastErrorType();
16705 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16706 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16707 : }
16708 : }
16709 : #endif
16710 : }
16711 3 : {
16712 : /* %typemap(out) OGRErr */
16713 3 : if ( result != 0 && GetUseExceptions()) {
16714 0 : const char* pszMessage = CPLGetLastErrorMsg();
16715 0 : if( pszMessage[0] != '\0' )
16716 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16717 : else
16718 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16719 0 : SWIG_fail;
16720 : }
16721 : }
16722 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16723 3 : {
16724 : /* %typemap(ret) OGRErr */
16725 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16726 3 : resultobj = PyInt_FromLong( result );
16727 : }
16728 : }
16729 3 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16730 : return resultobj;
16731 0 : fail:
16732 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16733 : return NULL;
16734 : }
16735 :
16736 :
16737 1 : SWIGINTERN PyObject *_wrap_SpatialReference_DemoteTo2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16738 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16739 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16740 1 : char *arg2 = (char *) NULL ;
16741 1 : void *argp1 = 0 ;
16742 1 : int res1 = 0 ;
16743 1 : int res2 ;
16744 1 : char *buf2 = 0 ;
16745 1 : int alloc2 = 0 ;
16746 1 : PyObject *swig_obj[2] ;
16747 1 : OGRErr result;
16748 :
16749 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_DemoteTo2D", 1, 2, swig_obj)) SWIG_fail;
16750 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16751 1 : if (!SWIG_IsOK(res1)) {
16752 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_DemoteTo2D" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16753 : }
16754 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16755 1 : if (swig_obj[1]) {
16756 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16757 0 : if (!SWIG_IsOK(res2)) {
16758 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_DemoteTo2D" "', argument " "2"" of type '" "char const *""'");
16759 : }
16760 0 : arg2 = reinterpret_cast< char * >(buf2);
16761 : }
16762 1 : {
16763 1 : const int bLocalUseExceptions = GetUseExceptions();
16764 1 : if ( bLocalUseExceptions ) {
16765 1 : pushErrorHandler();
16766 : }
16767 1 : result = (OGRErr)OSRSpatialReferenceShadow_DemoteTo2D(arg1,(char const *)arg2);
16768 1 : if ( bLocalUseExceptions ) {
16769 1 : popErrorHandler();
16770 : }
16771 : #ifndef SED_HACKS
16772 : if ( bLocalUseExceptions ) {
16773 : CPLErr eclass = CPLGetLastErrorType();
16774 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16775 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16776 : }
16777 : }
16778 : #endif
16779 : }
16780 1 : {
16781 : /* %typemap(out) OGRErr */
16782 1 : if ( result != 0 && GetUseExceptions()) {
16783 0 : const char* pszMessage = CPLGetLastErrorMsg();
16784 0 : if( pszMessage[0] != '\0' )
16785 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16786 : else
16787 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16788 0 : SWIG_fail;
16789 : }
16790 : }
16791 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16792 1 : {
16793 : /* %typemap(ret) OGRErr */
16794 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16795 1 : resultobj = PyInt_FromLong( result );
16796 : }
16797 : }
16798 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16799 : return resultobj;
16800 0 : fail:
16801 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16802 : return NULL;
16803 : }
16804 :
16805 :
16806 285 : SWIGINTERN PyObject *SpatialReference_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16807 285 : PyObject *obj;
16808 285 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
16809 285 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_NewClientData(obj));
16810 285 : return SWIG_Py_Void();
16811 : }
16812 :
16813 2789 : SWIGINTERN PyObject *SpatialReference_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16814 2789 : return SWIG_Python_InitShadowInstance(args);
16815 : }
16816 :
16817 11 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformationOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16818 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16819 11 : OGRCoordinateTransformationOptions *result = 0 ;
16820 :
16821 11 : if (!SWIG_Python_UnpackTuple(args, "new_CoordinateTransformationOptions", 0, 0, 0)) SWIG_fail;
16822 11 : {
16823 11 : const int bLocalUseExceptions = GetUseExceptions();
16824 11 : if ( bLocalUseExceptions ) {
16825 10 : pushErrorHandler();
16826 : }
16827 11 : result = (OGRCoordinateTransformationOptions *)new_OGRCoordinateTransformationOptions();
16828 11 : if ( bLocalUseExceptions ) {
16829 10 : popErrorHandler();
16830 : }
16831 : #ifndef SED_HACKS
16832 : if ( bLocalUseExceptions ) {
16833 : CPLErr eclass = CPLGetLastErrorType();
16834 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16835 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16836 : }
16837 : }
16838 : #endif
16839 : }
16840 11 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRCoordinateTransformationOptions, SWIG_POINTER_NEW | 0 );
16841 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16842 : return resultobj;
16843 0 : fail:
16844 0 : return NULL;
16845 : }
16846 :
16847 :
16848 11 : SWIGINTERN PyObject *_wrap_delete_CoordinateTransformationOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16849 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16850 11 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16851 11 : void *argp1 = 0 ;
16852 11 : int res1 = 0 ;
16853 11 : PyObject *swig_obj[1] ;
16854 :
16855 11 : if (!args) SWIG_fail;
16856 11 : swig_obj[0] = args;
16857 11 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, SWIG_POINTER_DISOWN | 0 );
16858 11 : if (!SWIG_IsOK(res1)) {
16859 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoordinateTransformationOptions" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16860 : }
16861 11 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16862 11 : {
16863 11 : const int bLocalUseExceptions = GetUseExceptions();
16864 11 : if ( bLocalUseExceptions ) {
16865 10 : pushErrorHandler();
16866 : }
16867 11 : delete_OGRCoordinateTransformationOptions(arg1);
16868 11 : if ( bLocalUseExceptions ) {
16869 10 : popErrorHandler();
16870 : }
16871 : #ifndef SED_HACKS
16872 : if ( bLocalUseExceptions ) {
16873 : CPLErr eclass = CPLGetLastErrorType();
16874 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16875 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16876 : }
16877 : }
16878 : #endif
16879 : }
16880 11 : resultobj = SWIG_Py_Void();
16881 11 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16882 : return resultobj;
16883 : fail:
16884 : return NULL;
16885 : }
16886 :
16887 :
16888 5 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetAreaOfInterest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16889 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16890 5 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16891 5 : double arg2 ;
16892 5 : double arg3 ;
16893 5 : double arg4 ;
16894 5 : double arg5 ;
16895 5 : void *argp1 = 0 ;
16896 5 : int res1 = 0 ;
16897 5 : double val2 ;
16898 5 : int ecode2 = 0 ;
16899 5 : double val3 ;
16900 5 : int ecode3 = 0 ;
16901 5 : double val4 ;
16902 5 : int ecode4 = 0 ;
16903 5 : double val5 ;
16904 5 : int ecode5 = 0 ;
16905 5 : PyObject *swig_obj[5] ;
16906 5 : bool result;
16907 :
16908 5 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetAreaOfInterest", 5, 5, swig_obj)) SWIG_fail;
16909 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
16910 5 : if (!SWIG_IsOK(res1)) {
16911 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16912 : }
16913 5 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16914 5 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
16915 5 : if (!SWIG_IsOK(ecode2)) {
16916 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "2"" of type '" "double""'");
16917 : }
16918 5 : arg2 = static_cast< double >(val2);
16919 5 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
16920 5 : if (!SWIG_IsOK(ecode3)) {
16921 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "3"" of type '" "double""'");
16922 : }
16923 5 : arg3 = static_cast< double >(val3);
16924 5 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
16925 5 : if (!SWIG_IsOK(ecode4)) {
16926 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "4"" of type '" "double""'");
16927 : }
16928 5 : arg4 = static_cast< double >(val4);
16929 5 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
16930 5 : if (!SWIG_IsOK(ecode5)) {
16931 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "5"" of type '" "double""'");
16932 : }
16933 5 : arg5 = static_cast< double >(val5);
16934 5 : {
16935 5 : const int bLocalUseExceptions = GetUseExceptions();
16936 5 : if ( bLocalUseExceptions ) {
16937 5 : pushErrorHandler();
16938 : }
16939 5 : result = (bool)OGRCoordinateTransformationOptions_SetAreaOfInterest(arg1,arg2,arg3,arg4,arg5);
16940 5 : if ( bLocalUseExceptions ) {
16941 5 : popErrorHandler();
16942 : }
16943 : #ifndef SED_HACKS
16944 : if ( bLocalUseExceptions ) {
16945 : CPLErr eclass = CPLGetLastErrorType();
16946 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16947 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16948 : }
16949 : }
16950 : #endif
16951 : }
16952 5 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16953 13 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16954 : return resultobj;
16955 : fail:
16956 : return NULL;
16957 : }
16958 :
16959 :
16960 8 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetOperation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16961 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16962 8 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16963 8 : char *arg2 = (char *) 0 ;
16964 8 : bool arg3 = (bool) false ;
16965 8 : void *argp1 = 0 ;
16966 8 : int res1 = 0 ;
16967 8 : int res2 ;
16968 8 : char *buf2 = 0 ;
16969 8 : int alloc2 = 0 ;
16970 8 : bool val3 ;
16971 8 : int ecode3 = 0 ;
16972 8 : PyObject *swig_obj[3] ;
16973 8 : bool result;
16974 :
16975 8 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetOperation", 2, 3, swig_obj)) SWIG_fail;
16976 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
16977 8 : if (!SWIG_IsOK(res1)) {
16978 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetOperation" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16979 : }
16980 8 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16981 8 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16982 8 : if (!SWIG_IsOK(res2)) {
16983 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoordinateTransformationOptions_SetOperation" "', argument " "2"" of type '" "char const *""'");
16984 : }
16985 8 : arg2 = reinterpret_cast< char * >(buf2);
16986 8 : if (swig_obj[2]) {
16987 1 : ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
16988 1 : if (!SWIG_IsOK(ecode3)) {
16989 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformationOptions_SetOperation" "', argument " "3"" of type '" "bool""'");
16990 : }
16991 : arg3 = static_cast< bool >(val3);
16992 : }
16993 8 : {
16994 8 : const int bLocalUseExceptions = GetUseExceptions();
16995 8 : if ( bLocalUseExceptions ) {
16996 7 : pushErrorHandler();
16997 : }
16998 8 : result = (bool)OGRCoordinateTransformationOptions_SetOperation(arg1,(char const *)arg2,arg3);
16999 8 : if ( bLocalUseExceptions ) {
17000 7 : popErrorHandler();
17001 : }
17002 : #ifndef SED_HACKS
17003 : if ( bLocalUseExceptions ) {
17004 : CPLErr eclass = CPLGetLastErrorType();
17005 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17006 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17007 : }
17008 : }
17009 : #endif
17010 : }
17011 8 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17012 8 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
17013 8 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17014 : return resultobj;
17015 0 : fail:
17016 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
17017 : return NULL;
17018 : }
17019 :
17020 :
17021 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetDesiredAccuracy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17022 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17023 1 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
17024 1 : double arg2 ;
17025 1 : void *argp1 = 0 ;
17026 1 : int res1 = 0 ;
17027 1 : double val2 ;
17028 1 : int ecode2 = 0 ;
17029 1 : PyObject *swig_obj[2] ;
17030 1 : bool result;
17031 :
17032 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetDesiredAccuracy", 2, 2, swig_obj)) SWIG_fail;
17033 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17034 1 : if (!SWIG_IsOK(res1)) {
17035 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetDesiredAccuracy" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
17036 : }
17037 1 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
17038 1 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
17039 1 : if (!SWIG_IsOK(ecode2)) {
17040 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetDesiredAccuracy" "', argument " "2"" of type '" "double""'");
17041 : }
17042 1 : arg2 = static_cast< double >(val2);
17043 1 : {
17044 1 : const int bLocalUseExceptions = GetUseExceptions();
17045 1 : if ( bLocalUseExceptions ) {
17046 1 : pushErrorHandler();
17047 : }
17048 1 : result = (bool)OGRCoordinateTransformationOptions_SetDesiredAccuracy(arg1,arg2);
17049 1 : if ( bLocalUseExceptions ) {
17050 1 : popErrorHandler();
17051 : }
17052 : #ifndef SED_HACKS
17053 : if ( bLocalUseExceptions ) {
17054 : CPLErr eclass = CPLGetLastErrorType();
17055 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17056 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17057 : }
17058 : }
17059 : #endif
17060 : }
17061 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17062 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17063 : return resultobj;
17064 : fail:
17065 : return NULL;
17066 : }
17067 :
17068 :
17069 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetBallparkAllowed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17070 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17071 1 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
17072 1 : bool arg2 ;
17073 1 : void *argp1 = 0 ;
17074 1 : int res1 = 0 ;
17075 1 : bool val2 ;
17076 1 : int ecode2 = 0 ;
17077 1 : PyObject *swig_obj[2] ;
17078 1 : bool result;
17079 :
17080 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetBallparkAllowed", 2, 2, swig_obj)) SWIG_fail;
17081 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17082 1 : if (!SWIG_IsOK(res1)) {
17083 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetBallparkAllowed" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
17084 : }
17085 1 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
17086 1 : ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
17087 1 : if (!SWIG_IsOK(ecode2)) {
17088 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetBallparkAllowed" "', argument " "2"" of type '" "bool""'");
17089 : }
17090 1 : arg2 = static_cast< bool >(val2);
17091 1 : {
17092 1 : const int bLocalUseExceptions = GetUseExceptions();
17093 1 : if ( bLocalUseExceptions ) {
17094 1 : pushErrorHandler();
17095 : }
17096 1 : result = (bool)OGRCoordinateTransformationOptions_SetBallparkAllowed(arg1,arg2);
17097 1 : if ( bLocalUseExceptions ) {
17098 1 : popErrorHandler();
17099 : }
17100 : #ifndef SED_HACKS
17101 : if ( bLocalUseExceptions ) {
17102 : CPLErr eclass = CPLGetLastErrorType();
17103 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17104 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17105 : }
17106 : }
17107 : #endif
17108 : }
17109 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17110 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17111 : return resultobj;
17112 : fail:
17113 : return NULL;
17114 : }
17115 :
17116 :
17117 0 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetOnlyBest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17118 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17119 0 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
17120 0 : bool arg2 ;
17121 0 : void *argp1 = 0 ;
17122 0 : int res1 = 0 ;
17123 0 : bool val2 ;
17124 0 : int ecode2 = 0 ;
17125 0 : PyObject *swig_obj[2] ;
17126 0 : bool result;
17127 :
17128 0 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetOnlyBest", 2, 2, swig_obj)) SWIG_fail;
17129 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17130 0 : if (!SWIG_IsOK(res1)) {
17131 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetOnlyBest" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
17132 : }
17133 0 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
17134 0 : ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
17135 0 : if (!SWIG_IsOK(ecode2)) {
17136 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetOnlyBest" "', argument " "2"" of type '" "bool""'");
17137 : }
17138 0 : arg2 = static_cast< bool >(val2);
17139 0 : {
17140 0 : const int bLocalUseExceptions = GetUseExceptions();
17141 0 : if ( bLocalUseExceptions ) {
17142 0 : pushErrorHandler();
17143 : }
17144 0 : result = (bool)OGRCoordinateTransformationOptions_SetOnlyBest(arg1,arg2);
17145 0 : if ( bLocalUseExceptions ) {
17146 0 : popErrorHandler();
17147 : }
17148 : #ifndef SED_HACKS
17149 : if ( bLocalUseExceptions ) {
17150 : CPLErr eclass = CPLGetLastErrorType();
17151 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17152 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17153 : }
17154 : }
17155 : #endif
17156 : }
17157 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17158 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17159 : return resultobj;
17160 : fail:
17161 : return NULL;
17162 : }
17163 :
17164 :
17165 285 : SWIGINTERN PyObject *CoordinateTransformationOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17166 285 : PyObject *obj;
17167 285 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
17168 285 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRCoordinateTransformationOptions, SWIG_NewClientData(obj));
17169 285 : return SWIG_Py_Void();
17170 : }
17171 :
17172 11 : SWIGINTERN PyObject *CoordinateTransformationOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17173 11 : return SWIG_Python_InitShadowInstance(args);
17174 : }
17175 :
17176 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformation__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17177 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17178 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
17179 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
17180 : void *argp1 = 0 ;
17181 : int res1 = 0 ;
17182 : void *argp2 = 0 ;
17183 : int res2 = 0 ;
17184 : OSRCoordinateTransformationShadow *result = 0 ;
17185 :
17186 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17187 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17188 : if (!SWIG_IsOK(res1)) {
17189 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
17190 : }
17191 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
17192 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17193 : if (!SWIG_IsOK(res2)) {
17194 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
17195 : }
17196 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
17197 : {
17198 : const int bLocalUseExceptions = GetUseExceptions();
17199 : if ( bLocalUseExceptions ) {
17200 : pushErrorHandler();
17201 : }
17202 : result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow__SWIG_0(arg1,arg2);
17203 : if ( bLocalUseExceptions ) {
17204 : popErrorHandler();
17205 : }
17206 : #ifndef SED_HACKS
17207 : if ( bLocalUseExceptions ) {
17208 : CPLErr eclass = CPLGetLastErrorType();
17209 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17210 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17211 : }
17212 : }
17213 : #endif
17214 : }
17215 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_NEW | 0 );
17216 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17217 : return resultobj;
17218 : fail:
17219 : return NULL;
17220 : }
17221 :
17222 :
17223 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformation__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17224 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17225 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
17226 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
17227 : OGRCoordinateTransformationOptions *arg3 = (OGRCoordinateTransformationOptions *) 0 ;
17228 : void *argp1 = 0 ;
17229 : int res1 = 0 ;
17230 : void *argp2 = 0 ;
17231 : int res2 = 0 ;
17232 : void *argp3 = 0 ;
17233 : int res3 = 0 ;
17234 : OSRCoordinateTransformationShadow *result = 0 ;
17235 :
17236 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
17237 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17238 : if (!SWIG_IsOK(res1)) {
17239 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
17240 : }
17241 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
17242 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17243 : if (!SWIG_IsOK(res2)) {
17244 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
17245 : }
17246 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
17247 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17248 : if (!SWIG_IsOK(res3)) {
17249 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CoordinateTransformation" "', argument " "3"" of type '" "OGRCoordinateTransformationOptions *""'");
17250 : }
17251 : arg3 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp3);
17252 : {
17253 : const int bLocalUseExceptions = GetUseExceptions();
17254 : if ( bLocalUseExceptions ) {
17255 : pushErrorHandler();
17256 : }
17257 : result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow__SWIG_1(arg1,arg2,arg3);
17258 : if ( bLocalUseExceptions ) {
17259 : popErrorHandler();
17260 : }
17261 : #ifndef SED_HACKS
17262 : if ( bLocalUseExceptions ) {
17263 : CPLErr eclass = CPLGetLastErrorType();
17264 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17265 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17266 : }
17267 : }
17268 : #endif
17269 : }
17270 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_NEW | 0 );
17271 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17272 : return resultobj;
17273 : fail:
17274 : return NULL;
17275 : }
17276 :
17277 :
17278 140 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformation(PyObject *self, PyObject *args) {
17279 140 : Py_ssize_t argc;
17280 140 : PyObject *argv[4] = {
17281 : 0
17282 : };
17283 :
17284 140 : if (!(argc = SWIG_Python_UnpackTuple(args, "new_CoordinateTransformation", 0, 3, argv))) SWIG_fail;
17285 140 : --argc;
17286 140 : if (argc == 2) {
17287 130 : int _v;
17288 130 : void *vptr = 0;
17289 130 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17290 130 : _v = SWIG_CheckState(res);
17291 130 : if (_v) {
17292 130 : void *vptr = 0;
17293 130 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17294 130 : _v = SWIG_CheckState(res);
17295 0 : if (_v) {
17296 130 : return _wrap_new_CoordinateTransformation__SWIG_0(self, argc, argv);
17297 : }
17298 : }
17299 : }
17300 10 : if (argc == 3) {
17301 10 : int _v;
17302 10 : void *vptr = 0;
17303 10 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17304 10 : _v = SWIG_CheckState(res);
17305 10 : if (_v) {
17306 10 : void *vptr = 0;
17307 10 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17308 10 : _v = SWIG_CheckState(res);
17309 10 : if (_v) {
17310 10 : void *vptr = 0;
17311 10 : int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRCoordinateTransformationOptions, 0);
17312 10 : _v = SWIG_CheckState(res);
17313 0 : if (_v) {
17314 10 : return _wrap_new_CoordinateTransformation__SWIG_1(self, argc, argv);
17315 : }
17316 : }
17317 : }
17318 : }
17319 :
17320 0 : fail:
17321 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_CoordinateTransformation'.\n"
17322 : " Possible C/C++ prototypes are:\n"
17323 : " OSRCoordinateTransformationShadow::OSRCoordinateTransformationShadow(OSRSpatialReferenceShadow *,OSRSpatialReferenceShadow *)\n"
17324 : " OSRCoordinateTransformationShadow::OSRCoordinateTransformationShadow(OSRSpatialReferenceShadow *,OSRSpatialReferenceShadow *,OGRCoordinateTransformationOptions *)\n");
17325 : return 0;
17326 : }
17327 :
17328 :
17329 140 : SWIGINTERN PyObject *_wrap_delete_CoordinateTransformation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17330 140 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17331 140 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17332 140 : void *argp1 = 0 ;
17333 140 : int res1 = 0 ;
17334 140 : PyObject *swig_obj[1] ;
17335 :
17336 140 : if (!args) SWIG_fail;
17337 140 : swig_obj[0] = args;
17338 140 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_DISOWN | 0 );
17339 140 : if (!SWIG_IsOK(res1)) {
17340 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoordinateTransformation" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17341 : }
17342 140 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17343 140 : {
17344 140 : const int bLocalUseExceptions = GetUseExceptions();
17345 140 : if ( bLocalUseExceptions ) {
17346 117 : pushErrorHandler();
17347 : }
17348 140 : delete_OSRCoordinateTransformationShadow(arg1);
17349 140 : if ( bLocalUseExceptions ) {
17350 117 : popErrorHandler();
17351 : }
17352 : #ifndef SED_HACKS
17353 : if ( bLocalUseExceptions ) {
17354 : CPLErr eclass = CPLGetLastErrorType();
17355 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17356 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17357 : }
17358 : }
17359 : #endif
17360 : }
17361 140 : resultobj = SWIG_Py_Void();
17362 140 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17363 : return resultobj;
17364 : fail:
17365 : return NULL;
17366 : }
17367 :
17368 :
17369 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_GetInverse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17370 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17371 1 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17372 1 : void *argp1 = 0 ;
17373 1 : int res1 = 0 ;
17374 1 : PyObject *swig_obj[1] ;
17375 1 : OSRCoordinateTransformationShadow *result = 0 ;
17376 :
17377 1 : if (!args) SWIG_fail;
17378 1 : swig_obj[0] = args;
17379 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17380 1 : if (!SWIG_IsOK(res1)) {
17381 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_GetInverse" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17382 : }
17383 1 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17384 1 : {
17385 1 : const int bLocalUseExceptions = GetUseExceptions();
17386 1 : if ( bLocalUseExceptions ) {
17387 1 : pushErrorHandler();
17388 : }
17389 1 : result = (OSRCoordinateTransformationShadow *)OSRCoordinateTransformationShadow_GetInverse(arg1);
17390 1 : if ( bLocalUseExceptions ) {
17391 1 : popErrorHandler();
17392 : }
17393 : #ifndef SED_HACKS
17394 : if ( bLocalUseExceptions ) {
17395 : CPLErr eclass = CPLGetLastErrorType();
17396 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17397 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17398 : }
17399 : }
17400 : #endif
17401 : }
17402 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_OWN | 0 );
17403 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17404 : return resultobj;
17405 : fail:
17406 : return NULL;
17407 : }
17408 :
17409 :
17410 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformation__TransformPoint3Double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17411 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17412 1 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17413 1 : double *arg2 ;
17414 1 : void *argp1 = 0 ;
17415 1 : int res1 = 0 ;
17416 1 : double argin2[3] ;
17417 1 : PyObject *swig_obj[2] ;
17418 :
17419 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation__TransformPoint3Double", 2, 2, swig_obj)) SWIG_fail;
17420 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17421 1 : if (!SWIG_IsOK(res1)) {
17422 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation__TransformPoint3Double" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17423 : }
17424 1 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17425 1 : {
17426 : /* %typemap(in) (double argin2[ANY]) */
17427 1 : arg2 = argin2;
17428 1 : if (! PySequence_Check(swig_obj[1]) ) {
17429 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
17430 0 : SWIG_fail;
17431 : }
17432 1 : Py_ssize_t seq_size = PySequence_Size(swig_obj[1]);
17433 1 : if ( seq_size != 3 ) {
17434 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
17435 0 : SWIG_fail;
17436 : }
17437 4 : for (unsigned int i=0; i<3; i++) {
17438 3 : PyObject *o = PySequence_GetItem(swig_obj[1],i);
17439 3 : double val;
17440 3 : if ( !PyArg_Parse(o, "d", &val ) ) {
17441 0 : PyErr_SetString(PyExc_TypeError, "not a number");
17442 0 : Py_DECREF(o);
17443 0 : SWIG_fail;
17444 : }
17445 3 : arg2[i] = val;
17446 3 : Py_DECREF(o);
17447 : }
17448 : }
17449 1 : {
17450 1 : const int bLocalUseExceptions = GetUseExceptions();
17451 1 : if ( bLocalUseExceptions ) {
17452 1 : pushErrorHandler();
17453 : }
17454 1 : OSRCoordinateTransformationShadow__TransformPoint3Double(arg1,arg2);
17455 1 : if ( bLocalUseExceptions ) {
17456 1 : popErrorHandler();
17457 : }
17458 : #ifndef SED_HACKS
17459 : if ( bLocalUseExceptions ) {
17460 : CPLErr eclass = CPLGetLastErrorType();
17461 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17462 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17463 : }
17464 : }
17465 : #endif
17466 : }
17467 1 : resultobj = SWIG_Py_Void();
17468 1 : {
17469 : /* %typemap(argout) (double argout[ANY]) */
17470 1 : PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
17471 : #if SWIG_VERSION >= 0x040300
17472 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
17473 : #else
17474 1 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
17475 : #endif
17476 : }
17477 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17478 : return resultobj;
17479 : fail:
17480 : return NULL;
17481 : }
17482 :
17483 :
17484 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformation__TransformPoint4Double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17485 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17486 1 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17487 1 : double *arg2 ;
17488 1 : void *argp1 = 0 ;
17489 1 : int res1 = 0 ;
17490 1 : double argin2[4] ;
17491 1 : PyObject *swig_obj[2] ;
17492 :
17493 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation__TransformPoint4Double", 2, 2, swig_obj)) SWIG_fail;
17494 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17495 1 : if (!SWIG_IsOK(res1)) {
17496 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation__TransformPoint4Double" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17497 : }
17498 1 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17499 1 : {
17500 : /* %typemap(in) (double argin2[ANY]) */
17501 1 : arg2 = argin2;
17502 1 : if (! PySequence_Check(swig_obj[1]) ) {
17503 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
17504 0 : SWIG_fail;
17505 : }
17506 1 : Py_ssize_t seq_size = PySequence_Size(swig_obj[1]);
17507 1 : if ( seq_size != 4 ) {
17508 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
17509 0 : SWIG_fail;
17510 : }
17511 5 : for (unsigned int i=0; i<4; i++) {
17512 4 : PyObject *o = PySequence_GetItem(swig_obj[1],i);
17513 4 : double val;
17514 4 : if ( !PyArg_Parse(o, "d", &val ) ) {
17515 0 : PyErr_SetString(PyExc_TypeError, "not a number");
17516 0 : Py_DECREF(o);
17517 0 : SWIG_fail;
17518 : }
17519 4 : arg2[i] = val;
17520 4 : Py_DECREF(o);
17521 : }
17522 : }
17523 1 : {
17524 1 : const int bLocalUseExceptions = GetUseExceptions();
17525 1 : if ( bLocalUseExceptions ) {
17526 1 : pushErrorHandler();
17527 : }
17528 1 : OSRCoordinateTransformationShadow__TransformPoint4Double(arg1,arg2);
17529 1 : if ( bLocalUseExceptions ) {
17530 1 : popErrorHandler();
17531 : }
17532 : #ifndef SED_HACKS
17533 : if ( bLocalUseExceptions ) {
17534 : CPLErr eclass = CPLGetLastErrorType();
17535 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17536 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17537 : }
17538 : }
17539 : #endif
17540 : }
17541 1 : resultobj = SWIG_Py_Void();
17542 1 : {
17543 : /* %typemap(argout) (double argout[ANY]) */
17544 1 : PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
17545 : #if SWIG_VERSION >= 0x040300
17546 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
17547 : #else
17548 1 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
17549 : #endif
17550 : }
17551 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17552 : return resultobj;
17553 : fail:
17554 : return NULL;
17555 : }
17556 :
17557 :
17558 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17559 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17560 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17561 : double *arg2 ;
17562 : double arg3 ;
17563 : double arg4 ;
17564 : double arg5 = (double) 0.0 ;
17565 : void *argp1 = 0 ;
17566 : int res1 = 0 ;
17567 : double argout2[3] ;
17568 : double val3 ;
17569 : int ecode3 = 0 ;
17570 : double val4 ;
17571 : int ecode4 = 0 ;
17572 : double val5 ;
17573 : int ecode5 = 0 ;
17574 :
17575 : {
17576 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
17577 : memset(argout2, 0, sizeof(argout2));
17578 : arg2 = argout2;
17579 : }
17580 : if ((nobjs < 3) || (nobjs > 4)) SWIG_fail;
17581 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17582 : if (!SWIG_IsOK(res1)) {
17583 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17584 : }
17585 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17586 : ecode3 = SWIG_AsVal_double(swig_obj[1], &val3);
17587 : if (!SWIG_IsOK(ecode3)) {
17588 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "3"" of type '" "double""'");
17589 : }
17590 : arg3 = static_cast< double >(val3);
17591 : ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
17592 : if (!SWIG_IsOK(ecode4)) {
17593 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "4"" of type '" "double""'");
17594 : }
17595 : arg4 = static_cast< double >(val4);
17596 : if (swig_obj[3]) {
17597 : ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
17598 : if (!SWIG_IsOK(ecode5)) {
17599 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "5"" of type '" "double""'");
17600 : }
17601 : arg5 = static_cast< double >(val5);
17602 : }
17603 : {
17604 : const int bLocalUseExceptions = GetUseExceptions();
17605 : if ( bLocalUseExceptions ) {
17606 : pushErrorHandler();
17607 : }
17608 : OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(arg1,arg2,arg3,arg4,arg5);
17609 : if ( bLocalUseExceptions ) {
17610 : popErrorHandler();
17611 : }
17612 : #ifndef SED_HACKS
17613 : if ( bLocalUseExceptions ) {
17614 : CPLErr eclass = CPLGetLastErrorType();
17615 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17616 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17617 : }
17618 : }
17619 : #endif
17620 : }
17621 : resultobj = SWIG_Py_Void();
17622 : {
17623 : /* %typemap(argout) (double argout[ANY]) */
17624 : PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
17625 : #if SWIG_VERSION >= 0x040300
17626 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
17627 : #else
17628 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
17629 : #endif
17630 : }
17631 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17632 : return resultobj;
17633 : fail:
17634 : return NULL;
17635 : }
17636 :
17637 :
17638 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17639 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17640 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17641 : double *arg2 ;
17642 : double arg3 ;
17643 : double arg4 ;
17644 : double arg5 ;
17645 : double arg6 ;
17646 : void *argp1 = 0 ;
17647 : int res1 = 0 ;
17648 : double argout2[4] ;
17649 : double val3 ;
17650 : int ecode3 = 0 ;
17651 : double val4 ;
17652 : int ecode4 = 0 ;
17653 : double val5 ;
17654 : int ecode5 = 0 ;
17655 : double val6 ;
17656 : int ecode6 = 0 ;
17657 :
17658 : {
17659 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
17660 : memset(argout2, 0, sizeof(argout2));
17661 : arg2 = argout2;
17662 : }
17663 : if ((nobjs < 5) || (nobjs > 5)) SWIG_fail;
17664 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17665 : if (!SWIG_IsOK(res1)) {
17666 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17667 : }
17668 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17669 : ecode3 = SWIG_AsVal_double(swig_obj[1], &val3);
17670 : if (!SWIG_IsOK(ecode3)) {
17671 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "3"" of type '" "double""'");
17672 : }
17673 : arg3 = static_cast< double >(val3);
17674 : ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
17675 : if (!SWIG_IsOK(ecode4)) {
17676 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "4"" of type '" "double""'");
17677 : }
17678 : arg4 = static_cast< double >(val4);
17679 : ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
17680 : if (!SWIG_IsOK(ecode5)) {
17681 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "5"" of type '" "double""'");
17682 : }
17683 : arg5 = static_cast< double >(val5);
17684 : ecode6 = SWIG_AsVal_double(swig_obj[4], &val6);
17685 : if (!SWIG_IsOK(ecode6)) {
17686 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "6"" of type '" "double""'");
17687 : }
17688 : arg6 = static_cast< double >(val6);
17689 : {
17690 : const int bLocalUseExceptions = GetUseExceptions();
17691 : if ( bLocalUseExceptions ) {
17692 : pushErrorHandler();
17693 : }
17694 : OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
17695 : if ( bLocalUseExceptions ) {
17696 : popErrorHandler();
17697 : }
17698 : #ifndef SED_HACKS
17699 : if ( bLocalUseExceptions ) {
17700 : CPLErr eclass = CPLGetLastErrorType();
17701 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17702 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17703 : }
17704 : }
17705 : #endif
17706 : }
17707 : resultobj = SWIG_Py_Void();
17708 : {
17709 : /* %typemap(argout) (double argout[ANY]) */
17710 : PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
17711 : #if SWIG_VERSION >= 0x040300
17712 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
17713 : #else
17714 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
17715 : #endif
17716 : }
17717 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17718 : return resultobj;
17719 : fail:
17720 : return NULL;
17721 : }
17722 :
17723 :
17724 177 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint(PyObject *self, PyObject *args) {
17725 177 : Py_ssize_t argc;
17726 177 : PyObject *argv[6] = {
17727 : 0
17728 : };
17729 :
17730 177 : if (!(argc = SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformPoint", 0, 5, argv))) SWIG_fail;
17731 177 : --argc;
17732 177 : if ((argc >= 3) && (argc <= 4)) {
17733 173 : int _v;
17734 173 : void *vptr = 0;
17735 173 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
17736 173 : _v = SWIG_CheckState(res);
17737 171 : if (_v) {
17738 171 : {
17739 171 : int res = SWIG_AsVal_double(argv[1], NULL);
17740 171 : _v = SWIG_CheckState(res);
17741 : }
17742 171 : if (_v) {
17743 171 : {
17744 171 : int res = SWIG_AsVal_double(argv[2], NULL);
17745 171 : _v = SWIG_CheckState(res);
17746 : }
17747 171 : if (_v) {
17748 171 : if (argc <= 3) {
17749 171 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_0(self, argc, argv);
17750 : }
17751 117 : {
17752 117 : int res = SWIG_AsVal_double(argv[3], NULL);
17753 117 : _v = SWIG_CheckState(res);
17754 : }
17755 117 : if (_v) {
17756 117 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_0(self, argc, argv);
17757 : }
17758 : }
17759 : }
17760 : }
17761 : }
17762 6 : if (argc == 5) {
17763 4 : int _v;
17764 4 : void *vptr = 0;
17765 4 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
17766 4 : _v = SWIG_CheckState(res);
17767 4 : if (_v) {
17768 4 : {
17769 4 : int res = SWIG_AsVal_double(argv[1], NULL);
17770 4 : _v = SWIG_CheckState(res);
17771 : }
17772 4 : if (_v) {
17773 4 : {
17774 4 : int res = SWIG_AsVal_double(argv[2], NULL);
17775 4 : _v = SWIG_CheckState(res);
17776 : }
17777 4 : if (_v) {
17778 4 : {
17779 4 : int res = SWIG_AsVal_double(argv[3], NULL);
17780 4 : _v = SWIG_CheckState(res);
17781 : }
17782 4 : if (_v) {
17783 4 : {
17784 4 : int res = SWIG_AsVal_double(argv[4], NULL);
17785 4 : _v = SWIG_CheckState(res);
17786 : }
17787 4 : if (_v) {
17788 4 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_1(self, argc, argv);
17789 : }
17790 : }
17791 : }
17792 : }
17793 : }
17794 : }
17795 :
17796 2 : fail:
17797 2 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'CoordinateTransformation_TransformPoint'.\n"
17798 : " Possible C/C++ prototypes are:\n"
17799 : " OSRCoordinateTransformationShadow::TransformPoint(double [3],double,double,double)\n"
17800 : " OSRCoordinateTransformationShadow::TransformPoint(double [4],double,double,double,double)\n");
17801 : return 0;
17802 : }
17803 :
17804 :
17805 0 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPointWithErrorCode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17806 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17807 0 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17808 0 : double *arg2 ;
17809 0 : int *arg3 ;
17810 0 : double arg4 ;
17811 0 : double arg5 ;
17812 0 : double arg6 ;
17813 0 : double arg7 ;
17814 0 : void *argp1 = 0 ;
17815 0 : int res1 = 0 ;
17816 0 : double argout2[4] ;
17817 0 : int errorCode2[1] ;
17818 0 : double val4 ;
17819 0 : int ecode4 = 0 ;
17820 0 : double val5 ;
17821 0 : int ecode5 = 0 ;
17822 0 : double val6 ;
17823 0 : int ecode6 = 0 ;
17824 0 : double val7 ;
17825 0 : int ecode7 = 0 ;
17826 0 : PyObject *swig_obj[5] ;
17827 :
17828 0 : {
17829 : /* %typemap(in) (double argout2[4], int errorCode2[1]) */
17830 0 : arg2 = argout2;
17831 0 : arg3 = errorCode2;
17832 : }
17833 0 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformPointWithErrorCode", 5, 5, swig_obj)) SWIG_fail;
17834 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17835 0 : if (!SWIG_IsOK(res1)) {
17836 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17837 : }
17838 0 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17839 0 : ecode4 = SWIG_AsVal_double(swig_obj[1], &val4);
17840 0 : if (!SWIG_IsOK(ecode4)) {
17841 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "4"" of type '" "double""'");
17842 : }
17843 0 : arg4 = static_cast< double >(val4);
17844 0 : ecode5 = SWIG_AsVal_double(swig_obj[2], &val5);
17845 0 : if (!SWIG_IsOK(ecode5)) {
17846 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "5"" of type '" "double""'");
17847 : }
17848 0 : arg5 = static_cast< double >(val5);
17849 0 : ecode6 = SWIG_AsVal_double(swig_obj[3], &val6);
17850 0 : if (!SWIG_IsOK(ecode6)) {
17851 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "6"" of type '" "double""'");
17852 : }
17853 0 : arg6 = static_cast< double >(val6);
17854 0 : ecode7 = SWIG_AsVal_double(swig_obj[4], &val7);
17855 0 : if (!SWIG_IsOK(ecode7)) {
17856 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "7"" of type '" "double""'");
17857 : }
17858 0 : arg7 = static_cast< double >(val7);
17859 0 : {
17860 0 : const int bLocalUseExceptions = GetUseExceptions();
17861 0 : if ( bLocalUseExceptions ) {
17862 0 : pushErrorHandler();
17863 : }
17864 0 : OSRCoordinateTransformationShadow_TransformPointWithErrorCode(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
17865 0 : if ( bLocalUseExceptions ) {
17866 0 : popErrorHandler();
17867 : }
17868 : #ifndef SED_HACKS
17869 : if ( bLocalUseExceptions ) {
17870 : CPLErr eclass = CPLGetLastErrorType();
17871 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17872 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17873 : }
17874 : }
17875 : #endif
17876 : }
17877 0 : resultobj = SWIG_Py_Void();
17878 0 : {
17879 : /* %typemap(argout) (double argout[4], int errorCode[1]) */
17880 0 : PyObject *r = PyTuple_New( 5 );
17881 0 : PyTuple_SetItem( r, 0, PyFloat_FromDouble(arg2[0]));
17882 0 : PyTuple_SetItem( r, 1, PyFloat_FromDouble(arg2[1]));
17883 0 : PyTuple_SetItem( r, 2, PyFloat_FromDouble(arg2[2]));
17884 0 : PyTuple_SetItem( r, 3, PyFloat_FromDouble(arg2[3]));
17885 0 : PyTuple_SetItem( r, 4, PyLong_FromLong(arg3[0]));
17886 : #if SWIG_VERSION >= 0x040300
17887 : resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
17888 : #else
17889 0 : resultobj = SWIG_Python_AppendOutput(resultobj,r);
17890 : #endif
17891 : }
17892 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17893 : return resultobj;
17894 : fail:
17895 : return NULL;
17896 : }
17897 :
17898 :
17899 10 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17900 10 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17901 10 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17902 10 : int arg2 ;
17903 10 : double *arg3 = (double *) 0 ;
17904 10 : double *arg4 = (double *) 0 ;
17905 10 : double *arg5 = (double *) 0 ;
17906 10 : double *arg6 = (double *) 0 ;
17907 10 : void *argp1 = 0 ;
17908 10 : int res1 = 0 ;
17909 10 : int foundTime2 = FALSE ;
17910 10 : PyObject *swig_obj[2] ;
17911 :
17912 10 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformPoints", 2, 2, swig_obj)) SWIG_fail;
17913 10 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17914 10 : if (!SWIG_IsOK(res1)) {
17915 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoints" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17916 : }
17917 10 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17918 10 : {
17919 10 : if ( !PySequence_Check(swig_obj[1]) ) {
17920 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
17921 0 : SWIG_fail;
17922 : }
17923 :
17924 10 : Py_ssize_t size = PySequence_Size(swig_obj[1]);
17925 10 : if( size != (int)size ) {
17926 0 : PyErr_SetString(PyExc_TypeError, "too big sequence");
17927 0 : SWIG_fail;
17928 : }
17929 10 : arg2 = (int)size;
17930 10 : arg3 = (double*) VSIMalloc(arg2*sizeof(double));
17931 10 : arg4 = (double*) VSIMalloc(arg2*sizeof(double));
17932 10 : arg5 = (double*) VSIMalloc(arg2*sizeof(double));
17933 10 : arg6 = (double*) VSIMalloc(arg2*sizeof(double));
17934 :
17935 10 : if (arg3 == NULL || arg4 == NULL || arg5 == NULL || arg6 == NULL)
17936 : {
17937 0 : PyErr_SetString( PyExc_RuntimeError, "Out of memory" );
17938 0 : SWIG_fail;
17939 : }
17940 :
17941 10 : if (!DecomposeSequenceOf4DCoordinates(swig_obj[1],arg2,arg3,arg4,arg5,arg6, &foundTime2)) {
17942 0 : SWIG_fail;
17943 : }
17944 : }
17945 10 : {
17946 10 : const int bLocalUseExceptions = GetUseExceptions();
17947 10 : if ( bLocalUseExceptions ) {
17948 10 : pushErrorHandler();
17949 : }
17950 10 : OSRCoordinateTransformationShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5,arg6);
17951 10 : if ( bLocalUseExceptions ) {
17952 10 : popErrorHandler();
17953 : }
17954 : #ifndef SED_HACKS
17955 : if ( bLocalUseExceptions ) {
17956 : CPLErr eclass = CPLGetLastErrorType();
17957 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17958 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17959 : }
17960 : }
17961 : #endif
17962 : }
17963 10 : resultobj = SWIG_Py_Void();
17964 10 : {
17965 : /* %typemap(argout) (int nCount, double *x, double *y, double *z, double *t) */
17966 10 : Py_DECREF(resultobj);
17967 10 : PyObject *out = PyList_New( arg2 );
17968 10 : if( !out ) {
17969 0 : SWIG_fail;
17970 : }
17971 10 : int foundTime = foundTime2;
17972 33 : for( int i=0; i< arg2; i++ ) {
17973 38 : PyObject *tuple = PyTuple_New( foundTime ? 4 : 3 );
17974 23 : PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (arg3)[i] ) );
17975 23 : PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (arg4)[i] ) );
17976 23 : PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (arg5)[i] ) );
17977 23 : if( foundTime )
17978 8 : PyTuple_SetItem( tuple, 3, PyFloat_FromDouble( (arg6)[i] ) );
17979 23 : PyList_SetItem( out, i, tuple );
17980 : }
17981 10 : resultobj = out;
17982 : }
17983 10 : {
17984 : /* %typemap(freearg) (int nCount, double *x, double *y, double *z, double *t) */
17985 10 : VSIFree(arg3);
17986 10 : VSIFree(arg4);
17987 10 : VSIFree(arg5);
17988 10 : VSIFree(arg6);
17989 : }
17990 10 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17991 : return resultobj;
17992 0 : fail:
17993 0 : {
17994 : /* %typemap(freearg) (int nCount, double *x, double *y, double *z, double *t) */
17995 0 : VSIFree(arg3);
17996 0 : VSIFree(arg4);
17997 0 : VSIFree(arg5);
17998 0 : VSIFree(arg6);
17999 : }
18000 : return NULL;
18001 : }
18002 :
18003 :
18004 25 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18005 25 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18006 25 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
18007 25 : double *arg2 ;
18008 25 : double arg3 ;
18009 25 : double arg4 ;
18010 25 : double arg5 ;
18011 25 : double arg6 ;
18012 25 : int arg7 ;
18013 25 : void *argp1 = 0 ;
18014 25 : int res1 = 0 ;
18015 25 : double argout2[4] ;
18016 25 : double val3 ;
18017 25 : int ecode3 = 0 ;
18018 25 : double val4 ;
18019 25 : int ecode4 = 0 ;
18020 25 : double val5 ;
18021 25 : int ecode5 = 0 ;
18022 25 : double val6 ;
18023 25 : int ecode6 = 0 ;
18024 25 : int val7 ;
18025 25 : int ecode7 = 0 ;
18026 25 : PyObject *swig_obj[6] ;
18027 :
18028 25 : {
18029 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
18030 25 : memset(argout2, 0, sizeof(argout2));
18031 25 : arg2 = argout2;
18032 : }
18033 25 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformBounds", 6, 6, swig_obj)) SWIG_fail;
18034 25 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
18035 25 : if (!SWIG_IsOK(res1)) {
18036 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
18037 : }
18038 25 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
18039 25 : ecode3 = SWIG_AsVal_double(swig_obj[1], &val3);
18040 25 : if (!SWIG_IsOK(ecode3)) {
18041 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "3"" of type '" "double""'");
18042 : }
18043 25 : arg3 = static_cast< double >(val3);
18044 25 : ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
18045 25 : if (!SWIG_IsOK(ecode4)) {
18046 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "4"" of type '" "double""'");
18047 : }
18048 25 : arg4 = static_cast< double >(val4);
18049 25 : ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
18050 25 : if (!SWIG_IsOK(ecode5)) {
18051 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "5"" of type '" "double""'");
18052 : }
18053 25 : arg5 = static_cast< double >(val5);
18054 25 : ecode6 = SWIG_AsVal_double(swig_obj[4], &val6);
18055 25 : if (!SWIG_IsOK(ecode6)) {
18056 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "6"" of type '" "double""'");
18057 : }
18058 25 : arg6 = static_cast< double >(val6);
18059 25 : ecode7 = SWIG_AsVal_int(swig_obj[5], &val7);
18060 25 : if (!SWIG_IsOK(ecode7)) {
18061 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "7"" of type '" "int""'");
18062 : }
18063 25 : arg7 = static_cast< int >(val7);
18064 25 : {
18065 25 : const int bLocalUseExceptions = GetUseExceptions();
18066 25 : if ( bLocalUseExceptions ) {
18067 24 : pushErrorHandler();
18068 : }
18069 25 : OSRCoordinateTransformationShadow_TransformBounds(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
18070 25 : if ( bLocalUseExceptions ) {
18071 24 : popErrorHandler();
18072 : }
18073 : #ifndef SED_HACKS
18074 : if ( bLocalUseExceptions ) {
18075 : CPLErr eclass = CPLGetLastErrorType();
18076 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18077 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18078 : }
18079 : }
18080 : #endif
18081 : }
18082 25 : resultobj = SWIG_Py_Void();
18083 25 : {
18084 : /* %typemap(argout) (double argout[ANY]) */
18085 25 : PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
18086 : #if SWIG_VERSION >= 0x040300
18087 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
18088 : #else
18089 25 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
18090 : #endif
18091 : }
18092 27 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18093 : return resultobj;
18094 : fail:
18095 : return NULL;
18096 : }
18097 :
18098 :
18099 285 : SWIGINTERN PyObject *CoordinateTransformation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18100 285 : PyObject *obj;
18101 285 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
18102 285 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_NewClientData(obj));
18103 285 : return SWIG_Py_Void();
18104 : }
18105 :
18106 140 : SWIGINTERN PyObject *CoordinateTransformation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18107 140 : return SWIG_Python_InitShadowInstance(args);
18108 : }
18109 :
18110 2 : SWIGINTERN PyObject *_wrap_CreateCoordinateTransformation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18111 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18112 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
18113 2 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
18114 2 : OGRCoordinateTransformationOptions *arg3 = (OGRCoordinateTransformationOptions *) NULL ;
18115 2 : void *argp1 = 0 ;
18116 2 : int res1 = 0 ;
18117 2 : void *argp2 = 0 ;
18118 2 : int res2 = 0 ;
18119 2 : void *argp3 = 0 ;
18120 2 : int res3 = 0 ;
18121 2 : PyObject *swig_obj[3] ;
18122 2 : OSRCoordinateTransformationShadow *result = 0 ;
18123 :
18124 2 : if (!SWIG_Python_UnpackTuple(args, "CreateCoordinateTransformation", 2, 3, swig_obj)) SWIG_fail;
18125 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
18126 2 : if (!SWIG_IsOK(res1)) {
18127 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateCoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
18128 : }
18129 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
18130 2 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
18131 2 : if (!SWIG_IsOK(res2)) {
18132 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateCoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
18133 : }
18134 2 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
18135 2 : if (swig_obj[2]) {
18136 0 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
18137 0 : if (!SWIG_IsOK(res3)) {
18138 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreateCoordinateTransformation" "', argument " "3"" of type '" "OGRCoordinateTransformationOptions *""'");
18139 : }
18140 0 : arg3 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp3);
18141 : }
18142 2 : {
18143 2 : const int bLocalUseExceptions = GetUseExceptions();
18144 2 : if ( bLocalUseExceptions ) {
18145 2 : pushErrorHandler();
18146 : }
18147 2 : result = (OSRCoordinateTransformationShadow *)CreateCoordinateTransformation(arg1,arg2,arg3);
18148 2 : if ( bLocalUseExceptions ) {
18149 2 : popErrorHandler();
18150 : }
18151 : #ifndef SED_HACKS
18152 : if ( bLocalUseExceptions ) {
18153 : CPLErr eclass = CPLGetLastErrorType();
18154 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18155 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18156 : }
18157 : }
18158 : #endif
18159 : }
18160 2 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_OWN | 0 );
18161 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18162 : return resultobj;
18163 : fail:
18164 : return NULL;
18165 : }
18166 :
18167 :
18168 6609 : SWIGINTERN PyObject *_wrap_CRSInfo_auth_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18169 6609 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18170 6609 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18171 6609 : void *argp1 = 0 ;
18172 6609 : int res1 = 0 ;
18173 6609 : PyObject *swig_obj[1] ;
18174 6609 : char *result = 0 ;
18175 :
18176 6609 : if (!args) SWIG_fail;
18177 6609 : swig_obj[0] = args;
18178 6609 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18179 6609 : if (!SWIG_IsOK(res1)) {
18180 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_auth_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18181 : }
18182 6609 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18183 6609 : {
18184 6609 : const int bLocalUseExceptions = GetUseExceptions();
18185 6609 : if ( bLocalUseExceptions ) {
18186 6609 : pushErrorHandler();
18187 : }
18188 6609 : result = (char *)OSRCRSInfo_auth_name_get(arg1);
18189 6609 : if ( bLocalUseExceptions ) {
18190 6609 : popErrorHandler();
18191 : }
18192 : #ifndef SED_HACKS
18193 : if ( bLocalUseExceptions ) {
18194 : CPLErr eclass = CPLGetLastErrorType();
18195 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18196 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18197 : }
18198 : }
18199 : #endif
18200 : }
18201 6609 : resultobj = SWIG_FromCharPtr((const char *)result);
18202 6609 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18203 : return resultobj;
18204 : fail:
18205 : return NULL;
18206 : }
18207 :
18208 :
18209 6609 : SWIGINTERN PyObject *_wrap_CRSInfo_code_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18210 6609 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18211 6609 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18212 6609 : void *argp1 = 0 ;
18213 6609 : int res1 = 0 ;
18214 6609 : PyObject *swig_obj[1] ;
18215 6609 : char *result = 0 ;
18216 :
18217 6609 : if (!args) SWIG_fail;
18218 6609 : swig_obj[0] = args;
18219 6609 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18220 6609 : if (!SWIG_IsOK(res1)) {
18221 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_code_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18222 : }
18223 6609 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18224 6609 : {
18225 6609 : const int bLocalUseExceptions = GetUseExceptions();
18226 6609 : if ( bLocalUseExceptions ) {
18227 6609 : pushErrorHandler();
18228 : }
18229 6609 : result = (char *)OSRCRSInfo_code_get(arg1);
18230 6609 : if ( bLocalUseExceptions ) {
18231 6609 : popErrorHandler();
18232 : }
18233 : #ifndef SED_HACKS
18234 : if ( bLocalUseExceptions ) {
18235 : CPLErr eclass = CPLGetLastErrorType();
18236 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18237 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18238 : }
18239 : }
18240 : #endif
18241 : }
18242 6609 : resultobj = SWIG_FromCharPtr((const char *)result);
18243 6609 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18244 : return resultobj;
18245 : fail:
18246 : return NULL;
18247 : }
18248 :
18249 :
18250 1 : SWIGINTERN PyObject *_wrap_CRSInfo_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18251 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18252 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18253 1 : void *argp1 = 0 ;
18254 1 : int res1 = 0 ;
18255 1 : PyObject *swig_obj[1] ;
18256 1 : char *result = 0 ;
18257 :
18258 1 : if (!args) SWIG_fail;
18259 1 : swig_obj[0] = args;
18260 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18261 1 : if (!SWIG_IsOK(res1)) {
18262 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18263 : }
18264 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18265 1 : {
18266 1 : const int bLocalUseExceptions = GetUseExceptions();
18267 1 : if ( bLocalUseExceptions ) {
18268 1 : pushErrorHandler();
18269 : }
18270 1 : result = (char *)OSRCRSInfo_name_get(arg1);
18271 1 : if ( bLocalUseExceptions ) {
18272 1 : popErrorHandler();
18273 : }
18274 : #ifndef SED_HACKS
18275 : if ( bLocalUseExceptions ) {
18276 : CPLErr eclass = CPLGetLastErrorType();
18277 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18278 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18279 : }
18280 : }
18281 : #endif
18282 : }
18283 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18284 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18285 : return resultobj;
18286 : fail:
18287 : return NULL;
18288 : }
18289 :
18290 :
18291 1 : SWIGINTERN PyObject *_wrap_CRSInfo_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18292 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18293 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18294 1 : void *argp1 = 0 ;
18295 1 : int res1 = 0 ;
18296 1 : PyObject *swig_obj[1] ;
18297 1 : OSRCRSType result;
18298 :
18299 1 : if (!args) SWIG_fail;
18300 1 : swig_obj[0] = args;
18301 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18302 1 : if (!SWIG_IsOK(res1)) {
18303 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_type_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18304 : }
18305 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18306 1 : {
18307 1 : const int bLocalUseExceptions = GetUseExceptions();
18308 1 : if ( bLocalUseExceptions ) {
18309 1 : pushErrorHandler();
18310 : }
18311 1 : result = (OSRCRSType)OSRCRSInfo_type_get(arg1);
18312 1 : if ( bLocalUseExceptions ) {
18313 1 : popErrorHandler();
18314 : }
18315 : #ifndef SED_HACKS
18316 : if ( bLocalUseExceptions ) {
18317 : CPLErr eclass = CPLGetLastErrorType();
18318 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18319 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18320 : }
18321 : }
18322 : #endif
18323 : }
18324 1 : resultobj = SWIG_From_int(static_cast< int >(result));
18325 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18326 : return resultobj;
18327 : fail:
18328 : return NULL;
18329 : }
18330 :
18331 :
18332 1 : SWIGINTERN PyObject *_wrap_CRSInfo_deprecated_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18333 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18334 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18335 1 : void *argp1 = 0 ;
18336 1 : int res1 = 0 ;
18337 1 : PyObject *swig_obj[1] ;
18338 1 : bool result;
18339 :
18340 1 : if (!args) SWIG_fail;
18341 1 : swig_obj[0] = args;
18342 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18343 1 : if (!SWIG_IsOK(res1)) {
18344 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_deprecated_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18345 : }
18346 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18347 1 : {
18348 1 : const int bLocalUseExceptions = GetUseExceptions();
18349 1 : if ( bLocalUseExceptions ) {
18350 1 : pushErrorHandler();
18351 : }
18352 1 : result = (bool)OSRCRSInfo_deprecated_get(arg1);
18353 1 : if ( bLocalUseExceptions ) {
18354 1 : popErrorHandler();
18355 : }
18356 : #ifndef SED_HACKS
18357 : if ( bLocalUseExceptions ) {
18358 : CPLErr eclass = CPLGetLastErrorType();
18359 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18360 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18361 : }
18362 : }
18363 : #endif
18364 : }
18365 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
18366 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18367 : return resultobj;
18368 : fail:
18369 : return NULL;
18370 : }
18371 :
18372 :
18373 1 : SWIGINTERN PyObject *_wrap_CRSInfo_bbox_valid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18374 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18375 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18376 1 : void *argp1 = 0 ;
18377 1 : int res1 = 0 ;
18378 1 : PyObject *swig_obj[1] ;
18379 1 : bool result;
18380 :
18381 1 : if (!args) SWIG_fail;
18382 1 : swig_obj[0] = args;
18383 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18384 1 : if (!SWIG_IsOK(res1)) {
18385 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_bbox_valid_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18386 : }
18387 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18388 1 : {
18389 1 : const int bLocalUseExceptions = GetUseExceptions();
18390 1 : if ( bLocalUseExceptions ) {
18391 1 : pushErrorHandler();
18392 : }
18393 1 : result = (bool)OSRCRSInfo_bbox_valid_get(arg1);
18394 1 : if ( bLocalUseExceptions ) {
18395 1 : popErrorHandler();
18396 : }
18397 : #ifndef SED_HACKS
18398 : if ( bLocalUseExceptions ) {
18399 : CPLErr eclass = CPLGetLastErrorType();
18400 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18401 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18402 : }
18403 : }
18404 : #endif
18405 : }
18406 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
18407 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18408 : return resultobj;
18409 : fail:
18410 : return NULL;
18411 : }
18412 :
18413 :
18414 1 : SWIGINTERN PyObject *_wrap_CRSInfo_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18415 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18416 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18417 1 : void *argp1 = 0 ;
18418 1 : int res1 = 0 ;
18419 1 : PyObject *swig_obj[1] ;
18420 1 : double result;
18421 :
18422 1 : if (!args) SWIG_fail;
18423 1 : swig_obj[0] = args;
18424 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18425 1 : if (!SWIG_IsOK(res1)) {
18426 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_west_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18427 : }
18428 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18429 1 : {
18430 1 : const int bLocalUseExceptions = GetUseExceptions();
18431 1 : if ( bLocalUseExceptions ) {
18432 1 : pushErrorHandler();
18433 : }
18434 1 : result = (double)OSRCRSInfo_west_lon_degree_get(arg1);
18435 1 : if ( bLocalUseExceptions ) {
18436 1 : popErrorHandler();
18437 : }
18438 : #ifndef SED_HACKS
18439 : if ( bLocalUseExceptions ) {
18440 : CPLErr eclass = CPLGetLastErrorType();
18441 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18442 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18443 : }
18444 : }
18445 : #endif
18446 : }
18447 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18448 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18449 : return resultobj;
18450 : fail:
18451 : return NULL;
18452 : }
18453 :
18454 :
18455 1 : SWIGINTERN PyObject *_wrap_CRSInfo_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18456 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18457 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18458 1 : void *argp1 = 0 ;
18459 1 : int res1 = 0 ;
18460 1 : PyObject *swig_obj[1] ;
18461 1 : double result;
18462 :
18463 1 : if (!args) SWIG_fail;
18464 1 : swig_obj[0] = args;
18465 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18466 1 : if (!SWIG_IsOK(res1)) {
18467 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_south_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18468 : }
18469 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18470 1 : {
18471 1 : const int bLocalUseExceptions = GetUseExceptions();
18472 1 : if ( bLocalUseExceptions ) {
18473 1 : pushErrorHandler();
18474 : }
18475 1 : result = (double)OSRCRSInfo_south_lat_degree_get(arg1);
18476 1 : if ( bLocalUseExceptions ) {
18477 1 : popErrorHandler();
18478 : }
18479 : #ifndef SED_HACKS
18480 : if ( bLocalUseExceptions ) {
18481 : CPLErr eclass = CPLGetLastErrorType();
18482 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18483 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18484 : }
18485 : }
18486 : #endif
18487 : }
18488 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18489 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18490 : return resultobj;
18491 : fail:
18492 : return NULL;
18493 : }
18494 :
18495 :
18496 1 : SWIGINTERN PyObject *_wrap_CRSInfo_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18497 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18498 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18499 1 : void *argp1 = 0 ;
18500 1 : int res1 = 0 ;
18501 1 : PyObject *swig_obj[1] ;
18502 1 : double result;
18503 :
18504 1 : if (!args) SWIG_fail;
18505 1 : swig_obj[0] = args;
18506 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18507 1 : if (!SWIG_IsOK(res1)) {
18508 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_east_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18509 : }
18510 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18511 1 : {
18512 1 : const int bLocalUseExceptions = GetUseExceptions();
18513 1 : if ( bLocalUseExceptions ) {
18514 1 : pushErrorHandler();
18515 : }
18516 1 : result = (double)OSRCRSInfo_east_lon_degree_get(arg1);
18517 1 : if ( bLocalUseExceptions ) {
18518 1 : popErrorHandler();
18519 : }
18520 : #ifndef SED_HACKS
18521 : if ( bLocalUseExceptions ) {
18522 : CPLErr eclass = CPLGetLastErrorType();
18523 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18524 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18525 : }
18526 : }
18527 : #endif
18528 : }
18529 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18530 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18531 : return resultobj;
18532 : fail:
18533 : return NULL;
18534 : }
18535 :
18536 :
18537 1 : SWIGINTERN PyObject *_wrap_CRSInfo_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18538 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18539 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18540 1 : void *argp1 = 0 ;
18541 1 : int res1 = 0 ;
18542 1 : PyObject *swig_obj[1] ;
18543 1 : double result;
18544 :
18545 1 : if (!args) SWIG_fail;
18546 1 : swig_obj[0] = args;
18547 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18548 1 : if (!SWIG_IsOK(res1)) {
18549 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_north_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18550 : }
18551 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18552 1 : {
18553 1 : const int bLocalUseExceptions = GetUseExceptions();
18554 1 : if ( bLocalUseExceptions ) {
18555 1 : pushErrorHandler();
18556 : }
18557 1 : result = (double)OSRCRSInfo_north_lat_degree_get(arg1);
18558 1 : if ( bLocalUseExceptions ) {
18559 1 : popErrorHandler();
18560 : }
18561 : #ifndef SED_HACKS
18562 : if ( bLocalUseExceptions ) {
18563 : CPLErr eclass = CPLGetLastErrorType();
18564 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18565 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18566 : }
18567 : }
18568 : #endif
18569 : }
18570 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18571 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18572 : return resultobj;
18573 : fail:
18574 : return NULL;
18575 : }
18576 :
18577 :
18578 1 : SWIGINTERN PyObject *_wrap_CRSInfo_area_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18579 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18580 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18581 1 : void *argp1 = 0 ;
18582 1 : int res1 = 0 ;
18583 1 : PyObject *swig_obj[1] ;
18584 1 : char *result = 0 ;
18585 :
18586 1 : if (!args) SWIG_fail;
18587 1 : swig_obj[0] = args;
18588 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18589 1 : if (!SWIG_IsOK(res1)) {
18590 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_area_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18591 : }
18592 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18593 1 : {
18594 1 : const int bLocalUseExceptions = GetUseExceptions();
18595 1 : if ( bLocalUseExceptions ) {
18596 1 : pushErrorHandler();
18597 : }
18598 1 : result = (char *)OSRCRSInfo_area_name_get(arg1);
18599 1 : if ( bLocalUseExceptions ) {
18600 1 : popErrorHandler();
18601 : }
18602 : #ifndef SED_HACKS
18603 : if ( bLocalUseExceptions ) {
18604 : CPLErr eclass = CPLGetLastErrorType();
18605 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18606 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18607 : }
18608 : }
18609 : #endif
18610 : }
18611 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18612 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18613 : return resultobj;
18614 : fail:
18615 : return NULL;
18616 : }
18617 :
18618 :
18619 1 : SWIGINTERN PyObject *_wrap_CRSInfo_projection_method_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18620 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18621 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18622 1 : void *argp1 = 0 ;
18623 1 : int res1 = 0 ;
18624 1 : PyObject *swig_obj[1] ;
18625 1 : char *result = 0 ;
18626 :
18627 1 : if (!args) SWIG_fail;
18628 1 : swig_obj[0] = args;
18629 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18630 1 : if (!SWIG_IsOK(res1)) {
18631 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_projection_method_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18632 : }
18633 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18634 1 : {
18635 1 : const int bLocalUseExceptions = GetUseExceptions();
18636 1 : if ( bLocalUseExceptions ) {
18637 1 : pushErrorHandler();
18638 : }
18639 1 : result = (char *)OSRCRSInfo_projection_method_get(arg1);
18640 1 : if ( bLocalUseExceptions ) {
18641 1 : popErrorHandler();
18642 : }
18643 : #ifndef SED_HACKS
18644 : if ( bLocalUseExceptions ) {
18645 : CPLErr eclass = CPLGetLastErrorType();
18646 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18647 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18648 : }
18649 : }
18650 : #endif
18651 : }
18652 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18653 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18654 : return resultobj;
18655 : fail:
18656 : return NULL;
18657 : }
18658 :
18659 :
18660 1 : SWIGINTERN PyObject *_wrap_CRSInfo_celestial_body_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18661 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18662 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18663 1 : void *argp1 = 0 ;
18664 1 : int res1 = 0 ;
18665 1 : PyObject *swig_obj[1] ;
18666 1 : char *result = 0 ;
18667 :
18668 1 : if (!args) SWIG_fail;
18669 1 : swig_obj[0] = args;
18670 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18671 1 : if (!SWIG_IsOK(res1)) {
18672 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_celestial_body_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18673 : }
18674 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18675 1 : {
18676 1 : const int bLocalUseExceptions = GetUseExceptions();
18677 1 : if ( bLocalUseExceptions ) {
18678 1 : pushErrorHandler();
18679 : }
18680 1 : result = (char *)OSRCRSInfo_celestial_body_name_get(arg1);
18681 1 : if ( bLocalUseExceptions ) {
18682 1 : popErrorHandler();
18683 : }
18684 : #ifndef SED_HACKS
18685 : if ( bLocalUseExceptions ) {
18686 : CPLErr eclass = CPLGetLastErrorType();
18687 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18688 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18689 : }
18690 : }
18691 : #endif
18692 : }
18693 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18694 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18695 : return resultobj;
18696 : fail:
18697 : return NULL;
18698 : }
18699 :
18700 :
18701 0 : SWIGINTERN PyObject *_wrap_new_CRSInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18702 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18703 0 : char *arg1 = (char *) 0 ;
18704 0 : char *arg2 = (char *) 0 ;
18705 0 : char *arg3 = (char *) 0 ;
18706 0 : OSRCRSType arg4 ;
18707 0 : bool arg5 ;
18708 0 : bool arg6 ;
18709 0 : double arg7 ;
18710 0 : double arg8 ;
18711 0 : double arg9 ;
18712 0 : double arg10 ;
18713 0 : char *arg11 = (char *) 0 ;
18714 0 : char *arg12 = (char *) 0 ;
18715 0 : char *arg13 = (char *) 0 ;
18716 0 : int res1 ;
18717 0 : char *buf1 = 0 ;
18718 0 : int alloc1 = 0 ;
18719 0 : int res2 ;
18720 0 : char *buf2 = 0 ;
18721 0 : int alloc2 = 0 ;
18722 0 : int res3 ;
18723 0 : char *buf3 = 0 ;
18724 0 : int alloc3 = 0 ;
18725 0 : int val4 ;
18726 0 : int ecode4 = 0 ;
18727 0 : bool val5 ;
18728 0 : int ecode5 = 0 ;
18729 0 : bool val6 ;
18730 0 : int ecode6 = 0 ;
18731 0 : double val7 ;
18732 0 : int ecode7 = 0 ;
18733 0 : double val8 ;
18734 0 : int ecode8 = 0 ;
18735 0 : double val9 ;
18736 0 : int ecode9 = 0 ;
18737 0 : double val10 ;
18738 0 : int ecode10 = 0 ;
18739 0 : int res11 ;
18740 0 : char *buf11 = 0 ;
18741 0 : int alloc11 = 0 ;
18742 0 : int res12 ;
18743 0 : char *buf12 = 0 ;
18744 0 : int alloc12 = 0 ;
18745 0 : int res13 ;
18746 0 : char *buf13 = 0 ;
18747 0 : int alloc13 = 0 ;
18748 0 : PyObject *swig_obj[13] ;
18749 0 : OSRCRSInfo *result = 0 ;
18750 :
18751 0 : if (!SWIG_Python_UnpackTuple(args, "new_CRSInfo", 13, 13, swig_obj)) SWIG_fail;
18752 0 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
18753 0 : if (!SWIG_IsOK(res1)) {
18754 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CRSInfo" "', argument " "1"" of type '" "char const *""'");
18755 : }
18756 0 : arg1 = reinterpret_cast< char * >(buf1);
18757 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
18758 0 : if (!SWIG_IsOK(res2)) {
18759 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CRSInfo" "', argument " "2"" of type '" "char const *""'");
18760 : }
18761 0 : arg2 = reinterpret_cast< char * >(buf2);
18762 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
18763 0 : if (!SWIG_IsOK(res3)) {
18764 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CRSInfo" "', argument " "3"" of type '" "char const *""'");
18765 : }
18766 0 : arg3 = reinterpret_cast< char * >(buf3);
18767 0 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
18768 0 : if (!SWIG_IsOK(ecode4)) {
18769 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CRSInfo" "', argument " "4"" of type '" "OSRCRSType""'");
18770 : }
18771 0 : arg4 = static_cast< OSRCRSType >(val4);
18772 0 : ecode5 = SWIG_AsVal_bool(swig_obj[4], &val5);
18773 0 : if (!SWIG_IsOK(ecode5)) {
18774 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CRSInfo" "', argument " "5"" of type '" "bool""'");
18775 : }
18776 0 : arg5 = static_cast< bool >(val5);
18777 0 : ecode6 = SWIG_AsVal_bool(swig_obj[5], &val6);
18778 0 : if (!SWIG_IsOK(ecode6)) {
18779 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_CRSInfo" "', argument " "6"" of type '" "bool""'");
18780 : }
18781 0 : arg6 = static_cast< bool >(val6);
18782 0 : ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
18783 0 : if (!SWIG_IsOK(ecode7)) {
18784 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CRSInfo" "', argument " "7"" of type '" "double""'");
18785 : }
18786 0 : arg7 = static_cast< double >(val7);
18787 0 : ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
18788 0 : if (!SWIG_IsOK(ecode8)) {
18789 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CRSInfo" "', argument " "8"" of type '" "double""'");
18790 : }
18791 0 : arg8 = static_cast< double >(val8);
18792 0 : ecode9 = SWIG_AsVal_double(swig_obj[8], &val9);
18793 0 : if (!SWIG_IsOK(ecode9)) {
18794 0 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_CRSInfo" "', argument " "9"" of type '" "double""'");
18795 : }
18796 0 : arg9 = static_cast< double >(val9);
18797 0 : ecode10 = SWIG_AsVal_double(swig_obj[9], &val10);
18798 0 : if (!SWIG_IsOK(ecode10)) {
18799 0 : SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_CRSInfo" "', argument " "10"" of type '" "double""'");
18800 : }
18801 0 : arg10 = static_cast< double >(val10);
18802 0 : res11 = SWIG_AsCharPtrAndSize(swig_obj[10], &buf11, NULL, &alloc11);
18803 0 : if (!SWIG_IsOK(res11)) {
18804 0 : SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_CRSInfo" "', argument " "11"" of type '" "char const *""'");
18805 : }
18806 0 : arg11 = reinterpret_cast< char * >(buf11);
18807 0 : res12 = SWIG_AsCharPtrAndSize(swig_obj[11], &buf12, NULL, &alloc12);
18808 0 : if (!SWIG_IsOK(res12)) {
18809 0 : SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_CRSInfo" "', argument " "12"" of type '" "char const *""'");
18810 : }
18811 0 : arg12 = reinterpret_cast< char * >(buf12);
18812 0 : res13 = SWIG_AsCharPtrAndSize(swig_obj[12], &buf13, NULL, &alloc13);
18813 0 : if (!SWIG_IsOK(res13)) {
18814 0 : SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "new_CRSInfo" "', argument " "13"" of type '" "char const *""'");
18815 : }
18816 0 : arg13 = reinterpret_cast< char * >(buf13);
18817 0 : {
18818 0 : if (!arg3) {
18819 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18820 : }
18821 : }
18822 0 : {
18823 0 : const int bLocalUseExceptions = GetUseExceptions();
18824 0 : if ( bLocalUseExceptions ) {
18825 0 : pushErrorHandler();
18826 : }
18827 0 : result = (OSRCRSInfo *)new_OSRCRSInfo((char const *)arg1,(char const *)arg2,(char const *)arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,(char const *)arg11,(char const *)arg12,(char const *)arg13);
18828 0 : if ( bLocalUseExceptions ) {
18829 0 : popErrorHandler();
18830 : }
18831 : #ifndef SED_HACKS
18832 : if ( bLocalUseExceptions ) {
18833 : CPLErr eclass = CPLGetLastErrorType();
18834 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18835 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18836 : }
18837 : }
18838 : #endif
18839 : }
18840 0 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCRSInfo, SWIG_POINTER_NEW | 0 );
18841 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
18842 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
18843 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
18844 0 : if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
18845 0 : if (alloc12 == SWIG_NEWOBJ) delete[] buf12;
18846 0 : if (alloc13 == SWIG_NEWOBJ) delete[] buf13;
18847 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18848 : return resultobj;
18849 0 : fail:
18850 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
18851 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
18852 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
18853 0 : if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
18854 0 : if (alloc12 == SWIG_NEWOBJ) delete[] buf12;
18855 0 : if (alloc13 == SWIG_NEWOBJ) delete[] buf13;
18856 : return NULL;
18857 : }
18858 :
18859 :
18860 6609 : SWIGINTERN PyObject *_wrap_delete_CRSInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18861 6609 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18862 6609 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18863 6609 : void *argp1 = 0 ;
18864 6609 : int res1 = 0 ;
18865 6609 : PyObject *swig_obj[1] ;
18866 :
18867 6609 : if (!args) SWIG_fail;
18868 6609 : swig_obj[0] = args;
18869 6609 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, SWIG_POINTER_DISOWN | 0 );
18870 6609 : if (!SWIG_IsOK(res1)) {
18871 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CRSInfo" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18872 : }
18873 6609 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18874 6609 : {
18875 6609 : const int bLocalUseExceptions = GetUseExceptions();
18876 6609 : if ( bLocalUseExceptions ) {
18877 6609 : pushErrorHandler();
18878 : }
18879 6609 : delete_OSRCRSInfo(arg1);
18880 6609 : if ( bLocalUseExceptions ) {
18881 6609 : popErrorHandler();
18882 : }
18883 : #ifndef SED_HACKS
18884 : if ( bLocalUseExceptions ) {
18885 : CPLErr eclass = CPLGetLastErrorType();
18886 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18887 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18888 : }
18889 : }
18890 : #endif
18891 : }
18892 6609 : resultobj = SWIG_Py_Void();
18893 6609 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18894 : return resultobj;
18895 : fail:
18896 : return NULL;
18897 : }
18898 :
18899 :
18900 285 : SWIGINTERN PyObject *CRSInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18901 285 : PyObject *obj;
18902 285 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
18903 285 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRCRSInfo, SWIG_NewClientData(obj));
18904 285 : return SWIG_Py_Void();
18905 : }
18906 :
18907 0 : SWIGINTERN PyObject *CRSInfo_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18908 0 : return SWIG_Python_InitShadowInstance(args);
18909 : }
18910 :
18911 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_auth_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18912 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18913 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18914 0 : void *argp1 = 0 ;
18915 0 : int res1 = 0 ;
18916 0 : PyObject *swig_obj[1] ;
18917 0 : char *result = 0 ;
18918 :
18919 0 : if (!args) SWIG_fail;
18920 0 : swig_obj[0] = args;
18921 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18922 0 : if (!SWIG_IsOK(res1)) {
18923 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_auth_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18924 : }
18925 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18926 0 : {
18927 0 : if (!arg1) {
18928 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18929 : }
18930 : }
18931 0 : {
18932 0 : const int bLocalUseExceptions = GetUseExceptions();
18933 0 : if ( bLocalUseExceptions ) {
18934 0 : pushErrorHandler();
18935 : }
18936 0 : result = (char *)OSRCRSInfo_auth_name_get(arg1);
18937 0 : if ( bLocalUseExceptions ) {
18938 0 : popErrorHandler();
18939 : }
18940 : #ifndef SED_HACKS
18941 : if ( bLocalUseExceptions ) {
18942 : CPLErr eclass = CPLGetLastErrorType();
18943 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18944 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18945 : }
18946 : }
18947 : #endif
18948 : }
18949 0 : resultobj = SWIG_FromCharPtr((const char *)result);
18950 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18951 : return resultobj;
18952 : fail:
18953 : return NULL;
18954 : }
18955 :
18956 :
18957 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_code_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18958 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18959 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18960 0 : void *argp1 = 0 ;
18961 0 : int res1 = 0 ;
18962 0 : PyObject *swig_obj[1] ;
18963 0 : char *result = 0 ;
18964 :
18965 0 : if (!args) SWIG_fail;
18966 0 : swig_obj[0] = args;
18967 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18968 0 : if (!SWIG_IsOK(res1)) {
18969 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_code_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18970 : }
18971 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18972 0 : {
18973 0 : if (!arg1) {
18974 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18975 : }
18976 : }
18977 0 : {
18978 0 : const int bLocalUseExceptions = GetUseExceptions();
18979 0 : if ( bLocalUseExceptions ) {
18980 0 : pushErrorHandler();
18981 : }
18982 0 : result = (char *)OSRCRSInfo_code_get(arg1);
18983 0 : if ( bLocalUseExceptions ) {
18984 0 : popErrorHandler();
18985 : }
18986 : #ifndef SED_HACKS
18987 : if ( bLocalUseExceptions ) {
18988 : CPLErr eclass = CPLGetLastErrorType();
18989 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18990 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18991 : }
18992 : }
18993 : #endif
18994 : }
18995 0 : resultobj = SWIG_FromCharPtr((const char *)result);
18996 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
18997 : return resultobj;
18998 : fail:
18999 : return NULL;
19000 : }
19001 :
19002 :
19003 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19004 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19005 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19006 0 : void *argp1 = 0 ;
19007 0 : int res1 = 0 ;
19008 0 : PyObject *swig_obj[1] ;
19009 0 : char *result = 0 ;
19010 :
19011 0 : if (!args) SWIG_fail;
19012 0 : swig_obj[0] = args;
19013 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19014 0 : if (!SWIG_IsOK(res1)) {
19015 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19016 : }
19017 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19018 0 : {
19019 0 : if (!arg1) {
19020 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19021 : }
19022 : }
19023 0 : {
19024 0 : const int bLocalUseExceptions = GetUseExceptions();
19025 0 : if ( bLocalUseExceptions ) {
19026 0 : pushErrorHandler();
19027 : }
19028 0 : result = (char *)OSRCRSInfo_name_get(arg1);
19029 0 : if ( bLocalUseExceptions ) {
19030 0 : popErrorHandler();
19031 : }
19032 : #ifndef SED_HACKS
19033 : if ( bLocalUseExceptions ) {
19034 : CPLErr eclass = CPLGetLastErrorType();
19035 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19036 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19037 : }
19038 : }
19039 : #endif
19040 : }
19041 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19042 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19043 : return resultobj;
19044 : fail:
19045 : return NULL;
19046 : }
19047 :
19048 :
19049 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19050 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19051 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19052 0 : void *argp1 = 0 ;
19053 0 : int res1 = 0 ;
19054 0 : PyObject *swig_obj[1] ;
19055 0 : OSRCRSType result;
19056 :
19057 0 : if (!args) SWIG_fail;
19058 0 : swig_obj[0] = args;
19059 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19060 0 : if (!SWIG_IsOK(res1)) {
19061 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_type_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19062 : }
19063 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19064 0 : {
19065 0 : if (!arg1) {
19066 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19067 : }
19068 : }
19069 0 : {
19070 0 : const int bLocalUseExceptions = GetUseExceptions();
19071 0 : if ( bLocalUseExceptions ) {
19072 0 : pushErrorHandler();
19073 : }
19074 0 : result = (OSRCRSType)OSRCRSInfo_type_get(arg1);
19075 0 : if ( bLocalUseExceptions ) {
19076 0 : popErrorHandler();
19077 : }
19078 : #ifndef SED_HACKS
19079 : if ( bLocalUseExceptions ) {
19080 : CPLErr eclass = CPLGetLastErrorType();
19081 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19082 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19083 : }
19084 : }
19085 : #endif
19086 : }
19087 0 : resultobj = SWIG_From_int(static_cast< int >(result));
19088 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19089 : return resultobj;
19090 : fail:
19091 : return NULL;
19092 : }
19093 :
19094 :
19095 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_deprecated_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19096 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19097 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19098 0 : void *argp1 = 0 ;
19099 0 : int res1 = 0 ;
19100 0 : PyObject *swig_obj[1] ;
19101 0 : bool result;
19102 :
19103 0 : if (!args) SWIG_fail;
19104 0 : swig_obj[0] = args;
19105 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19106 0 : if (!SWIG_IsOK(res1)) {
19107 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_deprecated_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19108 : }
19109 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19110 0 : {
19111 0 : if (!arg1) {
19112 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19113 : }
19114 : }
19115 0 : {
19116 0 : const int bLocalUseExceptions = GetUseExceptions();
19117 0 : if ( bLocalUseExceptions ) {
19118 0 : pushErrorHandler();
19119 : }
19120 0 : result = (bool)OSRCRSInfo_deprecated_get(arg1);
19121 0 : if ( bLocalUseExceptions ) {
19122 0 : popErrorHandler();
19123 : }
19124 : #ifndef SED_HACKS
19125 : if ( bLocalUseExceptions ) {
19126 : CPLErr eclass = CPLGetLastErrorType();
19127 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19128 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19129 : }
19130 : }
19131 : #endif
19132 : }
19133 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
19134 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19135 : return resultobj;
19136 : fail:
19137 : return NULL;
19138 : }
19139 :
19140 :
19141 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_bbox_valid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19142 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19143 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19144 0 : void *argp1 = 0 ;
19145 0 : int res1 = 0 ;
19146 0 : PyObject *swig_obj[1] ;
19147 0 : bool result;
19148 :
19149 0 : if (!args) SWIG_fail;
19150 0 : swig_obj[0] = args;
19151 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19152 0 : if (!SWIG_IsOK(res1)) {
19153 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_bbox_valid_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19154 : }
19155 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19156 0 : {
19157 0 : if (!arg1) {
19158 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19159 : }
19160 : }
19161 0 : {
19162 0 : const int bLocalUseExceptions = GetUseExceptions();
19163 0 : if ( bLocalUseExceptions ) {
19164 0 : pushErrorHandler();
19165 : }
19166 0 : result = (bool)OSRCRSInfo_bbox_valid_get(arg1);
19167 0 : if ( bLocalUseExceptions ) {
19168 0 : popErrorHandler();
19169 : }
19170 : #ifndef SED_HACKS
19171 : if ( bLocalUseExceptions ) {
19172 : CPLErr eclass = CPLGetLastErrorType();
19173 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19174 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19175 : }
19176 : }
19177 : #endif
19178 : }
19179 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
19180 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19181 : return resultobj;
19182 : fail:
19183 : return NULL;
19184 : }
19185 :
19186 :
19187 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19188 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19189 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19190 0 : void *argp1 = 0 ;
19191 0 : int res1 = 0 ;
19192 0 : PyObject *swig_obj[1] ;
19193 0 : double result;
19194 :
19195 0 : if (!args) SWIG_fail;
19196 0 : swig_obj[0] = args;
19197 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19198 0 : if (!SWIG_IsOK(res1)) {
19199 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_west_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19200 : }
19201 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19202 0 : {
19203 0 : if (!arg1) {
19204 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19205 : }
19206 : }
19207 0 : {
19208 0 : const int bLocalUseExceptions = GetUseExceptions();
19209 0 : if ( bLocalUseExceptions ) {
19210 0 : pushErrorHandler();
19211 : }
19212 0 : result = (double)OSRCRSInfo_west_lon_degree_get(arg1);
19213 0 : if ( bLocalUseExceptions ) {
19214 0 : popErrorHandler();
19215 : }
19216 : #ifndef SED_HACKS
19217 : if ( bLocalUseExceptions ) {
19218 : CPLErr eclass = CPLGetLastErrorType();
19219 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19220 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19221 : }
19222 : }
19223 : #endif
19224 : }
19225 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19226 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19227 : return resultobj;
19228 : fail:
19229 : return NULL;
19230 : }
19231 :
19232 :
19233 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19234 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19235 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19236 0 : void *argp1 = 0 ;
19237 0 : int res1 = 0 ;
19238 0 : PyObject *swig_obj[1] ;
19239 0 : double result;
19240 :
19241 0 : if (!args) SWIG_fail;
19242 0 : swig_obj[0] = args;
19243 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19244 0 : if (!SWIG_IsOK(res1)) {
19245 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_south_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19246 : }
19247 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19248 0 : {
19249 0 : if (!arg1) {
19250 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19251 : }
19252 : }
19253 0 : {
19254 0 : const int bLocalUseExceptions = GetUseExceptions();
19255 0 : if ( bLocalUseExceptions ) {
19256 0 : pushErrorHandler();
19257 : }
19258 0 : result = (double)OSRCRSInfo_south_lat_degree_get(arg1);
19259 0 : if ( bLocalUseExceptions ) {
19260 0 : popErrorHandler();
19261 : }
19262 : #ifndef SED_HACKS
19263 : if ( bLocalUseExceptions ) {
19264 : CPLErr eclass = CPLGetLastErrorType();
19265 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19266 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19267 : }
19268 : }
19269 : #endif
19270 : }
19271 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19272 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19273 : return resultobj;
19274 : fail:
19275 : return NULL;
19276 : }
19277 :
19278 :
19279 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19280 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19281 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19282 0 : void *argp1 = 0 ;
19283 0 : int res1 = 0 ;
19284 0 : PyObject *swig_obj[1] ;
19285 0 : double result;
19286 :
19287 0 : if (!args) SWIG_fail;
19288 0 : swig_obj[0] = args;
19289 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19290 0 : if (!SWIG_IsOK(res1)) {
19291 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_east_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19292 : }
19293 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19294 0 : {
19295 0 : if (!arg1) {
19296 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19297 : }
19298 : }
19299 0 : {
19300 0 : const int bLocalUseExceptions = GetUseExceptions();
19301 0 : if ( bLocalUseExceptions ) {
19302 0 : pushErrorHandler();
19303 : }
19304 0 : result = (double)OSRCRSInfo_east_lon_degree_get(arg1);
19305 0 : if ( bLocalUseExceptions ) {
19306 0 : popErrorHandler();
19307 : }
19308 : #ifndef SED_HACKS
19309 : if ( bLocalUseExceptions ) {
19310 : CPLErr eclass = CPLGetLastErrorType();
19311 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19312 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19313 : }
19314 : }
19315 : #endif
19316 : }
19317 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19318 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19319 : return resultobj;
19320 : fail:
19321 : return NULL;
19322 : }
19323 :
19324 :
19325 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19326 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19327 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19328 0 : void *argp1 = 0 ;
19329 0 : int res1 = 0 ;
19330 0 : PyObject *swig_obj[1] ;
19331 0 : double result;
19332 :
19333 0 : if (!args) SWIG_fail;
19334 0 : swig_obj[0] = args;
19335 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19336 0 : if (!SWIG_IsOK(res1)) {
19337 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_north_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19338 : }
19339 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19340 0 : {
19341 0 : if (!arg1) {
19342 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19343 : }
19344 : }
19345 0 : {
19346 0 : const int bLocalUseExceptions = GetUseExceptions();
19347 0 : if ( bLocalUseExceptions ) {
19348 0 : pushErrorHandler();
19349 : }
19350 0 : result = (double)OSRCRSInfo_north_lat_degree_get(arg1);
19351 0 : if ( bLocalUseExceptions ) {
19352 0 : popErrorHandler();
19353 : }
19354 : #ifndef SED_HACKS
19355 : if ( bLocalUseExceptions ) {
19356 : CPLErr eclass = CPLGetLastErrorType();
19357 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19358 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19359 : }
19360 : }
19361 : #endif
19362 : }
19363 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19364 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19365 : return resultobj;
19366 : fail:
19367 : return NULL;
19368 : }
19369 :
19370 :
19371 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_area_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19372 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19373 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19374 0 : void *argp1 = 0 ;
19375 0 : int res1 = 0 ;
19376 0 : PyObject *swig_obj[1] ;
19377 0 : char *result = 0 ;
19378 :
19379 0 : if (!args) SWIG_fail;
19380 0 : swig_obj[0] = args;
19381 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19382 0 : if (!SWIG_IsOK(res1)) {
19383 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_area_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19384 : }
19385 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19386 0 : {
19387 0 : if (!arg1) {
19388 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19389 : }
19390 : }
19391 0 : {
19392 0 : const int bLocalUseExceptions = GetUseExceptions();
19393 0 : if ( bLocalUseExceptions ) {
19394 0 : pushErrorHandler();
19395 : }
19396 0 : result = (char *)OSRCRSInfo_area_name_get(arg1);
19397 0 : if ( bLocalUseExceptions ) {
19398 0 : popErrorHandler();
19399 : }
19400 : #ifndef SED_HACKS
19401 : if ( bLocalUseExceptions ) {
19402 : CPLErr eclass = CPLGetLastErrorType();
19403 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19404 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19405 : }
19406 : }
19407 : #endif
19408 : }
19409 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19410 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19411 : return resultobj;
19412 : fail:
19413 : return NULL;
19414 : }
19415 :
19416 :
19417 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_projection_method_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19418 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19419 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19420 0 : void *argp1 = 0 ;
19421 0 : int res1 = 0 ;
19422 0 : PyObject *swig_obj[1] ;
19423 0 : char *result = 0 ;
19424 :
19425 0 : if (!args) SWIG_fail;
19426 0 : swig_obj[0] = args;
19427 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19428 0 : if (!SWIG_IsOK(res1)) {
19429 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_projection_method_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19430 : }
19431 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19432 0 : {
19433 0 : if (!arg1) {
19434 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19435 : }
19436 : }
19437 0 : {
19438 0 : const int bLocalUseExceptions = GetUseExceptions();
19439 0 : if ( bLocalUseExceptions ) {
19440 0 : pushErrorHandler();
19441 : }
19442 0 : result = (char *)OSRCRSInfo_projection_method_get(arg1);
19443 0 : if ( bLocalUseExceptions ) {
19444 0 : popErrorHandler();
19445 : }
19446 : #ifndef SED_HACKS
19447 : if ( bLocalUseExceptions ) {
19448 : CPLErr eclass = CPLGetLastErrorType();
19449 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19450 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19451 : }
19452 : }
19453 : #endif
19454 : }
19455 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19456 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19457 : return resultobj;
19458 : fail:
19459 : return NULL;
19460 : }
19461 :
19462 :
19463 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_celestial_body_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19464 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19465 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19466 0 : void *argp1 = 0 ;
19467 0 : int res1 = 0 ;
19468 0 : PyObject *swig_obj[1] ;
19469 0 : char *result = 0 ;
19470 :
19471 0 : if (!args) SWIG_fail;
19472 0 : swig_obj[0] = args;
19473 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19474 0 : if (!SWIG_IsOK(res1)) {
19475 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_celestial_body_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19476 : }
19477 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19478 0 : {
19479 0 : if (!arg1) {
19480 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19481 : }
19482 : }
19483 0 : {
19484 0 : const int bLocalUseExceptions = GetUseExceptions();
19485 0 : if ( bLocalUseExceptions ) {
19486 0 : pushErrorHandler();
19487 : }
19488 0 : result = (char *)OSRCRSInfo_celestial_body_name_get(arg1);
19489 0 : if ( bLocalUseExceptions ) {
19490 0 : popErrorHandler();
19491 : }
19492 : #ifndef SED_HACKS
19493 : if ( bLocalUseExceptions ) {
19494 : CPLErr eclass = CPLGetLastErrorType();
19495 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19496 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19497 : }
19498 : }
19499 : #endif
19500 : }
19501 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19502 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19503 : return resultobj;
19504 : fail:
19505 : return NULL;
19506 : }
19507 :
19508 :
19509 1 : SWIGINTERN PyObject *_wrap_GetAuthorityListFromDatabase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19510 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19511 1 : char **result = 0 ;
19512 :
19513 1 : if (!SWIG_Python_UnpackTuple(args, "GetAuthorityListFromDatabase", 0, 0, 0)) SWIG_fail;
19514 1 : {
19515 1 : const int bLocalUseExceptions = GetUseExceptions();
19516 1 : if ( bLocalUseExceptions ) {
19517 1 : pushErrorHandler();
19518 : }
19519 1 : result = (char **)GetAuthorityListFromDatabase();
19520 1 : if ( bLocalUseExceptions ) {
19521 1 : popErrorHandler();
19522 : }
19523 : #ifndef SED_HACKS
19524 : if ( bLocalUseExceptions ) {
19525 : CPLErr eclass = CPLGetLastErrorType();
19526 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19527 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19528 : }
19529 : }
19530 : #endif
19531 : }
19532 1 : {
19533 : /* %typemap(out) char **CSL -> ( string ) */
19534 1 : bool bErr = false;
19535 1 : resultobj = CSLToList(result, &bErr);
19536 1 : CSLDestroy(result);
19537 1 : if( bErr ) {
19538 0 : SWIG_fail;
19539 : }
19540 : }
19541 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19542 : return resultobj;
19543 : fail:
19544 : return NULL;
19545 : }
19546 :
19547 :
19548 1 : SWIGINTERN PyObject *_wrap_GetCRSInfoListFromDatabase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19549 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19550 1 : char *arg1 = (char *) 0 ;
19551 1 : OSRCRSInfo ***arg2 = (OSRCRSInfo ***) 0 ;
19552 1 : int *arg3 = (int *) 0 ;
19553 1 : int res1 ;
19554 1 : char *buf1 = 0 ;
19555 1 : int alloc1 = 0 ;
19556 1 : OSRCRSInfo **list2 = 0 ;
19557 1 : int count2 = 0 ;
19558 1 : PyObject *swig_obj[1] ;
19559 :
19560 1 : {
19561 : /* %typemap(in,numinputs=0) (OSRCRSInfo*** pList, int* pnListCount) */
19562 1 : arg2 = &list2;
19563 1 : arg3 = &count2;
19564 : }
19565 1 : if (!args) SWIG_fail;
19566 1 : swig_obj[0] = args;
19567 1 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
19568 1 : if (!SWIG_IsOK(res1)) {
19569 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetCRSInfoListFromDatabase" "', argument " "1"" of type '" "char const *""'");
19570 : }
19571 1 : arg1 = reinterpret_cast< char * >(buf1);
19572 1 : {
19573 1 : const int bLocalUseExceptions = GetUseExceptions();
19574 1 : if ( bLocalUseExceptions ) {
19575 1 : pushErrorHandler();
19576 : }
19577 1 : GetCRSInfoListFromDatabase((char const *)arg1,arg2,arg3);
19578 1 : if ( bLocalUseExceptions ) {
19579 1 : popErrorHandler();
19580 : }
19581 : #ifndef SED_HACKS
19582 : if ( bLocalUseExceptions ) {
19583 : CPLErr eclass = CPLGetLastErrorType();
19584 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19585 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19586 : }
19587 : }
19588 : #endif
19589 : }
19590 1 : resultobj = SWIG_Py_Void();
19591 1 : {
19592 : /* %typemap(argout) (OSRCRSInfo*** pList, int* pnListCount) */
19593 1 : PyObject *dict = PyTuple_New( *arg3 );
19594 6610 : for( int i = 0; i < *arg3; i++ ) {
19595 13218 : OSRCRSInfo *o = new_OSRCRSInfo( (*arg2)[i]->pszAuthName,
19596 6609 : (*arg2)[i]->pszCode,
19597 6609 : (*arg2)[i]->pszName,
19598 : (*arg2)[i]->eType,
19599 6609 : (*arg2)[i]->bDeprecated,
19600 6609 : (*arg2)[i]->bBboxValid,
19601 : (*arg2)[i]->dfWestLongitudeDeg,
19602 : (*arg2)[i]->dfSouthLatitudeDeg,
19603 : (*arg2)[i]->dfEastLongitudeDeg,
19604 : (*arg2)[i]->dfNorthLatitudeDeg,
19605 6609 : (*arg2)[i]->pszAreaName,
19606 6609 : (*arg2)[i]->pszProjectionMethod,
19607 6609 : (*arg2)[i]->pszCelestialBodyName );
19608 :
19609 6609 : PyTuple_SetItem(dict, i,
19610 : SWIG_NewPointerObj((void*)o,SWIGTYPE_p_OSRCRSInfo,1) );
19611 : }
19612 1 : Py_DECREF(resultobj);
19613 1 : resultobj = dict;
19614 : }
19615 1 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
19616 1 : {
19617 : /* %typemap(freearg) (OSRCRSInfo*** pList, int* pnListCount) */
19618 1 : OSRDestroyCRSInfoList( *(arg2) );
19619 : }
19620 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19621 : return resultobj;
19622 0 : fail:
19623 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
19624 0 : {
19625 : /* %typemap(freearg) (OSRCRSInfo*** pList, int* pnListCount) */
19626 0 : OSRDestroyCRSInfoList( *(arg2) );
19627 : }
19628 : return NULL;
19629 : }
19630 :
19631 :
19632 1 : SWIGINTERN PyObject *_wrap_SetPROJSearchPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19633 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19634 1 : char *arg1 = (char *) 0 ;
19635 1 : int bToFree1 = 0 ;
19636 1 : PyObject *swig_obj[1] ;
19637 :
19638 1 : if (!args) SWIG_fail;
19639 1 : swig_obj[0] = args;
19640 1 : {
19641 : /* %typemap(in) (const char *utf8_string) */
19642 1 : if( swig_obj[0] == Py_None )
19643 : {
19644 : arg1 = NULL;
19645 : }
19646 : else
19647 : {
19648 1 : if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
19649 : {
19650 1 : arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
19651 : }
19652 : else
19653 : {
19654 0 : arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
19655 :
19656 : }
19657 1 : if (arg1 == NULL)
19658 : {
19659 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
19660 0 : SWIG_fail;
19661 : }
19662 : }
19663 : }
19664 1 : {
19665 1 : const int bLocalUseExceptions = GetUseExceptions();
19666 1 : if ( bLocalUseExceptions ) {
19667 1 : pushErrorHandler();
19668 : }
19669 1 : SetPROJSearchPath((char const *)arg1);
19670 1 : if ( bLocalUseExceptions ) {
19671 1 : popErrorHandler();
19672 : }
19673 : #ifndef SED_HACKS
19674 : if ( bLocalUseExceptions ) {
19675 : CPLErr eclass = CPLGetLastErrorType();
19676 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19677 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19678 : }
19679 : }
19680 : #endif
19681 : }
19682 1 : resultobj = SWIG_Py_Void();
19683 1 : {
19684 : /* %typemap(freearg) (const char *utf8_string) */
19685 1 : if( arg1 != NULL )
19686 1 : GDALPythonFreeCStr(arg1, bToFree1);
19687 : }
19688 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19689 : return resultobj;
19690 0 : fail:
19691 0 : {
19692 : /* %typemap(freearg) (const char *utf8_string) */
19693 0 : if( arg1 != NULL )
19694 1 : GDALPythonFreeCStr(arg1, bToFree1);
19695 : }
19696 : return NULL;
19697 : }
19698 :
19699 :
19700 17 : SWIGINTERN PyObject *_wrap_SetPROJSearchPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19701 17 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19702 17 : char **arg1 = (char **) 0 ;
19703 17 : PyObject *swig_obj[1] ;
19704 :
19705 17 : if (!args) SWIG_fail;
19706 17 : swig_obj[0] = args;
19707 17 : {
19708 : /* %typemap(in) char **dict */
19709 17 : arg1 = NULL;
19710 17 : if ( PySequence_Check( swig_obj[0] ) ) {
19711 17 : int bErr = FALSE;
19712 17 : arg1 = CSLFromPySequence(swig_obj[0], &bErr);
19713 17 : if ( bErr )
19714 : {
19715 0 : SWIG_fail;
19716 : }
19717 : }
19718 0 : else if ( PyMapping_Check( swig_obj[0] ) ) {
19719 0 : int bErr = FALSE;
19720 0 : arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
19721 0 : if ( bErr )
19722 : {
19723 0 : SWIG_fail;
19724 : }
19725 : }
19726 : else {
19727 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
19728 0 : SWIG_fail;
19729 : }
19730 : }
19731 17 : {
19732 17 : const int bLocalUseExceptions = GetUseExceptions();
19733 17 : if ( bLocalUseExceptions ) {
19734 17 : pushErrorHandler();
19735 : }
19736 17 : SetPROJSearchPaths(arg1);
19737 17 : if ( bLocalUseExceptions ) {
19738 17 : popErrorHandler();
19739 : }
19740 : #ifndef SED_HACKS
19741 : if ( bLocalUseExceptions ) {
19742 : CPLErr eclass = CPLGetLastErrorType();
19743 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19744 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19745 : }
19746 : }
19747 : #endif
19748 : }
19749 17 : resultobj = SWIG_Py_Void();
19750 17 : {
19751 : /* %typemap(freearg) char **dict */
19752 17 : CSLDestroy( arg1 );
19753 : }
19754 17 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19755 : return resultobj;
19756 0 : fail:
19757 0 : {
19758 : /* %typemap(freearg) char **dict */
19759 0 : CSLDestroy( arg1 );
19760 : }
19761 : return NULL;
19762 : }
19763 :
19764 :
19765 24 : SWIGINTERN PyObject *_wrap_GetPROJSearchPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19766 24 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19767 24 : char **result = 0 ;
19768 :
19769 24 : if (!SWIG_Python_UnpackTuple(args, "GetPROJSearchPaths", 0, 0, 0)) SWIG_fail;
19770 24 : {
19771 24 : const int bLocalUseExceptions = GetUseExceptions();
19772 24 : if ( bLocalUseExceptions ) {
19773 24 : pushErrorHandler();
19774 : }
19775 24 : result = (char **)GetPROJSearchPaths();
19776 24 : if ( bLocalUseExceptions ) {
19777 24 : popErrorHandler();
19778 : }
19779 : #ifndef SED_HACKS
19780 : if ( bLocalUseExceptions ) {
19781 : CPLErr eclass = CPLGetLastErrorType();
19782 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19783 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19784 : }
19785 : }
19786 : #endif
19787 : }
19788 24 : {
19789 : /* %typemap(out) char **CSL -> ( string ) */
19790 24 : bool bErr = false;
19791 24 : resultobj = CSLToList(result, &bErr);
19792 24 : CSLDestroy(result);
19793 24 : if( bErr ) {
19794 0 : SWIG_fail;
19795 : }
19796 : }
19797 24 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19798 : return resultobj;
19799 : fail:
19800 : return NULL;
19801 : }
19802 :
19803 :
19804 81 : SWIGINTERN PyObject *_wrap_GetPROJVersionMajor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19805 81 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19806 81 : int result;
19807 :
19808 81 : if (!SWIG_Python_UnpackTuple(args, "GetPROJVersionMajor", 0, 0, 0)) SWIG_fail;
19809 81 : {
19810 81 : const int bLocalUseExceptions = GetUseExceptions();
19811 81 : if ( bLocalUseExceptions ) {
19812 77 : pushErrorHandler();
19813 : }
19814 81 : result = (int)GetPROJVersionMajor();
19815 81 : if ( bLocalUseExceptions ) {
19816 77 : popErrorHandler();
19817 : }
19818 : #ifndef SED_HACKS
19819 : if ( bLocalUseExceptions ) {
19820 : CPLErr eclass = CPLGetLastErrorType();
19821 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19822 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19823 : }
19824 : }
19825 : #endif
19826 : }
19827 81 : resultobj = SWIG_From_int(static_cast< int >(result));
19828 81 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19829 : return resultobj;
19830 0 : fail:
19831 0 : return NULL;
19832 : }
19833 :
19834 :
19835 75 : SWIGINTERN PyObject *_wrap_GetPROJVersionMinor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19836 75 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19837 75 : int result;
19838 :
19839 75 : if (!SWIG_Python_UnpackTuple(args, "GetPROJVersionMinor", 0, 0, 0)) SWIG_fail;
19840 75 : {
19841 75 : const int bLocalUseExceptions = GetUseExceptions();
19842 75 : if ( bLocalUseExceptions ) {
19843 74 : pushErrorHandler();
19844 : }
19845 75 : result = (int)GetPROJVersionMinor();
19846 75 : if ( bLocalUseExceptions ) {
19847 74 : popErrorHandler();
19848 : }
19849 : #ifndef SED_HACKS
19850 : if ( bLocalUseExceptions ) {
19851 : CPLErr eclass = CPLGetLastErrorType();
19852 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19853 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19854 : }
19855 : }
19856 : #endif
19857 : }
19858 75 : resultobj = SWIG_From_int(static_cast< int >(result));
19859 75 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19860 : return resultobj;
19861 0 : fail:
19862 0 : return NULL;
19863 : }
19864 :
19865 :
19866 63 : SWIGINTERN PyObject *_wrap_GetPROJVersionMicro(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19867 63 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19868 63 : int result;
19869 :
19870 63 : if (!SWIG_Python_UnpackTuple(args, "GetPROJVersionMicro", 0, 0, 0)) SWIG_fail;
19871 63 : {
19872 63 : const int bLocalUseExceptions = GetUseExceptions();
19873 63 : if ( bLocalUseExceptions ) {
19874 63 : pushErrorHandler();
19875 : }
19876 63 : result = (int)GetPROJVersionMicro();
19877 63 : if ( bLocalUseExceptions ) {
19878 63 : popErrorHandler();
19879 : }
19880 : #ifndef SED_HACKS
19881 : if ( bLocalUseExceptions ) {
19882 : CPLErr eclass = CPLGetLastErrorType();
19883 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19884 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19885 : }
19886 : }
19887 : #endif
19888 : }
19889 63 : resultobj = SWIG_From_int(static_cast< int >(result));
19890 63 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19891 : return resultobj;
19892 0 : fail:
19893 0 : return NULL;
19894 : }
19895 :
19896 :
19897 0 : SWIGINTERN PyObject *_wrap_GetPROJEnableNetwork(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19898 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19899 0 : bool result;
19900 :
19901 0 : if (!SWIG_Python_UnpackTuple(args, "GetPROJEnableNetwork", 0, 0, 0)) SWIG_fail;
19902 0 : {
19903 0 : const int bLocalUseExceptions = GetUseExceptions();
19904 0 : if ( bLocalUseExceptions ) {
19905 0 : pushErrorHandler();
19906 : }
19907 0 : result = (bool)GetPROJEnableNetwork();
19908 0 : if ( bLocalUseExceptions ) {
19909 0 : popErrorHandler();
19910 : }
19911 : #ifndef SED_HACKS
19912 : if ( bLocalUseExceptions ) {
19913 : CPLErr eclass = CPLGetLastErrorType();
19914 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19915 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19916 : }
19917 : }
19918 : #endif
19919 : }
19920 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
19921 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19922 : return resultobj;
19923 0 : fail:
19924 0 : return NULL;
19925 : }
19926 :
19927 :
19928 0 : SWIGINTERN PyObject *_wrap_SetPROJEnableNetwork(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19929 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19930 0 : bool arg1 ;
19931 0 : bool val1 ;
19932 0 : int ecode1 = 0 ;
19933 0 : PyObject *swig_obj[1] ;
19934 :
19935 0 : if (!args) SWIG_fail;
19936 0 : swig_obj[0] = args;
19937 0 : ecode1 = SWIG_AsVal_bool(swig_obj[0], &val1);
19938 0 : if (!SWIG_IsOK(ecode1)) {
19939 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetPROJEnableNetwork" "', argument " "1"" of type '" "bool""'");
19940 : }
19941 0 : arg1 = static_cast< bool >(val1);
19942 0 : {
19943 0 : const int bLocalUseExceptions = GetUseExceptions();
19944 0 : if ( bLocalUseExceptions ) {
19945 0 : pushErrorHandler();
19946 : }
19947 0 : SetPROJEnableNetwork(arg1);
19948 0 : if ( bLocalUseExceptions ) {
19949 0 : popErrorHandler();
19950 : }
19951 : #ifndef SED_HACKS
19952 : if ( bLocalUseExceptions ) {
19953 : CPLErr eclass = CPLGetLastErrorType();
19954 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19955 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19956 : }
19957 : }
19958 : #endif
19959 : }
19960 0 : resultobj = SWIG_Py_Void();
19961 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19962 : return resultobj;
19963 : fail:
19964 : return NULL;
19965 : }
19966 :
19967 :
19968 1 : SWIGINTERN PyObject *_wrap_SetPROJAuxDbPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19969 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19970 1 : char *arg1 = (char *) 0 ;
19971 1 : int bToFree1 = 0 ;
19972 1 : PyObject *swig_obj[1] ;
19973 :
19974 1 : if (!args) SWIG_fail;
19975 1 : swig_obj[0] = args;
19976 1 : {
19977 : /* %typemap(in) (const char *utf8_string) */
19978 1 : if( swig_obj[0] == Py_None )
19979 : {
19980 : arg1 = NULL;
19981 : }
19982 : else
19983 : {
19984 1 : if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
19985 : {
19986 1 : arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
19987 : }
19988 : else
19989 : {
19990 0 : arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
19991 :
19992 : }
19993 1 : if (arg1 == NULL)
19994 : {
19995 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
19996 0 : SWIG_fail;
19997 : }
19998 : }
19999 : }
20000 1 : {
20001 1 : const int bLocalUseExceptions = GetUseExceptions();
20002 1 : if ( bLocalUseExceptions ) {
20003 1 : pushErrorHandler();
20004 : }
20005 1 : SetPROJAuxDbPath((char const *)arg1);
20006 1 : if ( bLocalUseExceptions ) {
20007 1 : popErrorHandler();
20008 : }
20009 : #ifndef SED_HACKS
20010 : if ( bLocalUseExceptions ) {
20011 : CPLErr eclass = CPLGetLastErrorType();
20012 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20013 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20014 : }
20015 : }
20016 : #endif
20017 : }
20018 1 : resultobj = SWIG_Py_Void();
20019 1 : {
20020 : /* %typemap(freearg) (const char *utf8_string) */
20021 1 : if( arg1 != NULL )
20022 1 : GDALPythonFreeCStr(arg1, bToFree1);
20023 : }
20024 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20025 : return resultobj;
20026 0 : fail:
20027 0 : {
20028 : /* %typemap(freearg) (const char *utf8_string) */
20029 0 : if( arg1 != NULL )
20030 1 : GDALPythonFreeCStr(arg1, bToFree1);
20031 : }
20032 : return NULL;
20033 : }
20034 :
20035 :
20036 0 : SWIGINTERN PyObject *_wrap_SetPROJAuxDbPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20037 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20038 0 : char **arg1 = (char **) 0 ;
20039 0 : PyObject *swig_obj[1] ;
20040 :
20041 0 : if (!args) SWIG_fail;
20042 0 : swig_obj[0] = args;
20043 0 : {
20044 : /* %typemap(in) char **dict */
20045 0 : arg1 = NULL;
20046 0 : if ( PySequence_Check( swig_obj[0] ) ) {
20047 0 : int bErr = FALSE;
20048 0 : arg1 = CSLFromPySequence(swig_obj[0], &bErr);
20049 0 : if ( bErr )
20050 : {
20051 0 : SWIG_fail;
20052 : }
20053 : }
20054 0 : else if ( PyMapping_Check( swig_obj[0] ) ) {
20055 0 : int bErr = FALSE;
20056 0 : arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
20057 0 : if ( bErr )
20058 : {
20059 0 : SWIG_fail;
20060 : }
20061 : }
20062 : else {
20063 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
20064 0 : SWIG_fail;
20065 : }
20066 : }
20067 0 : {
20068 0 : const int bLocalUseExceptions = GetUseExceptions();
20069 0 : if ( bLocalUseExceptions ) {
20070 0 : pushErrorHandler();
20071 : }
20072 0 : SetPROJAuxDbPaths(arg1);
20073 0 : if ( bLocalUseExceptions ) {
20074 0 : popErrorHandler();
20075 : }
20076 : #ifndef SED_HACKS
20077 : if ( bLocalUseExceptions ) {
20078 : CPLErr eclass = CPLGetLastErrorType();
20079 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20080 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20081 : }
20082 : }
20083 : #endif
20084 : }
20085 0 : resultobj = SWIG_Py_Void();
20086 0 : {
20087 : /* %typemap(freearg) char **dict */
20088 0 : CSLDestroy( arg1 );
20089 : }
20090 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20091 : return resultobj;
20092 0 : fail:
20093 0 : {
20094 : /* %typemap(freearg) char **dict */
20095 0 : CSLDestroy( arg1 );
20096 : }
20097 : return NULL;
20098 : }
20099 :
20100 :
20101 0 : SWIGINTERN PyObject *_wrap_GetPROJAuxDbPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20102 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20103 0 : char **result = 0 ;
20104 :
20105 0 : if (!SWIG_Python_UnpackTuple(args, "GetPROJAuxDbPaths", 0, 0, 0)) SWIG_fail;
20106 0 : {
20107 0 : const int bLocalUseExceptions = GetUseExceptions();
20108 0 : if ( bLocalUseExceptions ) {
20109 0 : pushErrorHandler();
20110 : }
20111 0 : result = (char **)GetPROJAuxDbPaths();
20112 0 : if ( bLocalUseExceptions ) {
20113 0 : popErrorHandler();
20114 : }
20115 : #ifndef SED_HACKS
20116 : if ( bLocalUseExceptions ) {
20117 : CPLErr eclass = CPLGetLastErrorType();
20118 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20119 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20120 : }
20121 : }
20122 : #endif
20123 : }
20124 0 : {
20125 : /* %typemap(out) char **CSL -> ( string ) */
20126 0 : bool bErr = false;
20127 0 : resultobj = CSLToList(result, &bErr);
20128 0 : CSLDestroy(result);
20129 0 : if( bErr ) {
20130 0 : SWIG_fail;
20131 : }
20132 : }
20133 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
20134 : return resultobj;
20135 : fail:
20136 : return NULL;
20137 : }
20138 :
20139 :
20140 : static PyMethodDef SwigMethods[] = {
20141 : { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
20142 : { "GetUseExceptions", _wrap_GetUseExceptions, METH_NOARGS, "GetUseExceptions() -> int"},
20143 : { "_GetExceptionsLocal", _wrap__GetExceptionsLocal, METH_NOARGS, "_GetExceptionsLocal() -> int"},
20144 : { "_SetExceptionsLocal", _wrap__SetExceptionsLocal, METH_O, "_SetExceptionsLocal(bVal)"},
20145 : { "_UseExceptions", _wrap__UseExceptions, METH_NOARGS, "_UseExceptions()"},
20146 : { "_DontUseExceptions", _wrap__DontUseExceptions, METH_NOARGS, "_DontUseExceptions()"},
20147 : { "_UserHasSpecifiedIfUsingExceptions", _wrap__UserHasSpecifiedIfUsingExceptions, METH_NOARGS, "_UserHasSpecifiedIfUsingExceptions() -> int"},
20148 : { "GetWellKnownGeogCSAsWKT", _wrap_GetWellKnownGeogCSAsWKT, METH_O, "GetWellKnownGeogCSAsWKT(name) -> OGRErr"},
20149 : { "GetUserInputAsWKT", _wrap_GetUserInputAsWKT, METH_O, "GetUserInputAsWKT(name) -> OGRErr"},
20150 : { "AreaOfUse_west_lon_degree_get", _wrap_AreaOfUse_west_lon_degree_get, METH_O, "AreaOfUse_west_lon_degree_get(self) -> double"},
20151 : { "AreaOfUse_south_lat_degree_get", _wrap_AreaOfUse_south_lat_degree_get, METH_O, "AreaOfUse_south_lat_degree_get(self) -> double"},
20152 : { "AreaOfUse_east_lon_degree_get", _wrap_AreaOfUse_east_lon_degree_get, METH_O, "AreaOfUse_east_lon_degree_get(self) -> double"},
20153 : { "AreaOfUse_north_lat_degree_get", _wrap_AreaOfUse_north_lat_degree_get, METH_O, "AreaOfUse_north_lat_degree_get(self) -> double"},
20154 : { "AreaOfUse_name_get", _wrap_AreaOfUse_name_get, METH_O, "AreaOfUse_name_get(self) -> char *"},
20155 : { "new_AreaOfUse", _wrap_new_AreaOfUse, METH_VARARGS, "new_AreaOfUse(west_lon_degree, south_lat_degree, east_lon_degree, north_lat_degree, name) -> AreaOfUse"},
20156 : { "delete_AreaOfUse", _wrap_delete_AreaOfUse, METH_O, "delete_AreaOfUse(self)"},
20157 : { "AreaOfUse_swigregister", AreaOfUse_swigregister, METH_O, NULL},
20158 : { "AreaOfUse_swiginit", AreaOfUse_swiginit, METH_VARARGS, NULL},
20159 : { "OSRAreaOfUse_west_lon_degree_get", _wrap_OSRAreaOfUse_west_lon_degree_get, METH_O, "OSRAreaOfUse_west_lon_degree_get(area) -> double"},
20160 : { "OSRAreaOfUse_south_lat_degree_get", _wrap_OSRAreaOfUse_south_lat_degree_get, METH_O, "OSRAreaOfUse_south_lat_degree_get(area) -> double"},
20161 : { "OSRAreaOfUse_east_lon_degree_get", _wrap_OSRAreaOfUse_east_lon_degree_get, METH_O, "OSRAreaOfUse_east_lon_degree_get(area) -> double"},
20162 : { "OSRAreaOfUse_north_lat_degree_get", _wrap_OSRAreaOfUse_north_lat_degree_get, METH_O, "OSRAreaOfUse_north_lat_degree_get(area) -> double"},
20163 : { "OSRAreaOfUse_name_get", _wrap_OSRAreaOfUse_name_get, METH_O, "OSRAreaOfUse_name_get(area) -> char const *"},
20164 : { "new_SpatialReference", (PyCFunction)(void(*)(void))_wrap_new_SpatialReference, METH_VARARGS|METH_KEYWORDS, "\n"
20165 : "new_SpatialReference(wkt=\"\") -> SpatialReference\n"
20166 : "\n"
20167 : "Python proxy of an :cpp:class:`OGRSpatialReference`.\n"
20168 : "\n"
20169 : "Create a new spatial reference object. An empty object will be created\n"
20170 : "unless exactly one of the following parameters is provided.\n"
20171 : "\n"
20172 : "Parameters\n"
20173 : "----------\n"
20174 : "name : str or dict, optional\n"
20175 : " SRS description in a format understood by :py:meth:`SetFromUserInput`.\n"
20176 : "epsg : int, optional\n"
20177 : " EPSG CRS code, as understood by :py:meth:`ImportFromEPSG`\n"
20178 : "wkt : str, optional\n"
20179 : " WKT CRS string, as understood by :py:meth:`ImportFromWkt`\n"
20180 : "\n"
20181 : "Examples\n"
20182 : "--------\n"
20183 : ">>> osr.SpatialReference(epsg=5646).GetName()\n"
20184 : "'NAD83 / Vermont (ftUS)'\n"
20185 : ">>> osr.SpatialReference('+proj=utm +zone=18 +datum=WGS84').GetUTMZone()\n"
20186 : "18\n"
20187 : "\n"
20188 : ""},
20189 : { "delete_SpatialReference", _wrap_delete_SpatialReference, METH_O, "delete_SpatialReference(self)"},
20190 : { "SpatialReference___str__", _wrap_SpatialReference___str__, METH_O, "SpatialReference___str__(self) -> retStringAndCPLFree *"},
20191 : { "SpatialReference_GetName", _wrap_SpatialReference_GetName, METH_O, "\n"
20192 : "SpatialReference_GetName(self) -> char const *\n"
20193 : "\n"
20194 : "\n"
20195 : "Return the CRS name.\n"
20196 : "\n"
20197 : "See :cpp:func:`OGRSpatialReference::GetName`.\n"
20198 : "\n"
20199 : "Returns\n"
20200 : "-------\n"
20201 : "str\n"
20202 : "\n"
20203 : "Examples\n"
20204 : "--------\n"
20205 : ">>> vt_sp = osr.SpatialReference()\n"
20206 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20207 : "0\n"
20208 : ">>> vt_sp.GetName()\n"
20209 : "'NAD83 / Vermont (ftUS)'\n"
20210 : "\n"
20211 : "\n"
20212 : ""},
20213 : { "SpatialReference_GetCelestialBodyName", _wrap_SpatialReference_GetCelestialBodyName, METH_O, "SpatialReference_GetCelestialBodyName(self) -> char const *"},
20214 : { "SpatialReference_IsSame", (PyCFunction)(void(*)(void))_wrap_SpatialReference_IsSame, METH_VARARGS|METH_KEYWORDS, "\n"
20215 : "SpatialReference_IsSame(self, rhs, options=None) -> int\n"
20216 : "\n"
20217 : "\n"
20218 : "Determine if two spatial references describe the same system.\n"
20219 : "\n"
20220 : "See :cpp:func:`OGRSpatialReference::IsSame`.\n"
20221 : "\n"
20222 : "Parameters\n"
20223 : "----------\n"
20224 : "rhs : SpatialReference\n"
20225 : "options : list or dict\n"
20226 : "\n"
20227 : "Returns\n"
20228 : "-------\n"
20229 : "int\n"
20230 : " 1 if the spatial references describe the same system, 0 otherwise\n"
20231 : "\n"
20232 : "\n"
20233 : ""},
20234 : { "SpatialReference_IsSameGeogCS", _wrap_SpatialReference_IsSameGeogCS, METH_VARARGS, "\n"
20235 : "SpatialReference_IsSameGeogCS(self, rhs) -> int\n"
20236 : "\n"
20237 : "\n"
20238 : "Determine if two spatial references share the same geographic coordinate system.\n"
20239 : "\n"
20240 : "See :cpp:func:`OGRSpatialReference::IsSameGeogCS`.\n"
20241 : "\n"
20242 : "Parameters\n"
20243 : "----------\n"
20244 : "rhs : SpatialReference\n"
20245 : "options : list or dict\n"
20246 : "\n"
20247 : "Returns\n"
20248 : "-------\n"
20249 : "int\n"
20250 : " 1 if the spatial references have the same GeogCS, 0 otherwise\n"
20251 : "\n"
20252 : "\n"
20253 : ""},
20254 : { "SpatialReference_IsSameVertCS", _wrap_SpatialReference_IsSameVertCS, METH_VARARGS, "\n"
20255 : "SpatialReference_IsSameVertCS(self, rhs) -> int\n"
20256 : "\n"
20257 : "\n"
20258 : "Determine if two spatial references share the same vertical coordinate system.\n"
20259 : "\n"
20260 : "See :cpp:func:`OGRSpatialReference::IsSameVertCS`.\n"
20261 : "\n"
20262 : "Parameters\n"
20263 : "----------\n"
20264 : "rhs : SpatialReference\n"
20265 : "options : list or dict\n"
20266 : "\n"
20267 : "Returns\n"
20268 : "-------\n"
20269 : "int\n"
20270 : " 1 if the spatial references have the same VertCS, 0 otherwise\n"
20271 : "\n"
20272 : "\n"
20273 : ""},
20274 : { "SpatialReference_IsGeographic", _wrap_SpatialReference_IsGeographic, METH_O, "\n"
20275 : "SpatialReference_IsGeographic(self) -> int\n"
20276 : "\n"
20277 : "\n"
20278 : "Check if this SRS is a geographic coordinate system.\n"
20279 : "\n"
20280 : "See :cpp:func:`OGRSpatialReference::IsGeographic`.\n"
20281 : "\n"
20282 : "Returns\n"
20283 : "-------\n"
20284 : "int\n"
20285 : " 1 if the SRS is geographic, 0 otherwise\n"
20286 : "\n"
20287 : ""},
20288 : { "SpatialReference_IsDerivedGeographic", _wrap_SpatialReference_IsDerivedGeographic, METH_O, "\n"
20289 : "SpatialReference_IsDerivedGeographic(self) -> int\n"
20290 : "\n"
20291 : "\n"
20292 : "Check if this CRS is a derived geographic CRS, such as a rotated long/lat grid.\n"
20293 : "\n"
20294 : "See :cpp:func:`OGRSpatialReference::IsDerivedGeographic`.\n"
20295 : "\n"
20296 : "Returns\n"
20297 : "-------\n"
20298 : "int\n"
20299 : " 1 if the CRS is derived geographic, 0 otherwise\n"
20300 : "\n"
20301 : ""},
20302 : { "SpatialReference_IsProjected", _wrap_SpatialReference_IsProjected, METH_O, "\n"
20303 : "SpatialReference_IsProjected(self) -> int\n"
20304 : "\n"
20305 : "\n"
20306 : "Check if this SRS is a projected coordinate system.\n"
20307 : "\n"
20308 : "See :cpp:func:`OGRSpatialReference::IsProjected`.\n"
20309 : "\n"
20310 : "Returns\n"
20311 : "-------\n"
20312 : "int\n"
20313 : " 1 if the SRS is projected, 0 otherwise\n"
20314 : "\n"
20315 : ""},
20316 : { "SpatialReference_IsDerivedProjected", _wrap_SpatialReference_IsDerivedProjected, METH_O, "SpatialReference_IsDerivedProjected(self) -> int"},
20317 : { "SpatialReference_IsCompound", _wrap_SpatialReference_IsCompound, METH_O, "\n"
20318 : "SpatialReference_IsCompound(self) -> int\n"
20319 : "\n"
20320 : "\n"
20321 : "Check if this CRS is a compound CRS.\n"
20322 : "\n"
20323 : "See :cpp:func:`OGRSpatialReference::IsCompound`.\n"
20324 : "\n"
20325 : "Returns\n"
20326 : "-------\n"
20327 : "int\n"
20328 : " 1 if the CRS is compound, 0 otherwise\n"
20329 : "\n"
20330 : ""},
20331 : { "SpatialReference_IsGeocentric", _wrap_SpatialReference_IsGeocentric, METH_O, "\n"
20332 : "SpatialReference_IsGeocentric(self) -> int\n"
20333 : "\n"
20334 : "\n"
20335 : "Check if this SRS is a geocentric coordinate system.\n"
20336 : "\n"
20337 : "See :cpp:func:`OGRSpatialReference::IsGeocentric`.\n"
20338 : "\n"
20339 : "Returns\n"
20340 : "-------\n"
20341 : "int\n"
20342 : " 1 if the SRS is geocentric, 0 otherwise\n"
20343 : "\n"
20344 : ""},
20345 : { "SpatialReference_IsLocal", _wrap_SpatialReference_IsLocal, METH_O, "\n"
20346 : "SpatialReference_IsLocal(self) -> int\n"
20347 : "\n"
20348 : "\n"
20349 : "Check if this CRS is a local CRS.\n"
20350 : "\n"
20351 : "See :cpp:func:`OGRSpatialReference::IsLocal`.\n"
20352 : "\n"
20353 : "Returns\n"
20354 : "-------\n"
20355 : "int\n"
20356 : " 1 if the SRS is local, 0 otherwise\n"
20357 : "\n"
20358 : ""},
20359 : { "SpatialReference_IsVertical", _wrap_SpatialReference_IsVertical, METH_O, "\n"
20360 : "SpatialReference_IsVertical(self) -> int\n"
20361 : "\n"
20362 : "\n"
20363 : "Check if this is a vertical coordinate system.\n"
20364 : "\n"
20365 : "See :cpp:func:`OGRSpatialReference::IsVertical`.\n"
20366 : "\n"
20367 : "Returns\n"
20368 : "-------\n"
20369 : "int\n"
20370 : " 1 if the CRS is vertical, 0 otherwise\n"
20371 : "\n"
20372 : "\n"
20373 : ""},
20374 : { "SpatialReference_IsDynamic", _wrap_SpatialReference_IsDynamic, METH_O, "\n"
20375 : "SpatialReference_IsDynamic(self) -> bool\n"
20376 : "\n"
20377 : "\n"
20378 : "Check if this CRS is a dynamic coordinate CRS.\n"
20379 : "\n"
20380 : "See :cpp:func:`OGRSpatialReference::IsDynamic`.\n"
20381 : "\n"
20382 : "Returns\n"
20383 : "-------\n"
20384 : "bool\n"
20385 : "\n"
20386 : ""},
20387 : { "SpatialReference_HasPointMotionOperation", _wrap_SpatialReference_HasPointMotionOperation, METH_O, "\n"
20388 : "SpatialReference_HasPointMotionOperation(self) -> bool\n"
20389 : "\n"
20390 : "\n"
20391 : "Check if a CRS has an associated point motion operation.\n"
20392 : "\n"
20393 : "See :cpp:func:`OGRSpatialReference::HasPointMotionOperation`.\n"
20394 : "\n"
20395 : "Returns\n"
20396 : "-------\n"
20397 : "bool\n"
20398 : "\n"
20399 : "\n"
20400 : ""},
20401 : { "SpatialReference_GetCoordinateEpoch", _wrap_SpatialReference_GetCoordinateEpoch, METH_O, "\n"
20402 : "SpatialReference_GetCoordinateEpoch(self) -> double\n"
20403 : "\n"
20404 : "\n"
20405 : "Return the coordinate epoch as a decimal year.\n"
20406 : "\n"
20407 : "See :cpp:func:`OGRSpatialReference::GetCoordinateEpoch`.\n"
20408 : "\n"
20409 : "Returns\n"
20410 : "-------\n"
20411 : "float\n"
20412 : " coordinate epoch as a decimal year, or 0 if not set/relevant\n"
20413 : "\n"
20414 : "\n"
20415 : ""},
20416 : { "SpatialReference_SetCoordinateEpoch", _wrap_SpatialReference_SetCoordinateEpoch, METH_VARARGS, "SpatialReference_SetCoordinateEpoch(self, coordinateEpoch)"},
20417 : { "SpatialReference_EPSGTreatsAsLatLong", _wrap_SpatialReference_EPSGTreatsAsLatLong, METH_O, "SpatialReference_EPSGTreatsAsLatLong(self) -> int"},
20418 : { "SpatialReference_EPSGTreatsAsNorthingEasting", _wrap_SpatialReference_EPSGTreatsAsNorthingEasting, METH_O, "SpatialReference_EPSGTreatsAsNorthingEasting(self) -> int"},
20419 : { "SpatialReference_SetAuthority", _wrap_SpatialReference_SetAuthority, METH_VARARGS, "SpatialReference_SetAuthority(self, pszTargetKey, pszAuthority, nCode) -> OGRErr"},
20420 : { "SpatialReference_GetAttrValue", _wrap_SpatialReference_GetAttrValue, METH_VARARGS, "\n"
20421 : "SpatialReference_GetAttrValue(self, name, child=0) -> char const *\n"
20422 : "\n"
20423 : "\n"
20424 : "Fetch indicated attribute of named node.\n"
20425 : "\n"
20426 : "See :cpp:func:`OGRSpatialReference::GetAttrValue`.\n"
20427 : "\n"
20428 : "Parameters\n"
20429 : "----------\n"
20430 : "name : str\n"
20431 : " tree node to look for (case insensitive)\n"
20432 : "child : int, default = 0\n"
20433 : " 0-indexed child of the node\n"
20434 : "\n"
20435 : "Returns\n"
20436 : "-------\n"
20437 : "str\n"
20438 : "\n"
20439 : "Examples\n"
20440 : "--------\n"
20441 : ">>> vt_sp = osr.SpatialReference()\n"
20442 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20443 : "0\n"
20444 : ">>> vt_sp.GetAttrValue('UNIT', 0)\n"
20445 : "'US survey foot'\n"
20446 : "\n"
20447 : "\n"
20448 : ""},
20449 : { "SpatialReference_SetAttrValue", _wrap_SpatialReference_SetAttrValue, METH_VARARGS, "SpatialReference_SetAttrValue(self, name, value) -> OGRErr"},
20450 : { "SpatialReference_SetAngularUnits", _wrap_SpatialReference_SetAngularUnits, METH_VARARGS, "SpatialReference_SetAngularUnits(self, name, to_radians) -> OGRErr"},
20451 : { "SpatialReference_GetAngularUnits", _wrap_SpatialReference_GetAngularUnits, METH_O, "\n"
20452 : "SpatialReference_GetAngularUnits(self) -> double\n"
20453 : "\n"
20454 : "\n"
20455 : "Fetch conversion between angular geographic coordinate system units and radians.\n"
20456 : "\n"
20457 : "See :cpp:func:`OGRSpatialReference::GetAngularUnits`.\n"
20458 : "\n"
20459 : "Returns\n"
20460 : "-------\n"
20461 : "float\n"
20462 : " Value to multiply angular distances by to transform them to radians.\n"
20463 : "\n"
20464 : "Examples\n"
20465 : "--------\n"
20466 : ">>> srs = osr.SpatialReference()\n"
20467 : ">>> srs.ImportFromEPSG(4326)\n"
20468 : "0\n"
20469 : ">>> srs.GetAngularUnits()\n"
20470 : "0.017453292519943295\n"
20471 : "\n"
20472 : "\n"
20473 : ""},
20474 : { "SpatialReference_GetAngularUnitsName", _wrap_SpatialReference_GetAngularUnitsName, METH_O, "\n"
20475 : "SpatialReference_GetAngularUnitsName(self) -> char const *\n"
20476 : "\n"
20477 : "\n"
20478 : "Fetch angular geographic coordinate system units.\n"
20479 : "\n"
20480 : "See :cpp:func:`OGRSpatialReference::GetAngularUnits`.\n"
20481 : "\n"
20482 : "Returns\n"
20483 : "-------\n"
20484 : "str\n"
20485 : "\n"
20486 : "Examples\n"
20487 : "--------\n"
20488 : ">>> srs = osr.SpatialReference()\n"
20489 : ">>> srs.ImportFromEPSG(4326)\n"
20490 : "0\n"
20491 : ">>> srs.GetAngularUnitsName()\n"
20492 : "'degree'\n"
20493 : "\n"
20494 : "\n"
20495 : ""},
20496 : { "SpatialReference_SetTargetLinearUnits", _wrap_SpatialReference_SetTargetLinearUnits, METH_VARARGS, "SpatialReference_SetTargetLinearUnits(self, target, name, to_meters) -> OGRErr"},
20497 : { "SpatialReference_SetLinearUnits", _wrap_SpatialReference_SetLinearUnits, METH_VARARGS, "SpatialReference_SetLinearUnits(self, name, to_meters) -> OGRErr"},
20498 : { "SpatialReference_SetLinearUnitsAndUpdateParameters", _wrap_SpatialReference_SetLinearUnitsAndUpdateParameters, METH_VARARGS, "SpatialReference_SetLinearUnitsAndUpdateParameters(self, name, to_meters) -> OGRErr"},
20499 : { "SpatialReference_GetTargetLinearUnits", _wrap_SpatialReference_GetTargetLinearUnits, METH_VARARGS, "\n"
20500 : "SpatialReference_GetTargetLinearUnits(self, target_key) -> double\n"
20501 : "\n"
20502 : "\n"
20503 : "Fetch linear units for a target.\n"
20504 : "\n"
20505 : "See :cpp:func:`OGRSpatialReference::GetTargetLinearUnits`.\n"
20506 : "\n"
20507 : "Parameters\n"
20508 : "----------\n"
20509 : "target_key : str\n"
20510 : " key to look un, such as 'PROJCS' or 'VERT_CS'\n"
20511 : "\n"
20512 : "Returns\n"
20513 : "-------\n"
20514 : "double\n"
20515 : "\n"
20516 : "\n"
20517 : ""},
20518 : { "SpatialReference_GetLinearUnits", _wrap_SpatialReference_GetLinearUnits, METH_O, "\n"
20519 : "SpatialReference_GetLinearUnits(self) -> double\n"
20520 : "\n"
20521 : "\n"
20522 : "Fetch the conversion between linear projection units and meters.\n"
20523 : "\n"
20524 : "See :cpp:func:`OGRSpatialReference::GetLinearUnits`.\n"
20525 : "\n"
20526 : "Returns\n"
20527 : "-------\n"
20528 : "float\n"
20529 : "\n"
20530 : "Examples\n"
20531 : "--------\n"
20532 : ">>> vt_sp = osr.SpatialReference()\n"
20533 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20534 : "0\n"
20535 : ">>> vt_sp.GetLinearUnits()\n"
20536 : "0.30480060960121924\n"
20537 : "\n"
20538 : "\n"
20539 : ""},
20540 : { "SpatialReference_GetLinearUnitsName", _wrap_SpatialReference_GetLinearUnitsName, METH_O, "\n"
20541 : "SpatialReference_GetLinearUnitsName(self) -> char const *\n"
20542 : "\n"
20543 : "\n"
20544 : "Fetch the name of the linear projection units.\n"
20545 : "\n"
20546 : "See :cpp:func:`OGRSpatialReference::GetLinearUnits`.\n"
20547 : "\n"
20548 : "Returns\n"
20549 : "-------\n"
20550 : "str\n"
20551 : "\n"
20552 : "Examples\n"
20553 : "--------\n"
20554 : ">>> vt_sp = osr.SpatialReference()\n"
20555 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20556 : "0\n"
20557 : ">>> vt_sp.GetLinearUnitsName()\n"
20558 : "'US survey foot'\n"
20559 : "\n"
20560 : "\n"
20561 : ""},
20562 : { "SpatialReference_GetAuthorityCode", _wrap_SpatialReference_GetAuthorityCode, METH_VARARGS, "\n"
20563 : "SpatialReference_GetAuthorityCode(self, target_key=None) -> char const *\n"
20564 : "\n"
20565 : "\n"
20566 : "Get the authority code for a node.\n"
20567 : "\n"
20568 : "See :cpp:func:`OGRSpatialReference::GetAuthorityCode`.\n"
20569 : "\n"
20570 : "Parameters\n"
20571 : "----------\n"
20572 : "target_key : str\n"
20573 : " the partial or complete path to the node to get an authority from\n"
20574 : " (e.g., 'PROJCS', 'GEOGCS' or ``None`` to get an authority code\n"
20575 : " on the root element)\n"
20576 : "\n"
20577 : "Returns\n"
20578 : "-------\n"
20579 : "str or None\n"
20580 : " Returns a string on success or ``None`` on failure.\n"
20581 : "\n"
20582 : "Examples\n"
20583 : "--------\n"
20584 : ">>> srs = osr.SpatialReference()\n"
20585 : ">>> srs.ImportFromEPSG(4326)\n"
20586 : "0\n"
20587 : ">>> srs.GetAuthorityName('DATUM')\n"
20588 : "'EPSG'\n"
20589 : ">>> srs.GetAuthorityCode('DATUM')\n"
20590 : "'6326'\n"
20591 : ">>> srs.GetAuthorityCode(None)\n"
20592 : "'4326'\n"
20593 : "\n"
20594 : "\n"
20595 : ""},
20596 : { "SpatialReference_GetAuthorityName", _wrap_SpatialReference_GetAuthorityName, METH_VARARGS, "\n"
20597 : "SpatialReference_GetAuthorityName(self, target_key=None) -> char const *\n"
20598 : "\n"
20599 : "\n"
20600 : "Get the authority name for a node.\n"
20601 : "\n"
20602 : "See :cpp:func:`OGRSpatialReference::GetAuthorityName`.\n"
20603 : "\n"
20604 : "Parameters\n"
20605 : "----------\n"
20606 : "target_key : str\n"
20607 : " the partial or complete path to the node to get an authority from\n"
20608 : " (e.g., 'PROJCS', 'GEOGCS' or ``None`` to get an authority name\n"
20609 : " on the root element)\n"
20610 : "\n"
20611 : "Returns\n"
20612 : "-------\n"
20613 : "str\n"
20614 : "\n"
20615 : ""},
20616 : { "SpatialReference_GetAreaOfUse", _wrap_SpatialReference_GetAreaOfUse, METH_O, "\n"
20617 : "SpatialReference_GetAreaOfUse(self) -> AreaOfUse\n"
20618 : "\n"
20619 : "\n"
20620 : "Return the area of use of the SRS.\n"
20621 : "\n"
20622 : "See :cpp:func:`OGRSpatialReference::GetAreaOfUse`.\n"
20623 : "\n"
20624 : "Returns\n"
20625 : "-------\n"
20626 : "AreaOfUse\n"
20627 : " object providing a description of the area of use as well as bounding parallels / meridians\n"
20628 : "\n"
20629 : "Examples\n"
20630 : "--------\n"
20631 : "\n"
20632 : ">>> vt_sp = osr.SpatialReference()\n"
20633 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20634 : "0\n"
20635 : ">>> aou = vt_sp.GetAreaOfUse()\n"
20636 : ">>> aou.name\n"
20637 : "'United States (USA) - Vermont - counties of Addison; Bennington; Caledonia; Chittenden; Essex; Franklin; Grand Isle; Lamoille; Orange; Orleans; Rutland; Washington; Windham; Windsor.'\n"
20638 : ">>> aou.west_lon_degree, aou.south_lat_degree, aou.east_lon_degree, aou.north_lat_degree\n"
20639 : "(-73.44, 42.72, -71.5, 45.03)\n"
20640 : "\n"
20641 : "\n"
20642 : ""},
20643 : { "SpatialReference_GetAxisName", _wrap_SpatialReference_GetAxisName, METH_VARARGS, "\n"
20644 : "SpatialReference_GetAxisName(self, target_key, iAxis) -> char const *\n"
20645 : "\n"
20646 : "\n"
20647 : "Fetch an axis description.\n"
20648 : "\n"
20649 : "See :cpp:func:`OGRSpatialReference::GetAxis`.\n"
20650 : "\n"
20651 : "Parameters\n"
20652 : "----------\n"
20653 : "target_key : str\n"
20654 : " The portion of the coordinate system, either 'GEOGCS' or 'PROJCS'\n"
20655 : "iAxis : int\n"
20656 : " The 0-based index of the axis to fetch\n"
20657 : "\n"
20658 : "Returns\n"
20659 : "-------\n"
20660 : "str\n"
20661 : "\n"
20662 : "Examples\n"
20663 : "--------\n"
20664 : ">>> srs = osr.SpatialReference()\n"
20665 : ">>> srs.ImportFromEPSG(4979)\n"
20666 : "0\n"
20667 : ">>> for i in range(3):\n"
20668 : "... srs.GetAxisName('GEOGCS', i)\n"
20669 : "...\n"
20670 : "'Geodetic latitude'\n"
20671 : "'Geodetic longitude'\n"
20672 : "'Ellipsoidal height'\n"
20673 : "\n"
20674 : "\n"
20675 : ""},
20676 : { "SpatialReference_GetAxesCount", _wrap_SpatialReference_GetAxesCount, METH_O, "\n"
20677 : "SpatialReference_GetAxesCount(self) -> int\n"
20678 : "\n"
20679 : "\n"
20680 : "Return the number of axes of the coordinate system of the CRS.\n"
20681 : "\n"
20682 : "See :cpp:func:`OGRSpatialReference::GetAxesCount`.\n"
20683 : "\n"
20684 : "Returns\n"
20685 : "-------\n"
20686 : "int\n"
20687 : "\n"
20688 : "Examples\n"
20689 : "--------\n"
20690 : ">>> srs = osr.SpatialReference()\n"
20691 : ">>> srs.ImportFromEPSG(4326)\n"
20692 : "0\n"
20693 : ">>> srs.GetAxesCount()\n"
20694 : "2\n"
20695 : ">>> srs.ImportFromEPSG(4979)\n"
20696 : "0\n"
20697 : ">>> srs.GetAxesCount()\n"
20698 : "3\n"
20699 : "\n"
20700 : ""},
20701 : { "SpatialReference_GetAxisOrientation", _wrap_SpatialReference_GetAxisOrientation, METH_VARARGS, "\n"
20702 : "SpatialReference_GetAxisOrientation(self, target_key, iAxis) -> OGRAxisOrientation\n"
20703 : "\n"
20704 : "\n"
20705 : "Fetch an axis orientation.\n"
20706 : "\n"
20707 : "See :cpp:func:`OGRSpatialReference::GetAxis`.\n"
20708 : "\n"
20709 : "Parameters\n"
20710 : "----------\n"
20711 : "target_key : str\n"
20712 : " The portion of the coordinate system, either 'GEOGCS' or 'PROJCS'\n"
20713 : "iAxis : int\n"
20714 : " The 0-based index of the axis to fetch\n"
20715 : "\n"
20716 : "Returns\n"
20717 : "-------\n"
20718 : "int\n"
20719 : "\n"
20720 : "Examples\n"
20721 : "--------\n"
20722 : ">>> srs = osr.SpatialReference()\n"
20723 : ">>> srs.ImportFromEPSG(4979)\n"
20724 : "0\n"
20725 : ">>> srs.GetAxisOrientation('GEOGCS', 0) == osr.OAO_North\n"
20726 : "True\n"
20727 : ">>> srs.GetAxisOrientation('GEOGCS', 1) == osr.OAO_East\n"
20728 : "True\n"
20729 : ">>> srs.GetAxisOrientation('GEOGCS', 2) == osr.OAO_Up\n"
20730 : "True\n"
20731 : "\n"
20732 : ""},
20733 : { "SpatialReference_GetAxisMappingStrategy", _wrap_SpatialReference_GetAxisMappingStrategy, METH_O, "\n"
20734 : "SpatialReference_GetAxisMappingStrategy(self) -> OSRAxisMappingStrategy\n"
20735 : "\n"
20736 : "\n"
20737 : "Return the data axis to CRS axis mapping strategy:\n"
20738 : "\n"
20739 : "- :py:const:`OAMS_TRADITIONAL_GIS_ORDER` means that for geographic CRS\n"
20740 : " with lag/long order, the data will still be long/lat ordered. Similarly\n"
20741 : " for a projected CRS with northing/easting order, the data will still be\n"
20742 : " easting/northing ordered.\n"
20743 : "- :py:const:`OAMS_AUTHORITY_COMPLIANT` means that the data axis will be\n"
20744 : " identical to the CRS axis.\n"
20745 : "- :py:const:`OAMS_CUSTOM` means that the ordering is defined with\n"
20746 : " :py:meth:`SetDataAxisToSRSAxisMapping`.\n"
20747 : "\n"
20748 : "See :cpp:func:`OGRSpatialReference::GetAxisMappingStrategy`.\n"
20749 : "\n"
20750 : "Returns\n"
20751 : "-------\n"
20752 : "int\n"
20753 : "\n"
20754 : "\n"
20755 : ""},
20756 : { "SpatialReference_SetAxisMappingStrategy", _wrap_SpatialReference_SetAxisMappingStrategy, METH_VARARGS, "SpatialReference_SetAxisMappingStrategy(self, strategy)"},
20757 : { "SpatialReference_GetDataAxisToSRSAxisMapping", _wrap_SpatialReference_GetDataAxisToSRSAxisMapping, METH_O, "\n"
20758 : "SpatialReference_GetDataAxisToSRSAxisMapping(self)\n"
20759 : "\n"
20760 : "\n"
20761 : "Return the data axis to SRS axis mapping.\n"
20762 : "\n"
20763 : "See :cpp:func:`OGRSpatialReference::GetDataAxisToSRSAxisMapping`.\n"
20764 : "\n"
20765 : "Returns\n"
20766 : "-------\n"
20767 : "tuple\n"
20768 : "\n"
20769 : "\n"
20770 : ""},
20771 : { "SpatialReference_SetDataAxisToSRSAxisMapping", _wrap_SpatialReference_SetDataAxisToSRSAxisMapping, METH_VARARGS, "SpatialReference_SetDataAxisToSRSAxisMapping(self, nList) -> OGRErr"},
20772 : { "SpatialReference_SetUTM", _wrap_SpatialReference_SetUTM, METH_VARARGS, "SpatialReference_SetUTM(self, zone, north=1) -> OGRErr"},
20773 : { "SpatialReference_GetUTMZone", _wrap_SpatialReference_GetUTMZone, METH_O, "\n"
20774 : "SpatialReference_GetUTMZone(self) -> int\n"
20775 : "\n"
20776 : "\n"
20777 : "Get UTM zone.\n"
20778 : "\n"
20779 : "See :cpp:func:`OGRSpatialReference::GetUTMZone`.\n"
20780 : "\n"
20781 : "Returns\n"
20782 : "-------\n"
20783 : "int\n"
20784 : " UTM zone number. Negative in the southern hemisphere and positive in the northern hemisphere. If the SRS is not UTM, zero will be returned.\n"
20785 : "\n"
20786 : "\n"
20787 : ""},
20788 : { "SpatialReference_SetStatePlane", _wrap_SpatialReference_SetStatePlane, METH_VARARGS, "SpatialReference_SetStatePlane(self, zone, is_nad83=1, unitsname=\"\", units=0.0) -> OGRErr"},
20789 : { "SpatialReference_AutoIdentifyEPSG", _wrap_SpatialReference_AutoIdentifyEPSG, METH_O, "\n"
20790 : "SpatialReference_AutoIdentifyEPSG(self) -> OGRErr\n"
20791 : "\n"
20792 : "\n"
20793 : "Add an EPSG authority code to the CRS\n"
20794 : "where an aspect of the coordinate system can be easily and safely\n"
20795 : "corresponded with an EPSG identifier.\n"
20796 : "\n"
20797 : "See :cpp:func:`OGRSpatialReference::AutoIdentifyEPSG`.\n"
20798 : "\n"
20799 : "Returns\n"
20800 : "-------\n"
20801 : "int\n"
20802 : " :py:const:`OGRERR_NONE` or :py:const:`OGRERR_UNSUPPORTED_SRS`.\n"
20803 : "\n"
20804 : "\n"
20805 : ""},
20806 : { "SpatialReference_FindMatches", _wrap_SpatialReference_FindMatches, METH_VARARGS, "SpatialReference_FindMatches(self, options=None)"},
20807 : { "SpatialReference_SetProjection", _wrap_SpatialReference_SetProjection, METH_VARARGS, "SpatialReference_SetProjection(self, arg) -> OGRErr"},
20808 : { "SpatialReference_SetProjParm", _wrap_SpatialReference_SetProjParm, METH_VARARGS, "SpatialReference_SetProjParm(self, name, val) -> OGRErr"},
20809 : { "SpatialReference_GetProjParm", _wrap_SpatialReference_GetProjParm, METH_VARARGS, "\n"
20810 : "SpatialReference_GetProjParm(self, name, default_val=0.0) -> double\n"
20811 : "\n"
20812 : "\n"
20813 : "Fetch a projection parameter value.\n"
20814 : "\n"
20815 : "See :cpp:func:`OGRSpatialReference::GetProjParm`.\n"
20816 : "\n"
20817 : "Parameters\n"
20818 : "----------\n"
20819 : "name : str\n"
20820 : " parameter name, available as constants prefixed with `SRS_PP`.\n"
20821 : "default_val : float, default = 0.0\n"
20822 : " value to return if this parameter doesn't exist\n"
20823 : "\n"
20824 : "Returns\n"
20825 : "-------\n"
20826 : "float\n"
20827 : "\n"
20828 : "Examples\n"
20829 : "--------\n"
20830 : ">>> vt_sp = osr.SpatialReference()\n"
20831 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20832 : "0\n"
20833 : ">>> vt_sp.GetProjParm(osr.SRS_PP_FALSE_EASTING)\n"
20834 : "1640416.6667\n"
20835 : ">>> vt_sp.GetProjParm(osr.SRS_PP_FALSE_NORTHING)\n"
20836 : "0.0\n"
20837 : "\n"
20838 : "\n"
20839 : ""},
20840 : { "SpatialReference_SetNormProjParm", _wrap_SpatialReference_SetNormProjParm, METH_VARARGS, "SpatialReference_SetNormProjParm(self, name, val) -> OGRErr"},
20841 : { "SpatialReference_GetNormProjParm", _wrap_SpatialReference_GetNormProjParm, METH_VARARGS, "\n"
20842 : "SpatialReference_GetNormProjParm(self, name, default_val=0.0) -> double\n"
20843 : "\n"
20844 : "\n"
20845 : "Fetch a normalized projection parameter value.\n"
20846 : "\n"
20847 : "This method is the same as :py:meth:`GetProjParm` except that the value of the\n"
20848 : "parameter is normalized into degrees or meters depending on whether it is\n"
20849 : "linear or angular.\n"
20850 : "\n"
20851 : "See :cpp:func:`OGRSpatialReference::GetNormProjParm`.\n"
20852 : "\n"
20853 : "Parameters\n"
20854 : "----------\n"
20855 : "name : str\n"
20856 : " parameter name, available as constants prefixed with `SRS_PP`.\n"
20857 : "default_val : float, default = 0.0\n"
20858 : " value to return if this parameter doesn't exist\n"
20859 : "\n"
20860 : "Returns\n"
20861 : "-------\n"
20862 : "float\n"
20863 : "\n"
20864 : "Examples\n"
20865 : "--------\n"
20866 : ">>> vt_sp = osr.SpatialReference()\n"
20867 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20868 : "0\n"
20869 : ">>> vt_sp.GetProjParm(osr.SRS_PP_FALSE_EASTING)\n"
20870 : "1640416.6667\n"
20871 : ">>> vt_sp.GetNormProjParm(osr.SRS_PP_FALSE_EASTING)\n"
20872 : "500000.0000101601\n"
20873 : "\n"
20874 : "\n"
20875 : ""},
20876 : { "SpatialReference_GetSemiMajor", _wrap_SpatialReference_GetSemiMajor, METH_O, "\n"
20877 : "SpatialReference_GetSemiMajor(self) -> double\n"
20878 : "\n"
20879 : "\n"
20880 : "Get spheroid semi major axis (in meters starting with GDAL 3.0)\n"
20881 : "\n"
20882 : "See :cpp:func:`OGRSpatialReference::GetSemiMajor`.\n"
20883 : "\n"
20884 : "Returns\n"
20885 : "-------\n"
20886 : "float\n"
20887 : " semi-major axis, or :py:const:`SRS_WGS84_SEMIMAJOR` if it cannot be found.\n"
20888 : "\n"
20889 : ""},
20890 : { "SpatialReference_GetSemiMinor", _wrap_SpatialReference_GetSemiMinor, METH_O, "\n"
20891 : "SpatialReference_GetSemiMinor(self) -> double\n"
20892 : "\n"
20893 : "\n"
20894 : "Get spheroid semi minor axis.\n"
20895 : "\n"
20896 : "See :cpp:func:`OGRSpatialReference::GetSemiMinor`.\n"
20897 : "\n"
20898 : "Returns\n"
20899 : "-------\n"
20900 : "float\n"
20901 : " semi-minor axis, or :py:const:`SRS_WGS84_SEMIMINOR` if it cannot be found.\n"
20902 : "\n"
20903 : ""},
20904 : { "SpatialReference_GetInvFlattening", _wrap_SpatialReference_GetInvFlattening, METH_O, "\n"
20905 : "SpatialReference_GetInvFlattening(self) -> double\n"
20906 : "\n"
20907 : "\n"
20908 : "Get the spheroid inverse flattening.\n"
20909 : "\n"
20910 : "See :cpp:func:`OGRSpatialReference::GetInvFlattening`.\n"
20911 : "\n"
20912 : "Returns\n"
20913 : "-------\n"
20914 : "float\n"
20915 : "\n"
20916 : "Examples\n"
20917 : "--------\n"
20918 : ">>> srs = osr.SpatialReference()\n"
20919 : ">>> srs.ImportFromEPSG(4326) # WGS84\n"
20920 : "0\n"
20921 : ">>> srs.GetInvFlattening()\n"
20922 : "298.257223563\n"
20923 : ">>> srs.ImportFromEPSG(4269) # NAD83\n"
20924 : "0\n"
20925 : ">>> srs.GetInvFlattening()\n"
20926 : "298.257222101\n"
20927 : "\n"
20928 : ""},
20929 : { "SpatialReference_SetACEA", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetACEA, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetACEA(self, stdp1, stdp2, clat, clong, fe, fn) -> OGRErr"},
20930 : { "SpatialReference_SetAE", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetAE, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetAE(self, clat, clong, fe, fn) -> OGRErr"},
20931 : { "SpatialReference_SetBonne", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetBonne, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetBonne(self, stdp, cm, fe, fn) -> OGRErr"},
20932 : { "SpatialReference_SetCEA", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetCEA, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetCEA(self, stdp1, cm, fe, fn) -> OGRErr"},
20933 : { "SpatialReference_SetCS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetCS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetCS(self, clat, clong, fe, fn) -> OGRErr"},
20934 : { "SpatialReference_SetEC", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEC, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEC(self, stdp1, stdp2, clat, clong, fe, fn) -> OGRErr"},
20935 : { "SpatialReference_SetEckertIV", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEckertIV, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEckertIV(self, cm, fe, fn) -> OGRErr"},
20936 : { "SpatialReference_SetEckertVI", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEckertVI, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEckertVI(self, cm, fe, fn) -> OGRErr"},
20937 : { "SpatialReference_SetEquirectangular", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEquirectangular, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEquirectangular(self, clat, clong, fe, fn) -> OGRErr"},
20938 : { "SpatialReference_SetEquirectangular2", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEquirectangular2, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEquirectangular2(self, clat, clong, pseudostdparallellat, fe, fn) -> OGRErr"},
20939 : { "SpatialReference_SetGaussSchreiberTMercator", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGaussSchreiberTMercator, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGaussSchreiberTMercator(self, clat, clong, sc, fe, fn) -> OGRErr"},
20940 : { "SpatialReference_SetGS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGS(self, cm, fe, fn) -> OGRErr"},
20941 : { "SpatialReference_SetGH", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGH, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGH(self, cm, fe, fn) -> OGRErr"},
20942 : { "SpatialReference_SetIGH", _wrap_SpatialReference_SetIGH, METH_O, "SpatialReference_SetIGH(self) -> OGRErr"},
20943 : { "SpatialReference_SetGEOS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGEOS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGEOS(self, cm, satelliteheight, fe, fn) -> OGRErr"},
20944 : { "SpatialReference_SetGnomonic", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGnomonic, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGnomonic(self, clat, clong, fe, fn) -> OGRErr"},
20945 : { "SpatialReference_SetHOM", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetHOM, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetHOM(self, clat, clong, azimuth, recttoskew, scale, fe, fn) -> OGRErr"},
20946 : { "SpatialReference_SetHOM2PNO", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetHOM2PNO, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetHOM2PNO(self, clat, dfLat1, dfLong1, dfLat2, dfLong2, scale, fe, fn) -> OGRErr"},
20947 : { "SpatialReference_SetKrovak", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetKrovak, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetKrovak(self, clat, clong, azimuth, pseudostdparallellat, scale, fe, fn) -> OGRErr"},
20948 : { "SpatialReference_SetLAEA", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetLAEA, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetLAEA(self, clat, clong, fe, fn) -> OGRErr"},
20949 : { "SpatialReference_SetLCC", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetLCC, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetLCC(self, stdp1, stdp2, clat, clong, fe, fn) -> OGRErr"},
20950 : { "SpatialReference_SetLCC1SP", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetLCC1SP, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetLCC1SP(self, clat, clong, scale, fe, fn) -> OGRErr"},
20951 : { "SpatialReference_SetLCCB", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetLCCB, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetLCCB(self, stdp1, stdp2, clat, clong, fe, fn) -> OGRErr"},
20952 : { "SpatialReference_SetMC", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetMC, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetMC(self, clat, clong, fe, fn) -> OGRErr"},
20953 : { "SpatialReference_SetMercator", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetMercator, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetMercator(self, clat, clong, scale, fe, fn) -> OGRErr"},
20954 : { "SpatialReference_SetMercator2SP", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetMercator2SP, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetMercator2SP(self, stdp1, clat, clong, fe, fn) -> OGRErr"},
20955 : { "SpatialReference_SetMollweide", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetMollweide, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetMollweide(self, cm, fe, fn) -> OGRErr"},
20956 : { "SpatialReference_SetNZMG", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetNZMG, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetNZMG(self, clat, clong, fe, fn) -> OGRErr"},
20957 : { "SpatialReference_SetOS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetOS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetOS(self, dfOriginLat, dfCMeridian, scale, fe, fn) -> OGRErr"},
20958 : { "SpatialReference_SetOrthographic", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetOrthographic, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetOrthographic(self, clat, clong, fe, fn) -> OGRErr"},
20959 : { "SpatialReference_SetPolyconic", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetPolyconic, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetPolyconic(self, clat, clong, fe, fn) -> OGRErr"},
20960 : { "SpatialReference_SetPS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetPS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetPS(self, clat, clong, scale, fe, fn) -> OGRErr"},
20961 : { "SpatialReference_SetRobinson", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetRobinson, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetRobinson(self, clong, fe, fn) -> OGRErr"},
20962 : { "SpatialReference_SetSinusoidal", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetSinusoidal, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetSinusoidal(self, clong, fe, fn) -> OGRErr"},
20963 : { "SpatialReference_SetStereographic", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetStereographic, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetStereographic(self, clat, clong, scale, fe, fn) -> OGRErr"},
20964 : { "SpatialReference_SetSOC", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetSOC, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetSOC(self, latitudeoforigin, cm, fe, fn) -> OGRErr"},
20965 : { "SpatialReference_SetTM", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetTM, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetTM(self, clat, clong, scale, fe, fn) -> OGRErr"},
20966 : { "SpatialReference_SetTMVariant", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetTMVariant, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetTMVariant(self, pszVariantName, clat, clong, scale, fe, fn) -> OGRErr"},
20967 : { "SpatialReference_SetTMG", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetTMG, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetTMG(self, clat, clong, fe, fn) -> OGRErr"},
20968 : { "SpatialReference_SetTMSO", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetTMSO, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetTMSO(self, clat, clong, scale, fe, fn) -> OGRErr"},
20969 : { "SpatialReference_SetVDG", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetVDG, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetVDG(self, clong, fe, fn) -> OGRErr"},
20970 : { "SpatialReference_SetVerticalPerspective", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetVerticalPerspective, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetVerticalPerspective(self, topoOriginLat, topoOriginLon, topoOriginHeight, viewPointHeight, fe, fn) -> OGRErr"},
20971 : { "SpatialReference_SetWellKnownGeogCS", _wrap_SpatialReference_SetWellKnownGeogCS, METH_VARARGS, "SpatialReference_SetWellKnownGeogCS(self, name) -> OGRErr"},
20972 : { "SpatialReference_SetFromUserInput", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetFromUserInput, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetFromUserInput(self, name, options=None) -> OGRErr"},
20973 : { "SpatialReference_CopyGeogCSFrom", _wrap_SpatialReference_CopyGeogCSFrom, METH_VARARGS, "SpatialReference_CopyGeogCSFrom(self, rhs) -> OGRErr"},
20974 : { "SpatialReference_SetTOWGS84", _wrap_SpatialReference_SetTOWGS84, METH_VARARGS, "SpatialReference_SetTOWGS84(self, p1, p2, p3, p4=0.0, p5=0.0, p6=0.0, p7=0.0) -> OGRErr"},
20975 : { "SpatialReference_HasTOWGS84", _wrap_SpatialReference_HasTOWGS84, METH_O, "\n"
20976 : "SpatialReference_HasTOWGS84(self) -> bool\n"
20977 : "\n"
20978 : "\n"
20979 : "Return whether the SRS has a TOWGS84 parameter.\n"
20980 : "\n"
20981 : "See :cpp:func:`OGRSpatialReference::GetTOWGS84`.\n"
20982 : "\n"
20983 : "Returns\n"
20984 : "-------\n"
20985 : "bool\n"
20986 : "\n"
20987 : "\n"
20988 : ""},
20989 : { "SpatialReference_GetTOWGS84", _wrap_SpatialReference_GetTOWGS84, METH_O, "\n"
20990 : "SpatialReference_GetTOWGS84(self) -> OGRErr\n"
20991 : "\n"
20992 : "\n"
20993 : "Fetch TOWGS84 parameter, if available.\n"
20994 : "\n"
20995 : "See :cpp:func:`OGRSpatialReference::GetTOWGS84`.\n"
20996 : "\n"
20997 : "Returns\n"
20998 : "-------\n"
20999 : "tuple\n"
21000 : "\n"
21001 : "\n"
21002 : ""},
21003 : { "SpatialReference_AddGuessedTOWGS84", _wrap_SpatialReference_AddGuessedTOWGS84, METH_O, "SpatialReference_AddGuessedTOWGS84(self) -> OGRErr"},
21004 : { "SpatialReference_SetLocalCS", _wrap_SpatialReference_SetLocalCS, METH_VARARGS, "SpatialReference_SetLocalCS(self, pszName) -> OGRErr"},
21005 : { "SpatialReference_SetGeogCS", _wrap_SpatialReference_SetGeogCS, METH_VARARGS, "SpatialReference_SetGeogCS(self, pszGeogName, pszDatumName, pszEllipsoidName, dfSemiMajor, dfInvFlattening, pszPMName=\"Greenwich\", dfPMOffset=0.0, pszUnits=\"degree\", dfConvertToRadians=0.0174532925199433) -> OGRErr"},
21006 : { "SpatialReference_SetProjCS", _wrap_SpatialReference_SetProjCS, METH_VARARGS, "SpatialReference_SetProjCS(self, name=\"unnamed\") -> OGRErr"},
21007 : { "SpatialReference_SetGeocCS", _wrap_SpatialReference_SetGeocCS, METH_VARARGS, "SpatialReference_SetGeocCS(self, name=\"unnamed\") -> OGRErr"},
21008 : { "SpatialReference_SetVertCS", _wrap_SpatialReference_SetVertCS, METH_VARARGS, "SpatialReference_SetVertCS(self, VertCSName=\"unnamed\", VertDatumName=\"unnamed\", VertDatumType=0) -> OGRErr"},
21009 : { "SpatialReference_SetCompoundCS", _wrap_SpatialReference_SetCompoundCS, METH_VARARGS, "SpatialReference_SetCompoundCS(self, name, horizcs, vertcs) -> OGRErr"},
21010 : { "SpatialReference_ImportFromWkt", _wrap_SpatialReference_ImportFromWkt, METH_VARARGS, "\n"
21011 : "SpatialReference_ImportFromWkt(self, ppszInput) -> OGRErr\n"
21012 : "\n"
21013 : "\n"
21014 : "Import from WKT string.\n"
21015 : "\n"
21016 : "See :cpp:func:`OGRSpatialReference::importFromWkt`.\n"
21017 : "\n"
21018 : "Parameters\n"
21019 : "----------\n"
21020 : "ppszInput : str\n"
21021 : " WKT string\n"
21022 : "\n"
21023 : "Returns\n"
21024 : "-------\n"
21025 : "int\n"
21026 : " :py:const:`OGRERR_NONE` if import succeeds, or :py:const:`OGRERR_CORRUPT_DATA` if it fails for any reason.\n"
21027 : "\n"
21028 : "\n"
21029 : ""},
21030 : { "SpatialReference_ImportFromProj4", _wrap_SpatialReference_ImportFromProj4, METH_VARARGS, "\n"
21031 : "SpatialReference_ImportFromProj4(self, ppszInput) -> OGRErr\n"
21032 : "\n"
21033 : "\n"
21034 : "Initialize SRS based on PROJ coordinate string.\n"
21035 : "\n"
21036 : "See :cpp:func:`OGRSpatialReference::importFromProj4`.\n"
21037 : "\n"
21038 : "Parameters\n"
21039 : "----------\n"
21040 : "ppszInput : str\n"
21041 : " PROJ coordinate string\n"
21042 : "\n"
21043 : "Returns\n"
21044 : "-------\n"
21045 : "int\n"
21046 : " :py:const:`OGRERR_NONE` on success, or :py:const:`OGRERR_CORRUPT_DATA` on failure\n"
21047 : "\n"
21048 : "Examples\n"
21049 : "--------\n"
21050 : ">>> srs = osr.SpatialReference()\n"
21051 : ">>> srs.ImportFromProj4('+proj=utm +zone=18 +datum=WGS84')\n"
21052 : "0\n"
21053 : "\n"
21054 : ""},
21055 : { "SpatialReference_ImportFromUrl", _wrap_SpatialReference_ImportFromUrl, METH_VARARGS, "\n"
21056 : "SpatialReference_ImportFromUrl(self, url) -> OGRErr\n"
21057 : "\n"
21058 : "\n"
21059 : "Initialize SRS based on a URL.\n"
21060 : "\n"
21061 : "This method will download the spatial reference at a given URL and\n"
21062 : "feed it into :py:meth:`SetFromUserInput` for you.\n"
21063 : "\n"
21064 : "See :cpp:func:`OGRSpatialReference::importFromUrl`.\n"
21065 : "\n"
21066 : "Parameters\n"
21067 : "----------\n"
21068 : "url : str\n"
21069 : "\n"
21070 : "Returns\n"
21071 : "-------\n"
21072 : "int\n"
21073 : " :py:const:`OGRERR_NONE` on success, or an error code on failure\n"
21074 : "\n"
21075 : "\n"
21076 : ""},
21077 : { "SpatialReference_ImportFromESRI", _wrap_SpatialReference_ImportFromESRI, METH_VARARGS, "SpatialReference_ImportFromESRI(self, ppszInput) -> OGRErr"},
21078 : { "SpatialReference_ImportFromEPSG", _wrap_SpatialReference_ImportFromEPSG, METH_VARARGS, "\n"
21079 : "SpatialReference_ImportFromEPSG(self, arg) -> OGRErr\n"
21080 : "\n"
21081 : "\n"
21082 : "Initialize SRS based on EPSG geographic, projected or vertical CRS code.\n"
21083 : "\n"
21084 : "Since GDAL 3.0, this method is identical to :py:meth:`ImportFromEPSGA`.\n"
21085 : "\n"
21086 : "See :cpp:func:`OGRSpatialReference::importFromEPSG`.\n"
21087 : "\n"
21088 : "Parameters\n"
21089 : "----------\n"
21090 : "arg : int\n"
21091 : " EPSG code to search in PROJ database\n"
21092 : "\n"
21093 : "Returns\n"
21094 : "-------\n"
21095 : "int\n"
21096 : " :py:const:`OGRERR_NONE` on success, or an error code on failure\n"
21097 : "\n"
21098 : "Examples\n"
21099 : "--------\n"
21100 : ">>> srs = osr.SpatialReference()\n"
21101 : ">>> srs.ImportFromEPSG(4326)\n"
21102 : "0\n"
21103 : "\n"
21104 : "\n"
21105 : ""},
21106 : { "SpatialReference_ImportFromEPSGA", _wrap_SpatialReference_ImportFromEPSGA, METH_VARARGS, "\n"
21107 : "SpatialReference_ImportFromEPSGA(self, arg) -> OGRErr\n"
21108 : "\n"
21109 : "\n"
21110 : "Initialize SRS based on EPSG geographic, projected or vertical CRS code.\n"
21111 : "\n"
21112 : "Since GDAL 3.0, this method is identical to :py:meth:`ImportFromEPSG`.\n"
21113 : "\n"
21114 : "See :cpp:func:`OGRSpatialReference::importFromEPSGA`.\n"
21115 : "\n"
21116 : "Parameters\n"
21117 : "----------\n"
21118 : "arg : int\n"
21119 : " EPSG code to search in PROJ database\n"
21120 : "\n"
21121 : "Returns\n"
21122 : "-------\n"
21123 : "int\n"
21124 : " :py:const:`OGRERR_NONE` on success, or an error code on failure\n"
21125 : "\n"
21126 : "\n"
21127 : ""},
21128 : { "SpatialReference_ImportFromPCI", _wrap_SpatialReference_ImportFromPCI, METH_VARARGS, "SpatialReference_ImportFromPCI(self, proj, units=\"METRE\", argin=0) -> OGRErr"},
21129 : { "SpatialReference_ImportFromUSGS", _wrap_SpatialReference_ImportFromUSGS, METH_VARARGS, "SpatialReference_ImportFromUSGS(self, proj_code, zone=0, argin=0, datum_code=0) -> OGRErr"},
21130 : { "SpatialReference_ImportFromXML", _wrap_SpatialReference_ImportFromXML, METH_VARARGS, "SpatialReference_ImportFromXML(self, xmlString) -> OGRErr"},
21131 : { "SpatialReference_ImportFromERM", _wrap_SpatialReference_ImportFromERM, METH_VARARGS, "SpatialReference_ImportFromERM(self, proj, datum, units) -> OGRErr"},
21132 : { "SpatialReference_ImportFromMICoordSys", _wrap_SpatialReference_ImportFromMICoordSys, METH_VARARGS, "SpatialReference_ImportFromMICoordSys(self, pszCoordSys) -> OGRErr"},
21133 : { "SpatialReference_ImportFromOzi", _wrap_SpatialReference_ImportFromOzi, METH_VARARGS, "SpatialReference_ImportFromOzi(self, papszLines) -> OGRErr"},
21134 : { "SpatialReference_ImportFromCF1", _wrap_SpatialReference_ImportFromCF1, METH_VARARGS, "SpatialReference_ImportFromCF1(self, keyValues, units=None) -> OGRErr"},
21135 : { "SpatialReference_ExportToWkt", _wrap_SpatialReference_ExportToWkt, METH_VARARGS, "\n"
21136 : "SpatialReference_ExportToWkt(self, options=None) -> OGRErr\n"
21137 : "\n"
21138 : "\n"
21139 : "Export this SRS into WKT 1 format.\n"
21140 : "\n"
21141 : "See :cpp:func:`OGRSpatialReference::exportToWkt`.\n"
21142 : "\n"
21143 : "Returns\n"
21144 : "-------\n"
21145 : "str\n"
21146 : "\n"
21147 : "See Also\n"
21148 : "--------\n"
21149 : ":py:meth:`ExportToPrettyWkt`\n"
21150 : "\n"
21151 : "\n"
21152 : ""},
21153 : { "SpatialReference_ExportToPrettyWkt", _wrap_SpatialReference_ExportToPrettyWkt, METH_VARARGS, "\n"
21154 : "SpatialReference_ExportToPrettyWkt(self, simplify=0) -> OGRErr\n"
21155 : "\n"
21156 : "\n"
21157 : "Convert this SRS into a nicely formatted WKT 1 string for display to a\n"
21158 : "person.\n"
21159 : "\n"
21160 : "See :cpp:func:`OGRSpatialReference::exportToPrettyWkt`.\n"
21161 : "\n"
21162 : "Parameters\n"
21163 : "----------\n"
21164 : "simplify : bool, default = False\n"
21165 : "\n"
21166 : "Returns\n"
21167 : "-------\n"
21168 : "str\n"
21169 : "\n"
21170 : "\n"
21171 : ""},
21172 : { "SpatialReference_ExportToPROJJSON", _wrap_SpatialReference_ExportToPROJJSON, METH_VARARGS, "\n"
21173 : "SpatialReference_ExportToPROJJSON(self, options=None) -> OGRErr\n"
21174 : "\n"
21175 : "\n"
21176 : "Export this SRS in `PROJJSON <https://proj.org/en/latest/specifications/projjson.html>`_ format.\n"
21177 : "\n"
21178 : "See :cpp:func:`OGRSpatialReference::exportToPROJJSON`.\n"
21179 : "\n"
21180 : "Parameters\n"
21181 : "----------\n"
21182 : "options : list or dict\n"
21183 : " Options to control the format of the output. See :cpp:func:`OGRSpatialReference::exportToPROJJSON`.\n"
21184 : "\n"
21185 : "Returns\n"
21186 : "-------\n"
21187 : "str\n"
21188 : "\n"
21189 : "\n"
21190 : ""},
21191 : { "SpatialReference_ExportToProj4", _wrap_SpatialReference_ExportToProj4, METH_O, "\n"
21192 : "SpatialReference_ExportToProj4(self) -> OGRErr\n"
21193 : "\n"
21194 : "\n"
21195 : "Export this SRS to PROJ.4 legacy format.\n"
21196 : "\n"
21197 : ".. warning::\n"
21198 : "\n"
21199 : " Use of this function is discouraged. See :cpp:func:`OGRSpatialReference::exportToProj4`.\n"
21200 : "\n"
21201 : "Returns\n"
21202 : "-------\n"
21203 : "str\n"
21204 : "\n"
21205 : "\n"
21206 : ""},
21207 : { "SpatialReference_ExportToPCI", _wrap_SpatialReference_ExportToPCI, METH_O, "SpatialReference_ExportToPCI(self) -> OGRErr"},
21208 : { "SpatialReference_ExportToUSGS", _wrap_SpatialReference_ExportToUSGS, METH_O, "SpatialReference_ExportToUSGS(self) -> OGRErr"},
21209 : { "SpatialReference_ExportToERM", _wrap_SpatialReference_ExportToERM, METH_O, "SpatialReference_ExportToERM(self) -> OGRErr"},
21210 : { "SpatialReference_ExportToXML", _wrap_SpatialReference_ExportToXML, METH_VARARGS, "SpatialReference_ExportToXML(self, dialect=\"\") -> OGRErr"},
21211 : { "SpatialReference_ExportToMICoordSys", _wrap_SpatialReference_ExportToMICoordSys, METH_O, "SpatialReference_ExportToMICoordSys(self) -> OGRErr"},
21212 : { "SpatialReference_ExportToCF1", _wrap_SpatialReference_ExportToCF1, METH_VARARGS, "SpatialReference_ExportToCF1(self, options=None) -> char **"},
21213 : { "SpatialReference_ExportToCF1Units", _wrap_SpatialReference_ExportToCF1Units, METH_VARARGS, "SpatialReference_ExportToCF1Units(self, options=None) -> retStringAndCPLFree *"},
21214 : { "SpatialReference_CloneGeogCS", _wrap_SpatialReference_CloneGeogCS, METH_O, "SpatialReference_CloneGeogCS(self) -> SpatialReference"},
21215 : { "SpatialReference_Clone", _wrap_SpatialReference_Clone, METH_O, "SpatialReference_Clone(self) -> SpatialReference"},
21216 : { "SpatialReference_StripVertical", _wrap_SpatialReference_StripVertical, METH_O, "\n"
21217 : "SpatialReference_StripVertical(self) -> OGRErr\n"
21218 : "\n"
21219 : "\n"
21220 : "Convert a compound CRS into a horizontal CRS.\n"
21221 : "\n"
21222 : "See :cpp:func:`OGRSpatialReference::StripVertical`.\n"
21223 : "\n"
21224 : ".. versionadded:: 3.6\n"
21225 : "\n"
21226 : "Returns\n"
21227 : "-------\n"
21228 : "int\n"
21229 : " :py:const:`OGRERR_NONE` on success, or an error code on failure\n"
21230 : "\n"
21231 : ""},
21232 : { "SpatialReference_Validate", _wrap_SpatialReference_Validate, METH_O, "SpatialReference_Validate(self) -> OGRErr"},
21233 : { "SpatialReference_MorphToESRI", _wrap_SpatialReference_MorphToESRI, METH_O, "SpatialReference_MorphToESRI(self) -> OGRErr"},
21234 : { "SpatialReference_MorphFromESRI", _wrap_SpatialReference_MorphFromESRI, METH_O, "SpatialReference_MorphFromESRI(self) -> OGRErr"},
21235 : { "SpatialReference_ConvertToOtherProjection", _wrap_SpatialReference_ConvertToOtherProjection, METH_VARARGS, "SpatialReference_ConvertToOtherProjection(self, other_projection, options=None) -> SpatialReference"},
21236 : { "SpatialReference_PromoteTo3D", _wrap_SpatialReference_PromoteTo3D, METH_VARARGS, "SpatialReference_PromoteTo3D(self, name=None) -> OGRErr"},
21237 : { "SpatialReference_DemoteTo2D", _wrap_SpatialReference_DemoteTo2D, METH_VARARGS, "SpatialReference_DemoteTo2D(self, name=None) -> OGRErr"},
21238 : { "SpatialReference_swigregister", SpatialReference_swigregister, METH_O, NULL},
21239 : { "SpatialReference_swiginit", SpatialReference_swiginit, METH_VARARGS, NULL},
21240 : { "new_CoordinateTransformationOptions", _wrap_new_CoordinateTransformationOptions, METH_NOARGS, "new_CoordinateTransformationOptions() -> CoordinateTransformationOptions"},
21241 : { "delete_CoordinateTransformationOptions", _wrap_delete_CoordinateTransformationOptions, METH_O, "delete_CoordinateTransformationOptions(self)"},
21242 : { "CoordinateTransformationOptions_SetAreaOfInterest", _wrap_CoordinateTransformationOptions_SetAreaOfInterest, METH_VARARGS, "CoordinateTransformationOptions_SetAreaOfInterest(self, westLongitudeDeg, southLatitudeDeg, eastLongitudeDeg, northLatitudeDeg) -> bool"},
21243 : { "CoordinateTransformationOptions_SetOperation", _wrap_CoordinateTransformationOptions_SetOperation, METH_VARARGS, "CoordinateTransformationOptions_SetOperation(self, operation, inverseCT=False) -> bool"},
21244 : { "CoordinateTransformationOptions_SetDesiredAccuracy", _wrap_CoordinateTransformationOptions_SetDesiredAccuracy, METH_VARARGS, "CoordinateTransformationOptions_SetDesiredAccuracy(self, accuracy) -> bool"},
21245 : { "CoordinateTransformationOptions_SetBallparkAllowed", _wrap_CoordinateTransformationOptions_SetBallparkAllowed, METH_VARARGS, "CoordinateTransformationOptions_SetBallparkAllowed(self, allowBallpark) -> bool"},
21246 : { "CoordinateTransformationOptions_SetOnlyBest", _wrap_CoordinateTransformationOptions_SetOnlyBest, METH_VARARGS, "CoordinateTransformationOptions_SetOnlyBest(self, onlyBest) -> bool"},
21247 : { "CoordinateTransformationOptions_swigregister", CoordinateTransformationOptions_swigregister, METH_O, NULL},
21248 : { "CoordinateTransformationOptions_swiginit", CoordinateTransformationOptions_swiginit, METH_VARARGS, NULL},
21249 : { "new_CoordinateTransformation", _wrap_new_CoordinateTransformation, METH_VARARGS, "\n"
21250 : "CoordinateTransformation(src, dst)\n"
21251 : "new_CoordinateTransformation(src, dst, options) -> CoordinateTransformation\n"
21252 : "\n"
21253 : "Python proxy of an :cpp:class:`OGRCoordinateTransformation`.\n"
21254 : "\n"
21255 : ""},
21256 : { "delete_CoordinateTransformation", _wrap_delete_CoordinateTransformation, METH_O, "delete_CoordinateTransformation(self)"},
21257 : { "CoordinateTransformation_GetInverse", _wrap_CoordinateTransformation_GetInverse, METH_O, "CoordinateTransformation_GetInverse(self) -> CoordinateTransformation"},
21258 : { "CoordinateTransformation__TransformPoint3Double", _wrap_CoordinateTransformation__TransformPoint3Double, METH_VARARGS, "CoordinateTransformation__TransformPoint3Double(self, inout)"},
21259 : { "CoordinateTransformation__TransformPoint4Double", _wrap_CoordinateTransformation__TransformPoint4Double, METH_VARARGS, "CoordinateTransformation__TransformPoint4Double(self, inout)"},
21260 : { "CoordinateTransformation_TransformPoint", _wrap_CoordinateTransformation_TransformPoint, METH_VARARGS, "\n"
21261 : "CoordinateTransformation_TransformPoint(self, x, y, z=0.0)\n"
21262 : "CoordinateTransformation_TransformPoint(self, x, y, z, t)\n"
21263 : ""},
21264 : { "CoordinateTransformation_TransformPointWithErrorCode", _wrap_CoordinateTransformation_TransformPointWithErrorCode, METH_VARARGS, "\n"
21265 : "CoordinateTransformation_TransformPointWithErrorCode(self, x, y, z, t)\n"
21266 : "\n"
21267 : "\n"
21268 : "Variant of :py:meth:`TransformPoint` that provides an error code.\n"
21269 : "\n"
21270 : "See :cpp:func:`OCTTransformEx`.\n"
21271 : "\n"
21272 : "Parameters\n"
21273 : "----------\n"
21274 : "x : float\n"
21275 : "y : float\n"
21276 : "z : float\n"
21277 : "t : float\n"
21278 : "\n"
21279 : "Returns\n"
21280 : "-------\n"
21281 : "tuple\n"
21282 : " tuple of (x, y, z, t, error) values\n"
21283 : "\n"
21284 : "\n"
21285 : ""},
21286 : { "CoordinateTransformation_TransformPoints", _wrap_CoordinateTransformation_TransformPoints, METH_VARARGS, "\n"
21287 : "CoordinateTransformation_TransformPoints(self, nCount)\n"
21288 : "\n"
21289 : "\n"
21290 : "Transform multiple points.\n"
21291 : "\n"
21292 : "See :cpp:func:`OCTTransform`.\n"
21293 : "\n"
21294 : "Parameters\n"
21295 : "----------\n"
21296 : "arg\n"
21297 : " A list of tuples, or a 2xN, 3xN, or 4xN numpy array\n"
21298 : "\n"
21299 : "Returns\n"
21300 : "-------\n"
21301 : "list\n"
21302 : " A list of tuples of (x, y, z) or (x, y, z, t) values, depending on the input.\n"
21303 : "\n"
21304 : "Examples\n"
21305 : "--------\n"
21306 : ">>> wgs84 = osr.SpatialReference()\n"
21307 : ">>> wgs84.ImportFromEPSG(4326)\n"
21308 : "0\n"
21309 : ">>> vt_sp = osr.SpatialReference()\n"
21310 : ">>> vt_sp.ImportFromEPSG(5646)\n"
21311 : "0\n"
21312 : ">>> ct = osr.CoordinateTransformation(wgs84, vt_sp)\n"
21313 : ">>> # Transform two points from WGS84 lat/long to Vermont State Plane easting/northing\n"
21314 : ">>> ct.TransformPoints([(44.26, -72.58), (44.26, -72.59)])\n"
21315 : "[(1619458.11, 641509.19, 0.0), (1616838.29, 641511.90, 0.0)] # rtol: 1e-6\n"
21316 : "\n"
21317 : ">>> ct.TransformPoints(np.array([[44.26, -72.58], [44.26, -72.59]]))\n"
21318 : "[(1619458.11, 641509.19, 0.0), (1616838.29, 641511.90, 0.0)] # rtol: 1e-6\n"
21319 : "\n"
21320 : "\n"
21321 : ""},
21322 : { "CoordinateTransformation_TransformBounds", _wrap_CoordinateTransformation_TransformBounds, METH_VARARGS, "\n"
21323 : "CoordinateTransformation_TransformBounds(self, minx, miny, maxx, maxy, densify_pts)\n"
21324 : "\n"
21325 : "\n"
21326 : "Transform a boundary, densifying the edges to account for nonlinear\n"
21327 : "transformations along these edges.\n"
21328 : "\n"
21329 : "See :cpp:func:`OCTTransformBounds`.\n"
21330 : "\n"
21331 : "Parameters\n"
21332 : "----------\n"
21333 : "minx : float\n"
21334 : " Minimum bounding coordinate of the first axis in source CRS\n"
21335 : "miny : float\n"
21336 : " Minimum bounding coordinate of the second axis in source CRS\n"
21337 : "maxx : float\n"
21338 : " Maximum bounding coordinate of the first axis in source CRS\n"
21339 : "maxy : float\n"
21340 : " Maximum bounding coordinate of the second axis in source CRS\n"
21341 : "densify_pts : int\n"
21342 : " The number of points to use to densify the bounding polygon.\n"
21343 : " Recommended to use 21.\n"
21344 : "\n"
21345 : "Returns\n"
21346 : "-------\n"
21347 : "tuple\n"
21348 : " Transformed values of xmin, ymin, xmax, ymax\n"
21349 : "\n"
21350 : "Examples\n"
21351 : "--------\n"
21352 : ">>> wgs84 = osr.SpatialReference()\n"
21353 : ">>> wgs84.ImportFromEPSG(4326)\n"
21354 : "0\n"
21355 : ">>> vt_sp = osr.SpatialReference()\n"
21356 : ">>> vt_sp.ImportFromEPSG(5646)\n"
21357 : "0\n"
21358 : ">>> ct = osr.CoordinateTransformation(wgs84, vt_sp)\n"
21359 : ">>> ct.TransformBounds(44.2,-72.5, 44.3, -72.4, 21)\n"
21360 : "(1640416.67, 619626.43, 1666641.49, 656096.76) # rtol: 1e-6\n"
21361 : "\n"
21362 : ""},
21363 : { "CoordinateTransformation_swigregister", CoordinateTransformation_swigregister, METH_O, NULL},
21364 : { "CoordinateTransformation_swiginit", CoordinateTransformation_swiginit, METH_VARARGS, NULL},
21365 : { "CreateCoordinateTransformation", _wrap_CreateCoordinateTransformation, METH_VARARGS, "\n"
21366 : "CreateCoordinateTransformation(src, dst, options=None) -> CoordinateTransformation\n"
21367 : "\n"
21368 : "\n"
21369 : "Create a :py:class:`CoordinateTransformation` using a set of :py:class:`CoordinateTransformationOptions`.\n"
21370 : "\n"
21371 : "See :cpp:func:`OCTNewCoordinateTransformationEx`.\n"
21372 : "\n"
21373 : "Parameters\n"
21374 : "----------\n"
21375 : "src : SpatialReference\n"
21376 : " source spatial reference system\n"
21377 : "dst : SpatialReference\n"
21378 : " target spatial reference system\n"
21379 : "options : CoordinateTransformationOptions\n"
21380 : "\n"
21381 : "Returns\n"
21382 : "-------\n"
21383 : "CoordinateTransformation\n"
21384 : "\n"
21385 : ""},
21386 : { "CRSInfo_auth_name_get", _wrap_CRSInfo_auth_name_get, METH_O, "CRSInfo_auth_name_get(self) -> char *"},
21387 : { "CRSInfo_code_get", _wrap_CRSInfo_code_get, METH_O, "CRSInfo_code_get(self) -> char *"},
21388 : { "CRSInfo_name_get", _wrap_CRSInfo_name_get, METH_O, "CRSInfo_name_get(self) -> char *"},
21389 : { "CRSInfo_type_get", _wrap_CRSInfo_type_get, METH_O, "CRSInfo_type_get(self) -> OSRCRSType"},
21390 : { "CRSInfo_deprecated_get", _wrap_CRSInfo_deprecated_get, METH_O, "CRSInfo_deprecated_get(self) -> bool"},
21391 : { "CRSInfo_bbox_valid_get", _wrap_CRSInfo_bbox_valid_get, METH_O, "CRSInfo_bbox_valid_get(self) -> bool"},
21392 : { "CRSInfo_west_lon_degree_get", _wrap_CRSInfo_west_lon_degree_get, METH_O, "CRSInfo_west_lon_degree_get(self) -> double"},
21393 : { "CRSInfo_south_lat_degree_get", _wrap_CRSInfo_south_lat_degree_get, METH_O, "CRSInfo_south_lat_degree_get(self) -> double"},
21394 : { "CRSInfo_east_lon_degree_get", _wrap_CRSInfo_east_lon_degree_get, METH_O, "CRSInfo_east_lon_degree_get(self) -> double"},
21395 : { "CRSInfo_north_lat_degree_get", _wrap_CRSInfo_north_lat_degree_get, METH_O, "CRSInfo_north_lat_degree_get(self) -> double"},
21396 : { "CRSInfo_area_name_get", _wrap_CRSInfo_area_name_get, METH_O, "CRSInfo_area_name_get(self) -> char *"},
21397 : { "CRSInfo_projection_method_get", _wrap_CRSInfo_projection_method_get, METH_O, "CRSInfo_projection_method_get(self) -> char *"},
21398 : { "CRSInfo_celestial_body_name_get", _wrap_CRSInfo_celestial_body_name_get, METH_O, "CRSInfo_celestial_body_name_get(self) -> char *"},
21399 : { "new_CRSInfo", _wrap_new_CRSInfo, METH_VARARGS, "new_CRSInfo(auth_name, code, name, type, deprecated, bbox_valid, west_lon_degree, south_lat_degree, east_lon_degree, north_lat_degree, area_name, projection_method, celestial_body_name) -> CRSInfo"},
21400 : { "delete_CRSInfo", _wrap_delete_CRSInfo, METH_O, "delete_CRSInfo(self)"},
21401 : { "CRSInfo_swigregister", CRSInfo_swigregister, METH_O, NULL},
21402 : { "CRSInfo_swiginit", CRSInfo_swiginit, METH_VARARGS, NULL},
21403 : { "OSRCRSInfo_auth_name_get", _wrap_OSRCRSInfo_auth_name_get, METH_O, "OSRCRSInfo_auth_name_get(crsInfo) -> char const *"},
21404 : { "OSRCRSInfo_code_get", _wrap_OSRCRSInfo_code_get, METH_O, "OSRCRSInfo_code_get(crsInfo) -> char const *"},
21405 : { "OSRCRSInfo_name_get", _wrap_OSRCRSInfo_name_get, METH_O, "OSRCRSInfo_name_get(crsInfo) -> char const *"},
21406 : { "OSRCRSInfo_type_get", _wrap_OSRCRSInfo_type_get, METH_O, "OSRCRSInfo_type_get(crsInfo) -> OSRCRSType"},
21407 : { "OSRCRSInfo_deprecated_get", _wrap_OSRCRSInfo_deprecated_get, METH_O, "OSRCRSInfo_deprecated_get(crsInfo) -> bool"},
21408 : { "OSRCRSInfo_bbox_valid_get", _wrap_OSRCRSInfo_bbox_valid_get, METH_O, "OSRCRSInfo_bbox_valid_get(crsInfo) -> bool"},
21409 : { "OSRCRSInfo_west_lon_degree_get", _wrap_OSRCRSInfo_west_lon_degree_get, METH_O, "OSRCRSInfo_west_lon_degree_get(crsInfo) -> double"},
21410 : { "OSRCRSInfo_south_lat_degree_get", _wrap_OSRCRSInfo_south_lat_degree_get, METH_O, "OSRCRSInfo_south_lat_degree_get(crsInfo) -> double"},
21411 : { "OSRCRSInfo_east_lon_degree_get", _wrap_OSRCRSInfo_east_lon_degree_get, METH_O, "OSRCRSInfo_east_lon_degree_get(crsInfo) -> double"},
21412 : { "OSRCRSInfo_north_lat_degree_get", _wrap_OSRCRSInfo_north_lat_degree_get, METH_O, "OSRCRSInfo_north_lat_degree_get(crsInfo) -> double"},
21413 : { "OSRCRSInfo_area_name_get", _wrap_OSRCRSInfo_area_name_get, METH_O, "OSRCRSInfo_area_name_get(crsInfo) -> char const *"},
21414 : { "OSRCRSInfo_projection_method_get", _wrap_OSRCRSInfo_projection_method_get, METH_O, "OSRCRSInfo_projection_method_get(crsInfo) -> char const *"},
21415 : { "OSRCRSInfo_celestial_body_name_get", _wrap_OSRCRSInfo_celestial_body_name_get, METH_O, "OSRCRSInfo_celestial_body_name_get(crsInfo) -> char const *"},
21416 : { "GetAuthorityListFromDatabase", _wrap_GetAuthorityListFromDatabase, METH_NOARGS, "GetAuthorityListFromDatabase() -> char **"},
21417 : { "GetCRSInfoListFromDatabase", _wrap_GetCRSInfoListFromDatabase, METH_O, "GetCRSInfoListFromDatabase(authName)"},
21418 : { "SetPROJSearchPath", _wrap_SetPROJSearchPath, METH_O, "SetPROJSearchPath(utf8_string)"},
21419 : { "SetPROJSearchPaths", _wrap_SetPROJSearchPaths, METH_O, "SetPROJSearchPaths(paths)"},
21420 : { "GetPROJSearchPaths", _wrap_GetPROJSearchPaths, METH_NOARGS, "GetPROJSearchPaths() -> char **"},
21421 : { "GetPROJVersionMajor", _wrap_GetPROJVersionMajor, METH_NOARGS, "GetPROJVersionMajor() -> int"},
21422 : { "GetPROJVersionMinor", _wrap_GetPROJVersionMinor, METH_NOARGS, "GetPROJVersionMinor() -> int"},
21423 : { "GetPROJVersionMicro", _wrap_GetPROJVersionMicro, METH_NOARGS, "GetPROJVersionMicro() -> int"},
21424 : { "GetPROJEnableNetwork", _wrap_GetPROJEnableNetwork, METH_NOARGS, "GetPROJEnableNetwork() -> bool"},
21425 : { "SetPROJEnableNetwork", _wrap_SetPROJEnableNetwork, METH_O, "SetPROJEnableNetwork(enabled)"},
21426 : { "SetPROJAuxDbPath", _wrap_SetPROJAuxDbPath, METH_O, "SetPROJAuxDbPath(utf8_string)"},
21427 : { "SetPROJAuxDbPaths", _wrap_SetPROJAuxDbPaths, METH_O, "SetPROJAuxDbPaths(paths)"},
21428 : { "GetPROJAuxDbPaths", _wrap_GetPROJAuxDbPaths, METH_NOARGS, "GetPROJAuxDbPaths() -> char **"},
21429 : { NULL, NULL, 0, NULL }
21430 : };
21431 :
21432 : static PyMethodDef SwigMethods_proxydocs[] = {
21433 : { NULL, NULL, 0, NULL }
21434 : };
21435 :
21436 :
21437 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
21438 :
21439 : static swig_type_info _swigt__p_OGRCoordinateTransformationOptions = {"_p_OGRCoordinateTransformationOptions", "OGRCoordinateTransformationOptions *", 0, 0, (void*)0, 0};
21440 : static swig_type_info _swigt__p_OSRAreaOfUse = {"_p_OSRAreaOfUse", "OSRAreaOfUse *", 0, 0, (void*)0, 0};
21441 : static swig_type_info _swigt__p_OSRCRSInfo = {"_p_OSRCRSInfo", "OSRCRSInfo *", 0, 0, (void*)0, 0};
21442 : static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0};
21443 : static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
21444 : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
21445 : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
21446 : static swig_type_info _swigt__p_int = {"_p_int", "OSRAxisMappingStrategy *|int *|OGRAxisOrientation *|OGRErr *", 0, 0, (void*)0, 0};
21447 : static swig_type_info _swigt__p_long = {"_p_long", "long *", 0, 0, (void*)0, 0};
21448 : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
21449 : static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
21450 : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
21451 : static swig_type_info _swigt__p_p_p_OSRCRSInfo = {"_p_p_p_OSRCRSInfo", "OSRCRSInfo ***", 0, 0, (void*)0, 0};
21452 : static swig_type_info _swigt__p_p_p_OSRSpatialReferenceShadow = {"_p_p_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow ***", 0, 0, (void*)0, 0};
21453 :
21454 : static swig_type_info *swig_type_initial[] = {
21455 : &_swigt__p_OGRCoordinateTransformationOptions,
21456 : &_swigt__p_OSRAreaOfUse,
21457 : &_swigt__p_OSRCRSInfo,
21458 : &_swigt__p_OSRCoordinateTransformationShadow,
21459 : &_swigt__p_OSRSpatialReferenceShadow,
21460 : &_swigt__p_char,
21461 : &_swigt__p_double,
21462 : &_swigt__p_int,
21463 : &_swigt__p_long,
21464 : &_swigt__p_p_char,
21465 : &_swigt__p_p_double,
21466 : &_swigt__p_p_int,
21467 : &_swigt__p_p_p_OSRCRSInfo,
21468 : &_swigt__p_p_p_OSRSpatialReferenceShadow,
21469 : };
21470 :
21471 : static swig_cast_info _swigc__p_OGRCoordinateTransformationOptions[] = { {&_swigt__p_OGRCoordinateTransformationOptions, 0, 0, 0},{0, 0, 0, 0}};
21472 : static swig_cast_info _swigc__p_OSRAreaOfUse[] = { {&_swigt__p_OSRAreaOfUse, 0, 0, 0},{0, 0, 0, 0}};
21473 : static swig_cast_info _swigc__p_OSRCRSInfo[] = { {&_swigt__p_OSRCRSInfo, 0, 0, 0},{0, 0, 0, 0}};
21474 : static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = { {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
21475 : static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = { {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
21476 : static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
21477 : static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
21478 : static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
21479 : static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
21480 : static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
21481 : static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
21482 : static swig_cast_info _swigc__p_p_int[] = { {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
21483 : static swig_cast_info _swigc__p_p_p_OSRCRSInfo[] = { {&_swigt__p_p_p_OSRCRSInfo, 0, 0, 0},{0, 0, 0, 0}};
21484 : static swig_cast_info _swigc__p_p_p_OSRSpatialReferenceShadow[] = { {&_swigt__p_p_p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
21485 :
21486 : static swig_cast_info *swig_cast_initial[] = {
21487 : _swigc__p_OGRCoordinateTransformationOptions,
21488 : _swigc__p_OSRAreaOfUse,
21489 : _swigc__p_OSRCRSInfo,
21490 : _swigc__p_OSRCoordinateTransformationShadow,
21491 : _swigc__p_OSRSpatialReferenceShadow,
21492 : _swigc__p_char,
21493 : _swigc__p_double,
21494 : _swigc__p_int,
21495 : _swigc__p_long,
21496 : _swigc__p_p_char,
21497 : _swigc__p_p_double,
21498 : _swigc__p_p_int,
21499 : _swigc__p_p_p_OSRCRSInfo,
21500 : _swigc__p_p_p_OSRSpatialReferenceShadow,
21501 : };
21502 :
21503 :
21504 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
21505 :
21506 : static swig_const_info swig_const_table[] = {
21507 : {0, 0, 0, 0.0, 0, 0}};
21508 :
21509 : #ifdef __cplusplus
21510 : }
21511 : #endif
21512 : /* -----------------------------------------------------------------------------
21513 : * Type initialization:
21514 : * This problem is tough by the requirement that no dynamic
21515 : * memory is used. Also, since swig_type_info structures store pointers to
21516 : * swig_cast_info structures and swig_cast_info structures store pointers back
21517 : * to swig_type_info structures, we need some lookup code at initialization.
21518 : * The idea is that swig generates all the structures that are needed.
21519 : * The runtime then collects these partially filled structures.
21520 : * The SWIG_InitializeModule function takes these initial arrays out of
21521 : * swig_module, and does all the lookup, filling in the swig_module.types
21522 : * array with the correct data and linking the correct swig_cast_info
21523 : * structures together.
21524 : *
21525 : * The generated swig_type_info structures are assigned statically to an initial
21526 : * array. We just loop through that array, and handle each type individually.
21527 : * First we lookup if this type has been already loaded, and if so, use the
21528 : * loaded structure instead of the generated one. Then we have to fill in the
21529 : * cast linked list. The cast data is initially stored in something like a
21530 : * two-dimensional array. Each row corresponds to a type (there are the same
21531 : * number of rows as there are in the swig_type_initial array). Each entry in
21532 : * a column is one of the swig_cast_info structures for that type.
21533 : * The cast_initial array is actually an array of arrays, because each row has
21534 : * a variable number of columns. So to actually build the cast linked list,
21535 : * we find the array of casts associated with the type, and loop through it
21536 : * adding the casts to the list. The one last trick we need to do is making
21537 : * sure the type pointer in the swig_cast_info struct is correct.
21538 : *
21539 : * First off, we lookup the cast->type name to see if it is already loaded.
21540 : * There are three cases to handle:
21541 : * 1) If the cast->type has already been loaded AND the type we are adding
21542 : * casting info to has not been loaded (it is in this module), THEN we
21543 : * replace the cast->type pointer with the type pointer that has already
21544 : * been loaded.
21545 : * 2) If BOTH types (the one we are adding casting info to, and the
21546 : * cast->type) are loaded, THEN the cast info has already been loaded by
21547 : * the previous module so we just ignore it.
21548 : * 3) Finally, if cast->type has not already been loaded, then we add that
21549 : * swig_cast_info to the linked list (because the cast->type) pointer will
21550 : * be correct.
21551 : * ----------------------------------------------------------------------------- */
21552 :
21553 : #ifdef __cplusplus
21554 : extern "C" {
21555 : #if 0
21556 : } /* c-mode */
21557 : #endif
21558 : #endif
21559 :
21560 : #if 0
21561 : #define SWIGRUNTIME_DEBUG
21562 : #endif
21563 :
21564 :
21565 : SWIGRUNTIME void
21566 : SWIG_InitializeModule(void *clientdata) {
21567 : size_t i;
21568 : swig_module_info *module_head, *iter;
21569 : int init;
21570 :
21571 : /* check to see if the circular list has been setup, if not, set it up */
21572 : if (swig_module.next==0) {
21573 : /* Initialize the swig_module */
21574 : swig_module.type_initial = swig_type_initial;
21575 : swig_module.cast_initial = swig_cast_initial;
21576 : swig_module.next = &swig_module;
21577 : init = 1;
21578 : } else {
21579 : init = 0;
21580 : }
21581 :
21582 : /* Try and load any already created modules */
21583 : module_head = SWIG_GetModule(clientdata);
21584 : if (!module_head) {
21585 : /* This is the first module loaded for this interpreter */
21586 : /* so set the swig module into the interpreter */
21587 : SWIG_SetModule(clientdata, &swig_module);
21588 : } else {
21589 : /* the interpreter has loaded a SWIG module, but has it loaded this one? */
21590 : iter=module_head;
21591 : do {
21592 : if (iter==&swig_module) {
21593 : /* Our module is already in the list, so there's nothing more to do. */
21594 : return;
21595 : }
21596 : iter=iter->next;
21597 : } while (iter!= module_head);
21598 :
21599 : /* otherwise we must add our module into the list */
21600 : swig_module.next = module_head->next;
21601 : module_head->next = &swig_module;
21602 : }
21603 :
21604 : /* When multiple interpreters are used, a module could have already been initialized in
21605 : a different interpreter, but not yet have a pointer in this interpreter.
21606 : In this case, we do not want to continue adding types... everything should be
21607 : set up already */
21608 : if (init == 0) return;
21609 :
21610 : /* Now work on filling in swig_module.types */
21611 : #ifdef SWIGRUNTIME_DEBUG
21612 : printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
21613 : #endif
21614 : for (i = 0; i < swig_module.size; ++i) {
21615 : swig_type_info *type = 0;
21616 : swig_type_info *ret;
21617 : swig_cast_info *cast;
21618 :
21619 : #ifdef SWIGRUNTIME_DEBUG
21620 : printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
21621 : #endif
21622 :
21623 : /* if there is another module already loaded */
21624 : if (swig_module.next != &swig_module) {
21625 : type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
21626 : }
21627 : if (type) {
21628 : /* Overwrite clientdata field */
21629 : #ifdef SWIGRUNTIME_DEBUG
21630 : printf("SWIG_InitializeModule: found type %s\n", type->name);
21631 : #endif
21632 : if (swig_module.type_initial[i]->clientdata) {
21633 : type->clientdata = swig_module.type_initial[i]->clientdata;
21634 : #ifdef SWIGRUNTIME_DEBUG
21635 : printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
21636 : #endif
21637 : }
21638 : } else {
21639 : type = swig_module.type_initial[i];
21640 : }
21641 :
21642 : /* Insert casting types */
21643 : cast = swig_module.cast_initial[i];
21644 : while (cast->type) {
21645 : /* Don't need to add information already in the list */
21646 : ret = 0;
21647 : #ifdef SWIGRUNTIME_DEBUG
21648 : printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
21649 : #endif
21650 : if (swig_module.next != &swig_module) {
21651 : ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
21652 : #ifdef SWIGRUNTIME_DEBUG
21653 : if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
21654 : #endif
21655 : }
21656 : if (ret) {
21657 : if (type == swig_module.type_initial[i]) {
21658 : #ifdef SWIGRUNTIME_DEBUG
21659 : printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
21660 : #endif
21661 : cast->type = ret;
21662 : ret = 0;
21663 : } else {
21664 : /* Check for casting already in the list */
21665 : swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
21666 : #ifdef SWIGRUNTIME_DEBUG
21667 : if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
21668 : #endif
21669 : if (!ocast) ret = 0;
21670 : }
21671 : }
21672 :
21673 : if (!ret) {
21674 : #ifdef SWIGRUNTIME_DEBUG
21675 : printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
21676 : #endif
21677 : if (type->cast) {
21678 : type->cast->prev = cast;
21679 : cast->next = type->cast;
21680 : }
21681 : type->cast = cast;
21682 : }
21683 : cast++;
21684 : }
21685 : /* Set entry in modules->types array equal to the type */
21686 : swig_module.types[i] = type;
21687 : }
21688 : swig_module.types[i] = 0;
21689 :
21690 : #ifdef SWIGRUNTIME_DEBUG
21691 : printf("**** SWIG_InitializeModule: Cast List ******\n");
21692 : for (i = 0; i < swig_module.size; ++i) {
21693 : int j = 0;
21694 : swig_cast_info *cast = swig_module.cast_initial[i];
21695 : printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
21696 : while (cast->type) {
21697 : printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
21698 : cast++;
21699 : ++j;
21700 : }
21701 : printf("---- Total casts: %d\n",j);
21702 : }
21703 : printf("**** SWIG_InitializeModule: Cast List ******\n");
21704 : #endif
21705 : }
21706 :
21707 : /* This function will propagate the clientdata field of type to
21708 : * any new swig_type_info structures that have been added into the list
21709 : * of equivalent types. It is like calling
21710 : * SWIG_TypeClientData(type, clientdata) a second time.
21711 : */
21712 : SWIGRUNTIME void
21713 : SWIG_PropagateClientData(void) {
21714 : size_t i;
21715 : swig_cast_info *equiv;
21716 : static int init_run = 0;
21717 :
21718 : if (init_run) return;
21719 : init_run = 1;
21720 :
21721 : for (i = 0; i < swig_module.size; i++) {
21722 : if (swig_module.types[i]->clientdata) {
21723 : equiv = swig_module.types[i]->cast;
21724 : while (equiv) {
21725 : if (!equiv->converter) {
21726 : if (equiv->type && !equiv->type->clientdata)
21727 : SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
21728 : }
21729 : equiv = equiv->next;
21730 : }
21731 : }
21732 : }
21733 : }
21734 :
21735 : #ifdef __cplusplus
21736 : #if 0
21737 : {
21738 : /* c-mode */
21739 : #endif
21740 : }
21741 : #endif
21742 :
21743 :
21744 :
21745 : #ifdef __cplusplus
21746 : extern "C" {
21747 : #endif
21748 :
21749 : /* Python-specific SWIG API */
21750 : #define SWIG_newvarlink() SWIG_Python_newvarlink()
21751 : #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
21752 : #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
21753 :
21754 : /* -----------------------------------------------------------------------------
21755 : * global variable support code.
21756 : * ----------------------------------------------------------------------------- */
21757 :
21758 : typedef struct swig_globalvar {
21759 : char *name; /* Name of global variable */
21760 : PyObject *(*get_attr)(void); /* Return the current value */
21761 : int (*set_attr)(PyObject *); /* Set the value */
21762 : struct swig_globalvar *next;
21763 : } swig_globalvar;
21764 :
21765 : typedef struct swig_varlinkobject {
21766 : PyObject_HEAD
21767 : swig_globalvar *vars;
21768 : } swig_varlinkobject;
21769 :
21770 : SWIGINTERN PyObject *
21771 : swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
21772 : #if PY_VERSION_HEX >= 0x03000000
21773 : return PyUnicode_InternFromString("<Swig global variables>");
21774 : #else
21775 : return PyString_FromString("<Swig global variables>");
21776 : #endif
21777 : }
21778 :
21779 : SWIGINTERN PyObject *
21780 : swig_varlink_str(swig_varlinkobject *v) {
21781 : #if PY_VERSION_HEX >= 0x03000000
21782 : PyObject *str = PyUnicode_InternFromString("(");
21783 : PyObject *tail;
21784 : PyObject *joined;
21785 : swig_globalvar *var;
21786 : for (var = v->vars; var; var=var->next) {
21787 : tail = PyUnicode_FromString(var->name);
21788 : joined = PyUnicode_Concat(str, tail);
21789 : Py_DecRef(str);
21790 : Py_DecRef(tail);
21791 : str = joined;
21792 : if (var->next) {
21793 : tail = PyUnicode_InternFromString(", ");
21794 : joined = PyUnicode_Concat(str, tail);
21795 : Py_DecRef(str);
21796 : Py_DecRef(tail);
21797 : str = joined;
21798 : }
21799 : }
21800 : tail = PyUnicode_InternFromString(")");
21801 : joined = PyUnicode_Concat(str, tail);
21802 : Py_DecRef(str);
21803 : Py_DecRef(tail);
21804 : str = joined;
21805 : #else
21806 : PyObject *str = PyString_FromString("(");
21807 : swig_globalvar *var;
21808 : for (var = v->vars; var; var=var->next) {
21809 : PyString_ConcatAndDel(&str,PyString_FromString(var->name));
21810 : if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
21811 : }
21812 : PyString_ConcatAndDel(&str,PyString_FromString(")"));
21813 : #endif
21814 : return str;
21815 : }
21816 :
21817 : SWIGINTERN void
21818 : swig_varlink_dealloc(swig_varlinkobject *v) {
21819 : swig_globalvar *var = v->vars;
21820 : while (var) {
21821 : swig_globalvar *n = var->next;
21822 : free(var->name);
21823 : free(var);
21824 : var = n;
21825 : }
21826 : }
21827 :
21828 : SWIGINTERN PyObject *
21829 : swig_varlink_getattr(swig_varlinkobject *v, char *n) {
21830 : PyObject *res = NULL;
21831 : swig_globalvar *var = v->vars;
21832 : while (var) {
21833 : if (strcmp(var->name,n) == 0) {
21834 : res = (*var->get_attr)();
21835 : break;
21836 : }
21837 : var = var->next;
21838 : }
21839 : if (res == NULL && !PyErr_Occurred()) {
21840 : PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
21841 : }
21842 : return res;
21843 : }
21844 :
21845 : SWIGINTERN int
21846 : swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
21847 : int res = 1;
21848 : swig_globalvar *var = v->vars;
21849 : while (var) {
21850 : if (strcmp(var->name,n) == 0) {
21851 : res = (*var->set_attr)(p);
21852 : break;
21853 : }
21854 : var = var->next;
21855 : }
21856 : if (res == 1 && !PyErr_Occurred()) {
21857 : PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
21858 : }
21859 : return res;
21860 : }
21861 :
21862 : SWIGINTERN PyTypeObject*
21863 : swig_varlink_type(void) {
21864 : static char varlink__doc__[] = "Swig var link object";
21865 : static PyTypeObject varlink_type;
21866 : static int type_init = 0;
21867 : if (!type_init) {
21868 : const PyTypeObject tmp = {
21869 : #if PY_VERSION_HEX >= 0x03000000
21870 : PyVarObject_HEAD_INIT(NULL, 0)
21871 : #else
21872 : PyObject_HEAD_INIT(NULL)
21873 : 0, /* ob_size */
21874 : #endif
21875 : "swigvarlink", /* tp_name */
21876 : sizeof(swig_varlinkobject), /* tp_basicsize */
21877 : 0, /* tp_itemsize */
21878 : (destructor) swig_varlink_dealloc, /* tp_dealloc */
21879 : 0, /* tp_print */
21880 : (getattrfunc) swig_varlink_getattr, /* tp_getattr */
21881 : (setattrfunc) swig_varlink_setattr, /* tp_setattr */
21882 : 0, /* tp_compare */
21883 : (reprfunc) swig_varlink_repr, /* tp_repr */
21884 : 0, /* tp_as_number */
21885 : 0, /* tp_as_sequence */
21886 : 0, /* tp_as_mapping */
21887 : 0, /* tp_hash */
21888 : 0, /* tp_call */
21889 : (reprfunc) swig_varlink_str, /* tp_str */
21890 : 0, /* tp_getattro */
21891 : 0, /* tp_setattro */
21892 : 0, /* tp_as_buffer */
21893 : 0, /* tp_flags */
21894 : varlink__doc__, /* tp_doc */
21895 : 0, /* tp_traverse */
21896 : 0, /* tp_clear */
21897 : 0, /* tp_richcompare */
21898 : 0, /* tp_weaklistoffset */
21899 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
21900 : 0, /* tp_del */
21901 : 0, /* tp_version_tag */
21902 : #if PY_VERSION_HEX >= 0x03040000
21903 : 0, /* tp_finalize */
21904 : #endif
21905 : #ifdef COUNT_ALLOCS
21906 : 0, /* tp_allocs */
21907 : 0, /* tp_frees */
21908 : 0, /* tp_maxalloc */
21909 : 0, /* tp_prev */
21910 : 0 /* tp_next */
21911 : #endif
21912 : };
21913 : varlink_type = tmp;
21914 : type_init = 1;
21915 : if (PyType_Ready(&varlink_type) < 0)
21916 : return NULL;
21917 : }
21918 : return &varlink_type;
21919 : }
21920 :
21921 : /* Create a variable linking object for use later */
21922 : SWIGINTERN PyObject *
21923 : SWIG_Python_newvarlink(void) {
21924 : swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
21925 : if (result) {
21926 : result->vars = 0;
21927 : }
21928 : return ((PyObject*) result);
21929 : }
21930 :
21931 : SWIGINTERN void
21932 : SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
21933 : swig_varlinkobject *v = (swig_varlinkobject *) p;
21934 : swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
21935 : if (gv) {
21936 : size_t size = strlen(name)+1;
21937 : gv->name = (char *)malloc(size);
21938 : if (gv->name) {
21939 : memcpy(gv->name, name, size);
21940 : gv->get_attr = get_attr;
21941 : gv->set_attr = set_attr;
21942 : gv->next = v->vars;
21943 : }
21944 : }
21945 : v->vars = gv;
21946 : }
21947 :
21948 : SWIGINTERN PyObject *
21949 : SWIG_globals(void) {
21950 : static PyObject *globals = 0;
21951 : if (!globals) {
21952 : globals = SWIG_newvarlink();
21953 : }
21954 : return globals;
21955 : }
21956 :
21957 : /* -----------------------------------------------------------------------------
21958 : * constants/methods manipulation
21959 : * ----------------------------------------------------------------------------- */
21960 :
21961 : /* Install Constants */
21962 : SWIGINTERN void
21963 285 : SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
21964 285 : PyObject *obj = 0;
21965 285 : size_t i;
21966 285 : for (i = 0; constants[i].type; ++i) {
21967 0 : switch(constants[i].type) {
21968 0 : case SWIG_PY_POINTER:
21969 0 : obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
21970 0 : break;
21971 0 : case SWIG_PY_BINARY:
21972 0 : obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
21973 : break;
21974 : default:
21975 : obj = 0;
21976 : break;
21977 : }
21978 0 : if (obj) {
21979 0 : PyDict_SetItemString(d, constants[i].name, obj);
21980 0 : Py_DECREF(obj);
21981 : }
21982 : }
21983 285 : }
21984 :
21985 : /* -----------------------------------------------------------------------------*/
21986 : /* Fix SwigMethods to carry the callback ptrs when needed */
21987 : /* -----------------------------------------------------------------------------*/
21988 :
21989 : SWIGINTERN void
21990 285 : SWIG_Python_FixMethods(PyMethodDef *methods,
21991 : swig_const_info *const_table,
21992 : swig_type_info **types,
21993 : swig_type_info **types_initial) {
21994 285 : size_t i;
21995 66975 : for (i = 0; methods[i].ml_name; ++i) {
21996 66690 : const char *c = methods[i].ml_doc;
21997 66690 : if (!c) continue;
21998 63555 : c = strstr(c, "swig_ptr: ");
21999 63555 : if (c) {
22000 0 : int j;
22001 0 : swig_const_info *ci = 0;
22002 0 : const char *name = c + 10;
22003 0 : for (j = 0; const_table[j].type; ++j) {
22004 0 : if (strncmp(const_table[j].name, name,
22005 : strlen(const_table[j].name)) == 0) {
22006 : ci = &(const_table[j]);
22007 : break;
22008 : }
22009 : }
22010 0 : if (ci) {
22011 66690 : void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
22012 0 : if (ptr) {
22013 0 : size_t shift = (ci->ptype) - types;
22014 0 : swig_type_info *ty = types_initial[shift];
22015 0 : size_t ldoc = (c - methods[i].ml_doc);
22016 0 : size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
22017 0 : char *ndoc = (char*)malloc(ldoc + lptr + 10);
22018 0 : if (ndoc) {
22019 0 : char *buff = ndoc;
22020 0 : memcpy(buff, methods[i].ml_doc, ldoc);
22021 0 : buff += ldoc;
22022 0 : memcpy(buff, "swig_ptr: ", 10);
22023 0 : buff += 10;
22024 0 : SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
22025 0 : methods[i].ml_doc = ndoc;
22026 : }
22027 : }
22028 : }
22029 : }
22030 : }
22031 285 : }
22032 :
22033 : /* -----------------------------------------------------------------------------
22034 : * Method creation and docstring support functions
22035 : * ----------------------------------------------------------------------------- */
22036 :
22037 : /* -----------------------------------------------------------------------------
22038 : * Function to find the method definition with the correct docstring for the
22039 : * proxy module as opposed to the low-level API
22040 : * ----------------------------------------------------------------------------- */
22041 :
22042 0 : SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
22043 : /* Find the function in the modified method table */
22044 0 : size_t offset = 0;
22045 0 : int found = 0;
22046 0 : while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
22047 0 : if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
22048 : found = 1;
22049 : break;
22050 : }
22051 0 : offset++;
22052 : }
22053 : /* Use the copy with the modified docstring if available */
22054 0 : return found ? &SwigMethods_proxydocs[offset] : NULL;
22055 : }
22056 :
22057 : /* -----------------------------------------------------------------------------
22058 : * Wrapper of PyInstanceMethod_New() used in Python 3
22059 : * It is exported to the generated module, used for -fastproxy
22060 : * ----------------------------------------------------------------------------- */
22061 :
22062 0 : SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
22063 0 : if (PyCFunction_Check(func)) {
22064 0 : PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
22065 0 : PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
22066 0 : if (ml)
22067 0 : func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
22068 : }
22069 : #if PY_VERSION_HEX >= 0x03000000
22070 0 : return PyInstanceMethod_New(func);
22071 : #else
22072 : return PyMethod_New(func, NULL, NULL);
22073 : #endif
22074 : }
22075 :
22076 : /* -----------------------------------------------------------------------------
22077 : * Wrapper of PyStaticMethod_New()
22078 : * It is exported to the generated module, used for -fastproxy
22079 : * ----------------------------------------------------------------------------- */
22080 :
22081 : SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
22082 : if (PyCFunction_Check(func)) {
22083 : PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
22084 : PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
22085 : if (ml)
22086 : func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
22087 : }
22088 : return PyStaticMethod_New(func);
22089 : }
22090 :
22091 : #ifdef __cplusplus
22092 : }
22093 : #endif
22094 :
22095 : /* -----------------------------------------------------------------------------*
22096 : * Partial Init method
22097 : * -----------------------------------------------------------------------------*/
22098 :
22099 : #ifdef __cplusplus
22100 : extern "C"
22101 : #endif
22102 :
22103 : SWIGEXPORT
22104 : #if PY_VERSION_HEX >= 0x03000000
22105 : PyObject*
22106 : #else
22107 : void
22108 : #endif
22109 285 : SWIG_init(void) {
22110 285 : PyObject *m, *d, *md, *globals;
22111 :
22112 : #if PY_VERSION_HEX >= 0x03000000
22113 285 : static struct PyModuleDef SWIG_module = {
22114 : PyModuleDef_HEAD_INIT,
22115 : SWIG_name,
22116 : NULL,
22117 : -1,
22118 : SwigMethods,
22119 : NULL,
22120 : NULL,
22121 : NULL,
22122 : NULL
22123 : };
22124 : #endif
22125 :
22126 : #if defined(SWIGPYTHON_BUILTIN)
22127 : static SwigPyClientData SwigPyObject_clientdata = {
22128 : 0, 0, 0, 0, 0, 0, 0
22129 : };
22130 : static PyGetSetDef this_getset_def = {
22131 : (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
22132 : };
22133 : static SwigPyGetSet thisown_getset_closure = {
22134 : SwigPyObject_own,
22135 : SwigPyObject_own
22136 : };
22137 : static PyGetSetDef thisown_getset_def = {
22138 : (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
22139 : };
22140 : PyTypeObject *builtin_pytype;
22141 : int builtin_base_count;
22142 : swig_type_info *builtin_basetype;
22143 : PyObject *tuple;
22144 : PyGetSetDescrObject *static_getset;
22145 : PyTypeObject *metatype;
22146 : PyTypeObject *swigpyobject;
22147 : SwigPyClientData *cd;
22148 : PyObject *public_interface, *public_symbol;
22149 : PyObject *this_descr;
22150 : PyObject *thisown_descr;
22151 : PyObject *self = 0;
22152 : int i;
22153 :
22154 : (void)builtin_pytype;
22155 : (void)builtin_base_count;
22156 : (void)builtin_basetype;
22157 : (void)tuple;
22158 : (void)static_getset;
22159 : (void)self;
22160 :
22161 : /* Metaclass is used to implement static member variables */
22162 : metatype = SwigPyObjectType();
22163 : assert(metatype);
22164 : #endif
22165 :
22166 285 : (void)globals;
22167 :
22168 : /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
22169 285 : SWIG_This();
22170 285 : SWIG_Python_TypeCache();
22171 285 : SwigPyPacked_type();
22172 : #ifndef SWIGPYTHON_BUILTIN
22173 285 : SwigPyObject_type();
22174 : #endif
22175 :
22176 : /* Fix SwigMethods to carry the callback ptrs when needed */
22177 285 : SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
22178 :
22179 : #if PY_VERSION_HEX >= 0x03000000
22180 285 : m = PyModule_Create(&SWIG_module);
22181 : #else
22182 : m = Py_InitModule(SWIG_name, SwigMethods);
22183 : #endif
22184 :
22185 285 : md = d = PyModule_GetDict(m);
22186 285 : (void)md;
22187 :
22188 285 : SWIG_InitializeModule(0);
22189 :
22190 : #ifdef SWIGPYTHON_BUILTIN
22191 : swigpyobject = SwigPyObject_TypeOnce();
22192 :
22193 : SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
22194 : assert(SwigPyObject_stype);
22195 : cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
22196 : if (!cd) {
22197 : SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
22198 : SwigPyObject_clientdata.pytype = swigpyobject;
22199 : } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
22200 : PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
22201 : # if PY_VERSION_HEX >= 0x03000000
22202 : return NULL;
22203 : # else
22204 : return;
22205 : # endif
22206 : }
22207 :
22208 : /* All objects have a 'this' attribute */
22209 : this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
22210 : (void)this_descr;
22211 :
22212 : /* All objects have a 'thisown' attribute */
22213 : thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
22214 : (void)thisown_descr;
22215 :
22216 : public_interface = PyList_New(0);
22217 : public_symbol = 0;
22218 : (void)public_symbol;
22219 :
22220 : PyDict_SetItemString(md, "__all__", public_interface);
22221 : Py_DECREF(public_interface);
22222 : for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
22223 : SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
22224 : for (i = 0; swig_const_table[i].name != 0; ++i)
22225 : SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
22226 : #endif
22227 :
22228 285 : SWIG_InstallConstants(d,swig_const_table);
22229 :
22230 285 : SWIG_Python_SetConstant(d, "SRS_WKT_WGS84_LAT_LONG",SWIG_FromCharPtr("GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AXIS[\"Latitude\",NORTH],AXIS[\"Longitude\",EAST],AUTHORITY[\"EPSG\",\"4326\"]]"));
22231 285 : SWIG_Python_SetConstant(d, "SRS_PT_ALBERS_CONIC_EQUAL_AREA",SWIG_FromCharPtr("Albers_Conic_Equal_Area"));
22232 285 : SWIG_Python_SetConstant(d, "SRS_PT_AZIMUTHAL_EQUIDISTANT",SWIG_FromCharPtr("Azimuthal_Equidistant"));
22233 285 : SWIG_Python_SetConstant(d, "SRS_PT_CASSINI_SOLDNER",SWIG_FromCharPtr("Cassini_Soldner"));
22234 285 : SWIG_Python_SetConstant(d, "SRS_PT_CYLINDRICAL_EQUAL_AREA",SWIG_FromCharPtr("Cylindrical_Equal_Area"));
22235 285 : SWIG_Python_SetConstant(d, "SRS_PT_BONNE",SWIG_FromCharPtr("Bonne"));
22236 285 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_I",SWIG_FromCharPtr("Eckert_I"));
22237 285 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_II",SWIG_FromCharPtr("Eckert_II"));
22238 285 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_III",SWIG_FromCharPtr("Eckert_III"));
22239 285 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_IV",SWIG_FromCharPtr("Eckert_IV"));
22240 285 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_V",SWIG_FromCharPtr("Eckert_V"));
22241 285 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_VI",SWIG_FromCharPtr("Eckert_VI"));
22242 285 : SWIG_Python_SetConstant(d, "SRS_PT_EQUIDISTANT_CONIC",SWIG_FromCharPtr("Equidistant_Conic"));
22243 285 : SWIG_Python_SetConstant(d, "SRS_PT_EQUIRECTANGULAR",SWIG_FromCharPtr("Equirectangular"));
22244 285 : SWIG_Python_SetConstant(d, "SRS_PT_GALL_STEREOGRAPHIC",SWIG_FromCharPtr("Gall_Stereographic"));
22245 285 : SWIG_Python_SetConstant(d, "SRS_PT_GAUSSSCHREIBERTMERCATOR",SWIG_FromCharPtr("Gauss_Schreiber_Transverse_Mercator"));
22246 285 : SWIG_Python_SetConstant(d, "SRS_PT_GEOSTATIONARY_SATELLITE",SWIG_FromCharPtr("Geostationary_Satellite"));
22247 285 : SWIG_Python_SetConstant(d, "SRS_PT_GOODE_HOMOLOSINE",SWIG_FromCharPtr("Goode_Homolosine"));
22248 285 : SWIG_Python_SetConstant(d, "SRS_PT_IGH",SWIG_FromCharPtr("Interrupted_Goode_Homolosine"));
22249 285 : SWIG_Python_SetConstant(d, "SRS_PT_GNOMONIC",SWIG_FromCharPtr("Gnomonic"));
22250 285 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR_AZIMUTH_CENTER",SWIG_FromCharPtr("Hotine_Oblique_Mercator_Azimuth_Center"));
22251 285 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR",SWIG_FromCharPtr("Hotine_Oblique_Mercator"));
22252 285 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN",SWIG_FromCharPtr("Hotine_Oblique_Mercator_Two_Point_Natural_Origin"));
22253 285 : SWIG_Python_SetConstant(d, "SRS_PT_LABORDE_OBLIQUE_MERCATOR",SWIG_FromCharPtr("Laborde_Oblique_Mercator"));
22254 285 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP",SWIG_FromCharPtr("Lambert_Conformal_Conic_1SP"));
22255 285 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP",SWIG_FromCharPtr("Lambert_Conformal_Conic_2SP"));
22256 285 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM",SWIG_FromCharPtr("Lambert_Conformal_Conic_2SP_Belgium"));
22257 285 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA",SWIG_FromCharPtr("Lambert_Azimuthal_Equal_Area"));
22258 285 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_1SP",SWIG_FromCharPtr("Mercator_1SP"));
22259 285 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_2SP",SWIG_FromCharPtr("Mercator_2SP"));
22260 285 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_AUXILIARY_SPHERE",SWIG_FromCharPtr("Mercator_Auxiliary_Sphere"));
22261 285 : SWIG_Python_SetConstant(d, "SRS_PT_MILLER_CYLINDRICAL",SWIG_FromCharPtr("Miller_Cylindrical"));
22262 285 : SWIG_Python_SetConstant(d, "SRS_PT_MOLLWEIDE",SWIG_FromCharPtr("Mollweide"));
22263 285 : SWIG_Python_SetConstant(d, "SRS_PT_NEW_ZEALAND_MAP_GRID",SWIG_FromCharPtr("New_Zealand_Map_Grid"));
22264 285 : SWIG_Python_SetConstant(d, "SRS_PT_OBLIQUE_STEREOGRAPHIC",SWIG_FromCharPtr("Oblique_Stereographic"));
22265 285 : SWIG_Python_SetConstant(d, "SRS_PT_ORTHOGRAPHIC",SWIG_FromCharPtr("Orthographic"));
22266 285 : SWIG_Python_SetConstant(d, "SRS_PT_POLAR_STEREOGRAPHIC",SWIG_FromCharPtr("Polar_Stereographic"));
22267 285 : SWIG_Python_SetConstant(d, "SRS_PT_POLYCONIC",SWIG_FromCharPtr("Polyconic"));
22268 285 : SWIG_Python_SetConstant(d, "SRS_PT_ROBINSON",SWIG_FromCharPtr("Robinson"));
22269 285 : SWIG_Python_SetConstant(d, "SRS_PT_SINUSOIDAL",SWIG_FromCharPtr("Sinusoidal"));
22270 285 : SWIG_Python_SetConstant(d, "SRS_PT_STEREOGRAPHIC",SWIG_FromCharPtr("Stereographic"));
22271 285 : SWIG_Python_SetConstant(d, "SRS_PT_SWISS_OBLIQUE_CYLINDRICAL",SWIG_FromCharPtr("Swiss_Oblique_Cylindrical"));
22272 285 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR",SWIG_FromCharPtr("Transverse_Mercator"));
22273 285 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED",SWIG_FromCharPtr("Transverse_Mercator_South_Orientated"));
22274 285 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_21",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_21"));
22275 285 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_22",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_22"));
22276 285 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_23",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_23"));
22277 285 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_24",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_24"));
22278 285 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_25",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_25"));
22279 285 : SWIG_Python_SetConstant(d, "SRS_PT_TUNISIA_MINING_GRID",SWIG_FromCharPtr("Tunisia_Mining_Grid"));
22280 285 : SWIG_Python_SetConstant(d, "SRS_PT_TWO_POINT_EQUIDISTANT",SWIG_FromCharPtr("Two_Point_Equidistant"));
22281 285 : SWIG_Python_SetConstant(d, "SRS_PT_VANDERGRINTEN",SWIG_FromCharPtr("VanDerGrinten"));
22282 285 : SWIG_Python_SetConstant(d, "SRS_PT_KROVAK",SWIG_FromCharPtr("Krovak"));
22283 285 : SWIG_Python_SetConstant(d, "SRS_PT_IMW_POLYCONIC",SWIG_FromCharPtr("International_Map_of_the_World_Polyconic"));
22284 285 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_I",SWIG_FromCharPtr("Wagner_I"));
22285 285 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_II",SWIG_FromCharPtr("Wagner_II"));
22286 285 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_III",SWIG_FromCharPtr("Wagner_III"));
22287 285 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_IV",SWIG_FromCharPtr("Wagner_IV"));
22288 285 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_V",SWIG_FromCharPtr("Wagner_V"));
22289 285 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_VI",SWIG_FromCharPtr("Wagner_VI"));
22290 285 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_VII",SWIG_FromCharPtr("Wagner_VII"));
22291 285 : SWIG_Python_SetConstant(d, "SRS_PT_QSC",SWIG_FromCharPtr("Quadrilateralized_Spherical_Cube"));
22292 285 : SWIG_Python_SetConstant(d, "SRS_PT_AITOFF",SWIG_FromCharPtr("Aitoff"));
22293 285 : SWIG_Python_SetConstant(d, "SRS_PT_WINKEL_I",SWIG_FromCharPtr("Winkel_I"));
22294 285 : SWIG_Python_SetConstant(d, "SRS_PT_WINKEL_II",SWIG_FromCharPtr("Winkel_II"));
22295 285 : SWIG_Python_SetConstant(d, "SRS_PT_WINKEL_TRIPEL",SWIG_FromCharPtr("Winkel_Tripel"));
22296 285 : SWIG_Python_SetConstant(d, "SRS_PT_CRASTER_PARABOLIC",SWIG_FromCharPtr("Craster_Parabolic"));
22297 285 : SWIG_Python_SetConstant(d, "SRS_PT_LOXIMUTHAL",SWIG_FromCharPtr("Loximuthal"));
22298 285 : SWIG_Python_SetConstant(d, "SRS_PT_QUARTIC_AUTHALIC",SWIG_FromCharPtr("Quartic_Authalic"));
22299 285 : SWIG_Python_SetConstant(d, "SRS_PT_SCH",SWIG_FromCharPtr("Spherical_Cross_Track_Height"));
22300 285 : SWIG_Python_SetConstant(d, "SRS_PP_CENTRAL_MERIDIAN",SWIG_FromCharPtr("central_meridian"));
22301 285 : SWIG_Python_SetConstant(d, "SRS_PP_SCALE_FACTOR",SWIG_FromCharPtr("scale_factor"));
22302 285 : SWIG_Python_SetConstant(d, "SRS_PP_STANDARD_PARALLEL_1",SWIG_FromCharPtr("standard_parallel_1"));
22303 285 : SWIG_Python_SetConstant(d, "SRS_PP_STANDARD_PARALLEL_2",SWIG_FromCharPtr("standard_parallel_2"));
22304 285 : SWIG_Python_SetConstant(d, "SRS_PP_PSEUDO_STD_PARALLEL_1",SWIG_FromCharPtr("pseudo_standard_parallel_1"));
22305 285 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_CENTER",SWIG_FromCharPtr("longitude_of_center"));
22306 285 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_CENTER",SWIG_FromCharPtr("latitude_of_center"));
22307 285 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_ORIGIN",SWIG_FromCharPtr("longitude_of_origin"));
22308 285 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_ORIGIN",SWIG_FromCharPtr("latitude_of_origin"));
22309 285 : SWIG_Python_SetConstant(d, "SRS_PP_FALSE_EASTING",SWIG_FromCharPtr("false_easting"));
22310 285 : SWIG_Python_SetConstant(d, "SRS_PP_FALSE_NORTHING",SWIG_FromCharPtr("false_northing"));
22311 285 : SWIG_Python_SetConstant(d, "SRS_PP_AZIMUTH",SWIG_FromCharPtr("azimuth"));
22312 285 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_1",SWIG_FromCharPtr("longitude_of_point_1"));
22313 285 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_1",SWIG_FromCharPtr("latitude_of_point_1"));
22314 285 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_2",SWIG_FromCharPtr("longitude_of_point_2"));
22315 285 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_2",SWIG_FromCharPtr("latitude_of_point_2"));
22316 285 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_3",SWIG_FromCharPtr("longitude_of_point_3"));
22317 285 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_3",SWIG_FromCharPtr("latitude_of_point_3"));
22318 285 : SWIG_Python_SetConstant(d, "SRS_PP_RECTIFIED_GRID_ANGLE",SWIG_FromCharPtr("rectified_grid_angle"));
22319 285 : SWIG_Python_SetConstant(d, "SRS_PP_LANDSAT_NUMBER",SWIG_FromCharPtr("landsat_number"));
22320 285 : SWIG_Python_SetConstant(d, "SRS_PP_PATH_NUMBER",SWIG_FromCharPtr("path_number"));
22321 285 : SWIG_Python_SetConstant(d, "SRS_PP_PERSPECTIVE_POINT_HEIGHT",SWIG_FromCharPtr("perspective_point_height"));
22322 285 : SWIG_Python_SetConstant(d, "SRS_PP_SATELLITE_HEIGHT",SWIG_FromCharPtr("satellite_height"));
22323 285 : SWIG_Python_SetConstant(d, "SRS_PP_FIPSZONE",SWIG_FromCharPtr("fipszone"));
22324 285 : SWIG_Python_SetConstant(d, "SRS_PP_ZONE",SWIG_FromCharPtr("zone"));
22325 285 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_1ST_POINT",SWIG_FromCharPtr("Latitude_Of_1st_Point"));
22326 285 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_1ST_POINT",SWIG_FromCharPtr("Longitude_Of_1st_Point"));
22327 285 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_2ND_POINT",SWIG_FromCharPtr("Latitude_Of_2nd_Point"));
22328 285 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_2ND_POINT",SWIG_FromCharPtr("Longitude_Of_2nd_Point"));
22329 285 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_LATITUDE",SWIG_FromCharPtr("peg_point_latitude"));
22330 285 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_LONGITUDE",SWIG_FromCharPtr("peg_point_longitude"));
22331 285 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_HEADING",SWIG_FromCharPtr("peg_point_heading"));
22332 285 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_HEIGHT",SWIG_FromCharPtr("peg_point_height"));
22333 285 : SWIG_Python_SetConstant(d, "SRS_UL_METER",SWIG_FromCharPtr("Meter"));
22334 285 : SWIG_Python_SetConstant(d, "SRS_UL_FOOT",SWIG_FromCharPtr("Foot (International)"));
22335 285 : SWIG_Python_SetConstant(d, "SRS_UL_FOOT_CONV",SWIG_FromCharPtr("0.3048"));
22336 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_FOOT",SWIG_FromCharPtr("Foot_US"));
22337 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_FOOT_CONV",SWIG_FromCharPtr("0.3048006096012192"));
22338 285 : SWIG_Python_SetConstant(d, "SRS_UL_NAUTICAL_MILE",SWIG_FromCharPtr("Nautical Mile"));
22339 285 : SWIG_Python_SetConstant(d, "SRS_UL_NAUTICAL_MILE_CONV",SWIG_FromCharPtr("1852.0"));
22340 285 : SWIG_Python_SetConstant(d, "SRS_UL_LINK",SWIG_FromCharPtr("Link"));
22341 285 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_CONV",SWIG_FromCharPtr("0.20116684023368047"));
22342 285 : SWIG_Python_SetConstant(d, "SRS_UL_CHAIN",SWIG_FromCharPtr("Chain"));
22343 285 : SWIG_Python_SetConstant(d, "SRS_UL_CHAIN_CONV",SWIG_FromCharPtr("20.116684023368047"));
22344 285 : SWIG_Python_SetConstant(d, "SRS_UL_ROD",SWIG_FromCharPtr("Rod"));
22345 285 : SWIG_Python_SetConstant(d, "SRS_UL_ROD_CONV",SWIG_FromCharPtr("5.02921005842012"));
22346 285 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_Clarke",SWIG_FromCharPtr("Link_Clarke"));
22347 285 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_Clarke_CONV",SWIG_FromCharPtr("0.2011661949"));
22348 285 : SWIG_Python_SetConstant(d, "SRS_UL_KILOMETER",SWIG_FromCharPtr("Kilometer"));
22349 285 : SWIG_Python_SetConstant(d, "SRS_UL_KILOMETER_CONV",SWIG_FromCharPtr("1000."));
22350 285 : SWIG_Python_SetConstant(d, "SRS_UL_DECIMETER",SWIG_FromCharPtr("Decimeter"));
22351 285 : SWIG_Python_SetConstant(d, "SRS_UL_DECIMETER_CONV",SWIG_FromCharPtr("0.1"));
22352 285 : SWIG_Python_SetConstant(d, "SRS_UL_CENTIMETER",SWIG_FromCharPtr("Centimeter"));
22353 285 : SWIG_Python_SetConstant(d, "SRS_UL_CENTIMETER_CONV",SWIG_FromCharPtr("0.01"));
22354 285 : SWIG_Python_SetConstant(d, "SRS_UL_MILLIMETER",SWIG_FromCharPtr("Millimeter"));
22355 285 : SWIG_Python_SetConstant(d, "SRS_UL_MILLIMETER_CONV",SWIG_FromCharPtr("0.001"));
22356 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_NAUT_MILE",SWIG_FromCharPtr("Nautical_Mile_International"));
22357 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_NAUT_MILE_CONV",SWIG_FromCharPtr("1852.0"));
22358 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_INCH",SWIG_FromCharPtr("Inch_International"));
22359 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_INCH_CONV",SWIG_FromCharPtr("0.0254"));
22360 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FOOT",SWIG_FromCharPtr("Foot_International"));
22361 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FOOT_CONV",SWIG_FromCharPtr("0.3048"));
22362 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_YARD",SWIG_FromCharPtr("Yard_International"));
22363 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_YARD_CONV",SWIG_FromCharPtr("0.9144"));
22364 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_STAT_MILE",SWIG_FromCharPtr("Statute_Mile_International"));
22365 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_STAT_MILE_CONV",SWIG_FromCharPtr("1609.344"));
22366 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FATHOM",SWIG_FromCharPtr("Fathom_International"));
22367 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FATHOM_CONV",SWIG_FromCharPtr("1.8288"));
22368 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_CHAIN",SWIG_FromCharPtr("Chain_International"));
22369 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_CHAIN_CONV",SWIG_FromCharPtr("20.1168"));
22370 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_LINK",SWIG_FromCharPtr("Link_International"));
22371 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_LINK_CONV",SWIG_FromCharPtr("0.201168"));
22372 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_INCH",SWIG_FromCharPtr("Inch_US_Surveyor"));
22373 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_INCH_CONV",SWIG_FromCharPtr("0.025400050800101603"));
22374 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_YARD",SWIG_FromCharPtr("Yard_US_Surveyor"));
22375 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_YARD_CONV",SWIG_FromCharPtr("0.914401828803658"));
22376 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_CHAIN",SWIG_FromCharPtr("Chain_US_Surveyor"));
22377 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_CHAIN_CONV",SWIG_FromCharPtr("20.11684023368047"));
22378 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_STAT_MILE",SWIG_FromCharPtr("Statute_Mile_US_Surveyor"));
22379 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_STAT_MILE_CONV",SWIG_FromCharPtr("1609.347218694437"));
22380 285 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_YARD",SWIG_FromCharPtr("Yard_Indian"));
22381 285 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_YARD_CONV",SWIG_FromCharPtr("0.91439523"));
22382 285 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_FOOT",SWIG_FromCharPtr("Foot_Indian"));
22383 285 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_FOOT_CONV",SWIG_FromCharPtr("0.30479841"));
22384 285 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_CHAIN",SWIG_FromCharPtr("Chain_Indian"));
22385 285 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_CHAIN_CONV",SWIG_FromCharPtr("20.11669506"));
22386 285 : SWIG_Python_SetConstant(d, "SRS_UA_DEGREE",SWIG_FromCharPtr("degree"));
22387 285 : SWIG_Python_SetConstant(d, "SRS_UA_DEGREE_CONV",SWIG_FromCharPtr("0.0174532925199433"));
22388 285 : SWIG_Python_SetConstant(d, "SRS_UA_RADIAN",SWIG_FromCharPtr("radian"));
22389 285 : SWIG_Python_SetConstant(d, "SRS_PM_GREENWICH",SWIG_FromCharPtr("Greenwich"));
22390 285 : SWIG_Python_SetConstant(d, "SRS_DN_NAD27",SWIG_FromCharPtr("North_American_Datum_1927"));
22391 285 : SWIG_Python_SetConstant(d, "SRS_DN_NAD83",SWIG_FromCharPtr("North_American_Datum_1983"));
22392 285 : SWIG_Python_SetConstant(d, "SRS_DN_WGS72",SWIG_FromCharPtr("WGS_1972"));
22393 285 : SWIG_Python_SetConstant(d, "SRS_DN_WGS84",SWIG_FromCharPtr("WGS_1984"));
22394 285 : SWIG_Python_SetConstant(d, "SRS_WGS84_SEMIMAJOR",SWIG_From_double(static_cast< double >(6378137.0)));
22395 285 : SWIG_Python_SetConstant(d, "SRS_WGS84_INVFLATTENING",SWIG_From_double(static_cast< double >(298.257223563)));
22396 285 : SWIG_Python_SetConstant(d, "OAO_Other",SWIG_From_int(static_cast< int >(0)));
22397 285 : SWIG_Python_SetConstant(d, "OAO_North",SWIG_From_int(static_cast< int >(1)));
22398 285 : SWIG_Python_SetConstant(d, "OAO_South",SWIG_From_int(static_cast< int >(2)));
22399 285 : SWIG_Python_SetConstant(d, "OAO_East",SWIG_From_int(static_cast< int >(3)));
22400 285 : SWIG_Python_SetConstant(d, "OAO_West",SWIG_From_int(static_cast< int >(4)));
22401 285 : SWIG_Python_SetConstant(d, "OAO_Up",SWIG_From_int(static_cast< int >(5)));
22402 285 : SWIG_Python_SetConstant(d, "OAO_Down",SWIG_From_int(static_cast< int >(6)));
22403 285 : SWIG_Python_SetConstant(d, "OAMS_TRADITIONAL_GIS_ORDER",SWIG_From_int(static_cast< int >(0)));
22404 285 : SWIG_Python_SetConstant(d, "OAMS_AUTHORITY_COMPLIANT",SWIG_From_int(static_cast< int >(1)));
22405 285 : SWIG_Python_SetConstant(d, "OAMS_CUSTOM",SWIG_From_int(static_cast< int >(2)));
22406 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP",SWIG_From_int(static_cast< int >(1024)));
22407 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_WRONG_SYNTAX",SWIG_From_int(static_cast< int >(1025)));
22408 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_MISSING_ARG",SWIG_From_int(static_cast< int >(1026)));
22409 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE",SWIG_From_int(static_cast< int >(1027)));
22410 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_MUTUALLY_EXCLUSIVE_ARGS",SWIG_From_int(static_cast< int >(1028)));
22411 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID",SWIG_From_int(static_cast< int >(1029)));
22412 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM",SWIG_From_int(static_cast< int >(2048)));
22413 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_INVALID_COORD",SWIG_From_int(static_cast< int >(2049)));
22414 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_OUTSIDE_PROJECTION_DOMAIN",SWIG_From_int(static_cast< int >(2050)));
22415 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_NO_OPERATION",SWIG_From_int(static_cast< int >(2051)));
22416 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_OUTSIDE_GRID",SWIG_From_int(static_cast< int >(2052)));
22417 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_GRID_AT_NODATA",SWIG_From_int(static_cast< int >(2053)));
22418 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER",SWIG_From_int(static_cast< int >(4096)));
22419 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER_API_MISUSE",SWIG_From_int(static_cast< int >(4097)));
22420 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER_NO_INVERSE_OP",SWIG_From_int(static_cast< int >(4098)));
22421 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER_NETWORK_ERROR",SWIG_From_int(static_cast< int >(4099)));
22422 :
22423 : // Will be turned on for GDAL 4.0
22424 : // UseExceptions();
22425 :
22426 285 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_GEOGRAPHIC_2D",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_GEOGRAPHIC_2D)));
22427 285 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_GEOGRAPHIC_3D",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_GEOGRAPHIC_3D)));
22428 285 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_GEOCENTRIC",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_GEOCENTRIC)));
22429 285 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_PROJECTED",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_PROJECTED)));
22430 285 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_VERTICAL",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_VERTICAL)));
22431 285 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_COMPOUND",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_COMPOUND)));
22432 285 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_OTHER",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_OTHER)));
22433 :
22434 : /* Initialize threading */
22435 285 : SWIG_PYTHON_INITIALIZE_THREADS;
22436 : #if PY_VERSION_HEX >= 0x03000000
22437 285 : return m;
22438 : #else
22439 : return;
22440 : #endif
22441 : }
22442 :
|