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 1918 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1183 1918 : 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 1918 : return result;
1198 : }
1199 :
1200 : /* Unpack the argument tuple */
1201 :
1202 : SWIGINTERN Py_ssize_t
1203 26173 : SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1204 : {
1205 26173 : if (!args) {
1206 16788 : 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 9385 : 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 7960 : Py_ssize_t l = PyTuple_GET_SIZE(args);
1227 7960 : 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 7960 : } 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 22608 : for (i = 0; i < l; ++i) {
1238 14648 : objs[i] = PyTuple_GET_ITEM(args, i);
1239 : }
1240 10408 : for (; l < max; ++l) {
1241 2448 : objs[l] = 0;
1242 : }
1243 7960 : 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 44702 : SWIG_Py_Void(void)
1282 : {
1283 44702 : PyObject *none = Py_None;
1284 0 : Py_INCREF(none);
1285 4505 : 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 82117 : SwigPyObject_type(void) {
1506 82117 : static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1507 82117 : 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 9696 : SwigPyObject_dealloc(PyObject *v)
1529 : {
1530 9696 : SwigPyObject *sobj = (SwigPyObject *) v;
1531 9696 : PyObject *next = sobj->next;
1532 9696 : if (sobj->own == SWIG_POINTER_OWN) {
1533 9696 : swig_type_info *ty = sobj->ty;
1534 9696 : SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1535 9696 : PyObject *destroy = data ? data->destroy : 0;
1536 9696 : if (destroy) {
1537 : /* destroy is always a VARARGS method */
1538 9696 : 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 9696 : PyObject *type = NULL, *value = NULL, *traceback = NULL;
1548 9696 : PyErr_Fetch(&type, &value, &traceback);
1549 :
1550 9696 : 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 9696 : PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1557 9696 : PyObject *mself = PyCFunction_GET_SELF(destroy);
1558 9696 : res = ((*meth)(mself, v));
1559 : }
1560 9696 : if (!res)
1561 0 : PyErr_WriteUnraisable(destroy);
1562 :
1563 9696 : PyErr_Restore(type, value, traceback);
1564 :
1565 19392 : 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 9696 : Py_XDECREF(next);
1575 9696 : PyObject_DEL(v);
1576 9696 : }
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 9715 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1779 : {
1780 9715 : SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1781 9715 : if (sobj) {
1782 9715 : sobj->ptr = ptr;
1783 9715 : sobj->ty = ty;
1784 9715 : sobj->own = own;
1785 9715 : sobj->next = 0;
1786 : }
1787 9715 : 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 29943 : SWIG_This(void)
1978 : {
1979 29943 : if (Swig_This_global == NULL)
1980 285 : Swig_This_global = SWIG_Python_str_FromChar("this");
1981 29943 : 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 38772 : SWIG_Python_GetSwigThis(PyObject *pyobj)
1993 : {
1994 38774 : PyObject *obj;
1995 :
1996 38774 : 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 26644 : 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 26644 : obj = PyObject_GetAttr(pyobj,SWIG_This());
2039 26644 : if (obj) {
2040 23628 : Py_DECREF(obj);
2041 : } else {
2042 3016 : if (PyErr_Occurred()) PyErr_Clear();
2043 3016 : return 0;
2044 : }
2045 : #endif
2046 23628 : 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 35848 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2074 35848 : int res;
2075 35848 : SwigPyObject *sobj;
2076 35848 : int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2077 :
2078 35848 : if (!obj)
2079 : return SWIG_ERROR;
2080 35848 : 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 35758 : res = SWIG_ERROR;
2087 :
2088 35758 : sobj = SWIG_Python_GetSwigThis(obj);
2089 35758 : if (own)
2090 0 : *own = 0;
2091 35758 : while (sobj) {
2092 35756 : void *vptr = sobj->ptr;
2093 35756 : if (ty) {
2094 35756 : swig_type_info *to = sobj->ty;
2095 35756 : if (to == ty) {
2096 : /* no type cast needed */
2097 35756 : 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 35758 : if (sobj) {
2122 35756 : if (own)
2123 0 : *own = *own | sobj->own;
2124 35756 : if (flags & SWIG_POINTER_DISOWN) {
2125 12130 : 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 3014 : SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2281 : {
2282 3014 : 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 3014 : dict = PyObject_GetAttrString(inst, "__dict__");
2296 3014 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2297 3014 : Py_DECREF(dict);
2298 3014 : }
2299 :
2300 :
2301 : SWIGINTERN PyObject *
2302 3014 : SWIG_Python_InitShadowInstance(PyObject *args) {
2303 3014 : PyObject *obj[2];
2304 3014 : if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2305 : return NULL;
2306 : } else {
2307 3014 : SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2308 3014 : if (sthis) {
2309 0 : SwigPyObject_append((PyObject*) sthis, obj[1]);
2310 : } else {
2311 3014 : SWIG_Python_SetSwigThis(obj[0], obj[1]);
2312 : }
2313 3014 : return SWIG_Py_Void();
2314 : }
2315 : }
2316 :
2317 : /* Create a new pointer object */
2318 :
2319 : SWIGRUNTIME PyObject *
2320 9735 : SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2321 9735 : SwigPyClientData *clientdata;
2322 9735 : PyObject * robj;
2323 9735 : int own;
2324 :
2325 9735 : if (!ptr)
2326 20 : return SWIG_Py_Void();
2327 :
2328 9715 : clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2329 9715 : own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2330 9715 : 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 9715 : assert(!(flags & SWIG_BUILTIN_TP_INIT));
2361 :
2362 9715 : robj = SwigPyObject_New(ptr, type, own);
2363 9715 : 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 60873 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
2799 : {
2800 60873 : if (carray) {
2801 60827 : 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 60827 : 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 60873 : SWIG_FromCharPtr(const char *cptr)
2824 : {
2825 14133 : return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
2826 : }
2827 :
2828 :
2829 : #define SWIG_From_double PyFloat_FromDouble
2830 :
2831 :
2832 : SWIGINTERNINLINE PyObject*
2833 27958 : SWIG_From_int (int value)
2834 : {
2835 27958 : 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 34446 : 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 37 : PythonBindingErrorHandler(CPLErr eclass, CPLErrorNum err_no, const char *msg )
2882 : {
2883 37 : PythonBindingErrorHandlerContext* ctxt = static_cast<
2884 37 : 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 37 : 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 37 : else if (eclass != CE_Failure ) {
2904 8 : 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 37 : }
2936 :
2937 :
2938 :
2939 :
2940 : static
2941 118531 : int GetUseExceptions() {
2942 77499 : return bUseExceptionsLocal >= 0 ? bUseExceptionsLocal : bUseExceptions;
2943 : }
2944 :
2945 13641 : static int _GetExceptionsLocal()
2946 : {
2947 13641 : return bUseExceptionsLocal;
2948 : }
2949 :
2950 27282 : static void _SetExceptionsLocal(int bVal)
2951 : {
2952 27282 : 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 2846 : 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 28936 : 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 28936 : if (PyLong_Check(obj)) {
3084 28936 : long v = PyLong_AsLong(obj);
3085 28936 : if (!PyErr_Occurred()) {
3086 28936 : if (val) *val = v;
3087 28936 : 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 28930 : SWIG_AsVal_int (PyObject * obj, int *val)
3119 : {
3120 28930 : long v;
3121 57860 : int res = SWIG_AsVal_long (obj, &v);
3122 28930 : if (SWIG_IsOK(res)) {
3123 28930 : if ((v < INT_MIN || v > INT_MAX)) {
3124 : return SWIG_OverflowError;
3125 : } else {
3126 28930 : 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 131304 : template<class T> static T ReturnSame(T x)
3143 : {
3144 1696 : if( bReturnSame )
3145 : return x;
3146 : return 0;
3147 : }
3148 :
3149 34446 : static void pushErrorHandler()
3150 : {
3151 34446 : CPLErrorReset();
3152 34446 : PythonBindingErrorHandlerContext* ctxt = new PythonBindingErrorHandlerContext();
3153 34446 : CPLPushErrorHandlerEx(PythonBindingErrorHandler, ctxt);
3154 34446 : }
3155 :
3156 34446 : static void popErrorHandler()
3157 : {
3158 34446 : PythonBindingErrorHandlerContext* ctxt = static_cast<
3159 34446 : PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
3160 34446 : CPLPopErrorHandler();
3161 34446 : if( ctxt->bMemoryError )
3162 : {
3163 0 : CPLErrorSetState(
3164 : CE_Failure, CPLE_OutOfMemory, "Out of memory");
3165 : }
3166 34446 : 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 34446 : delete ctxt;
3173 34446 : }
3174 :
3175 :
3176 :
3177 :
3178 : /* Return a PyObject* from a NULL terminated C String */
3179 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr) CPL_UNUSED;
3180 1784 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
3181 : {
3182 1784 : const unsigned char* pszIter = (const unsigned char*) pszStr;
3183 664350 : while(*pszIter != 0)
3184 : {
3185 662569 : 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 662566 : pszIter ++;
3194 : }
3195 1781 : 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 2069 : 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 2069 : if (PyUnicode_Check(obj))
3317 : #endif
3318 : #else
3319 : if (PyString_Check(obj))
3320 : #endif
3321 : {
3322 2001 : char *cstr; Py_ssize_t len;
3323 2001 : int ret = SWIG_OK;
3324 : #if PY_VERSION_HEX>=0x03000000
3325 : #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3326 2001 : 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 2001 : obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
3334 2001 : if (!obj)
3335 : return SWIG_TypeError;
3336 2001 : if (alloc)
3337 2001 : *alloc = SWIG_NEWOBJ;
3338 : #endif
3339 2001 : PyBytes_AsStringAndSize(obj, &cstr, &len);
3340 : #else
3341 : PyString_AsStringAndSize(obj, &cstr, &len);
3342 : #endif
3343 2001 : if (cptr) {
3344 2001 : if (alloc) {
3345 2001 : if (*alloc == SWIG_NEWOBJ) {
3346 2001 : *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3347 2001 : *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 2001 : if (psize) *psize = len + 1;
3367 : #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3368 2001 : Py_XDECREF(obj);
3369 : #endif
3370 2001 : 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 2863 : SWIGINTERN OSRSpatialReferenceShadow *new_OSRSpatialReferenceShadow(char const *wkt=""){
3506 2863 : return (OSRSpatialReferenceShadow*) OSRNewSpatialReference(wkt);
3507 : }
3508 5369 : SWIGINTERN void delete_OSRSpatialReferenceShadow(OSRSpatialReferenceShadow *self){
3509 5369 : 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 676 : SWIGINTERN int OSRSpatialReferenceShadow_IsSame(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs,char **options=NULL){
3675 676 : 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 449 : SWIGINTERN int OSRSpatialReferenceShadow_IsProjected(OSRSpatialReferenceShadow *self){
3690 449 : 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 36 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAttrValue(OSRSpatialReferenceShadow *self,char const *name,int child=0){
3736 36 : 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 767 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAuthorityCode(OSRSpatialReferenceShadow *self,char const *target_key=NULL){
3778 767 : 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 552 : SWIGINTERN void OSRSpatialReferenceShadow_SetAxisMappingStrategy(OSRSpatialReferenceShadow *self,OSRAxisMappingStrategy strategy){
3814 552 : 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 10 : SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMajor(OSRSpatialReferenceShadow *self){
3902 : // Return code ignored.
3903 10 : 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 1277 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetFromUserInput(OSRSpatialReferenceShadow *self,char const *name,char **options=NULL){
4076 1277 : 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 1014 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromEPSG(OSRSpatialReferenceShadow *self,int arg){
4140 1014 : 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 12 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromISISPVL(OSRSpatialReferenceShadow *self,char const *pszPVLMappingGroup){
4161 12 : return OSRImportFromISISPVL( self, pszPVLMappingGroup );
4162 : }
4163 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromOzi(OSRSpatialReferenceShadow *self,char const *const *papszLines){
4164 3 : return OSRImportFromOzi( self, papszLines );
4165 : }
4166 4 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromCF1(OSRSpatialReferenceShadow *self,char **keyValues,char const *units=NULL){
4167 4 : return OSRImportFromCF1(self, keyValues, units);
4168 : }
4169 1295 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToWkt(OSRSpatialReferenceShadow *self,char **argout,char **options=NULL){
4170 1295 : return OSRExportToWktEx( self, argout, options );
4171 : }
4172 50 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPrettyWkt(OSRSpatialReferenceShadow *self,char **argout,int simplify=0){
4173 50 : return OSRExportToPrettyWkt( self, argout, simplify );
4174 : }
4175 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPROJJSON(OSRSpatialReferenceShadow *self,char **argout,char **options=NULL){
4176 2 : return OSRExportToPROJJSON( self, argout, options );
4177 : }
4178 321 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToProj4(OSRSpatialReferenceShadow *self,char **argout){
4179 321 : return OSRExportToProj4( self, argout );
4180 : }
4181 6 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPCI(OSRSpatialReferenceShadow *self,char **proj,char **units,double *params[17]){
4182 6 : return OSRExportToPCI( self, proj, units, params );
4183 : }
4184 :
4185 : #define SWIG_From_long PyInt_FromLong
4186 :
4187 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToUSGS(OSRSpatialReferenceShadow *self,long *code,long *zone,double *params[15],long *datum){
4188 2 : return OSRExportToUSGS( self, code, zone, params, datum );
4189 : }
4190 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToERM(OSRSpatialReferenceShadow *self,char **proj,char **datum,char **units){
4191 1 : char szProj[32] = {0}, szDatum[32] = {0}, szUnits[32] = {0};
4192 1 : OGRErr ret = OSRExportToERM( self, szProj, szDatum, szUnits );
4193 1 : *proj = CPLStrdup(szProj);
4194 1 : *datum = CPLStrdup(szDatum);
4195 1 : *units = CPLStrdup(szUnits);
4196 1 : return ret;
4197 : }
4198 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToXML(OSRSpatialReferenceShadow *self,char **argout,char const *dialect=""){
4199 2 : return OSRExportToXML( self, argout, dialect );
4200 : }
4201 5 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToMICoordSys(OSRSpatialReferenceShadow *self,char **argout){
4202 5 : return OSRExportToMICoordSys( self, argout );
4203 : }
4204 4 : SWIGINTERN char **OSRSpatialReferenceShadow_ExportToCF1(OSRSpatialReferenceShadow *self,char **options=NULL){
4205 4 : char** ret = NULL;
4206 4 : OSRExportToCF1(self, NULL, &ret, NULL, options);
4207 4 : return ret;
4208 : }
4209 :
4210 : /* Return a PyObject* from a C String */
4211 44 : static PyObject* GDALPythonObjectFromCStrAndSize(const char *pszStr, size_t nLen)
4212 : {
4213 44 : const unsigned char* pszIter = (const unsigned char*) pszStr;
4214 854 : for( size_t i = 0; i < nLen; ++i)
4215 : {
4216 810 : if (pszIter[i] > 127)
4217 : {
4218 0 : PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, nLen, "strict");
4219 0 : if (pyObj != NULL && !PyErr_Occurred())
4220 : return pyObj;
4221 0 : PyErr_Clear();
4222 0 : return PyBytes_FromStringAndSize(pszStr, nLen);
4223 : }
4224 : }
4225 44 : return PyUnicode_FromStringAndSize(pszStr, nLen);
4226 : }
4227 :
4228 :
4229 : static PyObject*
4230 4 : GetCSLStringAsPyDict( char **stringarray, bool bFreeCSL ) {
4231 4 : PyObject* dict = PyDict_New();
4232 4 : if ( stringarray != NULL ) {
4233 48 : for (char** iter = stringarray; *iter; ++iter ) {
4234 44 : const char* pszSep = strchr( *iter, '=' );
4235 44 : if ( pszSep != NULL) {
4236 44 : const char* keyptr = *iter;
4237 44 : const char* valptr = pszSep + 1;
4238 44 : PyObject *nm = GDALPythonObjectFromCStrAndSize( keyptr, (size_t)(pszSep - keyptr) );
4239 44 : PyObject *val = GDALPythonObjectFromCStr( valptr );
4240 44 : PyDict_SetItem(dict, nm, val );
4241 44 : Py_DECREF(nm);
4242 44 : Py_DECREF(val);
4243 : }
4244 : }
4245 : }
4246 4 : if( bFreeCSL )
4247 4 : CSLDestroy(stringarray);
4248 4 : return dict;
4249 : }
4250 :
4251 1 : SWIGINTERN retStringAndCPLFree *OSRSpatialReferenceShadow_ExportToCF1Units(OSRSpatialReferenceShadow *self,char **options=NULL){
4252 1 : char* units = NULL;
4253 1 : OSRExportToCF1(self, NULL, NULL, &units, options);
4254 1 : return units;
4255 : }
4256 16 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_CloneGeogCS(OSRSpatialReferenceShadow *self){
4257 16 : return (OSRSpatialReferenceShadow*) OSRCloneGeogCS(self);
4258 : }
4259 55 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_Clone(OSRSpatialReferenceShadow *self){
4260 55 : return (OSRSpatialReferenceShadow*) OSRClone(self);
4261 : }
4262 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_StripVertical(OSRSpatialReferenceShadow *self){
4263 1 : return OSRStripVertical(self);
4264 : }
4265 114 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_Validate(OSRSpatialReferenceShadow *self){
4266 114 : return OSRValidate(self);
4267 : }
4268 17 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphToESRI(OSRSpatialReferenceShadow *self){
4269 17 : return OSRMorphToESRI(self);
4270 : }
4271 19 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphFromESRI(OSRSpatialReferenceShadow *self){
4272 19 : return OSRMorphFromESRI(self);
4273 : }
4274 28 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_ConvertToOtherProjection(OSRSpatialReferenceShadow *self,char const *other_projection,char **options=NULL){
4275 28 : return (OSRSpatialReferenceShadow*)OSRConvertToOtherProjection(self, other_projection, options);
4276 : }
4277 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_PromoteTo3D(OSRSpatialReferenceShadow *self,char const *name=NULL){
4278 3 : return OSRPromoteTo3D(self, name);
4279 : }
4280 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_DemoteTo2D(OSRSpatialReferenceShadow *self,char const *name=NULL){
4281 1 : return OSRDemoteTo2D(self, name);
4282 : }
4283 11 : SWIGINTERN OGRCoordinateTransformationOptions *new_OGRCoordinateTransformationOptions(){
4284 11 : return OCTNewCoordinateTransformationOptions();
4285 : }
4286 11 : SWIGINTERN void delete_OGRCoordinateTransformationOptions(OGRCoordinateTransformationOptions *self){
4287 11 : OCTDestroyCoordinateTransformationOptions( self );
4288 : }
4289 5 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetAreaOfInterest(OGRCoordinateTransformationOptions *self,double westLongitudeDeg,double southLatitudeDeg,double eastLongitudeDeg,double northLatitudeDeg){
4290 5 : return OCTCoordinateTransformationOptionsSetAreaOfInterest(self,
4291 : westLongitudeDeg, southLatitudeDeg,
4292 5 : eastLongitudeDeg, northLatitudeDeg);
4293 : }
4294 :
4295 : SWIGINTERN int
4296 2 : SWIG_AsVal_bool (PyObject *obj, bool *val)
4297 : {
4298 2 : int r;
4299 2 : if (!PyBool_Check(obj))
4300 : return SWIG_ERROR;
4301 2 : r = PyObject_IsTrue(obj);
4302 2 : if (r == -1)
4303 : return SWIG_ERROR;
4304 2 : if (val) *val = r ? true : false;
4305 : return SWIG_OK;
4306 : }
4307 :
4308 8 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetOperation(OGRCoordinateTransformationOptions *self,char const *operation,bool inverseCT=false){
4309 16 : return OCTCoordinateTransformationOptionsSetOperation(self, operation, inverseCT);
4310 : }
4311 1 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetDesiredAccuracy(OGRCoordinateTransformationOptions *self,double accuracy){
4312 2 : return OCTCoordinateTransformationOptionsSetDesiredAccuracy(self, accuracy);
4313 : }
4314 1 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetBallparkAllowed(OGRCoordinateTransformationOptions *self,bool allowBallpark){
4315 2 : return OCTCoordinateTransformationOptionsSetBallparkAllowed(self, allowBallpark);
4316 : }
4317 0 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetOnlyBest(OGRCoordinateTransformationOptions *self,bool onlyBest){
4318 0 : return OCTCoordinateTransformationOptionsSetOnlyBest(self, onlyBest);
4319 : }
4320 : SWIGINTERN OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow__SWIG_0(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst){
4321 : return (OSRCoordinateTransformationShadow*) OCTNewCoordinateTransformation(src, dst);
4322 : }
4323 10 : SWIGINTERN OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow__SWIG_1(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst,OGRCoordinateTransformationOptions *options){
4324 10 : return (OSRCoordinateTransformationShadow*)
4325 10 : (options ? OCTNewCoordinateTransformationEx( src, dst, options ) : OCTNewCoordinateTransformation(src, dst));
4326 : }
4327 140 : SWIGINTERN void delete_OSRCoordinateTransformationShadow(OSRCoordinateTransformationShadow *self){
4328 140 : OCTDestroyCoordinateTransformation( self );
4329 : }
4330 1 : SWIGINTERN OSRCoordinateTransformationShadow *OSRCoordinateTransformationShadow_GetInverse(OSRCoordinateTransformationShadow *self){
4331 1 : return (OSRCoordinateTransformationShadow*) OCTGetInverse(self);
4332 : }
4333 1 : SWIGINTERN void OSRCoordinateTransformationShadow__TransformPoint3Double(OSRCoordinateTransformationShadow *self,double inout[3]){
4334 :
4335 :
4336 :
4337 1 : if (self == NULL)
4338 : return;
4339 1 : OCTTransform( self, 1, &inout[0], &inout[1], &inout[2] );
4340 : }
4341 1 : SWIGINTERN void OSRCoordinateTransformationShadow__TransformPoint4Double(OSRCoordinateTransformationShadow *self,double inout[4]){
4342 :
4343 :
4344 :
4345 :
4346 :
4347 1 : if (self == NULL)
4348 : return;
4349 1 : OCTTransform4D( self, 1, &inout[0], &inout[1], &inout[2], &inout[3], NULL );
4350 : }
4351 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(OSRCoordinateTransformationShadow *self,double argout[3],double x,double y,double z=0.0){
4352 : if (self == NULL)
4353 : return;
4354 : argout[0] = x;
4355 : argout[1] = y;
4356 : argout[2] = z;
4357 : OCTTransform( self, 1, &argout[0], &argout[1], &argout[2] );
4358 : }
4359 4 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(OSRCoordinateTransformationShadow *self,double argout[4],double x,double y,double z,double t){
4360 4 : if (self == NULL)
4361 : return;
4362 4 : argout[0] = x;
4363 4 : argout[1] = y;
4364 4 : argout[2] = z;
4365 4 : argout[3] = t;
4366 4 : OCTTransform4D( self, 1, &argout[0], &argout[1], &argout[2], &argout[3], NULL );
4367 : }
4368 0 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPointWithErrorCode(OSRCoordinateTransformationShadow *self,double argout[4],int errorCode[1],double x,double y,double z,double t){
4369 0 : if (self == NULL)
4370 : return;
4371 0 : argout[0] = x;
4372 0 : argout[1] = y;
4373 0 : argout[2] = z;
4374 0 : argout[3] = t;
4375 0 : OCTTransform4DWithErrorCodes( self, 1, &argout[0], &argout[1], &argout[2], &argout[3], errorCode );
4376 : }
4377 :
4378 : static int
4379 10 : DecomposeSequenceOf4DCoordinates( PyObject *seq, int nCount, double *x, double *y, double *z, double *t, int *pbFoundTime )
4380 : {
4381 10 : *pbFoundTime = FALSE;
4382 33 : for( int i = 0; i<nCount; ++i )
4383 : {
4384 :
4385 23 : PyObject *o = PySequence_GetItem(seq, i);
4386 23 : if ( !PySequence_Check(o) )
4387 : {
4388 0 : Py_DECREF(o);
4389 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
4390 :
4391 0 : return FALSE;
4392 : }
4393 :
4394 23 : Py_ssize_t len = PySequence_Size(o);
4395 :
4396 23 : if (len >= 2 && len <= 4)
4397 : {
4398 23 : PyObject *o1 = PySequence_GetItem(o, 0);
4399 23 : if (!PyNumber_Check(o1))
4400 : {
4401 0 : Py_DECREF(o); Py_DECREF(o1);
4402 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4403 :
4404 0 : return FALSE;
4405 : }
4406 23 : x[i] = PyFloat_AsDouble(o1);
4407 23 : Py_DECREF(o1);
4408 :
4409 23 : o1 = PySequence_GetItem(o, 1);
4410 23 : if (!PyNumber_Check(o1))
4411 : {
4412 0 : Py_DECREF(o); Py_DECREF(o1);
4413 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4414 :
4415 0 : return FALSE;
4416 : }
4417 23 : y[i] = PyFloat_AsDouble(o1);
4418 23 : Py_DECREF(o1);
4419 :
4420 : /* The 3rd coordinate is optional, default 0.0 */
4421 23 : if (len >= 3)
4422 : {
4423 16 : o1 = PySequence_GetItem(o, 2);
4424 16 : if (!PyNumber_Check(o1))
4425 : {
4426 0 : Py_DECREF(o); Py_DECREF(o1);
4427 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4428 :
4429 0 : return FALSE;
4430 : }
4431 16 : z[i] = PyFloat_AsDouble(o1);
4432 16 : Py_DECREF(o1);
4433 : }
4434 : else
4435 : {
4436 7 : z[i] = 0.0;
4437 : }
4438 :
4439 : /* The 4th coordinate is optional, default 0.0 */
4440 23 : if (len >= 4)
4441 : {
4442 8 : o1 = PySequence_GetItem(o, 3);
4443 8 : if (!PyNumber_Check(o1))
4444 : {
4445 0 : Py_DECREF(o); Py_DECREF(o1);
4446 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4447 :
4448 0 : return FALSE;
4449 : }
4450 8 : *pbFoundTime = TRUE;
4451 8 : t[i] = PyFloat_AsDouble(o1);
4452 8 : Py_DECREF(o1);
4453 : }
4454 : else
4455 : {
4456 15 : t[i] = 0.0;
4457 : }
4458 : }
4459 : else
4460 : {
4461 0 : Py_DECREF(o);
4462 0 : PyErr_SetString(PyExc_TypeError, "invalid coordinate");
4463 :
4464 0 : return FALSE;
4465 : }
4466 :
4467 23 : Py_DECREF(o);
4468 : }
4469 :
4470 : return TRUE;
4471 : }
4472 :
4473 10 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoints(OSRCoordinateTransformationShadow *self,int nCount,double *x,double *y,double *z,double *t){
4474 10 : if (self == NULL)
4475 : return;
4476 10 : OCTTransform4D( self, nCount, x, y, z, t, NULL );
4477 : }
4478 25 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformBounds(OSRCoordinateTransformationShadow *self,double argout[4],double minx,double miny,double maxx,double maxy,int densify_pts){
4479 25 : argout[0] = HUGE_VAL;
4480 25 : argout[1] = HUGE_VAL;
4481 25 : argout[2] = HUGE_VAL;
4482 25 : argout[3] = HUGE_VAL;
4483 25 : if (self == NULL)
4484 : return;
4485 25 : OCTTransformBounds(
4486 : self,
4487 : minx, miny, maxx, maxy,
4488 : &argout[0], &argout[1], &argout[2], &argout[3],
4489 : densify_pts
4490 : );
4491 : }
4492 :
4493 2 : OSRCoordinateTransformationShadow *CreateCoordinateTransformation( OSRSpatialReferenceShadow *src, OSRSpatialReferenceShadow *dst, OGRCoordinateTransformationOptions* options = NULL ) {
4494 2 : return (OSRCoordinateTransformationShadow*)
4495 2 : (options ? OCTNewCoordinateTransformationEx( src, dst, options ) : OCTNewCoordinateTransformation(src, dst));
4496 : }
4497 :
4498 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){
4499 6609 : OSRCRSInfo *self = (OSRCRSInfo*) CPLMalloc( sizeof( OSRCRSInfo ) );
4500 6609 : self->pszAuthName = auth_name ? CPLStrdup(auth_name) : NULL;
4501 6609 : self->pszCode = code ? CPLStrdup(code) : NULL;
4502 6609 : self->pszName = name ? CPLStrdup(name) : NULL;
4503 6609 : self->eType = type;
4504 6609 : self->bDeprecated = deprecated;
4505 6609 : self->bBboxValid = bbox_valid;
4506 6609 : self->dfWestLongitudeDeg = west_lon_degree;
4507 6609 : self->dfSouthLatitudeDeg = south_lat_degree;
4508 6609 : self->dfEastLongitudeDeg = east_lon_degree;
4509 6609 : self->dfNorthLatitudeDeg = north_lat_degree;
4510 6609 : self->pszAreaName = area_name ? CPLStrdup(area_name) : NULL;
4511 6609 : self->pszProjectionMethod = projection_method ? CPLStrdup(projection_method) : NULL;
4512 6609 : self->pszCelestialBodyName = celestial_body_name ? CPLStrdup(celestial_body_name) : NULL;
4513 6609 : return self;
4514 : }
4515 6609 : SWIGINTERN void delete_OSRCRSInfo(OSRCRSInfo *self){
4516 6609 : CPLFree( self->pszAuthName );
4517 6609 : CPLFree( self->pszCode );
4518 6609 : CPLFree( self->pszName );
4519 6609 : CPLFree( self->pszAreaName );
4520 6609 : CPLFree( self->pszProjectionMethod );
4521 6609 : CPLFree( self->pszCelestialBodyName );
4522 6609 : CPLFree( self );
4523 6609 : }
4524 :
4525 :
4526 6609 : const char* OSRCRSInfo_auth_name_get( OSRCRSInfo *crsInfo ) {
4527 6609 : return crsInfo->pszAuthName;
4528 : }
4529 :
4530 6609 : const char* OSRCRSInfo_code_get( OSRCRSInfo *crsInfo ) {
4531 6609 : return crsInfo->pszCode;
4532 : }
4533 :
4534 1 : const char* OSRCRSInfo_name_get( OSRCRSInfo *crsInfo ) {
4535 1 : return crsInfo->pszName;
4536 : }
4537 :
4538 1 : OSRCRSType OSRCRSInfo_type_get( OSRCRSInfo *crsInfo ) {
4539 1 : return crsInfo->eType;
4540 : }
4541 :
4542 1 : bool OSRCRSInfo_deprecated_get( OSRCRSInfo *crsInfo ) {
4543 1 : return crsInfo->bDeprecated;
4544 : }
4545 :
4546 1 : bool OSRCRSInfo_bbox_valid_get( OSRCRSInfo *crsInfo ) {
4547 1 : return crsInfo->bBboxValid;
4548 : }
4549 :
4550 1 : double OSRCRSInfo_west_lon_degree_get( OSRCRSInfo *crsInfo ) {
4551 1 : return crsInfo->dfWestLongitudeDeg;
4552 : }
4553 :
4554 1 : double OSRCRSInfo_south_lat_degree_get( OSRCRSInfo *crsInfo ) {
4555 1 : return crsInfo->dfSouthLatitudeDeg;
4556 : }
4557 :
4558 1 : double OSRCRSInfo_east_lon_degree_get( OSRCRSInfo *crsInfo ) {
4559 1 : return crsInfo->dfEastLongitudeDeg;
4560 : }
4561 :
4562 1 : double OSRCRSInfo_north_lat_degree_get( OSRCRSInfo *crsInfo ) {
4563 1 : return crsInfo->dfNorthLatitudeDeg;
4564 : }
4565 :
4566 1 : const char* OSRCRSInfo_area_name_get( OSRCRSInfo *crsInfo ) {
4567 1 : return crsInfo->pszAreaName;
4568 : }
4569 :
4570 1 : const char* OSRCRSInfo_projection_method_get( OSRCRSInfo *crsInfo ) {
4571 1 : return crsInfo->pszProjectionMethod;
4572 : }
4573 :
4574 1 : const char* OSRCRSInfo_celestial_body_name_get( OSRCRSInfo *crsInfo ) {
4575 1 : return crsInfo->pszCelestialBodyName;
4576 : }
4577 :
4578 :
4579 :
4580 1 : char** GetAuthorityListFromDatabase()
4581 : {
4582 1 : return OSRGetAuthorityListFromDatabase();
4583 : }
4584 :
4585 :
4586 25 : static PyObject* CSLToList( char** stringarray, bool *pbErr )
4587 : {
4588 25 : PyObject* res;
4589 25 : if ( stringarray == NULL ) {
4590 0 : res = Py_None;
4591 0 : Py_INCREF( res );
4592 : }
4593 : else {
4594 25 : int len = CSLCount( stringarray );
4595 25 : res = PyList_New( len );
4596 25 : if( !res ) {
4597 0 : *pbErr = true;
4598 0 : return res;
4599 : }
4600 62 : for ( int i = 0; i < len; ++i ) {
4601 37 : PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
4602 37 : PyList_SetItem(res, i, o );
4603 : }
4604 : }
4605 25 : *pbErr = false;
4606 25 : return res;
4607 : }
4608 :
4609 :
4610 1 : void GetCRSInfoListFromDatabase( const char *authName,
4611 : OSRCRSInfo*** pList,
4612 : int* pnListCount)
4613 : {
4614 1 : *pList = OSRGetCRSInfoListFromDatabase(authName, NULL, pnListCount);
4615 1 : }
4616 :
4617 :
4618 1 : void SetPROJSearchPath( const char *utf8_string )
4619 : {
4620 1 : const char* const apszPaths[2] = { utf8_string, NULL };
4621 1 : OSRSetPROJSearchPaths(apszPaths);
4622 1 : }
4623 :
4624 :
4625 17 : void SetPROJSearchPaths( char** paths )
4626 : {
4627 17 : OSRSetPROJSearchPaths(paths);
4628 17 : }
4629 :
4630 :
4631 24 : char** GetPROJSearchPaths()
4632 : {
4633 24 : return OSRGetPROJSearchPaths();
4634 : }
4635 :
4636 :
4637 84 : int GetPROJVersionMajor()
4638 : {
4639 84 : int num;
4640 84 : OSRGetPROJVersion(&num, NULL, NULL);
4641 84 : return num;
4642 : }
4643 :
4644 78 : int GetPROJVersionMinor()
4645 : {
4646 78 : int num;
4647 78 : OSRGetPROJVersion(NULL, &num, NULL);
4648 78 : return num;
4649 : }
4650 :
4651 66 : int GetPROJVersionMicro()
4652 : {
4653 66 : int num;
4654 66 : OSRGetPROJVersion(NULL, NULL, &num);
4655 66 : return num;
4656 : }
4657 :
4658 0 : bool GetPROJEnableNetwork()
4659 : {
4660 0 : return OSRGetPROJEnableNetwork();
4661 : }
4662 :
4663 0 : void SetPROJEnableNetwork(bool enabled)
4664 : {
4665 0 : OSRSetPROJEnableNetwork(enabled);
4666 0 : }
4667 :
4668 :
4669 1 : void SetPROJAuxDbPath( const char *utf8_string )
4670 : {
4671 1 : const char* const apszPaths[2] = { utf8_string, NULL };
4672 1 : OSRSetPROJAuxDbPaths(apszPaths);
4673 1 : }
4674 :
4675 :
4676 0 : void SetPROJAuxDbPaths( char** paths )
4677 : {
4678 0 : OSRSetPROJAuxDbPaths(paths);
4679 0 : }
4680 :
4681 :
4682 0 : char** GetPROJAuxDbPaths()
4683 : {
4684 0 : return OSRGetPROJAuxDbPaths();
4685 : }
4686 :
4687 : #ifdef __cplusplus
4688 : extern "C" {
4689 : #endif
4690 0 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4691 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4692 0 : int result;
4693 :
4694 0 : if (!SWIG_Python_UnpackTuple(args, "GetUseExceptions", 0, 0, 0)) SWIG_fail;
4695 0 : {
4696 : #ifdef SED_HACKS
4697 0 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
4698 : #endif
4699 0 : result = GetUseExceptions();
4700 : }
4701 0 : resultobj = SWIG_From_int(static_cast< int >(result));
4702 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; } }
4703 : return resultobj;
4704 0 : fail:
4705 0 : return NULL;
4706 : }
4707 :
4708 :
4709 13641 : SWIGINTERN PyObject *_wrap__GetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4710 13641 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4711 13641 : int result;
4712 :
4713 13641 : if (!SWIG_Python_UnpackTuple(args, "_GetExceptionsLocal", 0, 0, 0)) SWIG_fail;
4714 13641 : {
4715 : #ifdef SED_HACKS
4716 13641 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
4717 : #endif
4718 13641 : result = (int)_GetExceptionsLocal();
4719 : }
4720 13641 : resultobj = SWIG_From_int(static_cast< int >(result));
4721 13641 : 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; } }
4722 : return resultobj;
4723 0 : fail:
4724 0 : return NULL;
4725 : }
4726 :
4727 :
4728 27282 : SWIGINTERN PyObject *_wrap__SetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4729 27282 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4730 27282 : int arg1 ;
4731 27282 : int val1 ;
4732 27282 : int ecode1 = 0 ;
4733 27282 : PyObject *swig_obj[1] ;
4734 :
4735 27282 : if (!args) SWIG_fail;
4736 27282 : swig_obj[0] = args;
4737 27282 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
4738 27282 : if (!SWIG_IsOK(ecode1)) {
4739 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_SetExceptionsLocal" "', argument " "1"" of type '" "int""'");
4740 : }
4741 27282 : arg1 = static_cast< int >(val1);
4742 27282 : {
4743 : #ifdef SED_HACKS
4744 27282 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
4745 : #endif
4746 27282 : _SetExceptionsLocal(arg1);
4747 : }
4748 27282 : resultobj = SWIG_Py_Void();
4749 27282 : 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; } }
4750 : return resultobj;
4751 : fail:
4752 : return NULL;
4753 : }
4754 :
4755 :
4756 32 : SWIGINTERN PyObject *_wrap__UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4757 32 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4758 :
4759 32 : if (!SWIG_Python_UnpackTuple(args, "_UseExceptions", 0, 0, 0)) SWIG_fail;
4760 32 : _UseExceptions();
4761 32 : resultobj = SWIG_Py_Void();
4762 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; } }
4763 : return resultobj;
4764 0 : fail:
4765 0 : return NULL;
4766 : }
4767 :
4768 :
4769 5 : SWIGINTERN PyObject *_wrap__DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4770 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4771 :
4772 5 : if (!SWIG_Python_UnpackTuple(args, "_DontUseExceptions", 0, 0, 0)) SWIG_fail;
4773 5 : _DontUseExceptions();
4774 5 : resultobj = SWIG_Py_Void();
4775 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; } }
4776 : return resultobj;
4777 0 : fail:
4778 0 : return NULL;
4779 : }
4780 :
4781 :
4782 2846 : SWIGINTERN PyObject *_wrap__UserHasSpecifiedIfUsingExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4783 2846 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4784 2846 : int result;
4785 :
4786 2846 : if (!SWIG_Python_UnpackTuple(args, "_UserHasSpecifiedIfUsingExceptions", 0, 0, 0)) SWIG_fail;
4787 2846 : {
4788 : #ifdef SED_HACKS
4789 2846 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
4790 : #endif
4791 2846 : result = (int)_UserHasSpecifiedIfUsingExceptions();
4792 : }
4793 2846 : resultobj = SWIG_From_int(static_cast< int >(result));
4794 2846 : 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; } }
4795 : return resultobj;
4796 0 : fail:
4797 0 : return NULL;
4798 : }
4799 :
4800 :
4801 0 : SWIGINTERN PyObject *_wrap_GetWellKnownGeogCSAsWKT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4802 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4803 0 : char *arg1 = (char *) 0 ;
4804 0 : char **arg2 = (char **) 0 ;
4805 0 : int res1 ;
4806 0 : char *buf1 = 0 ;
4807 0 : int alloc1 = 0 ;
4808 0 : char *argout2 = 0 ;
4809 0 : PyObject *swig_obj[1] ;
4810 0 : OGRErr result;
4811 :
4812 0 : {
4813 : /* %typemap(in,numinputs=0) (char **argout2) */
4814 0 : arg2 = &argout2;
4815 : }
4816 0 : if (!args) SWIG_fail;
4817 0 : swig_obj[0] = args;
4818 0 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
4819 0 : if (!SWIG_IsOK(res1)) {
4820 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetWellKnownGeogCSAsWKT" "', argument " "1"" of type '" "char const *""'");
4821 : }
4822 0 : arg1 = reinterpret_cast< char * >(buf1);
4823 0 : {
4824 0 : if (!arg1) {
4825 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4826 : }
4827 : }
4828 0 : {
4829 0 : const int bLocalUseExceptions = GetUseExceptions();
4830 0 : if ( bLocalUseExceptions ) {
4831 0 : pushErrorHandler();
4832 : }
4833 0 : result = (OGRErr)GetWellKnownGeogCSAsWKT((char const *)arg1,arg2);
4834 0 : if ( bLocalUseExceptions ) {
4835 0 : popErrorHandler();
4836 : }
4837 : #ifndef SED_HACKS
4838 : if ( bLocalUseExceptions ) {
4839 : CPLErr eclass = CPLGetLastErrorType();
4840 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4841 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4842 : }
4843 : }
4844 : #endif
4845 : }
4846 0 : {
4847 : /* %typemap(out) OGRErr */
4848 0 : if ( result != 0 && GetUseExceptions()) {
4849 0 : const char* pszMessage = CPLGetLastErrorMsg();
4850 0 : if( pszMessage[0] != '\0' )
4851 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
4852 : else
4853 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4854 0 : SWIG_fail;
4855 : }
4856 : }
4857 0 : {
4858 : /* %typemap(argout) (char **argout) */
4859 0 : PyObject *o;
4860 0 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
4861 0 : o = GDALPythonObjectFromCStr( *arg2 );
4862 : }
4863 : else {
4864 0 : o = Py_None;
4865 0 : Py_INCREF( o );
4866 : }
4867 : #if SWIG_VERSION >= 0x040300
4868 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
4869 : #else
4870 0 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
4871 : #endif
4872 : }
4873 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4874 0 : {
4875 : /* %typemap(freearg) (char **argout) */
4876 0 : if ( *arg2 )
4877 0 : CPLFree( *arg2 );
4878 : }
4879 0 : {
4880 : /* %typemap(ret) OGRErr */
4881 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
4882 0 : resultobj = PyLong_FromLong( result );
4883 : }
4884 : }
4885 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; } }
4886 : return resultobj;
4887 0 : fail:
4888 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4889 0 : {
4890 : /* %typemap(freearg) (char **argout) */
4891 0 : if ( *arg2 )
4892 0 : CPLFree( *arg2 );
4893 : }
4894 : return NULL;
4895 : }
4896 :
4897 :
4898 12 : SWIGINTERN PyObject *_wrap_GetUserInputAsWKT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4899 12 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4900 12 : char *arg1 = (char *) 0 ;
4901 12 : char **arg2 = (char **) 0 ;
4902 12 : int res1 ;
4903 12 : char *buf1 = 0 ;
4904 12 : int alloc1 = 0 ;
4905 12 : char *argout2 = 0 ;
4906 12 : PyObject *swig_obj[1] ;
4907 12 : OGRErr result;
4908 :
4909 12 : {
4910 : /* %typemap(in,numinputs=0) (char **argout2) */
4911 12 : arg2 = &argout2;
4912 : }
4913 12 : if (!args) SWIG_fail;
4914 12 : swig_obj[0] = args;
4915 12 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
4916 12 : if (!SWIG_IsOK(res1)) {
4917 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetUserInputAsWKT" "', argument " "1"" of type '" "char const *""'");
4918 : }
4919 12 : arg1 = reinterpret_cast< char * >(buf1);
4920 12 : {
4921 12 : if (!arg1) {
4922 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4923 : }
4924 : }
4925 12 : {
4926 12 : const int bLocalUseExceptions = GetUseExceptions();
4927 12 : if ( bLocalUseExceptions ) {
4928 12 : pushErrorHandler();
4929 : }
4930 12 : result = (OGRErr)GetUserInputAsWKT((char const *)arg1,arg2);
4931 12 : if ( bLocalUseExceptions ) {
4932 12 : popErrorHandler();
4933 : }
4934 : #ifndef SED_HACKS
4935 : if ( bLocalUseExceptions ) {
4936 : CPLErr eclass = CPLGetLastErrorType();
4937 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4938 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4939 : }
4940 : }
4941 : #endif
4942 : }
4943 12 : {
4944 : /* %typemap(out) OGRErr */
4945 12 : if ( result != 0 && GetUseExceptions()) {
4946 0 : const char* pszMessage = CPLGetLastErrorMsg();
4947 0 : if( pszMessage[0] != '\0' )
4948 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
4949 : else
4950 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4951 0 : SWIG_fail;
4952 : }
4953 : }
4954 12 : {
4955 : /* %typemap(argout) (char **argout) */
4956 12 : PyObject *o;
4957 12 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
4958 12 : o = GDALPythonObjectFromCStr( *arg2 );
4959 : }
4960 : else {
4961 0 : o = Py_None;
4962 0 : Py_INCREF( o );
4963 : }
4964 : #if SWIG_VERSION >= 0x040300
4965 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
4966 : #else
4967 12 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
4968 : #endif
4969 : }
4970 12 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4971 12 : {
4972 : /* %typemap(freearg) (char **argout) */
4973 12 : if ( *arg2 )
4974 12 : CPLFree( *arg2 );
4975 : }
4976 12 : {
4977 : /* %typemap(ret) OGRErr */
4978 24 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
4979 0 : resultobj = PyLong_FromLong( result );
4980 : }
4981 : }
4982 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; } }
4983 : return resultobj;
4984 0 : fail:
4985 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4986 0 : {
4987 : /* %typemap(freearg) (char **argout) */
4988 0 : if ( *arg2 )
4989 0 : CPLFree( *arg2 );
4990 : }
4991 : return NULL;
4992 : }
4993 :
4994 :
4995 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4996 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4997 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
4998 1 : void *argp1 = 0 ;
4999 1 : int res1 = 0 ;
5000 1 : PyObject *swig_obj[1] ;
5001 1 : double result;
5002 :
5003 1 : if (!args) SWIG_fail;
5004 1 : swig_obj[0] = args;
5005 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5006 1 : if (!SWIG_IsOK(res1)) {
5007 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_west_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5008 : }
5009 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5010 1 : {
5011 1 : const int bLocalUseExceptions = GetUseExceptions();
5012 1 : if ( bLocalUseExceptions ) {
5013 1 : pushErrorHandler();
5014 : }
5015 1 : result = (double)OSRAreaOfUse_west_lon_degree_get(arg1);
5016 1 : if ( bLocalUseExceptions ) {
5017 1 : popErrorHandler();
5018 : }
5019 : #ifndef SED_HACKS
5020 : if ( bLocalUseExceptions ) {
5021 : CPLErr eclass = CPLGetLastErrorType();
5022 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5023 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5024 : }
5025 : }
5026 : #endif
5027 : }
5028 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5029 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; } }
5030 : return resultobj;
5031 : fail:
5032 : return NULL;
5033 : }
5034 :
5035 :
5036 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5037 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5038 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5039 1 : void *argp1 = 0 ;
5040 1 : int res1 = 0 ;
5041 1 : PyObject *swig_obj[1] ;
5042 1 : double result;
5043 :
5044 1 : if (!args) SWIG_fail;
5045 1 : swig_obj[0] = args;
5046 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5047 1 : if (!SWIG_IsOK(res1)) {
5048 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_south_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5049 : }
5050 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5051 1 : {
5052 1 : const int bLocalUseExceptions = GetUseExceptions();
5053 1 : if ( bLocalUseExceptions ) {
5054 1 : pushErrorHandler();
5055 : }
5056 1 : result = (double)OSRAreaOfUse_south_lat_degree_get(arg1);
5057 1 : if ( bLocalUseExceptions ) {
5058 1 : popErrorHandler();
5059 : }
5060 : #ifndef SED_HACKS
5061 : if ( bLocalUseExceptions ) {
5062 : CPLErr eclass = CPLGetLastErrorType();
5063 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5064 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5065 : }
5066 : }
5067 : #endif
5068 : }
5069 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5070 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; } }
5071 : return resultobj;
5072 : fail:
5073 : return NULL;
5074 : }
5075 :
5076 :
5077 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5078 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5079 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5080 1 : void *argp1 = 0 ;
5081 1 : int res1 = 0 ;
5082 1 : PyObject *swig_obj[1] ;
5083 1 : double result;
5084 :
5085 1 : if (!args) SWIG_fail;
5086 1 : swig_obj[0] = args;
5087 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5088 1 : if (!SWIG_IsOK(res1)) {
5089 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_east_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5090 : }
5091 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5092 1 : {
5093 1 : const int bLocalUseExceptions = GetUseExceptions();
5094 1 : if ( bLocalUseExceptions ) {
5095 1 : pushErrorHandler();
5096 : }
5097 1 : result = (double)OSRAreaOfUse_east_lon_degree_get(arg1);
5098 1 : if ( bLocalUseExceptions ) {
5099 1 : popErrorHandler();
5100 : }
5101 : #ifndef SED_HACKS
5102 : if ( bLocalUseExceptions ) {
5103 : CPLErr eclass = CPLGetLastErrorType();
5104 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5105 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5106 : }
5107 : }
5108 : #endif
5109 : }
5110 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5111 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; } }
5112 : return resultobj;
5113 : fail:
5114 : return NULL;
5115 : }
5116 :
5117 :
5118 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5119 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5120 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5121 1 : void *argp1 = 0 ;
5122 1 : int res1 = 0 ;
5123 1 : PyObject *swig_obj[1] ;
5124 1 : double result;
5125 :
5126 1 : if (!args) SWIG_fail;
5127 1 : swig_obj[0] = args;
5128 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5129 1 : if (!SWIG_IsOK(res1)) {
5130 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_north_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5131 : }
5132 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5133 1 : {
5134 1 : const int bLocalUseExceptions = GetUseExceptions();
5135 1 : if ( bLocalUseExceptions ) {
5136 1 : pushErrorHandler();
5137 : }
5138 1 : result = (double)OSRAreaOfUse_north_lat_degree_get(arg1);
5139 1 : if ( bLocalUseExceptions ) {
5140 1 : popErrorHandler();
5141 : }
5142 : #ifndef SED_HACKS
5143 : if ( bLocalUseExceptions ) {
5144 : CPLErr eclass = CPLGetLastErrorType();
5145 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5146 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5147 : }
5148 : }
5149 : #endif
5150 : }
5151 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5152 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; } }
5153 : return resultobj;
5154 : fail:
5155 : return NULL;
5156 : }
5157 :
5158 :
5159 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5160 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5161 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5162 1 : void *argp1 = 0 ;
5163 1 : int res1 = 0 ;
5164 1 : PyObject *swig_obj[1] ;
5165 1 : char *result = 0 ;
5166 :
5167 1 : if (!args) SWIG_fail;
5168 1 : swig_obj[0] = args;
5169 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5170 1 : if (!SWIG_IsOK(res1)) {
5171 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_name_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5172 : }
5173 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5174 1 : {
5175 1 : const int bLocalUseExceptions = GetUseExceptions();
5176 1 : if ( bLocalUseExceptions ) {
5177 1 : pushErrorHandler();
5178 : }
5179 1 : result = (char *)OSRAreaOfUse_name_get(arg1);
5180 1 : if ( bLocalUseExceptions ) {
5181 1 : popErrorHandler();
5182 : }
5183 : #ifndef SED_HACKS
5184 : if ( bLocalUseExceptions ) {
5185 : CPLErr eclass = CPLGetLastErrorType();
5186 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5187 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5188 : }
5189 : }
5190 : #endif
5191 : }
5192 1 : resultobj = SWIG_FromCharPtr((const char *)result);
5193 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; } }
5194 : return resultobj;
5195 : fail:
5196 : return NULL;
5197 : }
5198 :
5199 :
5200 0 : SWIGINTERN PyObject *_wrap_new_AreaOfUse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5201 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5202 0 : double arg1 ;
5203 0 : double arg2 ;
5204 0 : double arg3 ;
5205 0 : double arg4 ;
5206 0 : char *arg5 = (char *) 0 ;
5207 0 : double val1 ;
5208 0 : int ecode1 = 0 ;
5209 0 : double val2 ;
5210 0 : int ecode2 = 0 ;
5211 0 : double val3 ;
5212 0 : int ecode3 = 0 ;
5213 0 : double val4 ;
5214 0 : int ecode4 = 0 ;
5215 0 : int res5 ;
5216 0 : char *buf5 = 0 ;
5217 0 : int alloc5 = 0 ;
5218 0 : PyObject *swig_obj[5] ;
5219 0 : OSRAreaOfUse *result = 0 ;
5220 :
5221 0 : if (!SWIG_Python_UnpackTuple(args, "new_AreaOfUse", 5, 5, swig_obj)) SWIG_fail;
5222 0 : ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
5223 0 : if (!SWIG_IsOK(ecode1)) {
5224 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_AreaOfUse" "', argument " "1"" of type '" "double""'");
5225 : }
5226 0 : arg1 = static_cast< double >(val1);
5227 0 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
5228 0 : if (!SWIG_IsOK(ecode2)) {
5229 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_AreaOfUse" "', argument " "2"" of type '" "double""'");
5230 : }
5231 0 : arg2 = static_cast< double >(val2);
5232 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
5233 0 : if (!SWIG_IsOK(ecode3)) {
5234 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_AreaOfUse" "', argument " "3"" of type '" "double""'");
5235 : }
5236 0 : arg3 = static_cast< double >(val3);
5237 0 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
5238 0 : if (!SWIG_IsOK(ecode4)) {
5239 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_AreaOfUse" "', argument " "4"" of type '" "double""'");
5240 : }
5241 0 : arg4 = static_cast< double >(val4);
5242 0 : res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
5243 0 : if (!SWIG_IsOK(res5)) {
5244 0 : SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_AreaOfUse" "', argument " "5"" of type '" "char *""'");
5245 : }
5246 0 : arg5 = reinterpret_cast< char * >(buf5);
5247 0 : {
5248 0 : const int bLocalUseExceptions = GetUseExceptions();
5249 0 : if ( bLocalUseExceptions ) {
5250 0 : pushErrorHandler();
5251 : }
5252 0 : result = (OSRAreaOfUse *)new_OSRAreaOfUse(arg1,arg2,arg3,arg4,arg5);
5253 0 : if ( bLocalUseExceptions ) {
5254 0 : popErrorHandler();
5255 : }
5256 : #ifndef SED_HACKS
5257 : if ( bLocalUseExceptions ) {
5258 : CPLErr eclass = CPLGetLastErrorType();
5259 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5260 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5261 : }
5262 : }
5263 : #endif
5264 : }
5265 0 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRAreaOfUse, SWIG_POINTER_NEW | 0 );
5266 0 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
5267 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; } }
5268 : return resultobj;
5269 0 : fail:
5270 0 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
5271 : return NULL;
5272 : }
5273 :
5274 :
5275 1 : SWIGINTERN PyObject *_wrap_delete_AreaOfUse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5276 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5277 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5278 1 : void *argp1 = 0 ;
5279 1 : int res1 = 0 ;
5280 1 : PyObject *swig_obj[1] ;
5281 :
5282 1 : if (!args) SWIG_fail;
5283 1 : swig_obj[0] = args;
5284 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, SWIG_POINTER_DISOWN | 0 );
5285 1 : if (!SWIG_IsOK(res1)) {
5286 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AreaOfUse" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5287 : }
5288 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5289 1 : {
5290 1 : const int bLocalUseExceptions = GetUseExceptions();
5291 1 : if ( bLocalUseExceptions ) {
5292 1 : pushErrorHandler();
5293 : }
5294 1 : delete_OSRAreaOfUse(arg1);
5295 1 : if ( bLocalUseExceptions ) {
5296 1 : popErrorHandler();
5297 : }
5298 : #ifndef SED_HACKS
5299 : if ( bLocalUseExceptions ) {
5300 : CPLErr eclass = CPLGetLastErrorType();
5301 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5302 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5303 : }
5304 : }
5305 : #endif
5306 : }
5307 1 : resultobj = SWIG_Py_Void();
5308 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; } }
5309 : return resultobj;
5310 : fail:
5311 : return NULL;
5312 : }
5313 :
5314 :
5315 285 : SWIGINTERN PyObject *AreaOfUse_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5316 285 : PyObject *obj;
5317 285 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
5318 285 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRAreaOfUse, SWIG_NewClientData(obj));
5319 285 : return SWIG_Py_Void();
5320 : }
5321 :
5322 0 : SWIGINTERN PyObject *AreaOfUse_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5323 0 : return SWIG_Python_InitShadowInstance(args);
5324 : }
5325 :
5326 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5327 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5328 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5329 0 : void *argp1 = 0 ;
5330 0 : int res1 = 0 ;
5331 0 : PyObject *swig_obj[1] ;
5332 0 : double result;
5333 :
5334 0 : if (!args) SWIG_fail;
5335 0 : swig_obj[0] = args;
5336 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5337 0 : if (!SWIG_IsOK(res1)) {
5338 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_west_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5339 : }
5340 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5341 0 : {
5342 0 : if (!arg1) {
5343 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5344 : }
5345 : }
5346 0 : {
5347 0 : const int bLocalUseExceptions = GetUseExceptions();
5348 0 : if ( bLocalUseExceptions ) {
5349 0 : pushErrorHandler();
5350 : }
5351 0 : result = (double)OSRAreaOfUse_west_lon_degree_get(arg1);
5352 0 : if ( bLocalUseExceptions ) {
5353 0 : popErrorHandler();
5354 : }
5355 : #ifndef SED_HACKS
5356 : if ( bLocalUseExceptions ) {
5357 : CPLErr eclass = CPLGetLastErrorType();
5358 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5359 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5360 : }
5361 : }
5362 : #endif
5363 : }
5364 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5365 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; } }
5366 : return resultobj;
5367 : fail:
5368 : return NULL;
5369 : }
5370 :
5371 :
5372 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5373 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5374 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5375 0 : void *argp1 = 0 ;
5376 0 : int res1 = 0 ;
5377 0 : PyObject *swig_obj[1] ;
5378 0 : double result;
5379 :
5380 0 : if (!args) SWIG_fail;
5381 0 : swig_obj[0] = args;
5382 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5383 0 : if (!SWIG_IsOK(res1)) {
5384 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_south_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5385 : }
5386 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5387 0 : {
5388 0 : if (!arg1) {
5389 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5390 : }
5391 : }
5392 0 : {
5393 0 : const int bLocalUseExceptions = GetUseExceptions();
5394 0 : if ( bLocalUseExceptions ) {
5395 0 : pushErrorHandler();
5396 : }
5397 0 : result = (double)OSRAreaOfUse_south_lat_degree_get(arg1);
5398 0 : if ( bLocalUseExceptions ) {
5399 0 : popErrorHandler();
5400 : }
5401 : #ifndef SED_HACKS
5402 : if ( bLocalUseExceptions ) {
5403 : CPLErr eclass = CPLGetLastErrorType();
5404 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5405 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5406 : }
5407 : }
5408 : #endif
5409 : }
5410 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5411 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; } }
5412 : return resultobj;
5413 : fail:
5414 : return NULL;
5415 : }
5416 :
5417 :
5418 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5419 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5420 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5421 0 : void *argp1 = 0 ;
5422 0 : int res1 = 0 ;
5423 0 : PyObject *swig_obj[1] ;
5424 0 : double result;
5425 :
5426 0 : if (!args) SWIG_fail;
5427 0 : swig_obj[0] = args;
5428 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5429 0 : if (!SWIG_IsOK(res1)) {
5430 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_east_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5431 : }
5432 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5433 0 : {
5434 0 : if (!arg1) {
5435 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5436 : }
5437 : }
5438 0 : {
5439 0 : const int bLocalUseExceptions = GetUseExceptions();
5440 0 : if ( bLocalUseExceptions ) {
5441 0 : pushErrorHandler();
5442 : }
5443 0 : result = (double)OSRAreaOfUse_east_lon_degree_get(arg1);
5444 0 : if ( bLocalUseExceptions ) {
5445 0 : popErrorHandler();
5446 : }
5447 : #ifndef SED_HACKS
5448 : if ( bLocalUseExceptions ) {
5449 : CPLErr eclass = CPLGetLastErrorType();
5450 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5451 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5452 : }
5453 : }
5454 : #endif
5455 : }
5456 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5457 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; } }
5458 : return resultobj;
5459 : fail:
5460 : return NULL;
5461 : }
5462 :
5463 :
5464 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5465 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5466 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5467 0 : void *argp1 = 0 ;
5468 0 : int res1 = 0 ;
5469 0 : PyObject *swig_obj[1] ;
5470 0 : double result;
5471 :
5472 0 : if (!args) SWIG_fail;
5473 0 : swig_obj[0] = args;
5474 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5475 0 : if (!SWIG_IsOK(res1)) {
5476 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_north_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5477 : }
5478 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5479 0 : {
5480 0 : if (!arg1) {
5481 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5482 : }
5483 : }
5484 0 : {
5485 0 : const int bLocalUseExceptions = GetUseExceptions();
5486 0 : if ( bLocalUseExceptions ) {
5487 0 : pushErrorHandler();
5488 : }
5489 0 : result = (double)OSRAreaOfUse_north_lat_degree_get(arg1);
5490 0 : if ( bLocalUseExceptions ) {
5491 0 : popErrorHandler();
5492 : }
5493 : #ifndef SED_HACKS
5494 : if ( bLocalUseExceptions ) {
5495 : CPLErr eclass = CPLGetLastErrorType();
5496 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5497 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5498 : }
5499 : }
5500 : #endif
5501 : }
5502 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5503 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; } }
5504 : return resultobj;
5505 : fail:
5506 : return NULL;
5507 : }
5508 :
5509 :
5510 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5511 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5512 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5513 0 : void *argp1 = 0 ;
5514 0 : int res1 = 0 ;
5515 0 : PyObject *swig_obj[1] ;
5516 0 : char *result = 0 ;
5517 :
5518 0 : if (!args) SWIG_fail;
5519 0 : swig_obj[0] = args;
5520 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5521 0 : if (!SWIG_IsOK(res1)) {
5522 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_name_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5523 : }
5524 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5525 0 : {
5526 0 : if (!arg1) {
5527 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5528 : }
5529 : }
5530 0 : {
5531 0 : const int bLocalUseExceptions = GetUseExceptions();
5532 0 : if ( bLocalUseExceptions ) {
5533 0 : pushErrorHandler();
5534 : }
5535 0 : result = (char *)OSRAreaOfUse_name_get(arg1);
5536 0 : if ( bLocalUseExceptions ) {
5537 0 : popErrorHandler();
5538 : }
5539 : #ifndef SED_HACKS
5540 : if ( bLocalUseExceptions ) {
5541 : CPLErr eclass = CPLGetLastErrorType();
5542 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5543 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5544 : }
5545 : }
5546 : #endif
5547 : }
5548 0 : resultobj = SWIG_FromCharPtr((const char *)result);
5549 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; } }
5550 : return resultobj;
5551 : fail:
5552 : return NULL;
5553 : }
5554 :
5555 :
5556 2863 : SWIGINTERN PyObject *_wrap_new_SpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5557 2863 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5558 2863 : char *arg1 = (char *) "" ;
5559 2863 : int res1 ;
5560 2863 : char *buf1 = 0 ;
5561 2863 : int alloc1 = 0 ;
5562 2863 : PyObject * obj0 = 0 ;
5563 2863 : char * kwnames[] = {
5564 : (char *)"wkt", NULL
5565 : };
5566 2863 : OSRSpatialReferenceShadow *result = 0 ;
5567 :
5568 2863 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:new_SpatialReference", kwnames, &obj0)) SWIG_fail;
5569 2863 : if (obj0) {
5570 0 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5571 0 : if (!SWIG_IsOK(res1)) {
5572 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpatialReference" "', argument " "1"" of type '" "char const *""'");
5573 : }
5574 0 : arg1 = reinterpret_cast< char * >(buf1);
5575 : }
5576 2863 : {
5577 2863 : const int bLocalUseExceptions = GetUseExceptions();
5578 2863 : if ( bLocalUseExceptions ) {
5579 2863 : pushErrorHandler();
5580 : }
5581 2863 : result = (OSRSpatialReferenceShadow *)new_OSRSpatialReferenceShadow((char const *)arg1);
5582 2863 : if ( bLocalUseExceptions ) {
5583 2863 : popErrorHandler();
5584 : }
5585 : #ifndef SED_HACKS
5586 : if ( bLocalUseExceptions ) {
5587 : CPLErr eclass = CPLGetLastErrorType();
5588 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5589 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5590 : }
5591 : }
5592 : #endif
5593 : }
5594 2863 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_NEW | 0 );
5595 2863 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5596 2863 : 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; } }
5597 : return resultobj;
5598 0 : fail:
5599 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5600 : return NULL;
5601 : }
5602 :
5603 :
5604 5369 : SWIGINTERN PyObject *_wrap_delete_SpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5605 5369 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5606 5369 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5607 5369 : void *argp1 = 0 ;
5608 5369 : int res1 = 0 ;
5609 5369 : PyObject *swig_obj[1] ;
5610 :
5611 5369 : if (!args) SWIG_fail;
5612 5369 : swig_obj[0] = args;
5613 5369 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_DISOWN | 0 );
5614 5369 : if (!SWIG_IsOK(res1)) {
5615 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SpatialReference" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5616 : }
5617 5369 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5618 5369 : {
5619 5369 : const int bLocalUseExceptions = GetUseExceptions();
5620 5369 : if ( bLocalUseExceptions ) {
5621 4078 : pushErrorHandler();
5622 : }
5623 5369 : delete_OSRSpatialReferenceShadow(arg1);
5624 5369 : if ( bLocalUseExceptions ) {
5625 4078 : popErrorHandler();
5626 : }
5627 : #ifndef SED_HACKS
5628 : if ( bLocalUseExceptions ) {
5629 : CPLErr eclass = CPLGetLastErrorType();
5630 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5631 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5632 : }
5633 : }
5634 : #endif
5635 : }
5636 5369 : resultobj = SWIG_Py_Void();
5637 5369 : 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; } }
5638 : return resultobj;
5639 : fail:
5640 : return NULL;
5641 : }
5642 :
5643 :
5644 4 : SWIGINTERN PyObject *_wrap_SpatialReference___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5645 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5646 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5647 4 : void *argp1 = 0 ;
5648 4 : int res1 = 0 ;
5649 4 : PyObject *swig_obj[1] ;
5650 4 : retStringAndCPLFree *result = 0 ;
5651 :
5652 4 : if (!args) SWIG_fail;
5653 4 : swig_obj[0] = args;
5654 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5655 4 : if (!SWIG_IsOK(res1)) {
5656 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference___str__" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5657 : }
5658 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5659 4 : {
5660 4 : const int bLocalUseExceptions = GetUseExceptions();
5661 4 : if ( bLocalUseExceptions ) {
5662 3 : pushErrorHandler();
5663 : }
5664 4 : result = (retStringAndCPLFree *)OSRSpatialReferenceShadow___str__(arg1);
5665 4 : if ( bLocalUseExceptions ) {
5666 3 : popErrorHandler();
5667 : }
5668 : #ifndef SED_HACKS
5669 : if ( bLocalUseExceptions ) {
5670 : CPLErr eclass = CPLGetLastErrorType();
5671 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5672 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5673 : }
5674 : }
5675 : #endif
5676 : }
5677 4 : {
5678 : /* %typemap(out) (retStringAndCPLFree*) */
5679 4 : Py_XDECREF(resultobj);
5680 4 : if(result)
5681 : {
5682 4 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
5683 4 : CPLFree(result);
5684 : }
5685 : else
5686 : {
5687 0 : resultobj = Py_None;
5688 0 : Py_INCREF(resultobj);
5689 : }
5690 : }
5691 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; } }
5692 : return resultobj;
5693 : fail:
5694 : return NULL;
5695 : }
5696 :
5697 :
5698 47 : SWIGINTERN PyObject *_wrap_SpatialReference_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5699 47 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5700 47 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5701 47 : void *argp1 = 0 ;
5702 47 : int res1 = 0 ;
5703 47 : PyObject *swig_obj[1] ;
5704 47 : char *result = 0 ;
5705 :
5706 47 : if (!args) SWIG_fail;
5707 47 : swig_obj[0] = args;
5708 47 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5709 47 : if (!SWIG_IsOK(res1)) {
5710 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5711 : }
5712 47 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5713 47 : {
5714 47 : const int bLocalUseExceptions = GetUseExceptions();
5715 47 : if ( bLocalUseExceptions ) {
5716 36 : pushErrorHandler();
5717 : }
5718 47 : result = (char *)OSRSpatialReferenceShadow_GetName(arg1);
5719 47 : if ( bLocalUseExceptions ) {
5720 36 : popErrorHandler();
5721 : }
5722 : #ifndef SED_HACKS
5723 : if ( bLocalUseExceptions ) {
5724 : CPLErr eclass = CPLGetLastErrorType();
5725 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5726 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5727 : }
5728 : }
5729 : #endif
5730 : }
5731 47 : resultobj = SWIG_FromCharPtr((const char *)result);
5732 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; } }
5733 : return resultobj;
5734 : fail:
5735 : return NULL;
5736 : }
5737 :
5738 :
5739 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetCelestialBodyName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5740 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5741 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5742 1 : void *argp1 = 0 ;
5743 1 : int res1 = 0 ;
5744 1 : PyObject *swig_obj[1] ;
5745 1 : char *result = 0 ;
5746 :
5747 1 : if (!args) SWIG_fail;
5748 1 : swig_obj[0] = args;
5749 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5750 1 : if (!SWIG_IsOK(res1)) {
5751 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetCelestialBodyName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5752 : }
5753 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5754 1 : {
5755 1 : const int bLocalUseExceptions = GetUseExceptions();
5756 1 : if ( bLocalUseExceptions ) {
5757 1 : pushErrorHandler();
5758 : }
5759 1 : result = (char *)OSRSpatialReferenceShadow_GetCelestialBodyName(arg1);
5760 1 : if ( bLocalUseExceptions ) {
5761 1 : popErrorHandler();
5762 : }
5763 : #ifndef SED_HACKS
5764 : if ( bLocalUseExceptions ) {
5765 : CPLErr eclass = CPLGetLastErrorType();
5766 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5767 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5768 : }
5769 : }
5770 : #endif
5771 : }
5772 1 : resultobj = SWIG_FromCharPtr((const char *)result);
5773 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; } }
5774 : return resultobj;
5775 : fail:
5776 : return NULL;
5777 : }
5778 :
5779 :
5780 676 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSame(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5781 676 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5782 676 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5783 676 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
5784 676 : char **arg3 = (char **) NULL ;
5785 676 : void *argp1 = 0 ;
5786 676 : int res1 = 0 ;
5787 676 : void *argp2 = 0 ;
5788 676 : int res2 = 0 ;
5789 676 : PyObject * obj0 = 0 ;
5790 676 : PyObject * obj1 = 0 ;
5791 676 : PyObject * obj2 = 0 ;
5792 676 : char * kwnames[] = {
5793 : (char *)"self", (char *)"rhs", (char *)"options", NULL
5794 : };
5795 676 : int result;
5796 :
5797 676 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:SpatialReference_IsSame", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
5798 676 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5799 676 : if (!SWIG_IsOK(res1)) {
5800 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSame" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5801 : }
5802 676 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5803 676 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5804 676 : if (!SWIG_IsOK(res2)) {
5805 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSame" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
5806 : }
5807 676 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
5808 676 : if (obj2) {
5809 81 : {
5810 : /* %typemap(in) char **dict */
5811 81 : arg3 = NULL;
5812 81 : if ( PySequence_Check( obj2 ) ) {
5813 81 : int bErr = FALSE;
5814 81 : arg3 = CSLFromPySequence(obj2, &bErr);
5815 81 : if ( bErr )
5816 : {
5817 0 : SWIG_fail;
5818 : }
5819 : }
5820 0 : else if ( PyMapping_Check( obj2 ) ) {
5821 0 : int bErr = FALSE;
5822 0 : arg3 = CSLFromPyMapping(obj2, &bErr);
5823 0 : if ( bErr )
5824 : {
5825 0 : SWIG_fail;
5826 : }
5827 : }
5828 : else {
5829 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
5830 0 : SWIG_fail;
5831 : }
5832 : }
5833 : }
5834 676 : {
5835 676 : if (!arg2) {
5836 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5837 : }
5838 : }
5839 676 : {
5840 676 : const int bLocalUseExceptions = GetUseExceptions();
5841 676 : if ( bLocalUseExceptions ) {
5842 440 : pushErrorHandler();
5843 : }
5844 676 : result = (int)OSRSpatialReferenceShadow_IsSame(arg1,arg2,arg3);
5845 676 : if ( bLocalUseExceptions ) {
5846 440 : popErrorHandler();
5847 : }
5848 : #ifndef SED_HACKS
5849 : if ( bLocalUseExceptions ) {
5850 : CPLErr eclass = CPLGetLastErrorType();
5851 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5852 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5853 : }
5854 : }
5855 : #endif
5856 : }
5857 676 : resultobj = SWIG_From_int(static_cast< int >(result));
5858 676 : {
5859 : /* %typemap(freearg) char **dict */
5860 676 : CSLDestroy( arg3 );
5861 : }
5862 676 : 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; } }
5863 : return resultobj;
5864 0 : fail:
5865 0 : {
5866 : /* %typemap(freearg) char **dict */
5867 0 : CSLDestroy( arg3 );
5868 : }
5869 : return NULL;
5870 : }
5871 :
5872 :
5873 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSameGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5874 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5875 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5876 0 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
5877 0 : void *argp1 = 0 ;
5878 0 : int res1 = 0 ;
5879 0 : void *argp2 = 0 ;
5880 0 : int res2 = 0 ;
5881 0 : PyObject *swig_obj[2] ;
5882 0 : int result;
5883 :
5884 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_IsSameGeogCS", 2, 2, swig_obj)) SWIG_fail;
5885 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5886 0 : if (!SWIG_IsOK(res1)) {
5887 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSameGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5888 : }
5889 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5890 0 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5891 0 : if (!SWIG_IsOK(res2)) {
5892 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSameGeogCS" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
5893 : }
5894 0 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
5895 0 : {
5896 0 : if (!arg2) {
5897 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5898 : }
5899 : }
5900 0 : {
5901 0 : const int bLocalUseExceptions = GetUseExceptions();
5902 0 : if ( bLocalUseExceptions ) {
5903 0 : pushErrorHandler();
5904 : }
5905 0 : result = (int)OSRSpatialReferenceShadow_IsSameGeogCS(arg1,arg2);
5906 0 : if ( bLocalUseExceptions ) {
5907 0 : popErrorHandler();
5908 : }
5909 : #ifndef SED_HACKS
5910 : if ( bLocalUseExceptions ) {
5911 : CPLErr eclass = CPLGetLastErrorType();
5912 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5913 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5914 : }
5915 : }
5916 : #endif
5917 : }
5918 0 : resultobj = SWIG_From_int(static_cast< int >(result));
5919 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; } }
5920 : return resultobj;
5921 : fail:
5922 : return NULL;
5923 : }
5924 :
5925 :
5926 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSameVertCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5927 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5928 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5929 0 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
5930 0 : void *argp1 = 0 ;
5931 0 : int res1 = 0 ;
5932 0 : void *argp2 = 0 ;
5933 0 : int res2 = 0 ;
5934 0 : PyObject *swig_obj[2] ;
5935 0 : int result;
5936 :
5937 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_IsSameVertCS", 2, 2, swig_obj)) SWIG_fail;
5938 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5939 0 : if (!SWIG_IsOK(res1)) {
5940 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSameVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5941 : }
5942 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5943 0 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5944 0 : if (!SWIG_IsOK(res2)) {
5945 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSameVertCS" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
5946 : }
5947 0 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
5948 0 : {
5949 0 : if (!arg2) {
5950 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5951 : }
5952 : }
5953 0 : {
5954 0 : const int bLocalUseExceptions = GetUseExceptions();
5955 0 : if ( bLocalUseExceptions ) {
5956 0 : pushErrorHandler();
5957 : }
5958 0 : result = (int)OSRSpatialReferenceShadow_IsSameVertCS(arg1,arg2);
5959 0 : if ( bLocalUseExceptions ) {
5960 0 : popErrorHandler();
5961 : }
5962 : #ifndef SED_HACKS
5963 : if ( bLocalUseExceptions ) {
5964 : CPLErr eclass = CPLGetLastErrorType();
5965 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5966 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5967 : }
5968 : }
5969 : #endif
5970 : }
5971 0 : resultobj = SWIG_From_int(static_cast< int >(result));
5972 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; } }
5973 : return resultobj;
5974 : fail:
5975 : return NULL;
5976 : }
5977 :
5978 :
5979 225 : SWIGINTERN PyObject *_wrap_SpatialReference_IsGeographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5980 225 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5981 225 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5982 225 : void *argp1 = 0 ;
5983 225 : int res1 = 0 ;
5984 225 : PyObject *swig_obj[1] ;
5985 225 : int result;
5986 :
5987 225 : if (!args) SWIG_fail;
5988 225 : swig_obj[0] = args;
5989 225 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5990 225 : if (!SWIG_IsOK(res1)) {
5991 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsGeographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5992 : }
5993 225 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5994 225 : {
5995 225 : const int bLocalUseExceptions = GetUseExceptions();
5996 225 : if ( bLocalUseExceptions ) {
5997 223 : pushErrorHandler();
5998 : }
5999 225 : result = (int)OSRSpatialReferenceShadow_IsGeographic(arg1);
6000 225 : if ( bLocalUseExceptions ) {
6001 223 : popErrorHandler();
6002 : }
6003 : #ifndef SED_HACKS
6004 : if ( bLocalUseExceptions ) {
6005 : CPLErr eclass = CPLGetLastErrorType();
6006 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6007 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6008 : }
6009 : }
6010 : #endif
6011 : }
6012 225 : resultobj = SWIG_From_int(static_cast< int >(result));
6013 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; } }
6014 : return resultobj;
6015 : fail:
6016 : return NULL;
6017 : }
6018 :
6019 :
6020 1 : SWIGINTERN PyObject *_wrap_SpatialReference_IsDerivedGeographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6021 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6022 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6023 1 : void *argp1 = 0 ;
6024 1 : int res1 = 0 ;
6025 1 : PyObject *swig_obj[1] ;
6026 1 : int result;
6027 :
6028 1 : if (!args) SWIG_fail;
6029 1 : swig_obj[0] = args;
6030 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6031 1 : if (!SWIG_IsOK(res1)) {
6032 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsDerivedGeographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6033 : }
6034 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6035 1 : {
6036 1 : const int bLocalUseExceptions = GetUseExceptions();
6037 1 : if ( bLocalUseExceptions ) {
6038 1 : pushErrorHandler();
6039 : }
6040 1 : result = (int)OSRSpatialReferenceShadow_IsDerivedGeographic(arg1);
6041 1 : if ( bLocalUseExceptions ) {
6042 1 : popErrorHandler();
6043 : }
6044 : #ifndef SED_HACKS
6045 : if ( bLocalUseExceptions ) {
6046 : CPLErr eclass = CPLGetLastErrorType();
6047 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6048 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6049 : }
6050 : }
6051 : #endif
6052 : }
6053 1 : resultobj = SWIG_From_int(static_cast< int >(result));
6054 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; } }
6055 : return resultobj;
6056 : fail:
6057 : return NULL;
6058 : }
6059 :
6060 :
6061 449 : SWIGINTERN PyObject *_wrap_SpatialReference_IsProjected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6062 449 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6063 449 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6064 449 : void *argp1 = 0 ;
6065 449 : int res1 = 0 ;
6066 449 : PyObject *swig_obj[1] ;
6067 449 : int result;
6068 :
6069 449 : if (!args) SWIG_fail;
6070 449 : swig_obj[0] = args;
6071 449 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6072 449 : if (!SWIG_IsOK(res1)) {
6073 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsProjected" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6074 : }
6075 449 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6076 449 : {
6077 449 : const int bLocalUseExceptions = GetUseExceptions();
6078 449 : if ( bLocalUseExceptions ) {
6079 447 : pushErrorHandler();
6080 : }
6081 449 : result = (int)OSRSpatialReferenceShadow_IsProjected(arg1);
6082 449 : if ( bLocalUseExceptions ) {
6083 447 : popErrorHandler();
6084 : }
6085 : #ifndef SED_HACKS
6086 : if ( bLocalUseExceptions ) {
6087 : CPLErr eclass = CPLGetLastErrorType();
6088 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6089 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6090 : }
6091 : }
6092 : #endif
6093 : }
6094 449 : resultobj = SWIG_From_int(static_cast< int >(result));
6095 449 : 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; } }
6096 : return resultobj;
6097 : fail:
6098 : return NULL;
6099 : }
6100 :
6101 :
6102 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsDerivedProjected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6103 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6104 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6105 0 : void *argp1 = 0 ;
6106 0 : int res1 = 0 ;
6107 0 : PyObject *swig_obj[1] ;
6108 0 : int result;
6109 :
6110 0 : if (!args) SWIG_fail;
6111 0 : swig_obj[0] = args;
6112 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6113 0 : if (!SWIG_IsOK(res1)) {
6114 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsDerivedProjected" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6115 : }
6116 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6117 0 : {
6118 0 : const int bLocalUseExceptions = GetUseExceptions();
6119 0 : if ( bLocalUseExceptions ) {
6120 0 : pushErrorHandler();
6121 : }
6122 0 : result = (int)OSRSpatialReferenceShadow_IsDerivedProjected(arg1);
6123 0 : if ( bLocalUseExceptions ) {
6124 0 : popErrorHandler();
6125 : }
6126 : #ifndef SED_HACKS
6127 : if ( bLocalUseExceptions ) {
6128 : CPLErr eclass = CPLGetLastErrorType();
6129 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6130 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6131 : }
6132 : }
6133 : #endif
6134 : }
6135 0 : resultobj = SWIG_From_int(static_cast< int >(result));
6136 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; } }
6137 : return resultobj;
6138 : fail:
6139 : return NULL;
6140 : }
6141 :
6142 :
6143 5 : SWIGINTERN PyObject *_wrap_SpatialReference_IsCompound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6144 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6145 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6146 5 : void *argp1 = 0 ;
6147 5 : int res1 = 0 ;
6148 5 : PyObject *swig_obj[1] ;
6149 5 : int result;
6150 :
6151 5 : if (!args) SWIG_fail;
6152 5 : swig_obj[0] = args;
6153 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6154 5 : if (!SWIG_IsOK(res1)) {
6155 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsCompound" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6156 : }
6157 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6158 5 : {
6159 5 : const int bLocalUseExceptions = GetUseExceptions();
6160 5 : if ( bLocalUseExceptions ) {
6161 3 : pushErrorHandler();
6162 : }
6163 5 : result = (int)OSRSpatialReferenceShadow_IsCompound(arg1);
6164 5 : if ( bLocalUseExceptions ) {
6165 3 : popErrorHandler();
6166 : }
6167 : #ifndef SED_HACKS
6168 : if ( bLocalUseExceptions ) {
6169 : CPLErr eclass = CPLGetLastErrorType();
6170 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6171 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6172 : }
6173 : }
6174 : #endif
6175 : }
6176 5 : resultobj = SWIG_From_int(static_cast< int >(result));
6177 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; } }
6178 : return resultobj;
6179 : fail:
6180 : return NULL;
6181 : }
6182 :
6183 :
6184 2 : SWIGINTERN PyObject *_wrap_SpatialReference_IsGeocentric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6185 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6186 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6187 2 : void *argp1 = 0 ;
6188 2 : int res1 = 0 ;
6189 2 : PyObject *swig_obj[1] ;
6190 2 : int result;
6191 :
6192 2 : if (!args) SWIG_fail;
6193 2 : swig_obj[0] = args;
6194 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6195 2 : if (!SWIG_IsOK(res1)) {
6196 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsGeocentric" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6197 : }
6198 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6199 2 : {
6200 2 : const int bLocalUseExceptions = GetUseExceptions();
6201 2 : if ( bLocalUseExceptions ) {
6202 2 : pushErrorHandler();
6203 : }
6204 2 : result = (int)OSRSpatialReferenceShadow_IsGeocentric(arg1);
6205 2 : if ( bLocalUseExceptions ) {
6206 2 : popErrorHandler();
6207 : }
6208 : #ifndef SED_HACKS
6209 : if ( bLocalUseExceptions ) {
6210 : CPLErr eclass = CPLGetLastErrorType();
6211 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6212 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6213 : }
6214 : }
6215 : #endif
6216 : }
6217 2 : resultobj = SWIG_From_int(static_cast< int >(result));
6218 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; } }
6219 : return resultobj;
6220 : fail:
6221 : return NULL;
6222 : }
6223 :
6224 :
6225 4 : SWIGINTERN PyObject *_wrap_SpatialReference_IsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6226 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6227 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6228 4 : void *argp1 = 0 ;
6229 4 : int res1 = 0 ;
6230 4 : PyObject *swig_obj[1] ;
6231 4 : int result;
6232 :
6233 4 : if (!args) SWIG_fail;
6234 4 : swig_obj[0] = args;
6235 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6236 4 : if (!SWIG_IsOK(res1)) {
6237 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsLocal" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6238 : }
6239 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6240 4 : {
6241 4 : const int bLocalUseExceptions = GetUseExceptions();
6242 4 : if ( bLocalUseExceptions ) {
6243 1 : pushErrorHandler();
6244 : }
6245 4 : result = (int)OSRSpatialReferenceShadow_IsLocal(arg1);
6246 4 : if ( bLocalUseExceptions ) {
6247 1 : popErrorHandler();
6248 : }
6249 : #ifndef SED_HACKS
6250 : if ( bLocalUseExceptions ) {
6251 : CPLErr eclass = CPLGetLastErrorType();
6252 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6253 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6254 : }
6255 : }
6256 : #endif
6257 : }
6258 4 : resultobj = SWIG_From_int(static_cast< int >(result));
6259 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; } }
6260 : return resultobj;
6261 : fail:
6262 : return NULL;
6263 : }
6264 :
6265 :
6266 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsVertical(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6267 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6268 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6269 0 : void *argp1 = 0 ;
6270 0 : int res1 = 0 ;
6271 0 : PyObject *swig_obj[1] ;
6272 0 : int result;
6273 :
6274 0 : if (!args) SWIG_fail;
6275 0 : swig_obj[0] = args;
6276 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6277 0 : if (!SWIG_IsOK(res1)) {
6278 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsVertical" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6279 : }
6280 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6281 0 : {
6282 0 : const int bLocalUseExceptions = GetUseExceptions();
6283 0 : if ( bLocalUseExceptions ) {
6284 0 : pushErrorHandler();
6285 : }
6286 0 : result = (int)OSRSpatialReferenceShadow_IsVertical(arg1);
6287 0 : if ( bLocalUseExceptions ) {
6288 0 : popErrorHandler();
6289 : }
6290 : #ifndef SED_HACKS
6291 : if ( bLocalUseExceptions ) {
6292 : CPLErr eclass = CPLGetLastErrorType();
6293 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6294 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6295 : }
6296 : }
6297 : #endif
6298 : }
6299 0 : resultobj = SWIG_From_int(static_cast< int >(result));
6300 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; } }
6301 : return resultobj;
6302 : fail:
6303 : return NULL;
6304 : }
6305 :
6306 :
6307 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsDynamic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6308 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6309 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6310 0 : void *argp1 = 0 ;
6311 0 : int res1 = 0 ;
6312 0 : PyObject *swig_obj[1] ;
6313 0 : bool result;
6314 :
6315 0 : if (!args) SWIG_fail;
6316 0 : swig_obj[0] = args;
6317 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6318 0 : if (!SWIG_IsOK(res1)) {
6319 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsDynamic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6320 : }
6321 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6322 0 : {
6323 0 : const int bLocalUseExceptions = GetUseExceptions();
6324 0 : if ( bLocalUseExceptions ) {
6325 0 : pushErrorHandler();
6326 : }
6327 0 : result = (bool)OSRSpatialReferenceShadow_IsDynamic(arg1);
6328 0 : if ( bLocalUseExceptions ) {
6329 0 : popErrorHandler();
6330 : }
6331 : #ifndef SED_HACKS
6332 : if ( bLocalUseExceptions ) {
6333 : CPLErr eclass = CPLGetLastErrorType();
6334 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6335 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6336 : }
6337 : }
6338 : #endif
6339 : }
6340 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
6341 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; } }
6342 : return resultobj;
6343 : fail:
6344 : return NULL;
6345 : }
6346 :
6347 :
6348 0 : SWIGINTERN PyObject *_wrap_SpatialReference_HasPointMotionOperation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6349 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6350 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6351 0 : void *argp1 = 0 ;
6352 0 : int res1 = 0 ;
6353 0 : PyObject *swig_obj[1] ;
6354 0 : bool result;
6355 :
6356 0 : if (!args) SWIG_fail;
6357 0 : swig_obj[0] = args;
6358 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6359 0 : if (!SWIG_IsOK(res1)) {
6360 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_HasPointMotionOperation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6361 : }
6362 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6363 0 : {
6364 0 : const int bLocalUseExceptions = GetUseExceptions();
6365 0 : if ( bLocalUseExceptions ) {
6366 0 : pushErrorHandler();
6367 : }
6368 0 : result = (bool)OSRSpatialReferenceShadow_HasPointMotionOperation(arg1);
6369 0 : if ( bLocalUseExceptions ) {
6370 0 : popErrorHandler();
6371 : }
6372 : #ifndef SED_HACKS
6373 : if ( bLocalUseExceptions ) {
6374 : CPLErr eclass = CPLGetLastErrorType();
6375 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6376 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6377 : }
6378 : }
6379 : #endif
6380 : }
6381 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
6382 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; } }
6383 : return resultobj;
6384 : fail:
6385 : return NULL;
6386 : }
6387 :
6388 :
6389 30 : SWIGINTERN PyObject *_wrap_SpatialReference_GetCoordinateEpoch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6390 30 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6391 30 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6392 30 : void *argp1 = 0 ;
6393 30 : int res1 = 0 ;
6394 30 : PyObject *swig_obj[1] ;
6395 30 : double result;
6396 :
6397 30 : if (!args) SWIG_fail;
6398 30 : swig_obj[0] = args;
6399 30 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6400 30 : if (!SWIG_IsOK(res1)) {
6401 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetCoordinateEpoch" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6402 : }
6403 30 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6404 30 : {
6405 30 : const int bLocalUseExceptions = GetUseExceptions();
6406 30 : if ( bLocalUseExceptions ) {
6407 16 : pushErrorHandler();
6408 : }
6409 30 : result = (double)OSRSpatialReferenceShadow_GetCoordinateEpoch(arg1);
6410 30 : if ( bLocalUseExceptions ) {
6411 16 : popErrorHandler();
6412 : }
6413 : #ifndef SED_HACKS
6414 : if ( bLocalUseExceptions ) {
6415 : CPLErr eclass = CPLGetLastErrorType();
6416 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6417 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6418 : }
6419 : }
6420 : #endif
6421 : }
6422 30 : resultobj = SWIG_From_double(static_cast< double >(result));
6423 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; } }
6424 : return resultobj;
6425 : fail:
6426 : return NULL;
6427 : }
6428 :
6429 :
6430 31 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCoordinateEpoch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6431 31 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6432 31 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6433 31 : double arg2 ;
6434 31 : void *argp1 = 0 ;
6435 31 : int res1 = 0 ;
6436 31 : double val2 ;
6437 31 : int ecode2 = 0 ;
6438 31 : PyObject *swig_obj[2] ;
6439 :
6440 31 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetCoordinateEpoch", 2, 2, swig_obj)) SWIG_fail;
6441 31 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6442 31 : if (!SWIG_IsOK(res1)) {
6443 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCoordinateEpoch" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6444 : }
6445 31 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6446 31 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
6447 31 : if (!SWIG_IsOK(ecode2)) {
6448 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCoordinateEpoch" "', argument " "2"" of type '" "double""'");
6449 : }
6450 31 : arg2 = static_cast< double >(val2);
6451 31 : {
6452 31 : const int bLocalUseExceptions = GetUseExceptions();
6453 31 : if ( bLocalUseExceptions ) {
6454 18 : pushErrorHandler();
6455 : }
6456 31 : OSRSpatialReferenceShadow_SetCoordinateEpoch(arg1,arg2);
6457 31 : if ( bLocalUseExceptions ) {
6458 18 : popErrorHandler();
6459 : }
6460 : #ifndef SED_HACKS
6461 : if ( bLocalUseExceptions ) {
6462 : CPLErr eclass = CPLGetLastErrorType();
6463 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6464 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6465 : }
6466 : }
6467 : #endif
6468 : }
6469 31 : resultobj = SWIG_Py_Void();
6470 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; } }
6471 : return resultobj;
6472 : fail:
6473 : return NULL;
6474 : }
6475 :
6476 :
6477 207 : SWIGINTERN PyObject *_wrap_SpatialReference_EPSGTreatsAsLatLong(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6478 207 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6479 207 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6480 207 : void *argp1 = 0 ;
6481 207 : int res1 = 0 ;
6482 207 : PyObject *swig_obj[1] ;
6483 207 : int result;
6484 :
6485 207 : if (!args) SWIG_fail;
6486 207 : swig_obj[0] = args;
6487 207 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6488 207 : if (!SWIG_IsOK(res1)) {
6489 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_EPSGTreatsAsLatLong" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6490 : }
6491 207 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6492 207 : {
6493 207 : const int bLocalUseExceptions = GetUseExceptions();
6494 207 : if ( bLocalUseExceptions ) {
6495 207 : pushErrorHandler();
6496 : }
6497 207 : result = (int)OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(arg1);
6498 207 : if ( bLocalUseExceptions ) {
6499 207 : popErrorHandler();
6500 : }
6501 : #ifndef SED_HACKS
6502 : if ( bLocalUseExceptions ) {
6503 : CPLErr eclass = CPLGetLastErrorType();
6504 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6505 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6506 : }
6507 : }
6508 : #endif
6509 : }
6510 207 : resultobj = SWIG_From_int(static_cast< int >(result));
6511 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; } }
6512 : return resultobj;
6513 : fail:
6514 : return NULL;
6515 : }
6516 :
6517 :
6518 214 : SWIGINTERN PyObject *_wrap_SpatialReference_EPSGTreatsAsNorthingEasting(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6519 214 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6520 214 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6521 214 : void *argp1 = 0 ;
6522 214 : int res1 = 0 ;
6523 214 : PyObject *swig_obj[1] ;
6524 214 : int result;
6525 :
6526 214 : if (!args) SWIG_fail;
6527 214 : swig_obj[0] = args;
6528 214 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6529 214 : if (!SWIG_IsOK(res1)) {
6530 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_EPSGTreatsAsNorthingEasting" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6531 : }
6532 214 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6533 214 : {
6534 214 : const int bLocalUseExceptions = GetUseExceptions();
6535 214 : if ( bLocalUseExceptions ) {
6536 214 : pushErrorHandler();
6537 : }
6538 214 : result = (int)OSRSpatialReferenceShadow_EPSGTreatsAsNorthingEasting(arg1);
6539 214 : if ( bLocalUseExceptions ) {
6540 214 : popErrorHandler();
6541 : }
6542 : #ifndef SED_HACKS
6543 : if ( bLocalUseExceptions ) {
6544 : CPLErr eclass = CPLGetLastErrorType();
6545 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6546 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6547 : }
6548 : }
6549 : #endif
6550 : }
6551 214 : resultobj = SWIG_From_int(static_cast< int >(result));
6552 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; } }
6553 : return resultobj;
6554 : fail:
6555 : return NULL;
6556 : }
6557 :
6558 :
6559 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAuthority(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6560 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6561 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6562 0 : char *arg2 = (char *) 0 ;
6563 0 : char *arg3 = (char *) 0 ;
6564 0 : int arg4 ;
6565 0 : void *argp1 = 0 ;
6566 0 : int res1 = 0 ;
6567 0 : int res2 ;
6568 0 : char *buf2 = 0 ;
6569 0 : int alloc2 = 0 ;
6570 0 : int res3 ;
6571 0 : char *buf3 = 0 ;
6572 0 : int alloc3 = 0 ;
6573 0 : int val4 ;
6574 0 : int ecode4 = 0 ;
6575 0 : PyObject *swig_obj[4] ;
6576 0 : OGRErr result;
6577 :
6578 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAuthority", 4, 4, swig_obj)) SWIG_fail;
6579 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6580 0 : if (!SWIG_IsOK(res1)) {
6581 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAuthority" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6582 : }
6583 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6584 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6585 0 : if (!SWIG_IsOK(res2)) {
6586 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAuthority" "', argument " "2"" of type '" "char const *""'");
6587 : }
6588 0 : arg2 = reinterpret_cast< char * >(buf2);
6589 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6590 0 : if (!SWIG_IsOK(res3)) {
6591 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetAuthority" "', argument " "3"" of type '" "char const *""'");
6592 : }
6593 0 : arg3 = reinterpret_cast< char * >(buf3);
6594 0 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
6595 0 : if (!SWIG_IsOK(ecode4)) {
6596 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetAuthority" "', argument " "4"" of type '" "int""'");
6597 : }
6598 0 : arg4 = static_cast< int >(val4);
6599 0 : {
6600 0 : const int bLocalUseExceptions = GetUseExceptions();
6601 0 : if ( bLocalUseExceptions ) {
6602 0 : pushErrorHandler();
6603 : }
6604 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAuthority(arg1,(char const *)arg2,(char const *)arg3,arg4);
6605 0 : if ( bLocalUseExceptions ) {
6606 0 : popErrorHandler();
6607 : }
6608 : #ifndef SED_HACKS
6609 : if ( bLocalUseExceptions ) {
6610 : CPLErr eclass = CPLGetLastErrorType();
6611 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6612 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6613 : }
6614 : }
6615 : #endif
6616 : }
6617 0 : {
6618 : /* %typemap(out) OGRErr */
6619 0 : if ( result != 0 && GetUseExceptions()) {
6620 0 : const char* pszMessage = CPLGetLastErrorMsg();
6621 0 : if( pszMessage[0] != '\0' )
6622 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
6623 : else
6624 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6625 0 : SWIG_fail;
6626 : }
6627 : }
6628 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6629 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6630 0 : {
6631 : /* %typemap(ret) OGRErr */
6632 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
6633 0 : resultobj = PyLong_FromLong( result );
6634 : }
6635 : }
6636 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; } }
6637 : return resultobj;
6638 0 : fail:
6639 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6640 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6641 : return NULL;
6642 : }
6643 :
6644 :
6645 36 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAttrValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6646 36 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6647 36 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6648 36 : char *arg2 = (char *) 0 ;
6649 36 : int arg3 = (int) 0 ;
6650 36 : void *argp1 = 0 ;
6651 36 : int res1 = 0 ;
6652 36 : int res2 ;
6653 36 : char *buf2 = 0 ;
6654 36 : int alloc2 = 0 ;
6655 36 : int val3 ;
6656 36 : int ecode3 = 0 ;
6657 36 : PyObject *swig_obj[3] ;
6658 36 : char *result = 0 ;
6659 :
6660 36 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAttrValue", 2, 3, swig_obj)) SWIG_fail;
6661 36 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6662 36 : if (!SWIG_IsOK(res1)) {
6663 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAttrValue" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6664 : }
6665 36 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6666 36 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6667 36 : if (!SWIG_IsOK(res2)) {
6668 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAttrValue" "', argument " "2"" of type '" "char const *""'");
6669 : }
6670 36 : arg2 = reinterpret_cast< char * >(buf2);
6671 36 : if (swig_obj[2]) {
6672 8 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
6673 8 : if (!SWIG_IsOK(ecode3)) {
6674 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAttrValue" "', argument " "3"" of type '" "int""'");
6675 : }
6676 : arg3 = static_cast< int >(val3);
6677 : }
6678 36 : {
6679 36 : if (!arg2) {
6680 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6681 : }
6682 : }
6683 36 : {
6684 36 : const int bLocalUseExceptions = GetUseExceptions();
6685 36 : if ( bLocalUseExceptions ) {
6686 30 : pushErrorHandler();
6687 : }
6688 36 : result = (char *)OSRSpatialReferenceShadow_GetAttrValue(arg1,(char const *)arg2,arg3);
6689 36 : if ( bLocalUseExceptions ) {
6690 30 : popErrorHandler();
6691 : }
6692 : #ifndef SED_HACKS
6693 : if ( bLocalUseExceptions ) {
6694 : CPLErr eclass = CPLGetLastErrorType();
6695 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6696 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6697 : }
6698 : }
6699 : #endif
6700 : }
6701 36 : resultobj = SWIG_FromCharPtr((const char *)result);
6702 36 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6703 36 : 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; } }
6704 : return resultobj;
6705 0 : fail:
6706 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6707 : return NULL;
6708 : }
6709 :
6710 :
6711 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAttrValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6712 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6713 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6714 1 : char *arg2 = (char *) 0 ;
6715 1 : char *arg3 = (char *) 0 ;
6716 1 : void *argp1 = 0 ;
6717 1 : int res1 = 0 ;
6718 1 : int res2 ;
6719 1 : char *buf2 = 0 ;
6720 1 : int alloc2 = 0 ;
6721 1 : int res3 ;
6722 1 : char *buf3 = 0 ;
6723 1 : int alloc3 = 0 ;
6724 1 : PyObject *swig_obj[3] ;
6725 1 : OGRErr result;
6726 :
6727 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAttrValue", 3, 3, swig_obj)) SWIG_fail;
6728 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6729 1 : if (!SWIG_IsOK(res1)) {
6730 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAttrValue" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6731 : }
6732 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6733 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6734 1 : if (!SWIG_IsOK(res2)) {
6735 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAttrValue" "', argument " "2"" of type '" "char const *""'");
6736 : }
6737 1 : arg2 = reinterpret_cast< char * >(buf2);
6738 1 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6739 1 : if (!SWIG_IsOK(res3)) {
6740 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetAttrValue" "', argument " "3"" of type '" "char const *""'");
6741 : }
6742 1 : arg3 = reinterpret_cast< char * >(buf3);
6743 1 : {
6744 1 : if (!arg2) {
6745 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6746 : }
6747 : }
6748 1 : {
6749 1 : const int bLocalUseExceptions = GetUseExceptions();
6750 1 : if ( bLocalUseExceptions ) {
6751 1 : pushErrorHandler();
6752 : }
6753 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetAttrValue(arg1,(char const *)arg2,(char const *)arg3);
6754 1 : if ( bLocalUseExceptions ) {
6755 1 : popErrorHandler();
6756 : }
6757 : #ifndef SED_HACKS
6758 : if ( bLocalUseExceptions ) {
6759 : CPLErr eclass = CPLGetLastErrorType();
6760 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6761 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6762 : }
6763 : }
6764 : #endif
6765 : }
6766 1 : {
6767 : /* %typemap(out) OGRErr */
6768 1 : if ( result != 0 && GetUseExceptions()) {
6769 0 : const char* pszMessage = CPLGetLastErrorMsg();
6770 0 : if( pszMessage[0] != '\0' )
6771 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
6772 : else
6773 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6774 0 : SWIG_fail;
6775 : }
6776 : }
6777 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6778 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6779 1 : {
6780 : /* %typemap(ret) OGRErr */
6781 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
6782 1 : resultobj = PyLong_FromLong( result );
6783 : }
6784 : }
6785 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; } }
6786 : return resultobj;
6787 0 : fail:
6788 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6789 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6790 : return NULL;
6791 : }
6792 :
6793 :
6794 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAngularUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6795 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6796 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6797 0 : char *arg2 = (char *) 0 ;
6798 0 : double arg3 ;
6799 0 : void *argp1 = 0 ;
6800 0 : int res1 = 0 ;
6801 0 : int res2 ;
6802 0 : char *buf2 = 0 ;
6803 0 : int alloc2 = 0 ;
6804 0 : double val3 ;
6805 0 : int ecode3 = 0 ;
6806 0 : PyObject *swig_obj[3] ;
6807 0 : OGRErr result;
6808 :
6809 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAngularUnits", 3, 3, swig_obj)) SWIG_fail;
6810 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6811 0 : if (!SWIG_IsOK(res1)) {
6812 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAngularUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6813 : }
6814 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6815 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6816 0 : if (!SWIG_IsOK(res2)) {
6817 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAngularUnits" "', argument " "2"" of type '" "char const *""'");
6818 : }
6819 0 : arg2 = reinterpret_cast< char * >(buf2);
6820 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
6821 0 : if (!SWIG_IsOK(ecode3)) {
6822 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetAngularUnits" "', argument " "3"" of type '" "double""'");
6823 : }
6824 0 : arg3 = static_cast< double >(val3);
6825 0 : {
6826 0 : if (!arg2) {
6827 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6828 : }
6829 : }
6830 0 : {
6831 0 : const int bLocalUseExceptions = GetUseExceptions();
6832 0 : if ( bLocalUseExceptions ) {
6833 0 : pushErrorHandler();
6834 : }
6835 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAngularUnits(arg1,(char const *)arg2,arg3);
6836 0 : if ( bLocalUseExceptions ) {
6837 0 : popErrorHandler();
6838 : }
6839 : #ifndef SED_HACKS
6840 : if ( bLocalUseExceptions ) {
6841 : CPLErr eclass = CPLGetLastErrorType();
6842 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6843 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6844 : }
6845 : }
6846 : #endif
6847 : }
6848 0 : {
6849 : /* %typemap(out) OGRErr */
6850 0 : if ( result != 0 && GetUseExceptions()) {
6851 0 : const char* pszMessage = CPLGetLastErrorMsg();
6852 0 : if( pszMessage[0] != '\0' )
6853 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
6854 : else
6855 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6856 0 : SWIG_fail;
6857 : }
6858 : }
6859 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6860 0 : {
6861 : /* %typemap(ret) OGRErr */
6862 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
6863 0 : resultobj = PyLong_FromLong( result );
6864 : }
6865 : }
6866 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; } }
6867 : return resultobj;
6868 0 : fail:
6869 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6870 : return NULL;
6871 : }
6872 :
6873 :
6874 0 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAngularUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6875 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6876 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6877 0 : void *argp1 = 0 ;
6878 0 : int res1 = 0 ;
6879 0 : PyObject *swig_obj[1] ;
6880 0 : double result;
6881 :
6882 0 : if (!args) SWIG_fail;
6883 0 : swig_obj[0] = args;
6884 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6885 0 : if (!SWIG_IsOK(res1)) {
6886 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAngularUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6887 : }
6888 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6889 0 : {
6890 0 : const int bLocalUseExceptions = GetUseExceptions();
6891 0 : if ( bLocalUseExceptions ) {
6892 0 : pushErrorHandler();
6893 : }
6894 0 : result = (double)OSRSpatialReferenceShadow_GetAngularUnits(arg1);
6895 0 : if ( bLocalUseExceptions ) {
6896 0 : popErrorHandler();
6897 : }
6898 : #ifndef SED_HACKS
6899 : if ( bLocalUseExceptions ) {
6900 : CPLErr eclass = CPLGetLastErrorType();
6901 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6902 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6903 : }
6904 : }
6905 : #endif
6906 : }
6907 0 : resultobj = SWIG_From_double(static_cast< double >(result));
6908 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; } }
6909 : return resultobj;
6910 : fail:
6911 : return NULL;
6912 : }
6913 :
6914 :
6915 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAngularUnitsName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6916 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6917 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6918 1 : void *argp1 = 0 ;
6919 1 : int res1 = 0 ;
6920 1 : PyObject *swig_obj[1] ;
6921 1 : char *result = 0 ;
6922 :
6923 1 : if (!args) SWIG_fail;
6924 1 : swig_obj[0] = args;
6925 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6926 1 : if (!SWIG_IsOK(res1)) {
6927 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAngularUnitsName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6928 : }
6929 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6930 1 : {
6931 1 : const int bLocalUseExceptions = GetUseExceptions();
6932 1 : if ( bLocalUseExceptions ) {
6933 1 : pushErrorHandler();
6934 : }
6935 1 : result = (char *)OSRSpatialReferenceShadow_GetAngularUnitsName(arg1);
6936 1 : if ( bLocalUseExceptions ) {
6937 1 : popErrorHandler();
6938 : }
6939 : #ifndef SED_HACKS
6940 : if ( bLocalUseExceptions ) {
6941 : CPLErr eclass = CPLGetLastErrorType();
6942 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6943 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6944 : }
6945 : }
6946 : #endif
6947 : }
6948 1 : resultobj = SWIG_FromCharPtr((const char *)result);
6949 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; } }
6950 : return resultobj;
6951 : fail:
6952 : return NULL;
6953 : }
6954 :
6955 :
6956 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTargetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6957 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6958 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6959 1 : char *arg2 = (char *) 0 ;
6960 1 : char *arg3 = (char *) 0 ;
6961 1 : double arg4 ;
6962 1 : void *argp1 = 0 ;
6963 1 : int res1 = 0 ;
6964 1 : int res2 ;
6965 1 : char *buf2 = 0 ;
6966 1 : int alloc2 = 0 ;
6967 1 : int res3 ;
6968 1 : char *buf3 = 0 ;
6969 1 : int alloc3 = 0 ;
6970 1 : double val4 ;
6971 1 : int ecode4 = 0 ;
6972 1 : PyObject *swig_obj[4] ;
6973 1 : OGRErr result;
6974 :
6975 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetTargetLinearUnits", 4, 4, swig_obj)) SWIG_fail;
6976 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6977 1 : if (!SWIG_IsOK(res1)) {
6978 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6979 : }
6980 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6981 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6982 1 : if (!SWIG_IsOK(res2)) {
6983 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "2"" of type '" "char const *""'");
6984 : }
6985 1 : arg2 = reinterpret_cast< char * >(buf2);
6986 1 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6987 1 : if (!SWIG_IsOK(res3)) {
6988 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "3"" of type '" "char const *""'");
6989 : }
6990 1 : arg3 = reinterpret_cast< char * >(buf3);
6991 1 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
6992 1 : if (!SWIG_IsOK(ecode4)) {
6993 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "4"" of type '" "double""'");
6994 : }
6995 1 : arg4 = static_cast< double >(val4);
6996 1 : {
6997 1 : if (!arg3) {
6998 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6999 : }
7000 : }
7001 1 : {
7002 1 : const int bLocalUseExceptions = GetUseExceptions();
7003 1 : if ( bLocalUseExceptions ) {
7004 1 : pushErrorHandler();
7005 : }
7006 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetTargetLinearUnits(arg1,(char const *)arg2,(char const *)arg3,arg4);
7007 1 : if ( bLocalUseExceptions ) {
7008 1 : popErrorHandler();
7009 : }
7010 : #ifndef SED_HACKS
7011 : if ( bLocalUseExceptions ) {
7012 : CPLErr eclass = CPLGetLastErrorType();
7013 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7014 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7015 : }
7016 : }
7017 : #endif
7018 : }
7019 1 : {
7020 : /* %typemap(out) OGRErr */
7021 1 : if ( result != 0 && GetUseExceptions()) {
7022 0 : const char* pszMessage = CPLGetLastErrorMsg();
7023 0 : if( pszMessage[0] != '\0' )
7024 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7025 : else
7026 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7027 0 : SWIG_fail;
7028 : }
7029 : }
7030 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7031 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7032 1 : {
7033 : /* %typemap(ret) OGRErr */
7034 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7035 1 : resultobj = PyLong_FromLong( result );
7036 : }
7037 : }
7038 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; } }
7039 : return resultobj;
7040 0 : fail:
7041 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7042 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7043 : return NULL;
7044 : }
7045 :
7046 :
7047 6 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7048 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7049 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7050 6 : char *arg2 = (char *) 0 ;
7051 6 : double arg3 ;
7052 6 : void *argp1 = 0 ;
7053 6 : int res1 = 0 ;
7054 6 : int res2 ;
7055 6 : char *buf2 = 0 ;
7056 6 : int alloc2 = 0 ;
7057 6 : double val3 ;
7058 6 : int ecode3 = 0 ;
7059 6 : PyObject *swig_obj[3] ;
7060 6 : OGRErr result;
7061 :
7062 6 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetLinearUnits", 3, 3, swig_obj)) SWIG_fail;
7063 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7064 6 : if (!SWIG_IsOK(res1)) {
7065 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7066 : }
7067 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7068 6 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7069 6 : if (!SWIG_IsOK(res2)) {
7070 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLinearUnits" "', argument " "2"" of type '" "char const *""'");
7071 : }
7072 6 : arg2 = reinterpret_cast< char * >(buf2);
7073 6 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
7074 6 : if (!SWIG_IsOK(ecode3)) {
7075 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLinearUnits" "', argument " "3"" of type '" "double""'");
7076 : }
7077 6 : arg3 = static_cast< double >(val3);
7078 6 : {
7079 6 : if (!arg2) {
7080 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
7081 : }
7082 : }
7083 6 : {
7084 6 : const int bLocalUseExceptions = GetUseExceptions();
7085 6 : if ( bLocalUseExceptions ) {
7086 6 : pushErrorHandler();
7087 : }
7088 6 : result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnits(arg1,(char const *)arg2,arg3);
7089 6 : if ( bLocalUseExceptions ) {
7090 6 : popErrorHandler();
7091 : }
7092 : #ifndef SED_HACKS
7093 : if ( bLocalUseExceptions ) {
7094 : CPLErr eclass = CPLGetLastErrorType();
7095 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7096 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7097 : }
7098 : }
7099 : #endif
7100 : }
7101 6 : {
7102 : /* %typemap(out) OGRErr */
7103 6 : if ( result != 0 && GetUseExceptions()) {
7104 0 : const char* pszMessage = CPLGetLastErrorMsg();
7105 0 : if( pszMessage[0] != '\0' )
7106 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7107 : else
7108 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7109 0 : SWIG_fail;
7110 : }
7111 : }
7112 6 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7113 6 : {
7114 : /* %typemap(ret) OGRErr */
7115 6 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7116 6 : resultobj = PyLong_FromLong( result );
7117 : }
7118 : }
7119 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; } }
7120 : return resultobj;
7121 0 : fail:
7122 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7123 : return NULL;
7124 : }
7125 :
7126 :
7127 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLinearUnitsAndUpdateParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7128 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7129 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7130 1 : char *arg2 = (char *) 0 ;
7131 1 : double arg3 ;
7132 1 : void *argp1 = 0 ;
7133 1 : int res1 = 0 ;
7134 1 : int res2 ;
7135 1 : char *buf2 = 0 ;
7136 1 : int alloc2 = 0 ;
7137 1 : double val3 ;
7138 1 : int ecode3 = 0 ;
7139 1 : PyObject *swig_obj[3] ;
7140 1 : OGRErr result;
7141 :
7142 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetLinearUnitsAndUpdateParameters", 3, 3, swig_obj)) SWIG_fail;
7143 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7144 1 : if (!SWIG_IsOK(res1)) {
7145 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7146 : }
7147 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7148 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7149 1 : if (!SWIG_IsOK(res2)) {
7150 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "2"" of type '" "char const *""'");
7151 : }
7152 1 : arg2 = reinterpret_cast< char * >(buf2);
7153 1 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
7154 1 : if (!SWIG_IsOK(ecode3)) {
7155 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "3"" of type '" "double""'");
7156 : }
7157 1 : arg3 = static_cast< double >(val3);
7158 1 : {
7159 1 : if (!arg2) {
7160 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
7161 : }
7162 : }
7163 1 : {
7164 1 : const int bLocalUseExceptions = GetUseExceptions();
7165 1 : if ( bLocalUseExceptions ) {
7166 1 : pushErrorHandler();
7167 : }
7168 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(arg1,(char const *)arg2,arg3);
7169 1 : if ( bLocalUseExceptions ) {
7170 1 : popErrorHandler();
7171 : }
7172 : #ifndef SED_HACKS
7173 : if ( bLocalUseExceptions ) {
7174 : CPLErr eclass = CPLGetLastErrorType();
7175 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7176 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7177 : }
7178 : }
7179 : #endif
7180 : }
7181 1 : {
7182 : /* %typemap(out) OGRErr */
7183 1 : if ( result != 0 && GetUseExceptions()) {
7184 0 : const char* pszMessage = CPLGetLastErrorMsg();
7185 0 : if( pszMessage[0] != '\0' )
7186 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7187 : else
7188 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7189 0 : SWIG_fail;
7190 : }
7191 : }
7192 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7193 1 : {
7194 : /* %typemap(ret) OGRErr */
7195 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7196 1 : resultobj = PyLong_FromLong( result );
7197 : }
7198 : }
7199 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; } }
7200 : return resultobj;
7201 0 : fail:
7202 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7203 : return NULL;
7204 : }
7205 :
7206 :
7207 4 : SWIGINTERN PyObject *_wrap_SpatialReference_GetTargetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7208 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7209 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7210 4 : char *arg2 = (char *) 0 ;
7211 4 : void *argp1 = 0 ;
7212 4 : int res1 = 0 ;
7213 4 : int res2 ;
7214 4 : char *buf2 = 0 ;
7215 4 : int alloc2 = 0 ;
7216 4 : PyObject *swig_obj[2] ;
7217 4 : double result;
7218 :
7219 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetTargetLinearUnits", 2, 2, swig_obj)) SWIG_fail;
7220 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7221 4 : if (!SWIG_IsOK(res1)) {
7222 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetTargetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7223 : }
7224 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7225 4 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7226 4 : if (!SWIG_IsOK(res2)) {
7227 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetTargetLinearUnits" "', argument " "2"" of type '" "char const *""'");
7228 : }
7229 4 : arg2 = reinterpret_cast< char * >(buf2);
7230 4 : {
7231 4 : const int bLocalUseExceptions = GetUseExceptions();
7232 4 : if ( bLocalUseExceptions ) {
7233 4 : pushErrorHandler();
7234 : }
7235 4 : result = (double)OSRSpatialReferenceShadow_GetTargetLinearUnits(arg1,(char const *)arg2);
7236 4 : if ( bLocalUseExceptions ) {
7237 4 : popErrorHandler();
7238 : }
7239 : #ifndef SED_HACKS
7240 : if ( bLocalUseExceptions ) {
7241 : CPLErr eclass = CPLGetLastErrorType();
7242 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7243 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7244 : }
7245 : }
7246 : #endif
7247 : }
7248 4 : resultobj = SWIG_From_double(static_cast< double >(result));
7249 4 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7250 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; } }
7251 : return resultobj;
7252 0 : fail:
7253 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7254 : return NULL;
7255 : }
7256 :
7257 :
7258 230 : SWIGINTERN PyObject *_wrap_SpatialReference_GetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7259 230 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7260 230 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7261 230 : void *argp1 = 0 ;
7262 230 : int res1 = 0 ;
7263 230 : PyObject *swig_obj[1] ;
7264 230 : double result;
7265 :
7266 230 : if (!args) SWIG_fail;
7267 230 : swig_obj[0] = args;
7268 230 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7269 230 : if (!SWIG_IsOK(res1)) {
7270 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7271 : }
7272 230 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7273 230 : {
7274 230 : const int bLocalUseExceptions = GetUseExceptions();
7275 230 : if ( bLocalUseExceptions ) {
7276 228 : pushErrorHandler();
7277 : }
7278 230 : result = (double)OSRSpatialReferenceShadow_GetLinearUnits(arg1);
7279 230 : if ( bLocalUseExceptions ) {
7280 228 : popErrorHandler();
7281 : }
7282 : #ifndef SED_HACKS
7283 : if ( bLocalUseExceptions ) {
7284 : CPLErr eclass = CPLGetLastErrorType();
7285 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7286 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7287 : }
7288 : }
7289 : #endif
7290 : }
7291 230 : resultobj = SWIG_From_double(static_cast< double >(result));
7292 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; } }
7293 : return resultobj;
7294 : fail:
7295 : return NULL;
7296 : }
7297 :
7298 :
7299 24 : SWIGINTERN PyObject *_wrap_SpatialReference_GetLinearUnitsName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7300 24 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7301 24 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7302 24 : void *argp1 = 0 ;
7303 24 : int res1 = 0 ;
7304 24 : PyObject *swig_obj[1] ;
7305 24 : char *result = 0 ;
7306 :
7307 24 : if (!args) SWIG_fail;
7308 24 : swig_obj[0] = args;
7309 24 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7310 24 : if (!SWIG_IsOK(res1)) {
7311 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetLinearUnitsName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7312 : }
7313 24 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7314 24 : {
7315 24 : const int bLocalUseExceptions = GetUseExceptions();
7316 24 : if ( bLocalUseExceptions ) {
7317 24 : pushErrorHandler();
7318 : }
7319 24 : result = (char *)OSRSpatialReferenceShadow_GetLinearUnitsName(arg1);
7320 24 : if ( bLocalUseExceptions ) {
7321 24 : popErrorHandler();
7322 : }
7323 : #ifndef SED_HACKS
7324 : if ( bLocalUseExceptions ) {
7325 : CPLErr eclass = CPLGetLastErrorType();
7326 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7327 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7328 : }
7329 : }
7330 : #endif
7331 : }
7332 24 : resultobj = SWIG_FromCharPtr((const char *)result);
7333 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; } }
7334 : return resultobj;
7335 : fail:
7336 : return NULL;
7337 : }
7338 :
7339 :
7340 767 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAuthorityCode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7341 767 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7342 767 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7343 767 : char *arg2 = (char *) NULL ;
7344 767 : void *argp1 = 0 ;
7345 767 : int res1 = 0 ;
7346 767 : int res2 ;
7347 767 : char *buf2 = 0 ;
7348 767 : int alloc2 = 0 ;
7349 767 : PyObject *swig_obj[2] ;
7350 767 : char *result = 0 ;
7351 :
7352 767 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAuthorityCode", 1, 2, swig_obj)) SWIG_fail;
7353 767 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7354 767 : if (!SWIG_IsOK(res1)) {
7355 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAuthorityCode" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7356 : }
7357 767 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7358 767 : if (swig_obj[1]) {
7359 186 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7360 186 : if (!SWIG_IsOK(res2)) {
7361 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAuthorityCode" "', argument " "2"" of type '" "char const *""'");
7362 : }
7363 186 : arg2 = reinterpret_cast< char * >(buf2);
7364 : }
7365 767 : {
7366 767 : const int bLocalUseExceptions = GetUseExceptions();
7367 767 : if ( bLocalUseExceptions ) {
7368 494 : pushErrorHandler();
7369 : }
7370 767 : result = (char *)OSRSpatialReferenceShadow_GetAuthorityCode(arg1,(char const *)arg2);
7371 767 : if ( bLocalUseExceptions ) {
7372 494 : popErrorHandler();
7373 : }
7374 : #ifndef SED_HACKS
7375 : if ( bLocalUseExceptions ) {
7376 : CPLErr eclass = CPLGetLastErrorType();
7377 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7378 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7379 : }
7380 : }
7381 : #endif
7382 : }
7383 767 : resultobj = SWIG_FromCharPtr((const char *)result);
7384 767 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7385 767 : 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; } }
7386 : return resultobj;
7387 0 : fail:
7388 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7389 : return NULL;
7390 : }
7391 :
7392 :
7393 28 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAuthorityName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7394 28 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7395 28 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7396 28 : char *arg2 = (char *) NULL ;
7397 28 : void *argp1 = 0 ;
7398 28 : int res1 = 0 ;
7399 28 : int res2 ;
7400 28 : char *buf2 = 0 ;
7401 28 : int alloc2 = 0 ;
7402 28 : PyObject *swig_obj[2] ;
7403 28 : char *result = 0 ;
7404 :
7405 28 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAuthorityName", 1, 2, swig_obj)) SWIG_fail;
7406 28 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7407 28 : if (!SWIG_IsOK(res1)) {
7408 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAuthorityName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7409 : }
7410 28 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7411 28 : if (swig_obj[1]) {
7412 16 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7413 16 : if (!SWIG_IsOK(res2)) {
7414 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAuthorityName" "', argument " "2"" of type '" "char const *""'");
7415 : }
7416 16 : arg2 = reinterpret_cast< char * >(buf2);
7417 : }
7418 28 : {
7419 28 : const int bLocalUseExceptions = GetUseExceptions();
7420 28 : if ( bLocalUseExceptions ) {
7421 26 : pushErrorHandler();
7422 : }
7423 28 : result = (char *)OSRSpatialReferenceShadow_GetAuthorityName(arg1,(char const *)arg2);
7424 28 : if ( bLocalUseExceptions ) {
7425 26 : popErrorHandler();
7426 : }
7427 : #ifndef SED_HACKS
7428 : if ( bLocalUseExceptions ) {
7429 : CPLErr eclass = CPLGetLastErrorType();
7430 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7431 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7432 : }
7433 : }
7434 : #endif
7435 : }
7436 28 : resultobj = SWIG_FromCharPtr((const char *)result);
7437 28 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7438 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; } }
7439 : return resultobj;
7440 0 : fail:
7441 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7442 : return NULL;
7443 : }
7444 :
7445 :
7446 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAreaOfUse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7447 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7448 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7449 1 : void *argp1 = 0 ;
7450 1 : int res1 = 0 ;
7451 1 : PyObject *swig_obj[1] ;
7452 1 : OSRAreaOfUse *result = 0 ;
7453 :
7454 1 : if (!args) SWIG_fail;
7455 1 : swig_obj[0] = args;
7456 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7457 1 : if (!SWIG_IsOK(res1)) {
7458 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAreaOfUse" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7459 : }
7460 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7461 1 : {
7462 1 : const int bLocalUseExceptions = GetUseExceptions();
7463 1 : if ( bLocalUseExceptions ) {
7464 1 : pushErrorHandler();
7465 : }
7466 1 : result = (OSRAreaOfUse *)OSRSpatialReferenceShadow_GetAreaOfUse(arg1);
7467 1 : if ( bLocalUseExceptions ) {
7468 1 : popErrorHandler();
7469 : }
7470 : #ifndef SED_HACKS
7471 : if ( bLocalUseExceptions ) {
7472 : CPLErr eclass = CPLGetLastErrorType();
7473 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7474 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7475 : }
7476 : }
7477 : #endif
7478 : }
7479 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRAreaOfUse, SWIG_POINTER_OWN | 0 );
7480 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; } }
7481 : return resultobj;
7482 : fail:
7483 : return NULL;
7484 : }
7485 :
7486 :
7487 6 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxisName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7488 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7489 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7490 6 : char *arg2 = (char *) 0 ;
7491 6 : int arg3 ;
7492 6 : void *argp1 = 0 ;
7493 6 : int res1 = 0 ;
7494 6 : int res2 ;
7495 6 : char *buf2 = 0 ;
7496 6 : int alloc2 = 0 ;
7497 6 : int val3 ;
7498 6 : int ecode3 = 0 ;
7499 6 : PyObject *swig_obj[3] ;
7500 6 : char *result = 0 ;
7501 :
7502 6 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAxisName", 3, 3, swig_obj)) SWIG_fail;
7503 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7504 6 : if (!SWIG_IsOK(res1)) {
7505 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7506 : }
7507 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7508 6 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7509 6 : if (!SWIG_IsOK(res2)) {
7510 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAxisName" "', argument " "2"" of type '" "char const *""'");
7511 : }
7512 6 : arg2 = reinterpret_cast< char * >(buf2);
7513 6 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
7514 6 : if (!SWIG_IsOK(ecode3)) {
7515 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAxisName" "', argument " "3"" of type '" "int""'");
7516 : }
7517 6 : arg3 = static_cast< int >(val3);
7518 6 : {
7519 6 : const int bLocalUseExceptions = GetUseExceptions();
7520 6 : if ( bLocalUseExceptions ) {
7521 6 : pushErrorHandler();
7522 : }
7523 6 : result = (char *)OSRSpatialReferenceShadow_GetAxisName(arg1,(char const *)arg2,arg3);
7524 6 : if ( bLocalUseExceptions ) {
7525 6 : popErrorHandler();
7526 : }
7527 : #ifndef SED_HACKS
7528 : if ( bLocalUseExceptions ) {
7529 : CPLErr eclass = CPLGetLastErrorType();
7530 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7531 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7532 : }
7533 : }
7534 : #endif
7535 : }
7536 6 : resultobj = SWIG_FromCharPtr((const char *)result);
7537 6 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7538 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; } }
7539 : return resultobj;
7540 0 : fail:
7541 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7542 : return NULL;
7543 : }
7544 :
7545 :
7546 6 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxesCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7547 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7548 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7549 6 : void *argp1 = 0 ;
7550 6 : int res1 = 0 ;
7551 6 : PyObject *swig_obj[1] ;
7552 6 : int result;
7553 :
7554 6 : if (!args) SWIG_fail;
7555 6 : swig_obj[0] = args;
7556 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7557 6 : if (!SWIG_IsOK(res1)) {
7558 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxesCount" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7559 : }
7560 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7561 6 : {
7562 6 : const int bLocalUseExceptions = GetUseExceptions();
7563 6 : if ( bLocalUseExceptions ) {
7564 5 : pushErrorHandler();
7565 : }
7566 6 : result = (int)OSRSpatialReferenceShadow_GetAxesCount(arg1);
7567 6 : if ( bLocalUseExceptions ) {
7568 5 : popErrorHandler();
7569 : }
7570 : #ifndef SED_HACKS
7571 : if ( bLocalUseExceptions ) {
7572 : CPLErr eclass = CPLGetLastErrorType();
7573 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7574 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7575 : }
7576 : }
7577 : #endif
7578 : }
7579 6 : resultobj = SWIG_From_int(static_cast< int >(result));
7580 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; } }
7581 : return resultobj;
7582 : fail:
7583 : return NULL;
7584 : }
7585 :
7586 :
7587 5 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxisOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7588 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7589 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7590 5 : char *arg2 = (char *) 0 ;
7591 5 : int arg3 ;
7592 5 : void *argp1 = 0 ;
7593 5 : int res1 = 0 ;
7594 5 : int res2 ;
7595 5 : char *buf2 = 0 ;
7596 5 : int alloc2 = 0 ;
7597 5 : int val3 ;
7598 5 : int ecode3 = 0 ;
7599 5 : PyObject *swig_obj[3] ;
7600 5 : OGRAxisOrientation result;
7601 :
7602 5 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAxisOrientation", 3, 3, swig_obj)) SWIG_fail;
7603 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7604 5 : if (!SWIG_IsOK(res1)) {
7605 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7606 : }
7607 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7608 5 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7609 5 : if (!SWIG_IsOK(res2)) {
7610 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "2"" of type '" "char const *""'");
7611 : }
7612 5 : arg2 = reinterpret_cast< char * >(buf2);
7613 5 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
7614 5 : if (!SWIG_IsOK(ecode3)) {
7615 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "3"" of type '" "int""'");
7616 : }
7617 5 : arg3 = static_cast< int >(val3);
7618 5 : {
7619 5 : const int bLocalUseExceptions = GetUseExceptions();
7620 5 : if ( bLocalUseExceptions ) {
7621 5 : pushErrorHandler();
7622 : }
7623 5 : result = (OGRAxisOrientation)OSRSpatialReferenceShadow_GetAxisOrientation(arg1,(char const *)arg2,arg3);
7624 5 : if ( bLocalUseExceptions ) {
7625 5 : popErrorHandler();
7626 : }
7627 : #ifndef SED_HACKS
7628 : if ( bLocalUseExceptions ) {
7629 : CPLErr eclass = CPLGetLastErrorType();
7630 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7631 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7632 : }
7633 : }
7634 : #endif
7635 : }
7636 5 : resultobj = SWIG_From_int(static_cast< int >(result));
7637 5 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7638 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; } }
7639 : return resultobj;
7640 0 : fail:
7641 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7642 : return NULL;
7643 : }
7644 :
7645 :
7646 37 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxisMappingStrategy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7647 37 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7648 37 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7649 37 : void *argp1 = 0 ;
7650 37 : int res1 = 0 ;
7651 37 : PyObject *swig_obj[1] ;
7652 37 : OSRAxisMappingStrategy result;
7653 :
7654 37 : if (!args) SWIG_fail;
7655 37 : swig_obj[0] = args;
7656 37 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7657 37 : if (!SWIG_IsOK(res1)) {
7658 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisMappingStrategy" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7659 : }
7660 37 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7661 37 : {
7662 37 : const int bLocalUseExceptions = GetUseExceptions();
7663 37 : if ( bLocalUseExceptions ) {
7664 36 : pushErrorHandler();
7665 : }
7666 37 : result = (OSRAxisMappingStrategy)OSRSpatialReferenceShadow_GetAxisMappingStrategy(arg1);
7667 37 : if ( bLocalUseExceptions ) {
7668 36 : popErrorHandler();
7669 : }
7670 : #ifndef SED_HACKS
7671 : if ( bLocalUseExceptions ) {
7672 : CPLErr eclass = CPLGetLastErrorType();
7673 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7674 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7675 : }
7676 : }
7677 : #endif
7678 : }
7679 37 : resultobj = SWIG_From_int(static_cast< int >(result));
7680 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; } }
7681 : return resultobj;
7682 : fail:
7683 : return NULL;
7684 : }
7685 :
7686 :
7687 552 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAxisMappingStrategy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7688 552 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7689 552 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7690 552 : OSRAxisMappingStrategy arg2 ;
7691 552 : void *argp1 = 0 ;
7692 552 : int res1 = 0 ;
7693 552 : int val2 ;
7694 552 : int ecode2 = 0 ;
7695 552 : PyObject *swig_obj[2] ;
7696 :
7697 552 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAxisMappingStrategy", 2, 2, swig_obj)) SWIG_fail;
7698 552 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7699 552 : if (!SWIG_IsOK(res1)) {
7700 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAxisMappingStrategy" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7701 : }
7702 552 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7703 552 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
7704 552 : if (!SWIG_IsOK(ecode2)) {
7705 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetAxisMappingStrategy" "', argument " "2"" of type '" "OSRAxisMappingStrategy""'");
7706 : }
7707 552 : arg2 = static_cast< OSRAxisMappingStrategy >(val2);
7708 552 : {
7709 552 : const int bLocalUseExceptions = GetUseExceptions();
7710 552 : if ( bLocalUseExceptions ) {
7711 456 : pushErrorHandler();
7712 : }
7713 552 : OSRSpatialReferenceShadow_SetAxisMappingStrategy(arg1,arg2);
7714 552 : if ( bLocalUseExceptions ) {
7715 456 : popErrorHandler();
7716 : }
7717 : #ifndef SED_HACKS
7718 : if ( bLocalUseExceptions ) {
7719 : CPLErr eclass = CPLGetLastErrorType();
7720 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7721 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7722 : }
7723 : }
7724 : #endif
7725 : }
7726 552 : resultobj = SWIG_Py_Void();
7727 552 : 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; } }
7728 : return resultobj;
7729 : fail:
7730 : return NULL;
7731 : }
7732 :
7733 :
7734 103 : SWIGINTERN PyObject *_wrap_SpatialReference_GetDataAxisToSRSAxisMapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7735 103 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7736 103 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7737 103 : int *arg2 = (int *) 0 ;
7738 103 : int **arg3 = (int **) 0 ;
7739 103 : void *argp1 = 0 ;
7740 103 : int res1 = 0 ;
7741 103 : int nLen2 = 0 ;
7742 103 : int *pList2 = NULL ;
7743 103 : PyObject *swig_obj[1] ;
7744 :
7745 103 : {
7746 : /* %typemap(in,numinputs=0) (int *nLen2, const int **pList2) (int nLen2, int *pList2) */
7747 103 : arg2 = &nLen2;
7748 103 : arg3 = &pList2;
7749 : }
7750 103 : if (!args) SWIG_fail;
7751 103 : swig_obj[0] = args;
7752 103 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7753 103 : if (!SWIG_IsOK(res1)) {
7754 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetDataAxisToSRSAxisMapping" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7755 : }
7756 103 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7757 103 : {
7758 103 : const int bLocalUseExceptions = GetUseExceptions();
7759 103 : if ( bLocalUseExceptions ) {
7760 65 : pushErrorHandler();
7761 : }
7762 103 : OSRSpatialReferenceShadow_GetDataAxisToSRSAxisMapping(arg1,arg2,(int const **)arg3);
7763 103 : if ( bLocalUseExceptions ) {
7764 65 : popErrorHandler();
7765 : }
7766 : #ifndef SED_HACKS
7767 : if ( bLocalUseExceptions ) {
7768 : CPLErr eclass = CPLGetLastErrorType();
7769 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7770 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7771 : }
7772 : }
7773 : #endif
7774 : }
7775 103 : resultobj = SWIG_Py_Void();
7776 103 : {
7777 : /* %typemap(argout) (int *nLen, const int **pList ) */
7778 103 : Py_DECREF(resultobj);
7779 103 : PyObject *out = PyList_New( *arg2 );
7780 103 : if( !out ) {
7781 0 : SWIG_fail;
7782 : }
7783 311 : for( int i=0; i<*arg2; i++ ) {
7784 208 : PyObject *val = PyLong_FromLong( (*arg3)[i] );
7785 208 : PyList_SetItem( out, i, val );
7786 : }
7787 103 : resultobj = out;
7788 : }
7789 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; } }
7790 : return resultobj;
7791 : fail:
7792 : return NULL;
7793 : }
7794 :
7795 :
7796 15 : SWIGINTERN PyObject *_wrap_SpatialReference_SetDataAxisToSRSAxisMapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7797 15 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7798 15 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7799 15 : int arg2 ;
7800 15 : int *arg3 = (int *) 0 ;
7801 15 : void *argp1 = 0 ;
7802 15 : int res1 = 0 ;
7803 15 : PyObject *swig_obj[2] ;
7804 15 : OGRErr result;
7805 :
7806 15 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetDataAxisToSRSAxisMapping", 2, 2, swig_obj)) SWIG_fail;
7807 15 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7808 15 : if (!SWIG_IsOK(res1)) {
7809 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetDataAxisToSRSAxisMapping" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7810 : }
7811 15 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7812 15 : {
7813 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
7814 15 : arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
7815 15 : if( arg2 < 0 ) {
7816 0 : SWIG_fail;
7817 : }
7818 : }
7819 15 : {
7820 15 : const int bLocalUseExceptions = GetUseExceptions();
7821 15 : if ( bLocalUseExceptions ) {
7822 10 : pushErrorHandler();
7823 : }
7824 15 : result = (OGRErr)OSRSpatialReferenceShadow_SetDataAxisToSRSAxisMapping(arg1,arg2,arg3);
7825 15 : if ( bLocalUseExceptions ) {
7826 10 : popErrorHandler();
7827 : }
7828 : #ifndef SED_HACKS
7829 : if ( bLocalUseExceptions ) {
7830 : CPLErr eclass = CPLGetLastErrorType();
7831 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7832 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7833 : }
7834 : }
7835 : #endif
7836 : }
7837 15 : {
7838 : /* %typemap(out) OGRErr */
7839 15 : if ( result != 0 && GetUseExceptions()) {
7840 0 : const char* pszMessage = CPLGetLastErrorMsg();
7841 0 : if( pszMessage[0] != '\0' )
7842 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7843 : else
7844 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7845 0 : SWIG_fail;
7846 : }
7847 : }
7848 15 : {
7849 : /* %typemap(freearg) (int nList, int* pList) */
7850 15 : free(arg3);
7851 : }
7852 15 : {
7853 : /* %typemap(ret) OGRErr */
7854 15 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7855 15 : resultobj = PyLong_FromLong( result );
7856 : }
7857 : }
7858 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; } }
7859 : return resultobj;
7860 0 : fail:
7861 0 : {
7862 : /* %typemap(freearg) (int nList, int* pList) */
7863 0 : free(arg3);
7864 : }
7865 0 : return NULL;
7866 : }
7867 :
7868 :
7869 15 : SWIGINTERN PyObject *_wrap_SpatialReference_SetUTM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7870 15 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7871 15 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7872 15 : int arg2 ;
7873 15 : int arg3 = (int) 1 ;
7874 15 : void *argp1 = 0 ;
7875 15 : int res1 = 0 ;
7876 15 : int val2 ;
7877 15 : int ecode2 = 0 ;
7878 15 : int val3 ;
7879 15 : int ecode3 = 0 ;
7880 15 : PyObject *swig_obj[3] ;
7881 15 : OGRErr result;
7882 :
7883 15 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetUTM", 2, 3, swig_obj)) SWIG_fail;
7884 15 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7885 15 : if (!SWIG_IsOK(res1)) {
7886 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetUTM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7887 : }
7888 15 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7889 15 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
7890 15 : if (!SWIG_IsOK(ecode2)) {
7891 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetUTM" "', argument " "2"" of type '" "int""'");
7892 : }
7893 15 : arg2 = static_cast< int >(val2);
7894 15 : if (swig_obj[2]) {
7895 3 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
7896 3 : if (!SWIG_IsOK(ecode3)) {
7897 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetUTM" "', argument " "3"" of type '" "int""'");
7898 : }
7899 : arg3 = static_cast< int >(val3);
7900 : }
7901 15 : {
7902 15 : const int bLocalUseExceptions = GetUseExceptions();
7903 15 : if ( bLocalUseExceptions ) {
7904 14 : pushErrorHandler();
7905 : }
7906 15 : result = (OGRErr)OSRSpatialReferenceShadow_SetUTM(arg1,arg2,arg3);
7907 15 : if ( bLocalUseExceptions ) {
7908 14 : popErrorHandler();
7909 : }
7910 : #ifndef SED_HACKS
7911 : if ( bLocalUseExceptions ) {
7912 : CPLErr eclass = CPLGetLastErrorType();
7913 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7914 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7915 : }
7916 : }
7917 : #endif
7918 : }
7919 15 : {
7920 : /* %typemap(out) OGRErr */
7921 15 : if ( result != 0 && GetUseExceptions()) {
7922 0 : const char* pszMessage = CPLGetLastErrorMsg();
7923 0 : if( pszMessage[0] != '\0' )
7924 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7925 : else
7926 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7927 0 : SWIG_fail;
7928 : }
7929 : }
7930 15 : {
7931 : /* %typemap(ret) OGRErr */
7932 15 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7933 15 : resultobj = PyLong_FromLong( result );
7934 : }
7935 : }
7936 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; } }
7937 : return resultobj;
7938 : fail:
7939 : return NULL;
7940 : }
7941 :
7942 :
7943 6 : SWIGINTERN PyObject *_wrap_SpatialReference_GetUTMZone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7944 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7945 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7946 6 : void *argp1 = 0 ;
7947 6 : int res1 = 0 ;
7948 6 : PyObject *swig_obj[1] ;
7949 6 : int result;
7950 :
7951 6 : if (!args) SWIG_fail;
7952 6 : swig_obj[0] = args;
7953 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7954 6 : if (!SWIG_IsOK(res1)) {
7955 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetUTMZone" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7956 : }
7957 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7958 6 : {
7959 6 : const int bLocalUseExceptions = GetUseExceptions();
7960 6 : if ( bLocalUseExceptions ) {
7961 6 : pushErrorHandler();
7962 : }
7963 6 : result = (int)OSRSpatialReferenceShadow_GetUTMZone(arg1);
7964 6 : if ( bLocalUseExceptions ) {
7965 6 : popErrorHandler();
7966 : }
7967 : #ifndef SED_HACKS
7968 : if ( bLocalUseExceptions ) {
7969 : CPLErr eclass = CPLGetLastErrorType();
7970 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7971 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7972 : }
7973 : }
7974 : #endif
7975 : }
7976 6 : resultobj = SWIG_From_int(static_cast< int >(result));
7977 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; } }
7978 : return resultobj;
7979 : fail:
7980 : return NULL;
7981 : }
7982 :
7983 :
7984 2 : SWIGINTERN PyObject *_wrap_SpatialReference_SetStatePlane(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7985 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7986 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7987 2 : int arg2 ;
7988 2 : int arg3 = (int) 1 ;
7989 2 : char *arg4 = (char *) "" ;
7990 2 : double arg5 = (double) 0.0 ;
7991 2 : void *argp1 = 0 ;
7992 2 : int res1 = 0 ;
7993 2 : int val2 ;
7994 2 : int ecode2 = 0 ;
7995 2 : int val3 ;
7996 2 : int ecode3 = 0 ;
7997 2 : int res4 ;
7998 2 : char *buf4 = 0 ;
7999 2 : int alloc4 = 0 ;
8000 2 : double val5 ;
8001 2 : int ecode5 = 0 ;
8002 2 : PyObject *swig_obj[5] ;
8003 2 : OGRErr result;
8004 :
8005 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetStatePlane", 2, 5, swig_obj)) SWIG_fail;
8006 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8007 2 : if (!SWIG_IsOK(res1)) {
8008 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetStatePlane" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8009 : }
8010 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8011 2 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
8012 2 : if (!SWIG_IsOK(ecode2)) {
8013 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetStatePlane" "', argument " "2"" of type '" "int""'");
8014 : }
8015 2 : arg2 = static_cast< int >(val2);
8016 2 : if (swig_obj[2]) {
8017 2 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
8018 2 : if (!SWIG_IsOK(ecode3)) {
8019 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetStatePlane" "', argument " "3"" of type '" "int""'");
8020 : }
8021 : arg3 = static_cast< int >(val3);
8022 : }
8023 2 : if (swig_obj[3]) {
8024 1 : res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
8025 1 : if (!SWIG_IsOK(res4)) {
8026 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetStatePlane" "', argument " "4"" of type '" "char const *""'");
8027 : }
8028 1 : arg4 = reinterpret_cast< char * >(buf4);
8029 : }
8030 2 : if (swig_obj[4]) {
8031 1 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
8032 1 : if (!SWIG_IsOK(ecode5)) {
8033 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetStatePlane" "', argument " "5"" of type '" "double""'");
8034 : }
8035 1 : arg5 = static_cast< double >(val5);
8036 : }
8037 2 : {
8038 2 : const int bLocalUseExceptions = GetUseExceptions();
8039 2 : if ( bLocalUseExceptions ) {
8040 2 : pushErrorHandler();
8041 : }
8042 2 : result = (OGRErr)OSRSpatialReferenceShadow_SetStatePlane(arg1,arg2,arg3,(char const *)arg4,arg5);
8043 2 : if ( bLocalUseExceptions ) {
8044 2 : popErrorHandler();
8045 : }
8046 : #ifndef SED_HACKS
8047 : if ( bLocalUseExceptions ) {
8048 : CPLErr eclass = CPLGetLastErrorType();
8049 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8050 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8051 : }
8052 : }
8053 : #endif
8054 : }
8055 2 : {
8056 : /* %typemap(out) OGRErr */
8057 2 : if ( result != 0 && GetUseExceptions()) {
8058 0 : const char* pszMessage = CPLGetLastErrorMsg();
8059 0 : if( pszMessage[0] != '\0' )
8060 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8061 : else
8062 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8063 0 : SWIG_fail;
8064 : }
8065 : }
8066 2 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
8067 2 : {
8068 : /* %typemap(ret) OGRErr */
8069 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8070 2 : resultobj = PyLong_FromLong( result );
8071 : }
8072 : }
8073 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; } }
8074 : return resultobj;
8075 0 : fail:
8076 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
8077 : return NULL;
8078 : }
8079 :
8080 :
8081 5 : SWIGINTERN PyObject *_wrap_SpatialReference_AutoIdentifyEPSG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8082 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8083 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8084 5 : void *argp1 = 0 ;
8085 5 : int res1 = 0 ;
8086 5 : PyObject *swig_obj[1] ;
8087 5 : OGRErr result;
8088 :
8089 5 : if (!args) SWIG_fail;
8090 5 : swig_obj[0] = args;
8091 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8092 5 : if (!SWIG_IsOK(res1)) {
8093 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_AutoIdentifyEPSG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8094 : }
8095 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8096 5 : {
8097 5 : const int bLocalUseExceptions = GetUseExceptions();
8098 5 : if ( bLocalUseExceptions ) {
8099 5 : pushErrorHandler();
8100 : }
8101 5 : result = (OGRErr)OSRSpatialReferenceShadow_AutoIdentifyEPSG(arg1);
8102 5 : if ( bLocalUseExceptions ) {
8103 5 : popErrorHandler();
8104 : }
8105 : #ifndef SED_HACKS
8106 : if ( bLocalUseExceptions ) {
8107 : CPLErr eclass = CPLGetLastErrorType();
8108 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8109 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8110 : }
8111 : }
8112 : #endif
8113 : }
8114 5 : {
8115 : /* %typemap(out) OGRErr */
8116 6 : if ( result != 0 && GetUseExceptions()) {
8117 1 : const char* pszMessage = CPLGetLastErrorMsg();
8118 1 : if( pszMessage[0] != '\0' )
8119 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8120 : else
8121 1 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8122 1 : SWIG_fail;
8123 : }
8124 : }
8125 4 : {
8126 : /* %typemap(ret) OGRErr */
8127 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8128 4 : resultobj = PyLong_FromLong( result );
8129 : }
8130 : }
8131 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; } }
8132 : return resultobj;
8133 : fail:
8134 : return NULL;
8135 : }
8136 :
8137 :
8138 5 : SWIGINTERN PyObject *_wrap_SpatialReference_FindMatches(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8139 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8140 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8141 5 : char **arg2 = (char **) NULL ;
8142 5 : OSRSpatialReferenceShadow ***arg3 = (OSRSpatialReferenceShadow ***) NULL ;
8143 5 : int *arg4 = (int *) NULL ;
8144 5 : int **arg5 = (int **) NULL ;
8145 5 : void *argp1 = 0 ;
8146 5 : int res1 = 0 ;
8147 5 : OGRSpatialReferenceH *pahSRS3 = NULL ;
8148 5 : int nvalues3 = 0 ;
8149 5 : int *confidence_values3 = NULL ;
8150 5 : PyObject *swig_obj[2] ;
8151 :
8152 5 : {
8153 : /* %typemap(in) (OSRSpatialReferenceShadow***, int* nvalues3, int** confidence_values3) */
8154 5 : arg3 = &pahSRS3;
8155 5 : arg4 = &nvalues3;
8156 5 : arg5 = &confidence_values3;
8157 : }
8158 5 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_FindMatches", 1, 2, swig_obj)) SWIG_fail;
8159 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8160 5 : if (!SWIG_IsOK(res1)) {
8161 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_FindMatches" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8162 : }
8163 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8164 5 : if (swig_obj[1]) {
8165 0 : {
8166 : /* %typemap(in) char **dict */
8167 0 : arg2 = NULL;
8168 0 : if ( PySequence_Check( swig_obj[1] ) ) {
8169 0 : int bErr = FALSE;
8170 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
8171 0 : if ( bErr )
8172 : {
8173 0 : SWIG_fail;
8174 : }
8175 : }
8176 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
8177 0 : int bErr = FALSE;
8178 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
8179 0 : if ( bErr )
8180 : {
8181 0 : SWIG_fail;
8182 : }
8183 : }
8184 : else {
8185 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
8186 0 : SWIG_fail;
8187 : }
8188 : }
8189 : }
8190 5 : {
8191 5 : const int bLocalUseExceptions = GetUseExceptions();
8192 5 : if ( bLocalUseExceptions ) {
8193 5 : pushErrorHandler();
8194 : }
8195 5 : OSRSpatialReferenceShadow_FindMatches(arg1,arg2,arg3,arg4,arg5);
8196 5 : if ( bLocalUseExceptions ) {
8197 5 : popErrorHandler();
8198 : }
8199 : #ifndef SED_HACKS
8200 : if ( bLocalUseExceptions ) {
8201 : CPLErr eclass = CPLGetLastErrorType();
8202 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8203 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8204 : }
8205 : }
8206 : #endif
8207 : }
8208 5 : resultobj = SWIG_Py_Void();
8209 5 : {
8210 : /* %typemap(argout) (OOSRSpatialReferenceShadow***, int* nvalues, int** confidence_values) */
8211 :
8212 5 : Py_DECREF(resultobj);
8213 :
8214 5 : resultobj = PyList_New( *(arg4));
8215 5 : if( !resultobj ) {
8216 0 : SWIG_fail;
8217 : }
8218 14 : for( int i = 0; i < *(arg4); i++ )
8219 : {
8220 9 : PyObject *tuple = PyTuple_New( 2 );
8221 9 : OSRReference((*(arg3))[i]);
8222 9 : PyTuple_SetItem( tuple, 0,
8223 : SWIG_NewPointerObj(SWIG_as_voidptr((*(arg3))[i]), SWIGTYPE_p_OSRSpatialReferenceShadow, 1 ) );
8224 9 : PyTuple_SetItem( tuple, 1, PyLong_FromLong((*(arg5))[i]) );
8225 9 : PyList_SetItem( resultobj, i, tuple );
8226 : }
8227 : }
8228 5 : {
8229 : /* %typemap(freearg) char **dict */
8230 5 : CSLDestroy( arg2 );
8231 : }
8232 5 : {
8233 : /* %typemap(freearg) (OOSRSpatialReferenceShadow***, int* nvalues, int** confidence_values) */
8234 5 : OSRFreeSRSArray( *(arg3) );
8235 5 : CPLFree( *(arg5) );
8236 : }
8237 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; } }
8238 : return resultobj;
8239 0 : fail:
8240 0 : {
8241 : /* %typemap(freearg) char **dict */
8242 0 : CSLDestroy( arg2 );
8243 : }
8244 0 : {
8245 : /* %typemap(freearg) (OOSRSpatialReferenceShadow***, int* nvalues, int** confidence_values) */
8246 0 : OSRFreeSRSArray( *(arg3) );
8247 0 : CPLFree( *(arg5) );
8248 : }
8249 : return NULL;
8250 : }
8251 :
8252 :
8253 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8254 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8255 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8256 0 : char *arg2 = (char *) 0 ;
8257 0 : void *argp1 = 0 ;
8258 0 : int res1 = 0 ;
8259 0 : int res2 ;
8260 0 : char *buf2 = 0 ;
8261 0 : int alloc2 = 0 ;
8262 0 : PyObject *swig_obj[2] ;
8263 0 : OGRErr result;
8264 :
8265 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetProjection", 2, 2, swig_obj)) SWIG_fail;
8266 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8267 0 : if (!SWIG_IsOK(res1)) {
8268 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjection" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8269 : }
8270 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8271 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8272 0 : if (!SWIG_IsOK(res2)) {
8273 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjection" "', argument " "2"" of type '" "char const *""'");
8274 : }
8275 0 : arg2 = reinterpret_cast< char * >(buf2);
8276 0 : {
8277 0 : const int bLocalUseExceptions = GetUseExceptions();
8278 0 : if ( bLocalUseExceptions ) {
8279 0 : pushErrorHandler();
8280 : }
8281 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjection(arg1,(char const *)arg2);
8282 0 : if ( bLocalUseExceptions ) {
8283 0 : popErrorHandler();
8284 : }
8285 : #ifndef SED_HACKS
8286 : if ( bLocalUseExceptions ) {
8287 : CPLErr eclass = CPLGetLastErrorType();
8288 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8289 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8290 : }
8291 : }
8292 : #endif
8293 : }
8294 0 : {
8295 : /* %typemap(out) OGRErr */
8296 0 : if ( result != 0 && GetUseExceptions()) {
8297 0 : const char* pszMessage = CPLGetLastErrorMsg();
8298 0 : if( pszMessage[0] != '\0' )
8299 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8300 : else
8301 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8302 0 : SWIG_fail;
8303 : }
8304 : }
8305 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8306 0 : {
8307 : /* %typemap(ret) OGRErr */
8308 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8309 0 : resultobj = PyLong_FromLong( result );
8310 : }
8311 : }
8312 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; } }
8313 : return resultobj;
8314 0 : fail:
8315 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8316 : return NULL;
8317 : }
8318 :
8319 :
8320 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8321 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8322 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8323 0 : char *arg2 = (char *) 0 ;
8324 0 : double arg3 ;
8325 0 : void *argp1 = 0 ;
8326 0 : int res1 = 0 ;
8327 0 : int res2 ;
8328 0 : char *buf2 = 0 ;
8329 0 : int alloc2 = 0 ;
8330 0 : double val3 ;
8331 0 : int ecode3 = 0 ;
8332 0 : PyObject *swig_obj[3] ;
8333 0 : OGRErr result;
8334 :
8335 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetProjParm", 3, 3, swig_obj)) SWIG_fail;
8336 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8337 0 : if (!SWIG_IsOK(res1)) {
8338 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8339 : }
8340 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8341 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8342 0 : if (!SWIG_IsOK(res2)) {
8343 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjParm" "', argument " "2"" of type '" "char const *""'");
8344 : }
8345 0 : arg2 = reinterpret_cast< char * >(buf2);
8346 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8347 0 : if (!SWIG_IsOK(ecode3)) {
8348 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetProjParm" "', argument " "3"" of type '" "double""'");
8349 : }
8350 0 : arg3 = static_cast< double >(val3);
8351 0 : {
8352 0 : if (!arg2) {
8353 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8354 : }
8355 : }
8356 0 : {
8357 0 : const int bLocalUseExceptions = GetUseExceptions();
8358 0 : if ( bLocalUseExceptions ) {
8359 0 : pushErrorHandler();
8360 : }
8361 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjParm(arg1,(char const *)arg2,arg3);
8362 0 : if ( bLocalUseExceptions ) {
8363 0 : popErrorHandler();
8364 : }
8365 : #ifndef SED_HACKS
8366 : if ( bLocalUseExceptions ) {
8367 : CPLErr eclass = CPLGetLastErrorType();
8368 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8369 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8370 : }
8371 : }
8372 : #endif
8373 : }
8374 0 : {
8375 : /* %typemap(out) OGRErr */
8376 0 : if ( result != 0 && GetUseExceptions()) {
8377 0 : const char* pszMessage = CPLGetLastErrorMsg();
8378 0 : if( pszMessage[0] != '\0' )
8379 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8380 : else
8381 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8382 0 : SWIG_fail;
8383 : }
8384 : }
8385 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8386 0 : {
8387 : /* %typemap(ret) OGRErr */
8388 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8389 0 : resultobj = PyLong_FromLong( result );
8390 : }
8391 : }
8392 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; } }
8393 : return resultobj;
8394 0 : fail:
8395 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8396 : return NULL;
8397 : }
8398 :
8399 :
8400 65 : SWIGINTERN PyObject *_wrap_SpatialReference_GetProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8401 65 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8402 65 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8403 65 : char *arg2 = (char *) 0 ;
8404 65 : double arg3 = (double) 0.0 ;
8405 65 : void *argp1 = 0 ;
8406 65 : int res1 = 0 ;
8407 65 : int res2 ;
8408 65 : char *buf2 = 0 ;
8409 65 : int alloc2 = 0 ;
8410 65 : double val3 ;
8411 65 : int ecode3 = 0 ;
8412 65 : PyObject *swig_obj[3] ;
8413 65 : double result;
8414 :
8415 65 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetProjParm", 2, 3, swig_obj)) SWIG_fail;
8416 65 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8417 65 : if (!SWIG_IsOK(res1)) {
8418 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8419 : }
8420 65 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8421 65 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8422 65 : if (!SWIG_IsOK(res2)) {
8423 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetProjParm" "', argument " "2"" of type '" "char const *""'");
8424 : }
8425 65 : arg2 = reinterpret_cast< char * >(buf2);
8426 65 : if (swig_obj[2]) {
8427 24 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8428 24 : if (!SWIG_IsOK(ecode3)) {
8429 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetProjParm" "', argument " "3"" of type '" "double""'");
8430 : }
8431 24 : arg3 = static_cast< double >(val3);
8432 : }
8433 65 : {
8434 65 : if (!arg2) {
8435 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8436 : }
8437 : }
8438 65 : {
8439 65 : const int bLocalUseExceptions = GetUseExceptions();
8440 65 : if ( bLocalUseExceptions ) {
8441 63 : pushErrorHandler();
8442 : }
8443 65 : result = (double)OSRSpatialReferenceShadow_GetProjParm(arg1,(char const *)arg2,arg3);
8444 65 : if ( bLocalUseExceptions ) {
8445 63 : popErrorHandler();
8446 : }
8447 : #ifndef SED_HACKS
8448 : if ( bLocalUseExceptions ) {
8449 : CPLErr eclass = CPLGetLastErrorType();
8450 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8451 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8452 : }
8453 : }
8454 : #endif
8455 : }
8456 65 : resultobj = SWIG_From_double(static_cast< double >(result));
8457 65 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8458 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; } }
8459 : return resultobj;
8460 0 : fail:
8461 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8462 : return NULL;
8463 : }
8464 :
8465 :
8466 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetNormProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8467 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8468 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8469 0 : char *arg2 = (char *) 0 ;
8470 0 : double arg3 ;
8471 0 : void *argp1 = 0 ;
8472 0 : int res1 = 0 ;
8473 0 : int res2 ;
8474 0 : char *buf2 = 0 ;
8475 0 : int alloc2 = 0 ;
8476 0 : double val3 ;
8477 0 : int ecode3 = 0 ;
8478 0 : PyObject *swig_obj[3] ;
8479 0 : OGRErr result;
8480 :
8481 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetNormProjParm", 3, 3, swig_obj)) SWIG_fail;
8482 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8483 0 : if (!SWIG_IsOK(res1)) {
8484 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetNormProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8485 : }
8486 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8487 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8488 0 : if (!SWIG_IsOK(res2)) {
8489 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetNormProjParm" "', argument " "2"" of type '" "char const *""'");
8490 : }
8491 0 : arg2 = reinterpret_cast< char * >(buf2);
8492 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8493 0 : if (!SWIG_IsOK(ecode3)) {
8494 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetNormProjParm" "', argument " "3"" of type '" "double""'");
8495 : }
8496 0 : arg3 = static_cast< double >(val3);
8497 0 : {
8498 0 : if (!arg2) {
8499 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8500 : }
8501 : }
8502 0 : {
8503 0 : const int bLocalUseExceptions = GetUseExceptions();
8504 0 : if ( bLocalUseExceptions ) {
8505 0 : pushErrorHandler();
8506 : }
8507 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetNormProjParm(arg1,(char const *)arg2,arg3);
8508 0 : if ( bLocalUseExceptions ) {
8509 0 : popErrorHandler();
8510 : }
8511 : #ifndef SED_HACKS
8512 : if ( bLocalUseExceptions ) {
8513 : CPLErr eclass = CPLGetLastErrorType();
8514 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8515 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8516 : }
8517 : }
8518 : #endif
8519 : }
8520 0 : {
8521 : /* %typemap(out) OGRErr */
8522 0 : if ( result != 0 && GetUseExceptions()) {
8523 0 : const char* pszMessage = CPLGetLastErrorMsg();
8524 0 : if( pszMessage[0] != '\0' )
8525 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8526 : else
8527 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8528 0 : SWIG_fail;
8529 : }
8530 : }
8531 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8532 0 : {
8533 : /* %typemap(ret) OGRErr */
8534 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8535 0 : resultobj = PyLong_FromLong( result );
8536 : }
8537 : }
8538 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; } }
8539 : return resultobj;
8540 0 : fail:
8541 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8542 : return NULL;
8543 : }
8544 :
8545 :
8546 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetNormProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8547 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8548 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8549 1 : char *arg2 = (char *) 0 ;
8550 1 : double arg3 = (double) 0.0 ;
8551 1 : void *argp1 = 0 ;
8552 1 : int res1 = 0 ;
8553 1 : int res2 ;
8554 1 : char *buf2 = 0 ;
8555 1 : int alloc2 = 0 ;
8556 1 : double val3 ;
8557 1 : int ecode3 = 0 ;
8558 1 : PyObject *swig_obj[3] ;
8559 1 : double result;
8560 :
8561 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetNormProjParm", 2, 3, swig_obj)) SWIG_fail;
8562 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8563 1 : if (!SWIG_IsOK(res1)) {
8564 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetNormProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8565 : }
8566 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8567 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8568 1 : if (!SWIG_IsOK(res2)) {
8569 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetNormProjParm" "', argument " "2"" of type '" "char const *""'");
8570 : }
8571 1 : arg2 = reinterpret_cast< char * >(buf2);
8572 1 : if (swig_obj[2]) {
8573 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8574 0 : if (!SWIG_IsOK(ecode3)) {
8575 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetNormProjParm" "', argument " "3"" of type '" "double""'");
8576 : }
8577 0 : arg3 = static_cast< double >(val3);
8578 : }
8579 1 : {
8580 1 : if (!arg2) {
8581 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8582 : }
8583 : }
8584 1 : {
8585 1 : const int bLocalUseExceptions = GetUseExceptions();
8586 1 : if ( bLocalUseExceptions ) {
8587 1 : pushErrorHandler();
8588 : }
8589 1 : result = (double)OSRSpatialReferenceShadow_GetNormProjParm(arg1,(char const *)arg2,arg3);
8590 1 : if ( bLocalUseExceptions ) {
8591 1 : popErrorHandler();
8592 : }
8593 : #ifndef SED_HACKS
8594 : if ( bLocalUseExceptions ) {
8595 : CPLErr eclass = CPLGetLastErrorType();
8596 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8597 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8598 : }
8599 : }
8600 : #endif
8601 : }
8602 1 : resultobj = SWIG_From_double(static_cast< double >(result));
8603 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8604 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; } }
8605 : return resultobj;
8606 0 : fail:
8607 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8608 : return NULL;
8609 : }
8610 :
8611 :
8612 10 : SWIGINTERN PyObject *_wrap_SpatialReference_GetSemiMajor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8613 10 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8614 10 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8615 10 : void *argp1 = 0 ;
8616 10 : int res1 = 0 ;
8617 10 : PyObject *swig_obj[1] ;
8618 10 : double result;
8619 :
8620 10 : if (!args) SWIG_fail;
8621 10 : swig_obj[0] = args;
8622 10 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8623 10 : if (!SWIG_IsOK(res1)) {
8624 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMajor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8625 : }
8626 10 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8627 10 : {
8628 10 : const int bLocalUseExceptions = GetUseExceptions();
8629 10 : if ( bLocalUseExceptions ) {
8630 10 : pushErrorHandler();
8631 : }
8632 10 : result = (double)OSRSpatialReferenceShadow_GetSemiMajor(arg1);
8633 10 : if ( bLocalUseExceptions ) {
8634 10 : popErrorHandler();
8635 : }
8636 : #ifndef SED_HACKS
8637 : if ( bLocalUseExceptions ) {
8638 : CPLErr eclass = CPLGetLastErrorType();
8639 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8640 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8641 : }
8642 : }
8643 : #endif
8644 : }
8645 10 : resultobj = SWIG_From_double(static_cast< double >(result));
8646 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; } }
8647 : return resultobj;
8648 : fail:
8649 : return NULL;
8650 : }
8651 :
8652 :
8653 4 : SWIGINTERN PyObject *_wrap_SpatialReference_GetSemiMinor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8654 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8655 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8656 4 : void *argp1 = 0 ;
8657 4 : int res1 = 0 ;
8658 4 : PyObject *swig_obj[1] ;
8659 4 : double result;
8660 :
8661 4 : if (!args) SWIG_fail;
8662 4 : swig_obj[0] = args;
8663 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8664 4 : if (!SWIG_IsOK(res1)) {
8665 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMinor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8666 : }
8667 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8668 4 : {
8669 4 : const int bLocalUseExceptions = GetUseExceptions();
8670 4 : if ( bLocalUseExceptions ) {
8671 4 : pushErrorHandler();
8672 : }
8673 4 : result = (double)OSRSpatialReferenceShadow_GetSemiMinor(arg1);
8674 4 : if ( bLocalUseExceptions ) {
8675 4 : popErrorHandler();
8676 : }
8677 : #ifndef SED_HACKS
8678 : if ( bLocalUseExceptions ) {
8679 : CPLErr eclass = CPLGetLastErrorType();
8680 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8681 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8682 : }
8683 : }
8684 : #endif
8685 : }
8686 4 : resultobj = SWIG_From_double(static_cast< double >(result));
8687 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; } }
8688 : return resultobj;
8689 : fail:
8690 : return NULL;
8691 : }
8692 :
8693 :
8694 10 : SWIGINTERN PyObject *_wrap_SpatialReference_GetInvFlattening(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8695 10 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8696 10 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8697 10 : void *argp1 = 0 ;
8698 10 : int res1 = 0 ;
8699 10 : PyObject *swig_obj[1] ;
8700 10 : double result;
8701 :
8702 10 : if (!args) SWIG_fail;
8703 10 : swig_obj[0] = args;
8704 10 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8705 10 : if (!SWIG_IsOK(res1)) {
8706 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetInvFlattening" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8707 : }
8708 10 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8709 10 : {
8710 10 : const int bLocalUseExceptions = GetUseExceptions();
8711 10 : if ( bLocalUseExceptions ) {
8712 7 : pushErrorHandler();
8713 : }
8714 10 : result = (double)OSRSpatialReferenceShadow_GetInvFlattening(arg1);
8715 10 : if ( bLocalUseExceptions ) {
8716 7 : popErrorHandler();
8717 : }
8718 : #ifndef SED_HACKS
8719 : if ( bLocalUseExceptions ) {
8720 : CPLErr eclass = CPLGetLastErrorType();
8721 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8722 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8723 : }
8724 : }
8725 : #endif
8726 : }
8727 10 : resultobj = SWIG_From_double(static_cast< double >(result));
8728 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; } }
8729 : return resultobj;
8730 : fail:
8731 : return NULL;
8732 : }
8733 :
8734 :
8735 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetACEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8736 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8737 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8738 0 : double arg2 ;
8739 0 : double arg3 ;
8740 0 : double arg4 ;
8741 0 : double arg5 ;
8742 0 : double arg6 ;
8743 0 : double arg7 ;
8744 0 : void *argp1 = 0 ;
8745 0 : int res1 = 0 ;
8746 0 : double val2 ;
8747 0 : int ecode2 = 0 ;
8748 0 : double val3 ;
8749 0 : int ecode3 = 0 ;
8750 0 : double val4 ;
8751 0 : int ecode4 = 0 ;
8752 0 : double val5 ;
8753 0 : int ecode5 = 0 ;
8754 0 : double val6 ;
8755 0 : int ecode6 = 0 ;
8756 0 : double val7 ;
8757 0 : int ecode7 = 0 ;
8758 0 : PyObject * obj0 = 0 ;
8759 0 : PyObject * obj1 = 0 ;
8760 0 : PyObject * obj2 = 0 ;
8761 0 : PyObject * obj3 = 0 ;
8762 0 : PyObject * obj4 = 0 ;
8763 0 : PyObject * obj5 = 0 ;
8764 0 : PyObject * obj6 = 0 ;
8765 0 : char * kwnames[] = {
8766 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
8767 : };
8768 0 : OGRErr result;
8769 :
8770 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetACEA", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
8771 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8772 0 : if (!SWIG_IsOK(res1)) {
8773 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetACEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8774 : }
8775 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8776 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8777 0 : if (!SWIG_IsOK(ecode2)) {
8778 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetACEA" "', argument " "2"" of type '" "double""'");
8779 : }
8780 0 : arg2 = static_cast< double >(val2);
8781 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8782 0 : if (!SWIG_IsOK(ecode3)) {
8783 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetACEA" "', argument " "3"" of type '" "double""'");
8784 : }
8785 0 : arg3 = static_cast< double >(val3);
8786 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8787 0 : if (!SWIG_IsOK(ecode4)) {
8788 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetACEA" "', argument " "4"" of type '" "double""'");
8789 : }
8790 0 : arg4 = static_cast< double >(val4);
8791 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8792 0 : if (!SWIG_IsOK(ecode5)) {
8793 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetACEA" "', argument " "5"" of type '" "double""'");
8794 : }
8795 0 : arg5 = static_cast< double >(val5);
8796 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
8797 0 : if (!SWIG_IsOK(ecode6)) {
8798 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetACEA" "', argument " "6"" of type '" "double""'");
8799 : }
8800 0 : arg6 = static_cast< double >(val6);
8801 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
8802 0 : if (!SWIG_IsOK(ecode7)) {
8803 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetACEA" "', argument " "7"" of type '" "double""'");
8804 : }
8805 0 : arg7 = static_cast< double >(val7);
8806 0 : {
8807 0 : const int bLocalUseExceptions = GetUseExceptions();
8808 0 : if ( bLocalUseExceptions ) {
8809 0 : pushErrorHandler();
8810 : }
8811 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetACEA(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
8812 0 : if ( bLocalUseExceptions ) {
8813 0 : popErrorHandler();
8814 : }
8815 : #ifndef SED_HACKS
8816 : if ( bLocalUseExceptions ) {
8817 : CPLErr eclass = CPLGetLastErrorType();
8818 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8819 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8820 : }
8821 : }
8822 : #endif
8823 : }
8824 0 : {
8825 : /* %typemap(out) OGRErr */
8826 0 : if ( result != 0 && GetUseExceptions()) {
8827 0 : const char* pszMessage = CPLGetLastErrorMsg();
8828 0 : if( pszMessage[0] != '\0' )
8829 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8830 : else
8831 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8832 0 : SWIG_fail;
8833 : }
8834 : }
8835 0 : {
8836 : /* %typemap(ret) OGRErr */
8837 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8838 0 : resultobj = PyLong_FromLong( result );
8839 : }
8840 : }
8841 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; } }
8842 : return resultobj;
8843 : fail:
8844 : return NULL;
8845 : }
8846 :
8847 :
8848 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAE(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8849 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8850 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8851 0 : double arg2 ;
8852 0 : double arg3 ;
8853 0 : double arg4 ;
8854 0 : double arg5 ;
8855 0 : void *argp1 = 0 ;
8856 0 : int res1 = 0 ;
8857 0 : double val2 ;
8858 0 : int ecode2 = 0 ;
8859 0 : double val3 ;
8860 0 : int ecode3 = 0 ;
8861 0 : double val4 ;
8862 0 : int ecode4 = 0 ;
8863 0 : double val5 ;
8864 0 : int ecode5 = 0 ;
8865 0 : PyObject * obj0 = 0 ;
8866 0 : PyObject * obj1 = 0 ;
8867 0 : PyObject * obj2 = 0 ;
8868 0 : PyObject * obj3 = 0 ;
8869 0 : PyObject * obj4 = 0 ;
8870 0 : char * kwnames[] = {
8871 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
8872 : };
8873 0 : OGRErr result;
8874 :
8875 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetAE", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
8876 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8877 0 : if (!SWIG_IsOK(res1)) {
8878 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAE" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8879 : }
8880 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8881 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8882 0 : if (!SWIG_IsOK(ecode2)) {
8883 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetAE" "', argument " "2"" of type '" "double""'");
8884 : }
8885 0 : arg2 = static_cast< double >(val2);
8886 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8887 0 : if (!SWIG_IsOK(ecode3)) {
8888 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetAE" "', argument " "3"" of type '" "double""'");
8889 : }
8890 0 : arg3 = static_cast< double >(val3);
8891 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8892 0 : if (!SWIG_IsOK(ecode4)) {
8893 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetAE" "', argument " "4"" of type '" "double""'");
8894 : }
8895 0 : arg4 = static_cast< double >(val4);
8896 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8897 0 : if (!SWIG_IsOK(ecode5)) {
8898 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetAE" "', argument " "5"" of type '" "double""'");
8899 : }
8900 0 : arg5 = static_cast< double >(val5);
8901 0 : {
8902 0 : const int bLocalUseExceptions = GetUseExceptions();
8903 0 : if ( bLocalUseExceptions ) {
8904 0 : pushErrorHandler();
8905 : }
8906 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAE(arg1,arg2,arg3,arg4,arg5);
8907 0 : if ( bLocalUseExceptions ) {
8908 0 : popErrorHandler();
8909 : }
8910 : #ifndef SED_HACKS
8911 : if ( bLocalUseExceptions ) {
8912 : CPLErr eclass = CPLGetLastErrorType();
8913 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8914 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8915 : }
8916 : }
8917 : #endif
8918 : }
8919 0 : {
8920 : /* %typemap(out) OGRErr */
8921 0 : if ( result != 0 && GetUseExceptions()) {
8922 0 : const char* pszMessage = CPLGetLastErrorMsg();
8923 0 : if( pszMessage[0] != '\0' )
8924 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8925 : else
8926 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8927 0 : SWIG_fail;
8928 : }
8929 : }
8930 0 : {
8931 : /* %typemap(ret) OGRErr */
8932 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8933 0 : resultobj = PyLong_FromLong( result );
8934 : }
8935 : }
8936 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; } }
8937 : return resultobj;
8938 : fail:
8939 : return NULL;
8940 : }
8941 :
8942 :
8943 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetBonne(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8944 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8945 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8946 0 : double arg2 ;
8947 0 : double arg3 ;
8948 0 : double arg4 ;
8949 0 : double arg5 ;
8950 0 : void *argp1 = 0 ;
8951 0 : int res1 = 0 ;
8952 0 : double val2 ;
8953 0 : int ecode2 = 0 ;
8954 0 : double val3 ;
8955 0 : int ecode3 = 0 ;
8956 0 : double val4 ;
8957 0 : int ecode4 = 0 ;
8958 0 : double val5 ;
8959 0 : int ecode5 = 0 ;
8960 0 : PyObject * obj0 = 0 ;
8961 0 : PyObject * obj1 = 0 ;
8962 0 : PyObject * obj2 = 0 ;
8963 0 : PyObject * obj3 = 0 ;
8964 0 : PyObject * obj4 = 0 ;
8965 0 : char * kwnames[] = {
8966 : (char *)"self", (char *)"stdp", (char *)"cm", (char *)"fe", (char *)"fn", NULL
8967 : };
8968 0 : OGRErr result;
8969 :
8970 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetBonne", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
8971 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8972 0 : if (!SWIG_IsOK(res1)) {
8973 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetBonne" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8974 : }
8975 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8976 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8977 0 : if (!SWIG_IsOK(ecode2)) {
8978 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetBonne" "', argument " "2"" of type '" "double""'");
8979 : }
8980 0 : arg2 = static_cast< double >(val2);
8981 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8982 0 : if (!SWIG_IsOK(ecode3)) {
8983 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetBonne" "', argument " "3"" of type '" "double""'");
8984 : }
8985 0 : arg3 = static_cast< double >(val3);
8986 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8987 0 : if (!SWIG_IsOK(ecode4)) {
8988 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetBonne" "', argument " "4"" of type '" "double""'");
8989 : }
8990 0 : arg4 = static_cast< double >(val4);
8991 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8992 0 : if (!SWIG_IsOK(ecode5)) {
8993 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetBonne" "', argument " "5"" of type '" "double""'");
8994 : }
8995 0 : arg5 = static_cast< double >(val5);
8996 0 : {
8997 0 : const int bLocalUseExceptions = GetUseExceptions();
8998 0 : if ( bLocalUseExceptions ) {
8999 0 : pushErrorHandler();
9000 : }
9001 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetBonne(arg1,arg2,arg3,arg4,arg5);
9002 0 : if ( bLocalUseExceptions ) {
9003 0 : popErrorHandler();
9004 : }
9005 : #ifndef SED_HACKS
9006 : if ( bLocalUseExceptions ) {
9007 : CPLErr eclass = CPLGetLastErrorType();
9008 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9009 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9010 : }
9011 : }
9012 : #endif
9013 : }
9014 0 : {
9015 : /* %typemap(out) OGRErr */
9016 0 : if ( result != 0 && GetUseExceptions()) {
9017 0 : const char* pszMessage = CPLGetLastErrorMsg();
9018 0 : if( pszMessage[0] != '\0' )
9019 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9020 : else
9021 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9022 0 : SWIG_fail;
9023 : }
9024 : }
9025 0 : {
9026 : /* %typemap(ret) OGRErr */
9027 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9028 0 : resultobj = PyLong_FromLong( result );
9029 : }
9030 : }
9031 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; } }
9032 : return resultobj;
9033 : fail:
9034 : return NULL;
9035 : }
9036 :
9037 :
9038 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9039 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9040 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9041 0 : double arg2 ;
9042 0 : double arg3 ;
9043 0 : double arg4 ;
9044 0 : double arg5 ;
9045 0 : void *argp1 = 0 ;
9046 0 : int res1 = 0 ;
9047 0 : double val2 ;
9048 0 : int ecode2 = 0 ;
9049 0 : double val3 ;
9050 0 : int ecode3 = 0 ;
9051 0 : double val4 ;
9052 0 : int ecode4 = 0 ;
9053 0 : double val5 ;
9054 0 : int ecode5 = 0 ;
9055 0 : PyObject * obj0 = 0 ;
9056 0 : PyObject * obj1 = 0 ;
9057 0 : PyObject * obj2 = 0 ;
9058 0 : PyObject * obj3 = 0 ;
9059 0 : PyObject * obj4 = 0 ;
9060 0 : char * kwnames[] = {
9061 : (char *)"self", (char *)"stdp1", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9062 : };
9063 0 : OGRErr result;
9064 :
9065 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetCEA", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
9066 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9067 0 : if (!SWIG_IsOK(res1)) {
9068 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9069 : }
9070 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9071 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9072 0 : if (!SWIG_IsOK(ecode2)) {
9073 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCEA" "', argument " "2"" of type '" "double""'");
9074 : }
9075 0 : arg2 = static_cast< double >(val2);
9076 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9077 0 : if (!SWIG_IsOK(ecode3)) {
9078 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetCEA" "', argument " "3"" of type '" "double""'");
9079 : }
9080 0 : arg3 = static_cast< double >(val3);
9081 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9082 0 : if (!SWIG_IsOK(ecode4)) {
9083 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetCEA" "', argument " "4"" of type '" "double""'");
9084 : }
9085 0 : arg4 = static_cast< double >(val4);
9086 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9087 0 : if (!SWIG_IsOK(ecode5)) {
9088 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetCEA" "', argument " "5"" of type '" "double""'");
9089 : }
9090 0 : arg5 = static_cast< double >(val5);
9091 0 : {
9092 0 : const int bLocalUseExceptions = GetUseExceptions();
9093 0 : if ( bLocalUseExceptions ) {
9094 0 : pushErrorHandler();
9095 : }
9096 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetCEA(arg1,arg2,arg3,arg4,arg5);
9097 0 : if ( bLocalUseExceptions ) {
9098 0 : popErrorHandler();
9099 : }
9100 : #ifndef SED_HACKS
9101 : if ( bLocalUseExceptions ) {
9102 : CPLErr eclass = CPLGetLastErrorType();
9103 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9104 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9105 : }
9106 : }
9107 : #endif
9108 : }
9109 0 : {
9110 : /* %typemap(out) OGRErr */
9111 0 : if ( result != 0 && GetUseExceptions()) {
9112 0 : const char* pszMessage = CPLGetLastErrorMsg();
9113 0 : if( pszMessage[0] != '\0' )
9114 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9115 : else
9116 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9117 0 : SWIG_fail;
9118 : }
9119 : }
9120 0 : {
9121 : /* %typemap(ret) OGRErr */
9122 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9123 0 : resultobj = PyLong_FromLong( result );
9124 : }
9125 : }
9126 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; } }
9127 : return resultobj;
9128 : fail:
9129 : return NULL;
9130 : }
9131 :
9132 :
9133 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9134 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9135 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9136 0 : double arg2 ;
9137 0 : double arg3 ;
9138 0 : double arg4 ;
9139 0 : double arg5 ;
9140 0 : void *argp1 = 0 ;
9141 0 : int res1 = 0 ;
9142 0 : double val2 ;
9143 0 : int ecode2 = 0 ;
9144 0 : double val3 ;
9145 0 : int ecode3 = 0 ;
9146 0 : double val4 ;
9147 0 : int ecode4 = 0 ;
9148 0 : double val5 ;
9149 0 : int ecode5 = 0 ;
9150 0 : PyObject * obj0 = 0 ;
9151 0 : PyObject * obj1 = 0 ;
9152 0 : PyObject * obj2 = 0 ;
9153 0 : PyObject * obj3 = 0 ;
9154 0 : PyObject * obj4 = 0 ;
9155 0 : char * kwnames[] = {
9156 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
9157 : };
9158 0 : OGRErr result;
9159 :
9160 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetCS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
9161 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9162 0 : if (!SWIG_IsOK(res1)) {
9163 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9164 : }
9165 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9166 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9167 0 : if (!SWIG_IsOK(ecode2)) {
9168 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCS" "', argument " "2"" of type '" "double""'");
9169 : }
9170 0 : arg2 = static_cast< double >(val2);
9171 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9172 0 : if (!SWIG_IsOK(ecode3)) {
9173 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetCS" "', argument " "3"" of type '" "double""'");
9174 : }
9175 0 : arg3 = static_cast< double >(val3);
9176 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9177 0 : if (!SWIG_IsOK(ecode4)) {
9178 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetCS" "', argument " "4"" of type '" "double""'");
9179 : }
9180 0 : arg4 = static_cast< double >(val4);
9181 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9182 0 : if (!SWIG_IsOK(ecode5)) {
9183 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetCS" "', argument " "5"" of type '" "double""'");
9184 : }
9185 0 : arg5 = static_cast< double >(val5);
9186 0 : {
9187 0 : const int bLocalUseExceptions = GetUseExceptions();
9188 0 : if ( bLocalUseExceptions ) {
9189 0 : pushErrorHandler();
9190 : }
9191 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetCS(arg1,arg2,arg3,arg4,arg5);
9192 0 : if ( bLocalUseExceptions ) {
9193 0 : popErrorHandler();
9194 : }
9195 : #ifndef SED_HACKS
9196 : if ( bLocalUseExceptions ) {
9197 : CPLErr eclass = CPLGetLastErrorType();
9198 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9199 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9200 : }
9201 : }
9202 : #endif
9203 : }
9204 0 : {
9205 : /* %typemap(out) OGRErr */
9206 0 : if ( result != 0 && GetUseExceptions()) {
9207 0 : const char* pszMessage = CPLGetLastErrorMsg();
9208 0 : if( pszMessage[0] != '\0' )
9209 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9210 : else
9211 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9212 0 : SWIG_fail;
9213 : }
9214 : }
9215 0 : {
9216 : /* %typemap(ret) OGRErr */
9217 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9218 0 : resultobj = PyLong_FromLong( result );
9219 : }
9220 : }
9221 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; } }
9222 : return resultobj;
9223 : fail:
9224 : return NULL;
9225 : }
9226 :
9227 :
9228 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9229 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9230 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9231 0 : double arg2 ;
9232 0 : double arg3 ;
9233 0 : double arg4 ;
9234 0 : double arg5 ;
9235 0 : double arg6 ;
9236 0 : double arg7 ;
9237 0 : void *argp1 = 0 ;
9238 0 : int res1 = 0 ;
9239 0 : double val2 ;
9240 0 : int ecode2 = 0 ;
9241 0 : double val3 ;
9242 0 : int ecode3 = 0 ;
9243 0 : double val4 ;
9244 0 : int ecode4 = 0 ;
9245 0 : double val5 ;
9246 0 : int ecode5 = 0 ;
9247 0 : double val6 ;
9248 0 : int ecode6 = 0 ;
9249 0 : double val7 ;
9250 0 : int ecode7 = 0 ;
9251 0 : PyObject * obj0 = 0 ;
9252 0 : PyObject * obj1 = 0 ;
9253 0 : PyObject * obj2 = 0 ;
9254 0 : PyObject * obj3 = 0 ;
9255 0 : PyObject * obj4 = 0 ;
9256 0 : PyObject * obj5 = 0 ;
9257 0 : PyObject * obj6 = 0 ;
9258 0 : char * kwnames[] = {
9259 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
9260 : };
9261 0 : OGRErr result;
9262 :
9263 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetEC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
9264 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9265 0 : if (!SWIG_IsOK(res1)) {
9266 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9267 : }
9268 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9269 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9270 0 : if (!SWIG_IsOK(ecode2)) {
9271 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEC" "', argument " "2"" of type '" "double""'");
9272 : }
9273 0 : arg2 = static_cast< double >(val2);
9274 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9275 0 : if (!SWIG_IsOK(ecode3)) {
9276 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEC" "', argument " "3"" of type '" "double""'");
9277 : }
9278 0 : arg3 = static_cast< double >(val3);
9279 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9280 0 : if (!SWIG_IsOK(ecode4)) {
9281 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEC" "', argument " "4"" of type '" "double""'");
9282 : }
9283 0 : arg4 = static_cast< double >(val4);
9284 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9285 0 : if (!SWIG_IsOK(ecode5)) {
9286 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEC" "', argument " "5"" of type '" "double""'");
9287 : }
9288 0 : arg5 = static_cast< double >(val5);
9289 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9290 0 : if (!SWIG_IsOK(ecode6)) {
9291 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetEC" "', argument " "6"" of type '" "double""'");
9292 : }
9293 0 : arg6 = static_cast< double >(val6);
9294 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
9295 0 : if (!SWIG_IsOK(ecode7)) {
9296 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetEC" "', argument " "7"" of type '" "double""'");
9297 : }
9298 0 : arg7 = static_cast< double >(val7);
9299 0 : {
9300 0 : const int bLocalUseExceptions = GetUseExceptions();
9301 0 : if ( bLocalUseExceptions ) {
9302 0 : pushErrorHandler();
9303 : }
9304 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
9305 0 : if ( bLocalUseExceptions ) {
9306 0 : popErrorHandler();
9307 : }
9308 : #ifndef SED_HACKS
9309 : if ( bLocalUseExceptions ) {
9310 : CPLErr eclass = CPLGetLastErrorType();
9311 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9312 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9313 : }
9314 : }
9315 : #endif
9316 : }
9317 0 : {
9318 : /* %typemap(out) OGRErr */
9319 0 : if ( result != 0 && GetUseExceptions()) {
9320 0 : const char* pszMessage = CPLGetLastErrorMsg();
9321 0 : if( pszMessage[0] != '\0' )
9322 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9323 : else
9324 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9325 0 : SWIG_fail;
9326 : }
9327 : }
9328 0 : {
9329 : /* %typemap(ret) OGRErr */
9330 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9331 0 : resultobj = PyLong_FromLong( result );
9332 : }
9333 : }
9334 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; } }
9335 : return resultobj;
9336 : fail:
9337 : return NULL;
9338 : }
9339 :
9340 :
9341 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEckertIV(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9342 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9343 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9344 0 : double arg2 ;
9345 0 : double arg3 ;
9346 0 : double arg4 ;
9347 0 : void *argp1 = 0 ;
9348 0 : int res1 = 0 ;
9349 0 : double val2 ;
9350 0 : int ecode2 = 0 ;
9351 0 : double val3 ;
9352 0 : int ecode3 = 0 ;
9353 0 : double val4 ;
9354 0 : int ecode4 = 0 ;
9355 0 : PyObject * obj0 = 0 ;
9356 0 : PyObject * obj1 = 0 ;
9357 0 : PyObject * obj2 = 0 ;
9358 0 : PyObject * obj3 = 0 ;
9359 0 : char * kwnames[] = {
9360 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9361 : };
9362 0 : OGRErr result;
9363 :
9364 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetEckertIV", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9365 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9366 0 : if (!SWIG_IsOK(res1)) {
9367 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEckertIV" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9368 : }
9369 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9370 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9371 0 : if (!SWIG_IsOK(ecode2)) {
9372 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEckertIV" "', argument " "2"" of type '" "double""'");
9373 : }
9374 0 : arg2 = static_cast< double >(val2);
9375 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9376 0 : if (!SWIG_IsOK(ecode3)) {
9377 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEckertIV" "', argument " "3"" of type '" "double""'");
9378 : }
9379 0 : arg3 = static_cast< double >(val3);
9380 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9381 0 : if (!SWIG_IsOK(ecode4)) {
9382 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEckertIV" "', argument " "4"" of type '" "double""'");
9383 : }
9384 0 : arg4 = static_cast< double >(val4);
9385 0 : {
9386 0 : const int bLocalUseExceptions = GetUseExceptions();
9387 0 : if ( bLocalUseExceptions ) {
9388 0 : pushErrorHandler();
9389 : }
9390 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEckertIV(arg1,arg2,arg3,arg4);
9391 0 : if ( bLocalUseExceptions ) {
9392 0 : popErrorHandler();
9393 : }
9394 : #ifndef SED_HACKS
9395 : if ( bLocalUseExceptions ) {
9396 : CPLErr eclass = CPLGetLastErrorType();
9397 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9398 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9399 : }
9400 : }
9401 : #endif
9402 : }
9403 0 : {
9404 : /* %typemap(out) OGRErr */
9405 0 : if ( result != 0 && GetUseExceptions()) {
9406 0 : const char* pszMessage = CPLGetLastErrorMsg();
9407 0 : if( pszMessage[0] != '\0' )
9408 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9409 : else
9410 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9411 0 : SWIG_fail;
9412 : }
9413 : }
9414 0 : {
9415 : /* %typemap(ret) OGRErr */
9416 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9417 0 : resultobj = PyLong_FromLong( result );
9418 : }
9419 : }
9420 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; } }
9421 : return resultobj;
9422 : fail:
9423 : return NULL;
9424 : }
9425 :
9426 :
9427 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEckertVI(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9428 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9429 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9430 0 : double arg2 ;
9431 0 : double arg3 ;
9432 0 : double arg4 ;
9433 0 : void *argp1 = 0 ;
9434 0 : int res1 = 0 ;
9435 0 : double val2 ;
9436 0 : int ecode2 = 0 ;
9437 0 : double val3 ;
9438 0 : int ecode3 = 0 ;
9439 0 : double val4 ;
9440 0 : int ecode4 = 0 ;
9441 0 : PyObject * obj0 = 0 ;
9442 0 : PyObject * obj1 = 0 ;
9443 0 : PyObject * obj2 = 0 ;
9444 0 : PyObject * obj3 = 0 ;
9445 0 : char * kwnames[] = {
9446 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9447 : };
9448 0 : OGRErr result;
9449 :
9450 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetEckertVI", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9451 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9452 0 : if (!SWIG_IsOK(res1)) {
9453 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEckertVI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9454 : }
9455 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9456 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9457 0 : if (!SWIG_IsOK(ecode2)) {
9458 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEckertVI" "', argument " "2"" of type '" "double""'");
9459 : }
9460 0 : arg2 = static_cast< double >(val2);
9461 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9462 0 : if (!SWIG_IsOK(ecode3)) {
9463 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEckertVI" "', argument " "3"" of type '" "double""'");
9464 : }
9465 0 : arg3 = static_cast< double >(val3);
9466 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9467 0 : if (!SWIG_IsOK(ecode4)) {
9468 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEckertVI" "', argument " "4"" of type '" "double""'");
9469 : }
9470 0 : arg4 = static_cast< double >(val4);
9471 0 : {
9472 0 : const int bLocalUseExceptions = GetUseExceptions();
9473 0 : if ( bLocalUseExceptions ) {
9474 0 : pushErrorHandler();
9475 : }
9476 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEckertVI(arg1,arg2,arg3,arg4);
9477 0 : if ( bLocalUseExceptions ) {
9478 0 : popErrorHandler();
9479 : }
9480 : #ifndef SED_HACKS
9481 : if ( bLocalUseExceptions ) {
9482 : CPLErr eclass = CPLGetLastErrorType();
9483 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9484 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9485 : }
9486 : }
9487 : #endif
9488 : }
9489 0 : {
9490 : /* %typemap(out) OGRErr */
9491 0 : if ( result != 0 && GetUseExceptions()) {
9492 0 : const char* pszMessage = CPLGetLastErrorMsg();
9493 0 : if( pszMessage[0] != '\0' )
9494 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9495 : else
9496 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9497 0 : SWIG_fail;
9498 : }
9499 : }
9500 0 : {
9501 : /* %typemap(ret) OGRErr */
9502 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9503 0 : resultobj = PyLong_FromLong( result );
9504 : }
9505 : }
9506 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; } }
9507 : return resultobj;
9508 : fail:
9509 : return NULL;
9510 : }
9511 :
9512 :
9513 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEquirectangular(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9514 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9515 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9516 0 : double arg2 ;
9517 0 : double arg3 ;
9518 0 : double arg4 ;
9519 0 : double arg5 ;
9520 0 : void *argp1 = 0 ;
9521 0 : int res1 = 0 ;
9522 0 : double val2 ;
9523 0 : int ecode2 = 0 ;
9524 0 : double val3 ;
9525 0 : int ecode3 = 0 ;
9526 0 : double val4 ;
9527 0 : int ecode4 = 0 ;
9528 0 : double val5 ;
9529 0 : int ecode5 = 0 ;
9530 0 : PyObject * obj0 = 0 ;
9531 0 : PyObject * obj1 = 0 ;
9532 0 : PyObject * obj2 = 0 ;
9533 0 : PyObject * obj3 = 0 ;
9534 0 : PyObject * obj4 = 0 ;
9535 0 : char * kwnames[] = {
9536 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
9537 : };
9538 0 : OGRErr result;
9539 :
9540 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetEquirectangular", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
9541 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9542 0 : if (!SWIG_IsOK(res1)) {
9543 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEquirectangular" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9544 : }
9545 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9546 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9547 0 : if (!SWIG_IsOK(ecode2)) {
9548 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEquirectangular" "', argument " "2"" of type '" "double""'");
9549 : }
9550 0 : arg2 = static_cast< double >(val2);
9551 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9552 0 : if (!SWIG_IsOK(ecode3)) {
9553 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEquirectangular" "', argument " "3"" of type '" "double""'");
9554 : }
9555 0 : arg3 = static_cast< double >(val3);
9556 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9557 0 : if (!SWIG_IsOK(ecode4)) {
9558 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEquirectangular" "', argument " "4"" of type '" "double""'");
9559 : }
9560 0 : arg4 = static_cast< double >(val4);
9561 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9562 0 : if (!SWIG_IsOK(ecode5)) {
9563 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEquirectangular" "', argument " "5"" of type '" "double""'");
9564 : }
9565 0 : arg5 = static_cast< double >(val5);
9566 0 : {
9567 0 : const int bLocalUseExceptions = GetUseExceptions();
9568 0 : if ( bLocalUseExceptions ) {
9569 0 : pushErrorHandler();
9570 : }
9571 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular(arg1,arg2,arg3,arg4,arg5);
9572 0 : if ( bLocalUseExceptions ) {
9573 0 : popErrorHandler();
9574 : }
9575 : #ifndef SED_HACKS
9576 : if ( bLocalUseExceptions ) {
9577 : CPLErr eclass = CPLGetLastErrorType();
9578 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9579 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9580 : }
9581 : }
9582 : #endif
9583 : }
9584 0 : {
9585 : /* %typemap(out) OGRErr */
9586 0 : if ( result != 0 && GetUseExceptions()) {
9587 0 : const char* pszMessage = CPLGetLastErrorMsg();
9588 0 : if( pszMessage[0] != '\0' )
9589 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9590 : else
9591 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9592 0 : SWIG_fail;
9593 : }
9594 : }
9595 0 : {
9596 : /* %typemap(ret) OGRErr */
9597 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9598 0 : resultobj = PyLong_FromLong( result );
9599 : }
9600 : }
9601 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; } }
9602 : return resultobj;
9603 : fail:
9604 : return NULL;
9605 : }
9606 :
9607 :
9608 3 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEquirectangular2(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9609 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9610 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9611 3 : double arg2 ;
9612 3 : double arg3 ;
9613 3 : double arg4 ;
9614 3 : double arg5 ;
9615 3 : double arg6 ;
9616 3 : void *argp1 = 0 ;
9617 3 : int res1 = 0 ;
9618 3 : double val2 ;
9619 3 : int ecode2 = 0 ;
9620 3 : double val3 ;
9621 3 : int ecode3 = 0 ;
9622 3 : double val4 ;
9623 3 : int ecode4 = 0 ;
9624 3 : double val5 ;
9625 3 : int ecode5 = 0 ;
9626 3 : double val6 ;
9627 3 : int ecode6 = 0 ;
9628 3 : PyObject * obj0 = 0 ;
9629 3 : PyObject * obj1 = 0 ;
9630 3 : PyObject * obj2 = 0 ;
9631 3 : PyObject * obj3 = 0 ;
9632 3 : PyObject * obj4 = 0 ;
9633 3 : PyObject * obj5 = 0 ;
9634 3 : char * kwnames[] = {
9635 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"pseudostdparallellat", (char *)"fe", (char *)"fn", NULL
9636 : };
9637 3 : OGRErr result;
9638 :
9639 3 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetEquirectangular2", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
9640 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9641 3 : if (!SWIG_IsOK(res1)) {
9642 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9643 : }
9644 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9645 3 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9646 3 : if (!SWIG_IsOK(ecode2)) {
9647 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "2"" of type '" "double""'");
9648 : }
9649 3 : arg2 = static_cast< double >(val2);
9650 3 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9651 3 : if (!SWIG_IsOK(ecode3)) {
9652 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "3"" of type '" "double""'");
9653 : }
9654 3 : arg3 = static_cast< double >(val3);
9655 3 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9656 3 : if (!SWIG_IsOK(ecode4)) {
9657 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "4"" of type '" "double""'");
9658 : }
9659 3 : arg4 = static_cast< double >(val4);
9660 3 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9661 3 : if (!SWIG_IsOK(ecode5)) {
9662 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "5"" of type '" "double""'");
9663 : }
9664 3 : arg5 = static_cast< double >(val5);
9665 3 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9666 3 : if (!SWIG_IsOK(ecode6)) {
9667 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "6"" of type '" "double""'");
9668 : }
9669 3 : arg6 = static_cast< double >(val6);
9670 3 : {
9671 3 : const int bLocalUseExceptions = GetUseExceptions();
9672 3 : if ( bLocalUseExceptions ) {
9673 3 : pushErrorHandler();
9674 : }
9675 3 : result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular2(arg1,arg2,arg3,arg4,arg5,arg6);
9676 3 : if ( bLocalUseExceptions ) {
9677 3 : popErrorHandler();
9678 : }
9679 : #ifndef SED_HACKS
9680 : if ( bLocalUseExceptions ) {
9681 : CPLErr eclass = CPLGetLastErrorType();
9682 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9683 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9684 : }
9685 : }
9686 : #endif
9687 : }
9688 3 : {
9689 : /* %typemap(out) OGRErr */
9690 3 : if ( result != 0 && GetUseExceptions()) {
9691 0 : const char* pszMessage = CPLGetLastErrorMsg();
9692 0 : if( pszMessage[0] != '\0' )
9693 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9694 : else
9695 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9696 0 : SWIG_fail;
9697 : }
9698 : }
9699 3 : {
9700 : /* %typemap(ret) OGRErr */
9701 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9702 3 : resultobj = PyLong_FromLong( result );
9703 : }
9704 : }
9705 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; } }
9706 : return resultobj;
9707 : fail:
9708 : return NULL;
9709 : }
9710 :
9711 :
9712 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGaussSchreiberTMercator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9713 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9714 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9715 0 : double arg2 ;
9716 0 : double arg3 ;
9717 0 : double arg4 ;
9718 0 : double arg5 ;
9719 0 : double arg6 ;
9720 0 : void *argp1 = 0 ;
9721 0 : int res1 = 0 ;
9722 0 : double val2 ;
9723 0 : int ecode2 = 0 ;
9724 0 : double val3 ;
9725 0 : int ecode3 = 0 ;
9726 0 : double val4 ;
9727 0 : int ecode4 = 0 ;
9728 0 : double val5 ;
9729 0 : int ecode5 = 0 ;
9730 0 : double val6 ;
9731 0 : int ecode6 = 0 ;
9732 0 : PyObject * obj0 = 0 ;
9733 0 : PyObject * obj1 = 0 ;
9734 0 : PyObject * obj2 = 0 ;
9735 0 : PyObject * obj3 = 0 ;
9736 0 : PyObject * obj4 = 0 ;
9737 0 : PyObject * obj5 = 0 ;
9738 0 : char * kwnames[] = {
9739 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"sc", (char *)"fe", (char *)"fn", NULL
9740 : };
9741 0 : OGRErr result;
9742 :
9743 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetGaussSchreiberTMercator", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
9744 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9745 0 : if (!SWIG_IsOK(res1)) {
9746 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9747 : }
9748 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9749 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9750 0 : if (!SWIG_IsOK(ecode2)) {
9751 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "2"" of type '" "double""'");
9752 : }
9753 0 : arg2 = static_cast< double >(val2);
9754 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9755 0 : if (!SWIG_IsOK(ecode3)) {
9756 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "3"" of type '" "double""'");
9757 : }
9758 0 : arg3 = static_cast< double >(val3);
9759 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9760 0 : if (!SWIG_IsOK(ecode4)) {
9761 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "4"" of type '" "double""'");
9762 : }
9763 0 : arg4 = static_cast< double >(val4);
9764 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9765 0 : if (!SWIG_IsOK(ecode5)) {
9766 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "5"" of type '" "double""'");
9767 : }
9768 0 : arg5 = static_cast< double >(val5);
9769 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9770 0 : if (!SWIG_IsOK(ecode6)) {
9771 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "6"" of type '" "double""'");
9772 : }
9773 0 : arg6 = static_cast< double >(val6);
9774 0 : {
9775 0 : const int bLocalUseExceptions = GetUseExceptions();
9776 0 : if ( bLocalUseExceptions ) {
9777 0 : pushErrorHandler();
9778 : }
9779 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(arg1,arg2,arg3,arg4,arg5,arg6);
9780 0 : if ( bLocalUseExceptions ) {
9781 0 : popErrorHandler();
9782 : }
9783 : #ifndef SED_HACKS
9784 : if ( bLocalUseExceptions ) {
9785 : CPLErr eclass = CPLGetLastErrorType();
9786 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9787 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9788 : }
9789 : }
9790 : #endif
9791 : }
9792 0 : {
9793 : /* %typemap(out) OGRErr */
9794 0 : if ( result != 0 && GetUseExceptions()) {
9795 0 : const char* pszMessage = CPLGetLastErrorMsg();
9796 0 : if( pszMessage[0] != '\0' )
9797 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9798 : else
9799 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9800 0 : SWIG_fail;
9801 : }
9802 : }
9803 0 : {
9804 : /* %typemap(ret) OGRErr */
9805 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9806 0 : resultobj = PyLong_FromLong( result );
9807 : }
9808 : }
9809 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; } }
9810 : return resultobj;
9811 : fail:
9812 : return NULL;
9813 : }
9814 :
9815 :
9816 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9817 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9818 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9819 1 : double arg2 ;
9820 1 : double arg3 ;
9821 1 : double arg4 ;
9822 1 : void *argp1 = 0 ;
9823 1 : int res1 = 0 ;
9824 1 : double val2 ;
9825 1 : int ecode2 = 0 ;
9826 1 : double val3 ;
9827 1 : int ecode3 = 0 ;
9828 1 : double val4 ;
9829 1 : int ecode4 = 0 ;
9830 1 : PyObject * obj0 = 0 ;
9831 1 : PyObject * obj1 = 0 ;
9832 1 : PyObject * obj2 = 0 ;
9833 1 : PyObject * obj3 = 0 ;
9834 1 : char * kwnames[] = {
9835 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9836 : };
9837 1 : OGRErr result;
9838 :
9839 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetGS", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9840 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9841 1 : if (!SWIG_IsOK(res1)) {
9842 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9843 : }
9844 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9845 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9846 1 : if (!SWIG_IsOK(ecode2)) {
9847 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGS" "', argument " "2"" of type '" "double""'");
9848 : }
9849 1 : arg2 = static_cast< double >(val2);
9850 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9851 1 : if (!SWIG_IsOK(ecode3)) {
9852 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGS" "', argument " "3"" of type '" "double""'");
9853 : }
9854 1 : arg3 = static_cast< double >(val3);
9855 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9856 1 : if (!SWIG_IsOK(ecode4)) {
9857 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGS" "', argument " "4"" of type '" "double""'");
9858 : }
9859 1 : arg4 = static_cast< double >(val4);
9860 1 : {
9861 1 : const int bLocalUseExceptions = GetUseExceptions();
9862 1 : if ( bLocalUseExceptions ) {
9863 1 : pushErrorHandler();
9864 : }
9865 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetGS(arg1,arg2,arg3,arg4);
9866 1 : if ( bLocalUseExceptions ) {
9867 1 : popErrorHandler();
9868 : }
9869 : #ifndef SED_HACKS
9870 : if ( bLocalUseExceptions ) {
9871 : CPLErr eclass = CPLGetLastErrorType();
9872 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9873 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9874 : }
9875 : }
9876 : #endif
9877 : }
9878 1 : {
9879 : /* %typemap(out) OGRErr */
9880 1 : if ( result != 0 && GetUseExceptions()) {
9881 0 : const char* pszMessage = CPLGetLastErrorMsg();
9882 0 : if( pszMessage[0] != '\0' )
9883 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9884 : else
9885 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9886 0 : SWIG_fail;
9887 : }
9888 : }
9889 1 : {
9890 : /* %typemap(ret) OGRErr */
9891 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9892 1 : resultobj = PyLong_FromLong( result );
9893 : }
9894 : }
9895 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; } }
9896 : return resultobj;
9897 : fail:
9898 : return NULL;
9899 : }
9900 :
9901 :
9902 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGH(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9903 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9904 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9905 0 : double arg2 ;
9906 0 : double arg3 ;
9907 0 : double arg4 ;
9908 0 : void *argp1 = 0 ;
9909 0 : int res1 = 0 ;
9910 0 : double val2 ;
9911 0 : int ecode2 = 0 ;
9912 0 : double val3 ;
9913 0 : int ecode3 = 0 ;
9914 0 : double val4 ;
9915 0 : int ecode4 = 0 ;
9916 0 : PyObject * obj0 = 0 ;
9917 0 : PyObject * obj1 = 0 ;
9918 0 : PyObject * obj2 = 0 ;
9919 0 : PyObject * obj3 = 0 ;
9920 0 : char * kwnames[] = {
9921 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9922 : };
9923 0 : OGRErr result;
9924 :
9925 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetGH", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9926 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9927 0 : if (!SWIG_IsOK(res1)) {
9928 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGH" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9929 : }
9930 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9931 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9932 0 : if (!SWIG_IsOK(ecode2)) {
9933 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGH" "', argument " "2"" of type '" "double""'");
9934 : }
9935 0 : arg2 = static_cast< double >(val2);
9936 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9937 0 : if (!SWIG_IsOK(ecode3)) {
9938 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGH" "', argument " "3"" of type '" "double""'");
9939 : }
9940 0 : arg3 = static_cast< double >(val3);
9941 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9942 0 : if (!SWIG_IsOK(ecode4)) {
9943 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGH" "', argument " "4"" of type '" "double""'");
9944 : }
9945 0 : arg4 = static_cast< double >(val4);
9946 0 : {
9947 0 : const int bLocalUseExceptions = GetUseExceptions();
9948 0 : if ( bLocalUseExceptions ) {
9949 0 : pushErrorHandler();
9950 : }
9951 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGH(arg1,arg2,arg3,arg4);
9952 0 : if ( bLocalUseExceptions ) {
9953 0 : popErrorHandler();
9954 : }
9955 : #ifndef SED_HACKS
9956 : if ( bLocalUseExceptions ) {
9957 : CPLErr eclass = CPLGetLastErrorType();
9958 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9959 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9960 : }
9961 : }
9962 : #endif
9963 : }
9964 0 : {
9965 : /* %typemap(out) OGRErr */
9966 0 : if ( result != 0 && GetUseExceptions()) {
9967 0 : const char* pszMessage = CPLGetLastErrorMsg();
9968 0 : if( pszMessage[0] != '\0' )
9969 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9970 : else
9971 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9972 0 : SWIG_fail;
9973 : }
9974 : }
9975 0 : {
9976 : /* %typemap(ret) OGRErr */
9977 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9978 0 : resultobj = PyLong_FromLong( result );
9979 : }
9980 : }
9981 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; } }
9982 : return resultobj;
9983 : fail:
9984 : return NULL;
9985 : }
9986 :
9987 :
9988 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetIGH(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9989 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9990 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9991 0 : void *argp1 = 0 ;
9992 0 : int res1 = 0 ;
9993 0 : PyObject *swig_obj[1] ;
9994 0 : OGRErr result;
9995 :
9996 0 : if (!args) SWIG_fail;
9997 0 : swig_obj[0] = args;
9998 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9999 0 : if (!SWIG_IsOK(res1)) {
10000 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetIGH" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10001 : }
10002 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10003 0 : {
10004 0 : const int bLocalUseExceptions = GetUseExceptions();
10005 0 : if ( bLocalUseExceptions ) {
10006 0 : pushErrorHandler();
10007 : }
10008 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetIGH(arg1);
10009 0 : if ( bLocalUseExceptions ) {
10010 0 : popErrorHandler();
10011 : }
10012 : #ifndef SED_HACKS
10013 : if ( bLocalUseExceptions ) {
10014 : CPLErr eclass = CPLGetLastErrorType();
10015 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10016 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10017 : }
10018 : }
10019 : #endif
10020 : }
10021 0 : {
10022 : /* %typemap(out) OGRErr */
10023 0 : if ( result != 0 && GetUseExceptions()) {
10024 0 : const char* pszMessage = CPLGetLastErrorMsg();
10025 0 : if( pszMessage[0] != '\0' )
10026 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10027 : else
10028 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10029 0 : SWIG_fail;
10030 : }
10031 : }
10032 0 : {
10033 : /* %typemap(ret) OGRErr */
10034 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10035 0 : resultobj = PyLong_FromLong( result );
10036 : }
10037 : }
10038 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; } }
10039 : return resultobj;
10040 : fail:
10041 : return NULL;
10042 : }
10043 :
10044 :
10045 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGEOS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10046 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10047 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10048 0 : double arg2 ;
10049 0 : double arg3 ;
10050 0 : double arg4 ;
10051 0 : double arg5 ;
10052 0 : void *argp1 = 0 ;
10053 0 : int res1 = 0 ;
10054 0 : double val2 ;
10055 0 : int ecode2 = 0 ;
10056 0 : double val3 ;
10057 0 : int ecode3 = 0 ;
10058 0 : double val4 ;
10059 0 : int ecode4 = 0 ;
10060 0 : double val5 ;
10061 0 : int ecode5 = 0 ;
10062 0 : PyObject * obj0 = 0 ;
10063 0 : PyObject * obj1 = 0 ;
10064 0 : PyObject * obj2 = 0 ;
10065 0 : PyObject * obj3 = 0 ;
10066 0 : PyObject * obj4 = 0 ;
10067 0 : char * kwnames[] = {
10068 : (char *)"self", (char *)"cm", (char *)"satelliteheight", (char *)"fe", (char *)"fn", NULL
10069 : };
10070 0 : OGRErr result;
10071 :
10072 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetGEOS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
10073 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10074 0 : if (!SWIG_IsOK(res1)) {
10075 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGEOS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10076 : }
10077 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10078 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10079 0 : if (!SWIG_IsOK(ecode2)) {
10080 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGEOS" "', argument " "2"" of type '" "double""'");
10081 : }
10082 0 : arg2 = static_cast< double >(val2);
10083 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10084 0 : if (!SWIG_IsOK(ecode3)) {
10085 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGEOS" "', argument " "3"" of type '" "double""'");
10086 : }
10087 0 : arg3 = static_cast< double >(val3);
10088 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10089 0 : if (!SWIG_IsOK(ecode4)) {
10090 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGEOS" "', argument " "4"" of type '" "double""'");
10091 : }
10092 0 : arg4 = static_cast< double >(val4);
10093 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10094 0 : if (!SWIG_IsOK(ecode5)) {
10095 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGEOS" "', argument " "5"" of type '" "double""'");
10096 : }
10097 0 : arg5 = static_cast< double >(val5);
10098 0 : {
10099 0 : const int bLocalUseExceptions = GetUseExceptions();
10100 0 : if ( bLocalUseExceptions ) {
10101 0 : pushErrorHandler();
10102 : }
10103 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGEOS(arg1,arg2,arg3,arg4,arg5);
10104 0 : if ( bLocalUseExceptions ) {
10105 0 : popErrorHandler();
10106 : }
10107 : #ifndef SED_HACKS
10108 : if ( bLocalUseExceptions ) {
10109 : CPLErr eclass = CPLGetLastErrorType();
10110 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10111 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10112 : }
10113 : }
10114 : #endif
10115 : }
10116 0 : {
10117 : /* %typemap(out) OGRErr */
10118 0 : if ( result != 0 && GetUseExceptions()) {
10119 0 : const char* pszMessage = CPLGetLastErrorMsg();
10120 0 : if( pszMessage[0] != '\0' )
10121 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10122 : else
10123 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10124 0 : SWIG_fail;
10125 : }
10126 : }
10127 0 : {
10128 : /* %typemap(ret) OGRErr */
10129 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10130 0 : resultobj = PyLong_FromLong( result );
10131 : }
10132 : }
10133 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; } }
10134 : return resultobj;
10135 : fail:
10136 : return NULL;
10137 : }
10138 :
10139 :
10140 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGnomonic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10141 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10142 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10143 0 : double arg2 ;
10144 0 : double arg3 ;
10145 0 : double arg4 ;
10146 0 : double arg5 ;
10147 0 : void *argp1 = 0 ;
10148 0 : int res1 = 0 ;
10149 0 : double val2 ;
10150 0 : int ecode2 = 0 ;
10151 0 : double val3 ;
10152 0 : int ecode3 = 0 ;
10153 0 : double val4 ;
10154 0 : int ecode4 = 0 ;
10155 0 : double val5 ;
10156 0 : int ecode5 = 0 ;
10157 0 : PyObject * obj0 = 0 ;
10158 0 : PyObject * obj1 = 0 ;
10159 0 : PyObject * obj2 = 0 ;
10160 0 : PyObject * obj3 = 0 ;
10161 0 : PyObject * obj4 = 0 ;
10162 0 : char * kwnames[] = {
10163 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10164 : };
10165 0 : OGRErr result;
10166 :
10167 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetGnomonic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
10168 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10169 0 : if (!SWIG_IsOK(res1)) {
10170 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGnomonic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10171 : }
10172 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10173 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10174 0 : if (!SWIG_IsOK(ecode2)) {
10175 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGnomonic" "', argument " "2"" of type '" "double""'");
10176 : }
10177 0 : arg2 = static_cast< double >(val2);
10178 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10179 0 : if (!SWIG_IsOK(ecode3)) {
10180 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGnomonic" "', argument " "3"" of type '" "double""'");
10181 : }
10182 0 : arg3 = static_cast< double >(val3);
10183 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10184 0 : if (!SWIG_IsOK(ecode4)) {
10185 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGnomonic" "', argument " "4"" of type '" "double""'");
10186 : }
10187 0 : arg4 = static_cast< double >(val4);
10188 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10189 0 : if (!SWIG_IsOK(ecode5)) {
10190 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGnomonic" "', argument " "5"" of type '" "double""'");
10191 : }
10192 0 : arg5 = static_cast< double >(val5);
10193 0 : {
10194 0 : const int bLocalUseExceptions = GetUseExceptions();
10195 0 : if ( bLocalUseExceptions ) {
10196 0 : pushErrorHandler();
10197 : }
10198 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGnomonic(arg1,arg2,arg3,arg4,arg5);
10199 0 : if ( bLocalUseExceptions ) {
10200 0 : popErrorHandler();
10201 : }
10202 : #ifndef SED_HACKS
10203 : if ( bLocalUseExceptions ) {
10204 : CPLErr eclass = CPLGetLastErrorType();
10205 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10206 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10207 : }
10208 : }
10209 : #endif
10210 : }
10211 0 : {
10212 : /* %typemap(out) OGRErr */
10213 0 : if ( result != 0 && GetUseExceptions()) {
10214 0 : const char* pszMessage = CPLGetLastErrorMsg();
10215 0 : if( pszMessage[0] != '\0' )
10216 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10217 : else
10218 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10219 0 : SWIG_fail;
10220 : }
10221 : }
10222 0 : {
10223 : /* %typemap(ret) OGRErr */
10224 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10225 0 : resultobj = PyLong_FromLong( result );
10226 : }
10227 : }
10228 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; } }
10229 : return resultobj;
10230 : fail:
10231 : return NULL;
10232 : }
10233 :
10234 :
10235 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetHOM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10236 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10237 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10238 0 : double arg2 ;
10239 0 : double arg3 ;
10240 0 : double arg4 ;
10241 0 : double arg5 ;
10242 0 : double arg6 ;
10243 0 : double arg7 ;
10244 0 : double arg8 ;
10245 0 : void *argp1 = 0 ;
10246 0 : int res1 = 0 ;
10247 0 : double val2 ;
10248 0 : int ecode2 = 0 ;
10249 0 : double val3 ;
10250 0 : int ecode3 = 0 ;
10251 0 : double val4 ;
10252 0 : int ecode4 = 0 ;
10253 0 : double val5 ;
10254 0 : int ecode5 = 0 ;
10255 0 : double val6 ;
10256 0 : int ecode6 = 0 ;
10257 0 : double val7 ;
10258 0 : int ecode7 = 0 ;
10259 0 : double val8 ;
10260 0 : int ecode8 = 0 ;
10261 0 : PyObject * obj0 = 0 ;
10262 0 : PyObject * obj1 = 0 ;
10263 0 : PyObject * obj2 = 0 ;
10264 0 : PyObject * obj3 = 0 ;
10265 0 : PyObject * obj4 = 0 ;
10266 0 : PyObject * obj5 = 0 ;
10267 0 : PyObject * obj6 = 0 ;
10268 0 : PyObject * obj7 = 0 ;
10269 0 : char * kwnames[] = {
10270 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"azimuth", (char *)"recttoskew", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10271 : };
10272 0 : OGRErr result;
10273 :
10274 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:SpatialReference_SetHOM", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
10275 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10276 0 : if (!SWIG_IsOK(res1)) {
10277 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetHOM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10278 : }
10279 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10280 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10281 0 : if (!SWIG_IsOK(ecode2)) {
10282 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetHOM" "', argument " "2"" of type '" "double""'");
10283 : }
10284 0 : arg2 = static_cast< double >(val2);
10285 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10286 0 : if (!SWIG_IsOK(ecode3)) {
10287 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetHOM" "', argument " "3"" of type '" "double""'");
10288 : }
10289 0 : arg3 = static_cast< double >(val3);
10290 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10291 0 : if (!SWIG_IsOK(ecode4)) {
10292 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetHOM" "', argument " "4"" of type '" "double""'");
10293 : }
10294 0 : arg4 = static_cast< double >(val4);
10295 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10296 0 : if (!SWIG_IsOK(ecode5)) {
10297 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetHOM" "', argument " "5"" of type '" "double""'");
10298 : }
10299 0 : arg5 = static_cast< double >(val5);
10300 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10301 0 : if (!SWIG_IsOK(ecode6)) {
10302 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetHOM" "', argument " "6"" of type '" "double""'");
10303 : }
10304 0 : arg6 = static_cast< double >(val6);
10305 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10306 0 : if (!SWIG_IsOK(ecode7)) {
10307 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetHOM" "', argument " "7"" of type '" "double""'");
10308 : }
10309 0 : arg7 = static_cast< double >(val7);
10310 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
10311 0 : if (!SWIG_IsOK(ecode8)) {
10312 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetHOM" "', argument " "8"" of type '" "double""'");
10313 : }
10314 0 : arg8 = static_cast< double >(val8);
10315 0 : {
10316 0 : const int bLocalUseExceptions = GetUseExceptions();
10317 0 : if ( bLocalUseExceptions ) {
10318 0 : pushErrorHandler();
10319 : }
10320 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetHOM(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
10321 0 : if ( bLocalUseExceptions ) {
10322 0 : popErrorHandler();
10323 : }
10324 : #ifndef SED_HACKS
10325 : if ( bLocalUseExceptions ) {
10326 : CPLErr eclass = CPLGetLastErrorType();
10327 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10328 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10329 : }
10330 : }
10331 : #endif
10332 : }
10333 0 : {
10334 : /* %typemap(out) OGRErr */
10335 0 : if ( result != 0 && GetUseExceptions()) {
10336 0 : const char* pszMessage = CPLGetLastErrorMsg();
10337 0 : if( pszMessage[0] != '\0' )
10338 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10339 : else
10340 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10341 0 : SWIG_fail;
10342 : }
10343 : }
10344 0 : {
10345 : /* %typemap(ret) OGRErr */
10346 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10347 0 : resultobj = PyLong_FromLong( result );
10348 : }
10349 : }
10350 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; } }
10351 : return resultobj;
10352 : fail:
10353 : return NULL;
10354 : }
10355 :
10356 :
10357 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetHOM2PNO(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10358 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10359 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10360 0 : double arg2 ;
10361 0 : double arg3 ;
10362 0 : double arg4 ;
10363 0 : double arg5 ;
10364 0 : double arg6 ;
10365 0 : double arg7 ;
10366 0 : double arg8 ;
10367 0 : double arg9 ;
10368 0 : void *argp1 = 0 ;
10369 0 : int res1 = 0 ;
10370 0 : double val2 ;
10371 0 : int ecode2 = 0 ;
10372 0 : double val3 ;
10373 0 : int ecode3 = 0 ;
10374 0 : double val4 ;
10375 0 : int ecode4 = 0 ;
10376 0 : double val5 ;
10377 0 : int ecode5 = 0 ;
10378 0 : double val6 ;
10379 0 : int ecode6 = 0 ;
10380 0 : double val7 ;
10381 0 : int ecode7 = 0 ;
10382 0 : double val8 ;
10383 0 : int ecode8 = 0 ;
10384 0 : double val9 ;
10385 0 : int ecode9 = 0 ;
10386 0 : PyObject * obj0 = 0 ;
10387 0 : PyObject * obj1 = 0 ;
10388 0 : PyObject * obj2 = 0 ;
10389 0 : PyObject * obj3 = 0 ;
10390 0 : PyObject * obj4 = 0 ;
10391 0 : PyObject * obj5 = 0 ;
10392 0 : PyObject * obj6 = 0 ;
10393 0 : PyObject * obj7 = 0 ;
10394 0 : PyObject * obj8 = 0 ;
10395 0 : char * kwnames[] = {
10396 : (char *)"self", (char *)"clat", (char *)"dfLat1", (char *)"dfLong1", (char *)"dfLat2", (char *)"dfLong2", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10397 : };
10398 0 : OGRErr result;
10399 :
10400 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOO:SpatialReference_SetHOM2PNO", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
10401 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10402 0 : if (!SWIG_IsOK(res1)) {
10403 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10404 : }
10405 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10406 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10407 0 : if (!SWIG_IsOK(ecode2)) {
10408 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "2"" of type '" "double""'");
10409 : }
10410 0 : arg2 = static_cast< double >(val2);
10411 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10412 0 : if (!SWIG_IsOK(ecode3)) {
10413 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "3"" of type '" "double""'");
10414 : }
10415 0 : arg3 = static_cast< double >(val3);
10416 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10417 0 : if (!SWIG_IsOK(ecode4)) {
10418 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "4"" of type '" "double""'");
10419 : }
10420 0 : arg4 = static_cast< double >(val4);
10421 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10422 0 : if (!SWIG_IsOK(ecode5)) {
10423 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "5"" of type '" "double""'");
10424 : }
10425 0 : arg5 = static_cast< double >(val5);
10426 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10427 0 : if (!SWIG_IsOK(ecode6)) {
10428 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "6"" of type '" "double""'");
10429 : }
10430 0 : arg6 = static_cast< double >(val6);
10431 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10432 0 : if (!SWIG_IsOK(ecode7)) {
10433 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "7"" of type '" "double""'");
10434 : }
10435 0 : arg7 = static_cast< double >(val7);
10436 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
10437 0 : if (!SWIG_IsOK(ecode8)) {
10438 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "8"" of type '" "double""'");
10439 : }
10440 0 : arg8 = static_cast< double >(val8);
10441 0 : ecode9 = SWIG_AsVal_double(obj8, &val9);
10442 0 : if (!SWIG_IsOK(ecode9)) {
10443 0 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "9"" of type '" "double""'");
10444 : }
10445 0 : arg9 = static_cast< double >(val9);
10446 0 : {
10447 0 : const int bLocalUseExceptions = GetUseExceptions();
10448 0 : if ( bLocalUseExceptions ) {
10449 0 : pushErrorHandler();
10450 : }
10451 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetHOM2PNO(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
10452 0 : if ( bLocalUseExceptions ) {
10453 0 : popErrorHandler();
10454 : }
10455 : #ifndef SED_HACKS
10456 : if ( bLocalUseExceptions ) {
10457 : CPLErr eclass = CPLGetLastErrorType();
10458 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10459 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10460 : }
10461 : }
10462 : #endif
10463 : }
10464 0 : {
10465 : /* %typemap(out) OGRErr */
10466 0 : if ( result != 0 && GetUseExceptions()) {
10467 0 : const char* pszMessage = CPLGetLastErrorMsg();
10468 0 : if( pszMessage[0] != '\0' )
10469 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10470 : else
10471 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10472 0 : SWIG_fail;
10473 : }
10474 : }
10475 0 : {
10476 : /* %typemap(ret) OGRErr */
10477 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10478 0 : resultobj = PyLong_FromLong( result );
10479 : }
10480 : }
10481 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; } }
10482 : return resultobj;
10483 : fail:
10484 : return NULL;
10485 : }
10486 :
10487 :
10488 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetKrovak(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10489 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10490 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10491 0 : double arg2 ;
10492 0 : double arg3 ;
10493 0 : double arg4 ;
10494 0 : double arg5 ;
10495 0 : double arg6 ;
10496 0 : double arg7 ;
10497 0 : double arg8 ;
10498 0 : void *argp1 = 0 ;
10499 0 : int res1 = 0 ;
10500 0 : double val2 ;
10501 0 : int ecode2 = 0 ;
10502 0 : double val3 ;
10503 0 : int ecode3 = 0 ;
10504 0 : double val4 ;
10505 0 : int ecode4 = 0 ;
10506 0 : double val5 ;
10507 0 : int ecode5 = 0 ;
10508 0 : double val6 ;
10509 0 : int ecode6 = 0 ;
10510 0 : double val7 ;
10511 0 : int ecode7 = 0 ;
10512 0 : double val8 ;
10513 0 : int ecode8 = 0 ;
10514 0 : PyObject * obj0 = 0 ;
10515 0 : PyObject * obj1 = 0 ;
10516 0 : PyObject * obj2 = 0 ;
10517 0 : PyObject * obj3 = 0 ;
10518 0 : PyObject * obj4 = 0 ;
10519 0 : PyObject * obj5 = 0 ;
10520 0 : PyObject * obj6 = 0 ;
10521 0 : PyObject * obj7 = 0 ;
10522 0 : char * kwnames[] = {
10523 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"azimuth", (char *)"pseudostdparallellat", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10524 : };
10525 0 : OGRErr result;
10526 :
10527 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:SpatialReference_SetKrovak", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
10528 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10529 0 : if (!SWIG_IsOK(res1)) {
10530 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetKrovak" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10531 : }
10532 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10533 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10534 0 : if (!SWIG_IsOK(ecode2)) {
10535 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetKrovak" "', argument " "2"" of type '" "double""'");
10536 : }
10537 0 : arg2 = static_cast< double >(val2);
10538 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10539 0 : if (!SWIG_IsOK(ecode3)) {
10540 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetKrovak" "', argument " "3"" of type '" "double""'");
10541 : }
10542 0 : arg3 = static_cast< double >(val3);
10543 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10544 0 : if (!SWIG_IsOK(ecode4)) {
10545 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetKrovak" "', argument " "4"" of type '" "double""'");
10546 : }
10547 0 : arg4 = static_cast< double >(val4);
10548 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10549 0 : if (!SWIG_IsOK(ecode5)) {
10550 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetKrovak" "', argument " "5"" of type '" "double""'");
10551 : }
10552 0 : arg5 = static_cast< double >(val5);
10553 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10554 0 : if (!SWIG_IsOK(ecode6)) {
10555 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetKrovak" "', argument " "6"" of type '" "double""'");
10556 : }
10557 0 : arg6 = static_cast< double >(val6);
10558 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10559 0 : if (!SWIG_IsOK(ecode7)) {
10560 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetKrovak" "', argument " "7"" of type '" "double""'");
10561 : }
10562 0 : arg7 = static_cast< double >(val7);
10563 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
10564 0 : if (!SWIG_IsOK(ecode8)) {
10565 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetKrovak" "', argument " "8"" of type '" "double""'");
10566 : }
10567 0 : arg8 = static_cast< double >(val8);
10568 0 : {
10569 0 : const int bLocalUseExceptions = GetUseExceptions();
10570 0 : if ( bLocalUseExceptions ) {
10571 0 : pushErrorHandler();
10572 : }
10573 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetKrovak(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
10574 0 : if ( bLocalUseExceptions ) {
10575 0 : popErrorHandler();
10576 : }
10577 : #ifndef SED_HACKS
10578 : if ( bLocalUseExceptions ) {
10579 : CPLErr eclass = CPLGetLastErrorType();
10580 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10581 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10582 : }
10583 : }
10584 : #endif
10585 : }
10586 0 : {
10587 : /* %typemap(out) OGRErr */
10588 0 : if ( result != 0 && GetUseExceptions()) {
10589 0 : const char* pszMessage = CPLGetLastErrorMsg();
10590 0 : if( pszMessage[0] != '\0' )
10591 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10592 : else
10593 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10594 0 : SWIG_fail;
10595 : }
10596 : }
10597 0 : {
10598 : /* %typemap(ret) OGRErr */
10599 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10600 0 : resultobj = PyLong_FromLong( result );
10601 : }
10602 : }
10603 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; } }
10604 : return resultobj;
10605 : fail:
10606 : return NULL;
10607 : }
10608 :
10609 :
10610 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLAEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10611 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10612 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10613 0 : double arg2 ;
10614 0 : double arg3 ;
10615 0 : double arg4 ;
10616 0 : double arg5 ;
10617 0 : void *argp1 = 0 ;
10618 0 : int res1 = 0 ;
10619 0 : double val2 ;
10620 0 : int ecode2 = 0 ;
10621 0 : double val3 ;
10622 0 : int ecode3 = 0 ;
10623 0 : double val4 ;
10624 0 : int ecode4 = 0 ;
10625 0 : double val5 ;
10626 0 : int ecode5 = 0 ;
10627 0 : PyObject * obj0 = 0 ;
10628 0 : PyObject * obj1 = 0 ;
10629 0 : PyObject * obj2 = 0 ;
10630 0 : PyObject * obj3 = 0 ;
10631 0 : PyObject * obj4 = 0 ;
10632 0 : char * kwnames[] = {
10633 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10634 : };
10635 0 : OGRErr result;
10636 :
10637 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetLAEA", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
10638 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10639 0 : if (!SWIG_IsOK(res1)) {
10640 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLAEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10641 : }
10642 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10643 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10644 0 : if (!SWIG_IsOK(ecode2)) {
10645 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLAEA" "', argument " "2"" of type '" "double""'");
10646 : }
10647 0 : arg2 = static_cast< double >(val2);
10648 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10649 0 : if (!SWIG_IsOK(ecode3)) {
10650 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLAEA" "', argument " "3"" of type '" "double""'");
10651 : }
10652 0 : arg3 = static_cast< double >(val3);
10653 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10654 0 : if (!SWIG_IsOK(ecode4)) {
10655 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLAEA" "', argument " "4"" of type '" "double""'");
10656 : }
10657 0 : arg4 = static_cast< double >(val4);
10658 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10659 0 : if (!SWIG_IsOK(ecode5)) {
10660 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLAEA" "', argument " "5"" of type '" "double""'");
10661 : }
10662 0 : arg5 = static_cast< double >(val5);
10663 0 : {
10664 0 : const int bLocalUseExceptions = GetUseExceptions();
10665 0 : if ( bLocalUseExceptions ) {
10666 0 : pushErrorHandler();
10667 : }
10668 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLAEA(arg1,arg2,arg3,arg4,arg5);
10669 0 : if ( bLocalUseExceptions ) {
10670 0 : popErrorHandler();
10671 : }
10672 : #ifndef SED_HACKS
10673 : if ( bLocalUseExceptions ) {
10674 : CPLErr eclass = CPLGetLastErrorType();
10675 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10676 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10677 : }
10678 : }
10679 : #endif
10680 : }
10681 0 : {
10682 : /* %typemap(out) OGRErr */
10683 0 : if ( result != 0 && GetUseExceptions()) {
10684 0 : const char* pszMessage = CPLGetLastErrorMsg();
10685 0 : if( pszMessage[0] != '\0' )
10686 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10687 : else
10688 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10689 0 : SWIG_fail;
10690 : }
10691 : }
10692 0 : {
10693 : /* %typemap(ret) OGRErr */
10694 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10695 0 : resultobj = PyLong_FromLong( result );
10696 : }
10697 : }
10698 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; } }
10699 : return resultobj;
10700 : fail:
10701 : return NULL;
10702 : }
10703 :
10704 :
10705 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10706 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10707 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10708 1 : double arg2 ;
10709 1 : double arg3 ;
10710 1 : double arg4 ;
10711 1 : double arg5 ;
10712 1 : double arg6 ;
10713 1 : double arg7 ;
10714 1 : void *argp1 = 0 ;
10715 1 : int res1 = 0 ;
10716 1 : double val2 ;
10717 1 : int ecode2 = 0 ;
10718 1 : double val3 ;
10719 1 : int ecode3 = 0 ;
10720 1 : double val4 ;
10721 1 : int ecode4 = 0 ;
10722 1 : double val5 ;
10723 1 : int ecode5 = 0 ;
10724 1 : double val6 ;
10725 1 : int ecode6 = 0 ;
10726 1 : double val7 ;
10727 1 : int ecode7 = 0 ;
10728 1 : PyObject * obj0 = 0 ;
10729 1 : PyObject * obj1 = 0 ;
10730 1 : PyObject * obj2 = 0 ;
10731 1 : PyObject * obj3 = 0 ;
10732 1 : PyObject * obj4 = 0 ;
10733 1 : PyObject * obj5 = 0 ;
10734 1 : PyObject * obj6 = 0 ;
10735 1 : char * kwnames[] = {
10736 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10737 : };
10738 1 : OGRErr result;
10739 :
10740 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetLCC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
10741 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10742 1 : if (!SWIG_IsOK(res1)) {
10743 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10744 : }
10745 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10746 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10747 1 : if (!SWIG_IsOK(ecode2)) {
10748 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCC" "', argument " "2"" of type '" "double""'");
10749 : }
10750 1 : arg2 = static_cast< double >(val2);
10751 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10752 1 : if (!SWIG_IsOK(ecode3)) {
10753 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCC" "', argument " "3"" of type '" "double""'");
10754 : }
10755 1 : arg3 = static_cast< double >(val3);
10756 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10757 1 : if (!SWIG_IsOK(ecode4)) {
10758 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCC" "', argument " "4"" of type '" "double""'");
10759 : }
10760 1 : arg4 = static_cast< double >(val4);
10761 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10762 1 : if (!SWIG_IsOK(ecode5)) {
10763 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCC" "', argument " "5"" of type '" "double""'");
10764 : }
10765 1 : arg5 = static_cast< double >(val5);
10766 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10767 1 : if (!SWIG_IsOK(ecode6)) {
10768 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCC" "', argument " "6"" of type '" "double""'");
10769 : }
10770 1 : arg6 = static_cast< double >(val6);
10771 1 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10772 1 : if (!SWIG_IsOK(ecode7)) {
10773 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetLCC" "', argument " "7"" of type '" "double""'");
10774 : }
10775 1 : arg7 = static_cast< double >(val7);
10776 1 : {
10777 1 : const int bLocalUseExceptions = GetUseExceptions();
10778 1 : if ( bLocalUseExceptions ) {
10779 1 : pushErrorHandler();
10780 : }
10781 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
10782 1 : if ( bLocalUseExceptions ) {
10783 1 : popErrorHandler();
10784 : }
10785 : #ifndef SED_HACKS
10786 : if ( bLocalUseExceptions ) {
10787 : CPLErr eclass = CPLGetLastErrorType();
10788 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10789 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10790 : }
10791 : }
10792 : #endif
10793 : }
10794 1 : {
10795 : /* %typemap(out) OGRErr */
10796 1 : if ( result != 0 && GetUseExceptions()) {
10797 0 : const char* pszMessage = CPLGetLastErrorMsg();
10798 0 : if( pszMessage[0] != '\0' )
10799 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10800 : else
10801 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10802 0 : SWIG_fail;
10803 : }
10804 : }
10805 1 : {
10806 : /* %typemap(ret) OGRErr */
10807 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10808 1 : resultobj = PyLong_FromLong( result );
10809 : }
10810 : }
10811 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; } }
10812 : return resultobj;
10813 : fail:
10814 : return NULL;
10815 : }
10816 :
10817 :
10818 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCC1SP(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10819 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10820 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10821 0 : double arg2 ;
10822 0 : double arg3 ;
10823 0 : double arg4 ;
10824 0 : double arg5 ;
10825 0 : double arg6 ;
10826 0 : void *argp1 = 0 ;
10827 0 : int res1 = 0 ;
10828 0 : double val2 ;
10829 0 : int ecode2 = 0 ;
10830 0 : double val3 ;
10831 0 : int ecode3 = 0 ;
10832 0 : double val4 ;
10833 0 : int ecode4 = 0 ;
10834 0 : double val5 ;
10835 0 : int ecode5 = 0 ;
10836 0 : double val6 ;
10837 0 : int ecode6 = 0 ;
10838 0 : PyObject * obj0 = 0 ;
10839 0 : PyObject * obj1 = 0 ;
10840 0 : PyObject * obj2 = 0 ;
10841 0 : PyObject * obj3 = 0 ;
10842 0 : PyObject * obj4 = 0 ;
10843 0 : PyObject * obj5 = 0 ;
10844 0 : char * kwnames[] = {
10845 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10846 : };
10847 0 : OGRErr result;
10848 :
10849 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetLCC1SP", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
10850 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10851 0 : if (!SWIG_IsOK(res1)) {
10852 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCC1SP" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10853 : }
10854 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10855 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10856 0 : if (!SWIG_IsOK(ecode2)) {
10857 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCC1SP" "', argument " "2"" of type '" "double""'");
10858 : }
10859 0 : arg2 = static_cast< double >(val2);
10860 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10861 0 : if (!SWIG_IsOK(ecode3)) {
10862 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCC1SP" "', argument " "3"" of type '" "double""'");
10863 : }
10864 0 : arg3 = static_cast< double >(val3);
10865 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10866 0 : if (!SWIG_IsOK(ecode4)) {
10867 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCC1SP" "', argument " "4"" of type '" "double""'");
10868 : }
10869 0 : arg4 = static_cast< double >(val4);
10870 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10871 0 : if (!SWIG_IsOK(ecode5)) {
10872 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCC1SP" "', argument " "5"" of type '" "double""'");
10873 : }
10874 0 : arg5 = static_cast< double >(val5);
10875 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10876 0 : if (!SWIG_IsOK(ecode6)) {
10877 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCC1SP" "', argument " "6"" of type '" "double""'");
10878 : }
10879 0 : arg6 = static_cast< double >(val6);
10880 0 : {
10881 0 : const int bLocalUseExceptions = GetUseExceptions();
10882 0 : if ( bLocalUseExceptions ) {
10883 0 : pushErrorHandler();
10884 : }
10885 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCC1SP(arg1,arg2,arg3,arg4,arg5,arg6);
10886 0 : if ( bLocalUseExceptions ) {
10887 0 : popErrorHandler();
10888 : }
10889 : #ifndef SED_HACKS
10890 : if ( bLocalUseExceptions ) {
10891 : CPLErr eclass = CPLGetLastErrorType();
10892 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10893 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10894 : }
10895 : }
10896 : #endif
10897 : }
10898 0 : {
10899 : /* %typemap(out) OGRErr */
10900 0 : if ( result != 0 && GetUseExceptions()) {
10901 0 : const char* pszMessage = CPLGetLastErrorMsg();
10902 0 : if( pszMessage[0] != '\0' )
10903 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10904 : else
10905 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10906 0 : SWIG_fail;
10907 : }
10908 : }
10909 0 : {
10910 : /* %typemap(ret) OGRErr */
10911 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10912 0 : resultobj = PyLong_FromLong( result );
10913 : }
10914 : }
10915 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; } }
10916 : return resultobj;
10917 : fail:
10918 : return NULL;
10919 : }
10920 :
10921 :
10922 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCCB(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10923 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10924 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10925 0 : double arg2 ;
10926 0 : double arg3 ;
10927 0 : double arg4 ;
10928 0 : double arg5 ;
10929 0 : double arg6 ;
10930 0 : double arg7 ;
10931 0 : void *argp1 = 0 ;
10932 0 : int res1 = 0 ;
10933 0 : double val2 ;
10934 0 : int ecode2 = 0 ;
10935 0 : double val3 ;
10936 0 : int ecode3 = 0 ;
10937 0 : double val4 ;
10938 0 : int ecode4 = 0 ;
10939 0 : double val5 ;
10940 0 : int ecode5 = 0 ;
10941 0 : double val6 ;
10942 0 : int ecode6 = 0 ;
10943 0 : double val7 ;
10944 0 : int ecode7 = 0 ;
10945 0 : PyObject * obj0 = 0 ;
10946 0 : PyObject * obj1 = 0 ;
10947 0 : PyObject * obj2 = 0 ;
10948 0 : PyObject * obj3 = 0 ;
10949 0 : PyObject * obj4 = 0 ;
10950 0 : PyObject * obj5 = 0 ;
10951 0 : PyObject * obj6 = 0 ;
10952 0 : char * kwnames[] = {
10953 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10954 : };
10955 0 : OGRErr result;
10956 :
10957 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetLCCB", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
10958 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10959 0 : if (!SWIG_IsOK(res1)) {
10960 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCCB" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10961 : }
10962 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10963 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10964 0 : if (!SWIG_IsOK(ecode2)) {
10965 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCCB" "', argument " "2"" of type '" "double""'");
10966 : }
10967 0 : arg2 = static_cast< double >(val2);
10968 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10969 0 : if (!SWIG_IsOK(ecode3)) {
10970 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCCB" "', argument " "3"" of type '" "double""'");
10971 : }
10972 0 : arg3 = static_cast< double >(val3);
10973 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10974 0 : if (!SWIG_IsOK(ecode4)) {
10975 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCCB" "', argument " "4"" of type '" "double""'");
10976 : }
10977 0 : arg4 = static_cast< double >(val4);
10978 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10979 0 : if (!SWIG_IsOK(ecode5)) {
10980 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCCB" "', argument " "5"" of type '" "double""'");
10981 : }
10982 0 : arg5 = static_cast< double >(val5);
10983 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10984 0 : if (!SWIG_IsOK(ecode6)) {
10985 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCCB" "', argument " "6"" of type '" "double""'");
10986 : }
10987 0 : arg6 = static_cast< double >(val6);
10988 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10989 0 : if (!SWIG_IsOK(ecode7)) {
10990 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetLCCB" "', argument " "7"" of type '" "double""'");
10991 : }
10992 0 : arg7 = static_cast< double >(val7);
10993 0 : {
10994 0 : const int bLocalUseExceptions = GetUseExceptions();
10995 0 : if ( bLocalUseExceptions ) {
10996 0 : pushErrorHandler();
10997 : }
10998 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCCB(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
10999 0 : if ( bLocalUseExceptions ) {
11000 0 : popErrorHandler();
11001 : }
11002 : #ifndef SED_HACKS
11003 : if ( bLocalUseExceptions ) {
11004 : CPLErr eclass = CPLGetLastErrorType();
11005 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11006 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11007 : }
11008 : }
11009 : #endif
11010 : }
11011 0 : {
11012 : /* %typemap(out) OGRErr */
11013 0 : if ( result != 0 && GetUseExceptions()) {
11014 0 : const char* pszMessage = CPLGetLastErrorMsg();
11015 0 : if( pszMessage[0] != '\0' )
11016 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11017 : else
11018 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11019 0 : SWIG_fail;
11020 : }
11021 : }
11022 0 : {
11023 : /* %typemap(ret) OGRErr */
11024 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11025 0 : resultobj = PyLong_FromLong( result );
11026 : }
11027 : }
11028 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; } }
11029 : return resultobj;
11030 : fail:
11031 : return NULL;
11032 : }
11033 :
11034 :
11035 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11036 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11037 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11038 0 : double arg2 ;
11039 0 : double arg3 ;
11040 0 : double arg4 ;
11041 0 : double arg5 ;
11042 0 : void *argp1 = 0 ;
11043 0 : int res1 = 0 ;
11044 0 : double val2 ;
11045 0 : int ecode2 = 0 ;
11046 0 : double val3 ;
11047 0 : int ecode3 = 0 ;
11048 0 : double val4 ;
11049 0 : int ecode4 = 0 ;
11050 0 : double val5 ;
11051 0 : int ecode5 = 0 ;
11052 0 : PyObject * obj0 = 0 ;
11053 0 : PyObject * obj1 = 0 ;
11054 0 : PyObject * obj2 = 0 ;
11055 0 : PyObject * obj3 = 0 ;
11056 0 : PyObject * obj4 = 0 ;
11057 0 : char * kwnames[] = {
11058 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11059 : };
11060 0 : OGRErr result;
11061 :
11062 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetMC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11063 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11064 0 : if (!SWIG_IsOK(res1)) {
11065 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11066 : }
11067 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11068 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11069 0 : if (!SWIG_IsOK(ecode2)) {
11070 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMC" "', argument " "2"" of type '" "double""'");
11071 : }
11072 0 : arg2 = static_cast< double >(val2);
11073 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11074 0 : if (!SWIG_IsOK(ecode3)) {
11075 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMC" "', argument " "3"" of type '" "double""'");
11076 : }
11077 0 : arg3 = static_cast< double >(val3);
11078 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11079 0 : if (!SWIG_IsOK(ecode4)) {
11080 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMC" "', argument " "4"" of type '" "double""'");
11081 : }
11082 0 : arg4 = static_cast< double >(val4);
11083 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11084 0 : if (!SWIG_IsOK(ecode5)) {
11085 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMC" "', argument " "5"" of type '" "double""'");
11086 : }
11087 0 : arg5 = static_cast< double >(val5);
11088 0 : {
11089 0 : const int bLocalUseExceptions = GetUseExceptions();
11090 0 : if ( bLocalUseExceptions ) {
11091 0 : pushErrorHandler();
11092 : }
11093 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetMC(arg1,arg2,arg3,arg4,arg5);
11094 0 : if ( bLocalUseExceptions ) {
11095 0 : popErrorHandler();
11096 : }
11097 : #ifndef SED_HACKS
11098 : if ( bLocalUseExceptions ) {
11099 : CPLErr eclass = CPLGetLastErrorType();
11100 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11101 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11102 : }
11103 : }
11104 : #endif
11105 : }
11106 0 : {
11107 : /* %typemap(out) OGRErr */
11108 0 : if ( result != 0 && GetUseExceptions()) {
11109 0 : const char* pszMessage = CPLGetLastErrorMsg();
11110 0 : if( pszMessage[0] != '\0' )
11111 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11112 : else
11113 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11114 0 : SWIG_fail;
11115 : }
11116 : }
11117 0 : {
11118 : /* %typemap(ret) OGRErr */
11119 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11120 0 : resultobj = PyLong_FromLong( result );
11121 : }
11122 : }
11123 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; } }
11124 : return resultobj;
11125 : fail:
11126 : return NULL;
11127 : }
11128 :
11129 :
11130 2 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMercator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11131 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11132 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11133 2 : double arg2 ;
11134 2 : double arg3 ;
11135 2 : double arg4 ;
11136 2 : double arg5 ;
11137 2 : double arg6 ;
11138 2 : void *argp1 = 0 ;
11139 2 : int res1 = 0 ;
11140 2 : double val2 ;
11141 2 : int ecode2 = 0 ;
11142 2 : double val3 ;
11143 2 : int ecode3 = 0 ;
11144 2 : double val4 ;
11145 2 : int ecode4 = 0 ;
11146 2 : double val5 ;
11147 2 : int ecode5 = 0 ;
11148 2 : double val6 ;
11149 2 : int ecode6 = 0 ;
11150 2 : PyObject * obj0 = 0 ;
11151 2 : PyObject * obj1 = 0 ;
11152 2 : PyObject * obj2 = 0 ;
11153 2 : PyObject * obj3 = 0 ;
11154 2 : PyObject * obj4 = 0 ;
11155 2 : PyObject * obj5 = 0 ;
11156 2 : char * kwnames[] = {
11157 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
11158 : };
11159 2 : OGRErr result;
11160 :
11161 2 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetMercator", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11162 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11163 2 : if (!SWIG_IsOK(res1)) {
11164 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMercator" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11165 : }
11166 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11167 2 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11168 2 : if (!SWIG_IsOK(ecode2)) {
11169 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMercator" "', argument " "2"" of type '" "double""'");
11170 : }
11171 2 : arg2 = static_cast< double >(val2);
11172 2 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11173 2 : if (!SWIG_IsOK(ecode3)) {
11174 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMercator" "', argument " "3"" of type '" "double""'");
11175 : }
11176 2 : arg3 = static_cast< double >(val3);
11177 2 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11178 2 : if (!SWIG_IsOK(ecode4)) {
11179 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMercator" "', argument " "4"" of type '" "double""'");
11180 : }
11181 2 : arg4 = static_cast< double >(val4);
11182 2 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11183 2 : if (!SWIG_IsOK(ecode5)) {
11184 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMercator" "', argument " "5"" of type '" "double""'");
11185 : }
11186 2 : arg5 = static_cast< double >(val5);
11187 2 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11188 2 : if (!SWIG_IsOK(ecode6)) {
11189 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetMercator" "', argument " "6"" of type '" "double""'");
11190 : }
11191 2 : arg6 = static_cast< double >(val6);
11192 2 : {
11193 2 : const int bLocalUseExceptions = GetUseExceptions();
11194 2 : if ( bLocalUseExceptions ) {
11195 2 : pushErrorHandler();
11196 : }
11197 2 : result = (OGRErr)OSRSpatialReferenceShadow_SetMercator(arg1,arg2,arg3,arg4,arg5,arg6);
11198 2 : if ( bLocalUseExceptions ) {
11199 2 : popErrorHandler();
11200 : }
11201 : #ifndef SED_HACKS
11202 : if ( bLocalUseExceptions ) {
11203 : CPLErr eclass = CPLGetLastErrorType();
11204 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11205 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11206 : }
11207 : }
11208 : #endif
11209 : }
11210 2 : {
11211 : /* %typemap(out) OGRErr */
11212 2 : if ( result != 0 && GetUseExceptions()) {
11213 0 : const char* pszMessage = CPLGetLastErrorMsg();
11214 0 : if( pszMessage[0] != '\0' )
11215 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11216 : else
11217 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11218 0 : SWIG_fail;
11219 : }
11220 : }
11221 2 : {
11222 : /* %typemap(ret) OGRErr */
11223 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11224 2 : resultobj = PyLong_FromLong( result );
11225 : }
11226 : }
11227 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; } }
11228 : return resultobj;
11229 : fail:
11230 : return NULL;
11231 : }
11232 :
11233 :
11234 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMercator2SP(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11235 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11236 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11237 1 : double arg2 ;
11238 1 : double arg3 ;
11239 1 : double arg4 ;
11240 1 : double arg5 ;
11241 1 : double arg6 ;
11242 1 : void *argp1 = 0 ;
11243 1 : int res1 = 0 ;
11244 1 : double val2 ;
11245 1 : int ecode2 = 0 ;
11246 1 : double val3 ;
11247 1 : int ecode3 = 0 ;
11248 1 : double val4 ;
11249 1 : int ecode4 = 0 ;
11250 1 : double val5 ;
11251 1 : int ecode5 = 0 ;
11252 1 : double val6 ;
11253 1 : int ecode6 = 0 ;
11254 1 : PyObject * obj0 = 0 ;
11255 1 : PyObject * obj1 = 0 ;
11256 1 : PyObject * obj2 = 0 ;
11257 1 : PyObject * obj3 = 0 ;
11258 1 : PyObject * obj4 = 0 ;
11259 1 : PyObject * obj5 = 0 ;
11260 1 : char * kwnames[] = {
11261 : (char *)"self", (char *)"stdp1", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11262 : };
11263 1 : OGRErr result;
11264 :
11265 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetMercator2SP", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11266 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11267 1 : if (!SWIG_IsOK(res1)) {
11268 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMercator2SP" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11269 : }
11270 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11271 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11272 1 : if (!SWIG_IsOK(ecode2)) {
11273 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMercator2SP" "', argument " "2"" of type '" "double""'");
11274 : }
11275 1 : arg2 = static_cast< double >(val2);
11276 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11277 1 : if (!SWIG_IsOK(ecode3)) {
11278 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMercator2SP" "', argument " "3"" of type '" "double""'");
11279 : }
11280 1 : arg3 = static_cast< double >(val3);
11281 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11282 1 : if (!SWIG_IsOK(ecode4)) {
11283 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMercator2SP" "', argument " "4"" of type '" "double""'");
11284 : }
11285 1 : arg4 = static_cast< double >(val4);
11286 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11287 1 : if (!SWIG_IsOK(ecode5)) {
11288 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMercator2SP" "', argument " "5"" of type '" "double""'");
11289 : }
11290 1 : arg5 = static_cast< double >(val5);
11291 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11292 1 : if (!SWIG_IsOK(ecode6)) {
11293 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetMercator2SP" "', argument " "6"" of type '" "double""'");
11294 : }
11295 1 : arg6 = static_cast< double >(val6);
11296 1 : {
11297 1 : const int bLocalUseExceptions = GetUseExceptions();
11298 1 : if ( bLocalUseExceptions ) {
11299 1 : pushErrorHandler();
11300 : }
11301 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetMercator2SP(arg1,arg2,arg3,arg4,arg5,arg6);
11302 1 : if ( bLocalUseExceptions ) {
11303 1 : popErrorHandler();
11304 : }
11305 : #ifndef SED_HACKS
11306 : if ( bLocalUseExceptions ) {
11307 : CPLErr eclass = CPLGetLastErrorType();
11308 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11309 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11310 : }
11311 : }
11312 : #endif
11313 : }
11314 1 : {
11315 : /* %typemap(out) OGRErr */
11316 1 : if ( result != 0 && GetUseExceptions()) {
11317 0 : const char* pszMessage = CPLGetLastErrorMsg();
11318 0 : if( pszMessage[0] != '\0' )
11319 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11320 : else
11321 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11322 0 : SWIG_fail;
11323 : }
11324 : }
11325 1 : {
11326 : /* %typemap(ret) OGRErr */
11327 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11328 1 : resultobj = PyLong_FromLong( result );
11329 : }
11330 : }
11331 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; } }
11332 : return resultobj;
11333 : fail:
11334 : return NULL;
11335 : }
11336 :
11337 :
11338 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMollweide(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11339 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11340 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11341 0 : double arg2 ;
11342 0 : double arg3 ;
11343 0 : double arg4 ;
11344 0 : void *argp1 = 0 ;
11345 0 : int res1 = 0 ;
11346 0 : double val2 ;
11347 0 : int ecode2 = 0 ;
11348 0 : double val3 ;
11349 0 : int ecode3 = 0 ;
11350 0 : double val4 ;
11351 0 : int ecode4 = 0 ;
11352 0 : PyObject * obj0 = 0 ;
11353 0 : PyObject * obj1 = 0 ;
11354 0 : PyObject * obj2 = 0 ;
11355 0 : PyObject * obj3 = 0 ;
11356 0 : char * kwnames[] = {
11357 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
11358 : };
11359 0 : OGRErr result;
11360 :
11361 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetMollweide", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
11362 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11363 0 : if (!SWIG_IsOK(res1)) {
11364 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMollweide" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11365 : }
11366 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11367 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11368 0 : if (!SWIG_IsOK(ecode2)) {
11369 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMollweide" "', argument " "2"" of type '" "double""'");
11370 : }
11371 0 : arg2 = static_cast< double >(val2);
11372 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11373 0 : if (!SWIG_IsOK(ecode3)) {
11374 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMollweide" "', argument " "3"" of type '" "double""'");
11375 : }
11376 0 : arg3 = static_cast< double >(val3);
11377 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11378 0 : if (!SWIG_IsOK(ecode4)) {
11379 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMollweide" "', argument " "4"" of type '" "double""'");
11380 : }
11381 0 : arg4 = static_cast< double >(val4);
11382 0 : {
11383 0 : const int bLocalUseExceptions = GetUseExceptions();
11384 0 : if ( bLocalUseExceptions ) {
11385 0 : pushErrorHandler();
11386 : }
11387 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetMollweide(arg1,arg2,arg3,arg4);
11388 0 : if ( bLocalUseExceptions ) {
11389 0 : popErrorHandler();
11390 : }
11391 : #ifndef SED_HACKS
11392 : if ( bLocalUseExceptions ) {
11393 : CPLErr eclass = CPLGetLastErrorType();
11394 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11395 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11396 : }
11397 : }
11398 : #endif
11399 : }
11400 0 : {
11401 : /* %typemap(out) OGRErr */
11402 0 : if ( result != 0 && GetUseExceptions()) {
11403 0 : const char* pszMessage = CPLGetLastErrorMsg();
11404 0 : if( pszMessage[0] != '\0' )
11405 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11406 : else
11407 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11408 0 : SWIG_fail;
11409 : }
11410 : }
11411 0 : {
11412 : /* %typemap(ret) OGRErr */
11413 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11414 0 : resultobj = PyLong_FromLong( result );
11415 : }
11416 : }
11417 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; } }
11418 : return resultobj;
11419 : fail:
11420 : return NULL;
11421 : }
11422 :
11423 :
11424 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetNZMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11425 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11426 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11427 0 : double arg2 ;
11428 0 : double arg3 ;
11429 0 : double arg4 ;
11430 0 : double arg5 ;
11431 0 : void *argp1 = 0 ;
11432 0 : int res1 = 0 ;
11433 0 : double val2 ;
11434 0 : int ecode2 = 0 ;
11435 0 : double val3 ;
11436 0 : int ecode3 = 0 ;
11437 0 : double val4 ;
11438 0 : int ecode4 = 0 ;
11439 0 : double val5 ;
11440 0 : int ecode5 = 0 ;
11441 0 : PyObject * obj0 = 0 ;
11442 0 : PyObject * obj1 = 0 ;
11443 0 : PyObject * obj2 = 0 ;
11444 0 : PyObject * obj3 = 0 ;
11445 0 : PyObject * obj4 = 0 ;
11446 0 : char * kwnames[] = {
11447 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11448 : };
11449 0 : OGRErr result;
11450 :
11451 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetNZMG", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11452 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11453 0 : if (!SWIG_IsOK(res1)) {
11454 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetNZMG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11455 : }
11456 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11457 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11458 0 : if (!SWIG_IsOK(ecode2)) {
11459 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetNZMG" "', argument " "2"" of type '" "double""'");
11460 : }
11461 0 : arg2 = static_cast< double >(val2);
11462 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11463 0 : if (!SWIG_IsOK(ecode3)) {
11464 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetNZMG" "', argument " "3"" of type '" "double""'");
11465 : }
11466 0 : arg3 = static_cast< double >(val3);
11467 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11468 0 : if (!SWIG_IsOK(ecode4)) {
11469 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetNZMG" "', argument " "4"" of type '" "double""'");
11470 : }
11471 0 : arg4 = static_cast< double >(val4);
11472 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11473 0 : if (!SWIG_IsOK(ecode5)) {
11474 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetNZMG" "', argument " "5"" of type '" "double""'");
11475 : }
11476 0 : arg5 = static_cast< double >(val5);
11477 0 : {
11478 0 : const int bLocalUseExceptions = GetUseExceptions();
11479 0 : if ( bLocalUseExceptions ) {
11480 0 : pushErrorHandler();
11481 : }
11482 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetNZMG(arg1,arg2,arg3,arg4,arg5);
11483 0 : if ( bLocalUseExceptions ) {
11484 0 : popErrorHandler();
11485 : }
11486 : #ifndef SED_HACKS
11487 : if ( bLocalUseExceptions ) {
11488 : CPLErr eclass = CPLGetLastErrorType();
11489 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11490 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11491 : }
11492 : }
11493 : #endif
11494 : }
11495 0 : {
11496 : /* %typemap(out) OGRErr */
11497 0 : if ( result != 0 && GetUseExceptions()) {
11498 0 : const char* pszMessage = CPLGetLastErrorMsg();
11499 0 : if( pszMessage[0] != '\0' )
11500 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11501 : else
11502 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11503 0 : SWIG_fail;
11504 : }
11505 : }
11506 0 : {
11507 : /* %typemap(ret) OGRErr */
11508 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11509 0 : resultobj = PyLong_FromLong( result );
11510 : }
11511 : }
11512 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; } }
11513 : return resultobj;
11514 : fail:
11515 : return NULL;
11516 : }
11517 :
11518 :
11519 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetOS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11520 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11521 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11522 0 : double arg2 ;
11523 0 : double arg3 ;
11524 0 : double arg4 ;
11525 0 : double arg5 ;
11526 0 : double arg6 ;
11527 0 : void *argp1 = 0 ;
11528 0 : int res1 = 0 ;
11529 0 : double val2 ;
11530 0 : int ecode2 = 0 ;
11531 0 : double val3 ;
11532 0 : int ecode3 = 0 ;
11533 0 : double val4 ;
11534 0 : int ecode4 = 0 ;
11535 0 : double val5 ;
11536 0 : int ecode5 = 0 ;
11537 0 : double val6 ;
11538 0 : int ecode6 = 0 ;
11539 0 : PyObject * obj0 = 0 ;
11540 0 : PyObject * obj1 = 0 ;
11541 0 : PyObject * obj2 = 0 ;
11542 0 : PyObject * obj3 = 0 ;
11543 0 : PyObject * obj4 = 0 ;
11544 0 : PyObject * obj5 = 0 ;
11545 0 : char * kwnames[] = {
11546 : (char *)"self", (char *)"dfOriginLat", (char *)"dfCMeridian", (char *)"scale", (char *)"fe", (char *)"fn", NULL
11547 : };
11548 0 : OGRErr result;
11549 :
11550 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetOS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11551 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11552 0 : if (!SWIG_IsOK(res1)) {
11553 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetOS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11554 : }
11555 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11556 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11557 0 : if (!SWIG_IsOK(ecode2)) {
11558 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetOS" "', argument " "2"" of type '" "double""'");
11559 : }
11560 0 : arg2 = static_cast< double >(val2);
11561 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11562 0 : if (!SWIG_IsOK(ecode3)) {
11563 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetOS" "', argument " "3"" of type '" "double""'");
11564 : }
11565 0 : arg3 = static_cast< double >(val3);
11566 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11567 0 : if (!SWIG_IsOK(ecode4)) {
11568 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetOS" "', argument " "4"" of type '" "double""'");
11569 : }
11570 0 : arg4 = static_cast< double >(val4);
11571 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11572 0 : if (!SWIG_IsOK(ecode5)) {
11573 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetOS" "', argument " "5"" of type '" "double""'");
11574 : }
11575 0 : arg5 = static_cast< double >(val5);
11576 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11577 0 : if (!SWIG_IsOK(ecode6)) {
11578 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetOS" "', argument " "6"" of type '" "double""'");
11579 : }
11580 0 : arg6 = static_cast< double >(val6);
11581 0 : {
11582 0 : const int bLocalUseExceptions = GetUseExceptions();
11583 0 : if ( bLocalUseExceptions ) {
11584 0 : pushErrorHandler();
11585 : }
11586 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetOS(arg1,arg2,arg3,arg4,arg5,arg6);
11587 0 : if ( bLocalUseExceptions ) {
11588 0 : popErrorHandler();
11589 : }
11590 : #ifndef SED_HACKS
11591 : if ( bLocalUseExceptions ) {
11592 : CPLErr eclass = CPLGetLastErrorType();
11593 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11594 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11595 : }
11596 : }
11597 : #endif
11598 : }
11599 0 : {
11600 : /* %typemap(out) OGRErr */
11601 0 : if ( result != 0 && GetUseExceptions()) {
11602 0 : const char* pszMessage = CPLGetLastErrorMsg();
11603 0 : if( pszMessage[0] != '\0' )
11604 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11605 : else
11606 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11607 0 : SWIG_fail;
11608 : }
11609 : }
11610 0 : {
11611 : /* %typemap(ret) OGRErr */
11612 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11613 0 : resultobj = PyLong_FromLong( result );
11614 : }
11615 : }
11616 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; } }
11617 : return resultobj;
11618 : fail:
11619 : return NULL;
11620 : }
11621 :
11622 :
11623 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetOrthographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11624 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11625 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11626 1 : double arg2 ;
11627 1 : double arg3 ;
11628 1 : double arg4 ;
11629 1 : double arg5 ;
11630 1 : void *argp1 = 0 ;
11631 1 : int res1 = 0 ;
11632 1 : double val2 ;
11633 1 : int ecode2 = 0 ;
11634 1 : double val3 ;
11635 1 : int ecode3 = 0 ;
11636 1 : double val4 ;
11637 1 : int ecode4 = 0 ;
11638 1 : double val5 ;
11639 1 : int ecode5 = 0 ;
11640 1 : PyObject * obj0 = 0 ;
11641 1 : PyObject * obj1 = 0 ;
11642 1 : PyObject * obj2 = 0 ;
11643 1 : PyObject * obj3 = 0 ;
11644 1 : PyObject * obj4 = 0 ;
11645 1 : char * kwnames[] = {
11646 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11647 : };
11648 1 : OGRErr result;
11649 :
11650 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetOrthographic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11651 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11652 1 : if (!SWIG_IsOK(res1)) {
11653 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetOrthographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11654 : }
11655 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11656 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11657 1 : if (!SWIG_IsOK(ecode2)) {
11658 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetOrthographic" "', argument " "2"" of type '" "double""'");
11659 : }
11660 1 : arg2 = static_cast< double >(val2);
11661 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11662 1 : if (!SWIG_IsOK(ecode3)) {
11663 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetOrthographic" "', argument " "3"" of type '" "double""'");
11664 : }
11665 1 : arg3 = static_cast< double >(val3);
11666 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11667 1 : if (!SWIG_IsOK(ecode4)) {
11668 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetOrthographic" "', argument " "4"" of type '" "double""'");
11669 : }
11670 1 : arg4 = static_cast< double >(val4);
11671 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11672 1 : if (!SWIG_IsOK(ecode5)) {
11673 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetOrthographic" "', argument " "5"" of type '" "double""'");
11674 : }
11675 1 : arg5 = static_cast< double >(val5);
11676 1 : {
11677 1 : const int bLocalUseExceptions = GetUseExceptions();
11678 1 : if ( bLocalUseExceptions ) {
11679 1 : pushErrorHandler();
11680 : }
11681 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetOrthographic(arg1,arg2,arg3,arg4,arg5);
11682 1 : if ( bLocalUseExceptions ) {
11683 1 : popErrorHandler();
11684 : }
11685 : #ifndef SED_HACKS
11686 : if ( bLocalUseExceptions ) {
11687 : CPLErr eclass = CPLGetLastErrorType();
11688 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11689 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11690 : }
11691 : }
11692 : #endif
11693 : }
11694 1 : {
11695 : /* %typemap(out) OGRErr */
11696 1 : if ( result != 0 && GetUseExceptions()) {
11697 0 : const char* pszMessage = CPLGetLastErrorMsg();
11698 0 : if( pszMessage[0] != '\0' )
11699 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11700 : else
11701 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11702 0 : SWIG_fail;
11703 : }
11704 : }
11705 1 : {
11706 : /* %typemap(ret) OGRErr */
11707 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11708 1 : resultobj = PyLong_FromLong( result );
11709 : }
11710 : }
11711 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; } }
11712 : return resultobj;
11713 : fail:
11714 : return NULL;
11715 : }
11716 :
11717 :
11718 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetPolyconic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11719 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11720 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11721 0 : double arg2 ;
11722 0 : double arg3 ;
11723 0 : double arg4 ;
11724 0 : double arg5 ;
11725 0 : void *argp1 = 0 ;
11726 0 : int res1 = 0 ;
11727 0 : double val2 ;
11728 0 : int ecode2 = 0 ;
11729 0 : double val3 ;
11730 0 : int ecode3 = 0 ;
11731 0 : double val4 ;
11732 0 : int ecode4 = 0 ;
11733 0 : double val5 ;
11734 0 : int ecode5 = 0 ;
11735 0 : PyObject * obj0 = 0 ;
11736 0 : PyObject * obj1 = 0 ;
11737 0 : PyObject * obj2 = 0 ;
11738 0 : PyObject * obj3 = 0 ;
11739 0 : PyObject * obj4 = 0 ;
11740 0 : char * kwnames[] = {
11741 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11742 : };
11743 0 : OGRErr result;
11744 :
11745 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetPolyconic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11746 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11747 0 : if (!SWIG_IsOK(res1)) {
11748 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetPolyconic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11749 : }
11750 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11751 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11752 0 : if (!SWIG_IsOK(ecode2)) {
11753 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetPolyconic" "', argument " "2"" of type '" "double""'");
11754 : }
11755 0 : arg2 = static_cast< double >(val2);
11756 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11757 0 : if (!SWIG_IsOK(ecode3)) {
11758 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetPolyconic" "', argument " "3"" of type '" "double""'");
11759 : }
11760 0 : arg3 = static_cast< double >(val3);
11761 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11762 0 : if (!SWIG_IsOK(ecode4)) {
11763 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetPolyconic" "', argument " "4"" of type '" "double""'");
11764 : }
11765 0 : arg4 = static_cast< double >(val4);
11766 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11767 0 : if (!SWIG_IsOK(ecode5)) {
11768 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetPolyconic" "', argument " "5"" of type '" "double""'");
11769 : }
11770 0 : arg5 = static_cast< double >(val5);
11771 0 : {
11772 0 : const int bLocalUseExceptions = GetUseExceptions();
11773 0 : if ( bLocalUseExceptions ) {
11774 0 : pushErrorHandler();
11775 : }
11776 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetPolyconic(arg1,arg2,arg3,arg4,arg5);
11777 0 : if ( bLocalUseExceptions ) {
11778 0 : popErrorHandler();
11779 : }
11780 : #ifndef SED_HACKS
11781 : if ( bLocalUseExceptions ) {
11782 : CPLErr eclass = CPLGetLastErrorType();
11783 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11784 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11785 : }
11786 : }
11787 : #endif
11788 : }
11789 0 : {
11790 : /* %typemap(out) OGRErr */
11791 0 : if ( result != 0 && GetUseExceptions()) {
11792 0 : const char* pszMessage = CPLGetLastErrorMsg();
11793 0 : if( pszMessage[0] != '\0' )
11794 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11795 : else
11796 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11797 0 : SWIG_fail;
11798 : }
11799 : }
11800 0 : {
11801 : /* %typemap(ret) OGRErr */
11802 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11803 0 : resultobj = PyLong_FromLong( result );
11804 : }
11805 : }
11806 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; } }
11807 : return resultobj;
11808 : fail:
11809 : return NULL;
11810 : }
11811 :
11812 :
11813 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetPS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11814 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11815 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11816 1 : double arg2 ;
11817 1 : double arg3 ;
11818 1 : double arg4 ;
11819 1 : double arg5 ;
11820 1 : double arg6 ;
11821 1 : void *argp1 = 0 ;
11822 1 : int res1 = 0 ;
11823 1 : double val2 ;
11824 1 : int ecode2 = 0 ;
11825 1 : double val3 ;
11826 1 : int ecode3 = 0 ;
11827 1 : double val4 ;
11828 1 : int ecode4 = 0 ;
11829 1 : double val5 ;
11830 1 : int ecode5 = 0 ;
11831 1 : double val6 ;
11832 1 : int ecode6 = 0 ;
11833 1 : PyObject * obj0 = 0 ;
11834 1 : PyObject * obj1 = 0 ;
11835 1 : PyObject * obj2 = 0 ;
11836 1 : PyObject * obj3 = 0 ;
11837 1 : PyObject * obj4 = 0 ;
11838 1 : PyObject * obj5 = 0 ;
11839 1 : char * kwnames[] = {
11840 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
11841 : };
11842 1 : OGRErr result;
11843 :
11844 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetPS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11845 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11846 1 : if (!SWIG_IsOK(res1)) {
11847 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetPS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11848 : }
11849 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11850 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11851 1 : if (!SWIG_IsOK(ecode2)) {
11852 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetPS" "', argument " "2"" of type '" "double""'");
11853 : }
11854 1 : arg2 = static_cast< double >(val2);
11855 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11856 1 : if (!SWIG_IsOK(ecode3)) {
11857 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetPS" "', argument " "3"" of type '" "double""'");
11858 : }
11859 1 : arg3 = static_cast< double >(val3);
11860 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11861 1 : if (!SWIG_IsOK(ecode4)) {
11862 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetPS" "', argument " "4"" of type '" "double""'");
11863 : }
11864 1 : arg4 = static_cast< double >(val4);
11865 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11866 1 : if (!SWIG_IsOK(ecode5)) {
11867 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetPS" "', argument " "5"" of type '" "double""'");
11868 : }
11869 1 : arg5 = static_cast< double >(val5);
11870 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11871 1 : if (!SWIG_IsOK(ecode6)) {
11872 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetPS" "', argument " "6"" of type '" "double""'");
11873 : }
11874 1 : arg6 = static_cast< double >(val6);
11875 1 : {
11876 1 : const int bLocalUseExceptions = GetUseExceptions();
11877 1 : if ( bLocalUseExceptions ) {
11878 1 : pushErrorHandler();
11879 : }
11880 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetPS(arg1,arg2,arg3,arg4,arg5,arg6);
11881 1 : if ( bLocalUseExceptions ) {
11882 1 : popErrorHandler();
11883 : }
11884 : #ifndef SED_HACKS
11885 : if ( bLocalUseExceptions ) {
11886 : CPLErr eclass = CPLGetLastErrorType();
11887 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11888 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11889 : }
11890 : }
11891 : #endif
11892 : }
11893 1 : {
11894 : /* %typemap(out) OGRErr */
11895 1 : if ( result != 0 && GetUseExceptions()) {
11896 0 : const char* pszMessage = CPLGetLastErrorMsg();
11897 0 : if( pszMessage[0] != '\0' )
11898 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11899 : else
11900 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11901 0 : SWIG_fail;
11902 : }
11903 : }
11904 1 : {
11905 : /* %typemap(ret) OGRErr */
11906 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11907 1 : resultobj = PyLong_FromLong( result );
11908 : }
11909 : }
11910 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; } }
11911 : return resultobj;
11912 : fail:
11913 : return NULL;
11914 : }
11915 :
11916 :
11917 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetRobinson(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11918 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11919 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11920 0 : double arg2 ;
11921 0 : double arg3 ;
11922 0 : double arg4 ;
11923 0 : void *argp1 = 0 ;
11924 0 : int res1 = 0 ;
11925 0 : double val2 ;
11926 0 : int ecode2 = 0 ;
11927 0 : double val3 ;
11928 0 : int ecode3 = 0 ;
11929 0 : double val4 ;
11930 0 : int ecode4 = 0 ;
11931 0 : PyObject * obj0 = 0 ;
11932 0 : PyObject * obj1 = 0 ;
11933 0 : PyObject * obj2 = 0 ;
11934 0 : PyObject * obj3 = 0 ;
11935 0 : char * kwnames[] = {
11936 : (char *)"self", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11937 : };
11938 0 : OGRErr result;
11939 :
11940 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetRobinson", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
11941 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11942 0 : if (!SWIG_IsOK(res1)) {
11943 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetRobinson" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11944 : }
11945 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11946 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11947 0 : if (!SWIG_IsOK(ecode2)) {
11948 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetRobinson" "', argument " "2"" of type '" "double""'");
11949 : }
11950 0 : arg2 = static_cast< double >(val2);
11951 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11952 0 : if (!SWIG_IsOK(ecode3)) {
11953 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetRobinson" "', argument " "3"" of type '" "double""'");
11954 : }
11955 0 : arg3 = static_cast< double >(val3);
11956 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11957 0 : if (!SWIG_IsOK(ecode4)) {
11958 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetRobinson" "', argument " "4"" of type '" "double""'");
11959 : }
11960 0 : arg4 = static_cast< double >(val4);
11961 0 : {
11962 0 : const int bLocalUseExceptions = GetUseExceptions();
11963 0 : if ( bLocalUseExceptions ) {
11964 0 : pushErrorHandler();
11965 : }
11966 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetRobinson(arg1,arg2,arg3,arg4);
11967 0 : if ( bLocalUseExceptions ) {
11968 0 : popErrorHandler();
11969 : }
11970 : #ifndef SED_HACKS
11971 : if ( bLocalUseExceptions ) {
11972 : CPLErr eclass = CPLGetLastErrorType();
11973 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11974 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11975 : }
11976 : }
11977 : #endif
11978 : }
11979 0 : {
11980 : /* %typemap(out) OGRErr */
11981 0 : if ( result != 0 && GetUseExceptions()) {
11982 0 : const char* pszMessage = CPLGetLastErrorMsg();
11983 0 : if( pszMessage[0] != '\0' )
11984 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11985 : else
11986 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11987 0 : SWIG_fail;
11988 : }
11989 : }
11990 0 : {
11991 : /* %typemap(ret) OGRErr */
11992 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11993 0 : resultobj = PyLong_FromLong( result );
11994 : }
11995 : }
11996 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; } }
11997 : return resultobj;
11998 : fail:
11999 : return NULL;
12000 : }
12001 :
12002 :
12003 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetSinusoidal(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12004 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12005 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12006 1 : double arg2 ;
12007 1 : double arg3 ;
12008 1 : double arg4 ;
12009 1 : void *argp1 = 0 ;
12010 1 : int res1 = 0 ;
12011 1 : double val2 ;
12012 1 : int ecode2 = 0 ;
12013 1 : double val3 ;
12014 1 : int ecode3 = 0 ;
12015 1 : double val4 ;
12016 1 : int ecode4 = 0 ;
12017 1 : PyObject * obj0 = 0 ;
12018 1 : PyObject * obj1 = 0 ;
12019 1 : PyObject * obj2 = 0 ;
12020 1 : PyObject * obj3 = 0 ;
12021 1 : char * kwnames[] = {
12022 : (char *)"self", (char *)"clong", (char *)"fe", (char *)"fn", NULL
12023 : };
12024 1 : OGRErr result;
12025 :
12026 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetSinusoidal", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
12027 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12028 1 : if (!SWIG_IsOK(res1)) {
12029 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetSinusoidal" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12030 : }
12031 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12032 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12033 1 : if (!SWIG_IsOK(ecode2)) {
12034 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetSinusoidal" "', argument " "2"" of type '" "double""'");
12035 : }
12036 1 : arg2 = static_cast< double >(val2);
12037 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12038 1 : if (!SWIG_IsOK(ecode3)) {
12039 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetSinusoidal" "', argument " "3"" of type '" "double""'");
12040 : }
12041 1 : arg3 = static_cast< double >(val3);
12042 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12043 1 : if (!SWIG_IsOK(ecode4)) {
12044 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetSinusoidal" "', argument " "4"" of type '" "double""'");
12045 : }
12046 1 : arg4 = static_cast< double >(val4);
12047 1 : {
12048 1 : const int bLocalUseExceptions = GetUseExceptions();
12049 1 : if ( bLocalUseExceptions ) {
12050 1 : pushErrorHandler();
12051 : }
12052 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetSinusoidal(arg1,arg2,arg3,arg4);
12053 1 : if ( bLocalUseExceptions ) {
12054 1 : popErrorHandler();
12055 : }
12056 : #ifndef SED_HACKS
12057 : if ( bLocalUseExceptions ) {
12058 : CPLErr eclass = CPLGetLastErrorType();
12059 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12060 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12061 : }
12062 : }
12063 : #endif
12064 : }
12065 1 : {
12066 : /* %typemap(out) OGRErr */
12067 1 : if ( result != 0 && GetUseExceptions()) {
12068 0 : const char* pszMessage = CPLGetLastErrorMsg();
12069 0 : if( pszMessage[0] != '\0' )
12070 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12071 : else
12072 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12073 0 : SWIG_fail;
12074 : }
12075 : }
12076 1 : {
12077 : /* %typemap(ret) OGRErr */
12078 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12079 1 : resultobj = PyLong_FromLong( result );
12080 : }
12081 : }
12082 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; } }
12083 : return resultobj;
12084 : fail:
12085 : return NULL;
12086 : }
12087 :
12088 :
12089 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetStereographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12090 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12091 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12092 0 : double arg2 ;
12093 0 : double arg3 ;
12094 0 : double arg4 ;
12095 0 : double arg5 ;
12096 0 : double arg6 ;
12097 0 : void *argp1 = 0 ;
12098 0 : int res1 = 0 ;
12099 0 : double val2 ;
12100 0 : int ecode2 = 0 ;
12101 0 : double val3 ;
12102 0 : int ecode3 = 0 ;
12103 0 : double val4 ;
12104 0 : int ecode4 = 0 ;
12105 0 : double val5 ;
12106 0 : int ecode5 = 0 ;
12107 0 : double val6 ;
12108 0 : int ecode6 = 0 ;
12109 0 : PyObject * obj0 = 0 ;
12110 0 : PyObject * obj1 = 0 ;
12111 0 : PyObject * obj2 = 0 ;
12112 0 : PyObject * obj3 = 0 ;
12113 0 : PyObject * obj4 = 0 ;
12114 0 : PyObject * obj5 = 0 ;
12115 0 : char * kwnames[] = {
12116 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12117 : };
12118 0 : OGRErr result;
12119 :
12120 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetStereographic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12121 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12122 0 : if (!SWIG_IsOK(res1)) {
12123 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetStereographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12124 : }
12125 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12126 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12127 0 : if (!SWIG_IsOK(ecode2)) {
12128 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetStereographic" "', argument " "2"" of type '" "double""'");
12129 : }
12130 0 : arg2 = static_cast< double >(val2);
12131 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12132 0 : if (!SWIG_IsOK(ecode3)) {
12133 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetStereographic" "', argument " "3"" of type '" "double""'");
12134 : }
12135 0 : arg3 = static_cast< double >(val3);
12136 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12137 0 : if (!SWIG_IsOK(ecode4)) {
12138 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetStereographic" "', argument " "4"" of type '" "double""'");
12139 : }
12140 0 : arg4 = static_cast< double >(val4);
12141 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12142 0 : if (!SWIG_IsOK(ecode5)) {
12143 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetStereographic" "', argument " "5"" of type '" "double""'");
12144 : }
12145 0 : arg5 = static_cast< double >(val5);
12146 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12147 0 : if (!SWIG_IsOK(ecode6)) {
12148 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetStereographic" "', argument " "6"" of type '" "double""'");
12149 : }
12150 0 : arg6 = static_cast< double >(val6);
12151 0 : {
12152 0 : const int bLocalUseExceptions = GetUseExceptions();
12153 0 : if ( bLocalUseExceptions ) {
12154 0 : pushErrorHandler();
12155 : }
12156 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetStereographic(arg1,arg2,arg3,arg4,arg5,arg6);
12157 0 : if ( bLocalUseExceptions ) {
12158 0 : popErrorHandler();
12159 : }
12160 : #ifndef SED_HACKS
12161 : if ( bLocalUseExceptions ) {
12162 : CPLErr eclass = CPLGetLastErrorType();
12163 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12164 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12165 : }
12166 : }
12167 : #endif
12168 : }
12169 0 : {
12170 : /* %typemap(out) OGRErr */
12171 0 : if ( result != 0 && GetUseExceptions()) {
12172 0 : const char* pszMessage = CPLGetLastErrorMsg();
12173 0 : if( pszMessage[0] != '\0' )
12174 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12175 : else
12176 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12177 0 : SWIG_fail;
12178 : }
12179 : }
12180 0 : {
12181 : /* %typemap(ret) OGRErr */
12182 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12183 0 : resultobj = PyLong_FromLong( result );
12184 : }
12185 : }
12186 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; } }
12187 : return resultobj;
12188 : fail:
12189 : return NULL;
12190 : }
12191 :
12192 :
12193 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetSOC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12194 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12195 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12196 0 : double arg2 ;
12197 0 : double arg3 ;
12198 0 : double arg4 ;
12199 0 : double arg5 ;
12200 0 : void *argp1 = 0 ;
12201 0 : int res1 = 0 ;
12202 0 : double val2 ;
12203 0 : int ecode2 = 0 ;
12204 0 : double val3 ;
12205 0 : int ecode3 = 0 ;
12206 0 : double val4 ;
12207 0 : int ecode4 = 0 ;
12208 0 : double val5 ;
12209 0 : int ecode5 = 0 ;
12210 0 : PyObject * obj0 = 0 ;
12211 0 : PyObject * obj1 = 0 ;
12212 0 : PyObject * obj2 = 0 ;
12213 0 : PyObject * obj3 = 0 ;
12214 0 : PyObject * obj4 = 0 ;
12215 0 : char * kwnames[] = {
12216 : (char *)"self", (char *)"latitudeoforigin", (char *)"cm", (char *)"fe", (char *)"fn", NULL
12217 : };
12218 0 : OGRErr result;
12219 :
12220 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetSOC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
12221 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12222 0 : if (!SWIG_IsOK(res1)) {
12223 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetSOC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12224 : }
12225 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12226 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12227 0 : if (!SWIG_IsOK(ecode2)) {
12228 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetSOC" "', argument " "2"" of type '" "double""'");
12229 : }
12230 0 : arg2 = static_cast< double >(val2);
12231 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12232 0 : if (!SWIG_IsOK(ecode3)) {
12233 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetSOC" "', argument " "3"" of type '" "double""'");
12234 : }
12235 0 : arg3 = static_cast< double >(val3);
12236 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12237 0 : if (!SWIG_IsOK(ecode4)) {
12238 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetSOC" "', argument " "4"" of type '" "double""'");
12239 : }
12240 0 : arg4 = static_cast< double >(val4);
12241 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12242 0 : if (!SWIG_IsOK(ecode5)) {
12243 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetSOC" "', argument " "5"" of type '" "double""'");
12244 : }
12245 0 : arg5 = static_cast< double >(val5);
12246 0 : {
12247 0 : const int bLocalUseExceptions = GetUseExceptions();
12248 0 : if ( bLocalUseExceptions ) {
12249 0 : pushErrorHandler();
12250 : }
12251 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetSOC(arg1,arg2,arg3,arg4,arg5);
12252 0 : if ( bLocalUseExceptions ) {
12253 0 : popErrorHandler();
12254 : }
12255 : #ifndef SED_HACKS
12256 : if ( bLocalUseExceptions ) {
12257 : CPLErr eclass = CPLGetLastErrorType();
12258 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12259 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12260 : }
12261 : }
12262 : #endif
12263 : }
12264 0 : {
12265 : /* %typemap(out) OGRErr */
12266 0 : if ( result != 0 && GetUseExceptions()) {
12267 0 : const char* pszMessage = CPLGetLastErrorMsg();
12268 0 : if( pszMessage[0] != '\0' )
12269 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12270 : else
12271 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12272 0 : SWIG_fail;
12273 : }
12274 : }
12275 0 : {
12276 : /* %typemap(ret) OGRErr */
12277 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12278 0 : resultobj = PyLong_FromLong( result );
12279 : }
12280 : }
12281 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; } }
12282 : return resultobj;
12283 : fail:
12284 : return NULL;
12285 : }
12286 :
12287 :
12288 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12289 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12290 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12291 1 : double arg2 ;
12292 1 : double arg3 ;
12293 1 : double arg4 ;
12294 1 : double arg5 ;
12295 1 : double arg6 ;
12296 1 : void *argp1 = 0 ;
12297 1 : int res1 = 0 ;
12298 1 : double val2 ;
12299 1 : int ecode2 = 0 ;
12300 1 : double val3 ;
12301 1 : int ecode3 = 0 ;
12302 1 : double val4 ;
12303 1 : int ecode4 = 0 ;
12304 1 : double val5 ;
12305 1 : int ecode5 = 0 ;
12306 1 : double val6 ;
12307 1 : int ecode6 = 0 ;
12308 1 : PyObject * obj0 = 0 ;
12309 1 : PyObject * obj1 = 0 ;
12310 1 : PyObject * obj2 = 0 ;
12311 1 : PyObject * obj3 = 0 ;
12312 1 : PyObject * obj4 = 0 ;
12313 1 : PyObject * obj5 = 0 ;
12314 1 : char * kwnames[] = {
12315 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12316 : };
12317 1 : OGRErr result;
12318 :
12319 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetTM", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12320 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12321 1 : if (!SWIG_IsOK(res1)) {
12322 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12323 : }
12324 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12325 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12326 1 : if (!SWIG_IsOK(ecode2)) {
12327 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTM" "', argument " "2"" of type '" "double""'");
12328 : }
12329 1 : arg2 = static_cast< double >(val2);
12330 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12331 1 : if (!SWIG_IsOK(ecode3)) {
12332 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTM" "', argument " "3"" of type '" "double""'");
12333 : }
12334 1 : arg3 = static_cast< double >(val3);
12335 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12336 1 : if (!SWIG_IsOK(ecode4)) {
12337 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTM" "', argument " "4"" of type '" "double""'");
12338 : }
12339 1 : arg4 = static_cast< double >(val4);
12340 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12341 1 : if (!SWIG_IsOK(ecode5)) {
12342 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTM" "', argument " "5"" of type '" "double""'");
12343 : }
12344 1 : arg5 = static_cast< double >(val5);
12345 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12346 1 : if (!SWIG_IsOK(ecode6)) {
12347 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTM" "', argument " "6"" of type '" "double""'");
12348 : }
12349 1 : arg6 = static_cast< double >(val6);
12350 1 : {
12351 1 : const int bLocalUseExceptions = GetUseExceptions();
12352 1 : if ( bLocalUseExceptions ) {
12353 1 : pushErrorHandler();
12354 : }
12355 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetTM(arg1,arg2,arg3,arg4,arg5,arg6);
12356 1 : if ( bLocalUseExceptions ) {
12357 1 : popErrorHandler();
12358 : }
12359 : #ifndef SED_HACKS
12360 : if ( bLocalUseExceptions ) {
12361 : CPLErr eclass = CPLGetLastErrorType();
12362 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12363 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12364 : }
12365 : }
12366 : #endif
12367 : }
12368 1 : {
12369 : /* %typemap(out) OGRErr */
12370 1 : if ( result != 0 && GetUseExceptions()) {
12371 0 : const char* pszMessage = CPLGetLastErrorMsg();
12372 0 : if( pszMessage[0] != '\0' )
12373 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12374 : else
12375 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12376 0 : SWIG_fail;
12377 : }
12378 : }
12379 1 : {
12380 : /* %typemap(ret) OGRErr */
12381 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12382 1 : resultobj = PyLong_FromLong( result );
12383 : }
12384 : }
12385 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; } }
12386 : return resultobj;
12387 : fail:
12388 : return NULL;
12389 : }
12390 :
12391 :
12392 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMVariant(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12393 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12394 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12395 0 : char *arg2 = (char *) 0 ;
12396 0 : double arg3 ;
12397 0 : double arg4 ;
12398 0 : double arg5 ;
12399 0 : double arg6 ;
12400 0 : double arg7 ;
12401 0 : void *argp1 = 0 ;
12402 0 : int res1 = 0 ;
12403 0 : int res2 ;
12404 0 : char *buf2 = 0 ;
12405 0 : int alloc2 = 0 ;
12406 0 : double val3 ;
12407 0 : int ecode3 = 0 ;
12408 0 : double val4 ;
12409 0 : int ecode4 = 0 ;
12410 0 : double val5 ;
12411 0 : int ecode5 = 0 ;
12412 0 : double val6 ;
12413 0 : int ecode6 = 0 ;
12414 0 : double val7 ;
12415 0 : int ecode7 = 0 ;
12416 0 : PyObject * obj0 = 0 ;
12417 0 : PyObject * obj1 = 0 ;
12418 0 : PyObject * obj2 = 0 ;
12419 0 : PyObject * obj3 = 0 ;
12420 0 : PyObject * obj4 = 0 ;
12421 0 : PyObject * obj5 = 0 ;
12422 0 : PyObject * obj6 = 0 ;
12423 0 : char * kwnames[] = {
12424 : (char *)"self", (char *)"pszVariantName", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12425 : };
12426 0 : OGRErr result;
12427 :
12428 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetTMVariant", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
12429 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12430 0 : if (!SWIG_IsOK(res1)) {
12431 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMVariant" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12432 : }
12433 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12434 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
12435 0 : if (!SWIG_IsOK(res2)) {
12436 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetTMVariant" "', argument " "2"" of type '" "char const *""'");
12437 : }
12438 0 : arg2 = reinterpret_cast< char * >(buf2);
12439 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12440 0 : if (!SWIG_IsOK(ecode3)) {
12441 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMVariant" "', argument " "3"" of type '" "double""'");
12442 : }
12443 0 : arg3 = static_cast< double >(val3);
12444 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12445 0 : if (!SWIG_IsOK(ecode4)) {
12446 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMVariant" "', argument " "4"" of type '" "double""'");
12447 : }
12448 0 : arg4 = static_cast< double >(val4);
12449 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12450 0 : if (!SWIG_IsOK(ecode5)) {
12451 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMVariant" "', argument " "5"" of type '" "double""'");
12452 : }
12453 0 : arg5 = static_cast< double >(val5);
12454 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12455 0 : if (!SWIG_IsOK(ecode6)) {
12456 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTMVariant" "', argument " "6"" of type '" "double""'");
12457 : }
12458 0 : arg6 = static_cast< double >(val6);
12459 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
12460 0 : if (!SWIG_IsOK(ecode7)) {
12461 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetTMVariant" "', argument " "7"" of type '" "double""'");
12462 : }
12463 0 : arg7 = static_cast< double >(val7);
12464 0 : {
12465 0 : const int bLocalUseExceptions = GetUseExceptions();
12466 0 : if ( bLocalUseExceptions ) {
12467 0 : pushErrorHandler();
12468 : }
12469 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMVariant(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
12470 0 : if ( bLocalUseExceptions ) {
12471 0 : popErrorHandler();
12472 : }
12473 : #ifndef SED_HACKS
12474 : if ( bLocalUseExceptions ) {
12475 : CPLErr eclass = CPLGetLastErrorType();
12476 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12477 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12478 : }
12479 : }
12480 : #endif
12481 : }
12482 0 : {
12483 : /* %typemap(out) OGRErr */
12484 0 : if ( result != 0 && GetUseExceptions()) {
12485 0 : const char* pszMessage = CPLGetLastErrorMsg();
12486 0 : if( pszMessage[0] != '\0' )
12487 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12488 : else
12489 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12490 0 : SWIG_fail;
12491 : }
12492 : }
12493 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12494 0 : {
12495 : /* %typemap(ret) OGRErr */
12496 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12497 0 : resultobj = PyLong_FromLong( result );
12498 : }
12499 : }
12500 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; } }
12501 : return resultobj;
12502 0 : fail:
12503 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12504 : return NULL;
12505 : }
12506 :
12507 :
12508 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12509 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12510 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12511 0 : double arg2 ;
12512 0 : double arg3 ;
12513 0 : double arg4 ;
12514 0 : double arg5 ;
12515 0 : void *argp1 = 0 ;
12516 0 : int res1 = 0 ;
12517 0 : double val2 ;
12518 0 : int ecode2 = 0 ;
12519 0 : double val3 ;
12520 0 : int ecode3 = 0 ;
12521 0 : double val4 ;
12522 0 : int ecode4 = 0 ;
12523 0 : double val5 ;
12524 0 : int ecode5 = 0 ;
12525 0 : PyObject * obj0 = 0 ;
12526 0 : PyObject * obj1 = 0 ;
12527 0 : PyObject * obj2 = 0 ;
12528 0 : PyObject * obj3 = 0 ;
12529 0 : PyObject * obj4 = 0 ;
12530 0 : char * kwnames[] = {
12531 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
12532 : };
12533 0 : OGRErr result;
12534 :
12535 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetTMG", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
12536 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12537 0 : if (!SWIG_IsOK(res1)) {
12538 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12539 : }
12540 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12541 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12542 0 : if (!SWIG_IsOK(ecode2)) {
12543 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTMG" "', argument " "2"" of type '" "double""'");
12544 : }
12545 0 : arg2 = static_cast< double >(val2);
12546 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12547 0 : if (!SWIG_IsOK(ecode3)) {
12548 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMG" "', argument " "3"" of type '" "double""'");
12549 : }
12550 0 : arg3 = static_cast< double >(val3);
12551 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12552 0 : if (!SWIG_IsOK(ecode4)) {
12553 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMG" "', argument " "4"" of type '" "double""'");
12554 : }
12555 0 : arg4 = static_cast< double >(val4);
12556 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12557 0 : if (!SWIG_IsOK(ecode5)) {
12558 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMG" "', argument " "5"" of type '" "double""'");
12559 : }
12560 0 : arg5 = static_cast< double >(val5);
12561 0 : {
12562 0 : const int bLocalUseExceptions = GetUseExceptions();
12563 0 : if ( bLocalUseExceptions ) {
12564 0 : pushErrorHandler();
12565 : }
12566 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMG(arg1,arg2,arg3,arg4,arg5);
12567 0 : if ( bLocalUseExceptions ) {
12568 0 : popErrorHandler();
12569 : }
12570 : #ifndef SED_HACKS
12571 : if ( bLocalUseExceptions ) {
12572 : CPLErr eclass = CPLGetLastErrorType();
12573 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12574 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12575 : }
12576 : }
12577 : #endif
12578 : }
12579 0 : {
12580 : /* %typemap(out) OGRErr */
12581 0 : if ( result != 0 && GetUseExceptions()) {
12582 0 : const char* pszMessage = CPLGetLastErrorMsg();
12583 0 : if( pszMessage[0] != '\0' )
12584 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12585 : else
12586 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12587 0 : SWIG_fail;
12588 : }
12589 : }
12590 0 : {
12591 : /* %typemap(ret) OGRErr */
12592 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12593 0 : resultobj = PyLong_FromLong( result );
12594 : }
12595 : }
12596 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; } }
12597 : return resultobj;
12598 : fail:
12599 : return NULL;
12600 : }
12601 :
12602 :
12603 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMSO(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12604 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12605 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12606 0 : double arg2 ;
12607 0 : double arg3 ;
12608 0 : double arg4 ;
12609 0 : double arg5 ;
12610 0 : double arg6 ;
12611 0 : void *argp1 = 0 ;
12612 0 : int res1 = 0 ;
12613 0 : double val2 ;
12614 0 : int ecode2 = 0 ;
12615 0 : double val3 ;
12616 0 : int ecode3 = 0 ;
12617 0 : double val4 ;
12618 0 : int ecode4 = 0 ;
12619 0 : double val5 ;
12620 0 : int ecode5 = 0 ;
12621 0 : double val6 ;
12622 0 : int ecode6 = 0 ;
12623 0 : PyObject * obj0 = 0 ;
12624 0 : PyObject * obj1 = 0 ;
12625 0 : PyObject * obj2 = 0 ;
12626 0 : PyObject * obj3 = 0 ;
12627 0 : PyObject * obj4 = 0 ;
12628 0 : PyObject * obj5 = 0 ;
12629 0 : char * kwnames[] = {
12630 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12631 : };
12632 0 : OGRErr result;
12633 :
12634 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetTMSO", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12635 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12636 0 : if (!SWIG_IsOK(res1)) {
12637 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMSO" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12638 : }
12639 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12640 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12641 0 : if (!SWIG_IsOK(ecode2)) {
12642 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTMSO" "', argument " "2"" of type '" "double""'");
12643 : }
12644 0 : arg2 = static_cast< double >(val2);
12645 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12646 0 : if (!SWIG_IsOK(ecode3)) {
12647 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMSO" "', argument " "3"" of type '" "double""'");
12648 : }
12649 0 : arg3 = static_cast< double >(val3);
12650 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12651 0 : if (!SWIG_IsOK(ecode4)) {
12652 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMSO" "', argument " "4"" of type '" "double""'");
12653 : }
12654 0 : arg4 = static_cast< double >(val4);
12655 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12656 0 : if (!SWIG_IsOK(ecode5)) {
12657 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMSO" "', argument " "5"" of type '" "double""'");
12658 : }
12659 0 : arg5 = static_cast< double >(val5);
12660 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12661 0 : if (!SWIG_IsOK(ecode6)) {
12662 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTMSO" "', argument " "6"" of type '" "double""'");
12663 : }
12664 0 : arg6 = static_cast< double >(val6);
12665 0 : {
12666 0 : const int bLocalUseExceptions = GetUseExceptions();
12667 0 : if ( bLocalUseExceptions ) {
12668 0 : pushErrorHandler();
12669 : }
12670 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMSO(arg1,arg2,arg3,arg4,arg5,arg6);
12671 0 : if ( bLocalUseExceptions ) {
12672 0 : popErrorHandler();
12673 : }
12674 : #ifndef SED_HACKS
12675 : if ( bLocalUseExceptions ) {
12676 : CPLErr eclass = CPLGetLastErrorType();
12677 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12678 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12679 : }
12680 : }
12681 : #endif
12682 : }
12683 0 : {
12684 : /* %typemap(out) OGRErr */
12685 0 : if ( result != 0 && GetUseExceptions()) {
12686 0 : const char* pszMessage = CPLGetLastErrorMsg();
12687 0 : if( pszMessage[0] != '\0' )
12688 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12689 : else
12690 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12691 0 : SWIG_fail;
12692 : }
12693 : }
12694 0 : {
12695 : /* %typemap(ret) OGRErr */
12696 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12697 0 : resultobj = PyLong_FromLong( result );
12698 : }
12699 : }
12700 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; } }
12701 : return resultobj;
12702 : fail:
12703 : return NULL;
12704 : }
12705 :
12706 :
12707 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVDG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12708 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12709 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12710 0 : double arg2 ;
12711 0 : double arg3 ;
12712 0 : double arg4 ;
12713 0 : void *argp1 = 0 ;
12714 0 : int res1 = 0 ;
12715 0 : double val2 ;
12716 0 : int ecode2 = 0 ;
12717 0 : double val3 ;
12718 0 : int ecode3 = 0 ;
12719 0 : double val4 ;
12720 0 : int ecode4 = 0 ;
12721 0 : PyObject * obj0 = 0 ;
12722 0 : PyObject * obj1 = 0 ;
12723 0 : PyObject * obj2 = 0 ;
12724 0 : PyObject * obj3 = 0 ;
12725 0 : char * kwnames[] = {
12726 : (char *)"self", (char *)"clong", (char *)"fe", (char *)"fn", NULL
12727 : };
12728 0 : OGRErr result;
12729 :
12730 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetVDG", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
12731 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12732 0 : if (!SWIG_IsOK(res1)) {
12733 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVDG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12734 : }
12735 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12736 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12737 0 : if (!SWIG_IsOK(ecode2)) {
12738 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetVDG" "', argument " "2"" of type '" "double""'");
12739 : }
12740 0 : arg2 = static_cast< double >(val2);
12741 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12742 0 : if (!SWIG_IsOK(ecode3)) {
12743 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetVDG" "', argument " "3"" of type '" "double""'");
12744 : }
12745 0 : arg3 = static_cast< double >(val3);
12746 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12747 0 : if (!SWIG_IsOK(ecode4)) {
12748 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVDG" "', argument " "4"" of type '" "double""'");
12749 : }
12750 0 : arg4 = static_cast< double >(val4);
12751 0 : {
12752 0 : const int bLocalUseExceptions = GetUseExceptions();
12753 0 : if ( bLocalUseExceptions ) {
12754 0 : pushErrorHandler();
12755 : }
12756 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetVDG(arg1,arg2,arg3,arg4);
12757 0 : if ( bLocalUseExceptions ) {
12758 0 : popErrorHandler();
12759 : }
12760 : #ifndef SED_HACKS
12761 : if ( bLocalUseExceptions ) {
12762 : CPLErr eclass = CPLGetLastErrorType();
12763 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12764 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12765 : }
12766 : }
12767 : #endif
12768 : }
12769 0 : {
12770 : /* %typemap(out) OGRErr */
12771 0 : if ( result != 0 && GetUseExceptions()) {
12772 0 : const char* pszMessage = CPLGetLastErrorMsg();
12773 0 : if( pszMessage[0] != '\0' )
12774 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12775 : else
12776 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12777 0 : SWIG_fail;
12778 : }
12779 : }
12780 0 : {
12781 : /* %typemap(ret) OGRErr */
12782 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12783 0 : resultobj = PyLong_FromLong( result );
12784 : }
12785 : }
12786 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; } }
12787 : return resultobj;
12788 : fail:
12789 : return NULL;
12790 : }
12791 :
12792 :
12793 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVerticalPerspective(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12794 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12795 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12796 1 : double arg2 ;
12797 1 : double arg3 ;
12798 1 : double arg4 ;
12799 1 : double arg5 ;
12800 1 : double arg6 ;
12801 1 : double arg7 ;
12802 1 : void *argp1 = 0 ;
12803 1 : int res1 = 0 ;
12804 1 : double val2 ;
12805 1 : int ecode2 = 0 ;
12806 1 : double val3 ;
12807 1 : int ecode3 = 0 ;
12808 1 : double val4 ;
12809 1 : int ecode4 = 0 ;
12810 1 : double val5 ;
12811 1 : int ecode5 = 0 ;
12812 1 : double val6 ;
12813 1 : int ecode6 = 0 ;
12814 1 : double val7 ;
12815 1 : int ecode7 = 0 ;
12816 1 : PyObject * obj0 = 0 ;
12817 1 : PyObject * obj1 = 0 ;
12818 1 : PyObject * obj2 = 0 ;
12819 1 : PyObject * obj3 = 0 ;
12820 1 : PyObject * obj4 = 0 ;
12821 1 : PyObject * obj5 = 0 ;
12822 1 : PyObject * obj6 = 0 ;
12823 1 : char * kwnames[] = {
12824 : (char *)"self", (char *)"topoOriginLat", (char *)"topoOriginLon", (char *)"topoOriginHeight", (char *)"viewPointHeight", (char *)"fe", (char *)"fn", NULL
12825 : };
12826 1 : OGRErr result;
12827 :
12828 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetVerticalPerspective", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
12829 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12830 1 : if (!SWIG_IsOK(res1)) {
12831 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12832 : }
12833 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12834 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12835 1 : if (!SWIG_IsOK(ecode2)) {
12836 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "2"" of type '" "double""'");
12837 : }
12838 1 : arg2 = static_cast< double >(val2);
12839 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12840 1 : if (!SWIG_IsOK(ecode3)) {
12841 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "3"" of type '" "double""'");
12842 : }
12843 1 : arg3 = static_cast< double >(val3);
12844 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12845 1 : if (!SWIG_IsOK(ecode4)) {
12846 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "4"" of type '" "double""'");
12847 : }
12848 1 : arg4 = static_cast< double >(val4);
12849 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12850 1 : if (!SWIG_IsOK(ecode5)) {
12851 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "5"" of type '" "double""'");
12852 : }
12853 1 : arg5 = static_cast< double >(val5);
12854 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12855 1 : if (!SWIG_IsOK(ecode6)) {
12856 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "6"" of type '" "double""'");
12857 : }
12858 1 : arg6 = static_cast< double >(val6);
12859 1 : ecode7 = SWIG_AsVal_double(obj6, &val7);
12860 1 : if (!SWIG_IsOK(ecode7)) {
12861 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "7"" of type '" "double""'");
12862 : }
12863 1 : arg7 = static_cast< double >(val7);
12864 1 : {
12865 1 : const int bLocalUseExceptions = GetUseExceptions();
12866 1 : if ( bLocalUseExceptions ) {
12867 1 : pushErrorHandler();
12868 : }
12869 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetVerticalPerspective(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
12870 1 : if ( bLocalUseExceptions ) {
12871 1 : popErrorHandler();
12872 : }
12873 : #ifndef SED_HACKS
12874 : if ( bLocalUseExceptions ) {
12875 : CPLErr eclass = CPLGetLastErrorType();
12876 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12877 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12878 : }
12879 : }
12880 : #endif
12881 : }
12882 1 : {
12883 : /* %typemap(out) OGRErr */
12884 1 : if ( result != 0 && GetUseExceptions()) {
12885 0 : const char* pszMessage = CPLGetLastErrorMsg();
12886 0 : if( pszMessage[0] != '\0' )
12887 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12888 : else
12889 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12890 0 : SWIG_fail;
12891 : }
12892 : }
12893 1 : {
12894 : /* %typemap(ret) OGRErr */
12895 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12896 1 : resultobj = PyLong_FromLong( result );
12897 : }
12898 : }
12899 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; } }
12900 : return resultobj;
12901 : fail:
12902 : return NULL;
12903 : }
12904 :
12905 :
12906 70 : SWIGINTERN PyObject *_wrap_SpatialReference_SetWellKnownGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12907 70 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12908 70 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12909 70 : char *arg2 = (char *) 0 ;
12910 70 : void *argp1 = 0 ;
12911 70 : int res1 = 0 ;
12912 70 : int res2 ;
12913 70 : char *buf2 = 0 ;
12914 70 : int alloc2 = 0 ;
12915 70 : PyObject *swig_obj[2] ;
12916 70 : OGRErr result;
12917 :
12918 70 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetWellKnownGeogCS", 2, 2, swig_obj)) SWIG_fail;
12919 70 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12920 70 : if (!SWIG_IsOK(res1)) {
12921 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetWellKnownGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12922 : }
12923 70 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12924 70 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
12925 70 : if (!SWIG_IsOK(res2)) {
12926 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetWellKnownGeogCS" "', argument " "2"" of type '" "char const *""'");
12927 : }
12928 70 : arg2 = reinterpret_cast< char * >(buf2);
12929 70 : {
12930 70 : if (!arg2) {
12931 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
12932 : }
12933 : }
12934 70 : {
12935 70 : const int bLocalUseExceptions = GetUseExceptions();
12936 70 : if ( bLocalUseExceptions ) {
12937 69 : pushErrorHandler();
12938 : }
12939 70 : result = (OGRErr)OSRSpatialReferenceShadow_SetWellKnownGeogCS(arg1,(char const *)arg2);
12940 70 : if ( bLocalUseExceptions ) {
12941 69 : popErrorHandler();
12942 : }
12943 : #ifndef SED_HACKS
12944 : if ( bLocalUseExceptions ) {
12945 : CPLErr eclass = CPLGetLastErrorType();
12946 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12947 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12948 : }
12949 : }
12950 : #endif
12951 : }
12952 70 : {
12953 : /* %typemap(out) OGRErr */
12954 70 : if ( result != 0 && GetUseExceptions()) {
12955 0 : const char* pszMessage = CPLGetLastErrorMsg();
12956 0 : if( pszMessage[0] != '\0' )
12957 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12958 : else
12959 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12960 0 : SWIG_fail;
12961 : }
12962 : }
12963 70 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12964 70 : {
12965 : /* %typemap(ret) OGRErr */
12966 70 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12967 70 : resultobj = PyLong_FromLong( result );
12968 : }
12969 : }
12970 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; } }
12971 : return resultobj;
12972 0 : fail:
12973 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12974 : return NULL;
12975 : }
12976 :
12977 :
12978 1277 : SWIGINTERN PyObject *_wrap_SpatialReference_SetFromUserInput(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12979 1277 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12980 1277 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12981 1277 : char *arg2 = (char *) 0 ;
12982 1277 : char **arg3 = (char **) NULL ;
12983 1277 : void *argp1 = 0 ;
12984 1277 : int res1 = 0 ;
12985 1277 : int res2 ;
12986 1277 : char *buf2 = 0 ;
12987 1277 : int alloc2 = 0 ;
12988 1277 : PyObject * obj0 = 0 ;
12989 1277 : PyObject * obj1 = 0 ;
12990 1277 : PyObject * obj2 = 0 ;
12991 1277 : char * kwnames[] = {
12992 : (char *)"self", (char *)"name", (char *)"options", NULL
12993 : };
12994 1277 : OGRErr result;
12995 :
12996 1277 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:SpatialReference_SetFromUserInput", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
12997 1277 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12998 1277 : if (!SWIG_IsOK(res1)) {
12999 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetFromUserInput" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13000 : }
13001 1277 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13002 1277 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
13003 1277 : if (!SWIG_IsOK(res2)) {
13004 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetFromUserInput" "', argument " "2"" of type '" "char const *""'");
13005 : }
13006 1277 : arg2 = reinterpret_cast< char * >(buf2);
13007 1277 : if (obj2) {
13008 1 : {
13009 : /* %typemap(in) char **dict */
13010 1 : arg3 = NULL;
13011 1 : if ( PySequence_Check( obj2 ) ) {
13012 1 : int bErr = FALSE;
13013 1 : arg3 = CSLFromPySequence(obj2, &bErr);
13014 1 : if ( bErr )
13015 : {
13016 0 : SWIG_fail;
13017 : }
13018 : }
13019 0 : else if ( PyMapping_Check( obj2 ) ) {
13020 0 : int bErr = FALSE;
13021 0 : arg3 = CSLFromPyMapping(obj2, &bErr);
13022 0 : if ( bErr )
13023 : {
13024 0 : SWIG_fail;
13025 : }
13026 : }
13027 : else {
13028 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
13029 0 : SWIG_fail;
13030 : }
13031 : }
13032 : }
13033 1277 : {
13034 1277 : if (!arg2) {
13035 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13036 : }
13037 : }
13038 1277 : {
13039 1277 : const int bLocalUseExceptions = GetUseExceptions();
13040 1277 : if ( bLocalUseExceptions ) {
13041 1098 : pushErrorHandler();
13042 : }
13043 1277 : result = (OGRErr)OSRSpatialReferenceShadow_SetFromUserInput(arg1,(char const *)arg2,arg3);
13044 1277 : if ( bLocalUseExceptions ) {
13045 1098 : popErrorHandler();
13046 : }
13047 : #ifndef SED_HACKS
13048 : if ( bLocalUseExceptions ) {
13049 : CPLErr eclass = CPLGetLastErrorType();
13050 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13051 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13052 : }
13053 : }
13054 : #endif
13055 : }
13056 1277 : {
13057 : /* %typemap(out) OGRErr */
13058 1288 : if ( result != 0 && GetUseExceptions()) {
13059 10 : const char* pszMessage = CPLGetLastErrorMsg();
13060 10 : if( pszMessage[0] != '\0' )
13061 8 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13062 : else
13063 2 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13064 10 : SWIG_fail;
13065 : }
13066 : }
13067 1267 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13068 1267 : {
13069 : /* %typemap(freearg) char **dict */
13070 1267 : CSLDestroy( arg3 );
13071 : }
13072 1267 : {
13073 : /* %typemap(ret) OGRErr */
13074 1267 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13075 1267 : resultobj = PyLong_FromLong( result );
13076 : }
13077 : }
13078 1277 : 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; } }
13079 : return resultobj;
13080 10 : fail:
13081 10 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13082 10 : {
13083 : /* %typemap(freearg) char **dict */
13084 10 : CSLDestroy( arg3 );
13085 : }
13086 : return NULL;
13087 : }
13088 :
13089 :
13090 1 : SWIGINTERN PyObject *_wrap_SpatialReference_CopyGeogCSFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13091 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13092 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13093 1 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
13094 1 : void *argp1 = 0 ;
13095 1 : int res1 = 0 ;
13096 1 : void *argp2 = 0 ;
13097 1 : int res2 = 0 ;
13098 1 : PyObject *swig_obj[2] ;
13099 1 : OGRErr result;
13100 :
13101 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_CopyGeogCSFrom", 2, 2, swig_obj)) SWIG_fail;
13102 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13103 1 : if (!SWIG_IsOK(res1)) {
13104 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_CopyGeogCSFrom" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13105 : }
13106 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13107 1 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13108 1 : if (!SWIG_IsOK(res2)) {
13109 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_CopyGeogCSFrom" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
13110 : }
13111 1 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
13112 1 : {
13113 1 : if (!arg2) {
13114 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13115 : }
13116 : }
13117 1 : {
13118 1 : const int bLocalUseExceptions = GetUseExceptions();
13119 1 : if ( bLocalUseExceptions ) {
13120 0 : pushErrorHandler();
13121 : }
13122 1 : result = (OGRErr)OSRSpatialReferenceShadow_CopyGeogCSFrom(arg1,arg2);
13123 1 : if ( bLocalUseExceptions ) {
13124 0 : popErrorHandler();
13125 : }
13126 : #ifndef SED_HACKS
13127 : if ( bLocalUseExceptions ) {
13128 : CPLErr eclass = CPLGetLastErrorType();
13129 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13130 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13131 : }
13132 : }
13133 : #endif
13134 : }
13135 1 : {
13136 : /* %typemap(out) OGRErr */
13137 1 : if ( result != 0 && GetUseExceptions()) {
13138 0 : const char* pszMessage = CPLGetLastErrorMsg();
13139 0 : if( pszMessage[0] != '\0' )
13140 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13141 : else
13142 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13143 0 : SWIG_fail;
13144 : }
13145 : }
13146 1 : {
13147 : /* %typemap(ret) OGRErr */
13148 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13149 1 : resultobj = PyLong_FromLong( result );
13150 : }
13151 : }
13152 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; } }
13153 : return resultobj;
13154 : fail:
13155 : return NULL;
13156 : }
13157 :
13158 :
13159 3 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13160 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13161 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13162 3 : double arg2 ;
13163 3 : double arg3 ;
13164 3 : double arg4 ;
13165 3 : double arg5 = (double) 0.0 ;
13166 3 : double arg6 = (double) 0.0 ;
13167 3 : double arg7 = (double) 0.0 ;
13168 3 : double arg8 = (double) 0.0 ;
13169 3 : void *argp1 = 0 ;
13170 3 : int res1 = 0 ;
13171 3 : double val2 ;
13172 3 : int ecode2 = 0 ;
13173 3 : double val3 ;
13174 3 : int ecode3 = 0 ;
13175 3 : double val4 ;
13176 3 : int ecode4 = 0 ;
13177 3 : double val5 ;
13178 3 : int ecode5 = 0 ;
13179 3 : double val6 ;
13180 3 : int ecode6 = 0 ;
13181 3 : double val7 ;
13182 3 : int ecode7 = 0 ;
13183 3 : double val8 ;
13184 3 : int ecode8 = 0 ;
13185 3 : PyObject *swig_obj[8] ;
13186 3 : OGRErr result;
13187 :
13188 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetTOWGS84", 4, 8, swig_obj)) SWIG_fail;
13189 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13190 3 : if (!SWIG_IsOK(res1)) {
13191 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13192 : }
13193 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13194 3 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
13195 3 : if (!SWIG_IsOK(ecode2)) {
13196 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTOWGS84" "', argument " "2"" of type '" "double""'");
13197 : }
13198 3 : arg2 = static_cast< double >(val2);
13199 3 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
13200 3 : if (!SWIG_IsOK(ecode3)) {
13201 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTOWGS84" "', argument " "3"" of type '" "double""'");
13202 : }
13203 3 : arg3 = static_cast< double >(val3);
13204 3 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
13205 3 : if (!SWIG_IsOK(ecode4)) {
13206 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTOWGS84" "', argument " "4"" of type '" "double""'");
13207 : }
13208 3 : arg4 = static_cast< double >(val4);
13209 3 : if (swig_obj[4]) {
13210 2 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
13211 2 : if (!SWIG_IsOK(ecode5)) {
13212 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTOWGS84" "', argument " "5"" of type '" "double""'");
13213 : }
13214 2 : arg5 = static_cast< double >(val5);
13215 : }
13216 3 : if (swig_obj[5]) {
13217 2 : ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
13218 2 : if (!SWIG_IsOK(ecode6)) {
13219 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTOWGS84" "', argument " "6"" of type '" "double""'");
13220 : }
13221 2 : arg6 = static_cast< double >(val6);
13222 : }
13223 3 : if (swig_obj[6]) {
13224 2 : ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
13225 2 : if (!SWIG_IsOK(ecode7)) {
13226 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetTOWGS84" "', argument " "7"" of type '" "double""'");
13227 : }
13228 2 : arg7 = static_cast< double >(val7);
13229 : }
13230 3 : if (swig_obj[7]) {
13231 2 : ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
13232 2 : if (!SWIG_IsOK(ecode8)) {
13233 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetTOWGS84" "', argument " "8"" of type '" "double""'");
13234 : }
13235 2 : arg8 = static_cast< double >(val8);
13236 : }
13237 3 : {
13238 3 : const int bLocalUseExceptions = GetUseExceptions();
13239 3 : if ( bLocalUseExceptions ) {
13240 1 : pushErrorHandler();
13241 : }
13242 3 : result = (OGRErr)OSRSpatialReferenceShadow_SetTOWGS84(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
13243 3 : if ( bLocalUseExceptions ) {
13244 1 : popErrorHandler();
13245 : }
13246 : #ifndef SED_HACKS
13247 : if ( bLocalUseExceptions ) {
13248 : CPLErr eclass = CPLGetLastErrorType();
13249 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13250 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13251 : }
13252 : }
13253 : #endif
13254 : }
13255 3 : {
13256 : /* %typemap(out) OGRErr */
13257 3 : if ( result != 0 && GetUseExceptions()) {
13258 0 : const char* pszMessage = CPLGetLastErrorMsg();
13259 0 : if( pszMessage[0] != '\0' )
13260 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13261 : else
13262 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13263 0 : SWIG_fail;
13264 : }
13265 : }
13266 3 : {
13267 : /* %typemap(ret) OGRErr */
13268 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13269 3 : resultobj = PyLong_FromLong( result );
13270 : }
13271 : }
13272 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; } }
13273 : return resultobj;
13274 : fail:
13275 : return NULL;
13276 : }
13277 :
13278 :
13279 4 : SWIGINTERN PyObject *_wrap_SpatialReference_HasTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13280 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13281 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13282 4 : void *argp1 = 0 ;
13283 4 : int res1 = 0 ;
13284 4 : PyObject *swig_obj[1] ;
13285 4 : bool result;
13286 :
13287 4 : if (!args) SWIG_fail;
13288 4 : swig_obj[0] = args;
13289 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13290 4 : if (!SWIG_IsOK(res1)) {
13291 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_HasTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13292 : }
13293 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13294 4 : {
13295 4 : const int bLocalUseExceptions = GetUseExceptions();
13296 4 : if ( bLocalUseExceptions ) {
13297 0 : pushErrorHandler();
13298 : }
13299 4 : result = (bool)OSRSpatialReferenceShadow_HasTOWGS84(arg1);
13300 4 : if ( bLocalUseExceptions ) {
13301 0 : popErrorHandler();
13302 : }
13303 : #ifndef SED_HACKS
13304 : if ( bLocalUseExceptions ) {
13305 : CPLErr eclass = CPLGetLastErrorType();
13306 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13307 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13308 : }
13309 : }
13310 : #endif
13311 : }
13312 4 : resultobj = SWIG_From_bool(static_cast< bool >(result));
13313 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; } }
13314 : return resultobj;
13315 : fail:
13316 : return NULL;
13317 : }
13318 :
13319 :
13320 4 : SWIGINTERN PyObject *_wrap_SpatialReference_GetTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13321 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13322 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13323 4 : double *arg2 ;
13324 4 : void *argp1 = 0 ;
13325 4 : int res1 = 0 ;
13326 4 : double argout2[7] ;
13327 4 : PyObject *swig_obj[1] ;
13328 4 : OGRErr result;
13329 :
13330 4 : {
13331 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
13332 4 : memset(argout2, 0, sizeof(argout2));
13333 4 : arg2 = argout2;
13334 : }
13335 4 : if (!args) SWIG_fail;
13336 4 : swig_obj[0] = args;
13337 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13338 4 : if (!SWIG_IsOK(res1)) {
13339 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13340 : }
13341 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13342 4 : {
13343 4 : const int bLocalUseExceptions = GetUseExceptions();
13344 4 : if ( bLocalUseExceptions ) {
13345 2 : pushErrorHandler();
13346 : }
13347 4 : result = (OGRErr)OSRSpatialReferenceShadow_GetTOWGS84(arg1,arg2);
13348 4 : if ( bLocalUseExceptions ) {
13349 2 : popErrorHandler();
13350 : }
13351 : #ifndef SED_HACKS
13352 : if ( bLocalUseExceptions ) {
13353 : CPLErr eclass = CPLGetLastErrorType();
13354 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13355 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13356 : }
13357 : }
13358 : #endif
13359 : }
13360 4 : {
13361 : /* %typemap(out) OGRErr */
13362 4 : if ( result != 0 && GetUseExceptions()) {
13363 0 : const char* pszMessage = CPLGetLastErrorMsg();
13364 0 : if( pszMessage[0] != '\0' )
13365 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13366 : else
13367 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13368 0 : SWIG_fail;
13369 : }
13370 : }
13371 4 : {
13372 : /* %typemap(argout) (double argout[ANY]) */
13373 4 : PyObject *out = CreateTupleFromDoubleArray( arg2, 7 );
13374 : #if SWIG_VERSION >= 0x040300
13375 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
13376 : #else
13377 4 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
13378 : #endif
13379 : }
13380 4 : {
13381 : /* %typemap(ret) OGRErr */
13382 8 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13383 0 : resultobj = PyLong_FromLong( result );
13384 : }
13385 : }
13386 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; } }
13387 : return resultobj;
13388 : fail:
13389 : return NULL;
13390 : }
13391 :
13392 :
13393 2 : SWIGINTERN PyObject *_wrap_SpatialReference_AddGuessedTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13394 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13395 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13396 2 : void *argp1 = 0 ;
13397 2 : int res1 = 0 ;
13398 2 : PyObject *swig_obj[1] ;
13399 2 : OGRErr result;
13400 :
13401 2 : if (!args) SWIG_fail;
13402 2 : swig_obj[0] = args;
13403 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13404 2 : if (!SWIG_IsOK(res1)) {
13405 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_AddGuessedTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13406 : }
13407 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13408 2 : {
13409 2 : const int bLocalUseExceptions = GetUseExceptions();
13410 2 : if ( bLocalUseExceptions ) {
13411 0 : pushErrorHandler();
13412 : }
13413 2 : result = (OGRErr)OSRSpatialReferenceShadow_AddGuessedTOWGS84(arg1);
13414 2 : if ( bLocalUseExceptions ) {
13415 0 : popErrorHandler();
13416 : }
13417 : #ifndef SED_HACKS
13418 : if ( bLocalUseExceptions ) {
13419 : CPLErr eclass = CPLGetLastErrorType();
13420 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13421 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13422 : }
13423 : }
13424 : #endif
13425 : }
13426 2 : {
13427 : /* %typemap(out) OGRErr */
13428 2 : if ( result != 0 && GetUseExceptions()) {
13429 0 : const char* pszMessage = CPLGetLastErrorMsg();
13430 0 : if( pszMessage[0] != '\0' )
13431 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13432 : else
13433 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13434 0 : SWIG_fail;
13435 : }
13436 : }
13437 2 : {
13438 : /* %typemap(ret) OGRErr */
13439 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13440 2 : resultobj = PyLong_FromLong( result );
13441 : }
13442 : }
13443 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; } }
13444 : return resultobj;
13445 : fail:
13446 : return NULL;
13447 : }
13448 :
13449 :
13450 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLocalCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13451 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13452 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13453 1 : char *arg2 = (char *) 0 ;
13454 1 : void *argp1 = 0 ;
13455 1 : int res1 = 0 ;
13456 1 : int res2 ;
13457 1 : char *buf2 = 0 ;
13458 1 : int alloc2 = 0 ;
13459 1 : PyObject *swig_obj[2] ;
13460 1 : OGRErr result;
13461 :
13462 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetLocalCS", 2, 2, swig_obj)) SWIG_fail;
13463 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13464 1 : if (!SWIG_IsOK(res1)) {
13465 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLocalCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13466 : }
13467 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13468 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13469 1 : if (!SWIG_IsOK(res2)) {
13470 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLocalCS" "', argument " "2"" of type '" "char const *""'");
13471 : }
13472 1 : arg2 = reinterpret_cast< char * >(buf2);
13473 1 : {
13474 1 : const int bLocalUseExceptions = GetUseExceptions();
13475 1 : if ( bLocalUseExceptions ) {
13476 1 : pushErrorHandler();
13477 : }
13478 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetLocalCS(arg1,(char const *)arg2);
13479 1 : if ( bLocalUseExceptions ) {
13480 1 : popErrorHandler();
13481 : }
13482 : #ifndef SED_HACKS
13483 : if ( bLocalUseExceptions ) {
13484 : CPLErr eclass = CPLGetLastErrorType();
13485 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13486 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13487 : }
13488 : }
13489 : #endif
13490 : }
13491 1 : {
13492 : /* %typemap(out) OGRErr */
13493 1 : if ( result != 0 && GetUseExceptions()) {
13494 0 : const char* pszMessage = CPLGetLastErrorMsg();
13495 0 : if( pszMessage[0] != '\0' )
13496 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13497 : else
13498 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13499 0 : SWIG_fail;
13500 : }
13501 : }
13502 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13503 1 : {
13504 : /* %typemap(ret) OGRErr */
13505 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13506 1 : resultobj = PyLong_FromLong( result );
13507 : }
13508 : }
13509 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; } }
13510 : return resultobj;
13511 0 : fail:
13512 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13513 : return NULL;
13514 : }
13515 :
13516 :
13517 17 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13518 17 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13519 17 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13520 17 : char *arg2 = (char *) 0 ;
13521 17 : char *arg3 = (char *) 0 ;
13522 17 : char *arg4 = (char *) 0 ;
13523 17 : double arg5 ;
13524 17 : double arg6 ;
13525 17 : char *arg7 = (char *) "Greenwich" ;
13526 17 : double arg8 = (double) 0.0 ;
13527 17 : char *arg9 = (char *) "degree" ;
13528 17 : double arg10 = (double) 0.0174532925199433 ;
13529 17 : void *argp1 = 0 ;
13530 17 : int res1 = 0 ;
13531 17 : int res2 ;
13532 17 : char *buf2 = 0 ;
13533 17 : int alloc2 = 0 ;
13534 17 : int res3 ;
13535 17 : char *buf3 = 0 ;
13536 17 : int alloc3 = 0 ;
13537 17 : int res4 ;
13538 17 : char *buf4 = 0 ;
13539 17 : int alloc4 = 0 ;
13540 17 : double val5 ;
13541 17 : int ecode5 = 0 ;
13542 17 : double val6 ;
13543 17 : int ecode6 = 0 ;
13544 17 : int res7 ;
13545 17 : char *buf7 = 0 ;
13546 17 : int alloc7 = 0 ;
13547 17 : double val8 ;
13548 17 : int ecode8 = 0 ;
13549 17 : int res9 ;
13550 17 : char *buf9 = 0 ;
13551 17 : int alloc9 = 0 ;
13552 17 : double val10 ;
13553 17 : int ecode10 = 0 ;
13554 17 : PyObject *swig_obj[10] ;
13555 17 : OGRErr result;
13556 :
13557 17 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetGeogCS", 6, 10, swig_obj)) SWIG_fail;
13558 17 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13559 17 : if (!SWIG_IsOK(res1)) {
13560 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13561 : }
13562 17 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13563 17 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13564 17 : if (!SWIG_IsOK(res2)) {
13565 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetGeogCS" "', argument " "2"" of type '" "char const *""'");
13566 : }
13567 17 : arg2 = reinterpret_cast< char * >(buf2);
13568 17 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
13569 17 : if (!SWIG_IsOK(res3)) {
13570 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetGeogCS" "', argument " "3"" of type '" "char const *""'");
13571 : }
13572 17 : arg3 = reinterpret_cast< char * >(buf3);
13573 17 : res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
13574 17 : if (!SWIG_IsOK(res4)) {
13575 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetGeogCS" "', argument " "4"" of type '" "char const *""'");
13576 : }
13577 17 : arg4 = reinterpret_cast< char * >(buf4);
13578 17 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
13579 17 : if (!SWIG_IsOK(ecode5)) {
13580 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGeogCS" "', argument " "5"" of type '" "double""'");
13581 : }
13582 17 : arg5 = static_cast< double >(val5);
13583 17 : ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
13584 17 : if (!SWIG_IsOK(ecode6)) {
13585 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetGeogCS" "', argument " "6"" of type '" "double""'");
13586 : }
13587 17 : arg6 = static_cast< double >(val6);
13588 17 : if (swig_obj[6]) {
13589 3 : res7 = SWIG_AsCharPtrAndSize(swig_obj[6], &buf7, NULL, &alloc7);
13590 3 : if (!SWIG_IsOK(res7)) {
13591 0 : SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "SpatialReference_SetGeogCS" "', argument " "7"" of type '" "char const *""'");
13592 : }
13593 3 : arg7 = reinterpret_cast< char * >(buf7);
13594 : }
13595 17 : if (swig_obj[7]) {
13596 3 : ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
13597 3 : if (!SWIG_IsOK(ecode8)) {
13598 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetGeogCS" "', argument " "8"" of type '" "double""'");
13599 : }
13600 3 : arg8 = static_cast< double >(val8);
13601 : }
13602 17 : if (swig_obj[8]) {
13603 3 : res9 = SWIG_AsCharPtrAndSize(swig_obj[8], &buf9, NULL, &alloc9);
13604 3 : if (!SWIG_IsOK(res9)) {
13605 0 : SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "SpatialReference_SetGeogCS" "', argument " "9"" of type '" "char const *""'");
13606 : }
13607 3 : arg9 = reinterpret_cast< char * >(buf9);
13608 : }
13609 17 : if (swig_obj[9]) {
13610 3 : ecode10 = SWIG_AsVal_double(swig_obj[9], &val10);
13611 3 : if (!SWIG_IsOK(ecode10)) {
13612 0 : SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "SpatialReference_SetGeogCS" "', argument " "10"" of type '" "double""'");
13613 : }
13614 3 : arg10 = static_cast< double >(val10);
13615 : }
13616 17 : {
13617 17 : const int bLocalUseExceptions = GetUseExceptions();
13618 17 : if ( bLocalUseExceptions ) {
13619 15 : pushErrorHandler();
13620 : }
13621 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);
13622 17 : if ( bLocalUseExceptions ) {
13623 15 : popErrorHandler();
13624 : }
13625 : #ifndef SED_HACKS
13626 : if ( bLocalUseExceptions ) {
13627 : CPLErr eclass = CPLGetLastErrorType();
13628 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13629 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13630 : }
13631 : }
13632 : #endif
13633 : }
13634 17 : {
13635 : /* %typemap(out) OGRErr */
13636 17 : if ( result != 0 && GetUseExceptions()) {
13637 0 : const char* pszMessage = CPLGetLastErrorMsg();
13638 0 : if( pszMessage[0] != '\0' )
13639 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13640 : else
13641 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13642 0 : SWIG_fail;
13643 : }
13644 : }
13645 17 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13646 17 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13647 17 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
13648 17 : if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
13649 17 : if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
13650 17 : {
13651 : /* %typemap(ret) OGRErr */
13652 17 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13653 17 : resultobj = PyLong_FromLong( result );
13654 : }
13655 : }
13656 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; } }
13657 : return resultobj;
13658 0 : fail:
13659 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13660 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13661 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
13662 0 : if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
13663 0 : if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
13664 : return NULL;
13665 : }
13666 :
13667 :
13668 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13669 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13670 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13671 1 : char *arg2 = (char *) "unnamed" ;
13672 1 : void *argp1 = 0 ;
13673 1 : int res1 = 0 ;
13674 1 : int res2 ;
13675 1 : char *buf2 = 0 ;
13676 1 : int alloc2 = 0 ;
13677 1 : PyObject *swig_obj[2] ;
13678 1 : OGRErr result;
13679 :
13680 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetProjCS", 1, 2, swig_obj)) SWIG_fail;
13681 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13682 1 : if (!SWIG_IsOK(res1)) {
13683 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13684 : }
13685 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13686 1 : if (swig_obj[1]) {
13687 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13688 1 : if (!SWIG_IsOK(res2)) {
13689 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjCS" "', argument " "2"" of type '" "char const *""'");
13690 : }
13691 1 : arg2 = reinterpret_cast< char * >(buf2);
13692 : }
13693 1 : {
13694 1 : if (!arg2) {
13695 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13696 : }
13697 : }
13698 1 : {
13699 1 : const int bLocalUseExceptions = GetUseExceptions();
13700 1 : if ( bLocalUseExceptions ) {
13701 1 : pushErrorHandler();
13702 : }
13703 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjCS(arg1,(char const *)arg2);
13704 1 : if ( bLocalUseExceptions ) {
13705 1 : popErrorHandler();
13706 : }
13707 : #ifndef SED_HACKS
13708 : if ( bLocalUseExceptions ) {
13709 : CPLErr eclass = CPLGetLastErrorType();
13710 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13711 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13712 : }
13713 : }
13714 : #endif
13715 : }
13716 1 : {
13717 : /* %typemap(out) OGRErr */
13718 1 : if ( result != 0 && GetUseExceptions()) {
13719 0 : const char* pszMessage = CPLGetLastErrorMsg();
13720 0 : if( pszMessage[0] != '\0' )
13721 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13722 : else
13723 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13724 0 : SWIG_fail;
13725 : }
13726 : }
13727 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13728 1 : {
13729 : /* %typemap(ret) OGRErr */
13730 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13731 1 : resultobj = PyLong_FromLong( result );
13732 : }
13733 : }
13734 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; } }
13735 : return resultobj;
13736 0 : fail:
13737 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13738 : return NULL;
13739 : }
13740 :
13741 :
13742 4 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGeocCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13743 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13744 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13745 4 : char *arg2 = (char *) "unnamed" ;
13746 4 : void *argp1 = 0 ;
13747 4 : int res1 = 0 ;
13748 4 : int res2 ;
13749 4 : char *buf2 = 0 ;
13750 4 : int alloc2 = 0 ;
13751 4 : PyObject *swig_obj[2] ;
13752 4 : OGRErr result;
13753 :
13754 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetGeocCS", 1, 2, swig_obj)) SWIG_fail;
13755 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13756 4 : if (!SWIG_IsOK(res1)) {
13757 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGeocCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13758 : }
13759 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13760 4 : if (swig_obj[1]) {
13761 4 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13762 4 : if (!SWIG_IsOK(res2)) {
13763 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetGeocCS" "', argument " "2"" of type '" "char const *""'");
13764 : }
13765 4 : arg2 = reinterpret_cast< char * >(buf2);
13766 : }
13767 4 : {
13768 4 : if (!arg2) {
13769 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13770 : }
13771 : }
13772 4 : {
13773 4 : const int bLocalUseExceptions = GetUseExceptions();
13774 4 : if ( bLocalUseExceptions ) {
13775 4 : pushErrorHandler();
13776 : }
13777 4 : result = (OGRErr)OSRSpatialReferenceShadow_SetGeocCS(arg1,(char const *)arg2);
13778 4 : if ( bLocalUseExceptions ) {
13779 4 : popErrorHandler();
13780 : }
13781 : #ifndef SED_HACKS
13782 : if ( bLocalUseExceptions ) {
13783 : CPLErr eclass = CPLGetLastErrorType();
13784 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13785 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13786 : }
13787 : }
13788 : #endif
13789 : }
13790 4 : {
13791 : /* %typemap(out) OGRErr */
13792 5 : if ( result != 0 && GetUseExceptions()) {
13793 1 : const char* pszMessage = CPLGetLastErrorMsg();
13794 1 : if( pszMessage[0] != '\0' )
13795 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13796 : else
13797 1 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13798 1 : SWIG_fail;
13799 : }
13800 : }
13801 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13802 3 : {
13803 : /* %typemap(ret) OGRErr */
13804 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13805 3 : resultobj = PyLong_FromLong( result );
13806 : }
13807 : }
13808 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; } }
13809 : return resultobj;
13810 1 : fail:
13811 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13812 : return NULL;
13813 : }
13814 :
13815 :
13816 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVertCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13817 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13818 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13819 0 : char *arg2 = (char *) "unnamed" ;
13820 0 : char *arg3 = (char *) "unnamed" ;
13821 0 : int arg4 = (int) 0 ;
13822 0 : void *argp1 = 0 ;
13823 0 : int res1 = 0 ;
13824 0 : int res2 ;
13825 0 : char *buf2 = 0 ;
13826 0 : int alloc2 = 0 ;
13827 0 : int res3 ;
13828 0 : char *buf3 = 0 ;
13829 0 : int alloc3 = 0 ;
13830 0 : int val4 ;
13831 0 : int ecode4 = 0 ;
13832 0 : PyObject *swig_obj[4] ;
13833 0 : OGRErr result;
13834 :
13835 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetVertCS", 1, 4, swig_obj)) SWIG_fail;
13836 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13837 0 : if (!SWIG_IsOK(res1)) {
13838 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13839 : }
13840 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13841 0 : if (swig_obj[1]) {
13842 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13843 0 : if (!SWIG_IsOK(res2)) {
13844 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetVertCS" "', argument " "2"" of type '" "char const *""'");
13845 : }
13846 0 : arg2 = reinterpret_cast< char * >(buf2);
13847 : }
13848 0 : if (swig_obj[2]) {
13849 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
13850 0 : if (!SWIG_IsOK(res3)) {
13851 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetVertCS" "', argument " "3"" of type '" "char const *""'");
13852 : }
13853 0 : arg3 = reinterpret_cast< char * >(buf3);
13854 : }
13855 0 : if (swig_obj[3]) {
13856 0 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
13857 0 : if (!SWIG_IsOK(ecode4)) {
13858 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVertCS" "', argument " "4"" of type '" "int""'");
13859 : }
13860 : arg4 = static_cast< int >(val4);
13861 : }
13862 0 : {
13863 0 : const int bLocalUseExceptions = GetUseExceptions();
13864 0 : if ( bLocalUseExceptions ) {
13865 0 : pushErrorHandler();
13866 : }
13867 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetVertCS(arg1,(char const *)arg2,(char const *)arg3,arg4);
13868 0 : if ( bLocalUseExceptions ) {
13869 0 : popErrorHandler();
13870 : }
13871 : #ifndef SED_HACKS
13872 : if ( bLocalUseExceptions ) {
13873 : CPLErr eclass = CPLGetLastErrorType();
13874 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13875 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13876 : }
13877 : }
13878 : #endif
13879 : }
13880 0 : {
13881 : /* %typemap(out) OGRErr */
13882 0 : if ( result != 0 && GetUseExceptions()) {
13883 0 : const char* pszMessage = CPLGetLastErrorMsg();
13884 0 : if( pszMessage[0] != '\0' )
13885 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13886 : else
13887 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13888 0 : SWIG_fail;
13889 : }
13890 : }
13891 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13892 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13893 0 : {
13894 : /* %typemap(ret) OGRErr */
13895 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13896 0 : resultobj = PyLong_FromLong( result );
13897 : }
13898 : }
13899 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; } }
13900 : return resultobj;
13901 0 : fail:
13902 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13903 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13904 : return NULL;
13905 : }
13906 :
13907 :
13908 8 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCompoundCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13909 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13910 8 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13911 8 : char *arg2 = (char *) 0 ;
13912 8 : OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) 0 ;
13913 8 : OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
13914 8 : void *argp1 = 0 ;
13915 8 : int res1 = 0 ;
13916 8 : int res2 ;
13917 8 : char *buf2 = 0 ;
13918 8 : int alloc2 = 0 ;
13919 8 : void *argp3 = 0 ;
13920 8 : int res3 = 0 ;
13921 8 : void *argp4 = 0 ;
13922 8 : int res4 = 0 ;
13923 8 : PyObject *swig_obj[4] ;
13924 8 : OGRErr result;
13925 :
13926 8 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetCompoundCS", 4, 4, swig_obj)) SWIG_fail;
13927 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13928 8 : if (!SWIG_IsOK(res1)) {
13929 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCompoundCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13930 : }
13931 8 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13932 8 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13933 8 : if (!SWIG_IsOK(res2)) {
13934 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetCompoundCS" "', argument " "2"" of type '" "char const *""'");
13935 : }
13936 8 : arg2 = reinterpret_cast< char * >(buf2);
13937 8 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13938 8 : if (!SWIG_IsOK(res3)) {
13939 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetCompoundCS" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'");
13940 : }
13941 8 : arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
13942 8 : res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13943 8 : if (!SWIG_IsOK(res4)) {
13944 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetCompoundCS" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'");
13945 : }
13946 8 : arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
13947 8 : {
13948 8 : if (!arg2) {
13949 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13950 : }
13951 : }
13952 8 : {
13953 8 : if (!arg3) {
13954 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13955 : }
13956 : }
13957 8 : {
13958 8 : if (!arg4) {
13959 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13960 : }
13961 : }
13962 8 : {
13963 8 : const int bLocalUseExceptions = GetUseExceptions();
13964 8 : if ( bLocalUseExceptions ) {
13965 8 : pushErrorHandler();
13966 : }
13967 8 : result = (OGRErr)OSRSpatialReferenceShadow_SetCompoundCS(arg1,(char const *)arg2,arg3,arg4);
13968 8 : if ( bLocalUseExceptions ) {
13969 8 : popErrorHandler();
13970 : }
13971 : #ifndef SED_HACKS
13972 : if ( bLocalUseExceptions ) {
13973 : CPLErr eclass = CPLGetLastErrorType();
13974 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13975 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13976 : }
13977 : }
13978 : #endif
13979 : }
13980 8 : {
13981 : /* %typemap(out) OGRErr */
13982 8 : if ( result != 0 && GetUseExceptions()) {
13983 0 : const char* pszMessage = CPLGetLastErrorMsg();
13984 0 : if( pszMessage[0] != '\0' )
13985 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13986 : else
13987 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13988 0 : SWIG_fail;
13989 : }
13990 : }
13991 8 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13992 8 : {
13993 : /* %typemap(ret) OGRErr */
13994 8 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13995 8 : resultobj = PyLong_FromLong( result );
13996 : }
13997 : }
13998 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; } }
13999 : return resultobj;
14000 0 : fail:
14001 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14002 : return NULL;
14003 : }
14004 :
14005 :
14006 261 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14007 261 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14008 261 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14009 261 : char **arg2 = (char **) 0 ;
14010 261 : void *argp1 = 0 ;
14011 261 : int res1 = 0 ;
14012 261 : char *val2 ;
14013 261 : PyObject *swig_obj[2] ;
14014 261 : OGRErr result;
14015 :
14016 261 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromWkt", 2, 2, swig_obj)) SWIG_fail;
14017 261 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14018 261 : if (!SWIG_IsOK(res1)) {
14019 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14020 : }
14021 261 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14022 261 : {
14023 : /* %typemap(in) (char **ignorechange) */
14024 261 : if( !PyArg_Parse( swig_obj[1], "s", &val2 ) ) {
14025 0 : PyErr_SetString( PyExc_TypeError, "not a string" );
14026 0 : SWIG_fail;
14027 : }
14028 261 : arg2 = &val2;
14029 : }
14030 261 : {
14031 261 : const int bLocalUseExceptions = GetUseExceptions();
14032 261 : if ( bLocalUseExceptions ) {
14033 163 : pushErrorHandler();
14034 : }
14035 261 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromWkt(arg1,arg2);
14036 261 : if ( bLocalUseExceptions ) {
14037 163 : popErrorHandler();
14038 : }
14039 : #ifndef SED_HACKS
14040 : if ( bLocalUseExceptions ) {
14041 : CPLErr eclass = CPLGetLastErrorType();
14042 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14043 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14044 : }
14045 : }
14046 : #endif
14047 : }
14048 261 : {
14049 : /* %typemap(out) OGRErr */
14050 296 : if ( result != 0 && GetUseExceptions()) {
14051 0 : const char* pszMessage = CPLGetLastErrorMsg();
14052 0 : if( pszMessage[0] != '\0' )
14053 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14054 : else
14055 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14056 0 : SWIG_fail;
14057 : }
14058 : }
14059 261 : {
14060 : /* %typemap(ret) OGRErr */
14061 261 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14062 261 : resultobj = PyLong_FromLong( result );
14063 : }
14064 : }
14065 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; } }
14066 : return resultobj;
14067 : fail:
14068 : return NULL;
14069 : }
14070 :
14071 :
14072 213 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromProj4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14073 213 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14074 213 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14075 213 : char *arg2 = (char *) 0 ;
14076 213 : void *argp1 = 0 ;
14077 213 : int res1 = 0 ;
14078 213 : int res2 ;
14079 213 : char *buf2 = 0 ;
14080 213 : int alloc2 = 0 ;
14081 213 : PyObject *swig_obj[2] ;
14082 213 : OGRErr result;
14083 :
14084 213 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromProj4", 2, 2, swig_obj)) SWIG_fail;
14085 213 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14086 213 : if (!SWIG_IsOK(res1)) {
14087 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromProj4" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14088 : }
14089 213 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14090 213 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14091 213 : if (!SWIG_IsOK(res2)) {
14092 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromProj4" "', argument " "2"" of type '" "char *""'");
14093 : }
14094 213 : arg2 = reinterpret_cast< char * >(buf2);
14095 213 : {
14096 213 : const int bLocalUseExceptions = GetUseExceptions();
14097 213 : if ( bLocalUseExceptions ) {
14098 184 : pushErrorHandler();
14099 : }
14100 213 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromProj4(arg1,arg2);
14101 213 : if ( bLocalUseExceptions ) {
14102 184 : popErrorHandler();
14103 : }
14104 : #ifndef SED_HACKS
14105 : if ( bLocalUseExceptions ) {
14106 : CPLErr eclass = CPLGetLastErrorType();
14107 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14108 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14109 : }
14110 : }
14111 : #endif
14112 : }
14113 213 : {
14114 : /* %typemap(out) OGRErr */
14115 218 : if ( result != 0 && GetUseExceptions()) {
14116 5 : const char* pszMessage = CPLGetLastErrorMsg();
14117 5 : if( pszMessage[0] != '\0' )
14118 5 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14119 : else
14120 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14121 5 : SWIG_fail;
14122 : }
14123 : }
14124 208 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14125 208 : {
14126 : /* %typemap(ret) OGRErr */
14127 208 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14128 208 : resultobj = PyLong_FromLong( result );
14129 : }
14130 : }
14131 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; } }
14132 : return resultobj;
14133 5 : fail:
14134 5 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14135 : return NULL;
14136 : }
14137 :
14138 :
14139 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromUrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14140 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14141 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14142 3 : char *arg2 = (char *) 0 ;
14143 3 : void *argp1 = 0 ;
14144 3 : int res1 = 0 ;
14145 3 : int res2 ;
14146 3 : char *buf2 = 0 ;
14147 3 : int alloc2 = 0 ;
14148 3 : PyObject *swig_obj[2] ;
14149 3 : OGRErr result;
14150 :
14151 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromUrl", 2, 2, swig_obj)) SWIG_fail;
14152 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14153 3 : if (!SWIG_IsOK(res1)) {
14154 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromUrl" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14155 : }
14156 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14157 3 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14158 3 : if (!SWIG_IsOK(res2)) {
14159 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromUrl" "', argument " "2"" of type '" "char *""'");
14160 : }
14161 3 : arg2 = reinterpret_cast< char * >(buf2);
14162 3 : {
14163 3 : if (!arg2) {
14164 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14165 : }
14166 : }
14167 3 : {
14168 3 : const int bLocalUseExceptions = GetUseExceptions();
14169 3 : if ( bLocalUseExceptions ) {
14170 3 : pushErrorHandler();
14171 : }
14172 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUrl(arg1,arg2);
14173 3 : if ( bLocalUseExceptions ) {
14174 3 : popErrorHandler();
14175 : }
14176 : #ifndef SED_HACKS
14177 : if ( bLocalUseExceptions ) {
14178 : CPLErr eclass = CPLGetLastErrorType();
14179 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14180 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14181 : }
14182 : }
14183 : #endif
14184 : }
14185 3 : {
14186 : /* %typemap(out) OGRErr */
14187 3 : if ( result != 0 && GetUseExceptions()) {
14188 0 : const char* pszMessage = CPLGetLastErrorMsg();
14189 0 : if( pszMessage[0] != '\0' )
14190 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14191 : else
14192 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14193 0 : SWIG_fail;
14194 : }
14195 : }
14196 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14197 3 : {
14198 : /* %typemap(ret) OGRErr */
14199 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14200 3 : resultobj = PyLong_FromLong( result );
14201 : }
14202 : }
14203 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; } }
14204 : return resultobj;
14205 0 : fail:
14206 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14207 : return NULL;
14208 : }
14209 :
14210 :
14211 11 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14212 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14213 11 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14214 11 : char **arg2 = (char **) 0 ;
14215 11 : void *argp1 = 0 ;
14216 11 : int res1 = 0 ;
14217 11 : PyObject *swig_obj[2] ;
14218 11 : OGRErr result;
14219 :
14220 11 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromESRI", 2, 2, swig_obj)) SWIG_fail;
14221 11 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14222 11 : if (!SWIG_IsOK(res1)) {
14223 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14224 : }
14225 11 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14226 11 : {
14227 : /* %typemap(in) char **dict */
14228 11 : arg2 = NULL;
14229 11 : if ( PySequence_Check( swig_obj[1] ) ) {
14230 11 : int bErr = FALSE;
14231 11 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
14232 11 : if ( bErr )
14233 : {
14234 0 : SWIG_fail;
14235 : }
14236 : }
14237 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
14238 0 : int bErr = FALSE;
14239 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
14240 0 : if ( bErr )
14241 : {
14242 0 : SWIG_fail;
14243 : }
14244 : }
14245 : else {
14246 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
14247 0 : SWIG_fail;
14248 : }
14249 : }
14250 11 : {
14251 11 : const int bLocalUseExceptions = GetUseExceptions();
14252 11 : if ( bLocalUseExceptions ) {
14253 11 : pushErrorHandler();
14254 : }
14255 11 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromESRI(arg1,arg2);
14256 11 : if ( bLocalUseExceptions ) {
14257 11 : popErrorHandler();
14258 : }
14259 : #ifndef SED_HACKS
14260 : if ( bLocalUseExceptions ) {
14261 : CPLErr eclass = CPLGetLastErrorType();
14262 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14263 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14264 : }
14265 : }
14266 : #endif
14267 : }
14268 11 : {
14269 : /* %typemap(out) OGRErr */
14270 12 : if ( result != 0 && GetUseExceptions()) {
14271 1 : const char* pszMessage = CPLGetLastErrorMsg();
14272 1 : if( pszMessage[0] != '\0' )
14273 1 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14274 : else
14275 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14276 1 : SWIG_fail;
14277 : }
14278 : }
14279 10 : {
14280 : /* %typemap(freearg) char **dict */
14281 10 : CSLDestroy( arg2 );
14282 : }
14283 10 : {
14284 : /* %typemap(ret) OGRErr */
14285 10 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14286 10 : resultobj = PyLong_FromLong( result );
14287 : }
14288 : }
14289 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; } }
14290 : return resultobj;
14291 1 : fail:
14292 1 : {
14293 : /* %typemap(freearg) char **dict */
14294 1 : CSLDestroy( arg2 );
14295 : }
14296 : return NULL;
14297 : }
14298 :
14299 :
14300 1014 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromEPSG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14301 1014 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14302 1014 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14303 1014 : int arg2 ;
14304 1014 : void *argp1 = 0 ;
14305 1014 : int res1 = 0 ;
14306 1014 : int val2 ;
14307 1014 : int ecode2 = 0 ;
14308 1014 : PyObject *swig_obj[2] ;
14309 1014 : OGRErr result;
14310 :
14311 1014 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromEPSG", 2, 2, swig_obj)) SWIG_fail;
14312 1014 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14313 1014 : if (!SWIG_IsOK(res1)) {
14314 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromEPSG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14315 : }
14316 1014 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14317 1014 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14318 1014 : if (!SWIG_IsOK(ecode2)) {
14319 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromEPSG" "', argument " "2"" of type '" "int""'");
14320 : }
14321 1014 : arg2 = static_cast< int >(val2);
14322 1014 : {
14323 1014 : const int bLocalUseExceptions = GetUseExceptions();
14324 1014 : if ( bLocalUseExceptions ) {
14325 745 : pushErrorHandler();
14326 : }
14327 1014 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSG(arg1,arg2);
14328 1014 : if ( bLocalUseExceptions ) {
14329 745 : popErrorHandler();
14330 : }
14331 : #ifndef SED_HACKS
14332 : if ( bLocalUseExceptions ) {
14333 : CPLErr eclass = CPLGetLastErrorType();
14334 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14335 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14336 : }
14337 : }
14338 : #endif
14339 : }
14340 1014 : {
14341 : /* %typemap(out) OGRErr */
14342 1019 : if ( result != 0 && GetUseExceptions()) {
14343 5 : const char* pszMessage = CPLGetLastErrorMsg();
14344 5 : if( pszMessage[0] != '\0' )
14345 5 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14346 : else
14347 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14348 5 : SWIG_fail;
14349 : }
14350 : }
14351 1009 : {
14352 : /* %typemap(ret) OGRErr */
14353 1009 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14354 1009 : resultobj = PyLong_FromLong( result );
14355 : }
14356 : }
14357 1014 : 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; } }
14358 : return resultobj;
14359 : fail:
14360 : return NULL;
14361 : }
14362 :
14363 :
14364 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromEPSGA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14365 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14366 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14367 2 : int arg2 ;
14368 2 : void *argp1 = 0 ;
14369 2 : int res1 = 0 ;
14370 2 : int val2 ;
14371 2 : int ecode2 = 0 ;
14372 2 : PyObject *swig_obj[2] ;
14373 2 : OGRErr result;
14374 :
14375 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromEPSGA", 2, 2, swig_obj)) SWIG_fail;
14376 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14377 2 : if (!SWIG_IsOK(res1)) {
14378 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromEPSGA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14379 : }
14380 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14381 2 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14382 2 : if (!SWIG_IsOK(ecode2)) {
14383 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromEPSGA" "', argument " "2"" of type '" "int""'");
14384 : }
14385 2 : arg2 = static_cast< int >(val2);
14386 2 : {
14387 2 : const int bLocalUseExceptions = GetUseExceptions();
14388 2 : if ( bLocalUseExceptions ) {
14389 2 : pushErrorHandler();
14390 : }
14391 2 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSGA(arg1,arg2);
14392 2 : if ( bLocalUseExceptions ) {
14393 2 : popErrorHandler();
14394 : }
14395 : #ifndef SED_HACKS
14396 : if ( bLocalUseExceptions ) {
14397 : CPLErr eclass = CPLGetLastErrorType();
14398 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14399 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14400 : }
14401 : }
14402 : #endif
14403 : }
14404 2 : {
14405 : /* %typemap(out) OGRErr */
14406 2 : if ( result != 0 && GetUseExceptions()) {
14407 0 : const char* pszMessage = CPLGetLastErrorMsg();
14408 0 : if( pszMessage[0] != '\0' )
14409 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14410 : else
14411 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14412 0 : SWIG_fail;
14413 : }
14414 : }
14415 2 : {
14416 : /* %typemap(ret) OGRErr */
14417 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14418 2 : resultobj = PyLong_FromLong( result );
14419 : }
14420 : }
14421 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; } }
14422 : return resultobj;
14423 : fail:
14424 : return NULL;
14425 : }
14426 :
14427 :
14428 7 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromPCI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14429 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14430 7 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14431 7 : char *arg2 = (char *) 0 ;
14432 7 : char *arg3 = (char *) "METRE" ;
14433 7 : double *arg4 = (double *) (double *)0 ;
14434 7 : void *argp1 = 0 ;
14435 7 : int res1 = 0 ;
14436 7 : int res2 ;
14437 7 : char *buf2 = 0 ;
14438 7 : int alloc2 = 0 ;
14439 7 : int res3 ;
14440 7 : char *buf3 = 0 ;
14441 7 : int alloc3 = 0 ;
14442 7 : double argin4[17] ;
14443 7 : PyObject *swig_obj[4] ;
14444 7 : OGRErr result;
14445 :
14446 7 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromPCI", 2, 4, swig_obj)) SWIG_fail;
14447 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14448 7 : if (!SWIG_IsOK(res1)) {
14449 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromPCI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14450 : }
14451 7 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14452 7 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14453 7 : if (!SWIG_IsOK(res2)) {
14454 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromPCI" "', argument " "2"" of type '" "char const *""'");
14455 : }
14456 7 : arg2 = reinterpret_cast< char * >(buf2);
14457 7 : if (swig_obj[2]) {
14458 7 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
14459 7 : if (!SWIG_IsOK(res3)) {
14460 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromPCI" "', argument " "3"" of type '" "char const *""'");
14461 : }
14462 7 : arg3 = reinterpret_cast< char * >(buf3);
14463 : }
14464 7 : if (swig_obj[3]) {
14465 7 : {
14466 : /* %typemap(in) (double argin4[ANY]) */
14467 7 : arg4 = argin4;
14468 7 : if (! PySequence_Check(swig_obj[3]) ) {
14469 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
14470 0 : SWIG_fail;
14471 : }
14472 7 : Py_ssize_t seq_size = PySequence_Size(swig_obj[3]);
14473 7 : if ( seq_size != 17 ) {
14474 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
14475 0 : SWIG_fail;
14476 : }
14477 126 : for (unsigned int i=0; i<17; i++) {
14478 119 : PyObject *o = PySequence_GetItem(swig_obj[3],i);
14479 119 : double val;
14480 119 : if ( !PyArg_Parse(o, "d", &val ) ) {
14481 0 : PyErr_SetString(PyExc_TypeError, "not a number");
14482 0 : Py_DECREF(o);
14483 0 : SWIG_fail;
14484 : }
14485 119 : arg4[i] = val;
14486 119 : Py_DECREF(o);
14487 : }
14488 : }
14489 : }
14490 7 : {
14491 7 : const int bLocalUseExceptions = GetUseExceptions();
14492 7 : if ( bLocalUseExceptions ) {
14493 7 : pushErrorHandler();
14494 : }
14495 7 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromPCI(arg1,(char const *)arg2,(char const *)arg3,arg4);
14496 7 : if ( bLocalUseExceptions ) {
14497 7 : popErrorHandler();
14498 : }
14499 : #ifndef SED_HACKS
14500 : if ( bLocalUseExceptions ) {
14501 : CPLErr eclass = CPLGetLastErrorType();
14502 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14503 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14504 : }
14505 : }
14506 : #endif
14507 : }
14508 7 : {
14509 : /* %typemap(out) OGRErr */
14510 7 : if ( result != 0 && GetUseExceptions()) {
14511 0 : const char* pszMessage = CPLGetLastErrorMsg();
14512 0 : if( pszMessage[0] != '\0' )
14513 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14514 : else
14515 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14516 0 : SWIG_fail;
14517 : }
14518 : }
14519 7 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14520 7 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14521 7 : {
14522 : /* %typemap(ret) OGRErr */
14523 7 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14524 7 : resultobj = PyLong_FromLong( result );
14525 : }
14526 : }
14527 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; } }
14528 : return resultobj;
14529 0 : fail:
14530 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14531 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14532 : return NULL;
14533 : }
14534 :
14535 :
14536 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromUSGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14537 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14538 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14539 2 : long arg2 ;
14540 2 : long arg3 = (long) 0 ;
14541 2 : double *arg4 = (double *) (double *)0 ;
14542 2 : long arg5 = (long) 0 ;
14543 2 : void *argp1 = 0 ;
14544 2 : int res1 = 0 ;
14545 2 : long val2 ;
14546 2 : int ecode2 = 0 ;
14547 2 : long val3 ;
14548 2 : int ecode3 = 0 ;
14549 2 : double argin4[15] ;
14550 2 : long val5 ;
14551 2 : int ecode5 = 0 ;
14552 2 : PyObject *swig_obj[5] ;
14553 2 : OGRErr result;
14554 :
14555 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromUSGS", 2, 5, swig_obj)) SWIG_fail;
14556 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14557 2 : if (!SWIG_IsOK(res1)) {
14558 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14559 : }
14560 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14561 2 : ecode2 = SWIG_AsVal_long(swig_obj[1], &val2);
14562 2 : if (!SWIG_IsOK(ecode2)) {
14563 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "2"" of type '" "long""'");
14564 : }
14565 2 : arg2 = static_cast< long >(val2);
14566 2 : if (swig_obj[2]) {
14567 2 : ecode3 = SWIG_AsVal_long(swig_obj[2], &val3);
14568 2 : if (!SWIG_IsOK(ecode3)) {
14569 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "3"" of type '" "long""'");
14570 : }
14571 2 : arg3 = static_cast< long >(val3);
14572 : }
14573 2 : if (swig_obj[3]) {
14574 2 : {
14575 : /* %typemap(in) (double argin4[ANY]) */
14576 2 : arg4 = argin4;
14577 2 : if (! PySequence_Check(swig_obj[3]) ) {
14578 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
14579 0 : SWIG_fail;
14580 : }
14581 2 : Py_ssize_t seq_size = PySequence_Size(swig_obj[3]);
14582 2 : if ( seq_size != 15 ) {
14583 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
14584 0 : SWIG_fail;
14585 : }
14586 32 : for (unsigned int i=0; i<15; i++) {
14587 30 : PyObject *o = PySequence_GetItem(swig_obj[3],i);
14588 30 : double val;
14589 30 : if ( !PyArg_Parse(o, "d", &val ) ) {
14590 0 : PyErr_SetString(PyExc_TypeError, "not a number");
14591 0 : Py_DECREF(o);
14592 0 : SWIG_fail;
14593 : }
14594 30 : arg4[i] = val;
14595 30 : Py_DECREF(o);
14596 : }
14597 : }
14598 : }
14599 2 : if (swig_obj[4]) {
14600 2 : ecode5 = SWIG_AsVal_long(swig_obj[4], &val5);
14601 2 : if (!SWIG_IsOK(ecode5)) {
14602 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "5"" of type '" "long""'");
14603 : }
14604 2 : arg5 = static_cast< long >(val5);
14605 : }
14606 2 : {
14607 2 : const int bLocalUseExceptions = GetUseExceptions();
14608 2 : if ( bLocalUseExceptions ) {
14609 2 : pushErrorHandler();
14610 : }
14611 2 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUSGS(arg1,arg2,arg3,arg4,arg5);
14612 2 : if ( bLocalUseExceptions ) {
14613 2 : popErrorHandler();
14614 : }
14615 : #ifndef SED_HACKS
14616 : if ( bLocalUseExceptions ) {
14617 : CPLErr eclass = CPLGetLastErrorType();
14618 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14619 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14620 : }
14621 : }
14622 : #endif
14623 : }
14624 2 : {
14625 : /* %typemap(out) OGRErr */
14626 2 : if ( result != 0 && GetUseExceptions()) {
14627 0 : const char* pszMessage = CPLGetLastErrorMsg();
14628 0 : if( pszMessage[0] != '\0' )
14629 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14630 : else
14631 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14632 0 : SWIG_fail;
14633 : }
14634 : }
14635 2 : {
14636 : /* %typemap(ret) OGRErr */
14637 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14638 2 : resultobj = PyLong_FromLong( result );
14639 : }
14640 : }
14641 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; } }
14642 : return resultobj;
14643 : fail:
14644 : return NULL;
14645 : }
14646 :
14647 :
14648 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromXML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14649 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14650 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14651 1 : char *arg2 = (char *) 0 ;
14652 1 : void *argp1 = 0 ;
14653 1 : int res1 = 0 ;
14654 1 : int res2 ;
14655 1 : char *buf2 = 0 ;
14656 1 : int alloc2 = 0 ;
14657 1 : PyObject *swig_obj[2] ;
14658 1 : OGRErr result;
14659 :
14660 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromXML", 2, 2, swig_obj)) SWIG_fail;
14661 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14662 1 : if (!SWIG_IsOK(res1)) {
14663 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromXML" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14664 : }
14665 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14666 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14667 1 : if (!SWIG_IsOK(res2)) {
14668 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromXML" "', argument " "2"" of type '" "char const *""'");
14669 : }
14670 1 : arg2 = reinterpret_cast< char * >(buf2);
14671 1 : {
14672 1 : const int bLocalUseExceptions = GetUseExceptions();
14673 1 : if ( bLocalUseExceptions ) {
14674 1 : pushErrorHandler();
14675 : }
14676 1 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromXML(arg1,(char const *)arg2);
14677 1 : if ( bLocalUseExceptions ) {
14678 1 : popErrorHandler();
14679 : }
14680 : #ifndef SED_HACKS
14681 : if ( bLocalUseExceptions ) {
14682 : CPLErr eclass = CPLGetLastErrorType();
14683 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14684 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14685 : }
14686 : }
14687 : #endif
14688 : }
14689 1 : {
14690 : /* %typemap(out) OGRErr */
14691 1 : if ( result != 0 && GetUseExceptions()) {
14692 0 : const char* pszMessage = CPLGetLastErrorMsg();
14693 0 : if( pszMessage[0] != '\0' )
14694 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14695 : else
14696 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14697 0 : SWIG_fail;
14698 : }
14699 : }
14700 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14701 1 : {
14702 : /* %typemap(ret) OGRErr */
14703 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14704 1 : resultobj = PyLong_FromLong( result );
14705 : }
14706 : }
14707 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; } }
14708 : return resultobj;
14709 0 : fail:
14710 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14711 : return NULL;
14712 : }
14713 :
14714 :
14715 7 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromERM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14716 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14717 7 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14718 7 : char *arg2 = (char *) 0 ;
14719 7 : char *arg3 = (char *) 0 ;
14720 7 : char *arg4 = (char *) 0 ;
14721 7 : void *argp1 = 0 ;
14722 7 : int res1 = 0 ;
14723 7 : int res2 ;
14724 7 : char *buf2 = 0 ;
14725 7 : int alloc2 = 0 ;
14726 7 : int res3 ;
14727 7 : char *buf3 = 0 ;
14728 7 : int alloc3 = 0 ;
14729 7 : int res4 ;
14730 7 : char *buf4 = 0 ;
14731 7 : int alloc4 = 0 ;
14732 7 : PyObject *swig_obj[4] ;
14733 7 : OGRErr result;
14734 :
14735 7 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromERM", 4, 4, swig_obj)) SWIG_fail;
14736 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14737 7 : if (!SWIG_IsOK(res1)) {
14738 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromERM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14739 : }
14740 7 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14741 7 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14742 7 : if (!SWIG_IsOK(res2)) {
14743 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromERM" "', argument " "2"" of type '" "char const *""'");
14744 : }
14745 7 : arg2 = reinterpret_cast< char * >(buf2);
14746 7 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
14747 7 : if (!SWIG_IsOK(res3)) {
14748 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromERM" "', argument " "3"" of type '" "char const *""'");
14749 : }
14750 7 : arg3 = reinterpret_cast< char * >(buf3);
14751 7 : res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
14752 7 : if (!SWIG_IsOK(res4)) {
14753 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_ImportFromERM" "', argument " "4"" of type '" "char const *""'");
14754 : }
14755 7 : arg4 = reinterpret_cast< char * >(buf4);
14756 7 : {
14757 7 : if (!arg2) {
14758 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14759 : }
14760 : }
14761 7 : {
14762 7 : if (!arg3) {
14763 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14764 : }
14765 : }
14766 7 : {
14767 7 : const int bLocalUseExceptions = GetUseExceptions();
14768 7 : if ( bLocalUseExceptions ) {
14769 7 : pushErrorHandler();
14770 : }
14771 7 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromERM(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
14772 7 : if ( bLocalUseExceptions ) {
14773 7 : popErrorHandler();
14774 : }
14775 : #ifndef SED_HACKS
14776 : if ( bLocalUseExceptions ) {
14777 : CPLErr eclass = CPLGetLastErrorType();
14778 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14779 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14780 : }
14781 : }
14782 : #endif
14783 : }
14784 7 : {
14785 : /* %typemap(out) OGRErr */
14786 7 : if ( result != 0 && GetUseExceptions()) {
14787 0 : const char* pszMessage = CPLGetLastErrorMsg();
14788 0 : if( pszMessage[0] != '\0' )
14789 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14790 : else
14791 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14792 0 : SWIG_fail;
14793 : }
14794 : }
14795 7 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14796 7 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14797 7 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
14798 7 : {
14799 : /* %typemap(ret) OGRErr */
14800 7 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14801 7 : resultobj = PyLong_FromLong( result );
14802 : }
14803 : }
14804 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; } }
14805 : return resultobj;
14806 0 : fail:
14807 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14808 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14809 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
14810 : return NULL;
14811 : }
14812 :
14813 :
14814 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromMICoordSys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14815 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14816 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14817 3 : char *arg2 = (char *) 0 ;
14818 3 : void *argp1 = 0 ;
14819 3 : int res1 = 0 ;
14820 3 : int res2 ;
14821 3 : char *buf2 = 0 ;
14822 3 : int alloc2 = 0 ;
14823 3 : PyObject *swig_obj[2] ;
14824 3 : OGRErr result;
14825 :
14826 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromMICoordSys", 2, 2, swig_obj)) SWIG_fail;
14827 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14828 3 : if (!SWIG_IsOK(res1)) {
14829 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromMICoordSys" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14830 : }
14831 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14832 3 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14833 3 : if (!SWIG_IsOK(res2)) {
14834 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromMICoordSys" "', argument " "2"" of type '" "char const *""'");
14835 : }
14836 3 : arg2 = reinterpret_cast< char * >(buf2);
14837 3 : {
14838 3 : const int bLocalUseExceptions = GetUseExceptions();
14839 3 : if ( bLocalUseExceptions ) {
14840 2 : pushErrorHandler();
14841 : }
14842 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromMICoordSys(arg1,(char const *)arg2);
14843 3 : if ( bLocalUseExceptions ) {
14844 2 : popErrorHandler();
14845 : }
14846 : #ifndef SED_HACKS
14847 : if ( bLocalUseExceptions ) {
14848 : CPLErr eclass = CPLGetLastErrorType();
14849 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14850 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14851 : }
14852 : }
14853 : #endif
14854 : }
14855 3 : {
14856 : /* %typemap(out) OGRErr */
14857 3 : if ( result != 0 && GetUseExceptions()) {
14858 0 : const char* pszMessage = CPLGetLastErrorMsg();
14859 0 : if( pszMessage[0] != '\0' )
14860 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14861 : else
14862 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14863 0 : SWIG_fail;
14864 : }
14865 : }
14866 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14867 3 : {
14868 : /* %typemap(ret) OGRErr */
14869 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14870 3 : resultobj = PyLong_FromLong( result );
14871 : }
14872 : }
14873 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; } }
14874 : return resultobj;
14875 0 : fail:
14876 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14877 : return NULL;
14878 : }
14879 :
14880 :
14881 12 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromISISPVL(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14882 12 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14883 12 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14884 12 : char *arg2 = (char *) 0 ;
14885 12 : void *argp1 = 0 ;
14886 12 : int res1 = 0 ;
14887 12 : int res2 ;
14888 12 : char *buf2 = 0 ;
14889 12 : int alloc2 = 0 ;
14890 12 : PyObject *swig_obj[2] ;
14891 12 : OGRErr result;
14892 :
14893 12 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromISISPVL", 2, 2, swig_obj)) SWIG_fail;
14894 12 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14895 12 : if (!SWIG_IsOK(res1)) {
14896 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromISISPVL" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14897 : }
14898 12 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14899 12 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14900 12 : if (!SWIG_IsOK(res2)) {
14901 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromISISPVL" "', argument " "2"" of type '" "char const *""'");
14902 : }
14903 12 : arg2 = reinterpret_cast< char * >(buf2);
14904 12 : {
14905 12 : const int bLocalUseExceptions = GetUseExceptions();
14906 12 : if ( bLocalUseExceptions ) {
14907 12 : pushErrorHandler();
14908 : }
14909 12 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromISISPVL(arg1,(char const *)arg2);
14910 12 : if ( bLocalUseExceptions ) {
14911 12 : popErrorHandler();
14912 : }
14913 : #ifndef SED_HACKS
14914 : if ( bLocalUseExceptions ) {
14915 : CPLErr eclass = CPLGetLastErrorType();
14916 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14917 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14918 : }
14919 : }
14920 : #endif
14921 : }
14922 12 : {
14923 : /* %typemap(out) OGRErr */
14924 13 : if ( result != 0 && GetUseExceptions()) {
14925 1 : const char* pszMessage = CPLGetLastErrorMsg();
14926 1 : if( pszMessage[0] != '\0' )
14927 1 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14928 : else
14929 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14930 1 : SWIG_fail;
14931 : }
14932 : }
14933 11 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14934 11 : {
14935 : /* %typemap(ret) OGRErr */
14936 11 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14937 11 : resultobj = PyLong_FromLong( result );
14938 : }
14939 : }
14940 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; } }
14941 : return resultobj;
14942 1 : fail:
14943 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14944 : return NULL;
14945 : }
14946 :
14947 :
14948 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromOzi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14949 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14950 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14951 3 : char **arg2 = (char **) 0 ;
14952 3 : void *argp1 = 0 ;
14953 3 : int res1 = 0 ;
14954 3 : PyObject *swig_obj[2] ;
14955 3 : OGRErr result;
14956 :
14957 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromOzi", 2, 2, swig_obj)) SWIG_fail;
14958 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14959 3 : if (!SWIG_IsOK(res1)) {
14960 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromOzi" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14961 : }
14962 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14963 3 : {
14964 : /* %typemap(in) char **dict */
14965 3 : arg2 = NULL;
14966 3 : if ( PySequence_Check( swig_obj[1] ) ) {
14967 3 : int bErr = FALSE;
14968 3 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
14969 3 : if ( bErr )
14970 : {
14971 0 : SWIG_fail;
14972 : }
14973 : }
14974 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
14975 0 : int bErr = FALSE;
14976 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
14977 0 : if ( bErr )
14978 : {
14979 0 : SWIG_fail;
14980 : }
14981 : }
14982 : else {
14983 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
14984 0 : SWIG_fail;
14985 : }
14986 : }
14987 3 : {
14988 3 : if (!arg2) {
14989 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14990 : }
14991 : }
14992 3 : {
14993 3 : const int bLocalUseExceptions = GetUseExceptions();
14994 3 : if ( bLocalUseExceptions ) {
14995 3 : pushErrorHandler();
14996 : }
14997 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromOzi(arg1,(char const *const *)arg2);
14998 3 : if ( bLocalUseExceptions ) {
14999 3 : popErrorHandler();
15000 : }
15001 : #ifndef SED_HACKS
15002 : if ( bLocalUseExceptions ) {
15003 : CPLErr eclass = CPLGetLastErrorType();
15004 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15005 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15006 : }
15007 : }
15008 : #endif
15009 : }
15010 3 : {
15011 : /* %typemap(out) OGRErr */
15012 3 : if ( result != 0 && GetUseExceptions()) {
15013 0 : const char* pszMessage = CPLGetLastErrorMsg();
15014 0 : if( pszMessage[0] != '\0' )
15015 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15016 : else
15017 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15018 0 : SWIG_fail;
15019 : }
15020 : }
15021 3 : {
15022 : /* %typemap(freearg) char **dict */
15023 3 : CSLDestroy( arg2 );
15024 : }
15025 3 : {
15026 : /* %typemap(ret) OGRErr */
15027 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15028 3 : resultobj = PyLong_FromLong( result );
15029 : }
15030 : }
15031 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; } }
15032 : return resultobj;
15033 0 : fail:
15034 0 : {
15035 : /* %typemap(freearg) char **dict */
15036 0 : CSLDestroy( arg2 );
15037 : }
15038 : return NULL;
15039 : }
15040 :
15041 :
15042 4 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromCF1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15043 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15044 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15045 4 : char **arg2 = (char **) 0 ;
15046 4 : char *arg3 = (char *) NULL ;
15047 4 : void *argp1 = 0 ;
15048 4 : int res1 = 0 ;
15049 4 : int res3 ;
15050 4 : char *buf3 = 0 ;
15051 4 : int alloc3 = 0 ;
15052 4 : PyObject *swig_obj[3] ;
15053 4 : OGRErr result;
15054 :
15055 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromCF1", 2, 3, swig_obj)) SWIG_fail;
15056 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15057 4 : if (!SWIG_IsOK(res1)) {
15058 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromCF1" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15059 : }
15060 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15061 4 : {
15062 : /* %typemap(in) char **dict */
15063 4 : arg2 = NULL;
15064 4 : if ( PySequence_Check( swig_obj[1] ) ) {
15065 0 : int bErr = FALSE;
15066 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
15067 0 : if ( bErr )
15068 : {
15069 0 : SWIG_fail;
15070 : }
15071 : }
15072 4 : else if ( PyMapping_Check( swig_obj[1] ) ) {
15073 4 : int bErr = FALSE;
15074 4 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
15075 4 : if ( bErr )
15076 : {
15077 0 : SWIG_fail;
15078 : }
15079 : }
15080 : else {
15081 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15082 0 : SWIG_fail;
15083 : }
15084 : }
15085 4 : if (swig_obj[2]) {
15086 4 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
15087 4 : if (!SWIG_IsOK(res3)) {
15088 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromCF1" "', argument " "3"" of type '" "char const *""'");
15089 : }
15090 4 : arg3 = reinterpret_cast< char * >(buf3);
15091 : }
15092 4 : {
15093 4 : const int bLocalUseExceptions = GetUseExceptions();
15094 4 : if ( bLocalUseExceptions ) {
15095 4 : pushErrorHandler();
15096 : }
15097 4 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromCF1(arg1,arg2,(char const *)arg3);
15098 4 : if ( bLocalUseExceptions ) {
15099 4 : popErrorHandler();
15100 : }
15101 : #ifndef SED_HACKS
15102 : if ( bLocalUseExceptions ) {
15103 : CPLErr eclass = CPLGetLastErrorType();
15104 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15105 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15106 : }
15107 : }
15108 : #endif
15109 : }
15110 4 : {
15111 : /* %typemap(out) OGRErr */
15112 4 : if ( result != 0 && GetUseExceptions()) {
15113 0 : const char* pszMessage = CPLGetLastErrorMsg();
15114 0 : if( pszMessage[0] != '\0' )
15115 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15116 : else
15117 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15118 0 : SWIG_fail;
15119 : }
15120 : }
15121 4 : {
15122 : /* %typemap(freearg) char **dict */
15123 4 : CSLDestroy( arg2 );
15124 : }
15125 4 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
15126 4 : {
15127 : /* %typemap(ret) OGRErr */
15128 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15129 4 : resultobj = PyLong_FromLong( result );
15130 : }
15131 : }
15132 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; } }
15133 : return resultobj;
15134 0 : fail:
15135 0 : {
15136 : /* %typemap(freearg) char **dict */
15137 0 : CSLDestroy( arg2 );
15138 : }
15139 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
15140 : return NULL;
15141 : }
15142 :
15143 :
15144 1295 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15145 1295 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15146 1295 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15147 1295 : char **arg2 = (char **) 0 ;
15148 1295 : char **arg3 = (char **) NULL ;
15149 1295 : void *argp1 = 0 ;
15150 1295 : int res1 = 0 ;
15151 1295 : char *argout2 = 0 ;
15152 1295 : PyObject *swig_obj[2] ;
15153 1295 : OGRErr result;
15154 :
15155 1295 : {
15156 : /* %typemap(in,numinputs=0) (char **argout2) */
15157 1295 : arg2 = &argout2;
15158 : }
15159 1295 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToWkt", 1, 2, swig_obj)) SWIG_fail;
15160 1295 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15161 1295 : if (!SWIG_IsOK(res1)) {
15162 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15163 : }
15164 1295 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15165 1295 : if (swig_obj[1]) {
15166 28 : {
15167 : /* %typemap(in) char **dict */
15168 28 : arg3 = NULL;
15169 28 : if ( PySequence_Check( swig_obj[1] ) ) {
15170 28 : int bErr = FALSE;
15171 28 : arg3 = CSLFromPySequence(swig_obj[1], &bErr);
15172 28 : if ( bErr )
15173 : {
15174 0 : SWIG_fail;
15175 : }
15176 : }
15177 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
15178 0 : int bErr = FALSE;
15179 0 : arg3 = CSLFromPyMapping(swig_obj[1], &bErr);
15180 0 : if ( bErr )
15181 : {
15182 0 : SWIG_fail;
15183 : }
15184 : }
15185 : else {
15186 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15187 0 : SWIG_fail;
15188 : }
15189 : }
15190 : }
15191 1295 : {
15192 1295 : const int bLocalUseExceptions = GetUseExceptions();
15193 1295 : if ( bLocalUseExceptions ) {
15194 1027 : pushErrorHandler();
15195 : }
15196 1295 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToWkt(arg1,arg2,arg3);
15197 1295 : if ( bLocalUseExceptions ) {
15198 1027 : popErrorHandler();
15199 : }
15200 : #ifndef SED_HACKS
15201 : if ( bLocalUseExceptions ) {
15202 : CPLErr eclass = CPLGetLastErrorType();
15203 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15204 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15205 : }
15206 : }
15207 : #endif
15208 : }
15209 1295 : {
15210 : /* %typemap(out) OGRErr */
15211 1295 : if ( result != 0 && GetUseExceptions()) {
15212 0 : const char* pszMessage = CPLGetLastErrorMsg();
15213 0 : if( pszMessage[0] != '\0' )
15214 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15215 : else
15216 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15217 0 : SWIG_fail;
15218 : }
15219 : }
15220 1295 : {
15221 : /* %typemap(argout) (char **argout) */
15222 1295 : PyObject *o;
15223 1295 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15224 1295 : o = GDALPythonObjectFromCStr( *arg2 );
15225 : }
15226 : else {
15227 0 : o = Py_None;
15228 0 : Py_INCREF( o );
15229 : }
15230 : #if SWIG_VERSION >= 0x040300
15231 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15232 : #else
15233 1295 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15234 : #endif
15235 : }
15236 1295 : {
15237 : /* %typemap(freearg) (char **argout) */
15238 1295 : if ( *arg2 )
15239 1295 : CPLFree( *arg2 );
15240 : }
15241 1295 : {
15242 : /* %typemap(freearg) char **dict */
15243 1295 : CSLDestroy( arg3 );
15244 : }
15245 1295 : {
15246 : /* %typemap(ret) OGRErr */
15247 2590 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15248 0 : resultobj = PyLong_FromLong( result );
15249 : }
15250 : }
15251 1295 : 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; } }
15252 : return resultobj;
15253 0 : fail:
15254 0 : {
15255 : /* %typemap(freearg) (char **argout) */
15256 0 : if ( *arg2 )
15257 0 : CPLFree( *arg2 );
15258 : }
15259 0 : {
15260 : /* %typemap(freearg) char **dict */
15261 0 : CSLDestroy( arg3 );
15262 : }
15263 : return NULL;
15264 : }
15265 :
15266 :
15267 50 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPrettyWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15268 50 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15269 50 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15270 50 : char **arg2 = (char **) 0 ;
15271 50 : int arg3 = (int) 0 ;
15272 50 : void *argp1 = 0 ;
15273 50 : int res1 = 0 ;
15274 50 : char *argout2 = 0 ;
15275 50 : int val3 ;
15276 50 : int ecode3 = 0 ;
15277 50 : PyObject *swig_obj[2] ;
15278 50 : OGRErr result;
15279 :
15280 50 : {
15281 : /* %typemap(in,numinputs=0) (char **argout2) */
15282 50 : arg2 = &argout2;
15283 : }
15284 50 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToPrettyWkt", 1, 2, swig_obj)) SWIG_fail;
15285 50 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15286 50 : if (!SWIG_IsOK(res1)) {
15287 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPrettyWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15288 : }
15289 50 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15290 50 : if (swig_obj[1]) {
15291 14 : ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
15292 14 : if (!SWIG_IsOK(ecode3)) {
15293 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_ExportToPrettyWkt" "', argument " "3"" of type '" "int""'");
15294 : }
15295 : arg3 = static_cast< int >(val3);
15296 : }
15297 50 : {
15298 50 : const int bLocalUseExceptions = GetUseExceptions();
15299 50 : if ( bLocalUseExceptions ) {
15300 22 : pushErrorHandler();
15301 : }
15302 50 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPrettyWkt(arg1,arg2,arg3);
15303 50 : if ( bLocalUseExceptions ) {
15304 22 : popErrorHandler();
15305 : }
15306 : #ifndef SED_HACKS
15307 : if ( bLocalUseExceptions ) {
15308 : CPLErr eclass = CPLGetLastErrorType();
15309 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15310 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15311 : }
15312 : }
15313 : #endif
15314 : }
15315 50 : {
15316 : /* %typemap(out) OGRErr */
15317 50 : if ( result != 0 && GetUseExceptions()) {
15318 0 : const char* pszMessage = CPLGetLastErrorMsg();
15319 0 : if( pszMessage[0] != '\0' )
15320 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15321 : else
15322 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15323 0 : SWIG_fail;
15324 : }
15325 : }
15326 50 : {
15327 : /* %typemap(argout) (char **argout) */
15328 50 : PyObject *o;
15329 50 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15330 50 : o = GDALPythonObjectFromCStr( *arg2 );
15331 : }
15332 : else {
15333 0 : o = Py_None;
15334 0 : Py_INCREF( o );
15335 : }
15336 : #if SWIG_VERSION >= 0x040300
15337 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15338 : #else
15339 50 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15340 : #endif
15341 : }
15342 50 : {
15343 : /* %typemap(freearg) (char **argout) */
15344 50 : if ( *arg2 )
15345 50 : CPLFree( *arg2 );
15346 : }
15347 50 : {
15348 : /* %typemap(ret) OGRErr */
15349 100 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15350 0 : resultobj = PyLong_FromLong( result );
15351 : }
15352 : }
15353 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; } }
15354 : return resultobj;
15355 0 : fail:
15356 0 : {
15357 : /* %typemap(freearg) (char **argout) */
15358 0 : if ( *arg2 )
15359 0 : CPLFree( *arg2 );
15360 : }
15361 : return NULL;
15362 : }
15363 :
15364 :
15365 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPROJJSON(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15366 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15367 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15368 2 : char **arg2 = (char **) 0 ;
15369 2 : char **arg3 = (char **) NULL ;
15370 2 : void *argp1 = 0 ;
15371 2 : int res1 = 0 ;
15372 2 : char *argout2 = 0 ;
15373 2 : PyObject *swig_obj[2] ;
15374 2 : OGRErr result;
15375 :
15376 2 : {
15377 : /* %typemap(in,numinputs=0) (char **argout2) */
15378 2 : arg2 = &argout2;
15379 : }
15380 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToPROJJSON", 1, 2, swig_obj)) SWIG_fail;
15381 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15382 2 : if (!SWIG_IsOK(res1)) {
15383 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPROJJSON" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15384 : }
15385 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15386 2 : if (swig_obj[1]) {
15387 0 : {
15388 : /* %typemap(in) char **dict */
15389 0 : arg3 = NULL;
15390 0 : if ( PySequence_Check( swig_obj[1] ) ) {
15391 0 : int bErr = FALSE;
15392 0 : arg3 = CSLFromPySequence(swig_obj[1], &bErr);
15393 0 : if ( bErr )
15394 : {
15395 0 : SWIG_fail;
15396 : }
15397 : }
15398 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
15399 0 : int bErr = FALSE;
15400 0 : arg3 = CSLFromPyMapping(swig_obj[1], &bErr);
15401 0 : if ( bErr )
15402 : {
15403 0 : SWIG_fail;
15404 : }
15405 : }
15406 : else {
15407 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15408 0 : SWIG_fail;
15409 : }
15410 : }
15411 : }
15412 2 : {
15413 2 : const int bLocalUseExceptions = GetUseExceptions();
15414 2 : if ( bLocalUseExceptions ) {
15415 2 : pushErrorHandler();
15416 : }
15417 2 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPROJJSON(arg1,arg2,arg3);
15418 2 : if ( bLocalUseExceptions ) {
15419 2 : popErrorHandler();
15420 : }
15421 : #ifndef SED_HACKS
15422 : if ( bLocalUseExceptions ) {
15423 : CPLErr eclass = CPLGetLastErrorType();
15424 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15425 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15426 : }
15427 : }
15428 : #endif
15429 : }
15430 2 : {
15431 : /* %typemap(out) OGRErr */
15432 2 : if ( result != 0 && GetUseExceptions()) {
15433 0 : const char* pszMessage = CPLGetLastErrorMsg();
15434 0 : if( pszMessage[0] != '\0' )
15435 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15436 : else
15437 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15438 0 : SWIG_fail;
15439 : }
15440 : }
15441 2 : {
15442 : /* %typemap(argout) (char **argout) */
15443 2 : PyObject *o;
15444 2 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15445 2 : o = GDALPythonObjectFromCStr( *arg2 );
15446 : }
15447 : else {
15448 0 : o = Py_None;
15449 0 : Py_INCREF( o );
15450 : }
15451 : #if SWIG_VERSION >= 0x040300
15452 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15453 : #else
15454 2 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15455 : #endif
15456 : }
15457 2 : {
15458 : /* %typemap(freearg) (char **argout) */
15459 2 : if ( *arg2 )
15460 2 : CPLFree( *arg2 );
15461 : }
15462 2 : {
15463 : /* %typemap(freearg) char **dict */
15464 2 : CSLDestroy( arg3 );
15465 : }
15466 2 : {
15467 : /* %typemap(ret) OGRErr */
15468 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15469 0 : resultobj = PyLong_FromLong( result );
15470 : }
15471 : }
15472 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; } }
15473 : return resultobj;
15474 0 : fail:
15475 0 : {
15476 : /* %typemap(freearg) (char **argout) */
15477 0 : if ( *arg2 )
15478 0 : CPLFree( *arg2 );
15479 : }
15480 0 : {
15481 : /* %typemap(freearg) char **dict */
15482 0 : CSLDestroy( arg3 );
15483 : }
15484 : return NULL;
15485 : }
15486 :
15487 :
15488 321 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToProj4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15489 321 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15490 321 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15491 321 : char **arg2 = (char **) 0 ;
15492 321 : void *argp1 = 0 ;
15493 321 : int res1 = 0 ;
15494 321 : char *argout2 = 0 ;
15495 321 : PyObject *swig_obj[1] ;
15496 321 : OGRErr result;
15497 :
15498 321 : {
15499 : /* %typemap(in,numinputs=0) (char **argout2) */
15500 321 : arg2 = &argout2;
15501 : }
15502 321 : if (!args) SWIG_fail;
15503 321 : swig_obj[0] = args;
15504 321 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15505 321 : if (!SWIG_IsOK(res1)) {
15506 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToProj4" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15507 : }
15508 321 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15509 321 : {
15510 321 : const int bLocalUseExceptions = GetUseExceptions();
15511 321 : if ( bLocalUseExceptions ) {
15512 216 : pushErrorHandler();
15513 : }
15514 321 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToProj4(arg1,arg2);
15515 321 : if ( bLocalUseExceptions ) {
15516 216 : popErrorHandler();
15517 : }
15518 : #ifndef SED_HACKS
15519 : if ( bLocalUseExceptions ) {
15520 : CPLErr eclass = CPLGetLastErrorType();
15521 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15522 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15523 : }
15524 : }
15525 : #endif
15526 : }
15527 321 : {
15528 : /* %typemap(out) OGRErr */
15529 325 : if ( result != 0 && GetUseExceptions()) {
15530 3 : const char* pszMessage = CPLGetLastErrorMsg();
15531 3 : if( pszMessage[0] != '\0' )
15532 3 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15533 : else
15534 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15535 3 : SWIG_fail;
15536 : }
15537 : }
15538 318 : {
15539 : /* %typemap(argout) (char **argout) */
15540 318 : PyObject *o;
15541 318 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15542 318 : o = GDALPythonObjectFromCStr( *arg2 );
15543 : }
15544 : else {
15545 0 : o = Py_None;
15546 0 : Py_INCREF( o );
15547 : }
15548 : #if SWIG_VERSION >= 0x040300
15549 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15550 : #else
15551 318 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15552 : #endif
15553 : }
15554 318 : {
15555 : /* %typemap(freearg) (char **argout) */
15556 318 : if ( *arg2 )
15557 318 : CPLFree( *arg2 );
15558 : }
15559 318 : {
15560 : /* %typemap(ret) OGRErr */
15561 636 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15562 0 : resultobj = PyLong_FromLong( result );
15563 : }
15564 : }
15565 321 : 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; } }
15566 : return resultobj;
15567 3 : fail:
15568 3 : {
15569 : /* %typemap(freearg) (char **argout) */
15570 3 : if ( *arg2 )
15571 3 : CPLFree( *arg2 );
15572 : }
15573 : return NULL;
15574 : }
15575 :
15576 :
15577 6 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPCI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15578 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15579 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15580 6 : char **arg2 = (char **) 0 ;
15581 6 : char **arg3 = (char **) 0 ;
15582 6 : double **arg4 ;
15583 6 : void *argp1 = 0 ;
15584 6 : int res1 = 0 ;
15585 6 : char *argout2 = 0 ;
15586 6 : char *argout3 = 0 ;
15587 6 : double *argout4 ;
15588 6 : PyObject *swig_obj[1] ;
15589 6 : OGRErr result;
15590 :
15591 6 : {
15592 : /* %typemap(in,numinputs=0) (char **argout2) */
15593 6 : arg2 = &argout2;
15594 : }
15595 6 : {
15596 : /* %typemap(in,numinputs=0) (char **argout3) */
15597 6 : arg3 = &argout3;
15598 : }
15599 6 : {
15600 : /* %typemap(in,numinputs=0) (double *argout4[ANY]) */
15601 6 : argout4 = NULL;
15602 6 : arg4 = &argout4;
15603 : }
15604 6 : if (!args) SWIG_fail;
15605 6 : swig_obj[0] = args;
15606 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15607 6 : if (!SWIG_IsOK(res1)) {
15608 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPCI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15609 : }
15610 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15611 6 : {
15612 6 : const int bLocalUseExceptions = GetUseExceptions();
15613 6 : if ( bLocalUseExceptions ) {
15614 6 : pushErrorHandler();
15615 : }
15616 6 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPCI(arg1,arg2,arg3,arg4);
15617 6 : if ( bLocalUseExceptions ) {
15618 6 : popErrorHandler();
15619 : }
15620 : #ifndef SED_HACKS
15621 : if ( bLocalUseExceptions ) {
15622 : CPLErr eclass = CPLGetLastErrorType();
15623 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15624 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15625 : }
15626 : }
15627 : #endif
15628 : }
15629 6 : {
15630 : /* %typemap(out) OGRErr */
15631 6 : if ( result != 0 && GetUseExceptions()) {
15632 0 : const char* pszMessage = CPLGetLastErrorMsg();
15633 0 : if( pszMessage[0] != '\0' )
15634 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15635 : else
15636 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15637 0 : SWIG_fail;
15638 : }
15639 : }
15640 6 : {
15641 : /* %typemap(argout) (char **argout) */
15642 6 : PyObject *o;
15643 6 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15644 6 : o = GDALPythonObjectFromCStr( *arg2 );
15645 : }
15646 : else {
15647 0 : o = Py_None;
15648 0 : Py_INCREF( o );
15649 : }
15650 : #if SWIG_VERSION >= 0x040300
15651 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15652 : #else
15653 6 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15654 : #endif
15655 : }
15656 6 : {
15657 : /* %typemap(argout) (char **argout) */
15658 6 : PyObject *o;
15659 6 : if ( ReturnSame(arg3) != NULL && *arg3 != NULL ) {
15660 6 : o = GDALPythonObjectFromCStr( *arg3 );
15661 : }
15662 : else {
15663 0 : o = Py_None;
15664 0 : Py_INCREF( o );
15665 : }
15666 : #if SWIG_VERSION >= 0x040300
15667 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15668 : #else
15669 6 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15670 : #endif
15671 : }
15672 6 : {
15673 : /* %typemap(argout) (double *argout[ANY]) */
15674 6 : PyObject *out = CreateTupleFromDoubleArray( *arg4, 17 );
15675 : #if SWIG_VERSION >= 0x040300
15676 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
15677 : #else
15678 6 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
15679 : #endif
15680 : }
15681 6 : {
15682 : /* %typemap(freearg) (char **argout) */
15683 6 : if ( *arg2 )
15684 6 : CPLFree( *arg2 );
15685 : }
15686 6 : {
15687 : /* %typemap(freearg) (char **argout) */
15688 6 : if ( *arg3 )
15689 6 : CPLFree( *arg3 );
15690 : }
15691 6 : {
15692 : /* %typemap(freearg) (double *argout[ANY]) */
15693 6 : CPLFree(*arg4);
15694 : }
15695 6 : {
15696 : /* %typemap(ret) OGRErr */
15697 12 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15698 0 : resultobj = PyLong_FromLong( result );
15699 : }
15700 : }
15701 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; } }
15702 : return resultobj;
15703 0 : fail:
15704 0 : {
15705 : /* %typemap(freearg) (char **argout) */
15706 0 : if ( *arg2 )
15707 0 : CPLFree( *arg2 );
15708 : }
15709 0 : {
15710 : /* %typemap(freearg) (char **argout) */
15711 0 : if ( *arg3 )
15712 0 : CPLFree( *arg3 );
15713 : }
15714 0 : {
15715 : /* %typemap(freearg) (double *argout[ANY]) */
15716 0 : CPLFree(*arg4);
15717 : }
15718 : return NULL;
15719 : }
15720 :
15721 :
15722 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToUSGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15723 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15724 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15725 2 : long *arg2 = (long *) 0 ;
15726 2 : long *arg3 = (long *) 0 ;
15727 2 : double **arg4 ;
15728 2 : long *arg5 = (long *) 0 ;
15729 2 : void *argp1 = 0 ;
15730 2 : int res1 = 0 ;
15731 2 : long temp2 ;
15732 2 : int res2 = SWIG_TMPOBJ ;
15733 2 : long temp3 ;
15734 2 : int res3 = SWIG_TMPOBJ ;
15735 2 : double *argout4 ;
15736 2 : long temp5 ;
15737 2 : int res5 = SWIG_TMPOBJ ;
15738 2 : PyObject *swig_obj[1] ;
15739 2 : OGRErr result;
15740 :
15741 2 : arg2 = &temp2;
15742 2 : arg3 = &temp3;
15743 2 : {
15744 : /* %typemap(in,numinputs=0) (double *argout4[ANY]) */
15745 2 : argout4 = NULL;
15746 2 : arg4 = &argout4;
15747 : }
15748 2 : arg5 = &temp5;
15749 2 : if (!args) SWIG_fail;
15750 2 : swig_obj[0] = args;
15751 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15752 2 : if (!SWIG_IsOK(res1)) {
15753 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToUSGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15754 : }
15755 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15756 2 : {
15757 2 : const int bLocalUseExceptions = GetUseExceptions();
15758 2 : if ( bLocalUseExceptions ) {
15759 2 : pushErrorHandler();
15760 : }
15761 2 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToUSGS(arg1,arg2,arg3,arg4,arg5);
15762 2 : if ( bLocalUseExceptions ) {
15763 2 : popErrorHandler();
15764 : }
15765 : #ifndef SED_HACKS
15766 : if ( bLocalUseExceptions ) {
15767 : CPLErr eclass = CPLGetLastErrorType();
15768 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15769 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15770 : }
15771 : }
15772 : #endif
15773 : }
15774 2 : {
15775 : /* %typemap(out) OGRErr */
15776 2 : if ( result != 0 && GetUseExceptions()) {
15777 0 : const char* pszMessage = CPLGetLastErrorMsg();
15778 0 : if( pszMessage[0] != '\0' )
15779 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15780 : else
15781 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15782 0 : SWIG_fail;
15783 : }
15784 : }
15785 2 : if (ReturnSame(SWIG_IsTmpObj(res2))) {
15786 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg2)));
15787 : } else {
15788 0 : int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
15789 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_long, new_flags));
15790 : }
15791 2 : if (ReturnSame(SWIG_IsTmpObj(res3))) {
15792 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg3)));
15793 : } else {
15794 0 : int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
15795 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_long, new_flags));
15796 : }
15797 2 : {
15798 : /* %typemap(argout) (double *argout[ANY]) */
15799 2 : PyObject *out = CreateTupleFromDoubleArray( *arg4, 15 );
15800 : #if SWIG_VERSION >= 0x040300
15801 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
15802 : #else
15803 2 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
15804 : #endif
15805 : }
15806 2 : if (ReturnSame(SWIG_IsTmpObj(res5))) {
15807 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg5)));
15808 : } else {
15809 0 : int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
15810 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_long, new_flags));
15811 : }
15812 2 : {
15813 : /* %typemap(freearg) (double *argout[ANY]) */
15814 2 : CPLFree(*arg4);
15815 : }
15816 2 : {
15817 : /* %typemap(ret) OGRErr */
15818 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15819 0 : resultobj = PyLong_FromLong( result );
15820 : }
15821 : }
15822 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; } }
15823 : return resultobj;
15824 0 : fail:
15825 0 : {
15826 : /* %typemap(freearg) (double *argout[ANY]) */
15827 0 : CPLFree(*arg4);
15828 : }
15829 : return NULL;
15830 : }
15831 :
15832 :
15833 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToERM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15834 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15835 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15836 1 : char **arg2 = (char **) 0 ;
15837 1 : char **arg3 = (char **) 0 ;
15838 1 : char **arg4 = (char **) 0 ;
15839 1 : void *argp1 = 0 ;
15840 1 : int res1 = 0 ;
15841 1 : char *argout2 = 0 ;
15842 1 : char *argout3 = 0 ;
15843 1 : char *argout4 = 0 ;
15844 1 : PyObject *swig_obj[1] ;
15845 1 : OGRErr result;
15846 :
15847 1 : {
15848 : /* %typemap(in,numinputs=0) (char **argout2) */
15849 1 : arg2 = &argout2;
15850 : }
15851 1 : {
15852 : /* %typemap(in,numinputs=0) (char **argout3) */
15853 1 : arg3 = &argout3;
15854 : }
15855 1 : {
15856 : /* %typemap(in,numinputs=0) (char **argout4) */
15857 1 : arg4 = &argout4;
15858 : }
15859 1 : if (!args) SWIG_fail;
15860 1 : swig_obj[0] = args;
15861 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15862 1 : if (!SWIG_IsOK(res1)) {
15863 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToERM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15864 : }
15865 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15866 1 : {
15867 1 : const int bLocalUseExceptions = GetUseExceptions();
15868 1 : if ( bLocalUseExceptions ) {
15869 1 : pushErrorHandler();
15870 : }
15871 1 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToERM(arg1,arg2,arg3,arg4);
15872 1 : if ( bLocalUseExceptions ) {
15873 1 : popErrorHandler();
15874 : }
15875 : #ifndef SED_HACKS
15876 : if ( bLocalUseExceptions ) {
15877 : CPLErr eclass = CPLGetLastErrorType();
15878 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15879 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15880 : }
15881 : }
15882 : #endif
15883 : }
15884 1 : {
15885 : /* %typemap(out) OGRErr */
15886 1 : if ( result != 0 && GetUseExceptions()) {
15887 0 : const char* pszMessage = CPLGetLastErrorMsg();
15888 0 : if( pszMessage[0] != '\0' )
15889 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15890 : else
15891 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15892 0 : SWIG_fail;
15893 : }
15894 : }
15895 1 : {
15896 : /* %typemap(argout) (char **argout) */
15897 1 : PyObject *o;
15898 1 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15899 1 : o = GDALPythonObjectFromCStr( *arg2 );
15900 : }
15901 : else {
15902 0 : o = Py_None;
15903 0 : Py_INCREF( o );
15904 : }
15905 : #if SWIG_VERSION >= 0x040300
15906 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15907 : #else
15908 1 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15909 : #endif
15910 : }
15911 1 : {
15912 : /* %typemap(argout) (char **argout) */
15913 1 : PyObject *o;
15914 1 : if ( ReturnSame(arg3) != NULL && *arg3 != NULL ) {
15915 1 : o = GDALPythonObjectFromCStr( *arg3 );
15916 : }
15917 : else {
15918 0 : o = Py_None;
15919 0 : Py_INCREF( o );
15920 : }
15921 : #if SWIG_VERSION >= 0x040300
15922 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15923 : #else
15924 1 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15925 : #endif
15926 : }
15927 1 : {
15928 : /* %typemap(argout) (char **argout) */
15929 1 : PyObject *o;
15930 1 : if ( ReturnSame(arg4) != NULL && *arg4 != NULL ) {
15931 1 : o = GDALPythonObjectFromCStr( *arg4 );
15932 : }
15933 : else {
15934 0 : o = Py_None;
15935 0 : Py_INCREF( o );
15936 : }
15937 : #if SWIG_VERSION >= 0x040300
15938 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15939 : #else
15940 1 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15941 : #endif
15942 : }
15943 1 : {
15944 : /* %typemap(freearg) (char **argout) */
15945 1 : if ( *arg2 )
15946 1 : CPLFree( *arg2 );
15947 : }
15948 1 : {
15949 : /* %typemap(freearg) (char **argout) */
15950 1 : if ( *arg3 )
15951 1 : CPLFree( *arg3 );
15952 : }
15953 1 : {
15954 : /* %typemap(freearg) (char **argout) */
15955 1 : if ( *arg4 )
15956 1 : CPLFree( *arg4 );
15957 : }
15958 1 : {
15959 : /* %typemap(ret) OGRErr */
15960 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15961 0 : resultobj = PyLong_FromLong( result );
15962 : }
15963 : }
15964 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; } }
15965 : return resultobj;
15966 0 : fail:
15967 0 : {
15968 : /* %typemap(freearg) (char **argout) */
15969 0 : if ( *arg2 )
15970 0 : CPLFree( *arg2 );
15971 : }
15972 0 : {
15973 : /* %typemap(freearg) (char **argout) */
15974 0 : if ( *arg3 )
15975 0 : CPLFree( *arg3 );
15976 : }
15977 0 : {
15978 : /* %typemap(freearg) (char **argout) */
15979 0 : if ( *arg4 )
15980 0 : CPLFree( *arg4 );
15981 : }
15982 : return NULL;
15983 : }
15984 :
15985 :
15986 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToXML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15987 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15988 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15989 2 : char **arg2 = (char **) 0 ;
15990 2 : char *arg3 = (char *) "" ;
15991 2 : void *argp1 = 0 ;
15992 2 : int res1 = 0 ;
15993 2 : char *argout2 = 0 ;
15994 2 : int res3 ;
15995 2 : char *buf3 = 0 ;
15996 2 : int alloc3 = 0 ;
15997 2 : PyObject *swig_obj[2] ;
15998 2 : OGRErr result;
15999 :
16000 2 : {
16001 : /* %typemap(in,numinputs=0) (char **argout2) */
16002 2 : arg2 = &argout2;
16003 : }
16004 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToXML", 1, 2, swig_obj)) SWIG_fail;
16005 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16006 2 : if (!SWIG_IsOK(res1)) {
16007 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToXML" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16008 : }
16009 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16010 2 : if (swig_obj[1]) {
16011 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf3, NULL, &alloc3);
16012 0 : if (!SWIG_IsOK(res3)) {
16013 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ExportToXML" "', argument " "3"" of type '" "char const *""'");
16014 : }
16015 0 : arg3 = reinterpret_cast< char * >(buf3);
16016 : }
16017 2 : {
16018 2 : const int bLocalUseExceptions = GetUseExceptions();
16019 2 : if ( bLocalUseExceptions ) {
16020 2 : pushErrorHandler();
16021 : }
16022 2 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToXML(arg1,arg2,(char const *)arg3);
16023 2 : if ( bLocalUseExceptions ) {
16024 2 : popErrorHandler();
16025 : }
16026 : #ifndef SED_HACKS
16027 : if ( bLocalUseExceptions ) {
16028 : CPLErr eclass = CPLGetLastErrorType();
16029 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16030 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16031 : }
16032 : }
16033 : #endif
16034 : }
16035 2 : {
16036 : /* %typemap(out) OGRErr */
16037 3 : if ( result != 0 && GetUseExceptions()) {
16038 1 : const char* pszMessage = CPLGetLastErrorMsg();
16039 1 : if( pszMessage[0] != '\0' )
16040 1 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16041 : else
16042 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16043 1 : SWIG_fail;
16044 : }
16045 : }
16046 1 : {
16047 : /* %typemap(argout) (char **argout) */
16048 1 : PyObject *o;
16049 1 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
16050 1 : o = GDALPythonObjectFromCStr( *arg2 );
16051 : }
16052 : else {
16053 0 : o = Py_None;
16054 0 : Py_INCREF( o );
16055 : }
16056 : #if SWIG_VERSION >= 0x040300
16057 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
16058 : #else
16059 1 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
16060 : #endif
16061 : }
16062 1 : {
16063 : /* %typemap(freearg) (char **argout) */
16064 1 : if ( *arg2 )
16065 1 : CPLFree( *arg2 );
16066 : }
16067 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
16068 1 : {
16069 : /* %typemap(ret) OGRErr */
16070 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16071 0 : resultobj = PyLong_FromLong( result );
16072 : }
16073 : }
16074 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; } }
16075 : return resultobj;
16076 1 : fail:
16077 1 : {
16078 : /* %typemap(freearg) (char **argout) */
16079 1 : if ( *arg2 )
16080 0 : CPLFree( *arg2 );
16081 : }
16082 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
16083 : return NULL;
16084 : }
16085 :
16086 :
16087 5 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToMICoordSys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16088 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16089 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16090 5 : char **arg2 = (char **) 0 ;
16091 5 : void *argp1 = 0 ;
16092 5 : int res1 = 0 ;
16093 5 : char *argout2 = 0 ;
16094 5 : PyObject *swig_obj[1] ;
16095 5 : OGRErr result;
16096 :
16097 5 : {
16098 : /* %typemap(in,numinputs=0) (char **argout2) */
16099 5 : arg2 = &argout2;
16100 : }
16101 5 : if (!args) SWIG_fail;
16102 5 : swig_obj[0] = args;
16103 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16104 5 : if (!SWIG_IsOK(res1)) {
16105 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToMICoordSys" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16106 : }
16107 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16108 5 : {
16109 5 : const int bLocalUseExceptions = GetUseExceptions();
16110 5 : if ( bLocalUseExceptions ) {
16111 3 : pushErrorHandler();
16112 : }
16113 5 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToMICoordSys(arg1,arg2);
16114 5 : if ( bLocalUseExceptions ) {
16115 3 : popErrorHandler();
16116 : }
16117 : #ifndef SED_HACKS
16118 : if ( bLocalUseExceptions ) {
16119 : CPLErr eclass = CPLGetLastErrorType();
16120 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16121 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16122 : }
16123 : }
16124 : #endif
16125 : }
16126 5 : {
16127 : /* %typemap(out) OGRErr */
16128 5 : if ( result != 0 && GetUseExceptions()) {
16129 0 : const char* pszMessage = CPLGetLastErrorMsg();
16130 0 : if( pszMessage[0] != '\0' )
16131 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16132 : else
16133 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16134 0 : SWIG_fail;
16135 : }
16136 : }
16137 5 : {
16138 : /* %typemap(argout) (char **argout) */
16139 5 : PyObject *o;
16140 5 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
16141 5 : o = GDALPythonObjectFromCStr( *arg2 );
16142 : }
16143 : else {
16144 0 : o = Py_None;
16145 0 : Py_INCREF( o );
16146 : }
16147 : #if SWIG_VERSION >= 0x040300
16148 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
16149 : #else
16150 5 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
16151 : #endif
16152 : }
16153 5 : {
16154 : /* %typemap(freearg) (char **argout) */
16155 5 : if ( *arg2 )
16156 5 : CPLFree( *arg2 );
16157 : }
16158 5 : {
16159 : /* %typemap(ret) OGRErr */
16160 10 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16161 0 : resultobj = PyLong_FromLong( result );
16162 : }
16163 : }
16164 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; } }
16165 : return resultobj;
16166 0 : fail:
16167 0 : {
16168 : /* %typemap(freearg) (char **argout) */
16169 0 : if ( *arg2 )
16170 0 : CPLFree( *arg2 );
16171 : }
16172 : return NULL;
16173 : }
16174 :
16175 :
16176 4 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToCF1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16177 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16178 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16179 4 : char **arg2 = (char **) NULL ;
16180 4 : void *argp1 = 0 ;
16181 4 : int res1 = 0 ;
16182 4 : PyObject *swig_obj[2] ;
16183 4 : char **result = 0 ;
16184 :
16185 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToCF1", 1, 2, swig_obj)) SWIG_fail;
16186 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16187 4 : if (!SWIG_IsOK(res1)) {
16188 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToCF1" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16189 : }
16190 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16191 4 : if (swig_obj[1]) {
16192 4 : {
16193 : /* %typemap(in) char **dict */
16194 4 : arg2 = NULL;
16195 4 : if ( PySequence_Check( swig_obj[1] ) ) {
16196 0 : int bErr = FALSE;
16197 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
16198 0 : if ( bErr )
16199 : {
16200 0 : SWIG_fail;
16201 : }
16202 : }
16203 4 : else if ( PyMapping_Check( swig_obj[1] ) ) {
16204 4 : int bErr = FALSE;
16205 4 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
16206 4 : if ( bErr )
16207 : {
16208 0 : SWIG_fail;
16209 : }
16210 : }
16211 : else {
16212 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
16213 0 : SWIG_fail;
16214 : }
16215 : }
16216 : }
16217 4 : {
16218 4 : const int bLocalUseExceptions = GetUseExceptions();
16219 4 : if ( bLocalUseExceptions ) {
16220 4 : pushErrorHandler();
16221 : }
16222 4 : result = (char **)OSRSpatialReferenceShadow_ExportToCF1(arg1,arg2);
16223 4 : if ( bLocalUseExceptions ) {
16224 4 : popErrorHandler();
16225 : }
16226 : #ifndef SED_HACKS
16227 : if ( bLocalUseExceptions ) {
16228 : CPLErr eclass = CPLGetLastErrorType();
16229 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16230 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16231 : }
16232 : }
16233 : #endif
16234 : }
16235 4 : {
16236 : /* %typemap(out) char **dict */
16237 4 : resultobj = GetCSLStringAsPyDict(result, true);
16238 : }
16239 4 : {
16240 : /* %typemap(freearg) char **dict */
16241 4 : CSLDestroy( arg2 );
16242 : }
16243 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; } }
16244 : return resultobj;
16245 0 : fail:
16246 0 : {
16247 : /* %typemap(freearg) char **dict */
16248 0 : CSLDestroy( arg2 );
16249 : }
16250 : return NULL;
16251 : }
16252 :
16253 :
16254 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToCF1Units(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16255 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16256 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16257 1 : char **arg2 = (char **) NULL ;
16258 1 : void *argp1 = 0 ;
16259 1 : int res1 = 0 ;
16260 1 : PyObject *swig_obj[2] ;
16261 1 : retStringAndCPLFree *result = 0 ;
16262 :
16263 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToCF1Units", 1, 2, swig_obj)) SWIG_fail;
16264 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16265 1 : if (!SWIG_IsOK(res1)) {
16266 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToCF1Units" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16267 : }
16268 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16269 1 : if (swig_obj[1]) {
16270 0 : {
16271 : /* %typemap(in) char **dict */
16272 0 : arg2 = NULL;
16273 0 : if ( PySequence_Check( swig_obj[1] ) ) {
16274 0 : int bErr = FALSE;
16275 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
16276 0 : if ( bErr )
16277 : {
16278 0 : SWIG_fail;
16279 : }
16280 : }
16281 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
16282 0 : int bErr = FALSE;
16283 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
16284 0 : if ( bErr )
16285 : {
16286 0 : SWIG_fail;
16287 : }
16288 : }
16289 : else {
16290 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
16291 0 : SWIG_fail;
16292 : }
16293 : }
16294 : }
16295 1 : {
16296 1 : const int bLocalUseExceptions = GetUseExceptions();
16297 1 : if ( bLocalUseExceptions ) {
16298 1 : pushErrorHandler();
16299 : }
16300 1 : result = (retStringAndCPLFree *)OSRSpatialReferenceShadow_ExportToCF1Units(arg1,arg2);
16301 1 : if ( bLocalUseExceptions ) {
16302 1 : popErrorHandler();
16303 : }
16304 : #ifndef SED_HACKS
16305 : if ( bLocalUseExceptions ) {
16306 : CPLErr eclass = CPLGetLastErrorType();
16307 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16308 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16309 : }
16310 : }
16311 : #endif
16312 : }
16313 1 : {
16314 : /* %typemap(out) (retStringAndCPLFree*) */
16315 1 : Py_XDECREF(resultobj);
16316 1 : if(result)
16317 : {
16318 1 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
16319 1 : CPLFree(result);
16320 : }
16321 : else
16322 : {
16323 0 : resultobj = Py_None;
16324 0 : Py_INCREF(resultobj);
16325 : }
16326 : }
16327 1 : {
16328 : /* %typemap(freearg) char **dict */
16329 1 : CSLDestroy( arg2 );
16330 : }
16331 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; } }
16332 : return resultobj;
16333 0 : fail:
16334 0 : {
16335 : /* %typemap(freearg) char **dict */
16336 0 : CSLDestroy( arg2 );
16337 : }
16338 : return NULL;
16339 : }
16340 :
16341 :
16342 16 : SWIGINTERN PyObject *_wrap_SpatialReference_CloneGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16343 16 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16344 16 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16345 16 : void *argp1 = 0 ;
16346 16 : int res1 = 0 ;
16347 16 : PyObject *swig_obj[1] ;
16348 16 : OSRSpatialReferenceShadow *result = 0 ;
16349 :
16350 16 : if (!args) SWIG_fail;
16351 16 : swig_obj[0] = args;
16352 16 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16353 16 : if (!SWIG_IsOK(res1)) {
16354 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_CloneGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16355 : }
16356 16 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16357 16 : {
16358 16 : const int bLocalUseExceptions = GetUseExceptions();
16359 16 : if ( bLocalUseExceptions ) {
16360 3 : pushErrorHandler();
16361 : }
16362 16 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_CloneGeogCS(arg1);
16363 16 : if ( bLocalUseExceptions ) {
16364 3 : popErrorHandler();
16365 : }
16366 : #ifndef SED_HACKS
16367 : if ( bLocalUseExceptions ) {
16368 : CPLErr eclass = CPLGetLastErrorType();
16369 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16370 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16371 : }
16372 : }
16373 : #endif
16374 : }
16375 16 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
16376 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; } }
16377 : return resultobj;
16378 : fail:
16379 : return NULL;
16380 : }
16381 :
16382 :
16383 55 : SWIGINTERN PyObject *_wrap_SpatialReference_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16384 55 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16385 55 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16386 55 : void *argp1 = 0 ;
16387 55 : int res1 = 0 ;
16388 55 : PyObject *swig_obj[1] ;
16389 55 : OSRSpatialReferenceShadow *result = 0 ;
16390 :
16391 55 : if (!args) SWIG_fail;
16392 55 : swig_obj[0] = args;
16393 55 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16394 55 : if (!SWIG_IsOK(res1)) {
16395 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Clone" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16396 : }
16397 55 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16398 55 : {
16399 55 : const int bLocalUseExceptions = GetUseExceptions();
16400 55 : if ( bLocalUseExceptions ) {
16401 4 : pushErrorHandler();
16402 : }
16403 55 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_Clone(arg1);
16404 55 : if ( bLocalUseExceptions ) {
16405 4 : popErrorHandler();
16406 : }
16407 : #ifndef SED_HACKS
16408 : if ( bLocalUseExceptions ) {
16409 : CPLErr eclass = CPLGetLastErrorType();
16410 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16411 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16412 : }
16413 : }
16414 : #endif
16415 : }
16416 55 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
16417 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; } }
16418 : return resultobj;
16419 : fail:
16420 : return NULL;
16421 : }
16422 :
16423 :
16424 1 : SWIGINTERN PyObject *_wrap_SpatialReference_StripVertical(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16425 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16426 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16427 1 : void *argp1 = 0 ;
16428 1 : int res1 = 0 ;
16429 1 : PyObject *swig_obj[1] ;
16430 1 : OGRErr result;
16431 :
16432 1 : if (!args) SWIG_fail;
16433 1 : swig_obj[0] = args;
16434 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16435 1 : if (!SWIG_IsOK(res1)) {
16436 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_StripVertical" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16437 : }
16438 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16439 1 : {
16440 1 : const int bLocalUseExceptions = GetUseExceptions();
16441 1 : if ( bLocalUseExceptions ) {
16442 1 : pushErrorHandler();
16443 : }
16444 1 : result = (OGRErr)OSRSpatialReferenceShadow_StripVertical(arg1);
16445 1 : if ( bLocalUseExceptions ) {
16446 1 : popErrorHandler();
16447 : }
16448 : #ifndef SED_HACKS
16449 : if ( bLocalUseExceptions ) {
16450 : CPLErr eclass = CPLGetLastErrorType();
16451 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16452 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16453 : }
16454 : }
16455 : #endif
16456 : }
16457 1 : {
16458 : /* %typemap(out) OGRErr */
16459 1 : if ( result != 0 && GetUseExceptions()) {
16460 0 : const char* pszMessage = CPLGetLastErrorMsg();
16461 0 : if( pszMessage[0] != '\0' )
16462 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16463 : else
16464 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16465 0 : SWIG_fail;
16466 : }
16467 : }
16468 1 : {
16469 : /* %typemap(ret) OGRErr */
16470 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16471 1 : resultobj = PyLong_FromLong( result );
16472 : }
16473 : }
16474 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; } }
16475 : return resultobj;
16476 : fail:
16477 : return NULL;
16478 : }
16479 :
16480 :
16481 114 : SWIGINTERN PyObject *_wrap_SpatialReference_Validate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16482 114 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16483 114 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16484 114 : void *argp1 = 0 ;
16485 114 : int res1 = 0 ;
16486 114 : PyObject *swig_obj[1] ;
16487 114 : OGRErr result;
16488 :
16489 114 : if (!args) SWIG_fail;
16490 114 : swig_obj[0] = args;
16491 114 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16492 114 : if (!SWIG_IsOK(res1)) {
16493 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Validate" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16494 : }
16495 114 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16496 114 : {
16497 114 : const int bLocalUseExceptions = GetUseExceptions();
16498 114 : if ( bLocalUseExceptions ) {
16499 114 : pushErrorHandler();
16500 : }
16501 114 : result = (OGRErr)OSRSpatialReferenceShadow_Validate(arg1);
16502 114 : if ( bLocalUseExceptions ) {
16503 114 : popErrorHandler();
16504 : }
16505 : #ifndef SED_HACKS
16506 : if ( bLocalUseExceptions ) {
16507 : CPLErr eclass = CPLGetLastErrorType();
16508 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16509 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16510 : }
16511 : }
16512 : #endif
16513 : }
16514 114 : {
16515 : /* %typemap(out) OGRErr */
16516 150 : if ( result != 0 && GetUseExceptions()) {
16517 36 : const char* pszMessage = CPLGetLastErrorMsg();
16518 36 : if( pszMessage[0] != '\0' )
16519 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16520 : else
16521 36 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16522 36 : SWIG_fail;
16523 : }
16524 : }
16525 78 : {
16526 : /* %typemap(ret) OGRErr */
16527 78 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16528 78 : resultobj = PyLong_FromLong( result );
16529 : }
16530 : }
16531 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; } }
16532 : return resultobj;
16533 : fail:
16534 : return NULL;
16535 : }
16536 :
16537 :
16538 17 : SWIGINTERN PyObject *_wrap_SpatialReference_MorphToESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16539 17 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16540 17 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16541 17 : void *argp1 = 0 ;
16542 17 : int res1 = 0 ;
16543 17 : PyObject *swig_obj[1] ;
16544 17 : OGRErr result;
16545 :
16546 17 : if (!args) SWIG_fail;
16547 17 : swig_obj[0] = args;
16548 17 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16549 17 : if (!SWIG_IsOK(res1)) {
16550 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_MorphToESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16551 : }
16552 17 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16553 17 : {
16554 17 : const int bLocalUseExceptions = GetUseExceptions();
16555 17 : if ( bLocalUseExceptions ) {
16556 17 : pushErrorHandler();
16557 : }
16558 17 : result = (OGRErr)OSRSpatialReferenceShadow_MorphToESRI(arg1);
16559 17 : if ( bLocalUseExceptions ) {
16560 17 : popErrorHandler();
16561 : }
16562 : #ifndef SED_HACKS
16563 : if ( bLocalUseExceptions ) {
16564 : CPLErr eclass = CPLGetLastErrorType();
16565 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16566 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16567 : }
16568 : }
16569 : #endif
16570 : }
16571 17 : {
16572 : /* %typemap(out) OGRErr */
16573 17 : if ( result != 0 && GetUseExceptions()) {
16574 0 : const char* pszMessage = CPLGetLastErrorMsg();
16575 0 : if( pszMessage[0] != '\0' )
16576 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16577 : else
16578 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16579 0 : SWIG_fail;
16580 : }
16581 : }
16582 17 : {
16583 : /* %typemap(ret) OGRErr */
16584 17 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16585 17 : resultobj = PyLong_FromLong( result );
16586 : }
16587 : }
16588 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; } }
16589 : return resultobj;
16590 : fail:
16591 : return NULL;
16592 : }
16593 :
16594 :
16595 19 : SWIGINTERN PyObject *_wrap_SpatialReference_MorphFromESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16596 19 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16597 19 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16598 19 : void *argp1 = 0 ;
16599 19 : int res1 = 0 ;
16600 19 : PyObject *swig_obj[1] ;
16601 19 : OGRErr result;
16602 :
16603 19 : if (!args) SWIG_fail;
16604 19 : swig_obj[0] = args;
16605 19 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16606 19 : if (!SWIG_IsOK(res1)) {
16607 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_MorphFromESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16608 : }
16609 19 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16610 19 : {
16611 19 : const int bLocalUseExceptions = GetUseExceptions();
16612 19 : if ( bLocalUseExceptions ) {
16613 19 : pushErrorHandler();
16614 : }
16615 19 : result = (OGRErr)OSRSpatialReferenceShadow_MorphFromESRI(arg1);
16616 19 : if ( bLocalUseExceptions ) {
16617 19 : popErrorHandler();
16618 : }
16619 : #ifndef SED_HACKS
16620 : if ( bLocalUseExceptions ) {
16621 : CPLErr eclass = CPLGetLastErrorType();
16622 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16623 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16624 : }
16625 : }
16626 : #endif
16627 : }
16628 19 : {
16629 : /* %typemap(out) OGRErr */
16630 19 : if ( result != 0 && GetUseExceptions()) {
16631 0 : const char* pszMessage = CPLGetLastErrorMsg();
16632 0 : if( pszMessage[0] != '\0' )
16633 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16634 : else
16635 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16636 0 : SWIG_fail;
16637 : }
16638 : }
16639 19 : {
16640 : /* %typemap(ret) OGRErr */
16641 19 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16642 19 : resultobj = PyLong_FromLong( result );
16643 : }
16644 : }
16645 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; } }
16646 : return resultobj;
16647 : fail:
16648 : return NULL;
16649 : }
16650 :
16651 :
16652 28 : SWIGINTERN PyObject *_wrap_SpatialReference_ConvertToOtherProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16653 28 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16654 28 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16655 28 : char *arg2 = (char *) 0 ;
16656 28 : char **arg3 = (char **) NULL ;
16657 28 : void *argp1 = 0 ;
16658 28 : int res1 = 0 ;
16659 28 : int res2 ;
16660 28 : char *buf2 = 0 ;
16661 28 : int alloc2 = 0 ;
16662 28 : PyObject *swig_obj[3] ;
16663 28 : OSRSpatialReferenceShadow *result = 0 ;
16664 :
16665 28 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ConvertToOtherProjection", 2, 3, swig_obj)) SWIG_fail;
16666 28 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16667 28 : if (!SWIG_IsOK(res1)) {
16668 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ConvertToOtherProjection" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16669 : }
16670 28 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16671 28 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16672 28 : if (!SWIG_IsOK(res2)) {
16673 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ConvertToOtherProjection" "', argument " "2"" of type '" "char const *""'");
16674 : }
16675 28 : arg2 = reinterpret_cast< char * >(buf2);
16676 28 : if (swig_obj[2]) {
16677 0 : {
16678 : /* %typemap(in) char **dict */
16679 0 : arg3 = NULL;
16680 0 : if ( PySequence_Check( swig_obj[2] ) ) {
16681 0 : int bErr = FALSE;
16682 0 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
16683 0 : if ( bErr )
16684 : {
16685 0 : SWIG_fail;
16686 : }
16687 : }
16688 0 : else if ( PyMapping_Check( swig_obj[2] ) ) {
16689 0 : int bErr = FALSE;
16690 0 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
16691 0 : if ( bErr )
16692 : {
16693 0 : SWIG_fail;
16694 : }
16695 : }
16696 : else {
16697 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
16698 0 : SWIG_fail;
16699 : }
16700 : }
16701 : }
16702 28 : {
16703 28 : const int bLocalUseExceptions = GetUseExceptions();
16704 28 : if ( bLocalUseExceptions ) {
16705 14 : pushErrorHandler();
16706 : }
16707 28 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_ConvertToOtherProjection(arg1,(char const *)arg2,arg3);
16708 28 : if ( bLocalUseExceptions ) {
16709 14 : popErrorHandler();
16710 : }
16711 : #ifndef SED_HACKS
16712 : if ( bLocalUseExceptions ) {
16713 : CPLErr eclass = CPLGetLastErrorType();
16714 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16715 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16716 : }
16717 : }
16718 : #endif
16719 : }
16720 28 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
16721 28 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16722 28 : {
16723 : /* %typemap(freearg) char **dict */
16724 28 : CSLDestroy( arg3 );
16725 : }
16726 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; } }
16727 : return resultobj;
16728 0 : fail:
16729 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16730 0 : {
16731 : /* %typemap(freearg) char **dict */
16732 0 : CSLDestroy( arg3 );
16733 : }
16734 : return NULL;
16735 : }
16736 :
16737 :
16738 3 : SWIGINTERN PyObject *_wrap_SpatialReference_PromoteTo3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16739 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16740 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16741 3 : char *arg2 = (char *) NULL ;
16742 3 : void *argp1 = 0 ;
16743 3 : int res1 = 0 ;
16744 3 : int res2 ;
16745 3 : char *buf2 = 0 ;
16746 3 : int alloc2 = 0 ;
16747 3 : PyObject *swig_obj[2] ;
16748 3 : OGRErr result;
16749 :
16750 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_PromoteTo3D", 1, 2, swig_obj)) SWIG_fail;
16751 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16752 3 : if (!SWIG_IsOK(res1)) {
16753 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_PromoteTo3D" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16754 : }
16755 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16756 3 : if (swig_obj[1]) {
16757 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16758 0 : if (!SWIG_IsOK(res2)) {
16759 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_PromoteTo3D" "', argument " "2"" of type '" "char const *""'");
16760 : }
16761 0 : arg2 = reinterpret_cast< char * >(buf2);
16762 : }
16763 3 : {
16764 3 : const int bLocalUseExceptions = GetUseExceptions();
16765 3 : if ( bLocalUseExceptions ) {
16766 3 : pushErrorHandler();
16767 : }
16768 3 : result = (OGRErr)OSRSpatialReferenceShadow_PromoteTo3D(arg1,(char const *)arg2);
16769 3 : if ( bLocalUseExceptions ) {
16770 3 : popErrorHandler();
16771 : }
16772 : #ifndef SED_HACKS
16773 : if ( bLocalUseExceptions ) {
16774 : CPLErr eclass = CPLGetLastErrorType();
16775 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16776 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16777 : }
16778 : }
16779 : #endif
16780 : }
16781 3 : {
16782 : /* %typemap(out) OGRErr */
16783 3 : if ( result != 0 && GetUseExceptions()) {
16784 0 : const char* pszMessage = CPLGetLastErrorMsg();
16785 0 : if( pszMessage[0] != '\0' )
16786 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16787 : else
16788 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16789 0 : SWIG_fail;
16790 : }
16791 : }
16792 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16793 3 : {
16794 : /* %typemap(ret) OGRErr */
16795 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16796 3 : resultobj = PyLong_FromLong( result );
16797 : }
16798 : }
16799 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; } }
16800 : return resultobj;
16801 0 : fail:
16802 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16803 : return NULL;
16804 : }
16805 :
16806 :
16807 1 : SWIGINTERN PyObject *_wrap_SpatialReference_DemoteTo2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16808 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16809 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16810 1 : char *arg2 = (char *) NULL ;
16811 1 : void *argp1 = 0 ;
16812 1 : int res1 = 0 ;
16813 1 : int res2 ;
16814 1 : char *buf2 = 0 ;
16815 1 : int alloc2 = 0 ;
16816 1 : PyObject *swig_obj[2] ;
16817 1 : OGRErr result;
16818 :
16819 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_DemoteTo2D", 1, 2, swig_obj)) SWIG_fail;
16820 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16821 1 : if (!SWIG_IsOK(res1)) {
16822 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_DemoteTo2D" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16823 : }
16824 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16825 1 : if (swig_obj[1]) {
16826 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16827 0 : if (!SWIG_IsOK(res2)) {
16828 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_DemoteTo2D" "', argument " "2"" of type '" "char const *""'");
16829 : }
16830 0 : arg2 = reinterpret_cast< char * >(buf2);
16831 : }
16832 1 : {
16833 1 : const int bLocalUseExceptions = GetUseExceptions();
16834 1 : if ( bLocalUseExceptions ) {
16835 1 : pushErrorHandler();
16836 : }
16837 1 : result = (OGRErr)OSRSpatialReferenceShadow_DemoteTo2D(arg1,(char const *)arg2);
16838 1 : if ( bLocalUseExceptions ) {
16839 1 : popErrorHandler();
16840 : }
16841 : #ifndef SED_HACKS
16842 : if ( bLocalUseExceptions ) {
16843 : CPLErr eclass = CPLGetLastErrorType();
16844 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16845 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16846 : }
16847 : }
16848 : #endif
16849 : }
16850 1 : {
16851 : /* %typemap(out) OGRErr */
16852 1 : if ( result != 0 && GetUseExceptions()) {
16853 0 : const char* pszMessage = CPLGetLastErrorMsg();
16854 0 : if( pszMessage[0] != '\0' )
16855 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16856 : else
16857 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16858 0 : SWIG_fail;
16859 : }
16860 : }
16861 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16862 1 : {
16863 : /* %typemap(ret) OGRErr */
16864 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16865 1 : resultobj = PyLong_FromLong( result );
16866 : }
16867 : }
16868 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; } }
16869 : return resultobj;
16870 0 : fail:
16871 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16872 : return NULL;
16873 : }
16874 :
16875 :
16876 285 : SWIGINTERN PyObject *SpatialReference_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16877 285 : PyObject *obj;
16878 285 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
16879 285 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_NewClientData(obj));
16880 285 : return SWIG_Py_Void();
16881 : }
16882 :
16883 2863 : SWIGINTERN PyObject *SpatialReference_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16884 2863 : return SWIG_Python_InitShadowInstance(args);
16885 : }
16886 :
16887 11 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformationOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16888 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16889 11 : OGRCoordinateTransformationOptions *result = 0 ;
16890 :
16891 11 : if (!SWIG_Python_UnpackTuple(args, "new_CoordinateTransformationOptions", 0, 0, 0)) SWIG_fail;
16892 11 : {
16893 11 : const int bLocalUseExceptions = GetUseExceptions();
16894 11 : if ( bLocalUseExceptions ) {
16895 11 : pushErrorHandler();
16896 : }
16897 11 : result = (OGRCoordinateTransformationOptions *)new_OGRCoordinateTransformationOptions();
16898 11 : if ( bLocalUseExceptions ) {
16899 11 : popErrorHandler();
16900 : }
16901 : #ifndef SED_HACKS
16902 : if ( bLocalUseExceptions ) {
16903 : CPLErr eclass = CPLGetLastErrorType();
16904 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16905 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16906 : }
16907 : }
16908 : #endif
16909 : }
16910 11 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRCoordinateTransformationOptions, SWIG_POINTER_NEW | 0 );
16911 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; } }
16912 : return resultobj;
16913 0 : fail:
16914 0 : return NULL;
16915 : }
16916 :
16917 :
16918 11 : SWIGINTERN PyObject *_wrap_delete_CoordinateTransformationOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16919 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16920 11 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16921 11 : void *argp1 = 0 ;
16922 11 : int res1 = 0 ;
16923 11 : PyObject *swig_obj[1] ;
16924 :
16925 11 : if (!args) SWIG_fail;
16926 11 : swig_obj[0] = args;
16927 11 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, SWIG_POINTER_DISOWN | 0 );
16928 11 : if (!SWIG_IsOK(res1)) {
16929 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoordinateTransformationOptions" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16930 : }
16931 11 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16932 11 : {
16933 11 : const int bLocalUseExceptions = GetUseExceptions();
16934 11 : if ( bLocalUseExceptions ) {
16935 11 : pushErrorHandler();
16936 : }
16937 11 : delete_OGRCoordinateTransformationOptions(arg1);
16938 11 : if ( bLocalUseExceptions ) {
16939 11 : popErrorHandler();
16940 : }
16941 : #ifndef SED_HACKS
16942 : if ( bLocalUseExceptions ) {
16943 : CPLErr eclass = CPLGetLastErrorType();
16944 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16945 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16946 : }
16947 : }
16948 : #endif
16949 : }
16950 11 : resultobj = SWIG_Py_Void();
16951 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; } }
16952 : return resultobj;
16953 : fail:
16954 : return NULL;
16955 : }
16956 :
16957 :
16958 5 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetAreaOfInterest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16959 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16960 5 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16961 5 : double arg2 ;
16962 5 : double arg3 ;
16963 5 : double arg4 ;
16964 5 : double arg5 ;
16965 5 : void *argp1 = 0 ;
16966 5 : int res1 = 0 ;
16967 5 : double val2 ;
16968 5 : int ecode2 = 0 ;
16969 5 : double val3 ;
16970 5 : int ecode3 = 0 ;
16971 5 : double val4 ;
16972 5 : int ecode4 = 0 ;
16973 5 : double val5 ;
16974 5 : int ecode5 = 0 ;
16975 5 : PyObject *swig_obj[5] ;
16976 5 : bool result;
16977 :
16978 5 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetAreaOfInterest", 5, 5, swig_obj)) SWIG_fail;
16979 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
16980 5 : if (!SWIG_IsOK(res1)) {
16981 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16982 : }
16983 5 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16984 5 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
16985 5 : if (!SWIG_IsOK(ecode2)) {
16986 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "2"" of type '" "double""'");
16987 : }
16988 5 : arg2 = static_cast< double >(val2);
16989 5 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
16990 5 : if (!SWIG_IsOK(ecode3)) {
16991 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "3"" of type '" "double""'");
16992 : }
16993 5 : arg3 = static_cast< double >(val3);
16994 5 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
16995 5 : if (!SWIG_IsOK(ecode4)) {
16996 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "4"" of type '" "double""'");
16997 : }
16998 5 : arg4 = static_cast< double >(val4);
16999 5 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
17000 5 : if (!SWIG_IsOK(ecode5)) {
17001 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "5"" of type '" "double""'");
17002 : }
17003 5 : arg5 = static_cast< double >(val5);
17004 5 : {
17005 5 : const int bLocalUseExceptions = GetUseExceptions();
17006 5 : if ( bLocalUseExceptions ) {
17007 5 : pushErrorHandler();
17008 : }
17009 5 : result = (bool)OGRCoordinateTransformationOptions_SetAreaOfInterest(arg1,arg2,arg3,arg4,arg5);
17010 5 : if ( bLocalUseExceptions ) {
17011 5 : popErrorHandler();
17012 : }
17013 : #ifndef SED_HACKS
17014 : if ( bLocalUseExceptions ) {
17015 : CPLErr eclass = CPLGetLastErrorType();
17016 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17017 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17018 : }
17019 : }
17020 : #endif
17021 : }
17022 5 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17023 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; } }
17024 : return resultobj;
17025 : fail:
17026 : return NULL;
17027 : }
17028 :
17029 :
17030 8 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetOperation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17031 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17032 8 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
17033 8 : char *arg2 = (char *) 0 ;
17034 8 : bool arg3 = (bool) false ;
17035 8 : void *argp1 = 0 ;
17036 8 : int res1 = 0 ;
17037 8 : int res2 ;
17038 8 : char *buf2 = 0 ;
17039 8 : int alloc2 = 0 ;
17040 8 : bool val3 ;
17041 8 : int ecode3 = 0 ;
17042 8 : PyObject *swig_obj[3] ;
17043 8 : bool result;
17044 :
17045 8 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetOperation", 2, 3, swig_obj)) SWIG_fail;
17046 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17047 8 : if (!SWIG_IsOK(res1)) {
17048 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetOperation" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
17049 : }
17050 8 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
17051 8 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
17052 8 : if (!SWIG_IsOK(res2)) {
17053 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoordinateTransformationOptions_SetOperation" "', argument " "2"" of type '" "char const *""'");
17054 : }
17055 8 : arg2 = reinterpret_cast< char * >(buf2);
17056 8 : if (swig_obj[2]) {
17057 1 : ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
17058 1 : if (!SWIG_IsOK(ecode3)) {
17059 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformationOptions_SetOperation" "', argument " "3"" of type '" "bool""'");
17060 : }
17061 : arg3 = static_cast< bool >(val3);
17062 : }
17063 8 : {
17064 8 : const int bLocalUseExceptions = GetUseExceptions();
17065 8 : if ( bLocalUseExceptions ) {
17066 8 : pushErrorHandler();
17067 : }
17068 8 : result = (bool)OGRCoordinateTransformationOptions_SetOperation(arg1,(char const *)arg2,arg3);
17069 8 : if ( bLocalUseExceptions ) {
17070 8 : popErrorHandler();
17071 : }
17072 : #ifndef SED_HACKS
17073 : if ( bLocalUseExceptions ) {
17074 : CPLErr eclass = CPLGetLastErrorType();
17075 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17076 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17077 : }
17078 : }
17079 : #endif
17080 : }
17081 8 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17082 8 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
17083 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; } }
17084 : return resultobj;
17085 0 : fail:
17086 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
17087 : return NULL;
17088 : }
17089 :
17090 :
17091 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetDesiredAccuracy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17092 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17093 1 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
17094 1 : double arg2 ;
17095 1 : void *argp1 = 0 ;
17096 1 : int res1 = 0 ;
17097 1 : double val2 ;
17098 1 : int ecode2 = 0 ;
17099 1 : PyObject *swig_obj[2] ;
17100 1 : bool result;
17101 :
17102 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetDesiredAccuracy", 2, 2, swig_obj)) SWIG_fail;
17103 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17104 1 : if (!SWIG_IsOK(res1)) {
17105 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetDesiredAccuracy" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
17106 : }
17107 1 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
17108 1 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
17109 1 : if (!SWIG_IsOK(ecode2)) {
17110 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetDesiredAccuracy" "', argument " "2"" of type '" "double""'");
17111 : }
17112 1 : arg2 = static_cast< double >(val2);
17113 1 : {
17114 1 : const int bLocalUseExceptions = GetUseExceptions();
17115 1 : if ( bLocalUseExceptions ) {
17116 1 : pushErrorHandler();
17117 : }
17118 1 : result = (bool)OGRCoordinateTransformationOptions_SetDesiredAccuracy(arg1,arg2);
17119 1 : if ( bLocalUseExceptions ) {
17120 1 : popErrorHandler();
17121 : }
17122 : #ifndef SED_HACKS
17123 : if ( bLocalUseExceptions ) {
17124 : CPLErr eclass = CPLGetLastErrorType();
17125 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17126 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17127 : }
17128 : }
17129 : #endif
17130 : }
17131 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17132 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; } }
17133 : return resultobj;
17134 : fail:
17135 : return NULL;
17136 : }
17137 :
17138 :
17139 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetBallparkAllowed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17140 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17141 1 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
17142 1 : bool arg2 ;
17143 1 : void *argp1 = 0 ;
17144 1 : int res1 = 0 ;
17145 1 : bool val2 ;
17146 1 : int ecode2 = 0 ;
17147 1 : PyObject *swig_obj[2] ;
17148 1 : bool result;
17149 :
17150 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetBallparkAllowed", 2, 2, swig_obj)) SWIG_fail;
17151 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17152 1 : if (!SWIG_IsOK(res1)) {
17153 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetBallparkAllowed" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
17154 : }
17155 1 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
17156 1 : ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
17157 1 : if (!SWIG_IsOK(ecode2)) {
17158 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetBallparkAllowed" "', argument " "2"" of type '" "bool""'");
17159 : }
17160 1 : arg2 = static_cast< bool >(val2);
17161 1 : {
17162 1 : const int bLocalUseExceptions = GetUseExceptions();
17163 1 : if ( bLocalUseExceptions ) {
17164 1 : pushErrorHandler();
17165 : }
17166 1 : result = (bool)OGRCoordinateTransformationOptions_SetBallparkAllowed(arg1,arg2);
17167 1 : if ( bLocalUseExceptions ) {
17168 1 : popErrorHandler();
17169 : }
17170 : #ifndef SED_HACKS
17171 : if ( bLocalUseExceptions ) {
17172 : CPLErr eclass = CPLGetLastErrorType();
17173 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17174 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17175 : }
17176 : }
17177 : #endif
17178 : }
17179 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17180 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; } }
17181 : return resultobj;
17182 : fail:
17183 : return NULL;
17184 : }
17185 :
17186 :
17187 0 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetOnlyBest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17188 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17189 0 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
17190 0 : bool arg2 ;
17191 0 : void *argp1 = 0 ;
17192 0 : int res1 = 0 ;
17193 0 : bool val2 ;
17194 0 : int ecode2 = 0 ;
17195 0 : PyObject *swig_obj[2] ;
17196 0 : bool result;
17197 :
17198 0 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetOnlyBest", 2, 2, swig_obj)) SWIG_fail;
17199 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17200 0 : if (!SWIG_IsOK(res1)) {
17201 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetOnlyBest" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
17202 : }
17203 0 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
17204 0 : ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
17205 0 : if (!SWIG_IsOK(ecode2)) {
17206 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetOnlyBest" "', argument " "2"" of type '" "bool""'");
17207 : }
17208 0 : arg2 = static_cast< bool >(val2);
17209 0 : {
17210 0 : const int bLocalUseExceptions = GetUseExceptions();
17211 0 : if ( bLocalUseExceptions ) {
17212 0 : pushErrorHandler();
17213 : }
17214 0 : result = (bool)OGRCoordinateTransformationOptions_SetOnlyBest(arg1,arg2);
17215 0 : if ( bLocalUseExceptions ) {
17216 0 : popErrorHandler();
17217 : }
17218 : #ifndef SED_HACKS
17219 : if ( bLocalUseExceptions ) {
17220 : CPLErr eclass = CPLGetLastErrorType();
17221 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17222 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17223 : }
17224 : }
17225 : #endif
17226 : }
17227 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17228 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; } }
17229 : return resultobj;
17230 : fail:
17231 : return NULL;
17232 : }
17233 :
17234 :
17235 285 : SWIGINTERN PyObject *CoordinateTransformationOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17236 285 : PyObject *obj;
17237 285 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
17238 285 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRCoordinateTransformationOptions, SWIG_NewClientData(obj));
17239 285 : return SWIG_Py_Void();
17240 : }
17241 :
17242 11 : SWIGINTERN PyObject *CoordinateTransformationOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17243 11 : return SWIG_Python_InitShadowInstance(args);
17244 : }
17245 :
17246 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformation__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17247 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17248 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
17249 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
17250 : void *argp1 = 0 ;
17251 : int res1 = 0 ;
17252 : void *argp2 = 0 ;
17253 : int res2 = 0 ;
17254 : OSRCoordinateTransformationShadow *result = 0 ;
17255 :
17256 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17257 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17258 : if (!SWIG_IsOK(res1)) {
17259 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
17260 : }
17261 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
17262 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17263 : if (!SWIG_IsOK(res2)) {
17264 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
17265 : }
17266 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
17267 : {
17268 : const int bLocalUseExceptions = GetUseExceptions();
17269 : if ( bLocalUseExceptions ) {
17270 : pushErrorHandler();
17271 : }
17272 : result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow__SWIG_0(arg1,arg2);
17273 : if ( bLocalUseExceptions ) {
17274 : popErrorHandler();
17275 : }
17276 : #ifndef SED_HACKS
17277 : if ( bLocalUseExceptions ) {
17278 : CPLErr eclass = CPLGetLastErrorType();
17279 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17280 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17281 : }
17282 : }
17283 : #endif
17284 : }
17285 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_NEW | 0 );
17286 : 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; } }
17287 : return resultobj;
17288 : fail:
17289 : return NULL;
17290 : }
17291 :
17292 :
17293 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformation__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17294 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17295 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
17296 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
17297 : OGRCoordinateTransformationOptions *arg3 = (OGRCoordinateTransformationOptions *) 0 ;
17298 : void *argp1 = 0 ;
17299 : int res1 = 0 ;
17300 : void *argp2 = 0 ;
17301 : int res2 = 0 ;
17302 : void *argp3 = 0 ;
17303 : int res3 = 0 ;
17304 : OSRCoordinateTransformationShadow *result = 0 ;
17305 :
17306 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
17307 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17308 : if (!SWIG_IsOK(res1)) {
17309 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
17310 : }
17311 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
17312 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17313 : if (!SWIG_IsOK(res2)) {
17314 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
17315 : }
17316 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
17317 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17318 : if (!SWIG_IsOK(res3)) {
17319 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CoordinateTransformation" "', argument " "3"" of type '" "OGRCoordinateTransformationOptions *""'");
17320 : }
17321 : arg3 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp3);
17322 : {
17323 : const int bLocalUseExceptions = GetUseExceptions();
17324 : if ( bLocalUseExceptions ) {
17325 : pushErrorHandler();
17326 : }
17327 : result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow__SWIG_1(arg1,arg2,arg3);
17328 : if ( bLocalUseExceptions ) {
17329 : popErrorHandler();
17330 : }
17331 : #ifndef SED_HACKS
17332 : if ( bLocalUseExceptions ) {
17333 : CPLErr eclass = CPLGetLastErrorType();
17334 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17335 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17336 : }
17337 : }
17338 : #endif
17339 : }
17340 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_NEW | 0 );
17341 : 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; } }
17342 : return resultobj;
17343 : fail:
17344 : return NULL;
17345 : }
17346 :
17347 :
17348 140 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformation(PyObject *self, PyObject *args) {
17349 140 : Py_ssize_t argc;
17350 140 : PyObject *argv[4] = {
17351 : 0
17352 : };
17353 :
17354 140 : if (!(argc = SWIG_Python_UnpackTuple(args, "new_CoordinateTransformation", 0, 3, argv))) SWIG_fail;
17355 140 : --argc;
17356 140 : if (argc == 2) {
17357 130 : int _v;
17358 130 : void *vptr = 0;
17359 130 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17360 130 : _v = SWIG_CheckState(res);
17361 130 : if (_v) {
17362 130 : void *vptr = 0;
17363 130 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17364 130 : _v = SWIG_CheckState(res);
17365 0 : if (_v) {
17366 130 : return _wrap_new_CoordinateTransformation__SWIG_0(self, argc, argv);
17367 : }
17368 : }
17369 : }
17370 10 : if (argc == 3) {
17371 10 : int _v;
17372 10 : void *vptr = 0;
17373 10 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17374 10 : _v = SWIG_CheckState(res);
17375 10 : if (_v) {
17376 10 : void *vptr = 0;
17377 10 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17378 10 : _v = SWIG_CheckState(res);
17379 10 : if (_v) {
17380 10 : void *vptr = 0;
17381 10 : int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRCoordinateTransformationOptions, 0);
17382 10 : _v = SWIG_CheckState(res);
17383 0 : if (_v) {
17384 10 : return _wrap_new_CoordinateTransformation__SWIG_1(self, argc, argv);
17385 : }
17386 : }
17387 : }
17388 : }
17389 :
17390 0 : fail:
17391 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_CoordinateTransformation'.\n"
17392 : " Possible C/C++ prototypes are:\n"
17393 : " OSRCoordinateTransformationShadow::OSRCoordinateTransformationShadow(OSRSpatialReferenceShadow *,OSRSpatialReferenceShadow *)\n"
17394 : " OSRCoordinateTransformationShadow::OSRCoordinateTransformationShadow(OSRSpatialReferenceShadow *,OSRSpatialReferenceShadow *,OGRCoordinateTransformationOptions *)\n");
17395 : return 0;
17396 : }
17397 :
17398 :
17399 140 : SWIGINTERN PyObject *_wrap_delete_CoordinateTransformation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17400 140 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17401 140 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17402 140 : void *argp1 = 0 ;
17403 140 : int res1 = 0 ;
17404 140 : PyObject *swig_obj[1] ;
17405 :
17406 140 : if (!args) SWIG_fail;
17407 140 : swig_obj[0] = args;
17408 140 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_DISOWN | 0 );
17409 140 : if (!SWIG_IsOK(res1)) {
17410 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoordinateTransformation" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17411 : }
17412 140 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17413 140 : {
17414 140 : const int bLocalUseExceptions = GetUseExceptions();
17415 140 : if ( bLocalUseExceptions ) {
17416 123 : pushErrorHandler();
17417 : }
17418 140 : delete_OSRCoordinateTransformationShadow(arg1);
17419 140 : if ( bLocalUseExceptions ) {
17420 123 : popErrorHandler();
17421 : }
17422 : #ifndef SED_HACKS
17423 : if ( bLocalUseExceptions ) {
17424 : CPLErr eclass = CPLGetLastErrorType();
17425 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17426 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17427 : }
17428 : }
17429 : #endif
17430 : }
17431 140 : resultobj = SWIG_Py_Void();
17432 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; } }
17433 : return resultobj;
17434 : fail:
17435 : return NULL;
17436 : }
17437 :
17438 :
17439 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_GetInverse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17440 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17441 1 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17442 1 : void *argp1 = 0 ;
17443 1 : int res1 = 0 ;
17444 1 : PyObject *swig_obj[1] ;
17445 1 : OSRCoordinateTransformationShadow *result = 0 ;
17446 :
17447 1 : if (!args) SWIG_fail;
17448 1 : swig_obj[0] = args;
17449 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17450 1 : if (!SWIG_IsOK(res1)) {
17451 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_GetInverse" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17452 : }
17453 1 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17454 1 : {
17455 1 : const int bLocalUseExceptions = GetUseExceptions();
17456 1 : if ( bLocalUseExceptions ) {
17457 1 : pushErrorHandler();
17458 : }
17459 1 : result = (OSRCoordinateTransformationShadow *)OSRCoordinateTransformationShadow_GetInverse(arg1);
17460 1 : if ( bLocalUseExceptions ) {
17461 1 : popErrorHandler();
17462 : }
17463 : #ifndef SED_HACKS
17464 : if ( bLocalUseExceptions ) {
17465 : CPLErr eclass = CPLGetLastErrorType();
17466 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17467 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17468 : }
17469 : }
17470 : #endif
17471 : }
17472 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_OWN | 0 );
17473 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; } }
17474 : return resultobj;
17475 : fail:
17476 : return NULL;
17477 : }
17478 :
17479 :
17480 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformation__TransformPoint3Double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17481 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17482 1 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17483 1 : double *arg2 ;
17484 1 : void *argp1 = 0 ;
17485 1 : int res1 = 0 ;
17486 1 : double argin2[3] ;
17487 1 : PyObject *swig_obj[2] ;
17488 :
17489 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation__TransformPoint3Double", 2, 2, swig_obj)) SWIG_fail;
17490 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17491 1 : if (!SWIG_IsOK(res1)) {
17492 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation__TransformPoint3Double" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17493 : }
17494 1 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17495 1 : {
17496 : /* %typemap(in) (double argin2[ANY]) */
17497 1 : arg2 = argin2;
17498 1 : if (! PySequence_Check(swig_obj[1]) ) {
17499 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
17500 0 : SWIG_fail;
17501 : }
17502 1 : Py_ssize_t seq_size = PySequence_Size(swig_obj[1]);
17503 1 : if ( seq_size != 3 ) {
17504 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
17505 0 : SWIG_fail;
17506 : }
17507 4 : for (unsigned int i=0; i<3; i++) {
17508 3 : PyObject *o = PySequence_GetItem(swig_obj[1],i);
17509 3 : double val;
17510 3 : if ( !PyArg_Parse(o, "d", &val ) ) {
17511 0 : PyErr_SetString(PyExc_TypeError, "not a number");
17512 0 : Py_DECREF(o);
17513 0 : SWIG_fail;
17514 : }
17515 3 : arg2[i] = val;
17516 3 : Py_DECREF(o);
17517 : }
17518 : }
17519 1 : {
17520 1 : const int bLocalUseExceptions = GetUseExceptions();
17521 1 : if ( bLocalUseExceptions ) {
17522 1 : pushErrorHandler();
17523 : }
17524 1 : OSRCoordinateTransformationShadow__TransformPoint3Double(arg1,arg2);
17525 1 : if ( bLocalUseExceptions ) {
17526 1 : popErrorHandler();
17527 : }
17528 : #ifndef SED_HACKS
17529 : if ( bLocalUseExceptions ) {
17530 : CPLErr eclass = CPLGetLastErrorType();
17531 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17532 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17533 : }
17534 : }
17535 : #endif
17536 : }
17537 1 : resultobj = SWIG_Py_Void();
17538 1 : {
17539 : /* %typemap(argout) (double argout[ANY]) */
17540 1 : PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
17541 : #if SWIG_VERSION >= 0x040300
17542 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
17543 : #else
17544 1 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
17545 : #endif
17546 : }
17547 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; } }
17548 : return resultobj;
17549 : fail:
17550 : return NULL;
17551 : }
17552 :
17553 :
17554 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformation__TransformPoint4Double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17555 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17556 1 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17557 1 : double *arg2 ;
17558 1 : void *argp1 = 0 ;
17559 1 : int res1 = 0 ;
17560 1 : double argin2[4] ;
17561 1 : PyObject *swig_obj[2] ;
17562 :
17563 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation__TransformPoint4Double", 2, 2, swig_obj)) SWIG_fail;
17564 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17565 1 : if (!SWIG_IsOK(res1)) {
17566 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation__TransformPoint4Double" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17567 : }
17568 1 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17569 1 : {
17570 : /* %typemap(in) (double argin2[ANY]) */
17571 1 : arg2 = argin2;
17572 1 : if (! PySequence_Check(swig_obj[1]) ) {
17573 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
17574 0 : SWIG_fail;
17575 : }
17576 1 : Py_ssize_t seq_size = PySequence_Size(swig_obj[1]);
17577 1 : if ( seq_size != 4 ) {
17578 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
17579 0 : SWIG_fail;
17580 : }
17581 5 : for (unsigned int i=0; i<4; i++) {
17582 4 : PyObject *o = PySequence_GetItem(swig_obj[1],i);
17583 4 : double val;
17584 4 : if ( !PyArg_Parse(o, "d", &val ) ) {
17585 0 : PyErr_SetString(PyExc_TypeError, "not a number");
17586 0 : Py_DECREF(o);
17587 0 : SWIG_fail;
17588 : }
17589 4 : arg2[i] = val;
17590 4 : Py_DECREF(o);
17591 : }
17592 : }
17593 1 : {
17594 1 : const int bLocalUseExceptions = GetUseExceptions();
17595 1 : if ( bLocalUseExceptions ) {
17596 1 : pushErrorHandler();
17597 : }
17598 1 : OSRCoordinateTransformationShadow__TransformPoint4Double(arg1,arg2);
17599 1 : if ( bLocalUseExceptions ) {
17600 1 : popErrorHandler();
17601 : }
17602 : #ifndef SED_HACKS
17603 : if ( bLocalUseExceptions ) {
17604 : CPLErr eclass = CPLGetLastErrorType();
17605 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17606 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17607 : }
17608 : }
17609 : #endif
17610 : }
17611 1 : resultobj = SWIG_Py_Void();
17612 1 : {
17613 : /* %typemap(argout) (double argout[ANY]) */
17614 1 : PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
17615 : #if SWIG_VERSION >= 0x040300
17616 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
17617 : #else
17618 1 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
17619 : #endif
17620 : }
17621 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; } }
17622 : return resultobj;
17623 : fail:
17624 : return NULL;
17625 : }
17626 :
17627 :
17628 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17629 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17630 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17631 : double *arg2 ;
17632 : double arg3 ;
17633 : double arg4 ;
17634 : double arg5 = (double) 0.0 ;
17635 : void *argp1 = 0 ;
17636 : int res1 = 0 ;
17637 : double argout2[3] ;
17638 : double val3 ;
17639 : int ecode3 = 0 ;
17640 : double val4 ;
17641 : int ecode4 = 0 ;
17642 : double val5 ;
17643 : int ecode5 = 0 ;
17644 :
17645 : {
17646 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
17647 : memset(argout2, 0, sizeof(argout2));
17648 : arg2 = argout2;
17649 : }
17650 : if ((nobjs < 3) || (nobjs > 4)) SWIG_fail;
17651 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17652 : if (!SWIG_IsOK(res1)) {
17653 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17654 : }
17655 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17656 : ecode3 = SWIG_AsVal_double(swig_obj[1], &val3);
17657 : if (!SWIG_IsOK(ecode3)) {
17658 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "3"" of type '" "double""'");
17659 : }
17660 : arg3 = static_cast< double >(val3);
17661 : ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
17662 : if (!SWIG_IsOK(ecode4)) {
17663 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "4"" of type '" "double""'");
17664 : }
17665 : arg4 = static_cast< double >(val4);
17666 : if (swig_obj[3]) {
17667 : ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
17668 : if (!SWIG_IsOK(ecode5)) {
17669 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "5"" of type '" "double""'");
17670 : }
17671 : arg5 = static_cast< double >(val5);
17672 : }
17673 : {
17674 : const int bLocalUseExceptions = GetUseExceptions();
17675 : if ( bLocalUseExceptions ) {
17676 : pushErrorHandler();
17677 : }
17678 : OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(arg1,arg2,arg3,arg4,arg5);
17679 : if ( bLocalUseExceptions ) {
17680 : popErrorHandler();
17681 : }
17682 : #ifndef SED_HACKS
17683 : if ( bLocalUseExceptions ) {
17684 : CPLErr eclass = CPLGetLastErrorType();
17685 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17686 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17687 : }
17688 : }
17689 : #endif
17690 : }
17691 : resultobj = SWIG_Py_Void();
17692 : {
17693 : /* %typemap(argout) (double argout[ANY]) */
17694 : PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
17695 : #if SWIG_VERSION >= 0x040300
17696 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
17697 : #else
17698 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
17699 : #endif
17700 : }
17701 : 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; } }
17702 : return resultobj;
17703 : fail:
17704 : return NULL;
17705 : }
17706 :
17707 :
17708 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17709 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17710 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17711 : double *arg2 ;
17712 : double arg3 ;
17713 : double arg4 ;
17714 : double arg5 ;
17715 : double arg6 ;
17716 : void *argp1 = 0 ;
17717 : int res1 = 0 ;
17718 : double argout2[4] ;
17719 : double val3 ;
17720 : int ecode3 = 0 ;
17721 : double val4 ;
17722 : int ecode4 = 0 ;
17723 : double val5 ;
17724 : int ecode5 = 0 ;
17725 : double val6 ;
17726 : int ecode6 = 0 ;
17727 :
17728 : {
17729 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
17730 : memset(argout2, 0, sizeof(argout2));
17731 : arg2 = argout2;
17732 : }
17733 : if ((nobjs < 5) || (nobjs > 5)) SWIG_fail;
17734 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17735 : if (!SWIG_IsOK(res1)) {
17736 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17737 : }
17738 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17739 : ecode3 = SWIG_AsVal_double(swig_obj[1], &val3);
17740 : if (!SWIG_IsOK(ecode3)) {
17741 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "3"" of type '" "double""'");
17742 : }
17743 : arg3 = static_cast< double >(val3);
17744 : ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
17745 : if (!SWIG_IsOK(ecode4)) {
17746 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "4"" of type '" "double""'");
17747 : }
17748 : arg4 = static_cast< double >(val4);
17749 : ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
17750 : if (!SWIG_IsOK(ecode5)) {
17751 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "5"" of type '" "double""'");
17752 : }
17753 : arg5 = static_cast< double >(val5);
17754 : ecode6 = SWIG_AsVal_double(swig_obj[4], &val6);
17755 : if (!SWIG_IsOK(ecode6)) {
17756 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "6"" of type '" "double""'");
17757 : }
17758 : arg6 = static_cast< double >(val6);
17759 : {
17760 : const int bLocalUseExceptions = GetUseExceptions();
17761 : if ( bLocalUseExceptions ) {
17762 : pushErrorHandler();
17763 : }
17764 : OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
17765 : if ( bLocalUseExceptions ) {
17766 : popErrorHandler();
17767 : }
17768 : #ifndef SED_HACKS
17769 : if ( bLocalUseExceptions ) {
17770 : CPLErr eclass = CPLGetLastErrorType();
17771 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17772 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17773 : }
17774 : }
17775 : #endif
17776 : }
17777 : resultobj = SWIG_Py_Void();
17778 : {
17779 : /* %typemap(argout) (double argout[ANY]) */
17780 : PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
17781 : #if SWIG_VERSION >= 0x040300
17782 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
17783 : #else
17784 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
17785 : #endif
17786 : }
17787 : 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; } }
17788 : return resultobj;
17789 : fail:
17790 : return NULL;
17791 : }
17792 :
17793 :
17794 177 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint(PyObject *self, PyObject *args) {
17795 177 : Py_ssize_t argc;
17796 177 : PyObject *argv[6] = {
17797 : 0
17798 : };
17799 :
17800 177 : if (!(argc = SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformPoint", 0, 5, argv))) SWIG_fail;
17801 177 : --argc;
17802 177 : if ((argc >= 3) && (argc <= 4)) {
17803 173 : int _v;
17804 173 : void *vptr = 0;
17805 173 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
17806 173 : _v = SWIG_CheckState(res);
17807 171 : if (_v) {
17808 171 : {
17809 171 : int res = SWIG_AsVal_double(argv[1], NULL);
17810 171 : _v = SWIG_CheckState(res);
17811 : }
17812 171 : if (_v) {
17813 171 : {
17814 171 : int res = SWIG_AsVal_double(argv[2], NULL);
17815 171 : _v = SWIG_CheckState(res);
17816 : }
17817 171 : if (_v) {
17818 171 : if (argc <= 3) {
17819 171 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_0(self, argc, argv);
17820 : }
17821 117 : {
17822 117 : int res = SWIG_AsVal_double(argv[3], NULL);
17823 117 : _v = SWIG_CheckState(res);
17824 : }
17825 117 : if (_v) {
17826 117 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_0(self, argc, argv);
17827 : }
17828 : }
17829 : }
17830 : }
17831 : }
17832 6 : if (argc == 5) {
17833 4 : int _v;
17834 4 : void *vptr = 0;
17835 4 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
17836 4 : _v = SWIG_CheckState(res);
17837 4 : if (_v) {
17838 4 : {
17839 4 : int res = SWIG_AsVal_double(argv[1], NULL);
17840 4 : _v = SWIG_CheckState(res);
17841 : }
17842 4 : if (_v) {
17843 4 : {
17844 4 : int res = SWIG_AsVal_double(argv[2], NULL);
17845 4 : _v = SWIG_CheckState(res);
17846 : }
17847 4 : if (_v) {
17848 4 : {
17849 4 : int res = SWIG_AsVal_double(argv[3], NULL);
17850 4 : _v = SWIG_CheckState(res);
17851 : }
17852 4 : if (_v) {
17853 4 : {
17854 4 : int res = SWIG_AsVal_double(argv[4], NULL);
17855 4 : _v = SWIG_CheckState(res);
17856 : }
17857 4 : if (_v) {
17858 4 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_1(self, argc, argv);
17859 : }
17860 : }
17861 : }
17862 : }
17863 : }
17864 : }
17865 :
17866 2 : fail:
17867 2 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'CoordinateTransformation_TransformPoint'.\n"
17868 : " Possible C/C++ prototypes are:\n"
17869 : " OSRCoordinateTransformationShadow::TransformPoint(double [3],double,double,double)\n"
17870 : " OSRCoordinateTransformationShadow::TransformPoint(double [4],double,double,double,double)\n");
17871 : return 0;
17872 : }
17873 :
17874 :
17875 0 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPointWithErrorCode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17876 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17877 0 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17878 0 : double *arg2 ;
17879 0 : int *arg3 ;
17880 0 : double arg4 ;
17881 0 : double arg5 ;
17882 0 : double arg6 ;
17883 0 : double arg7 ;
17884 0 : void *argp1 = 0 ;
17885 0 : int res1 = 0 ;
17886 0 : double argout2[4] ;
17887 0 : int errorCode2[1] ;
17888 0 : double val4 ;
17889 0 : int ecode4 = 0 ;
17890 0 : double val5 ;
17891 0 : int ecode5 = 0 ;
17892 0 : double val6 ;
17893 0 : int ecode6 = 0 ;
17894 0 : double val7 ;
17895 0 : int ecode7 = 0 ;
17896 0 : PyObject *swig_obj[5] ;
17897 :
17898 0 : {
17899 : /* %typemap(in) (double argout2[4], int errorCode2[1]) */
17900 0 : arg2 = argout2;
17901 0 : arg3 = errorCode2;
17902 : }
17903 0 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformPointWithErrorCode", 5, 5, swig_obj)) SWIG_fail;
17904 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17905 0 : if (!SWIG_IsOK(res1)) {
17906 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17907 : }
17908 0 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17909 0 : ecode4 = SWIG_AsVal_double(swig_obj[1], &val4);
17910 0 : if (!SWIG_IsOK(ecode4)) {
17911 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "4"" of type '" "double""'");
17912 : }
17913 0 : arg4 = static_cast< double >(val4);
17914 0 : ecode5 = SWIG_AsVal_double(swig_obj[2], &val5);
17915 0 : if (!SWIG_IsOK(ecode5)) {
17916 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "5"" of type '" "double""'");
17917 : }
17918 0 : arg5 = static_cast< double >(val5);
17919 0 : ecode6 = SWIG_AsVal_double(swig_obj[3], &val6);
17920 0 : if (!SWIG_IsOK(ecode6)) {
17921 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "6"" of type '" "double""'");
17922 : }
17923 0 : arg6 = static_cast< double >(val6);
17924 0 : ecode7 = SWIG_AsVal_double(swig_obj[4], &val7);
17925 0 : if (!SWIG_IsOK(ecode7)) {
17926 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "7"" of type '" "double""'");
17927 : }
17928 0 : arg7 = static_cast< double >(val7);
17929 0 : {
17930 0 : const int bLocalUseExceptions = GetUseExceptions();
17931 0 : if ( bLocalUseExceptions ) {
17932 0 : pushErrorHandler();
17933 : }
17934 0 : OSRCoordinateTransformationShadow_TransformPointWithErrorCode(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
17935 0 : if ( bLocalUseExceptions ) {
17936 0 : popErrorHandler();
17937 : }
17938 : #ifndef SED_HACKS
17939 : if ( bLocalUseExceptions ) {
17940 : CPLErr eclass = CPLGetLastErrorType();
17941 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17942 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17943 : }
17944 : }
17945 : #endif
17946 : }
17947 0 : resultobj = SWIG_Py_Void();
17948 0 : {
17949 : /* %typemap(argout) (double argout[4], int errorCode[1]) */
17950 0 : PyObject *r = PyTuple_New( 5 );
17951 0 : PyTuple_SetItem( r, 0, PyFloat_FromDouble(arg2[0]));
17952 0 : PyTuple_SetItem( r, 1, PyFloat_FromDouble(arg2[1]));
17953 0 : PyTuple_SetItem( r, 2, PyFloat_FromDouble(arg2[2]));
17954 0 : PyTuple_SetItem( r, 3, PyFloat_FromDouble(arg2[3]));
17955 0 : PyTuple_SetItem( r, 4, PyLong_FromLong(arg3[0]));
17956 : #if SWIG_VERSION >= 0x040300
17957 : resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
17958 : #else
17959 0 : resultobj = SWIG_Python_AppendOutput(resultobj,r);
17960 : #endif
17961 : }
17962 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; } }
17963 : return resultobj;
17964 : fail:
17965 : return NULL;
17966 : }
17967 :
17968 :
17969 10 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17970 10 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17971 10 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17972 10 : int arg2 ;
17973 10 : double *arg3 = (double *) 0 ;
17974 10 : double *arg4 = (double *) 0 ;
17975 10 : double *arg5 = (double *) 0 ;
17976 10 : double *arg6 = (double *) 0 ;
17977 10 : void *argp1 = 0 ;
17978 10 : int res1 = 0 ;
17979 10 : int foundTime2 = FALSE ;
17980 10 : PyObject *swig_obj[2] ;
17981 :
17982 10 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformPoints", 2, 2, swig_obj)) SWIG_fail;
17983 10 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17984 10 : if (!SWIG_IsOK(res1)) {
17985 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoints" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17986 : }
17987 10 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17988 10 : {
17989 10 : if ( !PySequence_Check(swig_obj[1]) ) {
17990 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
17991 0 : SWIG_fail;
17992 : }
17993 :
17994 10 : Py_ssize_t size = PySequence_Size(swig_obj[1]);
17995 10 : if( size != (int)size ) {
17996 0 : PyErr_SetString(PyExc_TypeError, "too big sequence");
17997 0 : SWIG_fail;
17998 : }
17999 10 : arg2 = (int)size;
18000 10 : arg3 = (double*) VSIMalloc(arg2*sizeof(double));
18001 10 : arg4 = (double*) VSIMalloc(arg2*sizeof(double));
18002 10 : arg5 = (double*) VSIMalloc(arg2*sizeof(double));
18003 10 : arg6 = (double*) VSIMalloc(arg2*sizeof(double));
18004 :
18005 10 : if (arg3 == NULL || arg4 == NULL || arg5 == NULL || arg6 == NULL)
18006 : {
18007 0 : PyErr_SetString( PyExc_RuntimeError, "Out of memory" );
18008 0 : SWIG_fail;
18009 : }
18010 :
18011 10 : if (!DecomposeSequenceOf4DCoordinates(swig_obj[1],arg2,arg3,arg4,arg5,arg6, &foundTime2)) {
18012 0 : SWIG_fail;
18013 : }
18014 : }
18015 10 : {
18016 10 : const int bLocalUseExceptions = GetUseExceptions();
18017 10 : if ( bLocalUseExceptions ) {
18018 10 : pushErrorHandler();
18019 : }
18020 10 : OSRCoordinateTransformationShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5,arg6);
18021 10 : if ( bLocalUseExceptions ) {
18022 10 : popErrorHandler();
18023 : }
18024 : #ifndef SED_HACKS
18025 : if ( bLocalUseExceptions ) {
18026 : CPLErr eclass = CPLGetLastErrorType();
18027 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18028 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18029 : }
18030 : }
18031 : #endif
18032 : }
18033 10 : resultobj = SWIG_Py_Void();
18034 10 : {
18035 : /* %typemap(argout) (int nCount, double *x, double *y, double *z, double *t) */
18036 10 : Py_DECREF(resultobj);
18037 10 : PyObject *out = PyList_New( arg2 );
18038 10 : if( !out ) {
18039 0 : SWIG_fail;
18040 : }
18041 10 : int foundTime = foundTime2;
18042 33 : for( int i=0; i< arg2; i++ ) {
18043 38 : PyObject *tuple = PyTuple_New( foundTime ? 4 : 3 );
18044 23 : PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (arg3)[i] ) );
18045 23 : PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (arg4)[i] ) );
18046 23 : PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (arg5)[i] ) );
18047 23 : if( foundTime )
18048 8 : PyTuple_SetItem( tuple, 3, PyFloat_FromDouble( (arg6)[i] ) );
18049 23 : PyList_SetItem( out, i, tuple );
18050 : }
18051 10 : resultobj = out;
18052 : }
18053 10 : {
18054 : /* %typemap(freearg) (int nCount, double *x, double *y, double *z, double *t) */
18055 10 : VSIFree(arg3);
18056 10 : VSIFree(arg4);
18057 10 : VSIFree(arg5);
18058 10 : VSIFree(arg6);
18059 : }
18060 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; } }
18061 : return resultobj;
18062 0 : fail:
18063 0 : {
18064 : /* %typemap(freearg) (int nCount, double *x, double *y, double *z, double *t) */
18065 0 : VSIFree(arg3);
18066 0 : VSIFree(arg4);
18067 0 : VSIFree(arg5);
18068 0 : VSIFree(arg6);
18069 : }
18070 : return NULL;
18071 : }
18072 :
18073 :
18074 25 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18075 25 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18076 25 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
18077 25 : double *arg2 ;
18078 25 : double arg3 ;
18079 25 : double arg4 ;
18080 25 : double arg5 ;
18081 25 : double arg6 ;
18082 25 : int arg7 ;
18083 25 : void *argp1 = 0 ;
18084 25 : int res1 = 0 ;
18085 25 : double argout2[4] ;
18086 25 : double val3 ;
18087 25 : int ecode3 = 0 ;
18088 25 : double val4 ;
18089 25 : int ecode4 = 0 ;
18090 25 : double val5 ;
18091 25 : int ecode5 = 0 ;
18092 25 : double val6 ;
18093 25 : int ecode6 = 0 ;
18094 25 : int val7 ;
18095 25 : int ecode7 = 0 ;
18096 25 : PyObject *swig_obj[6] ;
18097 :
18098 25 : {
18099 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
18100 25 : memset(argout2, 0, sizeof(argout2));
18101 25 : arg2 = argout2;
18102 : }
18103 25 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformBounds", 6, 6, swig_obj)) SWIG_fail;
18104 25 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
18105 25 : if (!SWIG_IsOK(res1)) {
18106 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
18107 : }
18108 25 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
18109 25 : ecode3 = SWIG_AsVal_double(swig_obj[1], &val3);
18110 25 : if (!SWIG_IsOK(ecode3)) {
18111 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "3"" of type '" "double""'");
18112 : }
18113 25 : arg3 = static_cast< double >(val3);
18114 25 : ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
18115 25 : if (!SWIG_IsOK(ecode4)) {
18116 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "4"" of type '" "double""'");
18117 : }
18118 25 : arg4 = static_cast< double >(val4);
18119 25 : ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
18120 25 : if (!SWIG_IsOK(ecode5)) {
18121 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "5"" of type '" "double""'");
18122 : }
18123 25 : arg5 = static_cast< double >(val5);
18124 25 : ecode6 = SWIG_AsVal_double(swig_obj[4], &val6);
18125 25 : if (!SWIG_IsOK(ecode6)) {
18126 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "6"" of type '" "double""'");
18127 : }
18128 25 : arg6 = static_cast< double >(val6);
18129 25 : ecode7 = SWIG_AsVal_int(swig_obj[5], &val7);
18130 25 : if (!SWIG_IsOK(ecode7)) {
18131 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "7"" of type '" "int""'");
18132 : }
18133 25 : arg7 = static_cast< int >(val7);
18134 25 : {
18135 25 : const int bLocalUseExceptions = GetUseExceptions();
18136 25 : if ( bLocalUseExceptions ) {
18137 24 : pushErrorHandler();
18138 : }
18139 25 : OSRCoordinateTransformationShadow_TransformBounds(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
18140 25 : if ( bLocalUseExceptions ) {
18141 24 : popErrorHandler();
18142 : }
18143 : #ifndef SED_HACKS
18144 : if ( bLocalUseExceptions ) {
18145 : CPLErr eclass = CPLGetLastErrorType();
18146 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18147 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18148 : }
18149 : }
18150 : #endif
18151 : }
18152 25 : resultobj = SWIG_Py_Void();
18153 25 : {
18154 : /* %typemap(argout) (double argout[ANY]) */
18155 25 : PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
18156 : #if SWIG_VERSION >= 0x040300
18157 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
18158 : #else
18159 25 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
18160 : #endif
18161 : }
18162 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; } }
18163 : return resultobj;
18164 : fail:
18165 : return NULL;
18166 : }
18167 :
18168 :
18169 285 : SWIGINTERN PyObject *CoordinateTransformation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18170 285 : PyObject *obj;
18171 285 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
18172 285 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_NewClientData(obj));
18173 285 : return SWIG_Py_Void();
18174 : }
18175 :
18176 140 : SWIGINTERN PyObject *CoordinateTransformation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18177 140 : return SWIG_Python_InitShadowInstance(args);
18178 : }
18179 :
18180 2 : SWIGINTERN PyObject *_wrap_CreateCoordinateTransformation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18181 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18182 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
18183 2 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
18184 2 : OGRCoordinateTransformationOptions *arg3 = (OGRCoordinateTransformationOptions *) NULL ;
18185 2 : void *argp1 = 0 ;
18186 2 : int res1 = 0 ;
18187 2 : void *argp2 = 0 ;
18188 2 : int res2 = 0 ;
18189 2 : void *argp3 = 0 ;
18190 2 : int res3 = 0 ;
18191 2 : PyObject *swig_obj[3] ;
18192 2 : OSRCoordinateTransformationShadow *result = 0 ;
18193 :
18194 2 : if (!SWIG_Python_UnpackTuple(args, "CreateCoordinateTransformation", 2, 3, swig_obj)) SWIG_fail;
18195 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
18196 2 : if (!SWIG_IsOK(res1)) {
18197 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateCoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
18198 : }
18199 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
18200 2 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
18201 2 : if (!SWIG_IsOK(res2)) {
18202 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateCoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
18203 : }
18204 2 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
18205 2 : if (swig_obj[2]) {
18206 0 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
18207 0 : if (!SWIG_IsOK(res3)) {
18208 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreateCoordinateTransformation" "', argument " "3"" of type '" "OGRCoordinateTransformationOptions *""'");
18209 : }
18210 0 : arg3 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp3);
18211 : }
18212 2 : {
18213 2 : const int bLocalUseExceptions = GetUseExceptions();
18214 2 : if ( bLocalUseExceptions ) {
18215 2 : pushErrorHandler();
18216 : }
18217 2 : result = (OSRCoordinateTransformationShadow *)CreateCoordinateTransformation(arg1,arg2,arg3);
18218 2 : if ( bLocalUseExceptions ) {
18219 2 : popErrorHandler();
18220 : }
18221 : #ifndef SED_HACKS
18222 : if ( bLocalUseExceptions ) {
18223 : CPLErr eclass = CPLGetLastErrorType();
18224 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18225 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18226 : }
18227 : }
18228 : #endif
18229 : }
18230 2 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_OWN | 0 );
18231 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; } }
18232 : return resultobj;
18233 : fail:
18234 : return NULL;
18235 : }
18236 :
18237 :
18238 6609 : SWIGINTERN PyObject *_wrap_CRSInfo_auth_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18239 6609 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18240 6609 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18241 6609 : void *argp1 = 0 ;
18242 6609 : int res1 = 0 ;
18243 6609 : PyObject *swig_obj[1] ;
18244 6609 : char *result = 0 ;
18245 :
18246 6609 : if (!args) SWIG_fail;
18247 6609 : swig_obj[0] = args;
18248 6609 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18249 6609 : if (!SWIG_IsOK(res1)) {
18250 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_auth_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18251 : }
18252 6609 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18253 6609 : {
18254 6609 : const int bLocalUseExceptions = GetUseExceptions();
18255 6609 : if ( bLocalUseExceptions ) {
18256 6609 : pushErrorHandler();
18257 : }
18258 6609 : result = (char *)OSRCRSInfo_auth_name_get(arg1);
18259 6609 : if ( bLocalUseExceptions ) {
18260 6609 : popErrorHandler();
18261 : }
18262 : #ifndef SED_HACKS
18263 : if ( bLocalUseExceptions ) {
18264 : CPLErr eclass = CPLGetLastErrorType();
18265 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18266 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18267 : }
18268 : }
18269 : #endif
18270 : }
18271 6609 : resultobj = SWIG_FromCharPtr((const char *)result);
18272 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; } }
18273 : return resultobj;
18274 : fail:
18275 : return NULL;
18276 : }
18277 :
18278 :
18279 6609 : SWIGINTERN PyObject *_wrap_CRSInfo_code_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18280 6609 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18281 6609 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18282 6609 : void *argp1 = 0 ;
18283 6609 : int res1 = 0 ;
18284 6609 : PyObject *swig_obj[1] ;
18285 6609 : char *result = 0 ;
18286 :
18287 6609 : if (!args) SWIG_fail;
18288 6609 : swig_obj[0] = args;
18289 6609 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18290 6609 : if (!SWIG_IsOK(res1)) {
18291 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_code_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18292 : }
18293 6609 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18294 6609 : {
18295 6609 : const int bLocalUseExceptions = GetUseExceptions();
18296 6609 : if ( bLocalUseExceptions ) {
18297 6609 : pushErrorHandler();
18298 : }
18299 6609 : result = (char *)OSRCRSInfo_code_get(arg1);
18300 6609 : if ( bLocalUseExceptions ) {
18301 6609 : popErrorHandler();
18302 : }
18303 : #ifndef SED_HACKS
18304 : if ( bLocalUseExceptions ) {
18305 : CPLErr eclass = CPLGetLastErrorType();
18306 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18307 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18308 : }
18309 : }
18310 : #endif
18311 : }
18312 6609 : resultobj = SWIG_FromCharPtr((const char *)result);
18313 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; } }
18314 : return resultobj;
18315 : fail:
18316 : return NULL;
18317 : }
18318 :
18319 :
18320 1 : SWIGINTERN PyObject *_wrap_CRSInfo_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18321 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18322 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18323 1 : void *argp1 = 0 ;
18324 1 : int res1 = 0 ;
18325 1 : PyObject *swig_obj[1] ;
18326 1 : char *result = 0 ;
18327 :
18328 1 : if (!args) SWIG_fail;
18329 1 : swig_obj[0] = args;
18330 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18331 1 : if (!SWIG_IsOK(res1)) {
18332 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18333 : }
18334 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18335 1 : {
18336 1 : const int bLocalUseExceptions = GetUseExceptions();
18337 1 : if ( bLocalUseExceptions ) {
18338 1 : pushErrorHandler();
18339 : }
18340 1 : result = (char *)OSRCRSInfo_name_get(arg1);
18341 1 : if ( bLocalUseExceptions ) {
18342 1 : popErrorHandler();
18343 : }
18344 : #ifndef SED_HACKS
18345 : if ( bLocalUseExceptions ) {
18346 : CPLErr eclass = CPLGetLastErrorType();
18347 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18348 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18349 : }
18350 : }
18351 : #endif
18352 : }
18353 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18354 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; } }
18355 : return resultobj;
18356 : fail:
18357 : return NULL;
18358 : }
18359 :
18360 :
18361 1 : SWIGINTERN PyObject *_wrap_CRSInfo_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18362 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18363 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18364 1 : void *argp1 = 0 ;
18365 1 : int res1 = 0 ;
18366 1 : PyObject *swig_obj[1] ;
18367 1 : OSRCRSType result;
18368 :
18369 1 : if (!args) SWIG_fail;
18370 1 : swig_obj[0] = args;
18371 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18372 1 : if (!SWIG_IsOK(res1)) {
18373 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_type_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18374 : }
18375 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18376 1 : {
18377 1 : const int bLocalUseExceptions = GetUseExceptions();
18378 1 : if ( bLocalUseExceptions ) {
18379 1 : pushErrorHandler();
18380 : }
18381 1 : result = (OSRCRSType)OSRCRSInfo_type_get(arg1);
18382 1 : if ( bLocalUseExceptions ) {
18383 1 : popErrorHandler();
18384 : }
18385 : #ifndef SED_HACKS
18386 : if ( bLocalUseExceptions ) {
18387 : CPLErr eclass = CPLGetLastErrorType();
18388 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18389 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18390 : }
18391 : }
18392 : #endif
18393 : }
18394 1 : resultobj = SWIG_From_int(static_cast< int >(result));
18395 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; } }
18396 : return resultobj;
18397 : fail:
18398 : return NULL;
18399 : }
18400 :
18401 :
18402 1 : SWIGINTERN PyObject *_wrap_CRSInfo_deprecated_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18403 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18404 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18405 1 : void *argp1 = 0 ;
18406 1 : int res1 = 0 ;
18407 1 : PyObject *swig_obj[1] ;
18408 1 : bool result;
18409 :
18410 1 : if (!args) SWIG_fail;
18411 1 : swig_obj[0] = args;
18412 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18413 1 : if (!SWIG_IsOK(res1)) {
18414 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_deprecated_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18415 : }
18416 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18417 1 : {
18418 1 : const int bLocalUseExceptions = GetUseExceptions();
18419 1 : if ( bLocalUseExceptions ) {
18420 1 : pushErrorHandler();
18421 : }
18422 1 : result = (bool)OSRCRSInfo_deprecated_get(arg1);
18423 1 : if ( bLocalUseExceptions ) {
18424 1 : popErrorHandler();
18425 : }
18426 : #ifndef SED_HACKS
18427 : if ( bLocalUseExceptions ) {
18428 : CPLErr eclass = CPLGetLastErrorType();
18429 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18430 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18431 : }
18432 : }
18433 : #endif
18434 : }
18435 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
18436 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; } }
18437 : return resultobj;
18438 : fail:
18439 : return NULL;
18440 : }
18441 :
18442 :
18443 1 : SWIGINTERN PyObject *_wrap_CRSInfo_bbox_valid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18444 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18445 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18446 1 : void *argp1 = 0 ;
18447 1 : int res1 = 0 ;
18448 1 : PyObject *swig_obj[1] ;
18449 1 : bool result;
18450 :
18451 1 : if (!args) SWIG_fail;
18452 1 : swig_obj[0] = args;
18453 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18454 1 : if (!SWIG_IsOK(res1)) {
18455 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_bbox_valid_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18456 : }
18457 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18458 1 : {
18459 1 : const int bLocalUseExceptions = GetUseExceptions();
18460 1 : if ( bLocalUseExceptions ) {
18461 1 : pushErrorHandler();
18462 : }
18463 1 : result = (bool)OSRCRSInfo_bbox_valid_get(arg1);
18464 1 : if ( bLocalUseExceptions ) {
18465 1 : popErrorHandler();
18466 : }
18467 : #ifndef SED_HACKS
18468 : if ( bLocalUseExceptions ) {
18469 : CPLErr eclass = CPLGetLastErrorType();
18470 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18471 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18472 : }
18473 : }
18474 : #endif
18475 : }
18476 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
18477 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; } }
18478 : return resultobj;
18479 : fail:
18480 : return NULL;
18481 : }
18482 :
18483 :
18484 1 : SWIGINTERN PyObject *_wrap_CRSInfo_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18485 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18486 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18487 1 : void *argp1 = 0 ;
18488 1 : int res1 = 0 ;
18489 1 : PyObject *swig_obj[1] ;
18490 1 : double result;
18491 :
18492 1 : if (!args) SWIG_fail;
18493 1 : swig_obj[0] = args;
18494 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18495 1 : if (!SWIG_IsOK(res1)) {
18496 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_west_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18497 : }
18498 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18499 1 : {
18500 1 : const int bLocalUseExceptions = GetUseExceptions();
18501 1 : if ( bLocalUseExceptions ) {
18502 1 : pushErrorHandler();
18503 : }
18504 1 : result = (double)OSRCRSInfo_west_lon_degree_get(arg1);
18505 1 : if ( bLocalUseExceptions ) {
18506 1 : popErrorHandler();
18507 : }
18508 : #ifndef SED_HACKS
18509 : if ( bLocalUseExceptions ) {
18510 : CPLErr eclass = CPLGetLastErrorType();
18511 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18512 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18513 : }
18514 : }
18515 : #endif
18516 : }
18517 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18518 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; } }
18519 : return resultobj;
18520 : fail:
18521 : return NULL;
18522 : }
18523 :
18524 :
18525 1 : SWIGINTERN PyObject *_wrap_CRSInfo_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18526 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18527 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18528 1 : void *argp1 = 0 ;
18529 1 : int res1 = 0 ;
18530 1 : PyObject *swig_obj[1] ;
18531 1 : double result;
18532 :
18533 1 : if (!args) SWIG_fail;
18534 1 : swig_obj[0] = args;
18535 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18536 1 : if (!SWIG_IsOK(res1)) {
18537 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_south_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18538 : }
18539 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18540 1 : {
18541 1 : const int bLocalUseExceptions = GetUseExceptions();
18542 1 : if ( bLocalUseExceptions ) {
18543 1 : pushErrorHandler();
18544 : }
18545 1 : result = (double)OSRCRSInfo_south_lat_degree_get(arg1);
18546 1 : if ( bLocalUseExceptions ) {
18547 1 : popErrorHandler();
18548 : }
18549 : #ifndef SED_HACKS
18550 : if ( bLocalUseExceptions ) {
18551 : CPLErr eclass = CPLGetLastErrorType();
18552 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18553 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18554 : }
18555 : }
18556 : #endif
18557 : }
18558 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18559 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; } }
18560 : return resultobj;
18561 : fail:
18562 : return NULL;
18563 : }
18564 :
18565 :
18566 1 : SWIGINTERN PyObject *_wrap_CRSInfo_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18567 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18568 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18569 1 : void *argp1 = 0 ;
18570 1 : int res1 = 0 ;
18571 1 : PyObject *swig_obj[1] ;
18572 1 : double result;
18573 :
18574 1 : if (!args) SWIG_fail;
18575 1 : swig_obj[0] = args;
18576 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18577 1 : if (!SWIG_IsOK(res1)) {
18578 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_east_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18579 : }
18580 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18581 1 : {
18582 1 : const int bLocalUseExceptions = GetUseExceptions();
18583 1 : if ( bLocalUseExceptions ) {
18584 1 : pushErrorHandler();
18585 : }
18586 1 : result = (double)OSRCRSInfo_east_lon_degree_get(arg1);
18587 1 : if ( bLocalUseExceptions ) {
18588 1 : popErrorHandler();
18589 : }
18590 : #ifndef SED_HACKS
18591 : if ( bLocalUseExceptions ) {
18592 : CPLErr eclass = CPLGetLastErrorType();
18593 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18594 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18595 : }
18596 : }
18597 : #endif
18598 : }
18599 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18600 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; } }
18601 : return resultobj;
18602 : fail:
18603 : return NULL;
18604 : }
18605 :
18606 :
18607 1 : SWIGINTERN PyObject *_wrap_CRSInfo_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18608 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18609 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18610 1 : void *argp1 = 0 ;
18611 1 : int res1 = 0 ;
18612 1 : PyObject *swig_obj[1] ;
18613 1 : double result;
18614 :
18615 1 : if (!args) SWIG_fail;
18616 1 : swig_obj[0] = args;
18617 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18618 1 : if (!SWIG_IsOK(res1)) {
18619 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_north_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18620 : }
18621 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18622 1 : {
18623 1 : const int bLocalUseExceptions = GetUseExceptions();
18624 1 : if ( bLocalUseExceptions ) {
18625 1 : pushErrorHandler();
18626 : }
18627 1 : result = (double)OSRCRSInfo_north_lat_degree_get(arg1);
18628 1 : if ( bLocalUseExceptions ) {
18629 1 : popErrorHandler();
18630 : }
18631 : #ifndef SED_HACKS
18632 : if ( bLocalUseExceptions ) {
18633 : CPLErr eclass = CPLGetLastErrorType();
18634 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18635 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18636 : }
18637 : }
18638 : #endif
18639 : }
18640 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18641 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; } }
18642 : return resultobj;
18643 : fail:
18644 : return NULL;
18645 : }
18646 :
18647 :
18648 1 : SWIGINTERN PyObject *_wrap_CRSInfo_area_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18649 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18650 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18651 1 : void *argp1 = 0 ;
18652 1 : int res1 = 0 ;
18653 1 : PyObject *swig_obj[1] ;
18654 1 : char *result = 0 ;
18655 :
18656 1 : if (!args) SWIG_fail;
18657 1 : swig_obj[0] = args;
18658 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18659 1 : if (!SWIG_IsOK(res1)) {
18660 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_area_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18661 : }
18662 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18663 1 : {
18664 1 : const int bLocalUseExceptions = GetUseExceptions();
18665 1 : if ( bLocalUseExceptions ) {
18666 1 : pushErrorHandler();
18667 : }
18668 1 : result = (char *)OSRCRSInfo_area_name_get(arg1);
18669 1 : if ( bLocalUseExceptions ) {
18670 1 : popErrorHandler();
18671 : }
18672 : #ifndef SED_HACKS
18673 : if ( bLocalUseExceptions ) {
18674 : CPLErr eclass = CPLGetLastErrorType();
18675 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18676 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18677 : }
18678 : }
18679 : #endif
18680 : }
18681 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18682 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; } }
18683 : return resultobj;
18684 : fail:
18685 : return NULL;
18686 : }
18687 :
18688 :
18689 1 : SWIGINTERN PyObject *_wrap_CRSInfo_projection_method_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18690 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18691 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18692 1 : void *argp1 = 0 ;
18693 1 : int res1 = 0 ;
18694 1 : PyObject *swig_obj[1] ;
18695 1 : char *result = 0 ;
18696 :
18697 1 : if (!args) SWIG_fail;
18698 1 : swig_obj[0] = args;
18699 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18700 1 : if (!SWIG_IsOK(res1)) {
18701 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_projection_method_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18702 : }
18703 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18704 1 : {
18705 1 : const int bLocalUseExceptions = GetUseExceptions();
18706 1 : if ( bLocalUseExceptions ) {
18707 1 : pushErrorHandler();
18708 : }
18709 1 : result = (char *)OSRCRSInfo_projection_method_get(arg1);
18710 1 : if ( bLocalUseExceptions ) {
18711 1 : popErrorHandler();
18712 : }
18713 : #ifndef SED_HACKS
18714 : if ( bLocalUseExceptions ) {
18715 : CPLErr eclass = CPLGetLastErrorType();
18716 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18717 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18718 : }
18719 : }
18720 : #endif
18721 : }
18722 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18723 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; } }
18724 : return resultobj;
18725 : fail:
18726 : return NULL;
18727 : }
18728 :
18729 :
18730 1 : SWIGINTERN PyObject *_wrap_CRSInfo_celestial_body_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18731 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18732 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18733 1 : void *argp1 = 0 ;
18734 1 : int res1 = 0 ;
18735 1 : PyObject *swig_obj[1] ;
18736 1 : char *result = 0 ;
18737 :
18738 1 : if (!args) SWIG_fail;
18739 1 : swig_obj[0] = args;
18740 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18741 1 : if (!SWIG_IsOK(res1)) {
18742 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_celestial_body_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18743 : }
18744 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18745 1 : {
18746 1 : const int bLocalUseExceptions = GetUseExceptions();
18747 1 : if ( bLocalUseExceptions ) {
18748 1 : pushErrorHandler();
18749 : }
18750 1 : result = (char *)OSRCRSInfo_celestial_body_name_get(arg1);
18751 1 : if ( bLocalUseExceptions ) {
18752 1 : popErrorHandler();
18753 : }
18754 : #ifndef SED_HACKS
18755 : if ( bLocalUseExceptions ) {
18756 : CPLErr eclass = CPLGetLastErrorType();
18757 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18758 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18759 : }
18760 : }
18761 : #endif
18762 : }
18763 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18764 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; } }
18765 : return resultobj;
18766 : fail:
18767 : return NULL;
18768 : }
18769 :
18770 :
18771 0 : SWIGINTERN PyObject *_wrap_new_CRSInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18772 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18773 0 : char *arg1 = (char *) 0 ;
18774 0 : char *arg2 = (char *) 0 ;
18775 0 : char *arg3 = (char *) 0 ;
18776 0 : OSRCRSType arg4 ;
18777 0 : bool arg5 ;
18778 0 : bool arg6 ;
18779 0 : double arg7 ;
18780 0 : double arg8 ;
18781 0 : double arg9 ;
18782 0 : double arg10 ;
18783 0 : char *arg11 = (char *) 0 ;
18784 0 : char *arg12 = (char *) 0 ;
18785 0 : char *arg13 = (char *) 0 ;
18786 0 : int res1 ;
18787 0 : char *buf1 = 0 ;
18788 0 : int alloc1 = 0 ;
18789 0 : int res2 ;
18790 0 : char *buf2 = 0 ;
18791 0 : int alloc2 = 0 ;
18792 0 : int res3 ;
18793 0 : char *buf3 = 0 ;
18794 0 : int alloc3 = 0 ;
18795 0 : int val4 ;
18796 0 : int ecode4 = 0 ;
18797 0 : bool val5 ;
18798 0 : int ecode5 = 0 ;
18799 0 : bool val6 ;
18800 0 : int ecode6 = 0 ;
18801 0 : double val7 ;
18802 0 : int ecode7 = 0 ;
18803 0 : double val8 ;
18804 0 : int ecode8 = 0 ;
18805 0 : double val9 ;
18806 0 : int ecode9 = 0 ;
18807 0 : double val10 ;
18808 0 : int ecode10 = 0 ;
18809 0 : int res11 ;
18810 0 : char *buf11 = 0 ;
18811 0 : int alloc11 = 0 ;
18812 0 : int res12 ;
18813 0 : char *buf12 = 0 ;
18814 0 : int alloc12 = 0 ;
18815 0 : int res13 ;
18816 0 : char *buf13 = 0 ;
18817 0 : int alloc13 = 0 ;
18818 0 : PyObject *swig_obj[13] ;
18819 0 : OSRCRSInfo *result = 0 ;
18820 :
18821 0 : if (!SWIG_Python_UnpackTuple(args, "new_CRSInfo", 13, 13, swig_obj)) SWIG_fail;
18822 0 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
18823 0 : if (!SWIG_IsOK(res1)) {
18824 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CRSInfo" "', argument " "1"" of type '" "char const *""'");
18825 : }
18826 0 : arg1 = reinterpret_cast< char * >(buf1);
18827 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
18828 0 : if (!SWIG_IsOK(res2)) {
18829 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CRSInfo" "', argument " "2"" of type '" "char const *""'");
18830 : }
18831 0 : arg2 = reinterpret_cast< char * >(buf2);
18832 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
18833 0 : if (!SWIG_IsOK(res3)) {
18834 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CRSInfo" "', argument " "3"" of type '" "char const *""'");
18835 : }
18836 0 : arg3 = reinterpret_cast< char * >(buf3);
18837 0 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
18838 0 : if (!SWIG_IsOK(ecode4)) {
18839 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CRSInfo" "', argument " "4"" of type '" "OSRCRSType""'");
18840 : }
18841 0 : arg4 = static_cast< OSRCRSType >(val4);
18842 0 : ecode5 = SWIG_AsVal_bool(swig_obj[4], &val5);
18843 0 : if (!SWIG_IsOK(ecode5)) {
18844 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CRSInfo" "', argument " "5"" of type '" "bool""'");
18845 : }
18846 0 : arg5 = static_cast< bool >(val5);
18847 0 : ecode6 = SWIG_AsVal_bool(swig_obj[5], &val6);
18848 0 : if (!SWIG_IsOK(ecode6)) {
18849 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_CRSInfo" "', argument " "6"" of type '" "bool""'");
18850 : }
18851 0 : arg6 = static_cast< bool >(val6);
18852 0 : ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
18853 0 : if (!SWIG_IsOK(ecode7)) {
18854 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CRSInfo" "', argument " "7"" of type '" "double""'");
18855 : }
18856 0 : arg7 = static_cast< double >(val7);
18857 0 : ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
18858 0 : if (!SWIG_IsOK(ecode8)) {
18859 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CRSInfo" "', argument " "8"" of type '" "double""'");
18860 : }
18861 0 : arg8 = static_cast< double >(val8);
18862 0 : ecode9 = SWIG_AsVal_double(swig_obj[8], &val9);
18863 0 : if (!SWIG_IsOK(ecode9)) {
18864 0 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_CRSInfo" "', argument " "9"" of type '" "double""'");
18865 : }
18866 0 : arg9 = static_cast< double >(val9);
18867 0 : ecode10 = SWIG_AsVal_double(swig_obj[9], &val10);
18868 0 : if (!SWIG_IsOK(ecode10)) {
18869 0 : SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_CRSInfo" "', argument " "10"" of type '" "double""'");
18870 : }
18871 0 : arg10 = static_cast< double >(val10);
18872 0 : res11 = SWIG_AsCharPtrAndSize(swig_obj[10], &buf11, NULL, &alloc11);
18873 0 : if (!SWIG_IsOK(res11)) {
18874 0 : SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_CRSInfo" "', argument " "11"" of type '" "char const *""'");
18875 : }
18876 0 : arg11 = reinterpret_cast< char * >(buf11);
18877 0 : res12 = SWIG_AsCharPtrAndSize(swig_obj[11], &buf12, NULL, &alloc12);
18878 0 : if (!SWIG_IsOK(res12)) {
18879 0 : SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_CRSInfo" "', argument " "12"" of type '" "char const *""'");
18880 : }
18881 0 : arg12 = reinterpret_cast< char * >(buf12);
18882 0 : res13 = SWIG_AsCharPtrAndSize(swig_obj[12], &buf13, NULL, &alloc13);
18883 0 : if (!SWIG_IsOK(res13)) {
18884 0 : SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "new_CRSInfo" "', argument " "13"" of type '" "char const *""'");
18885 : }
18886 0 : arg13 = reinterpret_cast< char * >(buf13);
18887 0 : {
18888 0 : if (!arg3) {
18889 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18890 : }
18891 : }
18892 0 : {
18893 0 : const int bLocalUseExceptions = GetUseExceptions();
18894 0 : if ( bLocalUseExceptions ) {
18895 0 : pushErrorHandler();
18896 : }
18897 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);
18898 0 : if ( bLocalUseExceptions ) {
18899 0 : popErrorHandler();
18900 : }
18901 : #ifndef SED_HACKS
18902 : if ( bLocalUseExceptions ) {
18903 : CPLErr eclass = CPLGetLastErrorType();
18904 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18905 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18906 : }
18907 : }
18908 : #endif
18909 : }
18910 0 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCRSInfo, SWIG_POINTER_NEW | 0 );
18911 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
18912 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
18913 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
18914 0 : if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
18915 0 : if (alloc12 == SWIG_NEWOBJ) delete[] buf12;
18916 0 : if (alloc13 == SWIG_NEWOBJ) delete[] buf13;
18917 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; } }
18918 : return resultobj;
18919 0 : fail:
18920 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
18921 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
18922 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
18923 0 : if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
18924 0 : if (alloc12 == SWIG_NEWOBJ) delete[] buf12;
18925 0 : if (alloc13 == SWIG_NEWOBJ) delete[] buf13;
18926 : return NULL;
18927 : }
18928 :
18929 :
18930 6609 : SWIGINTERN PyObject *_wrap_delete_CRSInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18931 6609 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18932 6609 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18933 6609 : void *argp1 = 0 ;
18934 6609 : int res1 = 0 ;
18935 6609 : PyObject *swig_obj[1] ;
18936 :
18937 6609 : if (!args) SWIG_fail;
18938 6609 : swig_obj[0] = args;
18939 6609 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, SWIG_POINTER_DISOWN | 0 );
18940 6609 : if (!SWIG_IsOK(res1)) {
18941 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CRSInfo" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18942 : }
18943 6609 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18944 6609 : {
18945 6609 : const int bLocalUseExceptions = GetUseExceptions();
18946 6609 : if ( bLocalUseExceptions ) {
18947 6609 : pushErrorHandler();
18948 : }
18949 6609 : delete_OSRCRSInfo(arg1);
18950 6609 : if ( bLocalUseExceptions ) {
18951 6609 : popErrorHandler();
18952 : }
18953 : #ifndef SED_HACKS
18954 : if ( bLocalUseExceptions ) {
18955 : CPLErr eclass = CPLGetLastErrorType();
18956 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18957 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18958 : }
18959 : }
18960 : #endif
18961 : }
18962 6609 : resultobj = SWIG_Py_Void();
18963 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; } }
18964 : return resultobj;
18965 : fail:
18966 : return NULL;
18967 : }
18968 :
18969 :
18970 285 : SWIGINTERN PyObject *CRSInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18971 285 : PyObject *obj;
18972 285 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
18973 285 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRCRSInfo, SWIG_NewClientData(obj));
18974 285 : return SWIG_Py_Void();
18975 : }
18976 :
18977 0 : SWIGINTERN PyObject *CRSInfo_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18978 0 : return SWIG_Python_InitShadowInstance(args);
18979 : }
18980 :
18981 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_auth_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18982 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18983 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18984 0 : void *argp1 = 0 ;
18985 0 : int res1 = 0 ;
18986 0 : PyObject *swig_obj[1] ;
18987 0 : char *result = 0 ;
18988 :
18989 0 : if (!args) SWIG_fail;
18990 0 : swig_obj[0] = args;
18991 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18992 0 : if (!SWIG_IsOK(res1)) {
18993 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_auth_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18994 : }
18995 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18996 0 : {
18997 0 : if (!arg1) {
18998 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18999 : }
19000 : }
19001 0 : {
19002 0 : const int bLocalUseExceptions = GetUseExceptions();
19003 0 : if ( bLocalUseExceptions ) {
19004 0 : pushErrorHandler();
19005 : }
19006 0 : result = (char *)OSRCRSInfo_auth_name_get(arg1);
19007 0 : if ( bLocalUseExceptions ) {
19008 0 : popErrorHandler();
19009 : }
19010 : #ifndef SED_HACKS
19011 : if ( bLocalUseExceptions ) {
19012 : CPLErr eclass = CPLGetLastErrorType();
19013 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19014 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19015 : }
19016 : }
19017 : #endif
19018 : }
19019 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19020 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; } }
19021 : return resultobj;
19022 : fail:
19023 : return NULL;
19024 : }
19025 :
19026 :
19027 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_code_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19028 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19029 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19030 0 : void *argp1 = 0 ;
19031 0 : int res1 = 0 ;
19032 0 : PyObject *swig_obj[1] ;
19033 0 : char *result = 0 ;
19034 :
19035 0 : if (!args) SWIG_fail;
19036 0 : swig_obj[0] = args;
19037 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19038 0 : if (!SWIG_IsOK(res1)) {
19039 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_code_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19040 : }
19041 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19042 0 : {
19043 0 : if (!arg1) {
19044 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19045 : }
19046 : }
19047 0 : {
19048 0 : const int bLocalUseExceptions = GetUseExceptions();
19049 0 : if ( bLocalUseExceptions ) {
19050 0 : pushErrorHandler();
19051 : }
19052 0 : result = (char *)OSRCRSInfo_code_get(arg1);
19053 0 : if ( bLocalUseExceptions ) {
19054 0 : popErrorHandler();
19055 : }
19056 : #ifndef SED_HACKS
19057 : if ( bLocalUseExceptions ) {
19058 : CPLErr eclass = CPLGetLastErrorType();
19059 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19060 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19061 : }
19062 : }
19063 : #endif
19064 : }
19065 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19066 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; } }
19067 : return resultobj;
19068 : fail:
19069 : return NULL;
19070 : }
19071 :
19072 :
19073 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19074 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19075 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19076 0 : void *argp1 = 0 ;
19077 0 : int res1 = 0 ;
19078 0 : PyObject *swig_obj[1] ;
19079 0 : char *result = 0 ;
19080 :
19081 0 : if (!args) SWIG_fail;
19082 0 : swig_obj[0] = args;
19083 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19084 0 : if (!SWIG_IsOK(res1)) {
19085 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19086 : }
19087 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19088 0 : {
19089 0 : if (!arg1) {
19090 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19091 : }
19092 : }
19093 0 : {
19094 0 : const int bLocalUseExceptions = GetUseExceptions();
19095 0 : if ( bLocalUseExceptions ) {
19096 0 : pushErrorHandler();
19097 : }
19098 0 : result = (char *)OSRCRSInfo_name_get(arg1);
19099 0 : if ( bLocalUseExceptions ) {
19100 0 : popErrorHandler();
19101 : }
19102 : #ifndef SED_HACKS
19103 : if ( bLocalUseExceptions ) {
19104 : CPLErr eclass = CPLGetLastErrorType();
19105 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19106 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19107 : }
19108 : }
19109 : #endif
19110 : }
19111 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19112 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; } }
19113 : return resultobj;
19114 : fail:
19115 : return NULL;
19116 : }
19117 :
19118 :
19119 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19120 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19121 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19122 0 : void *argp1 = 0 ;
19123 0 : int res1 = 0 ;
19124 0 : PyObject *swig_obj[1] ;
19125 0 : OSRCRSType result;
19126 :
19127 0 : if (!args) SWIG_fail;
19128 0 : swig_obj[0] = args;
19129 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19130 0 : if (!SWIG_IsOK(res1)) {
19131 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_type_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19132 : }
19133 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19134 0 : {
19135 0 : if (!arg1) {
19136 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19137 : }
19138 : }
19139 0 : {
19140 0 : const int bLocalUseExceptions = GetUseExceptions();
19141 0 : if ( bLocalUseExceptions ) {
19142 0 : pushErrorHandler();
19143 : }
19144 0 : result = (OSRCRSType)OSRCRSInfo_type_get(arg1);
19145 0 : if ( bLocalUseExceptions ) {
19146 0 : popErrorHandler();
19147 : }
19148 : #ifndef SED_HACKS
19149 : if ( bLocalUseExceptions ) {
19150 : CPLErr eclass = CPLGetLastErrorType();
19151 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19152 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19153 : }
19154 : }
19155 : #endif
19156 : }
19157 0 : resultobj = SWIG_From_int(static_cast< int >(result));
19158 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; } }
19159 : return resultobj;
19160 : fail:
19161 : return NULL;
19162 : }
19163 :
19164 :
19165 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_deprecated_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19166 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19167 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19168 0 : void *argp1 = 0 ;
19169 0 : int res1 = 0 ;
19170 0 : PyObject *swig_obj[1] ;
19171 0 : bool result;
19172 :
19173 0 : if (!args) SWIG_fail;
19174 0 : swig_obj[0] = args;
19175 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19176 0 : if (!SWIG_IsOK(res1)) {
19177 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_deprecated_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19178 : }
19179 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19180 0 : {
19181 0 : if (!arg1) {
19182 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19183 : }
19184 : }
19185 0 : {
19186 0 : const int bLocalUseExceptions = GetUseExceptions();
19187 0 : if ( bLocalUseExceptions ) {
19188 0 : pushErrorHandler();
19189 : }
19190 0 : result = (bool)OSRCRSInfo_deprecated_get(arg1);
19191 0 : if ( bLocalUseExceptions ) {
19192 0 : popErrorHandler();
19193 : }
19194 : #ifndef SED_HACKS
19195 : if ( bLocalUseExceptions ) {
19196 : CPLErr eclass = CPLGetLastErrorType();
19197 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19198 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19199 : }
19200 : }
19201 : #endif
19202 : }
19203 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
19204 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; } }
19205 : return resultobj;
19206 : fail:
19207 : return NULL;
19208 : }
19209 :
19210 :
19211 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_bbox_valid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19212 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19213 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19214 0 : void *argp1 = 0 ;
19215 0 : int res1 = 0 ;
19216 0 : PyObject *swig_obj[1] ;
19217 0 : bool result;
19218 :
19219 0 : if (!args) SWIG_fail;
19220 0 : swig_obj[0] = args;
19221 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19222 0 : if (!SWIG_IsOK(res1)) {
19223 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_bbox_valid_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19224 : }
19225 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19226 0 : {
19227 0 : if (!arg1) {
19228 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19229 : }
19230 : }
19231 0 : {
19232 0 : const int bLocalUseExceptions = GetUseExceptions();
19233 0 : if ( bLocalUseExceptions ) {
19234 0 : pushErrorHandler();
19235 : }
19236 0 : result = (bool)OSRCRSInfo_bbox_valid_get(arg1);
19237 0 : if ( bLocalUseExceptions ) {
19238 0 : popErrorHandler();
19239 : }
19240 : #ifndef SED_HACKS
19241 : if ( bLocalUseExceptions ) {
19242 : CPLErr eclass = CPLGetLastErrorType();
19243 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19244 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19245 : }
19246 : }
19247 : #endif
19248 : }
19249 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
19250 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; } }
19251 : return resultobj;
19252 : fail:
19253 : return NULL;
19254 : }
19255 :
19256 :
19257 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19258 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19259 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19260 0 : void *argp1 = 0 ;
19261 0 : int res1 = 0 ;
19262 0 : PyObject *swig_obj[1] ;
19263 0 : double result;
19264 :
19265 0 : if (!args) SWIG_fail;
19266 0 : swig_obj[0] = args;
19267 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19268 0 : if (!SWIG_IsOK(res1)) {
19269 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_west_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19270 : }
19271 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19272 0 : {
19273 0 : if (!arg1) {
19274 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19275 : }
19276 : }
19277 0 : {
19278 0 : const int bLocalUseExceptions = GetUseExceptions();
19279 0 : if ( bLocalUseExceptions ) {
19280 0 : pushErrorHandler();
19281 : }
19282 0 : result = (double)OSRCRSInfo_west_lon_degree_get(arg1);
19283 0 : if ( bLocalUseExceptions ) {
19284 0 : popErrorHandler();
19285 : }
19286 : #ifndef SED_HACKS
19287 : if ( bLocalUseExceptions ) {
19288 : CPLErr eclass = CPLGetLastErrorType();
19289 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19290 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19291 : }
19292 : }
19293 : #endif
19294 : }
19295 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19296 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; } }
19297 : return resultobj;
19298 : fail:
19299 : return NULL;
19300 : }
19301 :
19302 :
19303 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19304 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19305 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19306 0 : void *argp1 = 0 ;
19307 0 : int res1 = 0 ;
19308 0 : PyObject *swig_obj[1] ;
19309 0 : double result;
19310 :
19311 0 : if (!args) SWIG_fail;
19312 0 : swig_obj[0] = args;
19313 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19314 0 : if (!SWIG_IsOK(res1)) {
19315 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_south_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19316 : }
19317 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19318 0 : {
19319 0 : if (!arg1) {
19320 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19321 : }
19322 : }
19323 0 : {
19324 0 : const int bLocalUseExceptions = GetUseExceptions();
19325 0 : if ( bLocalUseExceptions ) {
19326 0 : pushErrorHandler();
19327 : }
19328 0 : result = (double)OSRCRSInfo_south_lat_degree_get(arg1);
19329 0 : if ( bLocalUseExceptions ) {
19330 0 : popErrorHandler();
19331 : }
19332 : #ifndef SED_HACKS
19333 : if ( bLocalUseExceptions ) {
19334 : CPLErr eclass = CPLGetLastErrorType();
19335 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19336 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19337 : }
19338 : }
19339 : #endif
19340 : }
19341 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19342 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; } }
19343 : return resultobj;
19344 : fail:
19345 : return NULL;
19346 : }
19347 :
19348 :
19349 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19350 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19351 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19352 0 : void *argp1 = 0 ;
19353 0 : int res1 = 0 ;
19354 0 : PyObject *swig_obj[1] ;
19355 0 : double result;
19356 :
19357 0 : if (!args) SWIG_fail;
19358 0 : swig_obj[0] = args;
19359 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19360 0 : if (!SWIG_IsOK(res1)) {
19361 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_east_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19362 : }
19363 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19364 0 : {
19365 0 : if (!arg1) {
19366 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19367 : }
19368 : }
19369 0 : {
19370 0 : const int bLocalUseExceptions = GetUseExceptions();
19371 0 : if ( bLocalUseExceptions ) {
19372 0 : pushErrorHandler();
19373 : }
19374 0 : result = (double)OSRCRSInfo_east_lon_degree_get(arg1);
19375 0 : if ( bLocalUseExceptions ) {
19376 0 : popErrorHandler();
19377 : }
19378 : #ifndef SED_HACKS
19379 : if ( bLocalUseExceptions ) {
19380 : CPLErr eclass = CPLGetLastErrorType();
19381 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19382 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19383 : }
19384 : }
19385 : #endif
19386 : }
19387 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19388 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; } }
19389 : return resultobj;
19390 : fail:
19391 : return NULL;
19392 : }
19393 :
19394 :
19395 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19396 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19397 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19398 0 : void *argp1 = 0 ;
19399 0 : int res1 = 0 ;
19400 0 : PyObject *swig_obj[1] ;
19401 0 : double result;
19402 :
19403 0 : if (!args) SWIG_fail;
19404 0 : swig_obj[0] = args;
19405 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19406 0 : if (!SWIG_IsOK(res1)) {
19407 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_north_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19408 : }
19409 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19410 0 : {
19411 0 : if (!arg1) {
19412 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19413 : }
19414 : }
19415 0 : {
19416 0 : const int bLocalUseExceptions = GetUseExceptions();
19417 0 : if ( bLocalUseExceptions ) {
19418 0 : pushErrorHandler();
19419 : }
19420 0 : result = (double)OSRCRSInfo_north_lat_degree_get(arg1);
19421 0 : if ( bLocalUseExceptions ) {
19422 0 : popErrorHandler();
19423 : }
19424 : #ifndef SED_HACKS
19425 : if ( bLocalUseExceptions ) {
19426 : CPLErr eclass = CPLGetLastErrorType();
19427 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19428 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19429 : }
19430 : }
19431 : #endif
19432 : }
19433 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19434 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; } }
19435 : return resultobj;
19436 : fail:
19437 : return NULL;
19438 : }
19439 :
19440 :
19441 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_area_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19442 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19443 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19444 0 : void *argp1 = 0 ;
19445 0 : int res1 = 0 ;
19446 0 : PyObject *swig_obj[1] ;
19447 0 : char *result = 0 ;
19448 :
19449 0 : if (!args) SWIG_fail;
19450 0 : swig_obj[0] = args;
19451 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19452 0 : if (!SWIG_IsOK(res1)) {
19453 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_area_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19454 : }
19455 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19456 0 : {
19457 0 : if (!arg1) {
19458 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19459 : }
19460 : }
19461 0 : {
19462 0 : const int bLocalUseExceptions = GetUseExceptions();
19463 0 : if ( bLocalUseExceptions ) {
19464 0 : pushErrorHandler();
19465 : }
19466 0 : result = (char *)OSRCRSInfo_area_name_get(arg1);
19467 0 : if ( bLocalUseExceptions ) {
19468 0 : popErrorHandler();
19469 : }
19470 : #ifndef SED_HACKS
19471 : if ( bLocalUseExceptions ) {
19472 : CPLErr eclass = CPLGetLastErrorType();
19473 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19474 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19475 : }
19476 : }
19477 : #endif
19478 : }
19479 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19480 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; } }
19481 : return resultobj;
19482 : fail:
19483 : return NULL;
19484 : }
19485 :
19486 :
19487 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_projection_method_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19488 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19489 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19490 0 : void *argp1 = 0 ;
19491 0 : int res1 = 0 ;
19492 0 : PyObject *swig_obj[1] ;
19493 0 : char *result = 0 ;
19494 :
19495 0 : if (!args) SWIG_fail;
19496 0 : swig_obj[0] = args;
19497 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19498 0 : if (!SWIG_IsOK(res1)) {
19499 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_projection_method_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19500 : }
19501 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19502 0 : {
19503 0 : if (!arg1) {
19504 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19505 : }
19506 : }
19507 0 : {
19508 0 : const int bLocalUseExceptions = GetUseExceptions();
19509 0 : if ( bLocalUseExceptions ) {
19510 0 : pushErrorHandler();
19511 : }
19512 0 : result = (char *)OSRCRSInfo_projection_method_get(arg1);
19513 0 : if ( bLocalUseExceptions ) {
19514 0 : popErrorHandler();
19515 : }
19516 : #ifndef SED_HACKS
19517 : if ( bLocalUseExceptions ) {
19518 : CPLErr eclass = CPLGetLastErrorType();
19519 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19520 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19521 : }
19522 : }
19523 : #endif
19524 : }
19525 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19526 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; } }
19527 : return resultobj;
19528 : fail:
19529 : return NULL;
19530 : }
19531 :
19532 :
19533 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_celestial_body_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19534 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19535 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19536 0 : void *argp1 = 0 ;
19537 0 : int res1 = 0 ;
19538 0 : PyObject *swig_obj[1] ;
19539 0 : char *result = 0 ;
19540 :
19541 0 : if (!args) SWIG_fail;
19542 0 : swig_obj[0] = args;
19543 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19544 0 : if (!SWIG_IsOK(res1)) {
19545 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_celestial_body_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19546 : }
19547 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19548 0 : {
19549 0 : if (!arg1) {
19550 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19551 : }
19552 : }
19553 0 : {
19554 0 : const int bLocalUseExceptions = GetUseExceptions();
19555 0 : if ( bLocalUseExceptions ) {
19556 0 : pushErrorHandler();
19557 : }
19558 0 : result = (char *)OSRCRSInfo_celestial_body_name_get(arg1);
19559 0 : if ( bLocalUseExceptions ) {
19560 0 : popErrorHandler();
19561 : }
19562 : #ifndef SED_HACKS
19563 : if ( bLocalUseExceptions ) {
19564 : CPLErr eclass = CPLGetLastErrorType();
19565 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19566 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19567 : }
19568 : }
19569 : #endif
19570 : }
19571 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19572 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; } }
19573 : return resultobj;
19574 : fail:
19575 : return NULL;
19576 : }
19577 :
19578 :
19579 1 : SWIGINTERN PyObject *_wrap_GetAuthorityListFromDatabase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19580 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19581 1 : char **result = 0 ;
19582 :
19583 1 : if (!SWIG_Python_UnpackTuple(args, "GetAuthorityListFromDatabase", 0, 0, 0)) SWIG_fail;
19584 1 : {
19585 1 : const int bLocalUseExceptions = GetUseExceptions();
19586 1 : if ( bLocalUseExceptions ) {
19587 1 : pushErrorHandler();
19588 : }
19589 1 : result = (char **)GetAuthorityListFromDatabase();
19590 1 : if ( bLocalUseExceptions ) {
19591 1 : popErrorHandler();
19592 : }
19593 : #ifndef SED_HACKS
19594 : if ( bLocalUseExceptions ) {
19595 : CPLErr eclass = CPLGetLastErrorType();
19596 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19597 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19598 : }
19599 : }
19600 : #endif
19601 : }
19602 1 : {
19603 : /* %typemap(out) char **CSL -> ( string ) */
19604 1 : bool bErr = false;
19605 1 : resultobj = CSLToList(result, &bErr);
19606 1 : CSLDestroy(result);
19607 1 : if( bErr ) {
19608 0 : SWIG_fail;
19609 : }
19610 : }
19611 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; } }
19612 : return resultobj;
19613 : fail:
19614 : return NULL;
19615 : }
19616 :
19617 :
19618 1 : SWIGINTERN PyObject *_wrap_GetCRSInfoListFromDatabase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19619 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19620 1 : char *arg1 = (char *) 0 ;
19621 1 : OSRCRSInfo ***arg2 = (OSRCRSInfo ***) 0 ;
19622 1 : int *arg3 = (int *) 0 ;
19623 1 : int res1 ;
19624 1 : char *buf1 = 0 ;
19625 1 : int alloc1 = 0 ;
19626 1 : OSRCRSInfo **list2 = 0 ;
19627 1 : int count2 = 0 ;
19628 1 : PyObject *swig_obj[1] ;
19629 :
19630 1 : {
19631 : /* %typemap(in,numinputs=0) (OSRCRSInfo*** pList, int* pnListCount) */
19632 1 : arg2 = &list2;
19633 1 : arg3 = &count2;
19634 : }
19635 1 : if (!args) SWIG_fail;
19636 1 : swig_obj[0] = args;
19637 1 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
19638 1 : if (!SWIG_IsOK(res1)) {
19639 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetCRSInfoListFromDatabase" "', argument " "1"" of type '" "char const *""'");
19640 : }
19641 1 : arg1 = reinterpret_cast< char * >(buf1);
19642 1 : {
19643 1 : const int bLocalUseExceptions = GetUseExceptions();
19644 1 : if ( bLocalUseExceptions ) {
19645 1 : pushErrorHandler();
19646 : }
19647 1 : GetCRSInfoListFromDatabase((char const *)arg1,arg2,arg3);
19648 1 : if ( bLocalUseExceptions ) {
19649 1 : popErrorHandler();
19650 : }
19651 : #ifndef SED_HACKS
19652 : if ( bLocalUseExceptions ) {
19653 : CPLErr eclass = CPLGetLastErrorType();
19654 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19655 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19656 : }
19657 : }
19658 : #endif
19659 : }
19660 1 : resultobj = SWIG_Py_Void();
19661 1 : {
19662 : /* %typemap(argout) (OSRCRSInfo*** pList, int* pnListCount) */
19663 1 : PyObject *dict = PyTuple_New( *arg3 );
19664 6610 : for( int i = 0; i < *arg3; i++ ) {
19665 13218 : OSRCRSInfo *o = new_OSRCRSInfo( (*arg2)[i]->pszAuthName,
19666 6609 : (*arg2)[i]->pszCode,
19667 6609 : (*arg2)[i]->pszName,
19668 : (*arg2)[i]->eType,
19669 6609 : (*arg2)[i]->bDeprecated,
19670 6609 : (*arg2)[i]->bBboxValid,
19671 : (*arg2)[i]->dfWestLongitudeDeg,
19672 : (*arg2)[i]->dfSouthLatitudeDeg,
19673 : (*arg2)[i]->dfEastLongitudeDeg,
19674 : (*arg2)[i]->dfNorthLatitudeDeg,
19675 6609 : (*arg2)[i]->pszAreaName,
19676 6609 : (*arg2)[i]->pszProjectionMethod,
19677 6609 : (*arg2)[i]->pszCelestialBodyName );
19678 :
19679 6609 : PyTuple_SetItem(dict, i,
19680 : SWIG_NewPointerObj((void*)o,SWIGTYPE_p_OSRCRSInfo,1) );
19681 : }
19682 1 : Py_DECREF(resultobj);
19683 1 : resultobj = dict;
19684 : }
19685 1 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
19686 1 : {
19687 : /* %typemap(freearg) (OSRCRSInfo*** pList, int* pnListCount) */
19688 1 : OSRDestroyCRSInfoList( *(arg2) );
19689 : }
19690 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; } }
19691 : return resultobj;
19692 0 : fail:
19693 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
19694 0 : {
19695 : /* %typemap(freearg) (OSRCRSInfo*** pList, int* pnListCount) */
19696 0 : OSRDestroyCRSInfoList( *(arg2) );
19697 : }
19698 : return NULL;
19699 : }
19700 :
19701 :
19702 1 : SWIGINTERN PyObject *_wrap_SetPROJSearchPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19703 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19704 1 : char *arg1 = (char *) 0 ;
19705 1 : int bToFree1 = 0 ;
19706 1 : PyObject *swig_obj[1] ;
19707 :
19708 1 : if (!args) SWIG_fail;
19709 1 : swig_obj[0] = args;
19710 1 : {
19711 : /* %typemap(in) (const char *utf8_string) */
19712 1 : if( swig_obj[0] == Py_None )
19713 : {
19714 : arg1 = NULL;
19715 : }
19716 : else
19717 : {
19718 1 : if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
19719 : {
19720 1 : arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
19721 : }
19722 : else
19723 : {
19724 0 : arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
19725 :
19726 : }
19727 1 : if (arg1 == NULL)
19728 : {
19729 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
19730 0 : SWIG_fail;
19731 : }
19732 : }
19733 : }
19734 1 : {
19735 1 : const int bLocalUseExceptions = GetUseExceptions();
19736 1 : if ( bLocalUseExceptions ) {
19737 1 : pushErrorHandler();
19738 : }
19739 1 : SetPROJSearchPath((char const *)arg1);
19740 1 : if ( bLocalUseExceptions ) {
19741 1 : popErrorHandler();
19742 : }
19743 : #ifndef SED_HACKS
19744 : if ( bLocalUseExceptions ) {
19745 : CPLErr eclass = CPLGetLastErrorType();
19746 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19747 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19748 : }
19749 : }
19750 : #endif
19751 : }
19752 1 : resultobj = SWIG_Py_Void();
19753 1 : {
19754 : /* %typemap(freearg) (const char *utf8_string) */
19755 1 : if( arg1 != NULL )
19756 1 : GDALPythonFreeCStr(arg1, bToFree1);
19757 : }
19758 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; } }
19759 : return resultobj;
19760 0 : fail:
19761 0 : {
19762 : /* %typemap(freearg) (const char *utf8_string) */
19763 0 : if( arg1 != NULL )
19764 1 : GDALPythonFreeCStr(arg1, bToFree1);
19765 : }
19766 : return NULL;
19767 : }
19768 :
19769 :
19770 17 : SWIGINTERN PyObject *_wrap_SetPROJSearchPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19771 17 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19772 17 : char **arg1 = (char **) 0 ;
19773 17 : PyObject *swig_obj[1] ;
19774 :
19775 17 : if (!args) SWIG_fail;
19776 17 : swig_obj[0] = args;
19777 17 : {
19778 : /* %typemap(in) char **dict */
19779 17 : arg1 = NULL;
19780 17 : if ( PySequence_Check( swig_obj[0] ) ) {
19781 17 : int bErr = FALSE;
19782 17 : arg1 = CSLFromPySequence(swig_obj[0], &bErr);
19783 17 : if ( bErr )
19784 : {
19785 0 : SWIG_fail;
19786 : }
19787 : }
19788 0 : else if ( PyMapping_Check( swig_obj[0] ) ) {
19789 0 : int bErr = FALSE;
19790 0 : arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
19791 0 : if ( bErr )
19792 : {
19793 0 : SWIG_fail;
19794 : }
19795 : }
19796 : else {
19797 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
19798 0 : SWIG_fail;
19799 : }
19800 : }
19801 17 : {
19802 17 : const int bLocalUseExceptions = GetUseExceptions();
19803 17 : if ( bLocalUseExceptions ) {
19804 17 : pushErrorHandler();
19805 : }
19806 17 : SetPROJSearchPaths(arg1);
19807 17 : if ( bLocalUseExceptions ) {
19808 17 : popErrorHandler();
19809 : }
19810 : #ifndef SED_HACKS
19811 : if ( bLocalUseExceptions ) {
19812 : CPLErr eclass = CPLGetLastErrorType();
19813 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19814 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19815 : }
19816 : }
19817 : #endif
19818 : }
19819 17 : resultobj = SWIG_Py_Void();
19820 17 : {
19821 : /* %typemap(freearg) char **dict */
19822 17 : CSLDestroy( arg1 );
19823 : }
19824 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; } }
19825 : return resultobj;
19826 0 : fail:
19827 0 : {
19828 : /* %typemap(freearg) char **dict */
19829 0 : CSLDestroy( arg1 );
19830 : }
19831 : return NULL;
19832 : }
19833 :
19834 :
19835 24 : SWIGINTERN PyObject *_wrap_GetPROJSearchPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19836 24 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19837 24 : char **result = 0 ;
19838 :
19839 24 : if (!SWIG_Python_UnpackTuple(args, "GetPROJSearchPaths", 0, 0, 0)) SWIG_fail;
19840 24 : {
19841 24 : const int bLocalUseExceptions = GetUseExceptions();
19842 24 : if ( bLocalUseExceptions ) {
19843 24 : pushErrorHandler();
19844 : }
19845 24 : result = (char **)GetPROJSearchPaths();
19846 24 : if ( bLocalUseExceptions ) {
19847 24 : 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 24 : {
19859 : /* %typemap(out) char **CSL -> ( string ) */
19860 24 : bool bErr = false;
19861 24 : resultobj = CSLToList(result, &bErr);
19862 24 : CSLDestroy(result);
19863 24 : if( bErr ) {
19864 0 : SWIG_fail;
19865 : }
19866 : }
19867 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; } }
19868 : return resultobj;
19869 : fail:
19870 : return NULL;
19871 : }
19872 :
19873 :
19874 84 : SWIGINTERN PyObject *_wrap_GetPROJVersionMajor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19875 84 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19876 84 : int result;
19877 :
19878 84 : if (!SWIG_Python_UnpackTuple(args, "GetPROJVersionMajor", 0, 0, 0)) SWIG_fail;
19879 84 : {
19880 84 : const int bLocalUseExceptions = GetUseExceptions();
19881 84 : if ( bLocalUseExceptions ) {
19882 80 : pushErrorHandler();
19883 : }
19884 84 : result = (int)GetPROJVersionMajor();
19885 84 : if ( bLocalUseExceptions ) {
19886 80 : popErrorHandler();
19887 : }
19888 : #ifndef SED_HACKS
19889 : if ( bLocalUseExceptions ) {
19890 : CPLErr eclass = CPLGetLastErrorType();
19891 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19892 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19893 : }
19894 : }
19895 : #endif
19896 : }
19897 84 : resultobj = SWIG_From_int(static_cast< int >(result));
19898 84 : 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; } }
19899 : return resultobj;
19900 0 : fail:
19901 0 : return NULL;
19902 : }
19903 :
19904 :
19905 78 : SWIGINTERN PyObject *_wrap_GetPROJVersionMinor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19906 78 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19907 78 : int result;
19908 :
19909 78 : if (!SWIG_Python_UnpackTuple(args, "GetPROJVersionMinor", 0, 0, 0)) SWIG_fail;
19910 78 : {
19911 78 : const int bLocalUseExceptions = GetUseExceptions();
19912 78 : if ( bLocalUseExceptions ) {
19913 77 : pushErrorHandler();
19914 : }
19915 78 : result = (int)GetPROJVersionMinor();
19916 78 : if ( bLocalUseExceptions ) {
19917 77 : popErrorHandler();
19918 : }
19919 : #ifndef SED_HACKS
19920 : if ( bLocalUseExceptions ) {
19921 : CPLErr eclass = CPLGetLastErrorType();
19922 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19923 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19924 : }
19925 : }
19926 : #endif
19927 : }
19928 78 : resultobj = SWIG_From_int(static_cast< int >(result));
19929 78 : 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; } }
19930 : return resultobj;
19931 0 : fail:
19932 0 : return NULL;
19933 : }
19934 :
19935 :
19936 66 : SWIGINTERN PyObject *_wrap_GetPROJVersionMicro(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19937 66 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19938 66 : int result;
19939 :
19940 66 : if (!SWIG_Python_UnpackTuple(args, "GetPROJVersionMicro", 0, 0, 0)) SWIG_fail;
19941 66 : {
19942 66 : const int bLocalUseExceptions = GetUseExceptions();
19943 66 : if ( bLocalUseExceptions ) {
19944 66 : pushErrorHandler();
19945 : }
19946 66 : result = (int)GetPROJVersionMicro();
19947 66 : if ( bLocalUseExceptions ) {
19948 66 : popErrorHandler();
19949 : }
19950 : #ifndef SED_HACKS
19951 : if ( bLocalUseExceptions ) {
19952 : CPLErr eclass = CPLGetLastErrorType();
19953 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19954 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19955 : }
19956 : }
19957 : #endif
19958 : }
19959 66 : resultobj = SWIG_From_int(static_cast< int >(result));
19960 66 : 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; } }
19961 : return resultobj;
19962 0 : fail:
19963 0 : return NULL;
19964 : }
19965 :
19966 :
19967 0 : SWIGINTERN PyObject *_wrap_GetPROJEnableNetwork(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19968 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19969 0 : bool result;
19970 :
19971 0 : if (!SWIG_Python_UnpackTuple(args, "GetPROJEnableNetwork", 0, 0, 0)) SWIG_fail;
19972 0 : {
19973 0 : const int bLocalUseExceptions = GetUseExceptions();
19974 0 : if ( bLocalUseExceptions ) {
19975 0 : pushErrorHandler();
19976 : }
19977 0 : result = (bool)GetPROJEnableNetwork();
19978 0 : if ( bLocalUseExceptions ) {
19979 0 : popErrorHandler();
19980 : }
19981 : #ifndef SED_HACKS
19982 : if ( bLocalUseExceptions ) {
19983 : CPLErr eclass = CPLGetLastErrorType();
19984 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19985 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19986 : }
19987 : }
19988 : #endif
19989 : }
19990 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
19991 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; } }
19992 : return resultobj;
19993 0 : fail:
19994 0 : return NULL;
19995 : }
19996 :
19997 :
19998 0 : SWIGINTERN PyObject *_wrap_SetPROJEnableNetwork(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19999 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20000 0 : bool arg1 ;
20001 0 : bool val1 ;
20002 0 : int ecode1 = 0 ;
20003 0 : PyObject *swig_obj[1] ;
20004 :
20005 0 : if (!args) SWIG_fail;
20006 0 : swig_obj[0] = args;
20007 0 : ecode1 = SWIG_AsVal_bool(swig_obj[0], &val1);
20008 0 : if (!SWIG_IsOK(ecode1)) {
20009 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetPROJEnableNetwork" "', argument " "1"" of type '" "bool""'");
20010 : }
20011 0 : arg1 = static_cast< bool >(val1);
20012 0 : {
20013 0 : const int bLocalUseExceptions = GetUseExceptions();
20014 0 : if ( bLocalUseExceptions ) {
20015 0 : pushErrorHandler();
20016 : }
20017 0 : SetPROJEnableNetwork(arg1);
20018 0 : if ( bLocalUseExceptions ) {
20019 0 : popErrorHandler();
20020 : }
20021 : #ifndef SED_HACKS
20022 : if ( bLocalUseExceptions ) {
20023 : CPLErr eclass = CPLGetLastErrorType();
20024 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20025 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20026 : }
20027 : }
20028 : #endif
20029 : }
20030 0 : resultobj = SWIG_Py_Void();
20031 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; } }
20032 : return resultobj;
20033 : fail:
20034 : return NULL;
20035 : }
20036 :
20037 :
20038 1 : SWIGINTERN PyObject *_wrap_SetPROJAuxDbPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20039 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20040 1 : char *arg1 = (char *) 0 ;
20041 1 : int bToFree1 = 0 ;
20042 1 : PyObject *swig_obj[1] ;
20043 :
20044 1 : if (!args) SWIG_fail;
20045 1 : swig_obj[0] = args;
20046 1 : {
20047 : /* %typemap(in) (const char *utf8_string) */
20048 1 : if( swig_obj[0] == Py_None )
20049 : {
20050 : arg1 = NULL;
20051 : }
20052 : else
20053 : {
20054 1 : if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
20055 : {
20056 1 : arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
20057 : }
20058 : else
20059 : {
20060 0 : arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
20061 :
20062 : }
20063 1 : if (arg1 == NULL)
20064 : {
20065 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
20066 0 : SWIG_fail;
20067 : }
20068 : }
20069 : }
20070 1 : {
20071 1 : const int bLocalUseExceptions = GetUseExceptions();
20072 1 : if ( bLocalUseExceptions ) {
20073 1 : pushErrorHandler();
20074 : }
20075 1 : SetPROJAuxDbPath((char const *)arg1);
20076 1 : if ( bLocalUseExceptions ) {
20077 1 : popErrorHandler();
20078 : }
20079 : #ifndef SED_HACKS
20080 : if ( bLocalUseExceptions ) {
20081 : CPLErr eclass = CPLGetLastErrorType();
20082 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20083 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20084 : }
20085 : }
20086 : #endif
20087 : }
20088 1 : resultobj = SWIG_Py_Void();
20089 1 : {
20090 : /* %typemap(freearg) (const char *utf8_string) */
20091 1 : if( arg1 != NULL )
20092 1 : GDALPythonFreeCStr(arg1, bToFree1);
20093 : }
20094 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; } }
20095 : return resultobj;
20096 0 : fail:
20097 0 : {
20098 : /* %typemap(freearg) (const char *utf8_string) */
20099 0 : if( arg1 != NULL )
20100 1 : GDALPythonFreeCStr(arg1, bToFree1);
20101 : }
20102 : return NULL;
20103 : }
20104 :
20105 :
20106 0 : SWIGINTERN PyObject *_wrap_SetPROJAuxDbPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20107 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20108 0 : char **arg1 = (char **) 0 ;
20109 0 : PyObject *swig_obj[1] ;
20110 :
20111 0 : if (!args) SWIG_fail;
20112 0 : swig_obj[0] = args;
20113 0 : {
20114 : /* %typemap(in) char **dict */
20115 0 : arg1 = NULL;
20116 0 : if ( PySequence_Check( swig_obj[0] ) ) {
20117 0 : int bErr = FALSE;
20118 0 : arg1 = CSLFromPySequence(swig_obj[0], &bErr);
20119 0 : if ( bErr )
20120 : {
20121 0 : SWIG_fail;
20122 : }
20123 : }
20124 0 : else if ( PyMapping_Check( swig_obj[0] ) ) {
20125 0 : int bErr = FALSE;
20126 0 : arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
20127 0 : if ( bErr )
20128 : {
20129 0 : SWIG_fail;
20130 : }
20131 : }
20132 : else {
20133 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
20134 0 : SWIG_fail;
20135 : }
20136 : }
20137 0 : {
20138 0 : const int bLocalUseExceptions = GetUseExceptions();
20139 0 : if ( bLocalUseExceptions ) {
20140 0 : pushErrorHandler();
20141 : }
20142 0 : SetPROJAuxDbPaths(arg1);
20143 0 : if ( bLocalUseExceptions ) {
20144 0 : popErrorHandler();
20145 : }
20146 : #ifndef SED_HACKS
20147 : if ( bLocalUseExceptions ) {
20148 : CPLErr eclass = CPLGetLastErrorType();
20149 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20150 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20151 : }
20152 : }
20153 : #endif
20154 : }
20155 0 : resultobj = SWIG_Py_Void();
20156 0 : {
20157 : /* %typemap(freearg) char **dict */
20158 0 : CSLDestroy( arg1 );
20159 : }
20160 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; } }
20161 : return resultobj;
20162 0 : fail:
20163 0 : {
20164 : /* %typemap(freearg) char **dict */
20165 0 : CSLDestroy( arg1 );
20166 : }
20167 : return NULL;
20168 : }
20169 :
20170 :
20171 0 : SWIGINTERN PyObject *_wrap_GetPROJAuxDbPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20172 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20173 0 : char **result = 0 ;
20174 :
20175 0 : if (!SWIG_Python_UnpackTuple(args, "GetPROJAuxDbPaths", 0, 0, 0)) SWIG_fail;
20176 0 : {
20177 0 : const int bLocalUseExceptions = GetUseExceptions();
20178 0 : if ( bLocalUseExceptions ) {
20179 0 : pushErrorHandler();
20180 : }
20181 0 : result = (char **)GetPROJAuxDbPaths();
20182 0 : if ( bLocalUseExceptions ) {
20183 0 : popErrorHandler();
20184 : }
20185 : #ifndef SED_HACKS
20186 : if ( bLocalUseExceptions ) {
20187 : CPLErr eclass = CPLGetLastErrorType();
20188 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20189 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20190 : }
20191 : }
20192 : #endif
20193 : }
20194 0 : {
20195 : /* %typemap(out) char **CSL -> ( string ) */
20196 0 : bool bErr = false;
20197 0 : resultobj = CSLToList(result, &bErr);
20198 0 : CSLDestroy(result);
20199 0 : if( bErr ) {
20200 0 : SWIG_fail;
20201 : }
20202 : }
20203 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; } }
20204 : return resultobj;
20205 : fail:
20206 : return NULL;
20207 : }
20208 :
20209 :
20210 : static PyMethodDef SwigMethods[] = {
20211 : { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
20212 : { "GetUseExceptions", _wrap_GetUseExceptions, METH_NOARGS, "GetUseExceptions() -> int"},
20213 : { "_GetExceptionsLocal", _wrap__GetExceptionsLocal, METH_NOARGS, "_GetExceptionsLocal() -> int"},
20214 : { "_SetExceptionsLocal", _wrap__SetExceptionsLocal, METH_O, "_SetExceptionsLocal(bVal)"},
20215 : { "_UseExceptions", _wrap__UseExceptions, METH_NOARGS, "_UseExceptions()"},
20216 : { "_DontUseExceptions", _wrap__DontUseExceptions, METH_NOARGS, "_DontUseExceptions()"},
20217 : { "_UserHasSpecifiedIfUsingExceptions", _wrap__UserHasSpecifiedIfUsingExceptions, METH_NOARGS, "_UserHasSpecifiedIfUsingExceptions() -> int"},
20218 : { "GetWellKnownGeogCSAsWKT", _wrap_GetWellKnownGeogCSAsWKT, METH_O, "GetWellKnownGeogCSAsWKT(name) -> OGRErr"},
20219 : { "GetUserInputAsWKT", _wrap_GetUserInputAsWKT, METH_O, "GetUserInputAsWKT(name) -> OGRErr"},
20220 : { "AreaOfUse_west_lon_degree_get", _wrap_AreaOfUse_west_lon_degree_get, METH_O, "AreaOfUse_west_lon_degree_get(self) -> double"},
20221 : { "AreaOfUse_south_lat_degree_get", _wrap_AreaOfUse_south_lat_degree_get, METH_O, "AreaOfUse_south_lat_degree_get(self) -> double"},
20222 : { "AreaOfUse_east_lon_degree_get", _wrap_AreaOfUse_east_lon_degree_get, METH_O, "AreaOfUse_east_lon_degree_get(self) -> double"},
20223 : { "AreaOfUse_north_lat_degree_get", _wrap_AreaOfUse_north_lat_degree_get, METH_O, "AreaOfUse_north_lat_degree_get(self) -> double"},
20224 : { "AreaOfUse_name_get", _wrap_AreaOfUse_name_get, METH_O, "AreaOfUse_name_get(self) -> char *"},
20225 : { "new_AreaOfUse", _wrap_new_AreaOfUse, METH_VARARGS, "new_AreaOfUse(west_lon_degree, south_lat_degree, east_lon_degree, north_lat_degree, name) -> AreaOfUse"},
20226 : { "delete_AreaOfUse", _wrap_delete_AreaOfUse, METH_O, "delete_AreaOfUse(self)"},
20227 : { "AreaOfUse_swigregister", AreaOfUse_swigregister, METH_O, NULL},
20228 : { "AreaOfUse_swiginit", AreaOfUse_swiginit, METH_VARARGS, NULL},
20229 : { "OSRAreaOfUse_west_lon_degree_get", _wrap_OSRAreaOfUse_west_lon_degree_get, METH_O, "OSRAreaOfUse_west_lon_degree_get(area) -> double"},
20230 : { "OSRAreaOfUse_south_lat_degree_get", _wrap_OSRAreaOfUse_south_lat_degree_get, METH_O, "OSRAreaOfUse_south_lat_degree_get(area) -> double"},
20231 : { "OSRAreaOfUse_east_lon_degree_get", _wrap_OSRAreaOfUse_east_lon_degree_get, METH_O, "OSRAreaOfUse_east_lon_degree_get(area) -> double"},
20232 : { "OSRAreaOfUse_north_lat_degree_get", _wrap_OSRAreaOfUse_north_lat_degree_get, METH_O, "OSRAreaOfUse_north_lat_degree_get(area) -> double"},
20233 : { "OSRAreaOfUse_name_get", _wrap_OSRAreaOfUse_name_get, METH_O, "OSRAreaOfUse_name_get(area) -> char const *"},
20234 : { "new_SpatialReference", (PyCFunction)(void(*)(void))_wrap_new_SpatialReference, METH_VARARGS|METH_KEYWORDS, "\n"
20235 : "new_SpatialReference(wkt=\"\") -> SpatialReference\n"
20236 : "\n"
20237 : "Python proxy of an :cpp:class:`OGRSpatialReference`.\n"
20238 : "\n"
20239 : "Create a new spatial reference object. An empty object will be created\n"
20240 : "unless exactly one of the following parameters is provided.\n"
20241 : "\n"
20242 : "Parameters\n"
20243 : "----------\n"
20244 : "name : str or dict, optional\n"
20245 : " SRS description in a format understood by :py:meth:`SetFromUserInput`.\n"
20246 : "epsg : int, optional\n"
20247 : " EPSG CRS code, as understood by :py:meth:`ImportFromEPSG`\n"
20248 : "wkt : str, optional\n"
20249 : " WKT CRS string, as understood by :py:meth:`ImportFromWkt`\n"
20250 : "\n"
20251 : "Examples\n"
20252 : "--------\n"
20253 : ">>> osr.SpatialReference(epsg=5646).GetName()\n"
20254 : "'NAD83 / Vermont (ftUS)'\n"
20255 : ">>> osr.SpatialReference('+proj=utm +zone=18 +datum=WGS84').GetUTMZone()\n"
20256 : "18\n"
20257 : "\n"
20258 : ""},
20259 : { "delete_SpatialReference", _wrap_delete_SpatialReference, METH_O, "delete_SpatialReference(self)"},
20260 : { "SpatialReference___str__", _wrap_SpatialReference___str__, METH_O, "SpatialReference___str__(self) -> retStringAndCPLFree *"},
20261 : { "SpatialReference_GetName", _wrap_SpatialReference_GetName, METH_O, "\n"
20262 : "SpatialReference_GetName(self) -> char const *\n"
20263 : "\n"
20264 : "\n"
20265 : "Return the CRS name.\n"
20266 : "\n"
20267 : "See :cpp:func:`OGRSpatialReference::GetName`.\n"
20268 : "\n"
20269 : "Returns\n"
20270 : "-------\n"
20271 : "str\n"
20272 : "\n"
20273 : "Examples\n"
20274 : "--------\n"
20275 : ">>> vt_sp = osr.SpatialReference()\n"
20276 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20277 : "0\n"
20278 : ">>> vt_sp.GetName()\n"
20279 : "'NAD83 / Vermont (ftUS)'\n"
20280 : "\n"
20281 : "\n"
20282 : ""},
20283 : { "SpatialReference_GetCelestialBodyName", _wrap_SpatialReference_GetCelestialBodyName, METH_O, "SpatialReference_GetCelestialBodyName(self) -> char const *"},
20284 : { "SpatialReference_IsSame", (PyCFunction)(void(*)(void))_wrap_SpatialReference_IsSame, METH_VARARGS|METH_KEYWORDS, "\n"
20285 : "SpatialReference_IsSame(self, rhs, options=None) -> int\n"
20286 : "\n"
20287 : "\n"
20288 : "Determine if two spatial references describe the same system.\n"
20289 : "\n"
20290 : "See :cpp:func:`OGRSpatialReference::IsSame`.\n"
20291 : "\n"
20292 : "Parameters\n"
20293 : "----------\n"
20294 : "rhs : SpatialReference\n"
20295 : "options : list or dict\n"
20296 : "\n"
20297 : "Returns\n"
20298 : "-------\n"
20299 : "int\n"
20300 : " 1 if the spatial references describe the same system, 0 otherwise\n"
20301 : "\n"
20302 : "\n"
20303 : ""},
20304 : { "SpatialReference_IsSameGeogCS", _wrap_SpatialReference_IsSameGeogCS, METH_VARARGS, "\n"
20305 : "SpatialReference_IsSameGeogCS(self, rhs) -> int\n"
20306 : "\n"
20307 : "\n"
20308 : "Determine if two spatial references share the same geographic coordinate system.\n"
20309 : "\n"
20310 : "See :cpp:func:`OGRSpatialReference::IsSameGeogCS`.\n"
20311 : "\n"
20312 : "Parameters\n"
20313 : "----------\n"
20314 : "rhs : SpatialReference\n"
20315 : "options : list or dict\n"
20316 : "\n"
20317 : "Returns\n"
20318 : "-------\n"
20319 : "int\n"
20320 : " 1 if the spatial references have the same GeogCS, 0 otherwise\n"
20321 : "\n"
20322 : "\n"
20323 : ""},
20324 : { "SpatialReference_IsSameVertCS", _wrap_SpatialReference_IsSameVertCS, METH_VARARGS, "\n"
20325 : "SpatialReference_IsSameVertCS(self, rhs) -> int\n"
20326 : "\n"
20327 : "\n"
20328 : "Determine if two spatial references share the same vertical coordinate system.\n"
20329 : "\n"
20330 : "See :cpp:func:`OGRSpatialReference::IsSameVertCS`.\n"
20331 : "\n"
20332 : "Parameters\n"
20333 : "----------\n"
20334 : "rhs : SpatialReference\n"
20335 : "options : list or dict\n"
20336 : "\n"
20337 : "Returns\n"
20338 : "-------\n"
20339 : "int\n"
20340 : " 1 if the spatial references have the same VertCS, 0 otherwise\n"
20341 : "\n"
20342 : "\n"
20343 : ""},
20344 : { "SpatialReference_IsGeographic", _wrap_SpatialReference_IsGeographic, METH_O, "\n"
20345 : "SpatialReference_IsGeographic(self) -> int\n"
20346 : "\n"
20347 : "\n"
20348 : "Check if this SRS is a geographic coordinate system.\n"
20349 : "\n"
20350 : "See :cpp:func:`OGRSpatialReference::IsGeographic`.\n"
20351 : "\n"
20352 : "Returns\n"
20353 : "-------\n"
20354 : "int\n"
20355 : " 1 if the SRS is geographic, 0 otherwise\n"
20356 : "\n"
20357 : ""},
20358 : { "SpatialReference_IsDerivedGeographic", _wrap_SpatialReference_IsDerivedGeographic, METH_O, "\n"
20359 : "SpatialReference_IsDerivedGeographic(self) -> int\n"
20360 : "\n"
20361 : "\n"
20362 : "Check if this CRS is a derived geographic CRS, such as a rotated long/lat grid.\n"
20363 : "\n"
20364 : "See :cpp:func:`OGRSpatialReference::IsDerivedGeographic`.\n"
20365 : "\n"
20366 : "Returns\n"
20367 : "-------\n"
20368 : "int\n"
20369 : " 1 if the CRS is derived geographic, 0 otherwise\n"
20370 : "\n"
20371 : ""},
20372 : { "SpatialReference_IsProjected", _wrap_SpatialReference_IsProjected, METH_O, "\n"
20373 : "SpatialReference_IsProjected(self) -> int\n"
20374 : "\n"
20375 : "\n"
20376 : "Check if this SRS is a projected coordinate system.\n"
20377 : "\n"
20378 : "See :cpp:func:`OGRSpatialReference::IsProjected`.\n"
20379 : "\n"
20380 : "Returns\n"
20381 : "-------\n"
20382 : "int\n"
20383 : " 1 if the SRS is projected, 0 otherwise\n"
20384 : "\n"
20385 : ""},
20386 : { "SpatialReference_IsDerivedProjected", _wrap_SpatialReference_IsDerivedProjected, METH_O, "SpatialReference_IsDerivedProjected(self) -> int"},
20387 : { "SpatialReference_IsCompound", _wrap_SpatialReference_IsCompound, METH_O, "\n"
20388 : "SpatialReference_IsCompound(self) -> int\n"
20389 : "\n"
20390 : "\n"
20391 : "Check if this CRS is a compound CRS.\n"
20392 : "\n"
20393 : "See :cpp:func:`OGRSpatialReference::IsCompound`.\n"
20394 : "\n"
20395 : "Returns\n"
20396 : "-------\n"
20397 : "int\n"
20398 : " 1 if the CRS is compound, 0 otherwise\n"
20399 : "\n"
20400 : ""},
20401 : { "SpatialReference_IsGeocentric", _wrap_SpatialReference_IsGeocentric, METH_O, "\n"
20402 : "SpatialReference_IsGeocentric(self) -> int\n"
20403 : "\n"
20404 : "\n"
20405 : "Check if this SRS is a geocentric coordinate system.\n"
20406 : "\n"
20407 : "See :cpp:func:`OGRSpatialReference::IsGeocentric`.\n"
20408 : "\n"
20409 : "Returns\n"
20410 : "-------\n"
20411 : "int\n"
20412 : " 1 if the SRS is geocentric, 0 otherwise\n"
20413 : "\n"
20414 : ""},
20415 : { "SpatialReference_IsLocal", _wrap_SpatialReference_IsLocal, METH_O, "\n"
20416 : "SpatialReference_IsLocal(self) -> int\n"
20417 : "\n"
20418 : "\n"
20419 : "Check if this CRS is a local CRS.\n"
20420 : "\n"
20421 : "See :cpp:func:`OGRSpatialReference::IsLocal`.\n"
20422 : "\n"
20423 : "Returns\n"
20424 : "-------\n"
20425 : "int\n"
20426 : " 1 if the SRS is local, 0 otherwise\n"
20427 : "\n"
20428 : ""},
20429 : { "SpatialReference_IsVertical", _wrap_SpatialReference_IsVertical, METH_O, "\n"
20430 : "SpatialReference_IsVertical(self) -> int\n"
20431 : "\n"
20432 : "\n"
20433 : "Check if this is a vertical coordinate system.\n"
20434 : "\n"
20435 : "See :cpp:func:`OGRSpatialReference::IsVertical`.\n"
20436 : "\n"
20437 : "Returns\n"
20438 : "-------\n"
20439 : "int\n"
20440 : " 1 if the CRS is vertical, 0 otherwise\n"
20441 : "\n"
20442 : "\n"
20443 : ""},
20444 : { "SpatialReference_IsDynamic", _wrap_SpatialReference_IsDynamic, METH_O, "\n"
20445 : "SpatialReference_IsDynamic(self) -> bool\n"
20446 : "\n"
20447 : "\n"
20448 : "Check if this CRS is a dynamic coordinate CRS.\n"
20449 : "\n"
20450 : "See :cpp:func:`OGRSpatialReference::IsDynamic`.\n"
20451 : "\n"
20452 : "Returns\n"
20453 : "-------\n"
20454 : "bool\n"
20455 : "\n"
20456 : ""},
20457 : { "SpatialReference_HasPointMotionOperation", _wrap_SpatialReference_HasPointMotionOperation, METH_O, "\n"
20458 : "SpatialReference_HasPointMotionOperation(self) -> bool\n"
20459 : "\n"
20460 : "\n"
20461 : "Check if a CRS has an associated point motion operation.\n"
20462 : "\n"
20463 : "See :cpp:func:`OGRSpatialReference::HasPointMotionOperation`.\n"
20464 : "\n"
20465 : "Returns\n"
20466 : "-------\n"
20467 : "bool\n"
20468 : "\n"
20469 : "\n"
20470 : ""},
20471 : { "SpatialReference_GetCoordinateEpoch", _wrap_SpatialReference_GetCoordinateEpoch, METH_O, "\n"
20472 : "SpatialReference_GetCoordinateEpoch(self) -> double\n"
20473 : "\n"
20474 : "\n"
20475 : "Return the coordinate epoch as a decimal year.\n"
20476 : "\n"
20477 : "See :cpp:func:`OGRSpatialReference::GetCoordinateEpoch`.\n"
20478 : "\n"
20479 : "Returns\n"
20480 : "-------\n"
20481 : "float\n"
20482 : " coordinate epoch as a decimal year, or 0 if not set/relevant\n"
20483 : "\n"
20484 : "\n"
20485 : ""},
20486 : { "SpatialReference_SetCoordinateEpoch", _wrap_SpatialReference_SetCoordinateEpoch, METH_VARARGS, "SpatialReference_SetCoordinateEpoch(self, coordinateEpoch)"},
20487 : { "SpatialReference_EPSGTreatsAsLatLong", _wrap_SpatialReference_EPSGTreatsAsLatLong, METH_O, "SpatialReference_EPSGTreatsAsLatLong(self) -> int"},
20488 : { "SpatialReference_EPSGTreatsAsNorthingEasting", _wrap_SpatialReference_EPSGTreatsAsNorthingEasting, METH_O, "SpatialReference_EPSGTreatsAsNorthingEasting(self) -> int"},
20489 : { "SpatialReference_SetAuthority", _wrap_SpatialReference_SetAuthority, METH_VARARGS, "SpatialReference_SetAuthority(self, pszTargetKey, pszAuthority, nCode) -> OGRErr"},
20490 : { "SpatialReference_GetAttrValue", _wrap_SpatialReference_GetAttrValue, METH_VARARGS, "\n"
20491 : "SpatialReference_GetAttrValue(self, name, child=0) -> char const *\n"
20492 : "\n"
20493 : "\n"
20494 : "Fetch indicated attribute of named node.\n"
20495 : "\n"
20496 : "See :cpp:func:`OGRSpatialReference::GetAttrValue`.\n"
20497 : "\n"
20498 : "Parameters\n"
20499 : "----------\n"
20500 : "name : str\n"
20501 : " tree node to look for (case insensitive)\n"
20502 : "child : int, default = 0\n"
20503 : " 0-indexed child of the node\n"
20504 : "\n"
20505 : "Returns\n"
20506 : "-------\n"
20507 : "str\n"
20508 : "\n"
20509 : "Examples\n"
20510 : "--------\n"
20511 : ">>> vt_sp = osr.SpatialReference()\n"
20512 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20513 : "0\n"
20514 : ">>> vt_sp.GetAttrValue('UNIT', 0)\n"
20515 : "'US survey foot'\n"
20516 : "\n"
20517 : "\n"
20518 : ""},
20519 : { "SpatialReference_SetAttrValue", _wrap_SpatialReference_SetAttrValue, METH_VARARGS, "SpatialReference_SetAttrValue(self, name, value) -> OGRErr"},
20520 : { "SpatialReference_SetAngularUnits", _wrap_SpatialReference_SetAngularUnits, METH_VARARGS, "SpatialReference_SetAngularUnits(self, name, to_radians) -> OGRErr"},
20521 : { "SpatialReference_GetAngularUnits", _wrap_SpatialReference_GetAngularUnits, METH_O, "\n"
20522 : "SpatialReference_GetAngularUnits(self) -> double\n"
20523 : "\n"
20524 : "\n"
20525 : "Fetch conversion between angular geographic coordinate system units and radians.\n"
20526 : "\n"
20527 : "See :cpp:func:`OGRSpatialReference::GetAngularUnits`.\n"
20528 : "\n"
20529 : "Returns\n"
20530 : "-------\n"
20531 : "float\n"
20532 : " Value to multiply angular distances by to transform them to radians.\n"
20533 : "\n"
20534 : "Examples\n"
20535 : "--------\n"
20536 : ">>> srs = osr.SpatialReference()\n"
20537 : ">>> srs.ImportFromEPSG(4326)\n"
20538 : "0\n"
20539 : ">>> srs.GetAngularUnits()\n"
20540 : "0.017453292519943295\n"
20541 : "\n"
20542 : "\n"
20543 : ""},
20544 : { "SpatialReference_GetAngularUnitsName", _wrap_SpatialReference_GetAngularUnitsName, METH_O, "\n"
20545 : "SpatialReference_GetAngularUnitsName(self) -> char const *\n"
20546 : "\n"
20547 : "\n"
20548 : "Fetch angular geographic coordinate system units.\n"
20549 : "\n"
20550 : "See :cpp:func:`OGRSpatialReference::GetAngularUnits`.\n"
20551 : "\n"
20552 : "Returns\n"
20553 : "-------\n"
20554 : "str\n"
20555 : "\n"
20556 : "Examples\n"
20557 : "--------\n"
20558 : ">>> srs = osr.SpatialReference()\n"
20559 : ">>> srs.ImportFromEPSG(4326)\n"
20560 : "0\n"
20561 : ">>> srs.GetAngularUnitsName()\n"
20562 : "'degree'\n"
20563 : "\n"
20564 : "\n"
20565 : ""},
20566 : { "SpatialReference_SetTargetLinearUnits", _wrap_SpatialReference_SetTargetLinearUnits, METH_VARARGS, "SpatialReference_SetTargetLinearUnits(self, target, name, to_meters) -> OGRErr"},
20567 : { "SpatialReference_SetLinearUnits", _wrap_SpatialReference_SetLinearUnits, METH_VARARGS, "SpatialReference_SetLinearUnits(self, name, to_meters) -> OGRErr"},
20568 : { "SpatialReference_SetLinearUnitsAndUpdateParameters", _wrap_SpatialReference_SetLinearUnitsAndUpdateParameters, METH_VARARGS, "SpatialReference_SetLinearUnitsAndUpdateParameters(self, name, to_meters) -> OGRErr"},
20569 : { "SpatialReference_GetTargetLinearUnits", _wrap_SpatialReference_GetTargetLinearUnits, METH_VARARGS, "\n"
20570 : "SpatialReference_GetTargetLinearUnits(self, target_key) -> double\n"
20571 : "\n"
20572 : "\n"
20573 : "Fetch linear units for a target.\n"
20574 : "\n"
20575 : "See :cpp:func:`OGRSpatialReference::GetTargetLinearUnits`.\n"
20576 : "\n"
20577 : "Parameters\n"
20578 : "----------\n"
20579 : "target_key : str\n"
20580 : " key to look un, such as 'PROJCS' or 'VERT_CS'\n"
20581 : "\n"
20582 : "Returns\n"
20583 : "-------\n"
20584 : "double\n"
20585 : "\n"
20586 : "\n"
20587 : ""},
20588 : { "SpatialReference_GetLinearUnits", _wrap_SpatialReference_GetLinearUnits, METH_O, "\n"
20589 : "SpatialReference_GetLinearUnits(self) -> double\n"
20590 : "\n"
20591 : "\n"
20592 : "Fetch the conversion between linear projection units and meters.\n"
20593 : "\n"
20594 : "See :cpp:func:`OGRSpatialReference::GetLinearUnits`.\n"
20595 : "\n"
20596 : "Returns\n"
20597 : "-------\n"
20598 : "float\n"
20599 : "\n"
20600 : "Examples\n"
20601 : "--------\n"
20602 : ">>> vt_sp = osr.SpatialReference()\n"
20603 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20604 : "0\n"
20605 : ">>> vt_sp.GetLinearUnits()\n"
20606 : "0.30480060960121924\n"
20607 : "\n"
20608 : "\n"
20609 : ""},
20610 : { "SpatialReference_GetLinearUnitsName", _wrap_SpatialReference_GetLinearUnitsName, METH_O, "\n"
20611 : "SpatialReference_GetLinearUnitsName(self) -> char const *\n"
20612 : "\n"
20613 : "\n"
20614 : "Fetch the name of the linear projection units.\n"
20615 : "\n"
20616 : "See :cpp:func:`OGRSpatialReference::GetLinearUnits`.\n"
20617 : "\n"
20618 : "Returns\n"
20619 : "-------\n"
20620 : "str\n"
20621 : "\n"
20622 : "Examples\n"
20623 : "--------\n"
20624 : ">>> vt_sp = osr.SpatialReference()\n"
20625 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20626 : "0\n"
20627 : ">>> vt_sp.GetLinearUnitsName()\n"
20628 : "'US survey foot'\n"
20629 : "\n"
20630 : "\n"
20631 : ""},
20632 : { "SpatialReference_GetAuthorityCode", _wrap_SpatialReference_GetAuthorityCode, METH_VARARGS, "\n"
20633 : "SpatialReference_GetAuthorityCode(self, target_key=None) -> char const *\n"
20634 : "\n"
20635 : "\n"
20636 : "Get the authority code for a node.\n"
20637 : "\n"
20638 : "See :cpp:func:`OGRSpatialReference::GetAuthorityCode`.\n"
20639 : "\n"
20640 : "Parameters\n"
20641 : "----------\n"
20642 : "target_key : str\n"
20643 : " the partial or complete path to the node to get an authority from\n"
20644 : " (e.g., 'PROJCS', 'GEOGCS' or ``None`` to get an authority code\n"
20645 : " on the root element)\n"
20646 : "\n"
20647 : "Returns\n"
20648 : "-------\n"
20649 : "str or None\n"
20650 : " Returns a string on success or ``None`` on failure.\n"
20651 : "\n"
20652 : "Examples\n"
20653 : "--------\n"
20654 : ">>> srs = osr.SpatialReference()\n"
20655 : ">>> srs.ImportFromEPSG(4326)\n"
20656 : "0\n"
20657 : ">>> srs.GetAuthorityName('DATUM')\n"
20658 : "'EPSG'\n"
20659 : ">>> srs.GetAuthorityCode('DATUM')\n"
20660 : "'6326'\n"
20661 : ">>> srs.GetAuthorityCode(None)\n"
20662 : "'4326'\n"
20663 : "\n"
20664 : "\n"
20665 : ""},
20666 : { "SpatialReference_GetAuthorityName", _wrap_SpatialReference_GetAuthorityName, METH_VARARGS, "\n"
20667 : "SpatialReference_GetAuthorityName(self, target_key=None) -> char const *\n"
20668 : "\n"
20669 : "\n"
20670 : "Get the authority name for a node.\n"
20671 : "\n"
20672 : "See :cpp:func:`OGRSpatialReference::GetAuthorityName`.\n"
20673 : "\n"
20674 : "Parameters\n"
20675 : "----------\n"
20676 : "target_key : str\n"
20677 : " the partial or complete path to the node to get an authority from\n"
20678 : " (e.g., 'PROJCS', 'GEOGCS' or ``None`` to get an authority name\n"
20679 : " on the root element)\n"
20680 : "\n"
20681 : "Returns\n"
20682 : "-------\n"
20683 : "str\n"
20684 : "\n"
20685 : ""},
20686 : { "SpatialReference_GetAreaOfUse", _wrap_SpatialReference_GetAreaOfUse, METH_O, "\n"
20687 : "SpatialReference_GetAreaOfUse(self) -> AreaOfUse\n"
20688 : "\n"
20689 : "\n"
20690 : "Return the area of use of the SRS.\n"
20691 : "\n"
20692 : "See :cpp:func:`OGRSpatialReference::GetAreaOfUse`.\n"
20693 : "\n"
20694 : "Returns\n"
20695 : "-------\n"
20696 : "AreaOfUse\n"
20697 : " object providing a description of the area of use as well as bounding parallels / meridians\n"
20698 : "\n"
20699 : "Examples\n"
20700 : "--------\n"
20701 : "\n"
20702 : ">>> vt_sp = osr.SpatialReference()\n"
20703 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20704 : "0\n"
20705 : ">>> aou = vt_sp.GetAreaOfUse()\n"
20706 : ">>> aou.name\n"
20707 : "'United States (USA) - Vermont - counties of Addison; Bennington; Caledonia; Chittenden; Essex; Franklin; Grand Isle; Lamoille; Orange; Orleans; Rutland; Washington; Windham; Windsor.'\n"
20708 : ">>> aou.west_lon_degree, aou.south_lat_degree, aou.east_lon_degree, aou.north_lat_degree\n"
20709 : "(-73.44, 42.72, -71.5, 45.03)\n"
20710 : "\n"
20711 : "\n"
20712 : ""},
20713 : { "SpatialReference_GetAxisName", _wrap_SpatialReference_GetAxisName, METH_VARARGS, "\n"
20714 : "SpatialReference_GetAxisName(self, target_key, iAxis) -> char const *\n"
20715 : "\n"
20716 : "\n"
20717 : "Fetch an axis description.\n"
20718 : "\n"
20719 : "See :cpp:func:`OGRSpatialReference::GetAxis`.\n"
20720 : "\n"
20721 : "Parameters\n"
20722 : "----------\n"
20723 : "target_key : str\n"
20724 : " The portion of the coordinate system, either 'GEOGCS' or 'PROJCS'\n"
20725 : "iAxis : int\n"
20726 : " The 0-based index of the axis to fetch\n"
20727 : "\n"
20728 : "Returns\n"
20729 : "-------\n"
20730 : "str\n"
20731 : "\n"
20732 : "Examples\n"
20733 : "--------\n"
20734 : ">>> srs = osr.SpatialReference()\n"
20735 : ">>> srs.ImportFromEPSG(4979)\n"
20736 : "0\n"
20737 : ">>> for i in range(3):\n"
20738 : "... srs.GetAxisName('GEOGCS', i)\n"
20739 : "...\n"
20740 : "'Geodetic latitude'\n"
20741 : "'Geodetic longitude'\n"
20742 : "'Ellipsoidal height'\n"
20743 : "\n"
20744 : "\n"
20745 : ""},
20746 : { "SpatialReference_GetAxesCount", _wrap_SpatialReference_GetAxesCount, METH_O, "\n"
20747 : "SpatialReference_GetAxesCount(self) -> int\n"
20748 : "\n"
20749 : "\n"
20750 : "Return the number of axes of the coordinate system of the CRS.\n"
20751 : "\n"
20752 : "See :cpp:func:`OGRSpatialReference::GetAxesCount`.\n"
20753 : "\n"
20754 : "Returns\n"
20755 : "-------\n"
20756 : "int\n"
20757 : "\n"
20758 : "Examples\n"
20759 : "--------\n"
20760 : ">>> srs = osr.SpatialReference()\n"
20761 : ">>> srs.ImportFromEPSG(4326)\n"
20762 : "0\n"
20763 : ">>> srs.GetAxesCount()\n"
20764 : "2\n"
20765 : ">>> srs.ImportFromEPSG(4979)\n"
20766 : "0\n"
20767 : ">>> srs.GetAxesCount()\n"
20768 : "3\n"
20769 : "\n"
20770 : ""},
20771 : { "SpatialReference_GetAxisOrientation", _wrap_SpatialReference_GetAxisOrientation, METH_VARARGS, "\n"
20772 : "SpatialReference_GetAxisOrientation(self, target_key, iAxis) -> OGRAxisOrientation\n"
20773 : "\n"
20774 : "\n"
20775 : "Fetch an axis orientation.\n"
20776 : "\n"
20777 : "See :cpp:func:`OGRSpatialReference::GetAxis`.\n"
20778 : "\n"
20779 : "Parameters\n"
20780 : "----------\n"
20781 : "target_key : str\n"
20782 : " The portion of the coordinate system, either 'GEOGCS' or 'PROJCS'\n"
20783 : "iAxis : int\n"
20784 : " The 0-based index of the axis to fetch\n"
20785 : "\n"
20786 : "Returns\n"
20787 : "-------\n"
20788 : "int\n"
20789 : "\n"
20790 : "Examples\n"
20791 : "--------\n"
20792 : ">>> srs = osr.SpatialReference()\n"
20793 : ">>> srs.ImportFromEPSG(4979)\n"
20794 : "0\n"
20795 : ">>> srs.GetAxisOrientation('GEOGCS', 0) == osr.OAO_North\n"
20796 : "True\n"
20797 : ">>> srs.GetAxisOrientation('GEOGCS', 1) == osr.OAO_East\n"
20798 : "True\n"
20799 : ">>> srs.GetAxisOrientation('GEOGCS', 2) == osr.OAO_Up\n"
20800 : "True\n"
20801 : "\n"
20802 : ""},
20803 : { "SpatialReference_GetAxisMappingStrategy", _wrap_SpatialReference_GetAxisMappingStrategy, METH_O, "\n"
20804 : "SpatialReference_GetAxisMappingStrategy(self) -> OSRAxisMappingStrategy\n"
20805 : "\n"
20806 : "\n"
20807 : "Return the data axis to CRS axis mapping strategy:\n"
20808 : "\n"
20809 : "- :py:const:`OAMS_TRADITIONAL_GIS_ORDER` means that for geographic CRS\n"
20810 : " with lag/long order, the data will still be long/lat ordered. Similarly\n"
20811 : " for a projected CRS with northing/easting order, the data will still be\n"
20812 : " easting/northing ordered.\n"
20813 : "- :py:const:`OAMS_AUTHORITY_COMPLIANT` means that the data axis will be\n"
20814 : " identical to the CRS axis.\n"
20815 : "- :py:const:`OAMS_CUSTOM` means that the ordering is defined with\n"
20816 : " :py:meth:`SetDataAxisToSRSAxisMapping`.\n"
20817 : "\n"
20818 : "See :cpp:func:`OGRSpatialReference::GetAxisMappingStrategy`.\n"
20819 : "\n"
20820 : "Returns\n"
20821 : "-------\n"
20822 : "int\n"
20823 : "\n"
20824 : "\n"
20825 : ""},
20826 : { "SpatialReference_SetAxisMappingStrategy", _wrap_SpatialReference_SetAxisMappingStrategy, METH_VARARGS, "SpatialReference_SetAxisMappingStrategy(self, strategy)"},
20827 : { "SpatialReference_GetDataAxisToSRSAxisMapping", _wrap_SpatialReference_GetDataAxisToSRSAxisMapping, METH_O, "\n"
20828 : "SpatialReference_GetDataAxisToSRSAxisMapping(self)\n"
20829 : "\n"
20830 : "\n"
20831 : "Return the data axis to SRS axis mapping.\n"
20832 : "\n"
20833 : "See :cpp:func:`OGRSpatialReference::GetDataAxisToSRSAxisMapping`.\n"
20834 : "\n"
20835 : "Returns\n"
20836 : "-------\n"
20837 : "tuple\n"
20838 : "\n"
20839 : "\n"
20840 : ""},
20841 : { "SpatialReference_SetDataAxisToSRSAxisMapping", _wrap_SpatialReference_SetDataAxisToSRSAxisMapping, METH_VARARGS, "SpatialReference_SetDataAxisToSRSAxisMapping(self, nList) -> OGRErr"},
20842 : { "SpatialReference_SetUTM", _wrap_SpatialReference_SetUTM, METH_VARARGS, "SpatialReference_SetUTM(self, zone, north=1) -> OGRErr"},
20843 : { "SpatialReference_GetUTMZone", _wrap_SpatialReference_GetUTMZone, METH_O, "\n"
20844 : "SpatialReference_GetUTMZone(self) -> int\n"
20845 : "\n"
20846 : "\n"
20847 : "Get UTM zone.\n"
20848 : "\n"
20849 : "See :cpp:func:`OGRSpatialReference::GetUTMZone`.\n"
20850 : "\n"
20851 : "Returns\n"
20852 : "-------\n"
20853 : "int\n"
20854 : " 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"
20855 : "\n"
20856 : "\n"
20857 : ""},
20858 : { "SpatialReference_SetStatePlane", _wrap_SpatialReference_SetStatePlane, METH_VARARGS, "SpatialReference_SetStatePlane(self, zone, is_nad83=1, unitsname=\"\", units=0.0) -> OGRErr"},
20859 : { "SpatialReference_AutoIdentifyEPSG", _wrap_SpatialReference_AutoIdentifyEPSG, METH_O, "\n"
20860 : "SpatialReference_AutoIdentifyEPSG(self) -> OGRErr\n"
20861 : "\n"
20862 : "\n"
20863 : "Add an EPSG authority code to the CRS\n"
20864 : "where an aspect of the coordinate system can be easily and safely\n"
20865 : "corresponded with an EPSG identifier.\n"
20866 : "\n"
20867 : "See :cpp:func:`OGRSpatialReference::AutoIdentifyEPSG`.\n"
20868 : "\n"
20869 : "Returns\n"
20870 : "-------\n"
20871 : "int\n"
20872 : " :py:const:`OGRERR_NONE` or :py:const:`OGRERR_UNSUPPORTED_SRS`.\n"
20873 : "\n"
20874 : "\n"
20875 : ""},
20876 : { "SpatialReference_FindMatches", _wrap_SpatialReference_FindMatches, METH_VARARGS, "SpatialReference_FindMatches(self, options=None)"},
20877 : { "SpatialReference_SetProjection", _wrap_SpatialReference_SetProjection, METH_VARARGS, "SpatialReference_SetProjection(self, arg) -> OGRErr"},
20878 : { "SpatialReference_SetProjParm", _wrap_SpatialReference_SetProjParm, METH_VARARGS, "SpatialReference_SetProjParm(self, name, val) -> OGRErr"},
20879 : { "SpatialReference_GetProjParm", _wrap_SpatialReference_GetProjParm, METH_VARARGS, "\n"
20880 : "SpatialReference_GetProjParm(self, name, default_val=0.0) -> double\n"
20881 : "\n"
20882 : "\n"
20883 : "Fetch a projection parameter value.\n"
20884 : "\n"
20885 : "See :cpp:func:`OGRSpatialReference::GetProjParm`.\n"
20886 : "\n"
20887 : "Parameters\n"
20888 : "----------\n"
20889 : "name : str\n"
20890 : " parameter name, available as constants prefixed with `SRS_PP`.\n"
20891 : "default_val : float, default = 0.0\n"
20892 : " value to return if this parameter doesn't exist\n"
20893 : "\n"
20894 : "Returns\n"
20895 : "-------\n"
20896 : "float\n"
20897 : "\n"
20898 : "Examples\n"
20899 : "--------\n"
20900 : ">>> vt_sp = osr.SpatialReference()\n"
20901 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20902 : "0\n"
20903 : ">>> vt_sp.GetProjParm(osr.SRS_PP_FALSE_EASTING)\n"
20904 : "1640416.6667\n"
20905 : ">>> vt_sp.GetProjParm(osr.SRS_PP_FALSE_NORTHING)\n"
20906 : "0.0\n"
20907 : "\n"
20908 : "\n"
20909 : ""},
20910 : { "SpatialReference_SetNormProjParm", _wrap_SpatialReference_SetNormProjParm, METH_VARARGS, "SpatialReference_SetNormProjParm(self, name, val) -> OGRErr"},
20911 : { "SpatialReference_GetNormProjParm", _wrap_SpatialReference_GetNormProjParm, METH_VARARGS, "\n"
20912 : "SpatialReference_GetNormProjParm(self, name, default_val=0.0) -> double\n"
20913 : "\n"
20914 : "\n"
20915 : "Fetch a normalized projection parameter value.\n"
20916 : "\n"
20917 : "This method is the same as :py:meth:`GetProjParm` except that the value of the\n"
20918 : "parameter is normalized into degrees or meters depending on whether it is\n"
20919 : "linear or angular.\n"
20920 : "\n"
20921 : "See :cpp:func:`OGRSpatialReference::GetNormProjParm`.\n"
20922 : "\n"
20923 : "Parameters\n"
20924 : "----------\n"
20925 : "name : str\n"
20926 : " parameter name, available as constants prefixed with `SRS_PP`.\n"
20927 : "default_val : float, default = 0.0\n"
20928 : " value to return if this parameter doesn't exist\n"
20929 : "\n"
20930 : "Returns\n"
20931 : "-------\n"
20932 : "float\n"
20933 : "\n"
20934 : "Examples\n"
20935 : "--------\n"
20936 : ">>> vt_sp = osr.SpatialReference()\n"
20937 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20938 : "0\n"
20939 : ">>> vt_sp.GetProjParm(osr.SRS_PP_FALSE_EASTING)\n"
20940 : "1640416.6667\n"
20941 : ">>> vt_sp.GetNormProjParm(osr.SRS_PP_FALSE_EASTING)\n"
20942 : "500000.0000101601\n"
20943 : "\n"
20944 : "\n"
20945 : ""},
20946 : { "SpatialReference_GetSemiMajor", _wrap_SpatialReference_GetSemiMajor, METH_O, "\n"
20947 : "SpatialReference_GetSemiMajor(self) -> double\n"
20948 : "\n"
20949 : "\n"
20950 : "Get spheroid semi major axis (in meters starting with GDAL 3.0)\n"
20951 : "\n"
20952 : "See :cpp:func:`OGRSpatialReference::GetSemiMajor`.\n"
20953 : "\n"
20954 : "Returns\n"
20955 : "-------\n"
20956 : "float\n"
20957 : " semi-major axis, or :py:const:`SRS_WGS84_SEMIMAJOR` if it cannot be found.\n"
20958 : "\n"
20959 : ""},
20960 : { "SpatialReference_GetSemiMinor", _wrap_SpatialReference_GetSemiMinor, METH_O, "\n"
20961 : "SpatialReference_GetSemiMinor(self) -> double\n"
20962 : "\n"
20963 : "\n"
20964 : "Get spheroid semi minor axis.\n"
20965 : "\n"
20966 : "See :cpp:func:`OGRSpatialReference::GetSemiMinor`.\n"
20967 : "\n"
20968 : "Returns\n"
20969 : "-------\n"
20970 : "float\n"
20971 : " semi-minor axis, or :py:const:`SRS_WGS84_SEMIMINOR` if it cannot be found.\n"
20972 : "\n"
20973 : ""},
20974 : { "SpatialReference_GetInvFlattening", _wrap_SpatialReference_GetInvFlattening, METH_O, "\n"
20975 : "SpatialReference_GetInvFlattening(self) -> double\n"
20976 : "\n"
20977 : "\n"
20978 : "Get the spheroid inverse flattening.\n"
20979 : "\n"
20980 : "See :cpp:func:`OGRSpatialReference::GetInvFlattening`.\n"
20981 : "\n"
20982 : "Returns\n"
20983 : "-------\n"
20984 : "float\n"
20985 : "\n"
20986 : "Examples\n"
20987 : "--------\n"
20988 : ">>> srs = osr.SpatialReference()\n"
20989 : ">>> srs.ImportFromEPSG(4326) # WGS84\n"
20990 : "0\n"
20991 : ">>> srs.GetInvFlattening()\n"
20992 : "298.257223563\n"
20993 : ">>> srs.ImportFromEPSG(4269) # NAD83\n"
20994 : "0\n"
20995 : ">>> srs.GetInvFlattening()\n"
20996 : "298.257222101\n"
20997 : "\n"
20998 : ""},
20999 : { "SpatialReference_SetACEA", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetACEA, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetACEA(self, stdp1, stdp2, clat, clong, fe, fn) -> OGRErr"},
21000 : { "SpatialReference_SetAE", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetAE, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetAE(self, clat, clong, fe, fn) -> OGRErr"},
21001 : { "SpatialReference_SetBonne", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetBonne, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetBonne(self, stdp, cm, fe, fn) -> OGRErr"},
21002 : { "SpatialReference_SetCEA", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetCEA, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetCEA(self, stdp1, cm, fe, fn) -> OGRErr"},
21003 : { "SpatialReference_SetCS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetCS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetCS(self, clat, clong, fe, fn) -> OGRErr"},
21004 : { "SpatialReference_SetEC", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEC, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEC(self, stdp1, stdp2, clat, clong, fe, fn) -> OGRErr"},
21005 : { "SpatialReference_SetEckertIV", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEckertIV, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEckertIV(self, cm, fe, fn) -> OGRErr"},
21006 : { "SpatialReference_SetEckertVI", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEckertVI, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEckertVI(self, cm, fe, fn) -> OGRErr"},
21007 : { "SpatialReference_SetEquirectangular", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEquirectangular, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEquirectangular(self, clat, clong, fe, fn) -> OGRErr"},
21008 : { "SpatialReference_SetEquirectangular2", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEquirectangular2, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEquirectangular2(self, clat, clong, pseudostdparallellat, fe, fn) -> OGRErr"},
21009 : { "SpatialReference_SetGaussSchreiberTMercator", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGaussSchreiberTMercator, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGaussSchreiberTMercator(self, clat, clong, sc, fe, fn) -> OGRErr"},
21010 : { "SpatialReference_SetGS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGS(self, cm, fe, fn) -> OGRErr"},
21011 : { "SpatialReference_SetGH", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGH, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGH(self, cm, fe, fn) -> OGRErr"},
21012 : { "SpatialReference_SetIGH", _wrap_SpatialReference_SetIGH, METH_O, "SpatialReference_SetIGH(self) -> OGRErr"},
21013 : { "SpatialReference_SetGEOS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGEOS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGEOS(self, cm, satelliteheight, fe, fn) -> OGRErr"},
21014 : { "SpatialReference_SetGnomonic", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGnomonic, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGnomonic(self, clat, clong, fe, fn) -> OGRErr"},
21015 : { "SpatialReference_SetHOM", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetHOM, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetHOM(self, clat, clong, azimuth, recttoskew, scale, fe, fn) -> OGRErr"},
21016 : { "SpatialReference_SetHOM2PNO", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetHOM2PNO, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetHOM2PNO(self, clat, dfLat1, dfLong1, dfLat2, dfLong2, scale, fe, fn) -> OGRErr"},
21017 : { "SpatialReference_SetKrovak", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetKrovak, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetKrovak(self, clat, clong, azimuth, pseudostdparallellat, scale, fe, fn) -> OGRErr"},
21018 : { "SpatialReference_SetLAEA", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetLAEA, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetLAEA(self, clat, clong, fe, fn) -> OGRErr"},
21019 : { "SpatialReference_SetLCC", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetLCC, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetLCC(self, stdp1, stdp2, clat, clong, fe, fn) -> OGRErr"},
21020 : { "SpatialReference_SetLCC1SP", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetLCC1SP, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetLCC1SP(self, clat, clong, scale, fe, fn) -> OGRErr"},
21021 : { "SpatialReference_SetLCCB", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetLCCB, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetLCCB(self, stdp1, stdp2, clat, clong, fe, fn) -> OGRErr"},
21022 : { "SpatialReference_SetMC", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetMC, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetMC(self, clat, clong, fe, fn) -> OGRErr"},
21023 : { "SpatialReference_SetMercator", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetMercator, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetMercator(self, clat, clong, scale, fe, fn) -> OGRErr"},
21024 : { "SpatialReference_SetMercator2SP", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetMercator2SP, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetMercator2SP(self, stdp1, clat, clong, fe, fn) -> OGRErr"},
21025 : { "SpatialReference_SetMollweide", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetMollweide, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetMollweide(self, cm, fe, fn) -> OGRErr"},
21026 : { "SpatialReference_SetNZMG", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetNZMG, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetNZMG(self, clat, clong, fe, fn) -> OGRErr"},
21027 : { "SpatialReference_SetOS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetOS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetOS(self, dfOriginLat, dfCMeridian, scale, fe, fn) -> OGRErr"},
21028 : { "SpatialReference_SetOrthographic", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetOrthographic, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetOrthographic(self, clat, clong, fe, fn) -> OGRErr"},
21029 : { "SpatialReference_SetPolyconic", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetPolyconic, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetPolyconic(self, clat, clong, fe, fn) -> OGRErr"},
21030 : { "SpatialReference_SetPS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetPS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetPS(self, clat, clong, scale, fe, fn) -> OGRErr"},
21031 : { "SpatialReference_SetRobinson", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetRobinson, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetRobinson(self, clong, fe, fn) -> OGRErr"},
21032 : { "SpatialReference_SetSinusoidal", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetSinusoidal, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetSinusoidal(self, clong, fe, fn) -> OGRErr"},
21033 : { "SpatialReference_SetStereographic", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetStereographic, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetStereographic(self, clat, clong, scale, fe, fn) -> OGRErr"},
21034 : { "SpatialReference_SetSOC", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetSOC, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetSOC(self, latitudeoforigin, cm, fe, fn) -> OGRErr"},
21035 : { "SpatialReference_SetTM", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetTM, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetTM(self, clat, clong, scale, fe, fn) -> OGRErr"},
21036 : { "SpatialReference_SetTMVariant", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetTMVariant, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetTMVariant(self, pszVariantName, clat, clong, scale, fe, fn) -> OGRErr"},
21037 : { "SpatialReference_SetTMG", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetTMG, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetTMG(self, clat, clong, fe, fn) -> OGRErr"},
21038 : { "SpatialReference_SetTMSO", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetTMSO, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetTMSO(self, clat, clong, scale, fe, fn) -> OGRErr"},
21039 : { "SpatialReference_SetVDG", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetVDG, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetVDG(self, clong, fe, fn) -> OGRErr"},
21040 : { "SpatialReference_SetVerticalPerspective", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetVerticalPerspective, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetVerticalPerspective(self, topoOriginLat, topoOriginLon, topoOriginHeight, viewPointHeight, fe, fn) -> OGRErr"},
21041 : { "SpatialReference_SetWellKnownGeogCS", _wrap_SpatialReference_SetWellKnownGeogCS, METH_VARARGS, "SpatialReference_SetWellKnownGeogCS(self, name) -> OGRErr"},
21042 : { "SpatialReference_SetFromUserInput", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetFromUserInput, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetFromUserInput(self, name, options=None) -> OGRErr"},
21043 : { "SpatialReference_CopyGeogCSFrom", _wrap_SpatialReference_CopyGeogCSFrom, METH_VARARGS, "SpatialReference_CopyGeogCSFrom(self, rhs) -> OGRErr"},
21044 : { "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"},
21045 : { "SpatialReference_HasTOWGS84", _wrap_SpatialReference_HasTOWGS84, METH_O, "\n"
21046 : "SpatialReference_HasTOWGS84(self) -> bool\n"
21047 : "\n"
21048 : "\n"
21049 : "Return whether the SRS has a TOWGS84 parameter.\n"
21050 : "\n"
21051 : "See :cpp:func:`OGRSpatialReference::GetTOWGS84`.\n"
21052 : "\n"
21053 : "Returns\n"
21054 : "-------\n"
21055 : "bool\n"
21056 : "\n"
21057 : "\n"
21058 : ""},
21059 : { "SpatialReference_GetTOWGS84", _wrap_SpatialReference_GetTOWGS84, METH_O, "\n"
21060 : "SpatialReference_GetTOWGS84(self) -> OGRErr\n"
21061 : "\n"
21062 : "\n"
21063 : "Fetch TOWGS84 parameter, if available.\n"
21064 : "\n"
21065 : "See :cpp:func:`OGRSpatialReference::GetTOWGS84`.\n"
21066 : "\n"
21067 : "Returns\n"
21068 : "-------\n"
21069 : "tuple\n"
21070 : "\n"
21071 : "\n"
21072 : ""},
21073 : { "SpatialReference_AddGuessedTOWGS84", _wrap_SpatialReference_AddGuessedTOWGS84, METH_O, "SpatialReference_AddGuessedTOWGS84(self) -> OGRErr"},
21074 : { "SpatialReference_SetLocalCS", _wrap_SpatialReference_SetLocalCS, METH_VARARGS, "SpatialReference_SetLocalCS(self, pszName) -> OGRErr"},
21075 : { "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"},
21076 : { "SpatialReference_SetProjCS", _wrap_SpatialReference_SetProjCS, METH_VARARGS, "SpatialReference_SetProjCS(self, name=\"unnamed\") -> OGRErr"},
21077 : { "SpatialReference_SetGeocCS", _wrap_SpatialReference_SetGeocCS, METH_VARARGS, "SpatialReference_SetGeocCS(self, name=\"unnamed\") -> OGRErr"},
21078 : { "SpatialReference_SetVertCS", _wrap_SpatialReference_SetVertCS, METH_VARARGS, "SpatialReference_SetVertCS(self, VertCSName=\"unnamed\", VertDatumName=\"unnamed\", VertDatumType=0) -> OGRErr"},
21079 : { "SpatialReference_SetCompoundCS", _wrap_SpatialReference_SetCompoundCS, METH_VARARGS, "SpatialReference_SetCompoundCS(self, name, horizcs, vertcs) -> OGRErr"},
21080 : { "SpatialReference_ImportFromWkt", _wrap_SpatialReference_ImportFromWkt, METH_VARARGS, "\n"
21081 : "SpatialReference_ImportFromWkt(self, ppszInput) -> OGRErr\n"
21082 : "\n"
21083 : "\n"
21084 : "Import from WKT string.\n"
21085 : "\n"
21086 : "See :cpp:func:`OGRSpatialReference::importFromWkt`.\n"
21087 : "\n"
21088 : "Parameters\n"
21089 : "----------\n"
21090 : "ppszInput : str\n"
21091 : " WKT string\n"
21092 : "\n"
21093 : "Returns\n"
21094 : "-------\n"
21095 : "int\n"
21096 : " :py:const:`OGRERR_NONE` if import succeeds, or :py:const:`OGRERR_CORRUPT_DATA` if it fails for any reason.\n"
21097 : "\n"
21098 : "\n"
21099 : ""},
21100 : { "SpatialReference_ImportFromProj4", _wrap_SpatialReference_ImportFromProj4, METH_VARARGS, "\n"
21101 : "SpatialReference_ImportFromProj4(self, ppszInput) -> OGRErr\n"
21102 : "\n"
21103 : "\n"
21104 : "Initialize SRS based on PROJ coordinate string.\n"
21105 : "\n"
21106 : "See :cpp:func:`OGRSpatialReference::importFromProj4`.\n"
21107 : "\n"
21108 : "Parameters\n"
21109 : "----------\n"
21110 : "ppszInput : str\n"
21111 : " PROJ coordinate string\n"
21112 : "\n"
21113 : "Returns\n"
21114 : "-------\n"
21115 : "int\n"
21116 : " :py:const:`OGRERR_NONE` on success, or :py:const:`OGRERR_CORRUPT_DATA` on failure\n"
21117 : "\n"
21118 : "Examples\n"
21119 : "--------\n"
21120 : ">>> srs = osr.SpatialReference()\n"
21121 : ">>> srs.ImportFromProj4('+proj=utm +zone=18 +datum=WGS84')\n"
21122 : "0\n"
21123 : "\n"
21124 : ""},
21125 : { "SpatialReference_ImportFromUrl", _wrap_SpatialReference_ImportFromUrl, METH_VARARGS, "\n"
21126 : "SpatialReference_ImportFromUrl(self, url) -> OGRErr\n"
21127 : "\n"
21128 : "\n"
21129 : "Initialize SRS based on a URL.\n"
21130 : "\n"
21131 : "This method will download the spatial reference at a given URL and\n"
21132 : "feed it into :py:meth:`SetFromUserInput` for you.\n"
21133 : "\n"
21134 : "See :cpp:func:`OGRSpatialReference::importFromUrl`.\n"
21135 : "\n"
21136 : "Parameters\n"
21137 : "----------\n"
21138 : "url : str\n"
21139 : "\n"
21140 : "Returns\n"
21141 : "-------\n"
21142 : "int\n"
21143 : " :py:const:`OGRERR_NONE` on success, or an error code on failure\n"
21144 : "\n"
21145 : "\n"
21146 : ""},
21147 : { "SpatialReference_ImportFromESRI", _wrap_SpatialReference_ImportFromESRI, METH_VARARGS, "SpatialReference_ImportFromESRI(self, ppszInput) -> OGRErr"},
21148 : { "SpatialReference_ImportFromEPSG", _wrap_SpatialReference_ImportFromEPSG, METH_VARARGS, "\n"
21149 : "SpatialReference_ImportFromEPSG(self, arg) -> OGRErr\n"
21150 : "\n"
21151 : "\n"
21152 : "Initialize SRS based on EPSG geographic, projected or vertical CRS code.\n"
21153 : "\n"
21154 : "Since GDAL 3.0, this method is identical to :py:meth:`ImportFromEPSGA`.\n"
21155 : "\n"
21156 : "See :cpp:func:`OGRSpatialReference::importFromEPSG`.\n"
21157 : "\n"
21158 : "Parameters\n"
21159 : "----------\n"
21160 : "arg : int\n"
21161 : " EPSG code to search in PROJ database\n"
21162 : "\n"
21163 : "Returns\n"
21164 : "-------\n"
21165 : "int\n"
21166 : " :py:const:`OGRERR_NONE` on success, or an error code on failure\n"
21167 : "\n"
21168 : "Examples\n"
21169 : "--------\n"
21170 : ">>> srs = osr.SpatialReference()\n"
21171 : ">>> srs.ImportFromEPSG(4326)\n"
21172 : "0\n"
21173 : "\n"
21174 : "\n"
21175 : ""},
21176 : { "SpatialReference_ImportFromEPSGA", _wrap_SpatialReference_ImportFromEPSGA, METH_VARARGS, "\n"
21177 : "SpatialReference_ImportFromEPSGA(self, arg) -> OGRErr\n"
21178 : "\n"
21179 : "\n"
21180 : "Initialize SRS based on EPSG geographic, projected or vertical CRS code.\n"
21181 : "\n"
21182 : "Since GDAL 3.0, this method is identical to :py:meth:`ImportFromEPSG`.\n"
21183 : "\n"
21184 : "See :cpp:func:`OGRSpatialReference::importFromEPSGA`.\n"
21185 : "\n"
21186 : "Parameters\n"
21187 : "----------\n"
21188 : "arg : int\n"
21189 : " EPSG code to search in PROJ database\n"
21190 : "\n"
21191 : "Returns\n"
21192 : "-------\n"
21193 : "int\n"
21194 : " :py:const:`OGRERR_NONE` on success, or an error code on failure\n"
21195 : "\n"
21196 : "\n"
21197 : ""},
21198 : { "SpatialReference_ImportFromPCI", _wrap_SpatialReference_ImportFromPCI, METH_VARARGS, "SpatialReference_ImportFromPCI(self, proj, units=\"METRE\", argin=0) -> OGRErr"},
21199 : { "SpatialReference_ImportFromUSGS", _wrap_SpatialReference_ImportFromUSGS, METH_VARARGS, "SpatialReference_ImportFromUSGS(self, proj_code, zone=0, argin=0, datum_code=0) -> OGRErr"},
21200 : { "SpatialReference_ImportFromXML", _wrap_SpatialReference_ImportFromXML, METH_VARARGS, "SpatialReference_ImportFromXML(self, xmlString) -> OGRErr"},
21201 : { "SpatialReference_ImportFromERM", _wrap_SpatialReference_ImportFromERM, METH_VARARGS, "SpatialReference_ImportFromERM(self, proj, datum, units) -> OGRErr"},
21202 : { "SpatialReference_ImportFromMICoordSys", _wrap_SpatialReference_ImportFromMICoordSys, METH_VARARGS, "SpatialReference_ImportFromMICoordSys(self, pszCoordSys) -> OGRErr"},
21203 : { "SpatialReference_ImportFromISISPVL", _wrap_SpatialReference_ImportFromISISPVL, METH_VARARGS, "SpatialReference_ImportFromISISPVL(self, pszPVLMappingGroup) -> OGRErr"},
21204 : { "SpatialReference_ImportFromOzi", _wrap_SpatialReference_ImportFromOzi, METH_VARARGS, "SpatialReference_ImportFromOzi(self, papszLines) -> OGRErr"},
21205 : { "SpatialReference_ImportFromCF1", _wrap_SpatialReference_ImportFromCF1, METH_VARARGS, "SpatialReference_ImportFromCF1(self, keyValues, units=None) -> OGRErr"},
21206 : { "SpatialReference_ExportToWkt", _wrap_SpatialReference_ExportToWkt, METH_VARARGS, "\n"
21207 : "SpatialReference_ExportToWkt(self, options=None) -> OGRErr\n"
21208 : "\n"
21209 : "\n"
21210 : "Export this SRS into WKT 1 format.\n"
21211 : "\n"
21212 : "See :cpp:func:`OGRSpatialReference::exportToWkt`.\n"
21213 : "\n"
21214 : "Returns\n"
21215 : "-------\n"
21216 : "str\n"
21217 : "\n"
21218 : "See Also\n"
21219 : "--------\n"
21220 : ":py:meth:`ExportToPrettyWkt`\n"
21221 : "\n"
21222 : "\n"
21223 : ""},
21224 : { "SpatialReference_ExportToPrettyWkt", _wrap_SpatialReference_ExportToPrettyWkt, METH_VARARGS, "\n"
21225 : "SpatialReference_ExportToPrettyWkt(self, simplify=0) -> OGRErr\n"
21226 : "\n"
21227 : "\n"
21228 : "Convert this SRS into a nicely formatted WKT 1 string for display to a\n"
21229 : "person.\n"
21230 : "\n"
21231 : "See :cpp:func:`OGRSpatialReference::exportToPrettyWkt`.\n"
21232 : "\n"
21233 : "Parameters\n"
21234 : "----------\n"
21235 : "simplify : bool, default = False\n"
21236 : "\n"
21237 : "Returns\n"
21238 : "-------\n"
21239 : "str\n"
21240 : "\n"
21241 : "\n"
21242 : ""},
21243 : { "SpatialReference_ExportToPROJJSON", _wrap_SpatialReference_ExportToPROJJSON, METH_VARARGS, "\n"
21244 : "SpatialReference_ExportToPROJJSON(self, options=None) -> OGRErr\n"
21245 : "\n"
21246 : "\n"
21247 : "Export this SRS in `PROJJSON <https://proj.org/en/latest/specifications/projjson.html>`_ format.\n"
21248 : "\n"
21249 : "See :cpp:func:`OGRSpatialReference::exportToPROJJSON`.\n"
21250 : "\n"
21251 : "Parameters\n"
21252 : "----------\n"
21253 : "options : list or dict\n"
21254 : " Options to control the format of the output. See :cpp:func:`OGRSpatialReference::exportToPROJJSON`.\n"
21255 : "\n"
21256 : "Returns\n"
21257 : "-------\n"
21258 : "str\n"
21259 : "\n"
21260 : "\n"
21261 : ""},
21262 : { "SpatialReference_ExportToProj4", _wrap_SpatialReference_ExportToProj4, METH_O, "\n"
21263 : "SpatialReference_ExportToProj4(self) -> OGRErr\n"
21264 : "\n"
21265 : "\n"
21266 : "Export this SRS to PROJ.4 legacy format.\n"
21267 : "\n"
21268 : ".. warning::\n"
21269 : "\n"
21270 : " Use of this function is discouraged. See :cpp:func:`OGRSpatialReference::exportToProj4`.\n"
21271 : "\n"
21272 : "Returns\n"
21273 : "-------\n"
21274 : "str\n"
21275 : "\n"
21276 : "\n"
21277 : ""},
21278 : { "SpatialReference_ExportToPCI", _wrap_SpatialReference_ExportToPCI, METH_O, "SpatialReference_ExportToPCI(self) -> OGRErr"},
21279 : { "SpatialReference_ExportToUSGS", _wrap_SpatialReference_ExportToUSGS, METH_O, "SpatialReference_ExportToUSGS(self) -> OGRErr"},
21280 : { "SpatialReference_ExportToERM", _wrap_SpatialReference_ExportToERM, METH_O, "SpatialReference_ExportToERM(self) -> OGRErr"},
21281 : { "SpatialReference_ExportToXML", _wrap_SpatialReference_ExportToXML, METH_VARARGS, "SpatialReference_ExportToXML(self, dialect=\"\") -> OGRErr"},
21282 : { "SpatialReference_ExportToMICoordSys", _wrap_SpatialReference_ExportToMICoordSys, METH_O, "SpatialReference_ExportToMICoordSys(self) -> OGRErr"},
21283 : { "SpatialReference_ExportToCF1", _wrap_SpatialReference_ExportToCF1, METH_VARARGS, "SpatialReference_ExportToCF1(self, options=None) -> char **"},
21284 : { "SpatialReference_ExportToCF1Units", _wrap_SpatialReference_ExportToCF1Units, METH_VARARGS, "SpatialReference_ExportToCF1Units(self, options=None) -> retStringAndCPLFree *"},
21285 : { "SpatialReference_CloneGeogCS", _wrap_SpatialReference_CloneGeogCS, METH_O, "SpatialReference_CloneGeogCS(self) -> SpatialReference"},
21286 : { "SpatialReference_Clone", _wrap_SpatialReference_Clone, METH_O, "SpatialReference_Clone(self) -> SpatialReference"},
21287 : { "SpatialReference_StripVertical", _wrap_SpatialReference_StripVertical, METH_O, "\n"
21288 : "SpatialReference_StripVertical(self) -> OGRErr\n"
21289 : "\n"
21290 : "\n"
21291 : "Convert a compound CRS into a horizontal CRS.\n"
21292 : "\n"
21293 : "See :cpp:func:`OGRSpatialReference::StripVertical`.\n"
21294 : "\n"
21295 : ".. versionadded:: 3.6\n"
21296 : "\n"
21297 : "Returns\n"
21298 : "-------\n"
21299 : "int\n"
21300 : " :py:const:`OGRERR_NONE` on success, or an error code on failure\n"
21301 : "\n"
21302 : ""},
21303 : { "SpatialReference_Validate", _wrap_SpatialReference_Validate, METH_O, "SpatialReference_Validate(self) -> OGRErr"},
21304 : { "SpatialReference_MorphToESRI", _wrap_SpatialReference_MorphToESRI, METH_O, "SpatialReference_MorphToESRI(self) -> OGRErr"},
21305 : { "SpatialReference_MorphFromESRI", _wrap_SpatialReference_MorphFromESRI, METH_O, "SpatialReference_MorphFromESRI(self) -> OGRErr"},
21306 : { "SpatialReference_ConvertToOtherProjection", _wrap_SpatialReference_ConvertToOtherProjection, METH_VARARGS, "SpatialReference_ConvertToOtherProjection(self, other_projection, options=None) -> SpatialReference"},
21307 : { "SpatialReference_PromoteTo3D", _wrap_SpatialReference_PromoteTo3D, METH_VARARGS, "SpatialReference_PromoteTo3D(self, name=None) -> OGRErr"},
21308 : { "SpatialReference_DemoteTo2D", _wrap_SpatialReference_DemoteTo2D, METH_VARARGS, "SpatialReference_DemoteTo2D(self, name=None) -> OGRErr"},
21309 : { "SpatialReference_swigregister", SpatialReference_swigregister, METH_O, NULL},
21310 : { "SpatialReference_swiginit", SpatialReference_swiginit, METH_VARARGS, NULL},
21311 : { "new_CoordinateTransformationOptions", _wrap_new_CoordinateTransformationOptions, METH_NOARGS, "new_CoordinateTransformationOptions() -> CoordinateTransformationOptions"},
21312 : { "delete_CoordinateTransformationOptions", _wrap_delete_CoordinateTransformationOptions, METH_O, "delete_CoordinateTransformationOptions(self)"},
21313 : { "CoordinateTransformationOptions_SetAreaOfInterest", _wrap_CoordinateTransformationOptions_SetAreaOfInterest, METH_VARARGS, "CoordinateTransformationOptions_SetAreaOfInterest(self, westLongitudeDeg, southLatitudeDeg, eastLongitudeDeg, northLatitudeDeg) -> bool"},
21314 : { "CoordinateTransformationOptions_SetOperation", _wrap_CoordinateTransformationOptions_SetOperation, METH_VARARGS, "CoordinateTransformationOptions_SetOperation(self, operation, inverseCT=False) -> bool"},
21315 : { "CoordinateTransformationOptions_SetDesiredAccuracy", _wrap_CoordinateTransformationOptions_SetDesiredAccuracy, METH_VARARGS, "CoordinateTransformationOptions_SetDesiredAccuracy(self, accuracy) -> bool"},
21316 : { "CoordinateTransformationOptions_SetBallparkAllowed", _wrap_CoordinateTransformationOptions_SetBallparkAllowed, METH_VARARGS, "CoordinateTransformationOptions_SetBallparkAllowed(self, allowBallpark) -> bool"},
21317 : { "CoordinateTransformationOptions_SetOnlyBest", _wrap_CoordinateTransformationOptions_SetOnlyBest, METH_VARARGS, "CoordinateTransformationOptions_SetOnlyBest(self, onlyBest) -> bool"},
21318 : { "CoordinateTransformationOptions_swigregister", CoordinateTransformationOptions_swigregister, METH_O, NULL},
21319 : { "CoordinateTransformationOptions_swiginit", CoordinateTransformationOptions_swiginit, METH_VARARGS, NULL},
21320 : { "new_CoordinateTransformation", _wrap_new_CoordinateTransformation, METH_VARARGS, "\n"
21321 : "CoordinateTransformation(src, dst)\n"
21322 : "new_CoordinateTransformation(src, dst, options) -> CoordinateTransformation\n"
21323 : "\n"
21324 : "Python proxy of an :cpp:class:`OGRCoordinateTransformation`.\n"
21325 : "\n"
21326 : ""},
21327 : { "delete_CoordinateTransformation", _wrap_delete_CoordinateTransformation, METH_O, "delete_CoordinateTransformation(self)"},
21328 : { "CoordinateTransformation_GetInverse", _wrap_CoordinateTransformation_GetInverse, METH_O, "CoordinateTransformation_GetInverse(self) -> CoordinateTransformation"},
21329 : { "CoordinateTransformation__TransformPoint3Double", _wrap_CoordinateTransformation__TransformPoint3Double, METH_VARARGS, "CoordinateTransformation__TransformPoint3Double(self, inout)"},
21330 : { "CoordinateTransformation__TransformPoint4Double", _wrap_CoordinateTransformation__TransformPoint4Double, METH_VARARGS, "CoordinateTransformation__TransformPoint4Double(self, inout)"},
21331 : { "CoordinateTransformation_TransformPoint", _wrap_CoordinateTransformation_TransformPoint, METH_VARARGS, "\n"
21332 : "CoordinateTransformation_TransformPoint(self, x, y, z=0.0)\n"
21333 : "CoordinateTransformation_TransformPoint(self, x, y, z, t)\n"
21334 : ""},
21335 : { "CoordinateTransformation_TransformPointWithErrorCode", _wrap_CoordinateTransformation_TransformPointWithErrorCode, METH_VARARGS, "\n"
21336 : "CoordinateTransformation_TransformPointWithErrorCode(self, x, y, z, t)\n"
21337 : "\n"
21338 : "\n"
21339 : "Variant of :py:meth:`TransformPoint` that provides an error code.\n"
21340 : "\n"
21341 : "See :cpp:func:`OCTTransformEx`.\n"
21342 : "\n"
21343 : "Parameters\n"
21344 : "----------\n"
21345 : "x : float\n"
21346 : "y : float\n"
21347 : "z : float\n"
21348 : "t : float\n"
21349 : "\n"
21350 : "Returns\n"
21351 : "-------\n"
21352 : "tuple\n"
21353 : " tuple of (x, y, z, t, error) values\n"
21354 : "\n"
21355 : "\n"
21356 : ""},
21357 : { "CoordinateTransformation_TransformPoints", _wrap_CoordinateTransformation_TransformPoints, METH_VARARGS, "\n"
21358 : "CoordinateTransformation_TransformPoints(self, nCount)\n"
21359 : "\n"
21360 : "\n"
21361 : "Transform multiple points.\n"
21362 : "\n"
21363 : "See :cpp:func:`OCTTransform`.\n"
21364 : "\n"
21365 : "Parameters\n"
21366 : "----------\n"
21367 : "arg\n"
21368 : " A list of tuples, or a 2xN, 3xN, or 4xN numpy array\n"
21369 : "\n"
21370 : "Returns\n"
21371 : "-------\n"
21372 : "list\n"
21373 : " A list of tuples of (x, y, z) or (x, y, z, t) values, depending on the input.\n"
21374 : "\n"
21375 : "Examples\n"
21376 : "--------\n"
21377 : ">>> wgs84 = osr.SpatialReference()\n"
21378 : ">>> wgs84.ImportFromEPSG(4326)\n"
21379 : "0\n"
21380 : ">>> vt_sp = osr.SpatialReference()\n"
21381 : ">>> vt_sp.ImportFromEPSG(5646)\n"
21382 : "0\n"
21383 : ">>> ct = osr.CoordinateTransformation(wgs84, vt_sp)\n"
21384 : ">>> # Transform two points from WGS84 lat/long to Vermont State Plane easting/northing\n"
21385 : ">>> ct.TransformPoints([(44.26, -72.58), (44.26, -72.59)])\n"
21386 : "[(1619458.11, 641509.19, 0.0), (1616838.29, 641511.90, 0.0)] # rtol: 1e-6\n"
21387 : "\n"
21388 : ">>> ct.TransformPoints(np.array([[44.26, -72.58], [44.26, -72.59]]))\n"
21389 : "[(1619458.11, 641509.19, 0.0), (1616838.29, 641511.90, 0.0)] # rtol: 1e-6\n"
21390 : "\n"
21391 : "\n"
21392 : ""},
21393 : { "CoordinateTransformation_TransformBounds", _wrap_CoordinateTransformation_TransformBounds, METH_VARARGS, "\n"
21394 : "CoordinateTransformation_TransformBounds(self, minx, miny, maxx, maxy, densify_pts)\n"
21395 : "\n"
21396 : "\n"
21397 : "Transform a boundary, densifying the edges to account for nonlinear\n"
21398 : "transformations along these edges.\n"
21399 : "\n"
21400 : "See :cpp:func:`OCTTransformBounds`.\n"
21401 : "\n"
21402 : "Parameters\n"
21403 : "----------\n"
21404 : "minx : float\n"
21405 : " Minimum bounding coordinate of the first axis in source CRS\n"
21406 : "miny : float\n"
21407 : " Minimum bounding coordinate of the second axis in source CRS\n"
21408 : "maxx : float\n"
21409 : " Maximum bounding coordinate of the first axis in source CRS\n"
21410 : "maxy : float\n"
21411 : " Maximum bounding coordinate of the second axis in source CRS\n"
21412 : "densify_pts : int\n"
21413 : " The number of points to use to densify the bounding polygon.\n"
21414 : " Recommended to use 21.\n"
21415 : "\n"
21416 : "Returns\n"
21417 : "-------\n"
21418 : "tuple\n"
21419 : " Transformed values of xmin, ymin, xmax, ymax\n"
21420 : "\n"
21421 : "Examples\n"
21422 : "--------\n"
21423 : ">>> wgs84 = osr.SpatialReference()\n"
21424 : ">>> wgs84.ImportFromEPSG(4326)\n"
21425 : "0\n"
21426 : ">>> vt_sp = osr.SpatialReference()\n"
21427 : ">>> vt_sp.ImportFromEPSG(5646)\n"
21428 : "0\n"
21429 : ">>> ct = osr.CoordinateTransformation(wgs84, vt_sp)\n"
21430 : ">>> ct.TransformBounds(44.2,-72.5, 44.3, -72.4, 21)\n"
21431 : "(1640416.67, 619626.43, 1666641.49, 656096.76) # rtol: 1e-6\n"
21432 : "\n"
21433 : ""},
21434 : { "CoordinateTransformation_swigregister", CoordinateTransformation_swigregister, METH_O, NULL},
21435 : { "CoordinateTransformation_swiginit", CoordinateTransformation_swiginit, METH_VARARGS, NULL},
21436 : { "CreateCoordinateTransformation", _wrap_CreateCoordinateTransformation, METH_VARARGS, "\n"
21437 : "CreateCoordinateTransformation(src, dst, options=None) -> CoordinateTransformation\n"
21438 : "\n"
21439 : "\n"
21440 : "Create a :py:class:`CoordinateTransformation` using a set of :py:class:`CoordinateTransformationOptions`.\n"
21441 : "\n"
21442 : "See :cpp:func:`OCTNewCoordinateTransformationEx`.\n"
21443 : "\n"
21444 : "Parameters\n"
21445 : "----------\n"
21446 : "src : SpatialReference\n"
21447 : " source spatial reference system\n"
21448 : "dst : SpatialReference\n"
21449 : " target spatial reference system\n"
21450 : "options : CoordinateTransformationOptions\n"
21451 : "\n"
21452 : "Returns\n"
21453 : "-------\n"
21454 : "CoordinateTransformation\n"
21455 : "\n"
21456 : ""},
21457 : { "CRSInfo_auth_name_get", _wrap_CRSInfo_auth_name_get, METH_O, "CRSInfo_auth_name_get(self) -> char *"},
21458 : { "CRSInfo_code_get", _wrap_CRSInfo_code_get, METH_O, "CRSInfo_code_get(self) -> char *"},
21459 : { "CRSInfo_name_get", _wrap_CRSInfo_name_get, METH_O, "CRSInfo_name_get(self) -> char *"},
21460 : { "CRSInfo_type_get", _wrap_CRSInfo_type_get, METH_O, "CRSInfo_type_get(self) -> OSRCRSType"},
21461 : { "CRSInfo_deprecated_get", _wrap_CRSInfo_deprecated_get, METH_O, "CRSInfo_deprecated_get(self) -> bool"},
21462 : { "CRSInfo_bbox_valid_get", _wrap_CRSInfo_bbox_valid_get, METH_O, "CRSInfo_bbox_valid_get(self) -> bool"},
21463 : { "CRSInfo_west_lon_degree_get", _wrap_CRSInfo_west_lon_degree_get, METH_O, "CRSInfo_west_lon_degree_get(self) -> double"},
21464 : { "CRSInfo_south_lat_degree_get", _wrap_CRSInfo_south_lat_degree_get, METH_O, "CRSInfo_south_lat_degree_get(self) -> double"},
21465 : { "CRSInfo_east_lon_degree_get", _wrap_CRSInfo_east_lon_degree_get, METH_O, "CRSInfo_east_lon_degree_get(self) -> double"},
21466 : { "CRSInfo_north_lat_degree_get", _wrap_CRSInfo_north_lat_degree_get, METH_O, "CRSInfo_north_lat_degree_get(self) -> double"},
21467 : { "CRSInfo_area_name_get", _wrap_CRSInfo_area_name_get, METH_O, "CRSInfo_area_name_get(self) -> char *"},
21468 : { "CRSInfo_projection_method_get", _wrap_CRSInfo_projection_method_get, METH_O, "CRSInfo_projection_method_get(self) -> char *"},
21469 : { "CRSInfo_celestial_body_name_get", _wrap_CRSInfo_celestial_body_name_get, METH_O, "CRSInfo_celestial_body_name_get(self) -> char *"},
21470 : { "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"},
21471 : { "delete_CRSInfo", _wrap_delete_CRSInfo, METH_O, "delete_CRSInfo(self)"},
21472 : { "CRSInfo_swigregister", CRSInfo_swigregister, METH_O, NULL},
21473 : { "CRSInfo_swiginit", CRSInfo_swiginit, METH_VARARGS, NULL},
21474 : { "OSRCRSInfo_auth_name_get", _wrap_OSRCRSInfo_auth_name_get, METH_O, "OSRCRSInfo_auth_name_get(crsInfo) -> char const *"},
21475 : { "OSRCRSInfo_code_get", _wrap_OSRCRSInfo_code_get, METH_O, "OSRCRSInfo_code_get(crsInfo) -> char const *"},
21476 : { "OSRCRSInfo_name_get", _wrap_OSRCRSInfo_name_get, METH_O, "OSRCRSInfo_name_get(crsInfo) -> char const *"},
21477 : { "OSRCRSInfo_type_get", _wrap_OSRCRSInfo_type_get, METH_O, "OSRCRSInfo_type_get(crsInfo) -> OSRCRSType"},
21478 : { "OSRCRSInfo_deprecated_get", _wrap_OSRCRSInfo_deprecated_get, METH_O, "OSRCRSInfo_deprecated_get(crsInfo) -> bool"},
21479 : { "OSRCRSInfo_bbox_valid_get", _wrap_OSRCRSInfo_bbox_valid_get, METH_O, "OSRCRSInfo_bbox_valid_get(crsInfo) -> bool"},
21480 : { "OSRCRSInfo_west_lon_degree_get", _wrap_OSRCRSInfo_west_lon_degree_get, METH_O, "OSRCRSInfo_west_lon_degree_get(crsInfo) -> double"},
21481 : { "OSRCRSInfo_south_lat_degree_get", _wrap_OSRCRSInfo_south_lat_degree_get, METH_O, "OSRCRSInfo_south_lat_degree_get(crsInfo) -> double"},
21482 : { "OSRCRSInfo_east_lon_degree_get", _wrap_OSRCRSInfo_east_lon_degree_get, METH_O, "OSRCRSInfo_east_lon_degree_get(crsInfo) -> double"},
21483 : { "OSRCRSInfo_north_lat_degree_get", _wrap_OSRCRSInfo_north_lat_degree_get, METH_O, "OSRCRSInfo_north_lat_degree_get(crsInfo) -> double"},
21484 : { "OSRCRSInfo_area_name_get", _wrap_OSRCRSInfo_area_name_get, METH_O, "OSRCRSInfo_area_name_get(crsInfo) -> char const *"},
21485 : { "OSRCRSInfo_projection_method_get", _wrap_OSRCRSInfo_projection_method_get, METH_O, "OSRCRSInfo_projection_method_get(crsInfo) -> char const *"},
21486 : { "OSRCRSInfo_celestial_body_name_get", _wrap_OSRCRSInfo_celestial_body_name_get, METH_O, "OSRCRSInfo_celestial_body_name_get(crsInfo) -> char const *"},
21487 : { "GetAuthorityListFromDatabase", _wrap_GetAuthorityListFromDatabase, METH_NOARGS, "GetAuthorityListFromDatabase() -> char **"},
21488 : { "GetCRSInfoListFromDatabase", _wrap_GetCRSInfoListFromDatabase, METH_O, "GetCRSInfoListFromDatabase(authName)"},
21489 : { "SetPROJSearchPath", _wrap_SetPROJSearchPath, METH_O, "SetPROJSearchPath(utf8_string)"},
21490 : { "SetPROJSearchPaths", _wrap_SetPROJSearchPaths, METH_O, "SetPROJSearchPaths(paths)"},
21491 : { "GetPROJSearchPaths", _wrap_GetPROJSearchPaths, METH_NOARGS, "GetPROJSearchPaths() -> char **"},
21492 : { "GetPROJVersionMajor", _wrap_GetPROJVersionMajor, METH_NOARGS, "GetPROJVersionMajor() -> int"},
21493 : { "GetPROJVersionMinor", _wrap_GetPROJVersionMinor, METH_NOARGS, "GetPROJVersionMinor() -> int"},
21494 : { "GetPROJVersionMicro", _wrap_GetPROJVersionMicro, METH_NOARGS, "GetPROJVersionMicro() -> int"},
21495 : { "GetPROJEnableNetwork", _wrap_GetPROJEnableNetwork, METH_NOARGS, "GetPROJEnableNetwork() -> bool"},
21496 : { "SetPROJEnableNetwork", _wrap_SetPROJEnableNetwork, METH_O, "SetPROJEnableNetwork(enabled)"},
21497 : { "SetPROJAuxDbPath", _wrap_SetPROJAuxDbPath, METH_O, "SetPROJAuxDbPath(utf8_string)"},
21498 : { "SetPROJAuxDbPaths", _wrap_SetPROJAuxDbPaths, METH_O, "SetPROJAuxDbPaths(paths)"},
21499 : { "GetPROJAuxDbPaths", _wrap_GetPROJAuxDbPaths, METH_NOARGS, "GetPROJAuxDbPaths() -> char **"},
21500 : { NULL, NULL, 0, NULL }
21501 : };
21502 :
21503 : static PyMethodDef SwigMethods_proxydocs[] = {
21504 : { NULL, NULL, 0, NULL }
21505 : };
21506 :
21507 :
21508 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
21509 :
21510 : static swig_type_info _swigt__p_OGRCoordinateTransformationOptions = {"_p_OGRCoordinateTransformationOptions", "OGRCoordinateTransformationOptions *", 0, 0, (void*)0, 0};
21511 : static swig_type_info _swigt__p_OSRAreaOfUse = {"_p_OSRAreaOfUse", "OSRAreaOfUse *", 0, 0, (void*)0, 0};
21512 : static swig_type_info _swigt__p_OSRCRSInfo = {"_p_OSRCRSInfo", "OSRCRSInfo *", 0, 0, (void*)0, 0};
21513 : static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0};
21514 : static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
21515 : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
21516 : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
21517 : static swig_type_info _swigt__p_int = {"_p_int", "OSRAxisMappingStrategy *|int *|OGRAxisOrientation *|OGRErr *", 0, 0, (void*)0, 0};
21518 : static swig_type_info _swigt__p_long = {"_p_long", "long *", 0, 0, (void*)0, 0};
21519 : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
21520 : static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
21521 : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
21522 : static swig_type_info _swigt__p_p_p_OSRCRSInfo = {"_p_p_p_OSRCRSInfo", "OSRCRSInfo ***", 0, 0, (void*)0, 0};
21523 : static swig_type_info _swigt__p_p_p_OSRSpatialReferenceShadow = {"_p_p_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow ***", 0, 0, (void*)0, 0};
21524 :
21525 : static swig_type_info *swig_type_initial[] = {
21526 : &_swigt__p_OGRCoordinateTransformationOptions,
21527 : &_swigt__p_OSRAreaOfUse,
21528 : &_swigt__p_OSRCRSInfo,
21529 : &_swigt__p_OSRCoordinateTransformationShadow,
21530 : &_swigt__p_OSRSpatialReferenceShadow,
21531 : &_swigt__p_char,
21532 : &_swigt__p_double,
21533 : &_swigt__p_int,
21534 : &_swigt__p_long,
21535 : &_swigt__p_p_char,
21536 : &_swigt__p_p_double,
21537 : &_swigt__p_p_int,
21538 : &_swigt__p_p_p_OSRCRSInfo,
21539 : &_swigt__p_p_p_OSRSpatialReferenceShadow,
21540 : };
21541 :
21542 : static swig_cast_info _swigc__p_OGRCoordinateTransformationOptions[] = { {&_swigt__p_OGRCoordinateTransformationOptions, 0, 0, 0},{0, 0, 0, 0}};
21543 : static swig_cast_info _swigc__p_OSRAreaOfUse[] = { {&_swigt__p_OSRAreaOfUse, 0, 0, 0},{0, 0, 0, 0}};
21544 : static swig_cast_info _swigc__p_OSRCRSInfo[] = { {&_swigt__p_OSRCRSInfo, 0, 0, 0},{0, 0, 0, 0}};
21545 : static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = { {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
21546 : static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = { {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
21547 : static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
21548 : static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
21549 : static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
21550 : static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
21551 : static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
21552 : static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
21553 : static swig_cast_info _swigc__p_p_int[] = { {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
21554 : static swig_cast_info _swigc__p_p_p_OSRCRSInfo[] = { {&_swigt__p_p_p_OSRCRSInfo, 0, 0, 0},{0, 0, 0, 0}};
21555 : static swig_cast_info _swigc__p_p_p_OSRSpatialReferenceShadow[] = { {&_swigt__p_p_p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
21556 :
21557 : static swig_cast_info *swig_cast_initial[] = {
21558 : _swigc__p_OGRCoordinateTransformationOptions,
21559 : _swigc__p_OSRAreaOfUse,
21560 : _swigc__p_OSRCRSInfo,
21561 : _swigc__p_OSRCoordinateTransformationShadow,
21562 : _swigc__p_OSRSpatialReferenceShadow,
21563 : _swigc__p_char,
21564 : _swigc__p_double,
21565 : _swigc__p_int,
21566 : _swigc__p_long,
21567 : _swigc__p_p_char,
21568 : _swigc__p_p_double,
21569 : _swigc__p_p_int,
21570 : _swigc__p_p_p_OSRCRSInfo,
21571 : _swigc__p_p_p_OSRSpatialReferenceShadow,
21572 : };
21573 :
21574 :
21575 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
21576 :
21577 : static swig_const_info swig_const_table[] = {
21578 : {0, 0, 0, 0.0, 0, 0}};
21579 :
21580 : #ifdef __cplusplus
21581 : }
21582 : #endif
21583 : /* -----------------------------------------------------------------------------
21584 : * Type initialization:
21585 : * This problem is tough by the requirement that no dynamic
21586 : * memory is used. Also, since swig_type_info structures store pointers to
21587 : * swig_cast_info structures and swig_cast_info structures store pointers back
21588 : * to swig_type_info structures, we need some lookup code at initialization.
21589 : * The idea is that swig generates all the structures that are needed.
21590 : * The runtime then collects these partially filled structures.
21591 : * The SWIG_InitializeModule function takes these initial arrays out of
21592 : * swig_module, and does all the lookup, filling in the swig_module.types
21593 : * array with the correct data and linking the correct swig_cast_info
21594 : * structures together.
21595 : *
21596 : * The generated swig_type_info structures are assigned statically to an initial
21597 : * array. We just loop through that array, and handle each type individually.
21598 : * First we lookup if this type has been already loaded, and if so, use the
21599 : * loaded structure instead of the generated one. Then we have to fill in the
21600 : * cast linked list. The cast data is initially stored in something like a
21601 : * two-dimensional array. Each row corresponds to a type (there are the same
21602 : * number of rows as there are in the swig_type_initial array). Each entry in
21603 : * a column is one of the swig_cast_info structures for that type.
21604 : * The cast_initial array is actually an array of arrays, because each row has
21605 : * a variable number of columns. So to actually build the cast linked list,
21606 : * we find the array of casts associated with the type, and loop through it
21607 : * adding the casts to the list. The one last trick we need to do is making
21608 : * sure the type pointer in the swig_cast_info struct is correct.
21609 : *
21610 : * First off, we lookup the cast->type name to see if it is already loaded.
21611 : * There are three cases to handle:
21612 : * 1) If the cast->type has already been loaded AND the type we are adding
21613 : * casting info to has not been loaded (it is in this module), THEN we
21614 : * replace the cast->type pointer with the type pointer that has already
21615 : * been loaded.
21616 : * 2) If BOTH types (the one we are adding casting info to, and the
21617 : * cast->type) are loaded, THEN the cast info has already been loaded by
21618 : * the previous module so we just ignore it.
21619 : * 3) Finally, if cast->type has not already been loaded, then we add that
21620 : * swig_cast_info to the linked list (because the cast->type) pointer will
21621 : * be correct.
21622 : * ----------------------------------------------------------------------------- */
21623 :
21624 : #ifdef __cplusplus
21625 : extern "C" {
21626 : #if 0
21627 : } /* c-mode */
21628 : #endif
21629 : #endif
21630 :
21631 : #if 0
21632 : #define SWIGRUNTIME_DEBUG
21633 : #endif
21634 :
21635 :
21636 : SWIGRUNTIME void
21637 : SWIG_InitializeModule(void *clientdata) {
21638 : size_t i;
21639 : swig_module_info *module_head, *iter;
21640 : int init;
21641 :
21642 : /* check to see if the circular list has been setup, if not, set it up */
21643 : if (swig_module.next==0) {
21644 : /* Initialize the swig_module */
21645 : swig_module.type_initial = swig_type_initial;
21646 : swig_module.cast_initial = swig_cast_initial;
21647 : swig_module.next = &swig_module;
21648 : init = 1;
21649 : } else {
21650 : init = 0;
21651 : }
21652 :
21653 : /* Try and load any already created modules */
21654 : module_head = SWIG_GetModule(clientdata);
21655 : if (!module_head) {
21656 : /* This is the first module loaded for this interpreter */
21657 : /* so set the swig module into the interpreter */
21658 : SWIG_SetModule(clientdata, &swig_module);
21659 : } else {
21660 : /* the interpreter has loaded a SWIG module, but has it loaded this one? */
21661 : iter=module_head;
21662 : do {
21663 : if (iter==&swig_module) {
21664 : /* Our module is already in the list, so there's nothing more to do. */
21665 : return;
21666 : }
21667 : iter=iter->next;
21668 : } while (iter!= module_head);
21669 :
21670 : /* otherwise we must add our module into the list */
21671 : swig_module.next = module_head->next;
21672 : module_head->next = &swig_module;
21673 : }
21674 :
21675 : /* When multiple interpreters are used, a module could have already been initialized in
21676 : a different interpreter, but not yet have a pointer in this interpreter.
21677 : In this case, we do not want to continue adding types... everything should be
21678 : set up already */
21679 : if (init == 0) return;
21680 :
21681 : /* Now work on filling in swig_module.types */
21682 : #ifdef SWIGRUNTIME_DEBUG
21683 : printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
21684 : #endif
21685 : for (i = 0; i < swig_module.size; ++i) {
21686 : swig_type_info *type = 0;
21687 : swig_type_info *ret;
21688 : swig_cast_info *cast;
21689 :
21690 : #ifdef SWIGRUNTIME_DEBUG
21691 : printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
21692 : #endif
21693 :
21694 : /* if there is another module already loaded */
21695 : if (swig_module.next != &swig_module) {
21696 : type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
21697 : }
21698 : if (type) {
21699 : /* Overwrite clientdata field */
21700 : #ifdef SWIGRUNTIME_DEBUG
21701 : printf("SWIG_InitializeModule: found type %s\n", type->name);
21702 : #endif
21703 : if (swig_module.type_initial[i]->clientdata) {
21704 : type->clientdata = swig_module.type_initial[i]->clientdata;
21705 : #ifdef SWIGRUNTIME_DEBUG
21706 : printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
21707 : #endif
21708 : }
21709 : } else {
21710 : type = swig_module.type_initial[i];
21711 : }
21712 :
21713 : /* Insert casting types */
21714 : cast = swig_module.cast_initial[i];
21715 : while (cast->type) {
21716 : /* Don't need to add information already in the list */
21717 : ret = 0;
21718 : #ifdef SWIGRUNTIME_DEBUG
21719 : printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
21720 : #endif
21721 : if (swig_module.next != &swig_module) {
21722 : ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
21723 : #ifdef SWIGRUNTIME_DEBUG
21724 : if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
21725 : #endif
21726 : }
21727 : if (ret) {
21728 : if (type == swig_module.type_initial[i]) {
21729 : #ifdef SWIGRUNTIME_DEBUG
21730 : printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
21731 : #endif
21732 : cast->type = ret;
21733 : ret = 0;
21734 : } else {
21735 : /* Check for casting already in the list */
21736 : swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
21737 : #ifdef SWIGRUNTIME_DEBUG
21738 : if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
21739 : #endif
21740 : if (!ocast) ret = 0;
21741 : }
21742 : }
21743 :
21744 : if (!ret) {
21745 : #ifdef SWIGRUNTIME_DEBUG
21746 : printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
21747 : #endif
21748 : if (type->cast) {
21749 : type->cast->prev = cast;
21750 : cast->next = type->cast;
21751 : }
21752 : type->cast = cast;
21753 : }
21754 : cast++;
21755 : }
21756 : /* Set entry in modules->types array equal to the type */
21757 : swig_module.types[i] = type;
21758 : }
21759 : swig_module.types[i] = 0;
21760 :
21761 : #ifdef SWIGRUNTIME_DEBUG
21762 : printf("**** SWIG_InitializeModule: Cast List ******\n");
21763 : for (i = 0; i < swig_module.size; ++i) {
21764 : int j = 0;
21765 : swig_cast_info *cast = swig_module.cast_initial[i];
21766 : printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
21767 : while (cast->type) {
21768 : printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
21769 : cast++;
21770 : ++j;
21771 : }
21772 : printf("---- Total casts: %d\n",j);
21773 : }
21774 : printf("**** SWIG_InitializeModule: Cast List ******\n");
21775 : #endif
21776 : }
21777 :
21778 : /* This function will propagate the clientdata field of type to
21779 : * any new swig_type_info structures that have been added into the list
21780 : * of equivalent types. It is like calling
21781 : * SWIG_TypeClientData(type, clientdata) a second time.
21782 : */
21783 : SWIGRUNTIME void
21784 : SWIG_PropagateClientData(void) {
21785 : size_t i;
21786 : swig_cast_info *equiv;
21787 : static int init_run = 0;
21788 :
21789 : if (init_run) return;
21790 : init_run = 1;
21791 :
21792 : for (i = 0; i < swig_module.size; i++) {
21793 : if (swig_module.types[i]->clientdata) {
21794 : equiv = swig_module.types[i]->cast;
21795 : while (equiv) {
21796 : if (!equiv->converter) {
21797 : if (equiv->type && !equiv->type->clientdata)
21798 : SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
21799 : }
21800 : equiv = equiv->next;
21801 : }
21802 : }
21803 : }
21804 : }
21805 :
21806 : #ifdef __cplusplus
21807 : #if 0
21808 : {
21809 : /* c-mode */
21810 : #endif
21811 : }
21812 : #endif
21813 :
21814 :
21815 :
21816 : #ifdef __cplusplus
21817 : extern "C" {
21818 : #endif
21819 :
21820 : /* Python-specific SWIG API */
21821 : #define SWIG_newvarlink() SWIG_Python_newvarlink()
21822 : #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
21823 : #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
21824 :
21825 : /* -----------------------------------------------------------------------------
21826 : * global variable support code.
21827 : * ----------------------------------------------------------------------------- */
21828 :
21829 : typedef struct swig_globalvar {
21830 : char *name; /* Name of global variable */
21831 : PyObject *(*get_attr)(void); /* Return the current value */
21832 : int (*set_attr)(PyObject *); /* Set the value */
21833 : struct swig_globalvar *next;
21834 : } swig_globalvar;
21835 :
21836 : typedef struct swig_varlinkobject {
21837 : PyObject_HEAD
21838 : swig_globalvar *vars;
21839 : } swig_varlinkobject;
21840 :
21841 : SWIGINTERN PyObject *
21842 : swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
21843 : #if PY_VERSION_HEX >= 0x03000000
21844 : return PyUnicode_InternFromString("<Swig global variables>");
21845 : #else
21846 : return PyString_FromString("<Swig global variables>");
21847 : #endif
21848 : }
21849 :
21850 : SWIGINTERN PyObject *
21851 : swig_varlink_str(swig_varlinkobject *v) {
21852 : #if PY_VERSION_HEX >= 0x03000000
21853 : PyObject *str = PyUnicode_InternFromString("(");
21854 : PyObject *tail;
21855 : PyObject *joined;
21856 : swig_globalvar *var;
21857 : for (var = v->vars; var; var=var->next) {
21858 : tail = PyUnicode_FromString(var->name);
21859 : joined = PyUnicode_Concat(str, tail);
21860 : Py_DecRef(str);
21861 : Py_DecRef(tail);
21862 : str = joined;
21863 : if (var->next) {
21864 : tail = PyUnicode_InternFromString(", ");
21865 : joined = PyUnicode_Concat(str, tail);
21866 : Py_DecRef(str);
21867 : Py_DecRef(tail);
21868 : str = joined;
21869 : }
21870 : }
21871 : tail = PyUnicode_InternFromString(")");
21872 : joined = PyUnicode_Concat(str, tail);
21873 : Py_DecRef(str);
21874 : Py_DecRef(tail);
21875 : str = joined;
21876 : #else
21877 : PyObject *str = PyString_FromString("(");
21878 : swig_globalvar *var;
21879 : for (var = v->vars; var; var=var->next) {
21880 : PyString_ConcatAndDel(&str,PyString_FromString(var->name));
21881 : if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
21882 : }
21883 : PyString_ConcatAndDel(&str,PyString_FromString(")"));
21884 : #endif
21885 : return str;
21886 : }
21887 :
21888 : SWIGINTERN void
21889 : swig_varlink_dealloc(swig_varlinkobject *v) {
21890 : swig_globalvar *var = v->vars;
21891 : while (var) {
21892 : swig_globalvar *n = var->next;
21893 : free(var->name);
21894 : free(var);
21895 : var = n;
21896 : }
21897 : }
21898 :
21899 : SWIGINTERN PyObject *
21900 : swig_varlink_getattr(swig_varlinkobject *v, char *n) {
21901 : PyObject *res = NULL;
21902 : swig_globalvar *var = v->vars;
21903 : while (var) {
21904 : if (strcmp(var->name,n) == 0) {
21905 : res = (*var->get_attr)();
21906 : break;
21907 : }
21908 : var = var->next;
21909 : }
21910 : if (res == NULL && !PyErr_Occurred()) {
21911 : PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
21912 : }
21913 : return res;
21914 : }
21915 :
21916 : SWIGINTERN int
21917 : swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
21918 : int res = 1;
21919 : swig_globalvar *var = v->vars;
21920 : while (var) {
21921 : if (strcmp(var->name,n) == 0) {
21922 : res = (*var->set_attr)(p);
21923 : break;
21924 : }
21925 : var = var->next;
21926 : }
21927 : if (res == 1 && !PyErr_Occurred()) {
21928 : PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
21929 : }
21930 : return res;
21931 : }
21932 :
21933 : SWIGINTERN PyTypeObject*
21934 : swig_varlink_type(void) {
21935 : static char varlink__doc__[] = "Swig var link object";
21936 : static PyTypeObject varlink_type;
21937 : static int type_init = 0;
21938 : if (!type_init) {
21939 : const PyTypeObject tmp = {
21940 : #if PY_VERSION_HEX >= 0x03000000
21941 : PyVarObject_HEAD_INIT(NULL, 0)
21942 : #else
21943 : PyObject_HEAD_INIT(NULL)
21944 : 0, /* ob_size */
21945 : #endif
21946 : "swigvarlink", /* tp_name */
21947 : sizeof(swig_varlinkobject), /* tp_basicsize */
21948 : 0, /* tp_itemsize */
21949 : (destructor) swig_varlink_dealloc, /* tp_dealloc */
21950 : 0, /* tp_print */
21951 : (getattrfunc) swig_varlink_getattr, /* tp_getattr */
21952 : (setattrfunc) swig_varlink_setattr, /* tp_setattr */
21953 : 0, /* tp_compare */
21954 : (reprfunc) swig_varlink_repr, /* tp_repr */
21955 : 0, /* tp_as_number */
21956 : 0, /* tp_as_sequence */
21957 : 0, /* tp_as_mapping */
21958 : 0, /* tp_hash */
21959 : 0, /* tp_call */
21960 : (reprfunc) swig_varlink_str, /* tp_str */
21961 : 0, /* tp_getattro */
21962 : 0, /* tp_setattro */
21963 : 0, /* tp_as_buffer */
21964 : 0, /* tp_flags */
21965 : varlink__doc__, /* tp_doc */
21966 : 0, /* tp_traverse */
21967 : 0, /* tp_clear */
21968 : 0, /* tp_richcompare */
21969 : 0, /* tp_weaklistoffset */
21970 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
21971 : 0, /* tp_del */
21972 : 0, /* tp_version_tag */
21973 : #if PY_VERSION_HEX >= 0x03040000
21974 : 0, /* tp_finalize */
21975 : #endif
21976 : #ifdef COUNT_ALLOCS
21977 : 0, /* tp_allocs */
21978 : 0, /* tp_frees */
21979 : 0, /* tp_maxalloc */
21980 : 0, /* tp_prev */
21981 : 0 /* tp_next */
21982 : #endif
21983 : };
21984 : varlink_type = tmp;
21985 : type_init = 1;
21986 : if (PyType_Ready(&varlink_type) < 0)
21987 : return NULL;
21988 : }
21989 : return &varlink_type;
21990 : }
21991 :
21992 : /* Create a variable linking object for use later */
21993 : SWIGINTERN PyObject *
21994 : SWIG_Python_newvarlink(void) {
21995 : swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
21996 : if (result) {
21997 : result->vars = 0;
21998 : }
21999 : return ((PyObject*) result);
22000 : }
22001 :
22002 : SWIGINTERN void
22003 : SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
22004 : swig_varlinkobject *v = (swig_varlinkobject *) p;
22005 : swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
22006 : if (gv) {
22007 : size_t size = strlen(name)+1;
22008 : gv->name = (char *)malloc(size);
22009 : if (gv->name) {
22010 : memcpy(gv->name, name, size);
22011 : gv->get_attr = get_attr;
22012 : gv->set_attr = set_attr;
22013 : gv->next = v->vars;
22014 : }
22015 : }
22016 : v->vars = gv;
22017 : }
22018 :
22019 : SWIGINTERN PyObject *
22020 : SWIG_globals(void) {
22021 : static PyObject *globals = 0;
22022 : if (!globals) {
22023 : globals = SWIG_newvarlink();
22024 : }
22025 : return globals;
22026 : }
22027 :
22028 : /* -----------------------------------------------------------------------------
22029 : * constants/methods manipulation
22030 : * ----------------------------------------------------------------------------- */
22031 :
22032 : /* Install Constants */
22033 : SWIGINTERN void
22034 285 : SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
22035 285 : PyObject *obj = 0;
22036 285 : size_t i;
22037 285 : for (i = 0; constants[i].type; ++i) {
22038 0 : switch(constants[i].type) {
22039 0 : case SWIG_PY_POINTER:
22040 0 : obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
22041 0 : break;
22042 0 : case SWIG_PY_BINARY:
22043 0 : obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
22044 : break;
22045 : default:
22046 : obj = 0;
22047 : break;
22048 : }
22049 0 : if (obj) {
22050 0 : PyDict_SetItemString(d, constants[i].name, obj);
22051 0 : Py_DECREF(obj);
22052 : }
22053 : }
22054 285 : }
22055 :
22056 : /* -----------------------------------------------------------------------------*/
22057 : /* Fix SwigMethods to carry the callback ptrs when needed */
22058 : /* -----------------------------------------------------------------------------*/
22059 :
22060 : SWIGINTERN void
22061 285 : SWIG_Python_FixMethods(PyMethodDef *methods,
22062 : swig_const_info *const_table,
22063 : swig_type_info **types,
22064 : swig_type_info **types_initial) {
22065 285 : size_t i;
22066 67260 : for (i = 0; methods[i].ml_name; ++i) {
22067 66975 : const char *c = methods[i].ml_doc;
22068 66975 : if (!c) continue;
22069 63840 : c = strstr(c, "swig_ptr: ");
22070 63840 : if (c) {
22071 0 : int j;
22072 0 : swig_const_info *ci = 0;
22073 0 : const char *name = c + 10;
22074 0 : for (j = 0; const_table[j].type; ++j) {
22075 0 : if (strncmp(const_table[j].name, name,
22076 : strlen(const_table[j].name)) == 0) {
22077 : ci = &(const_table[j]);
22078 : break;
22079 : }
22080 : }
22081 0 : if (ci) {
22082 66975 : void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
22083 0 : if (ptr) {
22084 0 : size_t shift = (ci->ptype) - types;
22085 0 : swig_type_info *ty = types_initial[shift];
22086 0 : size_t ldoc = (c - methods[i].ml_doc);
22087 0 : size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
22088 0 : char *ndoc = (char*)malloc(ldoc + lptr + 10);
22089 0 : if (ndoc) {
22090 0 : char *buff = ndoc;
22091 0 : memcpy(buff, methods[i].ml_doc, ldoc);
22092 0 : buff += ldoc;
22093 0 : memcpy(buff, "swig_ptr: ", 10);
22094 0 : buff += 10;
22095 0 : SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
22096 0 : methods[i].ml_doc = ndoc;
22097 : }
22098 : }
22099 : }
22100 : }
22101 : }
22102 285 : }
22103 :
22104 : /* -----------------------------------------------------------------------------
22105 : * Method creation and docstring support functions
22106 : * ----------------------------------------------------------------------------- */
22107 :
22108 : /* -----------------------------------------------------------------------------
22109 : * Function to find the method definition with the correct docstring for the
22110 : * proxy module as opposed to the low-level API
22111 : * ----------------------------------------------------------------------------- */
22112 :
22113 0 : SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
22114 : /* Find the function in the modified method table */
22115 0 : size_t offset = 0;
22116 0 : int found = 0;
22117 0 : while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
22118 0 : if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
22119 : found = 1;
22120 : break;
22121 : }
22122 0 : offset++;
22123 : }
22124 : /* Use the copy with the modified docstring if available */
22125 0 : return found ? &SwigMethods_proxydocs[offset] : NULL;
22126 : }
22127 :
22128 : /* -----------------------------------------------------------------------------
22129 : * Wrapper of PyInstanceMethod_New() used in Python 3
22130 : * It is exported to the generated module, used for -fastproxy
22131 : * ----------------------------------------------------------------------------- */
22132 :
22133 0 : SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
22134 0 : if (PyCFunction_Check(func)) {
22135 0 : PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
22136 0 : PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
22137 0 : if (ml)
22138 0 : func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
22139 : }
22140 : #if PY_VERSION_HEX >= 0x03000000
22141 0 : return PyInstanceMethod_New(func);
22142 : #else
22143 : return PyMethod_New(func, NULL, NULL);
22144 : #endif
22145 : }
22146 :
22147 : /* -----------------------------------------------------------------------------
22148 : * Wrapper of PyStaticMethod_New()
22149 : * It is exported to the generated module, used for -fastproxy
22150 : * ----------------------------------------------------------------------------- */
22151 :
22152 : SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
22153 : if (PyCFunction_Check(func)) {
22154 : PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
22155 : PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
22156 : if (ml)
22157 : func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
22158 : }
22159 : return PyStaticMethod_New(func);
22160 : }
22161 :
22162 : #ifdef __cplusplus
22163 : }
22164 : #endif
22165 :
22166 : /* -----------------------------------------------------------------------------*
22167 : * Partial Init method
22168 : * -----------------------------------------------------------------------------*/
22169 :
22170 : #ifdef __cplusplus
22171 : extern "C"
22172 : #endif
22173 :
22174 : SWIGEXPORT
22175 : #if PY_VERSION_HEX >= 0x03000000
22176 : PyObject*
22177 : #else
22178 : void
22179 : #endif
22180 285 : SWIG_init(void) {
22181 285 : PyObject *m, *d, *md, *globals;
22182 :
22183 : #if PY_VERSION_HEX >= 0x03000000
22184 285 : static struct PyModuleDef SWIG_module = {
22185 : PyModuleDef_HEAD_INIT,
22186 : SWIG_name,
22187 : NULL,
22188 : -1,
22189 : SwigMethods,
22190 : NULL,
22191 : NULL,
22192 : NULL,
22193 : NULL
22194 : };
22195 : #endif
22196 :
22197 : #if defined(SWIGPYTHON_BUILTIN)
22198 : static SwigPyClientData SwigPyObject_clientdata = {
22199 : 0, 0, 0, 0, 0, 0, 0
22200 : };
22201 : static PyGetSetDef this_getset_def = {
22202 : (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
22203 : };
22204 : static SwigPyGetSet thisown_getset_closure = {
22205 : SwigPyObject_own,
22206 : SwigPyObject_own
22207 : };
22208 : static PyGetSetDef thisown_getset_def = {
22209 : (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
22210 : };
22211 : PyTypeObject *builtin_pytype;
22212 : int builtin_base_count;
22213 : swig_type_info *builtin_basetype;
22214 : PyObject *tuple;
22215 : PyGetSetDescrObject *static_getset;
22216 : PyTypeObject *metatype;
22217 : PyTypeObject *swigpyobject;
22218 : SwigPyClientData *cd;
22219 : PyObject *public_interface, *public_symbol;
22220 : PyObject *this_descr;
22221 : PyObject *thisown_descr;
22222 : PyObject *self = 0;
22223 : int i;
22224 :
22225 : (void)builtin_pytype;
22226 : (void)builtin_base_count;
22227 : (void)builtin_basetype;
22228 : (void)tuple;
22229 : (void)static_getset;
22230 : (void)self;
22231 :
22232 : /* Metaclass is used to implement static member variables */
22233 : metatype = SwigPyObjectType();
22234 : assert(metatype);
22235 : #endif
22236 :
22237 285 : (void)globals;
22238 :
22239 : /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
22240 285 : SWIG_This();
22241 285 : SWIG_Python_TypeCache();
22242 285 : SwigPyPacked_type();
22243 : #ifndef SWIGPYTHON_BUILTIN
22244 285 : SwigPyObject_type();
22245 : #endif
22246 :
22247 : /* Fix SwigMethods to carry the callback ptrs when needed */
22248 285 : SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
22249 :
22250 : #if PY_VERSION_HEX >= 0x03000000
22251 285 : m = PyModule_Create(&SWIG_module);
22252 : #else
22253 : m = Py_InitModule(SWIG_name, SwigMethods);
22254 : #endif
22255 :
22256 285 : md = d = PyModule_GetDict(m);
22257 285 : (void)md;
22258 :
22259 285 : SWIG_InitializeModule(0);
22260 :
22261 : #ifdef SWIGPYTHON_BUILTIN
22262 : swigpyobject = SwigPyObject_TypeOnce();
22263 :
22264 : SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
22265 : assert(SwigPyObject_stype);
22266 : cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
22267 : if (!cd) {
22268 : SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
22269 : SwigPyObject_clientdata.pytype = swigpyobject;
22270 : } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
22271 : PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
22272 : # if PY_VERSION_HEX >= 0x03000000
22273 : return NULL;
22274 : # else
22275 : return;
22276 : # endif
22277 : }
22278 :
22279 : /* All objects have a 'this' attribute */
22280 : this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
22281 : (void)this_descr;
22282 :
22283 : /* All objects have a 'thisown' attribute */
22284 : thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
22285 : (void)thisown_descr;
22286 :
22287 : public_interface = PyList_New(0);
22288 : public_symbol = 0;
22289 : (void)public_symbol;
22290 :
22291 : PyDict_SetItemString(md, "__all__", public_interface);
22292 : Py_DECREF(public_interface);
22293 : for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
22294 : SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
22295 : for (i = 0; swig_const_table[i].name != 0; ++i)
22296 : SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
22297 : #endif
22298 :
22299 285 : SWIG_InstallConstants(d,swig_const_table);
22300 :
22301 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\"]]"));
22302 285 : SWIG_Python_SetConstant(d, "SRS_PT_ALBERS_CONIC_EQUAL_AREA",SWIG_FromCharPtr("Albers_Conic_Equal_Area"));
22303 285 : SWIG_Python_SetConstant(d, "SRS_PT_AZIMUTHAL_EQUIDISTANT",SWIG_FromCharPtr("Azimuthal_Equidistant"));
22304 285 : SWIG_Python_SetConstant(d, "SRS_PT_CASSINI_SOLDNER",SWIG_FromCharPtr("Cassini_Soldner"));
22305 285 : SWIG_Python_SetConstant(d, "SRS_PT_CYLINDRICAL_EQUAL_AREA",SWIG_FromCharPtr("Cylindrical_Equal_Area"));
22306 285 : SWIG_Python_SetConstant(d, "SRS_PT_BONNE",SWIG_FromCharPtr("Bonne"));
22307 285 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_I",SWIG_FromCharPtr("Eckert_I"));
22308 285 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_II",SWIG_FromCharPtr("Eckert_II"));
22309 285 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_III",SWIG_FromCharPtr("Eckert_III"));
22310 285 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_IV",SWIG_FromCharPtr("Eckert_IV"));
22311 285 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_V",SWIG_FromCharPtr("Eckert_V"));
22312 285 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_VI",SWIG_FromCharPtr("Eckert_VI"));
22313 285 : SWIG_Python_SetConstant(d, "SRS_PT_EQUIDISTANT_CONIC",SWIG_FromCharPtr("Equidistant_Conic"));
22314 285 : SWIG_Python_SetConstant(d, "SRS_PT_EQUIRECTANGULAR",SWIG_FromCharPtr("Equirectangular"));
22315 285 : SWIG_Python_SetConstant(d, "SRS_PT_GALL_STEREOGRAPHIC",SWIG_FromCharPtr("Gall_Stereographic"));
22316 285 : SWIG_Python_SetConstant(d, "SRS_PT_GAUSSSCHREIBERTMERCATOR",SWIG_FromCharPtr("Gauss_Schreiber_Transverse_Mercator"));
22317 285 : SWIG_Python_SetConstant(d, "SRS_PT_GEOSTATIONARY_SATELLITE",SWIG_FromCharPtr("Geostationary_Satellite"));
22318 285 : SWIG_Python_SetConstant(d, "SRS_PT_GOODE_HOMOLOSINE",SWIG_FromCharPtr("Goode_Homolosine"));
22319 285 : SWIG_Python_SetConstant(d, "SRS_PT_IGH",SWIG_FromCharPtr("Interrupted_Goode_Homolosine"));
22320 285 : SWIG_Python_SetConstant(d, "SRS_PT_GNOMONIC",SWIG_FromCharPtr("Gnomonic"));
22321 285 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR_AZIMUTH_CENTER",SWIG_FromCharPtr("Hotine_Oblique_Mercator_Azimuth_Center"));
22322 285 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR",SWIG_FromCharPtr("Hotine_Oblique_Mercator"));
22323 285 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN",SWIG_FromCharPtr("Hotine_Oblique_Mercator_Two_Point_Natural_Origin"));
22324 285 : SWIG_Python_SetConstant(d, "SRS_PT_LABORDE_OBLIQUE_MERCATOR",SWIG_FromCharPtr("Laborde_Oblique_Mercator"));
22325 285 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP",SWIG_FromCharPtr("Lambert_Conformal_Conic_1SP"));
22326 285 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP",SWIG_FromCharPtr("Lambert_Conformal_Conic_2SP"));
22327 285 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM",SWIG_FromCharPtr("Lambert_Conformal_Conic_2SP_Belgium"));
22328 285 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA",SWIG_FromCharPtr("Lambert_Azimuthal_Equal_Area"));
22329 285 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_1SP",SWIG_FromCharPtr("Mercator_1SP"));
22330 285 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_2SP",SWIG_FromCharPtr("Mercator_2SP"));
22331 285 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_AUXILIARY_SPHERE",SWIG_FromCharPtr("Mercator_Auxiliary_Sphere"));
22332 285 : SWIG_Python_SetConstant(d, "SRS_PT_MILLER_CYLINDRICAL",SWIG_FromCharPtr("Miller_Cylindrical"));
22333 285 : SWIG_Python_SetConstant(d, "SRS_PT_MOLLWEIDE",SWIG_FromCharPtr("Mollweide"));
22334 285 : SWIG_Python_SetConstant(d, "SRS_PT_NEW_ZEALAND_MAP_GRID",SWIG_FromCharPtr("New_Zealand_Map_Grid"));
22335 285 : SWIG_Python_SetConstant(d, "SRS_PT_OBLIQUE_STEREOGRAPHIC",SWIG_FromCharPtr("Oblique_Stereographic"));
22336 285 : SWIG_Python_SetConstant(d, "SRS_PT_ORTHOGRAPHIC",SWIG_FromCharPtr("Orthographic"));
22337 285 : SWIG_Python_SetConstant(d, "SRS_PT_POLAR_STEREOGRAPHIC",SWIG_FromCharPtr("Polar_Stereographic"));
22338 285 : SWIG_Python_SetConstant(d, "SRS_PT_POLYCONIC",SWIG_FromCharPtr("Polyconic"));
22339 285 : SWIG_Python_SetConstant(d, "SRS_PT_ROBINSON",SWIG_FromCharPtr("Robinson"));
22340 285 : SWIG_Python_SetConstant(d, "SRS_PT_SINUSOIDAL",SWIG_FromCharPtr("Sinusoidal"));
22341 285 : SWIG_Python_SetConstant(d, "SRS_PT_STEREOGRAPHIC",SWIG_FromCharPtr("Stereographic"));
22342 285 : SWIG_Python_SetConstant(d, "SRS_PT_SWISS_OBLIQUE_CYLINDRICAL",SWIG_FromCharPtr("Swiss_Oblique_Cylindrical"));
22343 285 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR",SWIG_FromCharPtr("Transverse_Mercator"));
22344 285 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED",SWIG_FromCharPtr("Transverse_Mercator_South_Orientated"));
22345 285 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_21",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_21"));
22346 285 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_22",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_22"));
22347 285 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_23",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_23"));
22348 285 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_24",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_24"));
22349 285 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_25",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_25"));
22350 285 : SWIG_Python_SetConstant(d, "SRS_PT_TUNISIA_MINING_GRID",SWIG_FromCharPtr("Tunisia_Mining_Grid"));
22351 285 : SWIG_Python_SetConstant(d, "SRS_PT_TWO_POINT_EQUIDISTANT",SWIG_FromCharPtr("Two_Point_Equidistant"));
22352 285 : SWIG_Python_SetConstant(d, "SRS_PT_VANDERGRINTEN",SWIG_FromCharPtr("VanDerGrinten"));
22353 285 : SWIG_Python_SetConstant(d, "SRS_PT_KROVAK",SWIG_FromCharPtr("Krovak"));
22354 285 : SWIG_Python_SetConstant(d, "SRS_PT_IMW_POLYCONIC",SWIG_FromCharPtr("International_Map_of_the_World_Polyconic"));
22355 285 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_I",SWIG_FromCharPtr("Wagner_I"));
22356 285 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_II",SWIG_FromCharPtr("Wagner_II"));
22357 285 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_III",SWIG_FromCharPtr("Wagner_III"));
22358 285 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_IV",SWIG_FromCharPtr("Wagner_IV"));
22359 285 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_V",SWIG_FromCharPtr("Wagner_V"));
22360 285 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_VI",SWIG_FromCharPtr("Wagner_VI"));
22361 285 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_VII",SWIG_FromCharPtr("Wagner_VII"));
22362 285 : SWIG_Python_SetConstant(d, "SRS_PT_QSC",SWIG_FromCharPtr("Quadrilateralized_Spherical_Cube"));
22363 285 : SWIG_Python_SetConstant(d, "SRS_PT_AITOFF",SWIG_FromCharPtr("Aitoff"));
22364 285 : SWIG_Python_SetConstant(d, "SRS_PT_WINKEL_I",SWIG_FromCharPtr("Winkel_I"));
22365 285 : SWIG_Python_SetConstant(d, "SRS_PT_WINKEL_II",SWIG_FromCharPtr("Winkel_II"));
22366 285 : SWIG_Python_SetConstant(d, "SRS_PT_WINKEL_TRIPEL",SWIG_FromCharPtr("Winkel_Tripel"));
22367 285 : SWIG_Python_SetConstant(d, "SRS_PT_CRASTER_PARABOLIC",SWIG_FromCharPtr("Craster_Parabolic"));
22368 285 : SWIG_Python_SetConstant(d, "SRS_PT_LOXIMUTHAL",SWIG_FromCharPtr("Loximuthal"));
22369 285 : SWIG_Python_SetConstant(d, "SRS_PT_QUARTIC_AUTHALIC",SWIG_FromCharPtr("Quartic_Authalic"));
22370 285 : SWIG_Python_SetConstant(d, "SRS_PT_SCH",SWIG_FromCharPtr("Spherical_Cross_Track_Height"));
22371 285 : SWIG_Python_SetConstant(d, "SRS_PP_CENTRAL_MERIDIAN",SWIG_FromCharPtr("central_meridian"));
22372 285 : SWIG_Python_SetConstant(d, "SRS_PP_SCALE_FACTOR",SWIG_FromCharPtr("scale_factor"));
22373 285 : SWIG_Python_SetConstant(d, "SRS_PP_STANDARD_PARALLEL_1",SWIG_FromCharPtr("standard_parallel_1"));
22374 285 : SWIG_Python_SetConstant(d, "SRS_PP_STANDARD_PARALLEL_2",SWIG_FromCharPtr("standard_parallel_2"));
22375 285 : SWIG_Python_SetConstant(d, "SRS_PP_PSEUDO_STD_PARALLEL_1",SWIG_FromCharPtr("pseudo_standard_parallel_1"));
22376 285 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_CENTER",SWIG_FromCharPtr("longitude_of_center"));
22377 285 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_CENTER",SWIG_FromCharPtr("latitude_of_center"));
22378 285 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_ORIGIN",SWIG_FromCharPtr("longitude_of_origin"));
22379 285 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_ORIGIN",SWIG_FromCharPtr("latitude_of_origin"));
22380 285 : SWIG_Python_SetConstant(d, "SRS_PP_FALSE_EASTING",SWIG_FromCharPtr("false_easting"));
22381 285 : SWIG_Python_SetConstant(d, "SRS_PP_FALSE_NORTHING",SWIG_FromCharPtr("false_northing"));
22382 285 : SWIG_Python_SetConstant(d, "SRS_PP_AZIMUTH",SWIG_FromCharPtr("azimuth"));
22383 285 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_1",SWIG_FromCharPtr("longitude_of_point_1"));
22384 285 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_1",SWIG_FromCharPtr("latitude_of_point_1"));
22385 285 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_2",SWIG_FromCharPtr("longitude_of_point_2"));
22386 285 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_2",SWIG_FromCharPtr("latitude_of_point_2"));
22387 285 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_3",SWIG_FromCharPtr("longitude_of_point_3"));
22388 285 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_3",SWIG_FromCharPtr("latitude_of_point_3"));
22389 285 : SWIG_Python_SetConstant(d, "SRS_PP_RECTIFIED_GRID_ANGLE",SWIG_FromCharPtr("rectified_grid_angle"));
22390 285 : SWIG_Python_SetConstant(d, "SRS_PP_LANDSAT_NUMBER",SWIG_FromCharPtr("landsat_number"));
22391 285 : SWIG_Python_SetConstant(d, "SRS_PP_PATH_NUMBER",SWIG_FromCharPtr("path_number"));
22392 285 : SWIG_Python_SetConstant(d, "SRS_PP_PERSPECTIVE_POINT_HEIGHT",SWIG_FromCharPtr("perspective_point_height"));
22393 285 : SWIG_Python_SetConstant(d, "SRS_PP_SATELLITE_HEIGHT",SWIG_FromCharPtr("satellite_height"));
22394 285 : SWIG_Python_SetConstant(d, "SRS_PP_FIPSZONE",SWIG_FromCharPtr("fipszone"));
22395 285 : SWIG_Python_SetConstant(d, "SRS_PP_ZONE",SWIG_FromCharPtr("zone"));
22396 285 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_1ST_POINT",SWIG_FromCharPtr("Latitude_Of_1st_Point"));
22397 285 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_1ST_POINT",SWIG_FromCharPtr("Longitude_Of_1st_Point"));
22398 285 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_2ND_POINT",SWIG_FromCharPtr("Latitude_Of_2nd_Point"));
22399 285 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_2ND_POINT",SWIG_FromCharPtr("Longitude_Of_2nd_Point"));
22400 285 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_LATITUDE",SWIG_FromCharPtr("peg_point_latitude"));
22401 285 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_LONGITUDE",SWIG_FromCharPtr("peg_point_longitude"));
22402 285 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_HEADING",SWIG_FromCharPtr("peg_point_heading"));
22403 285 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_HEIGHT",SWIG_FromCharPtr("peg_point_height"));
22404 285 : SWIG_Python_SetConstant(d, "SRS_UL_METER",SWIG_FromCharPtr("Meter"));
22405 285 : SWIG_Python_SetConstant(d, "SRS_UL_FOOT",SWIG_FromCharPtr("Foot (International)"));
22406 285 : SWIG_Python_SetConstant(d, "SRS_UL_FOOT_CONV",SWIG_FromCharPtr("0.3048"));
22407 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_FOOT",SWIG_FromCharPtr("Foot_US"));
22408 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_FOOT_CONV",SWIG_FromCharPtr("0.3048006096012192"));
22409 285 : SWIG_Python_SetConstant(d, "SRS_UL_NAUTICAL_MILE",SWIG_FromCharPtr("Nautical Mile"));
22410 285 : SWIG_Python_SetConstant(d, "SRS_UL_NAUTICAL_MILE_CONV",SWIG_FromCharPtr("1852.0"));
22411 285 : SWIG_Python_SetConstant(d, "SRS_UL_LINK",SWIG_FromCharPtr("Link"));
22412 285 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_CONV",SWIG_FromCharPtr("0.20116684023368047"));
22413 285 : SWIG_Python_SetConstant(d, "SRS_UL_CHAIN",SWIG_FromCharPtr("Chain"));
22414 285 : SWIG_Python_SetConstant(d, "SRS_UL_CHAIN_CONV",SWIG_FromCharPtr("20.116684023368047"));
22415 285 : SWIG_Python_SetConstant(d, "SRS_UL_ROD",SWIG_FromCharPtr("Rod"));
22416 285 : SWIG_Python_SetConstant(d, "SRS_UL_ROD_CONV",SWIG_FromCharPtr("5.02921005842012"));
22417 285 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_Clarke",SWIG_FromCharPtr("Link_Clarke"));
22418 285 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_Clarke_CONV",SWIG_FromCharPtr("0.2011661949"));
22419 285 : SWIG_Python_SetConstant(d, "SRS_UL_KILOMETER",SWIG_FromCharPtr("Kilometer"));
22420 285 : SWIG_Python_SetConstant(d, "SRS_UL_KILOMETER_CONV",SWIG_FromCharPtr("1000."));
22421 285 : SWIG_Python_SetConstant(d, "SRS_UL_DECIMETER",SWIG_FromCharPtr("Decimeter"));
22422 285 : SWIG_Python_SetConstant(d, "SRS_UL_DECIMETER_CONV",SWIG_FromCharPtr("0.1"));
22423 285 : SWIG_Python_SetConstant(d, "SRS_UL_CENTIMETER",SWIG_FromCharPtr("Centimeter"));
22424 285 : SWIG_Python_SetConstant(d, "SRS_UL_CENTIMETER_CONV",SWIG_FromCharPtr("0.01"));
22425 285 : SWIG_Python_SetConstant(d, "SRS_UL_MILLIMETER",SWIG_FromCharPtr("Millimeter"));
22426 285 : SWIG_Python_SetConstant(d, "SRS_UL_MILLIMETER_CONV",SWIG_FromCharPtr("0.001"));
22427 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_NAUT_MILE",SWIG_FromCharPtr("Nautical_Mile_International"));
22428 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_NAUT_MILE_CONV",SWIG_FromCharPtr("1852.0"));
22429 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_INCH",SWIG_FromCharPtr("Inch_International"));
22430 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_INCH_CONV",SWIG_FromCharPtr("0.0254"));
22431 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FOOT",SWIG_FromCharPtr("Foot_International"));
22432 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FOOT_CONV",SWIG_FromCharPtr("0.3048"));
22433 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_YARD",SWIG_FromCharPtr("Yard_International"));
22434 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_YARD_CONV",SWIG_FromCharPtr("0.9144"));
22435 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_STAT_MILE",SWIG_FromCharPtr("Statute_Mile_International"));
22436 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_STAT_MILE_CONV",SWIG_FromCharPtr("1609.344"));
22437 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FATHOM",SWIG_FromCharPtr("Fathom_International"));
22438 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FATHOM_CONV",SWIG_FromCharPtr("1.8288"));
22439 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_CHAIN",SWIG_FromCharPtr("Chain_International"));
22440 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_CHAIN_CONV",SWIG_FromCharPtr("20.1168"));
22441 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_LINK",SWIG_FromCharPtr("Link_International"));
22442 285 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_LINK_CONV",SWIG_FromCharPtr("0.201168"));
22443 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_INCH",SWIG_FromCharPtr("Inch_US_Surveyor"));
22444 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_INCH_CONV",SWIG_FromCharPtr("0.025400050800101603"));
22445 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_YARD",SWIG_FromCharPtr("Yard_US_Surveyor"));
22446 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_YARD_CONV",SWIG_FromCharPtr("0.914401828803658"));
22447 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_CHAIN",SWIG_FromCharPtr("Chain_US_Surveyor"));
22448 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_CHAIN_CONV",SWIG_FromCharPtr("20.11684023368047"));
22449 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_STAT_MILE",SWIG_FromCharPtr("Statute_Mile_US_Surveyor"));
22450 285 : SWIG_Python_SetConstant(d, "SRS_UL_US_STAT_MILE_CONV",SWIG_FromCharPtr("1609.347218694437"));
22451 285 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_YARD",SWIG_FromCharPtr("Yard_Indian"));
22452 285 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_YARD_CONV",SWIG_FromCharPtr("0.91439523"));
22453 285 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_FOOT",SWIG_FromCharPtr("Foot_Indian"));
22454 285 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_FOOT_CONV",SWIG_FromCharPtr("0.30479841"));
22455 285 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_CHAIN",SWIG_FromCharPtr("Chain_Indian"));
22456 285 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_CHAIN_CONV",SWIG_FromCharPtr("20.11669506"));
22457 285 : SWIG_Python_SetConstant(d, "SRS_UA_DEGREE",SWIG_FromCharPtr("degree"));
22458 285 : SWIG_Python_SetConstant(d, "SRS_UA_DEGREE_CONV",SWIG_FromCharPtr("0.0174532925199433"));
22459 285 : SWIG_Python_SetConstant(d, "SRS_UA_RADIAN",SWIG_FromCharPtr("radian"));
22460 285 : SWIG_Python_SetConstant(d, "SRS_PM_GREENWICH",SWIG_FromCharPtr("Greenwich"));
22461 285 : SWIG_Python_SetConstant(d, "SRS_DN_NAD27",SWIG_FromCharPtr("North_American_Datum_1927"));
22462 285 : SWIG_Python_SetConstant(d, "SRS_DN_NAD83",SWIG_FromCharPtr("North_American_Datum_1983"));
22463 285 : SWIG_Python_SetConstant(d, "SRS_DN_WGS72",SWIG_FromCharPtr("WGS_1972"));
22464 285 : SWIG_Python_SetConstant(d, "SRS_DN_WGS84",SWIG_FromCharPtr("WGS_1984"));
22465 285 : SWIG_Python_SetConstant(d, "SRS_WGS84_SEMIMAJOR",SWIG_From_double(static_cast< double >(6378137.0)));
22466 285 : SWIG_Python_SetConstant(d, "SRS_WGS84_INVFLATTENING",SWIG_From_double(static_cast< double >(298.257223563)));
22467 285 : SWIG_Python_SetConstant(d, "OAO_Other",SWIG_From_int(static_cast< int >(0)));
22468 285 : SWIG_Python_SetConstant(d, "OAO_North",SWIG_From_int(static_cast< int >(1)));
22469 285 : SWIG_Python_SetConstant(d, "OAO_South",SWIG_From_int(static_cast< int >(2)));
22470 285 : SWIG_Python_SetConstant(d, "OAO_East",SWIG_From_int(static_cast< int >(3)));
22471 285 : SWIG_Python_SetConstant(d, "OAO_West",SWIG_From_int(static_cast< int >(4)));
22472 285 : SWIG_Python_SetConstant(d, "OAO_Up",SWIG_From_int(static_cast< int >(5)));
22473 285 : SWIG_Python_SetConstant(d, "OAO_Down",SWIG_From_int(static_cast< int >(6)));
22474 285 : SWIG_Python_SetConstant(d, "OAMS_TRADITIONAL_GIS_ORDER",SWIG_From_int(static_cast< int >(0)));
22475 285 : SWIG_Python_SetConstant(d, "OAMS_AUTHORITY_COMPLIANT",SWIG_From_int(static_cast< int >(1)));
22476 285 : SWIG_Python_SetConstant(d, "OAMS_CUSTOM",SWIG_From_int(static_cast< int >(2)));
22477 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP",SWIG_From_int(static_cast< int >(1024)));
22478 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_WRONG_SYNTAX",SWIG_From_int(static_cast< int >(1025)));
22479 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_MISSING_ARG",SWIG_From_int(static_cast< int >(1026)));
22480 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE",SWIG_From_int(static_cast< int >(1027)));
22481 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_MUTUALLY_EXCLUSIVE_ARGS",SWIG_From_int(static_cast< int >(1028)));
22482 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID",SWIG_From_int(static_cast< int >(1029)));
22483 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM",SWIG_From_int(static_cast< int >(2048)));
22484 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_INVALID_COORD",SWIG_From_int(static_cast< int >(2049)));
22485 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_OUTSIDE_PROJECTION_DOMAIN",SWIG_From_int(static_cast< int >(2050)));
22486 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_NO_OPERATION",SWIG_From_int(static_cast< int >(2051)));
22487 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_OUTSIDE_GRID",SWIG_From_int(static_cast< int >(2052)));
22488 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_GRID_AT_NODATA",SWIG_From_int(static_cast< int >(2053)));
22489 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER",SWIG_From_int(static_cast< int >(4096)));
22490 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER_API_MISUSE",SWIG_From_int(static_cast< int >(4097)));
22491 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER_NO_INVERSE_OP",SWIG_From_int(static_cast< int >(4098)));
22492 285 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER_NETWORK_ERROR",SWIG_From_int(static_cast< int >(4099)));
22493 :
22494 : // Will be turned on for GDAL 4.0
22495 : // UseExceptions();
22496 :
22497 285 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_GEOGRAPHIC_2D",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_GEOGRAPHIC_2D)));
22498 285 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_GEOGRAPHIC_3D",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_GEOGRAPHIC_3D)));
22499 285 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_GEOCENTRIC",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_GEOCENTRIC)));
22500 285 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_PROJECTED",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_PROJECTED)));
22501 285 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_VERTICAL",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_VERTICAL)));
22502 285 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_COMPOUND",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_COMPOUND)));
22503 285 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_OTHER",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_OTHER)));
22504 :
22505 : /* Initialize threading */
22506 285 : SWIG_PYTHON_INITIALIZE_THREADS;
22507 : #if PY_VERSION_HEX >= 0x03000000
22508 285 : return m;
22509 : #else
22510 : return;
22511 : #endif
22512 : }
22513 :
|