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 2207 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
449 2207 : if (ty) {
450 2207 : swig_cast_info *iter = ty->cast;
451 2207 : while (iter) {
452 2207 : if (strcmp(iter->type->name, c) == 0) {
453 2207 : 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 1380 : SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
571 1380 : SWIG_TypeClientData(ti, clientdata);
572 1380 : 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 7758 : SWIG_MangledTypeQueryModule(swig_module_info *start,
585 : swig_module_info *end,
586 : const char *name) {
587 7758 : swig_module_info *iter = start;
588 14346 : do {
589 14346 : if (iter->size) {
590 14346 : size_t l = 0;
591 14346 : size_t r = iter->size - 1;
592 63560 : do {
593 : /* since l+r >= 0, we can (>> 1) instead (/ 2) */
594 63560 : size_t i = (l + r) >> 1;
595 63560 : const char *iname = iter->types[i]->name;
596 63560 : if (iname) {
597 63560 : int compare = strcmp(name, iname);
598 63560 : if (compare == 0) {
599 4444 : return iter->types[i];
600 59116 : } else if (compare < 0) {
601 23738 : if (i) {
602 22094 : r = i - 1;
603 : } else {
604 : break;
605 : }
606 35378 : } else if (compare > 0) {
607 35378 : l = i + 1;
608 : }
609 : } else {
610 : break; /* should never happen */
611 : }
612 57472 : } while (l <= r);
613 : }
614 9902 : iter = iter->next;
615 9902 : } 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 30 : 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 30 : swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
634 30 : 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 306 : SWIG_Python_str_FromChar(const char *c)
839 : {
840 : #if PY_VERSION_HEX >= 0x03000000
841 306 : 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 54924 : SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1173 54924 : PyDict_SetItemString(d, name, obj);
1174 54924 : Py_DECREF(obj);
1175 54924 : }
1176 :
1177 : #endif
1178 :
1179 : /* Append a value to the result obj */
1180 :
1181 : SWIGINTERN PyObject*
1182 1967 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1183 1967 : if (!result) {
1184 : result = obj;
1185 251 : } else if (result == Py_None) {
1186 231 : 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 1967 : return result;
1198 : }
1199 :
1200 : /* Unpack the argument tuple */
1201 :
1202 : SWIGINTERN Py_ssize_t
1203 23219 : SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1204 : {
1205 23219 : if (!args) {
1206 14673 : 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 8546 : if (!PyTuple_Check(args)) {
1215 1380 : if (min <= 1 && max >= 1) {
1216 1380 : Py_ssize_t i;
1217 1380 : objs[0] = args;
1218 1380 : 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 7166 : Py_ssize_t l = PyTuple_GET_SIZE(args);
1227 7166 : 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 7166 : } 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 20928 : for (i = 0; i < l; ++i) {
1238 13762 : objs[i] = PyTuple_GET_ITEM(args, i);
1239 : }
1240 9009 : for (; l < max; ++l) {
1241 1843 : objs[l] = 0;
1242 : }
1243 7166 : 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 40073 : SWIG_Py_Void(void)
1282 : {
1283 40073 : PyObject *none = Py_None;
1284 0 : Py_INCREF(none);
1285 4028 : 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 1380 : SwigPyClientData_New(PyObject* obj)
1320 : {
1321 1380 : if (!obj) {
1322 : return 0;
1323 : } else {
1324 1380 : SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1325 : /* the klass element */
1326 1380 : data->klass = obj;
1327 1380 : Py_INCREF(data->klass);
1328 : /* the newraw method and newargs arguments used to create a new raw instance */
1329 1380 : if (PyClass_Check(obj)) {
1330 1380 : data->newraw = 0;
1331 1380 : data->newargs = obj;
1332 1380 : 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 1380 : data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
1346 1380 : if (PyErr_Occurred()) {
1347 0 : PyErr_Clear();
1348 0 : data->destroy = 0;
1349 : }
1350 1380 : if (data->destroy) {
1351 1380 : int flags;
1352 1380 : Py_INCREF(data->destroy);
1353 1380 : flags = PyCFunction_GET_FLAGS(data->destroy);
1354 1380 : data->delargs = !(flags & (METH_O));
1355 : } else {
1356 0 : data->delargs = 0;
1357 : }
1358 1380 : data->implicitconv = 0;
1359 1380 : data->pytype = 0;
1360 1380 : 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 78370 : SwigPyObject_type(void) {
1506 78370 : static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1507 78370 : 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 9267 : SwigPyObject_dealloc(PyObject *v)
1529 : {
1530 9267 : SwigPyObject *sobj = (SwigPyObject *) v;
1531 9267 : PyObject *next = sobj->next;
1532 9267 : if (sobj->own == SWIG_POINTER_OWN) {
1533 9267 : swig_type_info *ty = sobj->ty;
1534 9267 : SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1535 9267 : PyObject *destroy = data ? data->destroy : 0;
1536 9267 : if (destroy) {
1537 : /* destroy is always a VARARGS method */
1538 9267 : 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 9267 : PyObject *type = NULL, *value = NULL, *traceback = NULL;
1548 9267 : PyErr_Fetch(&type, &value, &traceback);
1549 :
1550 9267 : 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 9267 : PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1557 9267 : PyObject *mself = PyCFunction_GET_SELF(destroy);
1558 9267 : res = ((*meth)(mself, v));
1559 : }
1560 9267 : if (!res)
1561 0 : PyErr_WriteUnraisable(destroy);
1562 :
1563 9267 : PyErr_Restore(type, value, traceback);
1564 :
1565 18534 : 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 9267 : Py_XDECREF(next);
1575 9267 : PyObject_DEL(v);
1576 9267 : }
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 276 : SwigPyObject_TypeOnce(void) {
1652 276 : static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1653 :
1654 276 : 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 276 : static PyTypeObject swigpyobject_type;
1699 276 : static int type_init = 0;
1700 276 : if (!type_init) {
1701 276 : 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 276 : swigpyobject_type = tmp;
1770 276 : type_init = 1;
1771 276 : if (PyType_Ready(&swigpyobject_type) < 0)
1772 0 : return NULL;
1773 : }
1774 : return &swigpyobject_type;
1775 : }
1776 :
1777 : SWIGRUNTIME PyObject *
1778 9284 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1779 : {
1780 9284 : SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1781 9284 : if (sobj) {
1782 9284 : sobj->ptr = ptr;
1783 9284 : sobj->ty = ty;
1784 9284 : sobj->own = own;
1785 9284 : sobj->next = 0;
1786 : }
1787 9284 : 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 276 : SwigPyPacked_type(void) {
1836 276 : static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
1837 276 : 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 276 : SwigPyPacked_TypeOnce(void) {
1858 276 : static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1859 276 : static PyTypeObject swigpypacked_type;
1860 276 : static int type_init = 0;
1861 276 : if (!type_init) {
1862 276 : 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 276 : swigpypacked_type = tmp;
1931 276 : type_init = 1;
1932 276 : 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 28267 : SWIG_This(void)
1978 : {
1979 28267 : if (Swig_This_global == NULL)
1980 276 : Swig_This_global = SWIG_Python_str_FromChar("this");
1981 28267 : 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 36699 : SWIG_Python_GetSwigThis(PyObject *pyobj)
1993 : {
1994 36701 : PyObject *obj;
1995 :
1996 36701 : 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 25409 : 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 25409 : obj = PyObject_GetAttr(pyobj,SWIG_This());
2039 25409 : if (obj) {
2040 22825 : Py_DECREF(obj);
2041 : } else {
2042 2584 : if (PyErr_Occurred()) PyErr_Clear();
2043 2584 : return 0;
2044 : }
2045 : #endif
2046 22825 : 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 34719 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2074 34719 : int res;
2075 34719 : SwigPyObject *sobj;
2076 34719 : int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2077 :
2078 34719 : if (!obj)
2079 : return SWIG_ERROR;
2080 34719 : if (obj == Py_None && !implicit_conv) {
2081 602 : if (ptr)
2082 602 : *ptr = 0;
2083 1204 : return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
2084 : }
2085 :
2086 34117 : res = SWIG_ERROR;
2087 :
2088 34117 : sobj = SWIG_Python_GetSwigThis(obj);
2089 34117 : if (own)
2090 0 : *own = 0;
2091 34117 : while (sobj) {
2092 34115 : void *vptr = sobj->ptr;
2093 34115 : if (ty) {
2094 34115 : swig_type_info *to = sobj->ty;
2095 34115 : if (to == ty) {
2096 : /* no type cast needed */
2097 34115 : 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 34117 : if (sobj) {
2122 34115 : if (own)
2123 0 : *own = *own | sobj->own;
2124 34115 : if (flags & SWIG_POINTER_DISOWN) {
2125 11292 : 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 2582 : SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2281 : {
2282 2582 : 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 2582 : dict = PyObject_GetAttrString(inst, "__dict__");
2296 2582 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2297 2582 : Py_DECREF(dict);
2298 2582 : }
2299 :
2300 :
2301 : SWIGINTERN PyObject *
2302 2582 : SWIG_Python_InitShadowInstance(PyObject *args) {
2303 2582 : PyObject *obj[2];
2304 2582 : if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2305 : return NULL;
2306 : } else {
2307 2582 : SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2308 2582 : if (sthis) {
2309 0 : SwigPyObject_append((PyObject*) sthis, obj[1]);
2310 : } else {
2311 2582 : SWIG_Python_SetSwigThis(obj[0], obj[1]);
2312 : }
2313 2582 : return SWIG_Py_Void();
2314 : }
2315 : }
2316 :
2317 : /* Create a new pointer object */
2318 :
2319 : SWIGRUNTIME PyObject *
2320 9304 : SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2321 9304 : SwigPyClientData *clientdata;
2322 9304 : PyObject * robj;
2323 9304 : int own;
2324 :
2325 9304 : if (!ptr)
2326 20 : return SWIG_Py_Void();
2327 :
2328 9284 : clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2329 9284 : own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2330 9284 : 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 9284 : assert(!(flags & SWIG_BUILTIN_TP_INIT));
2361 :
2362 9284 : robj = SwigPyObject_New(ptr, type, own);
2363 9284 : if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2364 6704 : PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2365 6704 : 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 306 : SWIG_Python_TypeCache(void) {
2441 306 : static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2442 306 : return cache;
2443 : }
2444 :
2445 : SWIGRUNTIME swig_type_info *
2446 30 : SWIG_Python_TypeQuery(const char *type)
2447 : {
2448 30 : PyObject *cache = SWIG_Python_TypeCache();
2449 30 : PyObject *key = SWIG_Python_str_FromChar(type);
2450 30 : PyObject *obj = PyDict_GetItem(cache, key);
2451 30 : swig_type_info *descriptor;
2452 30 : if (obj) {
2453 0 : descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2454 : } else {
2455 30 : swig_module_info *swig_module = SWIG_GetModule(0);
2456 30 : descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2457 30 : if (descriptor) {
2458 30 : obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2459 30 : PyDict_SetItem(cache, key, obj);
2460 30 : Py_DECREF(obj);
2461 : }
2462 : }
2463 30 : Py_DECREF(key);
2464 30 : 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 580 : SWIG_pchar_descriptor(void)
2786 : {
2787 580 : static int init = 0;
2788 580 : static swig_type_info* info = 0;
2789 580 : if (!init) {
2790 30 : info = SWIG_TypeQuery("_p_char");
2791 30 : init = 1;
2792 : }
2793 580 : return info;
2794 : }
2795 :
2796 :
2797 : SWIGINTERNINLINE PyObject *
2798 59193 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
2799 : {
2800 59193 : if (carray) {
2801 59147 : 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 59147 : 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 59193 : SWIG_FromCharPtr(const char *cptr)
2824 : {
2825 13929 : return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
2826 : }
2827 :
2828 :
2829 : #define SWIG_From_double PyFloat_FromDouble
2830 :
2831 :
2832 : SWIGINTERNINLINE PyObject*
2833 25399 : SWIG_From_int (int value)
2834 : {
2835 25399 : 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 31955 : struct PythonBindingErrorHandlerContext
2873 : {
2874 : std::string osInitialMsg{};
2875 : std::string osFailureMsg{};
2876 : CPLErrorNum nLastCode = CPLE_None;
2877 : bool bMemoryError = false;
2878 : };
2879 :
2880 : static void CPL_STDCALL
2881 36 : PythonBindingErrorHandler(CPLErr eclass, CPLErrorNum err_no, const char *msg )
2882 : {
2883 36 : PythonBindingErrorHandlerContext* ctxt = static_cast<
2884 36 : PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
2885 :
2886 : /*
2887 : ** Generally we want to suppress error reporting if we have exceptions
2888 : ** enabled as the error message will be in the exception thrown in
2889 : ** Python.
2890 : */
2891 :
2892 : /* If the error class is CE_Fatal, we want to have a message issued
2893 : because the CPL support code does an abort() before any exception
2894 : can be generated */
2895 36 : if (eclass == CE_Fatal ) {
2896 0 : CPLCallPreviousHandler(eclass, err_no, msg );
2897 : }
2898 :
2899 : /*
2900 : ** We do not want to interfere with non-failure messages since
2901 : ** they won't be translated into exceptions.
2902 : */
2903 36 : else if (eclass != CE_Failure ) {
2904 7 : CPLCallPreviousHandler(eclass, err_no, msg );
2905 : }
2906 : else {
2907 29 : ctxt->nLastCode = err_no;
2908 29 : try
2909 : {
2910 29 : if( ctxt->osFailureMsg.empty() ) {
2911 29 : ctxt->osFailureMsg = msg;
2912 29 : ctxt->osInitialMsg = ctxt->osFailureMsg;
2913 : } else {
2914 0 : if( ctxt->osFailureMsg.size() < 10000 ) {
2915 0 : std::string osTmp(msg);
2916 0 : osTmp += "\nMay be caused by: ";
2917 0 : osTmp += ctxt->osFailureMsg;
2918 0 : ctxt->osFailureMsg = std::move(osTmp);
2919 0 : ctxt->osInitialMsg = ctxt->osFailureMsg;
2920 : }
2921 : else
2922 : {
2923 0 : std::string osTmp(msg);
2924 0 : osTmp += "\n[...]\nMay be caused by: ";
2925 0 : osTmp += ctxt->osInitialMsg;
2926 0 : ctxt->osFailureMsg = std::move(osTmp);
2927 : }
2928 : }
2929 : }
2930 0 : catch( const std::exception& )
2931 : {
2932 0 : ctxt->bMemoryError = true;
2933 : }
2934 : }
2935 36 : }
2936 :
2937 :
2938 :
2939 :
2940 : static
2941 108871 : int GetUseExceptions() {
2942 69976 : return bUseExceptionsLocal >= 0 ? bUseExceptionsLocal : bUseExceptions;
2943 : }
2944 :
2945 11998 : static int _GetExceptionsLocal()
2946 : {
2947 11998 : return bUseExceptionsLocal;
2948 : }
2949 :
2950 23996 : static void _SetExceptionsLocal(int bVal)
2951 : {
2952 23996 : bUseExceptionsLocal = bVal;
2953 : }
2954 :
2955 : static
2956 28 : void _UseExceptions() {
2957 28 : CPLErrorReset();
2958 28 : bUserHasSpecifiedIfUsingExceptions = TRUE;
2959 28 : if( !bUseExceptions )
2960 : {
2961 25 : 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 2402 : static int _UserHasSpecifiedIfUsingExceptions()
2976 : {
2977 310 : 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 1368 : SWIG_AsVal_double (PyObject *obj, double *val)
2994 : {
2995 1368 : int res = SWIG_TypeError;
2996 1368 : if (PyFloat_Check(obj)) {
2997 869 : if (val) *val = PyFloat_AsDouble(obj);
2998 869 : 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 499 : } else if (PyLong_Check(obj)) {
3005 499 : double v = PyLong_AsDouble(obj);
3006 499 : if (!PyErr_Occurred()) {
3007 499 : if (val) *val = v;
3008 499 : 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 25562 : 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 25562 : if (PyLong_Check(obj)) {
3084 25562 : long v = PyLong_AsLong(obj);
3085 25562 : if (!PyErr_Occurred()) {
3086 25562 : if (val) *val = v;
3087 25562 : 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 25556 : SWIG_AsVal_int (PyObject * obj, int *val)
3119 : {
3120 25556 : long v;
3121 51112 : int res = SWIG_AsVal_long (obj, &v);
3122 25556 : if (SWIG_IsOK(res)) {
3123 25556 : if ((v < INT_MIN || v > INT_MAX)) {
3124 : return SWIG_OverflowError;
3125 : } else {
3126 25556 : 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 118011 : template<class T> static T ReturnSame(T x)
3143 : {
3144 1716 : if( bReturnSame )
3145 : return x;
3146 : return 0;
3147 : }
3148 :
3149 31955 : static void pushErrorHandler()
3150 : {
3151 31955 : CPLErrorReset();
3152 31955 : PythonBindingErrorHandlerContext* ctxt = new PythonBindingErrorHandlerContext();
3153 31955 : CPLPushErrorHandlerEx(PythonBindingErrorHandler, ctxt);
3154 31955 : }
3155 :
3156 31955 : static void popErrorHandler()
3157 : {
3158 31955 : PythonBindingErrorHandlerContext* ctxt = static_cast<
3159 31955 : PythonBindingErrorHandlerContext*>(CPLGetErrorHandlerUserData());
3160 31955 : CPLPopErrorHandler();
3161 31955 : if( ctxt->bMemoryError )
3162 : {
3163 0 : CPLErrorSetState(
3164 : CE_Failure, CPLE_OutOfMemory, "Out of memory");
3165 : }
3166 31955 : 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 31955 : delete ctxt;
3173 31955 : }
3174 :
3175 :
3176 :
3177 :
3178 : /* Return a PyObject* from a NULL terminated C String */
3179 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr) CPL_UNUSED;
3180 1800 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
3181 : {
3182 1800 : const unsigned char* pszIter = (const unsigned char*) pszStr;
3183 616562 : while(*pszIter != 0)
3184 : {
3185 614765 : 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 614762 : pszIter ++;
3194 : }
3195 1797 : 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 2065 : 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 2065 : if (PyUnicode_Check(obj))
3317 : #endif
3318 : #else
3319 : if (PyString_Check(obj))
3320 : #endif
3321 : {
3322 1485 : char *cstr; Py_ssize_t len;
3323 1485 : int ret = SWIG_OK;
3324 : #if PY_VERSION_HEX>=0x03000000
3325 : #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3326 1485 : 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 1485 : obj = PyUnicode_AsUTF8String(obj); if (!obj) return SWIG_TypeError;
3334 1485 : if (!obj)
3335 : return SWIG_TypeError;
3336 1485 : if (alloc)
3337 1485 : *alloc = SWIG_NEWOBJ;
3338 : #endif
3339 1485 : PyBytes_AsStringAndSize(obj, &cstr, &len);
3340 : #else
3341 : PyString_AsStringAndSize(obj, &cstr, &len);
3342 : #endif
3343 1485 : if (cptr) {
3344 1485 : if (alloc) {
3345 1485 : if (*alloc == SWIG_NEWOBJ) {
3346 1485 : *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3347 1485 : *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 1485 : if (psize) *psize = len + 1;
3367 : #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3368 1485 : Py_XDECREF(obj);
3369 : #endif
3370 1485 : 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 580 : swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3402 580 : if (pchar_descriptor) {
3403 580 : void* vptr = 0;
3404 580 : if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3405 580 : if (cptr) *cptr = (char *) vptr;
3406 580 : if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3407 580 : if (alloc) *alloc = SWIG_OLDOBJ;
3408 580 : 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 2419 : SWIGINTERN OSRSpatialReferenceShadow *new_OSRSpatialReferenceShadow(char const *wkt=""){
3506 2419 : return (OSRSpatialReferenceShadow*) OSRNewSpatialReference(wkt);
3507 : }
3508 4519 : SWIGINTERN void delete_OSRSpatialReferenceShadow(OSRSpatialReferenceShadow *self){
3509 4519 : 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 41 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetName(OSRSpatialReferenceShadow *self){
3517 41 : 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 140 : static char **CSLFromPySequence( PyObject *pySeq, int *pbErr )
3527 :
3528 : {
3529 140 : *pbErr = FALSE;
3530 : /* Check if is a list (and reject strings, that are seen as sequence of characters) */
3531 140 : 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 140 : Py_ssize_t size = PySequence_Size(pySeq);
3538 140 : 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 140 : if( size == 0 ) {
3544 : return NULL;
3545 : }
3546 140 : char** papszRet = (char**) VSICalloc((int)size + 1, sizeof(char*));
3547 140 : if( !papszRet ) {
3548 0 : PyErr_SetString(PyExc_MemoryError, "cannot allocate temporary buffer");
3549 0 : *pbErr = TRUE;
3550 0 : return NULL;
3551 : }
3552 398 : for (int i = 0; i < (int)size; i++) {
3553 258 : PyObject* pyObj = PySequence_GetItem(pySeq,i);
3554 258 : if (PyUnicode_Check(pyObj))
3555 : {
3556 258 : char *pszStr;
3557 258 : Py_ssize_t nLen;
3558 258 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
3559 258 : 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 258 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
3568 258 : papszRet[i] = VSIStrdup(pszStr);
3569 513 : 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 258 : Py_DECREF(pyObj);
3582 258 : 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 601 : SWIGINTERN int OSRSpatialReferenceShadow_IsSame(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs,char **options=NULL){
3675 601 : 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 242 : SWIGINTERN int OSRSpatialReferenceShadow_IsGeographic(OSRSpatialReferenceShadow *self){
3684 242 : return OSRIsGeographic(self);
3685 : }
3686 1 : SWIGINTERN int OSRSpatialReferenceShadow_IsDerivedGeographic(OSRSpatialReferenceShadow *self){
3687 1 : return OSRIsDerivedGeographic(self);
3688 : }
3689 409 : SWIGINTERN int OSRSpatialReferenceShadow_IsProjected(OSRSpatialReferenceShadow *self){
3690 409 : 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 179 : SWIGINTERN int OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(OSRSpatialReferenceShadow *self){
3727 179 : return OSREPSGTreatsAsLatLong(self);
3728 : }
3729 186 : SWIGINTERN int OSRSpatialReferenceShadow_EPSGTreatsAsNorthingEasting(OSRSpatialReferenceShadow *self){
3730 186 : 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 34 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAttrValue(OSRSpatialReferenceShadow *self,char const *name,int child=0){
3736 34 : 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 202 : SWIGINTERN double OSRSpatialReferenceShadow_GetLinearUnits(OSRSpatialReferenceShadow *self){
3768 : // Return code ignored.
3769 202 : 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 555 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAuthorityCode(OSRSpatialReferenceShadow *self,char const *target_key){
3778 555 : return OSRGetAuthorityCode( self, target_key );
3779 : }
3780 44 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAuthorityName(OSRSpatialReferenceShadow *self,char const *target_key){
3781 44 : 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 535 : SWIGINTERN void OSRSpatialReferenceShadow_SetAxisMappingStrategy(OSRSpatialReferenceShadow *self,OSRAxisMappingStrategy strategy){
3814 535 : OSRSetAxisMappingStrategy(self, strategy);
3815 : }
3816 97 : SWIGINTERN void OSRSpatialReferenceShadow_GetDataAxisToSRSAxisMapping(OSRSpatialReferenceShadow *self,int *nLen,int const **pList){
3817 194 : *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 = -1 * ABS(nZone);
3873 6 : return nZone;
3874 : }
3875 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetStatePlane(OSRSpatialReferenceShadow *self,int zone,int is_nad83=1,char const *unitsname="",double units=0.0){
3876 2 : return OSRSetStatePlaneWithUnits( self, zone, is_nad83, unitsname, units );
3877 : }
3878 5 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_AutoIdentifyEPSG(OSRSpatialReferenceShadow *self){
3879 5 : return OSRAutoIdentifyEPSG( self );
3880 : }
3881 5 : SWIGINTERN void OSRSpatialReferenceShadow_FindMatches(OSRSpatialReferenceShadow *self,char **options=NULL,OSRSpatialReferenceShadow ***matches=NULL,int *nvalues=NULL,int **confidence_values=NULL){
3882 10 : *matches = OSRFindMatches(self, options, nvalues, confidence_values);
3883 : }
3884 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjection(OSRSpatialReferenceShadow *self,char const *arg){
3885 0 : return OSRSetProjection( self, arg );
3886 : }
3887 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
3888 0 : return OSRSetProjParm( self, name, val );
3889 : }
3890 65 : SWIGINTERN double OSRSpatialReferenceShadow_GetProjParm(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
3891 : // Return code ignored.
3892 65 : return OSRGetProjParm( self, name, default_val, 0 );
3893 : }
3894 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetNormProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
3895 0 : return OSRSetNormProjParm( self, name, val );
3896 : }
3897 1 : SWIGINTERN double OSRSpatialReferenceShadow_GetNormProjParm(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
3898 : // Return code ignored.
3899 1 : return OSRGetNormProjParm( self, name, default_val, 0 );
3900 : }
3901 8 : SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMajor(OSRSpatialReferenceShadow *self){
3902 : // Return code ignored.
3903 8 : return OSRGetSemiMajor( self, 0 );
3904 : }
3905 4 : SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMinor(OSRSpatialReferenceShadow *self){
3906 : // Return code ignored.
3907 4 : return OSRGetSemiMinor( self, 0 );
3908 : }
3909 10 : SWIGINTERN double OSRSpatialReferenceShadow_GetInvFlattening(OSRSpatialReferenceShadow *self){
3910 : // Return code ignored.
3911 10 : return OSRGetInvFlattening( self, 0 );
3912 : }
3913 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetACEA(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3914 0 : return OSRSetACEA( self, stdp1, stdp2, clat, clong,
3915 : fe, fn );
3916 : }
3917 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAE(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3918 0 : return OSRSetAE( self, clat, clong,
3919 : fe, fn );
3920 : }
3921 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetBonne(OSRSpatialReferenceShadow *self,double stdp,double cm,double fe,double fn){
3922 0 : return OSRSetBonne( self, stdp, cm, fe, fn );
3923 : }
3924 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCEA(OSRSpatialReferenceShadow *self,double stdp1,double cm,double fe,double fn){
3925 0 : return OSRSetCEA( self, stdp1, cm,
3926 : fe, fn );
3927 : }
3928 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCS(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3929 0 : return OSRSetCS( self, clat, clong,
3930 : fe, fn );
3931 : }
3932 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEC(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3933 0 : return OSRSetEC( self, stdp1, stdp2, clat, clong,
3934 : fe, fn );
3935 : }
3936 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEckertIV(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3937 0 : return OSRSetEckertIV( self, cm, fe, fn);
3938 : }
3939 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEckertVI(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3940 0 : return OSRSetEckertVI( self, cm, fe, fn);
3941 : }
3942 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEquirectangular(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3943 0 : return OSRSetEquirectangular( self, clat, clong,
3944 : fe, fn );
3945 : }
3946 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEquirectangular2(OSRSpatialReferenceShadow *self,double clat,double clong,double pseudostdparallellat,double fe,double fn){
3947 3 : return OSRSetEquirectangular2( self, clat, clong,
3948 : pseudostdparallellat,
3949 : fe, fn );
3950 : }
3951 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(OSRSpatialReferenceShadow *self,double clat,double clong,double sc,double fe,double fn){
3952 0 : return OSRSetGaussSchreiberTMercator( self, clat, clong, sc, fe, fn );
3953 : }
3954 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGS(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3955 1 : return OSRSetGS( self, cm, fe, fn );
3956 : }
3957 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGH(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3958 0 : return OSRSetGH( self, cm, fe, fn );
3959 : }
3960 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetIGH(OSRSpatialReferenceShadow *self){
3961 0 : return OSRSetIGH( self );
3962 : }
3963 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGEOS(OSRSpatialReferenceShadow *self,double cm,double satelliteheight,double fe,double fn){
3964 0 : return OSRSetGEOS( self, cm, satelliteheight,
3965 : fe, fn );
3966 : }
3967 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGnomonic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3968 0 : return OSRSetGnomonic( self, clat, clong,
3969 : fe, fn );
3970 : }
3971 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetHOM(OSRSpatialReferenceShadow *self,double clat,double clong,double azimuth,double recttoskew,double scale,double fe,double fn){
3972 0 : return OSRSetHOM( self, clat, clong, azimuth, recttoskew,
3973 : scale, fe, fn );
3974 : }
3975 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetHOM2PNO(OSRSpatialReferenceShadow *self,double clat,double dfLat1,double dfLong1,double dfLat2,double dfLong2,double scale,double fe,double fn){
3976 0 : return OSRSetHOM2PNO( self, clat, dfLat1, dfLong1, dfLat2, dfLong2,
3977 : scale, fe, fn );
3978 : }
3979 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetKrovak(OSRSpatialReferenceShadow *self,double clat,double clong,double azimuth,double pseudostdparallellat,double scale,double fe,double fn){
3980 0 : return OSRSetKrovak( self, clat, clong,
3981 : azimuth, pseudostdparallellat,
3982 : scale, fe, fn );
3983 : }
3984 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLAEA(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3985 0 : return OSRSetLAEA( self, clat, clong,
3986 : fe, fn );
3987 : }
3988 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCC(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3989 1 : return OSRSetLCC( self, stdp1, stdp2, clat, clong,
3990 : fe, fn );
3991 : }
3992 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCC1SP(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
3993 0 : return OSRSetLCC1SP( self, clat, clong, scale,
3994 : fe, fn );
3995 : }
3996 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCCB(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3997 0 : return OSRSetLCCB( self, stdp1, stdp2, clat, clong,
3998 : fe, fn );
3999 : }
4000 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMC(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
4001 0 : return OSRSetMC( self, clat, clong,
4002 : fe, fn );
4003 : }
4004 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMercator(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4005 2 : return OSRSetMercator( self, clat, clong,
4006 : scale, fe, fn );
4007 : }
4008 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMercator2SP(OSRSpatialReferenceShadow *self,double stdp1,double clat,double clong,double fe,double fn){
4009 1 : return OSRSetMercator2SP( self, stdp1, clat, clong, fe, fn );
4010 : }
4011 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMollweide(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
4012 0 : return OSRSetMollweide( self, cm,
4013 : fe, fn );
4014 : }
4015 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetNZMG(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
4016 0 : return OSRSetNZMG( self, clat, clong,
4017 : fe, fn );
4018 : }
4019 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetOS(OSRSpatialReferenceShadow *self,double dfOriginLat,double dfCMeridian,double scale,double fe,double fn){
4020 0 : return OSRSetOS( self, dfOriginLat, dfCMeridian, scale,
4021 : fe, fn );
4022 : }
4023 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetOrthographic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
4024 1 : return OSRSetOrthographic( self, clat, clong,
4025 : fe, fn );
4026 : }
4027 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetPolyconic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
4028 0 : return OSRSetPolyconic( self, clat, clong,
4029 : fe, fn );
4030 : }
4031 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetPS(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4032 1 : return OSRSetPS( self, clat, clong, scale,
4033 : fe, fn );
4034 : }
4035 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetRobinson(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
4036 0 : return OSRSetRobinson( self, clong, fe, fn );
4037 : }
4038 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetSinusoidal(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
4039 1 : return OSRSetSinusoidal( self, clong, fe, fn );
4040 : }
4041 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetStereographic(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4042 0 : return OSRSetStereographic( self, clat, clong, scale,
4043 : fe, fn );
4044 : }
4045 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetSOC(OSRSpatialReferenceShadow *self,double latitudeoforigin,double cm,double fe,double fn){
4046 0 : return OSRSetSOC( self, latitudeoforigin, cm,
4047 : fe, fn );
4048 : }
4049 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTM(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4050 1 : return OSRSetTM( self, clat, clong, scale,
4051 : fe, fn );
4052 : }
4053 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMVariant(OSRSpatialReferenceShadow *self,char const *pszVariantName,double clat,double clong,double scale,double fe,double fn){
4054 0 : return OSRSetTMVariant( self, pszVariantName, clat, clong,
4055 : scale, fe, fn );
4056 : }
4057 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMG(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
4058 0 : return OSRSetTMG( self, clat, clong,
4059 : fe, fn );
4060 : }
4061 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMSO(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
4062 0 : return OSRSetTMSO( self, clat, clong, scale,
4063 : fe, fn );
4064 : }
4065 0 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVDG(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
4066 0 : return OSRSetVDG( self, clong, fe, fn );
4067 : }
4068 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVerticalPerspective(OSRSpatialReferenceShadow *self,double topoOriginLat,double topoOriginLon,double topoOriginHeight,double viewPointHeight,double fe,double fn){
4069 1 : return OSRSetVerticalPerspective( self,
4070 : topoOriginLat, topoOriginLon, topoOriginHeight, viewPointHeight, fe, fn );
4071 : }
4072 56 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetWellKnownGeogCS(OSRSpatialReferenceShadow *self,char const *name){
4073 56 : return OSRSetWellKnownGeogCS( self, name );
4074 : }
4075 938 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetFromUserInput(OSRSpatialReferenceShadow *self,char const *name,char **options=NULL){
4076 938 : 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 243 : CreateTupleFromDoubleArray( const double *first, size_t size ) {
4092 243 : PyObject *out = PyTuple_New( size );
4093 1126 : for( unsigned int i=0; i<size; i++ ) {
4094 883 : PyObject *val = PyFloat_FromDouble( *first );
4095 883 : ++first;
4096 883 : PyTuple_SetItem( out, i, val );
4097 : }
4098 243 : 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 285 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromWkt(OSRSpatialReferenceShadow *self,char **ppszInput){
4128 285 : return OSRImportFromWkt( self, ppszInput );
4129 : }
4130 179 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromProj4(OSRSpatialReferenceShadow *self,char *ppszInput){
4131 179 : 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 945 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromEPSG(OSRSpatialReferenceShadow *self,int arg){
4140 945 : return OSRImportFromEPSG(self, arg);
4141 : }
4142 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromEPSGA(OSRSpatialReferenceShadow *self,int arg){
4143 2 : return OSRImportFromEPSGA(self, arg);
4144 : }
4145 7 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromPCI(OSRSpatialReferenceShadow *self,char const *proj,char const *units="METRE",double argin[17]=0){
4146 7 : return OSRImportFromPCI( self, proj, units, argin );
4147 : }
4148 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromUSGS(OSRSpatialReferenceShadow *self,long proj_code,long zone=0,double argin[15]=0,long datum_code=0){
4149 2 : return OSRImportFromUSGS( self, proj_code, zone, argin, datum_code );
4150 : }
4151 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromXML(OSRSpatialReferenceShadow *self,char const *xmlString){
4152 1 : return OSRImportFromXML( self, xmlString );
4153 : }
4154 7 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromERM(OSRSpatialReferenceShadow *self,char const *proj,char const *datum,char const *units){
4155 7 : return OSRImportFromERM( self, proj, datum, units );
4156 : }
4157 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromMICoordSys(OSRSpatialReferenceShadow *self,char const *pszCoordSys){
4158 3 : return OSRImportFromMICoordSys( self, pszCoordSys );
4159 : }
4160 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromOzi(OSRSpatialReferenceShadow *self,char const *const *papszLines){
4161 3 : return OSRImportFromOzi( self, papszLines );
4162 : }
4163 4 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromCF1(OSRSpatialReferenceShadow *self,char **keyValues,char const *units=NULL){
4164 4 : return OSRImportFromCF1(self, keyValues, units);
4165 : }
4166 1212 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToWkt(OSRSpatialReferenceShadow *self,char **argout,char **options=NULL){
4167 1212 : return OSRExportToWktEx( self, argout, options );
4168 : }
4169 50 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPrettyWkt(OSRSpatialReferenceShadow *self,char **argout,int simplify=0){
4170 50 : return OSRExportToPrettyWkt( self, argout, simplify );
4171 : }
4172 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPROJJSON(OSRSpatialReferenceShadow *self,char **argout,char **options=NULL){
4173 2 : return OSRExportToPROJJSON( self, argout, options );
4174 : }
4175 424 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToProj4(OSRSpatialReferenceShadow *self,char **argout){
4176 424 : return OSRExportToProj4( self, argout );
4177 : }
4178 6 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPCI(OSRSpatialReferenceShadow *self,char **proj,char **units,double *params[17]){
4179 6 : return OSRExportToPCI( self, proj, units, params );
4180 : }
4181 :
4182 : #define SWIG_From_long PyInt_FromLong
4183 :
4184 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToUSGS(OSRSpatialReferenceShadow *self,long *code,long *zone,double *params[15],long *datum){
4185 2 : return OSRExportToUSGS( self, code, zone, params, datum );
4186 : }
4187 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToERM(OSRSpatialReferenceShadow *self,char **proj,char **datum,char **units){
4188 1 : char szProj[32] = {0}, szDatum[32] = {0}, szUnits[32] = {0};
4189 1 : OGRErr ret = OSRExportToERM( self, szProj, szDatum, szUnits );
4190 1 : *proj = CPLStrdup(szProj);
4191 1 : *datum = CPLStrdup(szDatum);
4192 1 : *units = CPLStrdup(szUnits);
4193 1 : return ret;
4194 : }
4195 2 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToXML(OSRSpatialReferenceShadow *self,char **argout,char const *dialect=""){
4196 2 : return OSRExportToXML( self, argout, dialect );
4197 : }
4198 5 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToMICoordSys(OSRSpatialReferenceShadow *self,char **argout){
4199 5 : return OSRExportToMICoordSys( self, argout );
4200 : }
4201 4 : SWIGINTERN char **OSRSpatialReferenceShadow_ExportToCF1(OSRSpatialReferenceShadow *self,char **options=NULL){
4202 4 : char** ret = NULL;
4203 4 : OSRExportToCF1(self, NULL, &ret, NULL, options);
4204 4 : return ret;
4205 : }
4206 :
4207 : /* Return a PyObject* from a C String */
4208 44 : static PyObject* GDALPythonObjectFromCStrAndSize(const char *pszStr, size_t nLen)
4209 : {
4210 44 : const unsigned char* pszIter = (const unsigned char*) pszStr;
4211 854 : for( size_t i = 0; i < nLen; ++i)
4212 : {
4213 810 : if (pszIter[i] > 127)
4214 : {
4215 0 : PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, nLen, "strict");
4216 0 : if (pyObj != NULL && !PyErr_Occurred())
4217 : return pyObj;
4218 0 : PyErr_Clear();
4219 0 : return PyBytes_FromStringAndSize(pszStr, nLen);
4220 : }
4221 : }
4222 44 : return PyUnicode_FromStringAndSize(pszStr, nLen);
4223 : }
4224 :
4225 :
4226 : static PyObject*
4227 4 : GetCSLStringAsPyDict( char **stringarray, bool bFreeCSL ) {
4228 4 : PyObject* dict = PyDict_New();
4229 4 : if ( stringarray != NULL ) {
4230 48 : for (char** iter = stringarray; *iter; ++iter ) {
4231 44 : const char* pszSep = strchr( *iter, '=' );
4232 44 : if ( pszSep != NULL) {
4233 44 : const char* keyptr = *iter;
4234 44 : const char* valptr = pszSep + 1;
4235 44 : PyObject *nm = GDALPythonObjectFromCStrAndSize( keyptr, (size_t)(pszSep - keyptr) );
4236 44 : PyObject *val = GDALPythonObjectFromCStr( valptr );
4237 44 : PyDict_SetItem(dict, nm, val );
4238 44 : Py_DECREF(nm);
4239 44 : Py_DECREF(val);
4240 : }
4241 : }
4242 : }
4243 4 : if( bFreeCSL )
4244 4 : CSLDestroy(stringarray);
4245 4 : return dict;
4246 : }
4247 :
4248 1 : SWIGINTERN retStringAndCPLFree *OSRSpatialReferenceShadow_ExportToCF1Units(OSRSpatialReferenceShadow *self,char **options=NULL){
4249 1 : char* units = NULL;
4250 1 : OSRExportToCF1(self, NULL, NULL, &units, options);
4251 1 : return units;
4252 : }
4253 16 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_CloneGeogCS(OSRSpatialReferenceShadow *self){
4254 16 : return (OSRSpatialReferenceShadow*) OSRCloneGeogCS(self);
4255 : }
4256 56 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_Clone(OSRSpatialReferenceShadow *self){
4257 56 : return (OSRSpatialReferenceShadow*) OSRClone(self);
4258 : }
4259 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_StripVertical(OSRSpatialReferenceShadow *self){
4260 1 : return OSRStripVertical(self);
4261 : }
4262 114 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_Validate(OSRSpatialReferenceShadow *self){
4263 114 : return OSRValidate(self);
4264 : }
4265 17 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphToESRI(OSRSpatialReferenceShadow *self){
4266 17 : return OSRMorphToESRI(self);
4267 : }
4268 19 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphFromESRI(OSRSpatialReferenceShadow *self){
4269 19 : return OSRMorphFromESRI(self);
4270 : }
4271 28 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_ConvertToOtherProjection(OSRSpatialReferenceShadow *self,char const *other_projection,char **options=NULL){
4272 28 : return (OSRSpatialReferenceShadow*)OSRConvertToOtherProjection(self, other_projection, options);
4273 : }
4274 3 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_PromoteTo3D(OSRSpatialReferenceShadow *self,char const *name=NULL){
4275 3 : return OSRPromoteTo3D(self, name);
4276 : }
4277 1 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_DemoteTo2D(OSRSpatialReferenceShadow *self,char const *name=NULL){
4278 1 : return OSRDemoteTo2D(self, name);
4279 : }
4280 11 : SWIGINTERN OGRCoordinateTransformationOptions *new_OGRCoordinateTransformationOptions(){
4281 11 : return OCTNewCoordinateTransformationOptions();
4282 : }
4283 11 : SWIGINTERN void delete_OGRCoordinateTransformationOptions(OGRCoordinateTransformationOptions *self){
4284 11 : OCTDestroyCoordinateTransformationOptions( self );
4285 : }
4286 5 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetAreaOfInterest(OGRCoordinateTransformationOptions *self,double westLongitudeDeg,double southLatitudeDeg,double eastLongitudeDeg,double northLatitudeDeg){
4287 5 : return OCTCoordinateTransformationOptionsSetAreaOfInterest(self,
4288 : westLongitudeDeg, southLatitudeDeg,
4289 5 : eastLongitudeDeg, northLatitudeDeg);
4290 : }
4291 :
4292 : SWIGINTERN int
4293 2 : SWIG_AsVal_bool (PyObject *obj, bool *val)
4294 : {
4295 2 : int r;
4296 2 : if (!PyBool_Check(obj))
4297 : return SWIG_ERROR;
4298 2 : r = PyObject_IsTrue(obj);
4299 2 : if (r == -1)
4300 : return SWIG_ERROR;
4301 2 : if (val) *val = r ? true : false;
4302 : return SWIG_OK;
4303 : }
4304 :
4305 8 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetOperation(OGRCoordinateTransformationOptions *self,char const *operation,bool inverseCT=false){
4306 16 : return OCTCoordinateTransformationOptionsSetOperation(self, operation, inverseCT);
4307 : }
4308 1 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetDesiredAccuracy(OGRCoordinateTransformationOptions *self,double accuracy){
4309 2 : return OCTCoordinateTransformationOptionsSetDesiredAccuracy(self, accuracy);
4310 : }
4311 1 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetBallparkAllowed(OGRCoordinateTransformationOptions *self,bool allowBallpark){
4312 2 : return OCTCoordinateTransformationOptionsSetBallparkAllowed(self, allowBallpark);
4313 : }
4314 0 : SWIGINTERN bool OGRCoordinateTransformationOptions_SetOnlyBest(OGRCoordinateTransformationOptions *self,bool onlyBest){
4315 0 : return OCTCoordinateTransformationOptionsSetOnlyBest(self, onlyBest);
4316 : }
4317 : SWIGINTERN OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow__SWIG_0(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst){
4318 : return (OSRCoordinateTransformationShadow*) OCTNewCoordinateTransformation(src, dst);
4319 : }
4320 10 : SWIGINTERN OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow__SWIG_1(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst,OGRCoordinateTransformationOptions *options){
4321 10 : return (OSRCoordinateTransformationShadow*)
4322 10 : (options ? OCTNewCoordinateTransformationEx( src, dst, options ) : OCTNewCoordinateTransformation(src, dst));
4323 : }
4324 152 : SWIGINTERN void delete_OSRCoordinateTransformationShadow(OSRCoordinateTransformationShadow *self){
4325 152 : OCTDestroyCoordinateTransformation( self );
4326 : }
4327 1 : SWIGINTERN OSRCoordinateTransformationShadow *OSRCoordinateTransformationShadow_GetInverse(OSRCoordinateTransformationShadow *self){
4328 1 : return (OSRCoordinateTransformationShadow*) OCTGetInverse(self);
4329 : }
4330 1 : SWIGINTERN void OSRCoordinateTransformationShadow__TransformPoint3Double(OSRCoordinateTransformationShadow *self,double inout[3]){
4331 :
4332 :
4333 :
4334 1 : if (self == NULL)
4335 : return;
4336 1 : OCTTransform( self, 1, &inout[0], &inout[1], &inout[2] );
4337 : }
4338 1 : SWIGINTERN void OSRCoordinateTransformationShadow__TransformPoint4Double(OSRCoordinateTransformationShadow *self,double inout[4]){
4339 :
4340 :
4341 :
4342 :
4343 :
4344 1 : if (self == NULL)
4345 : return;
4346 1 : OCTTransform4D( self, 1, &inout[0], &inout[1], &inout[2], &inout[3], NULL );
4347 : }
4348 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(OSRCoordinateTransformationShadow *self,double argout[3],double x,double y,double z=0.0){
4349 : if (self == NULL)
4350 : return;
4351 : argout[0] = x;
4352 : argout[1] = y;
4353 : argout[2] = z;
4354 : OCTTransform( self, 1, &argout[0], &argout[1], &argout[2] );
4355 : }
4356 4 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(OSRCoordinateTransformationShadow *self,double argout[4],double x,double y,double z,double t){
4357 4 : if (self == NULL)
4358 : return;
4359 4 : argout[0] = x;
4360 4 : argout[1] = y;
4361 4 : argout[2] = z;
4362 4 : argout[3] = t;
4363 4 : OCTTransform4D( self, 1, &argout[0], &argout[1], &argout[2], &argout[3], NULL );
4364 : }
4365 0 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPointWithErrorCode(OSRCoordinateTransformationShadow *self,double argout[4],int errorCode[1],double x,double y,double z,double t){
4366 0 : if (self == NULL)
4367 : return;
4368 0 : argout[0] = x;
4369 0 : argout[1] = y;
4370 0 : argout[2] = z;
4371 0 : argout[3] = t;
4372 0 : OCTTransform4DWithErrorCodes( self, 1, &argout[0], &argout[1], &argout[2], &argout[3], errorCode );
4373 : }
4374 :
4375 : static int
4376 10 : DecomposeSequenceOf4DCoordinates( PyObject *seq, int nCount, double *x, double *y, double *z, double *t, int *pbFoundTime )
4377 : {
4378 10 : *pbFoundTime = FALSE;
4379 33 : for( int i = 0; i<nCount; ++i )
4380 : {
4381 :
4382 23 : PyObject *o = PySequence_GetItem(seq, i);
4383 23 : if ( !PySequence_Check(o) )
4384 : {
4385 0 : Py_DECREF(o);
4386 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
4387 :
4388 0 : return FALSE;
4389 : }
4390 :
4391 23 : Py_ssize_t len = PySequence_Size(o);
4392 :
4393 23 : if (len >= 2 && len <= 4)
4394 : {
4395 23 : PyObject *o1 = PySequence_GetItem(o, 0);
4396 23 : if (!PyNumber_Check(o1))
4397 : {
4398 0 : Py_DECREF(o); Py_DECREF(o1);
4399 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4400 :
4401 0 : return FALSE;
4402 : }
4403 23 : x[i] = PyFloat_AsDouble(o1);
4404 23 : Py_DECREF(o1);
4405 :
4406 23 : o1 = PySequence_GetItem(o, 1);
4407 23 : if (!PyNumber_Check(o1))
4408 : {
4409 0 : Py_DECREF(o); Py_DECREF(o1);
4410 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4411 :
4412 0 : return FALSE;
4413 : }
4414 23 : y[i] = PyFloat_AsDouble(o1);
4415 23 : Py_DECREF(o1);
4416 :
4417 : /* The 3rd coordinate is optional, default 0.0 */
4418 23 : if (len >= 3)
4419 : {
4420 16 : o1 = PySequence_GetItem(o, 2);
4421 16 : if (!PyNumber_Check(o1))
4422 : {
4423 0 : Py_DECREF(o); Py_DECREF(o1);
4424 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4425 :
4426 0 : return FALSE;
4427 : }
4428 16 : z[i] = PyFloat_AsDouble(o1);
4429 16 : Py_DECREF(o1);
4430 : }
4431 : else
4432 : {
4433 7 : z[i] = 0.0;
4434 : }
4435 :
4436 : /* The 4th coordinate is optional, default 0.0 */
4437 23 : if (len >= 4)
4438 : {
4439 8 : o1 = PySequence_GetItem(o, 3);
4440 8 : if (!PyNumber_Check(o1))
4441 : {
4442 0 : Py_DECREF(o); Py_DECREF(o1);
4443 0 : PyErr_SetString(PyExc_TypeError, "not a number");
4444 :
4445 0 : return FALSE;
4446 : }
4447 8 : *pbFoundTime = TRUE;
4448 8 : t[i] = PyFloat_AsDouble(o1);
4449 8 : Py_DECREF(o1);
4450 : }
4451 : else
4452 : {
4453 15 : t[i] = 0.0;
4454 : }
4455 : }
4456 : else
4457 : {
4458 0 : Py_DECREF(o);
4459 0 : PyErr_SetString(PyExc_TypeError, "invalid coordinate");
4460 :
4461 0 : return FALSE;
4462 : }
4463 :
4464 23 : Py_DECREF(o);
4465 : }
4466 :
4467 : return TRUE;
4468 : }
4469 :
4470 10 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoints(OSRCoordinateTransformationShadow *self,int nCount,double *x,double *y,double *z,double *t){
4471 10 : if (self == NULL)
4472 : return;
4473 10 : OCTTransform4D( self, nCount, x, y, z, t, NULL );
4474 : }
4475 25 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformBounds(OSRCoordinateTransformationShadow *self,double argout[4],double minx,double miny,double maxx,double maxy,int densify_pts){
4476 25 : argout[0] = HUGE_VAL;
4477 25 : argout[1] = HUGE_VAL;
4478 25 : argout[2] = HUGE_VAL;
4479 25 : argout[3] = HUGE_VAL;
4480 25 : if (self == NULL)
4481 : return;
4482 25 : OCTTransformBounds(
4483 : self,
4484 : minx, miny, maxx, maxy,
4485 : &argout[0], &argout[1], &argout[2], &argout[3],
4486 : densify_pts
4487 : );
4488 : }
4489 :
4490 2 : OSRCoordinateTransformationShadow *CreateCoordinateTransformation( OSRSpatialReferenceShadow *src, OSRSpatialReferenceShadow *dst, OGRCoordinateTransformationOptions* options = NULL ) {
4491 2 : return (OSRCoordinateTransformationShadow*)
4492 2 : (options ? OCTNewCoordinateTransformationEx( src, dst, options ) : OCTNewCoordinateTransformation(src, dst));
4493 : }
4494 :
4495 6609 : SWIGINTERN OSRCRSInfo *new_OSRCRSInfo(char const *auth_name,char const *code,char const *name,OSRCRSType type,bool deprecated,bool bbox_valid,double west_lon_degree,double south_lat_degree,double east_lon_degree,double north_lat_degree,char const *area_name,char const *projection_method,char const *celestial_body_name){
4496 6609 : OSRCRSInfo *self = (OSRCRSInfo*) CPLMalloc( sizeof( OSRCRSInfo ) );
4497 6609 : self->pszAuthName = auth_name ? CPLStrdup(auth_name) : NULL;
4498 6609 : self->pszCode = code ? CPLStrdup(code) : NULL;
4499 6609 : self->pszName = name ? CPLStrdup(name) : NULL;
4500 6609 : self->eType = type;
4501 6609 : self->bDeprecated = deprecated;
4502 6609 : self->bBboxValid = bbox_valid;
4503 6609 : self->dfWestLongitudeDeg = west_lon_degree;
4504 6609 : self->dfSouthLatitudeDeg = south_lat_degree;
4505 6609 : self->dfEastLongitudeDeg = east_lon_degree;
4506 6609 : self->dfNorthLatitudeDeg = north_lat_degree;
4507 6609 : self->pszAreaName = area_name ? CPLStrdup(area_name) : NULL;
4508 6609 : self->pszProjectionMethod = projection_method ? CPLStrdup(projection_method) : NULL;
4509 6609 : self->pszCelestialBodyName = celestial_body_name ? CPLStrdup(celestial_body_name) : NULL;
4510 6609 : return self;
4511 : }
4512 6609 : SWIGINTERN void delete_OSRCRSInfo(OSRCRSInfo *self){
4513 6609 : CPLFree( self->pszAuthName );
4514 6609 : CPLFree( self->pszCode );
4515 6609 : CPLFree( self->pszName );
4516 6609 : CPLFree( self->pszAreaName );
4517 6609 : CPLFree( self->pszProjectionMethod );
4518 6609 : CPLFree( self->pszCelestialBodyName );
4519 6609 : CPLFree( self );
4520 6609 : }
4521 :
4522 :
4523 6609 : const char* OSRCRSInfo_auth_name_get( OSRCRSInfo *crsInfo ) {
4524 6609 : return crsInfo->pszAuthName;
4525 : }
4526 :
4527 6609 : const char* OSRCRSInfo_code_get( OSRCRSInfo *crsInfo ) {
4528 6609 : return crsInfo->pszCode;
4529 : }
4530 :
4531 1 : const char* OSRCRSInfo_name_get( OSRCRSInfo *crsInfo ) {
4532 1 : return crsInfo->pszName;
4533 : }
4534 :
4535 1 : OSRCRSType OSRCRSInfo_type_get( OSRCRSInfo *crsInfo ) {
4536 1 : return crsInfo->eType;
4537 : }
4538 :
4539 1 : bool OSRCRSInfo_deprecated_get( OSRCRSInfo *crsInfo ) {
4540 1 : return crsInfo->bDeprecated;
4541 : }
4542 :
4543 1 : bool OSRCRSInfo_bbox_valid_get( OSRCRSInfo *crsInfo ) {
4544 1 : return crsInfo->bBboxValid;
4545 : }
4546 :
4547 1 : double OSRCRSInfo_west_lon_degree_get( OSRCRSInfo *crsInfo ) {
4548 1 : return crsInfo->dfWestLongitudeDeg;
4549 : }
4550 :
4551 1 : double OSRCRSInfo_south_lat_degree_get( OSRCRSInfo *crsInfo ) {
4552 1 : return crsInfo->dfSouthLatitudeDeg;
4553 : }
4554 :
4555 1 : double OSRCRSInfo_east_lon_degree_get( OSRCRSInfo *crsInfo ) {
4556 1 : return crsInfo->dfEastLongitudeDeg;
4557 : }
4558 :
4559 1 : double OSRCRSInfo_north_lat_degree_get( OSRCRSInfo *crsInfo ) {
4560 1 : return crsInfo->dfNorthLatitudeDeg;
4561 : }
4562 :
4563 1 : const char* OSRCRSInfo_area_name_get( OSRCRSInfo *crsInfo ) {
4564 1 : return crsInfo->pszAreaName;
4565 : }
4566 :
4567 1 : const char* OSRCRSInfo_projection_method_get( OSRCRSInfo *crsInfo ) {
4568 1 : return crsInfo->pszProjectionMethod;
4569 : }
4570 :
4571 1 : const char* OSRCRSInfo_celestial_body_name_get( OSRCRSInfo *crsInfo ) {
4572 1 : return crsInfo->pszCelestialBodyName;
4573 : }
4574 :
4575 :
4576 :
4577 1 : char** GetAuthorityListFromDatabase()
4578 : {
4579 1 : return OSRGetAuthorityListFromDatabase();
4580 : }
4581 :
4582 :
4583 22 : static PyObject* CSLToList( char** stringarray, bool *pbErr )
4584 : {
4585 22 : PyObject* res;
4586 22 : if ( stringarray == NULL ) {
4587 0 : res = Py_None;
4588 0 : Py_INCREF( res );
4589 : }
4590 : else {
4591 22 : int len = CSLCount( stringarray );
4592 22 : res = PyList_New( len );
4593 22 : if( !res ) {
4594 0 : *pbErr = true;
4595 0 : return res;
4596 : }
4597 55 : for ( int i = 0; i < len; ++i ) {
4598 33 : PyObject *o = GDALPythonObjectFromCStr( stringarray[i] );
4599 33 : PyList_SetItem(res, i, o );
4600 : }
4601 : }
4602 22 : *pbErr = false;
4603 22 : return res;
4604 : }
4605 :
4606 :
4607 1 : void GetCRSInfoListFromDatabase( const char *authName,
4608 : OSRCRSInfo*** pList,
4609 : int* pnListCount)
4610 : {
4611 1 : *pList = OSRGetCRSInfoListFromDatabase(authName, NULL, pnListCount);
4612 1 : }
4613 :
4614 :
4615 1 : void SetPROJSearchPath( const char *utf8_path )
4616 : {
4617 1 : const char* const apszPaths[2] = { utf8_path, NULL };
4618 1 : OSRSetPROJSearchPaths(apszPaths);
4619 1 : }
4620 :
4621 :
4622 16 : void SetPROJSearchPaths( char** paths )
4623 : {
4624 16 : OSRSetPROJSearchPaths(paths);
4625 16 : }
4626 :
4627 :
4628 21 : char** GetPROJSearchPaths()
4629 : {
4630 21 : return OSRGetPROJSearchPaths();
4631 : }
4632 :
4633 :
4634 77 : int GetPROJVersionMajor()
4635 : {
4636 77 : int num;
4637 77 : OSRGetPROJVersion(&num, NULL, NULL);
4638 77 : return num;
4639 : }
4640 :
4641 71 : int GetPROJVersionMinor()
4642 : {
4643 71 : int num;
4644 71 : OSRGetPROJVersion(NULL, &num, NULL);
4645 71 : return num;
4646 : }
4647 :
4648 59 : int GetPROJVersionMicro()
4649 : {
4650 59 : int num;
4651 59 : OSRGetPROJVersion(NULL, NULL, &num);
4652 59 : return num;
4653 : }
4654 :
4655 0 : bool GetPROJEnableNetwork()
4656 : {
4657 0 : return OSRGetPROJEnableNetwork();
4658 : }
4659 :
4660 0 : void SetPROJEnableNetwork(bool enabled)
4661 : {
4662 0 : OSRSetPROJEnableNetwork(enabled);
4663 0 : }
4664 :
4665 :
4666 1 : void SetPROJAuxDbPath( const char *utf8_path )
4667 : {
4668 1 : const char* const apszPaths[2] = { utf8_path, NULL };
4669 1 : OSRSetPROJAuxDbPaths(apszPaths);
4670 1 : }
4671 :
4672 :
4673 0 : void SetPROJAuxDbPaths( char** paths )
4674 : {
4675 0 : OSRSetPROJAuxDbPaths(paths);
4676 0 : }
4677 :
4678 :
4679 0 : char** GetPROJAuxDbPaths()
4680 : {
4681 0 : return OSRGetPROJAuxDbPaths();
4682 : }
4683 :
4684 : #ifdef __cplusplus
4685 : extern "C" {
4686 : #endif
4687 0 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4688 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4689 0 : int result;
4690 :
4691 0 : if (!SWIG_Python_UnpackTuple(args, "GetUseExceptions", 0, 0, 0)) SWIG_fail;
4692 0 : {
4693 : #ifdef SED_HACKS
4694 0 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
4695 : #endif
4696 0 : result = GetUseExceptions();
4697 : }
4698 0 : resultobj = SWIG_From_int(static_cast< int >(result));
4699 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
4700 : return resultobj;
4701 0 : fail:
4702 0 : return NULL;
4703 : }
4704 :
4705 :
4706 11998 : SWIGINTERN PyObject *_wrap__GetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4707 11998 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4708 11998 : int result;
4709 :
4710 11998 : if (!SWIG_Python_UnpackTuple(args, "_GetExceptionsLocal", 0, 0, 0)) SWIG_fail;
4711 11998 : {
4712 : #ifdef SED_HACKS
4713 11998 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
4714 : #endif
4715 11998 : result = (int)_GetExceptionsLocal();
4716 : }
4717 11998 : resultobj = SWIG_From_int(static_cast< int >(result));
4718 11998 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
4719 : return resultobj;
4720 0 : fail:
4721 0 : return NULL;
4722 : }
4723 :
4724 :
4725 23996 : SWIGINTERN PyObject *_wrap__SetExceptionsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4726 23996 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4727 23996 : int arg1 ;
4728 23996 : int val1 ;
4729 23996 : int ecode1 = 0 ;
4730 23996 : PyObject *swig_obj[1] ;
4731 :
4732 23996 : if (!args) SWIG_fail;
4733 23996 : swig_obj[0] = args;
4734 23996 : ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
4735 23996 : if (!SWIG_IsOK(ecode1)) {
4736 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "_SetExceptionsLocal" "', argument " "1"" of type '" "int""'");
4737 : }
4738 23996 : arg1 = static_cast< int >(val1);
4739 23996 : {
4740 : #ifdef SED_HACKS
4741 23996 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
4742 : #endif
4743 23996 : _SetExceptionsLocal(arg1);
4744 : }
4745 23996 : resultobj = SWIG_Py_Void();
4746 23996 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
4747 : return resultobj;
4748 : fail:
4749 : return NULL;
4750 : }
4751 :
4752 :
4753 28 : SWIGINTERN PyObject *_wrap__UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4754 28 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4755 :
4756 28 : if (!SWIG_Python_UnpackTuple(args, "_UseExceptions", 0, 0, 0)) SWIG_fail;
4757 28 : _UseExceptions();
4758 28 : resultobj = SWIG_Py_Void();
4759 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; } }
4760 : return resultobj;
4761 0 : fail:
4762 0 : return NULL;
4763 : }
4764 :
4765 :
4766 5 : SWIGINTERN PyObject *_wrap__DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4767 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4768 :
4769 5 : if (!SWIG_Python_UnpackTuple(args, "_DontUseExceptions", 0, 0, 0)) SWIG_fail;
4770 5 : _DontUseExceptions();
4771 5 : resultobj = SWIG_Py_Void();
4772 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
4773 : return resultobj;
4774 0 : fail:
4775 0 : return NULL;
4776 : }
4777 :
4778 :
4779 2402 : SWIGINTERN PyObject *_wrap__UserHasSpecifiedIfUsingExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4780 2402 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4781 2402 : int result;
4782 :
4783 2402 : if (!SWIG_Python_UnpackTuple(args, "_UserHasSpecifiedIfUsingExceptions", 0, 0, 0)) SWIG_fail;
4784 2402 : {
4785 : #ifdef SED_HACKS
4786 2402 : if( ReturnSame(TRUE) ) bLocalUseExceptionsCode = FALSE;
4787 : #endif
4788 2402 : result = (int)_UserHasSpecifiedIfUsingExceptions();
4789 : }
4790 2402 : resultobj = SWIG_From_int(static_cast< int >(result));
4791 2402 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
4792 : return resultobj;
4793 0 : fail:
4794 0 : return NULL;
4795 : }
4796 :
4797 :
4798 0 : SWIGINTERN PyObject *_wrap_GetWellKnownGeogCSAsWKT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4799 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4800 0 : char *arg1 = (char *) 0 ;
4801 0 : char **arg2 = (char **) 0 ;
4802 0 : int res1 ;
4803 0 : char *buf1 = 0 ;
4804 0 : int alloc1 = 0 ;
4805 0 : char *argout2 = 0 ;
4806 0 : PyObject *swig_obj[1] ;
4807 0 : OGRErr result;
4808 :
4809 0 : {
4810 : /* %typemap(in,numinputs=0) (char **argout2) */
4811 0 : arg2 = &argout2;
4812 : }
4813 0 : if (!args) SWIG_fail;
4814 0 : swig_obj[0] = args;
4815 0 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
4816 0 : if (!SWIG_IsOK(res1)) {
4817 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetWellKnownGeogCSAsWKT" "', argument " "1"" of type '" "char const *""'");
4818 : }
4819 0 : arg1 = reinterpret_cast< char * >(buf1);
4820 0 : {
4821 0 : if (!arg1) {
4822 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4823 : }
4824 : }
4825 0 : {
4826 0 : const int bLocalUseExceptions = GetUseExceptions();
4827 0 : if ( bLocalUseExceptions ) {
4828 0 : pushErrorHandler();
4829 : }
4830 0 : result = (OGRErr)GetWellKnownGeogCSAsWKT((char const *)arg1,arg2);
4831 0 : if ( bLocalUseExceptions ) {
4832 0 : popErrorHandler();
4833 : }
4834 : #ifndef SED_HACKS
4835 : if ( bLocalUseExceptions ) {
4836 : CPLErr eclass = CPLGetLastErrorType();
4837 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4838 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4839 : }
4840 : }
4841 : #endif
4842 : }
4843 0 : {
4844 : /* %typemap(out) OGRErr */
4845 0 : if ( result != 0 && GetUseExceptions()) {
4846 0 : const char* pszMessage = CPLGetLastErrorMsg();
4847 0 : if( pszMessage[0] != '\0' )
4848 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
4849 : else
4850 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4851 0 : SWIG_fail;
4852 : }
4853 : }
4854 0 : {
4855 : /* %typemap(argout) (char **argout) */
4856 0 : PyObject *o;
4857 0 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
4858 0 : o = GDALPythonObjectFromCStr( *arg2 );
4859 : }
4860 : else {
4861 0 : o = Py_None;
4862 0 : Py_INCREF( o );
4863 : }
4864 : #if SWIG_VERSION >= 0x040300
4865 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
4866 : #else
4867 0 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
4868 : #endif
4869 : }
4870 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4871 0 : {
4872 : /* %typemap(freearg) (char **argout) */
4873 0 : if ( *arg2 )
4874 0 : CPLFree( *arg2 );
4875 : }
4876 0 : {
4877 : /* %typemap(ret) OGRErr */
4878 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
4879 0 : resultobj = PyInt_FromLong( result );
4880 : }
4881 : }
4882 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
4883 : return resultobj;
4884 0 : fail:
4885 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4886 0 : {
4887 : /* %typemap(freearg) (char **argout) */
4888 0 : if ( *arg2 )
4889 0 : CPLFree( *arg2 );
4890 : }
4891 : return NULL;
4892 : }
4893 :
4894 :
4895 12 : SWIGINTERN PyObject *_wrap_GetUserInputAsWKT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4896 12 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4897 12 : char *arg1 = (char *) 0 ;
4898 12 : char **arg2 = (char **) 0 ;
4899 12 : int res1 ;
4900 12 : char *buf1 = 0 ;
4901 12 : int alloc1 = 0 ;
4902 12 : char *argout2 = 0 ;
4903 12 : PyObject *swig_obj[1] ;
4904 12 : OGRErr result;
4905 :
4906 12 : {
4907 : /* %typemap(in,numinputs=0) (char **argout2) */
4908 12 : arg2 = &argout2;
4909 : }
4910 12 : if (!args) SWIG_fail;
4911 12 : swig_obj[0] = args;
4912 12 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
4913 12 : if (!SWIG_IsOK(res1)) {
4914 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetUserInputAsWKT" "', argument " "1"" of type '" "char const *""'");
4915 : }
4916 12 : arg1 = reinterpret_cast< char * >(buf1);
4917 12 : {
4918 12 : if (!arg1) {
4919 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4920 : }
4921 : }
4922 12 : {
4923 12 : const int bLocalUseExceptions = GetUseExceptions();
4924 12 : if ( bLocalUseExceptions ) {
4925 12 : pushErrorHandler();
4926 : }
4927 12 : result = (OGRErr)GetUserInputAsWKT((char const *)arg1,arg2);
4928 12 : if ( bLocalUseExceptions ) {
4929 12 : popErrorHandler();
4930 : }
4931 : #ifndef SED_HACKS
4932 : if ( bLocalUseExceptions ) {
4933 : CPLErr eclass = CPLGetLastErrorType();
4934 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4935 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4936 : }
4937 : }
4938 : #endif
4939 : }
4940 12 : {
4941 : /* %typemap(out) OGRErr */
4942 12 : if ( result != 0 && GetUseExceptions()) {
4943 0 : const char* pszMessage = CPLGetLastErrorMsg();
4944 0 : if( pszMessage[0] != '\0' )
4945 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
4946 : else
4947 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4948 0 : SWIG_fail;
4949 : }
4950 : }
4951 12 : {
4952 : /* %typemap(argout) (char **argout) */
4953 12 : PyObject *o;
4954 12 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
4955 12 : o = GDALPythonObjectFromCStr( *arg2 );
4956 : }
4957 : else {
4958 0 : o = Py_None;
4959 0 : Py_INCREF( o );
4960 : }
4961 : #if SWIG_VERSION >= 0x040300
4962 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
4963 : #else
4964 12 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
4965 : #endif
4966 : }
4967 12 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4968 12 : {
4969 : /* %typemap(freearg) (char **argout) */
4970 12 : if ( *arg2 )
4971 12 : CPLFree( *arg2 );
4972 : }
4973 12 : {
4974 : /* %typemap(ret) OGRErr */
4975 24 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
4976 0 : resultobj = PyInt_FromLong( result );
4977 : }
4978 : }
4979 12 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
4980 : return resultobj;
4981 0 : fail:
4982 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4983 0 : {
4984 : /* %typemap(freearg) (char **argout) */
4985 0 : if ( *arg2 )
4986 0 : CPLFree( *arg2 );
4987 : }
4988 : return NULL;
4989 : }
4990 :
4991 :
4992 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4993 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
4994 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
4995 1 : void *argp1 = 0 ;
4996 1 : int res1 = 0 ;
4997 1 : PyObject *swig_obj[1] ;
4998 1 : double result;
4999 :
5000 1 : if (!args) SWIG_fail;
5001 1 : swig_obj[0] = args;
5002 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5003 1 : if (!SWIG_IsOK(res1)) {
5004 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_west_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5005 : }
5006 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5007 1 : {
5008 1 : const int bLocalUseExceptions = GetUseExceptions();
5009 1 : if ( bLocalUseExceptions ) {
5010 1 : pushErrorHandler();
5011 : }
5012 1 : result = (double)OSRAreaOfUse_west_lon_degree_get(arg1);
5013 1 : if ( bLocalUseExceptions ) {
5014 1 : popErrorHandler();
5015 : }
5016 : #ifndef SED_HACKS
5017 : if ( bLocalUseExceptions ) {
5018 : CPLErr eclass = CPLGetLastErrorType();
5019 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5020 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5021 : }
5022 : }
5023 : #endif
5024 : }
5025 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5026 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5027 : return resultobj;
5028 : fail:
5029 : return NULL;
5030 : }
5031 :
5032 :
5033 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5034 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5035 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5036 1 : void *argp1 = 0 ;
5037 1 : int res1 = 0 ;
5038 1 : PyObject *swig_obj[1] ;
5039 1 : double result;
5040 :
5041 1 : if (!args) SWIG_fail;
5042 1 : swig_obj[0] = args;
5043 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5044 1 : if (!SWIG_IsOK(res1)) {
5045 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_south_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5046 : }
5047 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5048 1 : {
5049 1 : const int bLocalUseExceptions = GetUseExceptions();
5050 1 : if ( bLocalUseExceptions ) {
5051 1 : pushErrorHandler();
5052 : }
5053 1 : result = (double)OSRAreaOfUse_south_lat_degree_get(arg1);
5054 1 : if ( bLocalUseExceptions ) {
5055 1 : popErrorHandler();
5056 : }
5057 : #ifndef SED_HACKS
5058 : if ( bLocalUseExceptions ) {
5059 : CPLErr eclass = CPLGetLastErrorType();
5060 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5061 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5062 : }
5063 : }
5064 : #endif
5065 : }
5066 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5067 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5068 : return resultobj;
5069 : fail:
5070 : return NULL;
5071 : }
5072 :
5073 :
5074 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5075 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5076 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5077 1 : void *argp1 = 0 ;
5078 1 : int res1 = 0 ;
5079 1 : PyObject *swig_obj[1] ;
5080 1 : double result;
5081 :
5082 1 : if (!args) SWIG_fail;
5083 1 : swig_obj[0] = args;
5084 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5085 1 : if (!SWIG_IsOK(res1)) {
5086 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_east_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5087 : }
5088 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5089 1 : {
5090 1 : const int bLocalUseExceptions = GetUseExceptions();
5091 1 : if ( bLocalUseExceptions ) {
5092 1 : pushErrorHandler();
5093 : }
5094 1 : result = (double)OSRAreaOfUse_east_lon_degree_get(arg1);
5095 1 : if ( bLocalUseExceptions ) {
5096 1 : popErrorHandler();
5097 : }
5098 : #ifndef SED_HACKS
5099 : if ( bLocalUseExceptions ) {
5100 : CPLErr eclass = CPLGetLastErrorType();
5101 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5102 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5103 : }
5104 : }
5105 : #endif
5106 : }
5107 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5108 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5109 : return resultobj;
5110 : fail:
5111 : return NULL;
5112 : }
5113 :
5114 :
5115 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5116 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5117 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5118 1 : void *argp1 = 0 ;
5119 1 : int res1 = 0 ;
5120 1 : PyObject *swig_obj[1] ;
5121 1 : double result;
5122 :
5123 1 : if (!args) SWIG_fail;
5124 1 : swig_obj[0] = args;
5125 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5126 1 : if (!SWIG_IsOK(res1)) {
5127 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_north_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5128 : }
5129 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5130 1 : {
5131 1 : const int bLocalUseExceptions = GetUseExceptions();
5132 1 : if ( bLocalUseExceptions ) {
5133 1 : pushErrorHandler();
5134 : }
5135 1 : result = (double)OSRAreaOfUse_north_lat_degree_get(arg1);
5136 1 : if ( bLocalUseExceptions ) {
5137 1 : popErrorHandler();
5138 : }
5139 : #ifndef SED_HACKS
5140 : if ( bLocalUseExceptions ) {
5141 : CPLErr eclass = CPLGetLastErrorType();
5142 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5143 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5144 : }
5145 : }
5146 : #endif
5147 : }
5148 1 : resultobj = SWIG_From_double(static_cast< double >(result));
5149 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5150 : return resultobj;
5151 : fail:
5152 : return NULL;
5153 : }
5154 :
5155 :
5156 1 : SWIGINTERN PyObject *_wrap_AreaOfUse_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5157 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5158 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5159 1 : void *argp1 = 0 ;
5160 1 : int res1 = 0 ;
5161 1 : PyObject *swig_obj[1] ;
5162 1 : char *result = 0 ;
5163 :
5164 1 : if (!args) SWIG_fail;
5165 1 : swig_obj[0] = args;
5166 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5167 1 : if (!SWIG_IsOK(res1)) {
5168 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AreaOfUse_name_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5169 : }
5170 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5171 1 : {
5172 1 : const int bLocalUseExceptions = GetUseExceptions();
5173 1 : if ( bLocalUseExceptions ) {
5174 1 : pushErrorHandler();
5175 : }
5176 1 : result = (char *)OSRAreaOfUse_name_get(arg1);
5177 1 : if ( bLocalUseExceptions ) {
5178 1 : popErrorHandler();
5179 : }
5180 : #ifndef SED_HACKS
5181 : if ( bLocalUseExceptions ) {
5182 : CPLErr eclass = CPLGetLastErrorType();
5183 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5184 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5185 : }
5186 : }
5187 : #endif
5188 : }
5189 1 : resultobj = SWIG_FromCharPtr((const char *)result);
5190 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5191 : return resultobj;
5192 : fail:
5193 : return NULL;
5194 : }
5195 :
5196 :
5197 0 : SWIGINTERN PyObject *_wrap_new_AreaOfUse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5198 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5199 0 : double arg1 ;
5200 0 : double arg2 ;
5201 0 : double arg3 ;
5202 0 : double arg4 ;
5203 0 : char *arg5 = (char *) 0 ;
5204 0 : double val1 ;
5205 0 : int ecode1 = 0 ;
5206 0 : double val2 ;
5207 0 : int ecode2 = 0 ;
5208 0 : double val3 ;
5209 0 : int ecode3 = 0 ;
5210 0 : double val4 ;
5211 0 : int ecode4 = 0 ;
5212 0 : int res5 ;
5213 0 : char *buf5 = 0 ;
5214 0 : int alloc5 = 0 ;
5215 0 : PyObject *swig_obj[5] ;
5216 0 : OSRAreaOfUse *result = 0 ;
5217 :
5218 0 : if (!SWIG_Python_UnpackTuple(args, "new_AreaOfUse", 5, 5, swig_obj)) SWIG_fail;
5219 0 : ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
5220 0 : if (!SWIG_IsOK(ecode1)) {
5221 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_AreaOfUse" "', argument " "1"" of type '" "double""'");
5222 : }
5223 0 : arg1 = static_cast< double >(val1);
5224 0 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
5225 0 : if (!SWIG_IsOK(ecode2)) {
5226 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_AreaOfUse" "', argument " "2"" of type '" "double""'");
5227 : }
5228 0 : arg2 = static_cast< double >(val2);
5229 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
5230 0 : if (!SWIG_IsOK(ecode3)) {
5231 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_AreaOfUse" "', argument " "3"" of type '" "double""'");
5232 : }
5233 0 : arg3 = static_cast< double >(val3);
5234 0 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
5235 0 : if (!SWIG_IsOK(ecode4)) {
5236 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_AreaOfUse" "', argument " "4"" of type '" "double""'");
5237 : }
5238 0 : arg4 = static_cast< double >(val4);
5239 0 : res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
5240 0 : if (!SWIG_IsOK(res5)) {
5241 0 : SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_AreaOfUse" "', argument " "5"" of type '" "char *""'");
5242 : }
5243 0 : arg5 = reinterpret_cast< char * >(buf5);
5244 0 : {
5245 0 : const int bLocalUseExceptions = GetUseExceptions();
5246 0 : if ( bLocalUseExceptions ) {
5247 0 : pushErrorHandler();
5248 : }
5249 0 : result = (OSRAreaOfUse *)new_OSRAreaOfUse(arg1,arg2,arg3,arg4,arg5);
5250 0 : if ( bLocalUseExceptions ) {
5251 0 : popErrorHandler();
5252 : }
5253 : #ifndef SED_HACKS
5254 : if ( bLocalUseExceptions ) {
5255 : CPLErr eclass = CPLGetLastErrorType();
5256 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5257 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5258 : }
5259 : }
5260 : #endif
5261 : }
5262 0 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRAreaOfUse, SWIG_POINTER_NEW | 0 );
5263 0 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
5264 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5265 : return resultobj;
5266 0 : fail:
5267 0 : if (alloc5 == SWIG_NEWOBJ) delete[] buf5;
5268 : return NULL;
5269 : }
5270 :
5271 :
5272 1 : SWIGINTERN PyObject *_wrap_delete_AreaOfUse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5273 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5274 1 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5275 1 : void *argp1 = 0 ;
5276 1 : int res1 = 0 ;
5277 1 : PyObject *swig_obj[1] ;
5278 :
5279 1 : if (!args) SWIG_fail;
5280 1 : swig_obj[0] = args;
5281 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, SWIG_POINTER_DISOWN | 0 );
5282 1 : if (!SWIG_IsOK(res1)) {
5283 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AreaOfUse" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5284 : }
5285 1 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5286 1 : {
5287 1 : const int bLocalUseExceptions = GetUseExceptions();
5288 1 : if ( bLocalUseExceptions ) {
5289 1 : pushErrorHandler();
5290 : }
5291 1 : delete_OSRAreaOfUse(arg1);
5292 1 : if ( bLocalUseExceptions ) {
5293 1 : popErrorHandler();
5294 : }
5295 : #ifndef SED_HACKS
5296 : if ( bLocalUseExceptions ) {
5297 : CPLErr eclass = CPLGetLastErrorType();
5298 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5299 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5300 : }
5301 : }
5302 : #endif
5303 : }
5304 1 : resultobj = SWIG_Py_Void();
5305 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5306 : return resultobj;
5307 : fail:
5308 : return NULL;
5309 : }
5310 :
5311 :
5312 276 : SWIGINTERN PyObject *AreaOfUse_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5313 276 : PyObject *obj;
5314 276 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
5315 276 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRAreaOfUse, SWIG_NewClientData(obj));
5316 276 : return SWIG_Py_Void();
5317 : }
5318 :
5319 0 : SWIGINTERN PyObject *AreaOfUse_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5320 0 : return SWIG_Python_InitShadowInstance(args);
5321 : }
5322 :
5323 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5324 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5325 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5326 0 : void *argp1 = 0 ;
5327 0 : int res1 = 0 ;
5328 0 : PyObject *swig_obj[1] ;
5329 0 : double result;
5330 :
5331 0 : if (!args) SWIG_fail;
5332 0 : swig_obj[0] = args;
5333 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5334 0 : if (!SWIG_IsOK(res1)) {
5335 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_west_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5336 : }
5337 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5338 0 : {
5339 0 : if (!arg1) {
5340 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5341 : }
5342 : }
5343 0 : {
5344 0 : const int bLocalUseExceptions = GetUseExceptions();
5345 0 : if ( bLocalUseExceptions ) {
5346 0 : pushErrorHandler();
5347 : }
5348 0 : result = (double)OSRAreaOfUse_west_lon_degree_get(arg1);
5349 0 : if ( bLocalUseExceptions ) {
5350 0 : popErrorHandler();
5351 : }
5352 : #ifndef SED_HACKS
5353 : if ( bLocalUseExceptions ) {
5354 : CPLErr eclass = CPLGetLastErrorType();
5355 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5356 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5357 : }
5358 : }
5359 : #endif
5360 : }
5361 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5362 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5363 : return resultobj;
5364 : fail:
5365 : return NULL;
5366 : }
5367 :
5368 :
5369 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5370 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5371 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5372 0 : void *argp1 = 0 ;
5373 0 : int res1 = 0 ;
5374 0 : PyObject *swig_obj[1] ;
5375 0 : double result;
5376 :
5377 0 : if (!args) SWIG_fail;
5378 0 : swig_obj[0] = args;
5379 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5380 0 : if (!SWIG_IsOK(res1)) {
5381 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_south_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5382 : }
5383 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5384 0 : {
5385 0 : if (!arg1) {
5386 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5387 : }
5388 : }
5389 0 : {
5390 0 : const int bLocalUseExceptions = GetUseExceptions();
5391 0 : if ( bLocalUseExceptions ) {
5392 0 : pushErrorHandler();
5393 : }
5394 0 : result = (double)OSRAreaOfUse_south_lat_degree_get(arg1);
5395 0 : if ( bLocalUseExceptions ) {
5396 0 : popErrorHandler();
5397 : }
5398 : #ifndef SED_HACKS
5399 : if ( bLocalUseExceptions ) {
5400 : CPLErr eclass = CPLGetLastErrorType();
5401 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5402 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5403 : }
5404 : }
5405 : #endif
5406 : }
5407 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5408 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5409 : return resultobj;
5410 : fail:
5411 : return NULL;
5412 : }
5413 :
5414 :
5415 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5416 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5417 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5418 0 : void *argp1 = 0 ;
5419 0 : int res1 = 0 ;
5420 0 : PyObject *swig_obj[1] ;
5421 0 : double result;
5422 :
5423 0 : if (!args) SWIG_fail;
5424 0 : swig_obj[0] = args;
5425 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5426 0 : if (!SWIG_IsOK(res1)) {
5427 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_east_lon_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5428 : }
5429 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5430 0 : {
5431 0 : if (!arg1) {
5432 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5433 : }
5434 : }
5435 0 : {
5436 0 : const int bLocalUseExceptions = GetUseExceptions();
5437 0 : if ( bLocalUseExceptions ) {
5438 0 : pushErrorHandler();
5439 : }
5440 0 : result = (double)OSRAreaOfUse_east_lon_degree_get(arg1);
5441 0 : if ( bLocalUseExceptions ) {
5442 0 : popErrorHandler();
5443 : }
5444 : #ifndef SED_HACKS
5445 : if ( bLocalUseExceptions ) {
5446 : CPLErr eclass = CPLGetLastErrorType();
5447 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5448 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5449 : }
5450 : }
5451 : #endif
5452 : }
5453 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5454 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5455 : return resultobj;
5456 : fail:
5457 : return NULL;
5458 : }
5459 :
5460 :
5461 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5462 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5463 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5464 0 : void *argp1 = 0 ;
5465 0 : int res1 = 0 ;
5466 0 : PyObject *swig_obj[1] ;
5467 0 : double result;
5468 :
5469 0 : if (!args) SWIG_fail;
5470 0 : swig_obj[0] = args;
5471 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5472 0 : if (!SWIG_IsOK(res1)) {
5473 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_north_lat_degree_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5474 : }
5475 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5476 0 : {
5477 0 : if (!arg1) {
5478 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5479 : }
5480 : }
5481 0 : {
5482 0 : const int bLocalUseExceptions = GetUseExceptions();
5483 0 : if ( bLocalUseExceptions ) {
5484 0 : pushErrorHandler();
5485 : }
5486 0 : result = (double)OSRAreaOfUse_north_lat_degree_get(arg1);
5487 0 : if ( bLocalUseExceptions ) {
5488 0 : popErrorHandler();
5489 : }
5490 : #ifndef SED_HACKS
5491 : if ( bLocalUseExceptions ) {
5492 : CPLErr eclass = CPLGetLastErrorType();
5493 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5494 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5495 : }
5496 : }
5497 : #endif
5498 : }
5499 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5500 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5501 : return resultobj;
5502 : fail:
5503 : return NULL;
5504 : }
5505 :
5506 :
5507 0 : SWIGINTERN PyObject *_wrap_OSRAreaOfUse_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5508 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5509 0 : OSRAreaOfUse *arg1 = (OSRAreaOfUse *) 0 ;
5510 0 : void *argp1 = 0 ;
5511 0 : int res1 = 0 ;
5512 0 : PyObject *swig_obj[1] ;
5513 0 : char *result = 0 ;
5514 :
5515 0 : if (!args) SWIG_fail;
5516 0 : swig_obj[0] = args;
5517 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRAreaOfUse, 0 | 0 );
5518 0 : if (!SWIG_IsOK(res1)) {
5519 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRAreaOfUse_name_get" "', argument " "1"" of type '" "OSRAreaOfUse *""'");
5520 : }
5521 0 : arg1 = reinterpret_cast< OSRAreaOfUse * >(argp1);
5522 0 : {
5523 0 : if (!arg1) {
5524 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5525 : }
5526 : }
5527 0 : {
5528 0 : const int bLocalUseExceptions = GetUseExceptions();
5529 0 : if ( bLocalUseExceptions ) {
5530 0 : pushErrorHandler();
5531 : }
5532 0 : result = (char *)OSRAreaOfUse_name_get(arg1);
5533 0 : if ( bLocalUseExceptions ) {
5534 0 : popErrorHandler();
5535 : }
5536 : #ifndef SED_HACKS
5537 : if ( bLocalUseExceptions ) {
5538 : CPLErr eclass = CPLGetLastErrorType();
5539 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5540 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5541 : }
5542 : }
5543 : #endif
5544 : }
5545 0 : resultobj = SWIG_FromCharPtr((const char *)result);
5546 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5547 : return resultobj;
5548 : fail:
5549 : return NULL;
5550 : }
5551 :
5552 :
5553 2419 : SWIGINTERN PyObject *_wrap_new_SpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5554 2419 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5555 2419 : char *arg1 = (char *) "" ;
5556 2419 : int res1 ;
5557 2419 : char *buf1 = 0 ;
5558 2419 : int alloc1 = 0 ;
5559 2419 : PyObject * obj0 = 0 ;
5560 2419 : char * kwnames[] = {
5561 : (char *)"wkt", NULL
5562 : };
5563 2419 : OSRSpatialReferenceShadow *result = 0 ;
5564 :
5565 2419 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|O:new_SpatialReference", kwnames, &obj0)) SWIG_fail;
5566 2419 : if (obj0) {
5567 0 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
5568 0 : if (!SWIG_IsOK(res1)) {
5569 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpatialReference" "', argument " "1"" of type '" "char const *""'");
5570 : }
5571 0 : arg1 = reinterpret_cast< char * >(buf1);
5572 : }
5573 2419 : {
5574 2419 : const int bLocalUseExceptions = GetUseExceptions();
5575 2419 : if ( bLocalUseExceptions ) {
5576 2419 : pushErrorHandler();
5577 : }
5578 2419 : result = (OSRSpatialReferenceShadow *)new_OSRSpatialReferenceShadow((char const *)arg1);
5579 2419 : if ( bLocalUseExceptions ) {
5580 2419 : popErrorHandler();
5581 : }
5582 : #ifndef SED_HACKS
5583 : if ( bLocalUseExceptions ) {
5584 : CPLErr eclass = CPLGetLastErrorType();
5585 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5586 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5587 : }
5588 : }
5589 : #endif
5590 : }
5591 2419 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_NEW | 0 );
5592 2419 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5593 2419 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5594 : return resultobj;
5595 0 : fail:
5596 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
5597 : return NULL;
5598 : }
5599 :
5600 :
5601 4519 : SWIGINTERN PyObject *_wrap_delete_SpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5602 4519 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5603 4519 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5604 4519 : void *argp1 = 0 ;
5605 4519 : int res1 = 0 ;
5606 4519 : PyObject *swig_obj[1] ;
5607 :
5608 4519 : if (!args) SWIG_fail;
5609 4519 : swig_obj[0] = args;
5610 4519 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_DISOWN | 0 );
5611 4519 : if (!SWIG_IsOK(res1)) {
5612 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SpatialReference" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5613 : }
5614 4519 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5615 4519 : {
5616 4519 : const int bLocalUseExceptions = GetUseExceptions();
5617 4519 : if ( bLocalUseExceptions ) {
5618 3065 : pushErrorHandler();
5619 : }
5620 4519 : delete_OSRSpatialReferenceShadow(arg1);
5621 4519 : if ( bLocalUseExceptions ) {
5622 3065 : popErrorHandler();
5623 : }
5624 : #ifndef SED_HACKS
5625 : if ( bLocalUseExceptions ) {
5626 : CPLErr eclass = CPLGetLastErrorType();
5627 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5628 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5629 : }
5630 : }
5631 : #endif
5632 : }
5633 4519 : resultobj = SWIG_Py_Void();
5634 4519 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5635 : return resultobj;
5636 : fail:
5637 : return NULL;
5638 : }
5639 :
5640 :
5641 4 : SWIGINTERN PyObject *_wrap_SpatialReference___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5642 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5643 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5644 4 : void *argp1 = 0 ;
5645 4 : int res1 = 0 ;
5646 4 : PyObject *swig_obj[1] ;
5647 4 : retStringAndCPLFree *result = 0 ;
5648 :
5649 4 : if (!args) SWIG_fail;
5650 4 : swig_obj[0] = args;
5651 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5652 4 : if (!SWIG_IsOK(res1)) {
5653 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference___str__" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5654 : }
5655 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5656 4 : {
5657 4 : const int bLocalUseExceptions = GetUseExceptions();
5658 4 : if ( bLocalUseExceptions ) {
5659 3 : pushErrorHandler();
5660 : }
5661 4 : result = (retStringAndCPLFree *)OSRSpatialReferenceShadow___str__(arg1);
5662 4 : if ( bLocalUseExceptions ) {
5663 3 : popErrorHandler();
5664 : }
5665 : #ifndef SED_HACKS
5666 : if ( bLocalUseExceptions ) {
5667 : CPLErr eclass = CPLGetLastErrorType();
5668 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5669 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5670 : }
5671 : }
5672 : #endif
5673 : }
5674 4 : {
5675 : /* %typemap(out) (retStringAndCPLFree*) */
5676 4 : Py_XDECREF(resultobj);
5677 4 : if(result)
5678 : {
5679 4 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
5680 4 : CPLFree(result);
5681 : }
5682 : else
5683 : {
5684 0 : resultobj = Py_None;
5685 0 : Py_INCREF(resultobj);
5686 : }
5687 : }
5688 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5689 : return resultobj;
5690 : fail:
5691 : return NULL;
5692 : }
5693 :
5694 :
5695 41 : SWIGINTERN PyObject *_wrap_SpatialReference_GetName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5696 41 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5697 41 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5698 41 : void *argp1 = 0 ;
5699 41 : int res1 = 0 ;
5700 41 : PyObject *swig_obj[1] ;
5701 41 : char *result = 0 ;
5702 :
5703 41 : if (!args) SWIG_fail;
5704 41 : swig_obj[0] = args;
5705 41 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5706 41 : if (!SWIG_IsOK(res1)) {
5707 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5708 : }
5709 41 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5710 41 : {
5711 41 : const int bLocalUseExceptions = GetUseExceptions();
5712 41 : if ( bLocalUseExceptions ) {
5713 30 : pushErrorHandler();
5714 : }
5715 41 : result = (char *)OSRSpatialReferenceShadow_GetName(arg1);
5716 41 : if ( bLocalUseExceptions ) {
5717 30 : popErrorHandler();
5718 : }
5719 : #ifndef SED_HACKS
5720 : if ( bLocalUseExceptions ) {
5721 : CPLErr eclass = CPLGetLastErrorType();
5722 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5723 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5724 : }
5725 : }
5726 : #endif
5727 : }
5728 41 : resultobj = SWIG_FromCharPtr((const char *)result);
5729 41 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5730 : return resultobj;
5731 : fail:
5732 : return NULL;
5733 : }
5734 :
5735 :
5736 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetCelestialBodyName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5737 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5738 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5739 1 : void *argp1 = 0 ;
5740 1 : int res1 = 0 ;
5741 1 : PyObject *swig_obj[1] ;
5742 1 : char *result = 0 ;
5743 :
5744 1 : if (!args) SWIG_fail;
5745 1 : swig_obj[0] = args;
5746 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5747 1 : if (!SWIG_IsOK(res1)) {
5748 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetCelestialBodyName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5749 : }
5750 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5751 1 : {
5752 1 : const int bLocalUseExceptions = GetUseExceptions();
5753 1 : if ( bLocalUseExceptions ) {
5754 1 : pushErrorHandler();
5755 : }
5756 1 : result = (char *)OSRSpatialReferenceShadow_GetCelestialBodyName(arg1);
5757 1 : if ( bLocalUseExceptions ) {
5758 1 : popErrorHandler();
5759 : }
5760 : #ifndef SED_HACKS
5761 : if ( bLocalUseExceptions ) {
5762 : CPLErr eclass = CPLGetLastErrorType();
5763 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5764 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5765 : }
5766 : }
5767 : #endif
5768 : }
5769 1 : resultobj = SWIG_FromCharPtr((const char *)result);
5770 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5771 : return resultobj;
5772 : fail:
5773 : return NULL;
5774 : }
5775 :
5776 :
5777 601 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSame(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5778 601 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5779 601 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5780 601 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
5781 601 : char **arg3 = (char **) NULL ;
5782 601 : void *argp1 = 0 ;
5783 601 : int res1 = 0 ;
5784 601 : void *argp2 = 0 ;
5785 601 : int res2 = 0 ;
5786 601 : PyObject * obj0 = 0 ;
5787 601 : PyObject * obj1 = 0 ;
5788 601 : PyObject * obj2 = 0 ;
5789 601 : char * kwnames[] = {
5790 : (char *)"self", (char *)"rhs", (char *)"options", NULL
5791 : };
5792 601 : int result;
5793 :
5794 601 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:SpatialReference_IsSame", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
5795 601 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5796 601 : if (!SWIG_IsOK(res1)) {
5797 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSame" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5798 : }
5799 601 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5800 601 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5801 601 : if (!SWIG_IsOK(res2)) {
5802 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSame" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
5803 : }
5804 601 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
5805 601 : if (obj2) {
5806 81 : {
5807 : /* %typemap(in) char **dict */
5808 81 : arg3 = NULL;
5809 81 : if ( PySequence_Check( obj2 ) ) {
5810 81 : int bErr = FALSE;
5811 81 : arg3 = CSLFromPySequence(obj2, &bErr);
5812 81 : if ( bErr )
5813 : {
5814 0 : SWIG_fail;
5815 : }
5816 : }
5817 0 : else if ( PyMapping_Check( obj2 ) ) {
5818 0 : int bErr = FALSE;
5819 0 : arg3 = CSLFromPyMapping(obj2, &bErr);
5820 0 : if ( bErr )
5821 : {
5822 0 : SWIG_fail;
5823 : }
5824 : }
5825 : else {
5826 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
5827 0 : SWIG_fail;
5828 : }
5829 : }
5830 : }
5831 601 : {
5832 601 : if (!arg2) {
5833 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5834 : }
5835 : }
5836 601 : {
5837 601 : const int bLocalUseExceptions = GetUseExceptions();
5838 601 : if ( bLocalUseExceptions ) {
5839 336 : pushErrorHandler();
5840 : }
5841 601 : result = (int)OSRSpatialReferenceShadow_IsSame(arg1,arg2,arg3);
5842 601 : if ( bLocalUseExceptions ) {
5843 336 : popErrorHandler();
5844 : }
5845 : #ifndef SED_HACKS
5846 : if ( bLocalUseExceptions ) {
5847 : CPLErr eclass = CPLGetLastErrorType();
5848 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5849 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5850 : }
5851 : }
5852 : #endif
5853 : }
5854 601 : resultobj = SWIG_From_int(static_cast< int >(result));
5855 601 : {
5856 : /* %typemap(freearg) char **dict */
5857 601 : CSLDestroy( arg3 );
5858 : }
5859 601 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5860 : return resultobj;
5861 0 : fail:
5862 0 : {
5863 : /* %typemap(freearg) char **dict */
5864 0 : CSLDestroy( arg3 );
5865 : }
5866 : return NULL;
5867 : }
5868 :
5869 :
5870 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSameGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5871 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5872 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5873 0 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
5874 0 : void *argp1 = 0 ;
5875 0 : int res1 = 0 ;
5876 0 : void *argp2 = 0 ;
5877 0 : int res2 = 0 ;
5878 0 : PyObject *swig_obj[2] ;
5879 0 : int result;
5880 :
5881 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_IsSameGeogCS", 2, 2, swig_obj)) SWIG_fail;
5882 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5883 0 : if (!SWIG_IsOK(res1)) {
5884 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSameGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5885 : }
5886 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5887 0 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5888 0 : if (!SWIG_IsOK(res2)) {
5889 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSameGeogCS" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
5890 : }
5891 0 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
5892 0 : {
5893 0 : if (!arg2) {
5894 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5895 : }
5896 : }
5897 0 : {
5898 0 : const int bLocalUseExceptions = GetUseExceptions();
5899 0 : if ( bLocalUseExceptions ) {
5900 0 : pushErrorHandler();
5901 : }
5902 0 : result = (int)OSRSpatialReferenceShadow_IsSameGeogCS(arg1,arg2);
5903 0 : if ( bLocalUseExceptions ) {
5904 0 : popErrorHandler();
5905 : }
5906 : #ifndef SED_HACKS
5907 : if ( bLocalUseExceptions ) {
5908 : CPLErr eclass = CPLGetLastErrorType();
5909 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5910 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5911 : }
5912 : }
5913 : #endif
5914 : }
5915 0 : resultobj = SWIG_From_int(static_cast< int >(result));
5916 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5917 : return resultobj;
5918 : fail:
5919 : return NULL;
5920 : }
5921 :
5922 :
5923 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSameVertCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5924 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5925 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5926 0 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
5927 0 : void *argp1 = 0 ;
5928 0 : int res1 = 0 ;
5929 0 : void *argp2 = 0 ;
5930 0 : int res2 = 0 ;
5931 0 : PyObject *swig_obj[2] ;
5932 0 : int result;
5933 :
5934 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_IsSameVertCS", 2, 2, swig_obj)) SWIG_fail;
5935 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5936 0 : if (!SWIG_IsOK(res1)) {
5937 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSameVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5938 : }
5939 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5940 0 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5941 0 : if (!SWIG_IsOK(res2)) {
5942 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSameVertCS" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
5943 : }
5944 0 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
5945 0 : {
5946 0 : if (!arg2) {
5947 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5948 : }
5949 : }
5950 0 : {
5951 0 : const int bLocalUseExceptions = GetUseExceptions();
5952 0 : if ( bLocalUseExceptions ) {
5953 0 : pushErrorHandler();
5954 : }
5955 0 : result = (int)OSRSpatialReferenceShadow_IsSameVertCS(arg1,arg2);
5956 0 : if ( bLocalUseExceptions ) {
5957 0 : popErrorHandler();
5958 : }
5959 : #ifndef SED_HACKS
5960 : if ( bLocalUseExceptions ) {
5961 : CPLErr eclass = CPLGetLastErrorType();
5962 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5963 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5964 : }
5965 : }
5966 : #endif
5967 : }
5968 0 : resultobj = SWIG_From_int(static_cast< int >(result));
5969 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
5970 : return resultobj;
5971 : fail:
5972 : return NULL;
5973 : }
5974 :
5975 :
5976 242 : SWIGINTERN PyObject *_wrap_SpatialReference_IsGeographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5977 242 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
5978 242 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5979 242 : void *argp1 = 0 ;
5980 242 : int res1 = 0 ;
5981 242 : PyObject *swig_obj[1] ;
5982 242 : int result;
5983 :
5984 242 : if (!args) SWIG_fail;
5985 242 : swig_obj[0] = args;
5986 242 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5987 242 : if (!SWIG_IsOK(res1)) {
5988 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsGeographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5989 : }
5990 242 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5991 242 : {
5992 242 : const int bLocalUseExceptions = GetUseExceptions();
5993 242 : if ( bLocalUseExceptions ) {
5994 239 : pushErrorHandler();
5995 : }
5996 242 : result = (int)OSRSpatialReferenceShadow_IsGeographic(arg1);
5997 242 : if ( bLocalUseExceptions ) {
5998 239 : popErrorHandler();
5999 : }
6000 : #ifndef SED_HACKS
6001 : if ( bLocalUseExceptions ) {
6002 : CPLErr eclass = CPLGetLastErrorType();
6003 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6004 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6005 : }
6006 : }
6007 : #endif
6008 : }
6009 242 : resultobj = SWIG_From_int(static_cast< int >(result));
6010 242 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6011 : return resultobj;
6012 : fail:
6013 : return NULL;
6014 : }
6015 :
6016 :
6017 1 : SWIGINTERN PyObject *_wrap_SpatialReference_IsDerivedGeographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6018 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6019 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6020 1 : void *argp1 = 0 ;
6021 1 : int res1 = 0 ;
6022 1 : PyObject *swig_obj[1] ;
6023 1 : int result;
6024 :
6025 1 : if (!args) SWIG_fail;
6026 1 : swig_obj[0] = args;
6027 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6028 1 : if (!SWIG_IsOK(res1)) {
6029 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsDerivedGeographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6030 : }
6031 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6032 1 : {
6033 1 : const int bLocalUseExceptions = GetUseExceptions();
6034 1 : if ( bLocalUseExceptions ) {
6035 0 : pushErrorHandler();
6036 : }
6037 1 : result = (int)OSRSpatialReferenceShadow_IsDerivedGeographic(arg1);
6038 1 : if ( bLocalUseExceptions ) {
6039 0 : popErrorHandler();
6040 : }
6041 : #ifndef SED_HACKS
6042 : if ( bLocalUseExceptions ) {
6043 : CPLErr eclass = CPLGetLastErrorType();
6044 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6045 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6046 : }
6047 : }
6048 : #endif
6049 : }
6050 1 : resultobj = SWIG_From_int(static_cast< int >(result));
6051 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6052 : return resultobj;
6053 : fail:
6054 : return NULL;
6055 : }
6056 :
6057 :
6058 409 : SWIGINTERN PyObject *_wrap_SpatialReference_IsProjected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6059 409 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6060 409 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6061 409 : void *argp1 = 0 ;
6062 409 : int res1 = 0 ;
6063 409 : PyObject *swig_obj[1] ;
6064 409 : int result;
6065 :
6066 409 : if (!args) SWIG_fail;
6067 409 : swig_obj[0] = args;
6068 409 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6069 409 : if (!SWIG_IsOK(res1)) {
6070 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsProjected" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6071 : }
6072 409 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6073 409 : {
6074 409 : const int bLocalUseExceptions = GetUseExceptions();
6075 409 : if ( bLocalUseExceptions ) {
6076 407 : pushErrorHandler();
6077 : }
6078 409 : result = (int)OSRSpatialReferenceShadow_IsProjected(arg1);
6079 409 : if ( bLocalUseExceptions ) {
6080 407 : popErrorHandler();
6081 : }
6082 : #ifndef SED_HACKS
6083 : if ( bLocalUseExceptions ) {
6084 : CPLErr eclass = CPLGetLastErrorType();
6085 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6086 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6087 : }
6088 : }
6089 : #endif
6090 : }
6091 409 : resultobj = SWIG_From_int(static_cast< int >(result));
6092 409 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6093 : return resultobj;
6094 : fail:
6095 : return NULL;
6096 : }
6097 :
6098 :
6099 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsDerivedProjected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6100 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6101 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6102 0 : void *argp1 = 0 ;
6103 0 : int res1 = 0 ;
6104 0 : PyObject *swig_obj[1] ;
6105 0 : int result;
6106 :
6107 0 : if (!args) SWIG_fail;
6108 0 : swig_obj[0] = args;
6109 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6110 0 : if (!SWIG_IsOK(res1)) {
6111 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsDerivedProjected" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6112 : }
6113 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6114 0 : {
6115 0 : const int bLocalUseExceptions = GetUseExceptions();
6116 0 : if ( bLocalUseExceptions ) {
6117 0 : pushErrorHandler();
6118 : }
6119 0 : result = (int)OSRSpatialReferenceShadow_IsDerivedProjected(arg1);
6120 0 : if ( bLocalUseExceptions ) {
6121 0 : popErrorHandler();
6122 : }
6123 : #ifndef SED_HACKS
6124 : if ( bLocalUseExceptions ) {
6125 : CPLErr eclass = CPLGetLastErrorType();
6126 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6127 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6128 : }
6129 : }
6130 : #endif
6131 : }
6132 0 : resultobj = SWIG_From_int(static_cast< int >(result));
6133 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6134 : return resultobj;
6135 : fail:
6136 : return NULL;
6137 : }
6138 :
6139 :
6140 5 : SWIGINTERN PyObject *_wrap_SpatialReference_IsCompound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6141 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6142 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6143 5 : void *argp1 = 0 ;
6144 5 : int res1 = 0 ;
6145 5 : PyObject *swig_obj[1] ;
6146 5 : int result;
6147 :
6148 5 : if (!args) SWIG_fail;
6149 5 : swig_obj[0] = args;
6150 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6151 5 : if (!SWIG_IsOK(res1)) {
6152 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsCompound" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6153 : }
6154 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6155 5 : {
6156 5 : const int bLocalUseExceptions = GetUseExceptions();
6157 5 : if ( bLocalUseExceptions ) {
6158 3 : pushErrorHandler();
6159 : }
6160 5 : result = (int)OSRSpatialReferenceShadow_IsCompound(arg1);
6161 5 : if ( bLocalUseExceptions ) {
6162 3 : popErrorHandler();
6163 : }
6164 : #ifndef SED_HACKS
6165 : if ( bLocalUseExceptions ) {
6166 : CPLErr eclass = CPLGetLastErrorType();
6167 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6168 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6169 : }
6170 : }
6171 : #endif
6172 : }
6173 5 : resultobj = SWIG_From_int(static_cast< int >(result));
6174 5 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6175 : return resultobj;
6176 : fail:
6177 : return NULL;
6178 : }
6179 :
6180 :
6181 2 : SWIGINTERN PyObject *_wrap_SpatialReference_IsGeocentric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6182 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6183 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6184 2 : void *argp1 = 0 ;
6185 2 : int res1 = 0 ;
6186 2 : PyObject *swig_obj[1] ;
6187 2 : int result;
6188 :
6189 2 : if (!args) SWIG_fail;
6190 2 : swig_obj[0] = args;
6191 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6192 2 : if (!SWIG_IsOK(res1)) {
6193 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsGeocentric" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6194 : }
6195 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6196 2 : {
6197 2 : const int bLocalUseExceptions = GetUseExceptions();
6198 2 : if ( bLocalUseExceptions ) {
6199 2 : pushErrorHandler();
6200 : }
6201 2 : result = (int)OSRSpatialReferenceShadow_IsGeocentric(arg1);
6202 2 : if ( bLocalUseExceptions ) {
6203 2 : popErrorHandler();
6204 : }
6205 : #ifndef SED_HACKS
6206 : if ( bLocalUseExceptions ) {
6207 : CPLErr eclass = CPLGetLastErrorType();
6208 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6209 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6210 : }
6211 : }
6212 : #endif
6213 : }
6214 2 : resultobj = SWIG_From_int(static_cast< int >(result));
6215 2 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6216 : return resultobj;
6217 : fail:
6218 : return NULL;
6219 : }
6220 :
6221 :
6222 4 : SWIGINTERN PyObject *_wrap_SpatialReference_IsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6223 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6224 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6225 4 : void *argp1 = 0 ;
6226 4 : int res1 = 0 ;
6227 4 : PyObject *swig_obj[1] ;
6228 4 : int result;
6229 :
6230 4 : if (!args) SWIG_fail;
6231 4 : swig_obj[0] = args;
6232 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6233 4 : if (!SWIG_IsOK(res1)) {
6234 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsLocal" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6235 : }
6236 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6237 4 : {
6238 4 : const int bLocalUseExceptions = GetUseExceptions();
6239 4 : if ( bLocalUseExceptions ) {
6240 1 : pushErrorHandler();
6241 : }
6242 4 : result = (int)OSRSpatialReferenceShadow_IsLocal(arg1);
6243 4 : if ( bLocalUseExceptions ) {
6244 1 : popErrorHandler();
6245 : }
6246 : #ifndef SED_HACKS
6247 : if ( bLocalUseExceptions ) {
6248 : CPLErr eclass = CPLGetLastErrorType();
6249 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6250 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6251 : }
6252 : }
6253 : #endif
6254 : }
6255 4 : resultobj = SWIG_From_int(static_cast< int >(result));
6256 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6257 : return resultobj;
6258 : fail:
6259 : return NULL;
6260 : }
6261 :
6262 :
6263 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsVertical(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6264 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6265 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6266 0 : void *argp1 = 0 ;
6267 0 : int res1 = 0 ;
6268 0 : PyObject *swig_obj[1] ;
6269 0 : int result;
6270 :
6271 0 : if (!args) SWIG_fail;
6272 0 : swig_obj[0] = args;
6273 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6274 0 : if (!SWIG_IsOK(res1)) {
6275 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsVertical" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6276 : }
6277 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6278 0 : {
6279 0 : const int bLocalUseExceptions = GetUseExceptions();
6280 0 : if ( bLocalUseExceptions ) {
6281 0 : pushErrorHandler();
6282 : }
6283 0 : result = (int)OSRSpatialReferenceShadow_IsVertical(arg1);
6284 0 : if ( bLocalUseExceptions ) {
6285 0 : popErrorHandler();
6286 : }
6287 : #ifndef SED_HACKS
6288 : if ( bLocalUseExceptions ) {
6289 : CPLErr eclass = CPLGetLastErrorType();
6290 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6291 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6292 : }
6293 : }
6294 : #endif
6295 : }
6296 0 : resultobj = SWIG_From_int(static_cast< int >(result));
6297 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6298 : return resultobj;
6299 : fail:
6300 : return NULL;
6301 : }
6302 :
6303 :
6304 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsDynamic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6305 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6306 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6307 0 : void *argp1 = 0 ;
6308 0 : int res1 = 0 ;
6309 0 : PyObject *swig_obj[1] ;
6310 0 : bool result;
6311 :
6312 0 : if (!args) SWIG_fail;
6313 0 : swig_obj[0] = args;
6314 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6315 0 : if (!SWIG_IsOK(res1)) {
6316 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsDynamic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6317 : }
6318 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6319 0 : {
6320 0 : const int bLocalUseExceptions = GetUseExceptions();
6321 0 : if ( bLocalUseExceptions ) {
6322 0 : pushErrorHandler();
6323 : }
6324 0 : result = (bool)OSRSpatialReferenceShadow_IsDynamic(arg1);
6325 0 : if ( bLocalUseExceptions ) {
6326 0 : popErrorHandler();
6327 : }
6328 : #ifndef SED_HACKS
6329 : if ( bLocalUseExceptions ) {
6330 : CPLErr eclass = CPLGetLastErrorType();
6331 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6332 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6333 : }
6334 : }
6335 : #endif
6336 : }
6337 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
6338 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6339 : return resultobj;
6340 : fail:
6341 : return NULL;
6342 : }
6343 :
6344 :
6345 0 : SWIGINTERN PyObject *_wrap_SpatialReference_HasPointMotionOperation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6346 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6347 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6348 0 : void *argp1 = 0 ;
6349 0 : int res1 = 0 ;
6350 0 : PyObject *swig_obj[1] ;
6351 0 : bool result;
6352 :
6353 0 : if (!args) SWIG_fail;
6354 0 : swig_obj[0] = args;
6355 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6356 0 : if (!SWIG_IsOK(res1)) {
6357 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_HasPointMotionOperation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6358 : }
6359 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6360 0 : {
6361 0 : const int bLocalUseExceptions = GetUseExceptions();
6362 0 : if ( bLocalUseExceptions ) {
6363 0 : pushErrorHandler();
6364 : }
6365 0 : result = (bool)OSRSpatialReferenceShadow_HasPointMotionOperation(arg1);
6366 0 : if ( bLocalUseExceptions ) {
6367 0 : popErrorHandler();
6368 : }
6369 : #ifndef SED_HACKS
6370 : if ( bLocalUseExceptions ) {
6371 : CPLErr eclass = CPLGetLastErrorType();
6372 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6373 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6374 : }
6375 : }
6376 : #endif
6377 : }
6378 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
6379 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6380 : return resultobj;
6381 : fail:
6382 : return NULL;
6383 : }
6384 :
6385 :
6386 30 : SWIGINTERN PyObject *_wrap_SpatialReference_GetCoordinateEpoch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6387 30 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6388 30 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6389 30 : void *argp1 = 0 ;
6390 30 : int res1 = 0 ;
6391 30 : PyObject *swig_obj[1] ;
6392 30 : double result;
6393 :
6394 30 : if (!args) SWIG_fail;
6395 30 : swig_obj[0] = args;
6396 30 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6397 30 : if (!SWIG_IsOK(res1)) {
6398 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetCoordinateEpoch" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6399 : }
6400 30 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6401 30 : {
6402 30 : const int bLocalUseExceptions = GetUseExceptions();
6403 30 : if ( bLocalUseExceptions ) {
6404 16 : pushErrorHandler();
6405 : }
6406 30 : result = (double)OSRSpatialReferenceShadow_GetCoordinateEpoch(arg1);
6407 30 : if ( bLocalUseExceptions ) {
6408 16 : popErrorHandler();
6409 : }
6410 : #ifndef SED_HACKS
6411 : if ( bLocalUseExceptions ) {
6412 : CPLErr eclass = CPLGetLastErrorType();
6413 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6414 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6415 : }
6416 : }
6417 : #endif
6418 : }
6419 30 : resultobj = SWIG_From_double(static_cast< double >(result));
6420 30 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6421 : return resultobj;
6422 : fail:
6423 : return NULL;
6424 : }
6425 :
6426 :
6427 31 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCoordinateEpoch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6428 31 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6429 31 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6430 31 : double arg2 ;
6431 31 : void *argp1 = 0 ;
6432 31 : int res1 = 0 ;
6433 31 : double val2 ;
6434 31 : int ecode2 = 0 ;
6435 31 : PyObject *swig_obj[2] ;
6436 :
6437 31 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetCoordinateEpoch", 2, 2, swig_obj)) SWIG_fail;
6438 31 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6439 31 : if (!SWIG_IsOK(res1)) {
6440 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCoordinateEpoch" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6441 : }
6442 31 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6443 31 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
6444 31 : if (!SWIG_IsOK(ecode2)) {
6445 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCoordinateEpoch" "', argument " "2"" of type '" "double""'");
6446 : }
6447 31 : arg2 = static_cast< double >(val2);
6448 31 : {
6449 31 : const int bLocalUseExceptions = GetUseExceptions();
6450 31 : if ( bLocalUseExceptions ) {
6451 17 : pushErrorHandler();
6452 : }
6453 31 : OSRSpatialReferenceShadow_SetCoordinateEpoch(arg1,arg2);
6454 31 : if ( bLocalUseExceptions ) {
6455 17 : popErrorHandler();
6456 : }
6457 : #ifndef SED_HACKS
6458 : if ( bLocalUseExceptions ) {
6459 : CPLErr eclass = CPLGetLastErrorType();
6460 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6461 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6462 : }
6463 : }
6464 : #endif
6465 : }
6466 31 : resultobj = SWIG_Py_Void();
6467 31 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6468 : return resultobj;
6469 : fail:
6470 : return NULL;
6471 : }
6472 :
6473 :
6474 179 : SWIGINTERN PyObject *_wrap_SpatialReference_EPSGTreatsAsLatLong(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6475 179 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6476 179 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6477 179 : void *argp1 = 0 ;
6478 179 : int res1 = 0 ;
6479 179 : PyObject *swig_obj[1] ;
6480 179 : int result;
6481 :
6482 179 : if (!args) SWIG_fail;
6483 179 : swig_obj[0] = args;
6484 179 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6485 179 : if (!SWIG_IsOK(res1)) {
6486 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_EPSGTreatsAsLatLong" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6487 : }
6488 179 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6489 179 : {
6490 179 : const int bLocalUseExceptions = GetUseExceptions();
6491 179 : if ( bLocalUseExceptions ) {
6492 179 : pushErrorHandler();
6493 : }
6494 179 : result = (int)OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(arg1);
6495 179 : if ( bLocalUseExceptions ) {
6496 179 : popErrorHandler();
6497 : }
6498 : #ifndef SED_HACKS
6499 : if ( bLocalUseExceptions ) {
6500 : CPLErr eclass = CPLGetLastErrorType();
6501 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6502 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6503 : }
6504 : }
6505 : #endif
6506 : }
6507 179 : resultobj = SWIG_From_int(static_cast< int >(result));
6508 179 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6509 : return resultobj;
6510 : fail:
6511 : return NULL;
6512 : }
6513 :
6514 :
6515 186 : SWIGINTERN PyObject *_wrap_SpatialReference_EPSGTreatsAsNorthingEasting(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6516 186 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6517 186 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6518 186 : void *argp1 = 0 ;
6519 186 : int res1 = 0 ;
6520 186 : PyObject *swig_obj[1] ;
6521 186 : int result;
6522 :
6523 186 : if (!args) SWIG_fail;
6524 186 : swig_obj[0] = args;
6525 186 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6526 186 : if (!SWIG_IsOK(res1)) {
6527 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_EPSGTreatsAsNorthingEasting" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6528 : }
6529 186 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6530 186 : {
6531 186 : const int bLocalUseExceptions = GetUseExceptions();
6532 186 : if ( bLocalUseExceptions ) {
6533 186 : pushErrorHandler();
6534 : }
6535 186 : result = (int)OSRSpatialReferenceShadow_EPSGTreatsAsNorthingEasting(arg1);
6536 186 : if ( bLocalUseExceptions ) {
6537 186 : popErrorHandler();
6538 : }
6539 : #ifndef SED_HACKS
6540 : if ( bLocalUseExceptions ) {
6541 : CPLErr eclass = CPLGetLastErrorType();
6542 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6543 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6544 : }
6545 : }
6546 : #endif
6547 : }
6548 186 : resultobj = SWIG_From_int(static_cast< int >(result));
6549 186 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6550 : return resultobj;
6551 : fail:
6552 : return NULL;
6553 : }
6554 :
6555 :
6556 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAuthority(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6557 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6558 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6559 0 : char *arg2 = (char *) 0 ;
6560 0 : char *arg3 = (char *) 0 ;
6561 0 : int arg4 ;
6562 0 : void *argp1 = 0 ;
6563 0 : int res1 = 0 ;
6564 0 : int res2 ;
6565 0 : char *buf2 = 0 ;
6566 0 : int alloc2 = 0 ;
6567 0 : int res3 ;
6568 0 : char *buf3 = 0 ;
6569 0 : int alloc3 = 0 ;
6570 0 : int val4 ;
6571 0 : int ecode4 = 0 ;
6572 0 : PyObject *swig_obj[4] ;
6573 0 : OGRErr result;
6574 :
6575 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAuthority", 4, 4, swig_obj)) SWIG_fail;
6576 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6577 0 : if (!SWIG_IsOK(res1)) {
6578 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAuthority" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6579 : }
6580 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6581 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6582 0 : if (!SWIG_IsOK(res2)) {
6583 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAuthority" "', argument " "2"" of type '" "char const *""'");
6584 : }
6585 0 : arg2 = reinterpret_cast< char * >(buf2);
6586 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6587 0 : if (!SWIG_IsOK(res3)) {
6588 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetAuthority" "', argument " "3"" of type '" "char const *""'");
6589 : }
6590 0 : arg3 = reinterpret_cast< char * >(buf3);
6591 0 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
6592 0 : if (!SWIG_IsOK(ecode4)) {
6593 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetAuthority" "', argument " "4"" of type '" "int""'");
6594 : }
6595 0 : arg4 = static_cast< int >(val4);
6596 0 : {
6597 0 : const int bLocalUseExceptions = GetUseExceptions();
6598 0 : if ( bLocalUseExceptions ) {
6599 0 : pushErrorHandler();
6600 : }
6601 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAuthority(arg1,(char const *)arg2,(char const *)arg3,arg4);
6602 0 : if ( bLocalUseExceptions ) {
6603 0 : popErrorHandler();
6604 : }
6605 : #ifndef SED_HACKS
6606 : if ( bLocalUseExceptions ) {
6607 : CPLErr eclass = CPLGetLastErrorType();
6608 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6609 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6610 : }
6611 : }
6612 : #endif
6613 : }
6614 0 : {
6615 : /* %typemap(out) OGRErr */
6616 0 : if ( result != 0 && GetUseExceptions()) {
6617 0 : const char* pszMessage = CPLGetLastErrorMsg();
6618 0 : if( pszMessage[0] != '\0' )
6619 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
6620 : else
6621 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6622 0 : SWIG_fail;
6623 : }
6624 : }
6625 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6626 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6627 0 : {
6628 : /* %typemap(ret) OGRErr */
6629 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
6630 0 : resultobj = PyInt_FromLong( result );
6631 : }
6632 : }
6633 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6634 : return resultobj;
6635 0 : fail:
6636 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6637 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6638 : return NULL;
6639 : }
6640 :
6641 :
6642 34 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAttrValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6643 34 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6644 34 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6645 34 : char *arg2 = (char *) 0 ;
6646 34 : int arg3 = (int) 0 ;
6647 34 : void *argp1 = 0 ;
6648 34 : int res1 = 0 ;
6649 34 : int res2 ;
6650 34 : char *buf2 = 0 ;
6651 34 : int alloc2 = 0 ;
6652 34 : int val3 ;
6653 34 : int ecode3 = 0 ;
6654 34 : PyObject *swig_obj[3] ;
6655 34 : char *result = 0 ;
6656 :
6657 34 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAttrValue", 2, 3, swig_obj)) SWIG_fail;
6658 34 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6659 34 : if (!SWIG_IsOK(res1)) {
6660 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAttrValue" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6661 : }
6662 34 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6663 34 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6664 34 : if (!SWIG_IsOK(res2)) {
6665 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAttrValue" "', argument " "2"" of type '" "char const *""'");
6666 : }
6667 34 : arg2 = reinterpret_cast< char * >(buf2);
6668 34 : if (swig_obj[2]) {
6669 6 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
6670 6 : if (!SWIG_IsOK(ecode3)) {
6671 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAttrValue" "', argument " "3"" of type '" "int""'");
6672 : }
6673 : arg3 = static_cast< int >(val3);
6674 : }
6675 34 : {
6676 34 : if (!arg2) {
6677 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6678 : }
6679 : }
6680 34 : {
6681 34 : const int bLocalUseExceptions = GetUseExceptions();
6682 34 : if ( bLocalUseExceptions ) {
6683 21 : pushErrorHandler();
6684 : }
6685 34 : result = (char *)OSRSpatialReferenceShadow_GetAttrValue(arg1,(char const *)arg2,arg3);
6686 34 : if ( bLocalUseExceptions ) {
6687 21 : popErrorHandler();
6688 : }
6689 : #ifndef SED_HACKS
6690 : if ( bLocalUseExceptions ) {
6691 : CPLErr eclass = CPLGetLastErrorType();
6692 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6693 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6694 : }
6695 : }
6696 : #endif
6697 : }
6698 34 : resultobj = SWIG_FromCharPtr((const char *)result);
6699 34 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6700 34 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6701 : return resultobj;
6702 0 : fail:
6703 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6704 : return NULL;
6705 : }
6706 :
6707 :
6708 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAttrValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6709 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6710 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6711 1 : char *arg2 = (char *) 0 ;
6712 1 : char *arg3 = (char *) 0 ;
6713 1 : void *argp1 = 0 ;
6714 1 : int res1 = 0 ;
6715 1 : int res2 ;
6716 1 : char *buf2 = 0 ;
6717 1 : int alloc2 = 0 ;
6718 1 : int res3 ;
6719 1 : char *buf3 = 0 ;
6720 1 : int alloc3 = 0 ;
6721 1 : PyObject *swig_obj[3] ;
6722 1 : OGRErr result;
6723 :
6724 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAttrValue", 3, 3, swig_obj)) SWIG_fail;
6725 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6726 1 : if (!SWIG_IsOK(res1)) {
6727 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAttrValue" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6728 : }
6729 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6730 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6731 1 : if (!SWIG_IsOK(res2)) {
6732 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAttrValue" "', argument " "2"" of type '" "char const *""'");
6733 : }
6734 1 : arg2 = reinterpret_cast< char * >(buf2);
6735 1 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6736 1 : if (!SWIG_IsOK(res3)) {
6737 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetAttrValue" "', argument " "3"" of type '" "char const *""'");
6738 : }
6739 1 : arg3 = reinterpret_cast< char * >(buf3);
6740 1 : {
6741 1 : if (!arg2) {
6742 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6743 : }
6744 : }
6745 1 : {
6746 1 : const int bLocalUseExceptions = GetUseExceptions();
6747 1 : if ( bLocalUseExceptions ) {
6748 1 : pushErrorHandler();
6749 : }
6750 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetAttrValue(arg1,(char const *)arg2,(char const *)arg3);
6751 1 : if ( bLocalUseExceptions ) {
6752 1 : popErrorHandler();
6753 : }
6754 : #ifndef SED_HACKS
6755 : if ( bLocalUseExceptions ) {
6756 : CPLErr eclass = CPLGetLastErrorType();
6757 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6758 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6759 : }
6760 : }
6761 : #endif
6762 : }
6763 1 : {
6764 : /* %typemap(out) OGRErr */
6765 1 : if ( result != 0 && GetUseExceptions()) {
6766 0 : const char* pszMessage = CPLGetLastErrorMsg();
6767 0 : if( pszMessage[0] != '\0' )
6768 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
6769 : else
6770 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6771 0 : SWIG_fail;
6772 : }
6773 : }
6774 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6775 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6776 1 : {
6777 : /* %typemap(ret) OGRErr */
6778 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
6779 1 : resultobj = PyInt_FromLong( result );
6780 : }
6781 : }
6782 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6783 : return resultobj;
6784 0 : fail:
6785 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6786 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
6787 : return NULL;
6788 : }
6789 :
6790 :
6791 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAngularUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6792 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6793 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6794 0 : char *arg2 = (char *) 0 ;
6795 0 : double arg3 ;
6796 0 : void *argp1 = 0 ;
6797 0 : int res1 = 0 ;
6798 0 : int res2 ;
6799 0 : char *buf2 = 0 ;
6800 0 : int alloc2 = 0 ;
6801 0 : double val3 ;
6802 0 : int ecode3 = 0 ;
6803 0 : PyObject *swig_obj[3] ;
6804 0 : OGRErr result;
6805 :
6806 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAngularUnits", 3, 3, swig_obj)) SWIG_fail;
6807 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6808 0 : if (!SWIG_IsOK(res1)) {
6809 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAngularUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6810 : }
6811 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6812 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6813 0 : if (!SWIG_IsOK(res2)) {
6814 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAngularUnits" "', argument " "2"" of type '" "char const *""'");
6815 : }
6816 0 : arg2 = reinterpret_cast< char * >(buf2);
6817 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
6818 0 : if (!SWIG_IsOK(ecode3)) {
6819 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetAngularUnits" "', argument " "3"" of type '" "double""'");
6820 : }
6821 0 : arg3 = static_cast< double >(val3);
6822 0 : {
6823 0 : if (!arg2) {
6824 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6825 : }
6826 : }
6827 0 : {
6828 0 : const int bLocalUseExceptions = GetUseExceptions();
6829 0 : if ( bLocalUseExceptions ) {
6830 0 : pushErrorHandler();
6831 : }
6832 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAngularUnits(arg1,(char const *)arg2,arg3);
6833 0 : if ( bLocalUseExceptions ) {
6834 0 : popErrorHandler();
6835 : }
6836 : #ifndef SED_HACKS
6837 : if ( bLocalUseExceptions ) {
6838 : CPLErr eclass = CPLGetLastErrorType();
6839 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6840 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6841 : }
6842 : }
6843 : #endif
6844 : }
6845 0 : {
6846 : /* %typemap(out) OGRErr */
6847 0 : if ( result != 0 && GetUseExceptions()) {
6848 0 : const char* pszMessage = CPLGetLastErrorMsg();
6849 0 : if( pszMessage[0] != '\0' )
6850 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
6851 : else
6852 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6853 0 : SWIG_fail;
6854 : }
6855 : }
6856 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6857 0 : {
6858 : /* %typemap(ret) OGRErr */
6859 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
6860 0 : resultobj = PyInt_FromLong( result );
6861 : }
6862 : }
6863 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6864 : return resultobj;
6865 0 : fail:
6866 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
6867 : return NULL;
6868 : }
6869 :
6870 :
6871 0 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAngularUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6872 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6873 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6874 0 : void *argp1 = 0 ;
6875 0 : int res1 = 0 ;
6876 0 : PyObject *swig_obj[1] ;
6877 0 : double result;
6878 :
6879 0 : if (!args) SWIG_fail;
6880 0 : swig_obj[0] = args;
6881 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6882 0 : if (!SWIG_IsOK(res1)) {
6883 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAngularUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6884 : }
6885 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6886 0 : {
6887 0 : const int bLocalUseExceptions = GetUseExceptions();
6888 0 : if ( bLocalUseExceptions ) {
6889 0 : pushErrorHandler();
6890 : }
6891 0 : result = (double)OSRSpatialReferenceShadow_GetAngularUnits(arg1);
6892 0 : if ( bLocalUseExceptions ) {
6893 0 : popErrorHandler();
6894 : }
6895 : #ifndef SED_HACKS
6896 : if ( bLocalUseExceptions ) {
6897 : CPLErr eclass = CPLGetLastErrorType();
6898 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6899 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6900 : }
6901 : }
6902 : #endif
6903 : }
6904 0 : resultobj = SWIG_From_double(static_cast< double >(result));
6905 0 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6906 : return resultobj;
6907 : fail:
6908 : return NULL;
6909 : }
6910 :
6911 :
6912 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAngularUnitsName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6913 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6914 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6915 1 : void *argp1 = 0 ;
6916 1 : int res1 = 0 ;
6917 1 : PyObject *swig_obj[1] ;
6918 1 : char *result = 0 ;
6919 :
6920 1 : if (!args) SWIG_fail;
6921 1 : swig_obj[0] = args;
6922 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6923 1 : if (!SWIG_IsOK(res1)) {
6924 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAngularUnitsName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6925 : }
6926 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6927 1 : {
6928 1 : const int bLocalUseExceptions = GetUseExceptions();
6929 1 : if ( bLocalUseExceptions ) {
6930 1 : pushErrorHandler();
6931 : }
6932 1 : result = (char *)OSRSpatialReferenceShadow_GetAngularUnitsName(arg1);
6933 1 : if ( bLocalUseExceptions ) {
6934 1 : popErrorHandler();
6935 : }
6936 : #ifndef SED_HACKS
6937 : if ( bLocalUseExceptions ) {
6938 : CPLErr eclass = CPLGetLastErrorType();
6939 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6940 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6941 : }
6942 : }
6943 : #endif
6944 : }
6945 1 : resultobj = SWIG_FromCharPtr((const char *)result);
6946 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
6947 : return resultobj;
6948 : fail:
6949 : return NULL;
6950 : }
6951 :
6952 :
6953 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTargetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6954 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
6955 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6956 1 : char *arg2 = (char *) 0 ;
6957 1 : char *arg3 = (char *) 0 ;
6958 1 : double arg4 ;
6959 1 : void *argp1 = 0 ;
6960 1 : int res1 = 0 ;
6961 1 : int res2 ;
6962 1 : char *buf2 = 0 ;
6963 1 : int alloc2 = 0 ;
6964 1 : int res3 ;
6965 1 : char *buf3 = 0 ;
6966 1 : int alloc3 = 0 ;
6967 1 : double val4 ;
6968 1 : int ecode4 = 0 ;
6969 1 : PyObject *swig_obj[4] ;
6970 1 : OGRErr result;
6971 :
6972 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetTargetLinearUnits", 4, 4, swig_obj)) SWIG_fail;
6973 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6974 1 : if (!SWIG_IsOK(res1)) {
6975 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6976 : }
6977 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6978 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
6979 1 : if (!SWIG_IsOK(res2)) {
6980 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "2"" of type '" "char const *""'");
6981 : }
6982 1 : arg2 = reinterpret_cast< char * >(buf2);
6983 1 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
6984 1 : if (!SWIG_IsOK(res3)) {
6985 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "3"" of type '" "char const *""'");
6986 : }
6987 1 : arg3 = reinterpret_cast< char * >(buf3);
6988 1 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
6989 1 : if (!SWIG_IsOK(ecode4)) {
6990 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "4"" of type '" "double""'");
6991 : }
6992 1 : arg4 = static_cast< double >(val4);
6993 1 : {
6994 1 : if (!arg3) {
6995 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
6996 : }
6997 : }
6998 1 : {
6999 1 : const int bLocalUseExceptions = GetUseExceptions();
7000 1 : if ( bLocalUseExceptions ) {
7001 1 : pushErrorHandler();
7002 : }
7003 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetTargetLinearUnits(arg1,(char const *)arg2,(char const *)arg3,arg4);
7004 1 : if ( bLocalUseExceptions ) {
7005 1 : popErrorHandler();
7006 : }
7007 : #ifndef SED_HACKS
7008 : if ( bLocalUseExceptions ) {
7009 : CPLErr eclass = CPLGetLastErrorType();
7010 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7011 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7012 : }
7013 : }
7014 : #endif
7015 : }
7016 1 : {
7017 : /* %typemap(out) OGRErr */
7018 1 : if ( result != 0 && GetUseExceptions()) {
7019 0 : const char* pszMessage = CPLGetLastErrorMsg();
7020 0 : if( pszMessage[0] != '\0' )
7021 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7022 : else
7023 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7024 0 : SWIG_fail;
7025 : }
7026 : }
7027 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7028 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7029 1 : {
7030 : /* %typemap(ret) OGRErr */
7031 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7032 1 : resultobj = PyInt_FromLong( result );
7033 : }
7034 : }
7035 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7036 : return resultobj;
7037 0 : fail:
7038 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7039 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
7040 : return NULL;
7041 : }
7042 :
7043 :
7044 6 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7045 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7046 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7047 6 : char *arg2 = (char *) 0 ;
7048 6 : double arg3 ;
7049 6 : void *argp1 = 0 ;
7050 6 : int res1 = 0 ;
7051 6 : int res2 ;
7052 6 : char *buf2 = 0 ;
7053 6 : int alloc2 = 0 ;
7054 6 : double val3 ;
7055 6 : int ecode3 = 0 ;
7056 6 : PyObject *swig_obj[3] ;
7057 6 : OGRErr result;
7058 :
7059 6 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetLinearUnits", 3, 3, swig_obj)) SWIG_fail;
7060 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7061 6 : if (!SWIG_IsOK(res1)) {
7062 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7063 : }
7064 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7065 6 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7066 6 : if (!SWIG_IsOK(res2)) {
7067 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLinearUnits" "', argument " "2"" of type '" "char const *""'");
7068 : }
7069 6 : arg2 = reinterpret_cast< char * >(buf2);
7070 6 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
7071 6 : if (!SWIG_IsOK(ecode3)) {
7072 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLinearUnits" "', argument " "3"" of type '" "double""'");
7073 : }
7074 6 : arg3 = static_cast< double >(val3);
7075 6 : {
7076 6 : if (!arg2) {
7077 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
7078 : }
7079 : }
7080 6 : {
7081 6 : const int bLocalUseExceptions = GetUseExceptions();
7082 6 : if ( bLocalUseExceptions ) {
7083 6 : pushErrorHandler();
7084 : }
7085 6 : result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnits(arg1,(char const *)arg2,arg3);
7086 6 : if ( bLocalUseExceptions ) {
7087 6 : popErrorHandler();
7088 : }
7089 : #ifndef SED_HACKS
7090 : if ( bLocalUseExceptions ) {
7091 : CPLErr eclass = CPLGetLastErrorType();
7092 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7093 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7094 : }
7095 : }
7096 : #endif
7097 : }
7098 6 : {
7099 : /* %typemap(out) OGRErr */
7100 6 : if ( result != 0 && GetUseExceptions()) {
7101 0 : const char* pszMessage = CPLGetLastErrorMsg();
7102 0 : if( pszMessage[0] != '\0' )
7103 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7104 : else
7105 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7106 0 : SWIG_fail;
7107 : }
7108 : }
7109 6 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7110 6 : {
7111 : /* %typemap(ret) OGRErr */
7112 6 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7113 6 : resultobj = PyInt_FromLong( result );
7114 : }
7115 : }
7116 6 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7117 : return resultobj;
7118 0 : fail:
7119 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7120 : return NULL;
7121 : }
7122 :
7123 :
7124 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLinearUnitsAndUpdateParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7125 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7126 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7127 1 : char *arg2 = (char *) 0 ;
7128 1 : double arg3 ;
7129 1 : void *argp1 = 0 ;
7130 1 : int res1 = 0 ;
7131 1 : int res2 ;
7132 1 : char *buf2 = 0 ;
7133 1 : int alloc2 = 0 ;
7134 1 : double val3 ;
7135 1 : int ecode3 = 0 ;
7136 1 : PyObject *swig_obj[3] ;
7137 1 : OGRErr result;
7138 :
7139 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetLinearUnitsAndUpdateParameters", 3, 3, swig_obj)) SWIG_fail;
7140 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7141 1 : if (!SWIG_IsOK(res1)) {
7142 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7143 : }
7144 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7145 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7146 1 : if (!SWIG_IsOK(res2)) {
7147 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "2"" of type '" "char const *""'");
7148 : }
7149 1 : arg2 = reinterpret_cast< char * >(buf2);
7150 1 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
7151 1 : if (!SWIG_IsOK(ecode3)) {
7152 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "3"" of type '" "double""'");
7153 : }
7154 1 : arg3 = static_cast< double >(val3);
7155 1 : {
7156 1 : if (!arg2) {
7157 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
7158 : }
7159 : }
7160 1 : {
7161 1 : const int bLocalUseExceptions = GetUseExceptions();
7162 1 : if ( bLocalUseExceptions ) {
7163 1 : pushErrorHandler();
7164 : }
7165 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(arg1,(char const *)arg2,arg3);
7166 1 : if ( bLocalUseExceptions ) {
7167 1 : popErrorHandler();
7168 : }
7169 : #ifndef SED_HACKS
7170 : if ( bLocalUseExceptions ) {
7171 : CPLErr eclass = CPLGetLastErrorType();
7172 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7173 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7174 : }
7175 : }
7176 : #endif
7177 : }
7178 1 : {
7179 : /* %typemap(out) OGRErr */
7180 1 : if ( result != 0 && GetUseExceptions()) {
7181 0 : const char* pszMessage = CPLGetLastErrorMsg();
7182 0 : if( pszMessage[0] != '\0' )
7183 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7184 : else
7185 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7186 0 : SWIG_fail;
7187 : }
7188 : }
7189 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7190 1 : {
7191 : /* %typemap(ret) OGRErr */
7192 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7193 1 : resultobj = PyInt_FromLong( result );
7194 : }
7195 : }
7196 1 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7197 : return resultobj;
7198 0 : fail:
7199 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7200 : return NULL;
7201 : }
7202 :
7203 :
7204 4 : SWIGINTERN PyObject *_wrap_SpatialReference_GetTargetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7205 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7206 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7207 4 : char *arg2 = (char *) 0 ;
7208 4 : void *argp1 = 0 ;
7209 4 : int res1 = 0 ;
7210 4 : int res2 ;
7211 4 : char *buf2 = 0 ;
7212 4 : int alloc2 = 0 ;
7213 4 : PyObject *swig_obj[2] ;
7214 4 : double result;
7215 :
7216 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetTargetLinearUnits", 2, 2, swig_obj)) SWIG_fail;
7217 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7218 4 : if (!SWIG_IsOK(res1)) {
7219 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetTargetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7220 : }
7221 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7222 4 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7223 4 : if (!SWIG_IsOK(res2)) {
7224 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetTargetLinearUnits" "', argument " "2"" of type '" "char const *""'");
7225 : }
7226 4 : arg2 = reinterpret_cast< char * >(buf2);
7227 4 : {
7228 4 : const int bLocalUseExceptions = GetUseExceptions();
7229 4 : if ( bLocalUseExceptions ) {
7230 4 : pushErrorHandler();
7231 : }
7232 4 : result = (double)OSRSpatialReferenceShadow_GetTargetLinearUnits(arg1,(char const *)arg2);
7233 4 : if ( bLocalUseExceptions ) {
7234 4 : popErrorHandler();
7235 : }
7236 : #ifndef SED_HACKS
7237 : if ( bLocalUseExceptions ) {
7238 : CPLErr eclass = CPLGetLastErrorType();
7239 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7240 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7241 : }
7242 : }
7243 : #endif
7244 : }
7245 4 : resultobj = SWIG_From_double(static_cast< double >(result));
7246 4 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7247 4 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7248 : return resultobj;
7249 0 : fail:
7250 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7251 : return NULL;
7252 : }
7253 :
7254 :
7255 202 : SWIGINTERN PyObject *_wrap_SpatialReference_GetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7256 202 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7257 202 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7258 202 : void *argp1 = 0 ;
7259 202 : int res1 = 0 ;
7260 202 : PyObject *swig_obj[1] ;
7261 202 : double result;
7262 :
7263 202 : if (!args) SWIG_fail;
7264 202 : swig_obj[0] = args;
7265 202 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7266 202 : if (!SWIG_IsOK(res1)) {
7267 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7268 : }
7269 202 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7270 202 : {
7271 202 : const int bLocalUseExceptions = GetUseExceptions();
7272 202 : if ( bLocalUseExceptions ) {
7273 200 : pushErrorHandler();
7274 : }
7275 202 : result = (double)OSRSpatialReferenceShadow_GetLinearUnits(arg1);
7276 202 : if ( bLocalUseExceptions ) {
7277 200 : popErrorHandler();
7278 : }
7279 : #ifndef SED_HACKS
7280 : if ( bLocalUseExceptions ) {
7281 : CPLErr eclass = CPLGetLastErrorType();
7282 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7283 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7284 : }
7285 : }
7286 : #endif
7287 : }
7288 202 : resultobj = SWIG_From_double(static_cast< double >(result));
7289 202 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7290 : return resultobj;
7291 : fail:
7292 : return NULL;
7293 : }
7294 :
7295 :
7296 24 : SWIGINTERN PyObject *_wrap_SpatialReference_GetLinearUnitsName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7297 24 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7298 24 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7299 24 : void *argp1 = 0 ;
7300 24 : int res1 = 0 ;
7301 24 : PyObject *swig_obj[1] ;
7302 24 : char *result = 0 ;
7303 :
7304 24 : if (!args) SWIG_fail;
7305 24 : swig_obj[0] = args;
7306 24 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7307 24 : if (!SWIG_IsOK(res1)) {
7308 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetLinearUnitsName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7309 : }
7310 24 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7311 24 : {
7312 24 : const int bLocalUseExceptions = GetUseExceptions();
7313 24 : if ( bLocalUseExceptions ) {
7314 24 : pushErrorHandler();
7315 : }
7316 24 : result = (char *)OSRSpatialReferenceShadow_GetLinearUnitsName(arg1);
7317 24 : if ( bLocalUseExceptions ) {
7318 24 : popErrorHandler();
7319 : }
7320 : #ifndef SED_HACKS
7321 : if ( bLocalUseExceptions ) {
7322 : CPLErr eclass = CPLGetLastErrorType();
7323 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7324 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7325 : }
7326 : }
7327 : #endif
7328 : }
7329 24 : resultobj = SWIG_FromCharPtr((const char *)result);
7330 24 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7331 : return resultobj;
7332 : fail:
7333 : return NULL;
7334 : }
7335 :
7336 :
7337 555 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAuthorityCode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7338 555 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7339 555 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7340 555 : char *arg2 = (char *) 0 ;
7341 555 : void *argp1 = 0 ;
7342 555 : int res1 = 0 ;
7343 555 : int res2 ;
7344 555 : char *buf2 = 0 ;
7345 555 : int alloc2 = 0 ;
7346 555 : PyObject *swig_obj[2] ;
7347 555 : char *result = 0 ;
7348 :
7349 555 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAuthorityCode", 2, 2, swig_obj)) SWIG_fail;
7350 555 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7351 555 : if (!SWIG_IsOK(res1)) {
7352 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAuthorityCode" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7353 : }
7354 555 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7355 555 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7356 555 : if (!SWIG_IsOK(res2)) {
7357 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAuthorityCode" "', argument " "2"" of type '" "char const *""'");
7358 : }
7359 555 : arg2 = reinterpret_cast< char * >(buf2);
7360 555 : {
7361 555 : const int bLocalUseExceptions = GetUseExceptions();
7362 555 : if ( bLocalUseExceptions ) {
7363 275 : pushErrorHandler();
7364 : }
7365 555 : result = (char *)OSRSpatialReferenceShadow_GetAuthorityCode(arg1,(char const *)arg2);
7366 555 : if ( bLocalUseExceptions ) {
7367 275 : popErrorHandler();
7368 : }
7369 : #ifndef SED_HACKS
7370 : if ( bLocalUseExceptions ) {
7371 : CPLErr eclass = CPLGetLastErrorType();
7372 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7373 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7374 : }
7375 : }
7376 : #endif
7377 : }
7378 555 : resultobj = SWIG_FromCharPtr((const char *)result);
7379 555 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7380 555 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7381 : return resultobj;
7382 0 : fail:
7383 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7384 : return NULL;
7385 : }
7386 :
7387 :
7388 44 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAuthorityName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7389 44 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7390 44 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7391 44 : char *arg2 = (char *) 0 ;
7392 44 : void *argp1 = 0 ;
7393 44 : int res1 = 0 ;
7394 44 : int res2 ;
7395 44 : char *buf2 = 0 ;
7396 44 : int alloc2 = 0 ;
7397 44 : PyObject *swig_obj[2] ;
7398 44 : char *result = 0 ;
7399 :
7400 44 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAuthorityName", 2, 2, swig_obj)) SWIG_fail;
7401 44 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7402 44 : if (!SWIG_IsOK(res1)) {
7403 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAuthorityName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7404 : }
7405 44 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7406 44 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7407 44 : if (!SWIG_IsOK(res2)) {
7408 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAuthorityName" "', argument " "2"" of type '" "char const *""'");
7409 : }
7410 44 : arg2 = reinterpret_cast< char * >(buf2);
7411 44 : {
7412 44 : const int bLocalUseExceptions = GetUseExceptions();
7413 44 : if ( bLocalUseExceptions ) {
7414 42 : pushErrorHandler();
7415 : }
7416 44 : result = (char *)OSRSpatialReferenceShadow_GetAuthorityName(arg1,(char const *)arg2);
7417 44 : if ( bLocalUseExceptions ) {
7418 42 : popErrorHandler();
7419 : }
7420 : #ifndef SED_HACKS
7421 : if ( bLocalUseExceptions ) {
7422 : CPLErr eclass = CPLGetLastErrorType();
7423 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7424 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7425 : }
7426 : }
7427 : #endif
7428 : }
7429 44 : resultobj = SWIG_FromCharPtr((const char *)result);
7430 44 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7431 44 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7432 : return resultobj;
7433 0 : fail:
7434 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7435 : return NULL;
7436 : }
7437 :
7438 :
7439 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAreaOfUse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7440 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7441 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7442 1 : void *argp1 = 0 ;
7443 1 : int res1 = 0 ;
7444 1 : PyObject *swig_obj[1] ;
7445 1 : OSRAreaOfUse *result = 0 ;
7446 :
7447 1 : if (!args) SWIG_fail;
7448 1 : swig_obj[0] = args;
7449 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7450 1 : if (!SWIG_IsOK(res1)) {
7451 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAreaOfUse" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7452 : }
7453 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7454 1 : {
7455 1 : const int bLocalUseExceptions = GetUseExceptions();
7456 1 : if ( bLocalUseExceptions ) {
7457 1 : pushErrorHandler();
7458 : }
7459 1 : result = (OSRAreaOfUse *)OSRSpatialReferenceShadow_GetAreaOfUse(arg1);
7460 1 : if ( bLocalUseExceptions ) {
7461 1 : popErrorHandler();
7462 : }
7463 : #ifndef SED_HACKS
7464 : if ( bLocalUseExceptions ) {
7465 : CPLErr eclass = CPLGetLastErrorType();
7466 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7467 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7468 : }
7469 : }
7470 : #endif
7471 : }
7472 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRAreaOfUse, SWIG_POINTER_OWN | 0 );
7473 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; } }
7474 : return resultobj;
7475 : fail:
7476 : return NULL;
7477 : }
7478 :
7479 :
7480 6 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxisName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7481 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7482 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7483 6 : char *arg2 = (char *) 0 ;
7484 6 : int arg3 ;
7485 6 : void *argp1 = 0 ;
7486 6 : int res1 = 0 ;
7487 6 : int res2 ;
7488 6 : char *buf2 = 0 ;
7489 6 : int alloc2 = 0 ;
7490 6 : int val3 ;
7491 6 : int ecode3 = 0 ;
7492 6 : PyObject *swig_obj[3] ;
7493 6 : char *result = 0 ;
7494 :
7495 6 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAxisName", 3, 3, swig_obj)) SWIG_fail;
7496 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7497 6 : if (!SWIG_IsOK(res1)) {
7498 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7499 : }
7500 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7501 6 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7502 6 : if (!SWIG_IsOK(res2)) {
7503 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAxisName" "', argument " "2"" of type '" "char const *""'");
7504 : }
7505 6 : arg2 = reinterpret_cast< char * >(buf2);
7506 6 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
7507 6 : if (!SWIG_IsOK(ecode3)) {
7508 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAxisName" "', argument " "3"" of type '" "int""'");
7509 : }
7510 6 : arg3 = static_cast< int >(val3);
7511 6 : {
7512 6 : const int bLocalUseExceptions = GetUseExceptions();
7513 6 : if ( bLocalUseExceptions ) {
7514 5 : pushErrorHandler();
7515 : }
7516 6 : result = (char *)OSRSpatialReferenceShadow_GetAxisName(arg1,(char const *)arg2,arg3);
7517 6 : if ( bLocalUseExceptions ) {
7518 5 : popErrorHandler();
7519 : }
7520 : #ifndef SED_HACKS
7521 : if ( bLocalUseExceptions ) {
7522 : CPLErr eclass = CPLGetLastErrorType();
7523 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7524 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7525 : }
7526 : }
7527 : #endif
7528 : }
7529 6 : resultobj = SWIG_FromCharPtr((const char *)result);
7530 6 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7531 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; } }
7532 : return resultobj;
7533 0 : fail:
7534 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7535 : return NULL;
7536 : }
7537 :
7538 :
7539 6 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxesCount(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7540 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7541 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7542 6 : void *argp1 = 0 ;
7543 6 : int res1 = 0 ;
7544 6 : PyObject *swig_obj[1] ;
7545 6 : int result;
7546 :
7547 6 : if (!args) SWIG_fail;
7548 6 : swig_obj[0] = args;
7549 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7550 6 : if (!SWIG_IsOK(res1)) {
7551 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxesCount" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7552 : }
7553 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7554 6 : {
7555 6 : const int bLocalUseExceptions = GetUseExceptions();
7556 6 : if ( bLocalUseExceptions ) {
7557 5 : pushErrorHandler();
7558 : }
7559 6 : result = (int)OSRSpatialReferenceShadow_GetAxesCount(arg1);
7560 6 : if ( bLocalUseExceptions ) {
7561 5 : popErrorHandler();
7562 : }
7563 : #ifndef SED_HACKS
7564 : if ( bLocalUseExceptions ) {
7565 : CPLErr eclass = CPLGetLastErrorType();
7566 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7567 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7568 : }
7569 : }
7570 : #endif
7571 : }
7572 6 : resultobj = SWIG_From_int(static_cast< int >(result));
7573 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; } }
7574 : return resultobj;
7575 : fail:
7576 : return NULL;
7577 : }
7578 :
7579 :
7580 5 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxisOrientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7581 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7582 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7583 5 : char *arg2 = (char *) 0 ;
7584 5 : int arg3 ;
7585 5 : void *argp1 = 0 ;
7586 5 : int res1 = 0 ;
7587 5 : int res2 ;
7588 5 : char *buf2 = 0 ;
7589 5 : int alloc2 = 0 ;
7590 5 : int val3 ;
7591 5 : int ecode3 = 0 ;
7592 5 : PyObject *swig_obj[3] ;
7593 5 : OGRAxisOrientation result;
7594 :
7595 5 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetAxisOrientation", 3, 3, swig_obj)) SWIG_fail;
7596 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7597 5 : if (!SWIG_IsOK(res1)) {
7598 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7599 : }
7600 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7601 5 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
7602 5 : if (!SWIG_IsOK(res2)) {
7603 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "2"" of type '" "char const *""'");
7604 : }
7605 5 : arg2 = reinterpret_cast< char * >(buf2);
7606 5 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
7607 5 : if (!SWIG_IsOK(ecode3)) {
7608 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAxisOrientation" "', argument " "3"" of type '" "int""'");
7609 : }
7610 5 : arg3 = static_cast< int >(val3);
7611 5 : {
7612 5 : const int bLocalUseExceptions = GetUseExceptions();
7613 5 : if ( bLocalUseExceptions ) {
7614 5 : pushErrorHandler();
7615 : }
7616 5 : result = (OGRAxisOrientation)OSRSpatialReferenceShadow_GetAxisOrientation(arg1,(char const *)arg2,arg3);
7617 5 : if ( bLocalUseExceptions ) {
7618 5 : popErrorHandler();
7619 : }
7620 : #ifndef SED_HACKS
7621 : if ( bLocalUseExceptions ) {
7622 : CPLErr eclass = CPLGetLastErrorType();
7623 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7624 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7625 : }
7626 : }
7627 : #endif
7628 : }
7629 5 : resultobj = SWIG_From_int(static_cast< int >(result));
7630 5 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7631 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; } }
7632 : return resultobj;
7633 0 : fail:
7634 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
7635 : return NULL;
7636 : }
7637 :
7638 :
7639 37 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAxisMappingStrategy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7640 37 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7641 37 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7642 37 : void *argp1 = 0 ;
7643 37 : int res1 = 0 ;
7644 37 : PyObject *swig_obj[1] ;
7645 37 : OSRAxisMappingStrategy result;
7646 :
7647 37 : if (!args) SWIG_fail;
7648 37 : swig_obj[0] = args;
7649 37 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7650 37 : if (!SWIG_IsOK(res1)) {
7651 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAxisMappingStrategy" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7652 : }
7653 37 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7654 37 : {
7655 37 : const int bLocalUseExceptions = GetUseExceptions();
7656 37 : if ( bLocalUseExceptions ) {
7657 36 : pushErrorHandler();
7658 : }
7659 37 : result = (OSRAxisMappingStrategy)OSRSpatialReferenceShadow_GetAxisMappingStrategy(arg1);
7660 37 : if ( bLocalUseExceptions ) {
7661 36 : popErrorHandler();
7662 : }
7663 : #ifndef SED_HACKS
7664 : if ( bLocalUseExceptions ) {
7665 : CPLErr eclass = CPLGetLastErrorType();
7666 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7667 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7668 : }
7669 : }
7670 : #endif
7671 : }
7672 37 : resultobj = SWIG_From_int(static_cast< int >(result));
7673 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; } }
7674 : return resultobj;
7675 : fail:
7676 : return NULL;
7677 : }
7678 :
7679 :
7680 535 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAxisMappingStrategy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7681 535 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7682 535 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7683 535 : OSRAxisMappingStrategy arg2 ;
7684 535 : void *argp1 = 0 ;
7685 535 : int res1 = 0 ;
7686 535 : int val2 ;
7687 535 : int ecode2 = 0 ;
7688 535 : PyObject *swig_obj[2] ;
7689 :
7690 535 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetAxisMappingStrategy", 2, 2, swig_obj)) SWIG_fail;
7691 535 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7692 535 : if (!SWIG_IsOK(res1)) {
7693 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAxisMappingStrategy" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7694 : }
7695 535 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7696 535 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
7697 535 : if (!SWIG_IsOK(ecode2)) {
7698 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetAxisMappingStrategy" "', argument " "2"" of type '" "OSRAxisMappingStrategy""'");
7699 : }
7700 535 : arg2 = static_cast< OSRAxisMappingStrategy >(val2);
7701 535 : {
7702 535 : const int bLocalUseExceptions = GetUseExceptions();
7703 535 : if ( bLocalUseExceptions ) {
7704 431 : pushErrorHandler();
7705 : }
7706 535 : OSRSpatialReferenceShadow_SetAxisMappingStrategy(arg1,arg2);
7707 535 : if ( bLocalUseExceptions ) {
7708 431 : popErrorHandler();
7709 : }
7710 : #ifndef SED_HACKS
7711 : if ( bLocalUseExceptions ) {
7712 : CPLErr eclass = CPLGetLastErrorType();
7713 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7714 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7715 : }
7716 : }
7717 : #endif
7718 : }
7719 535 : resultobj = SWIG_Py_Void();
7720 535 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7721 : return resultobj;
7722 : fail:
7723 : return NULL;
7724 : }
7725 :
7726 :
7727 97 : SWIGINTERN PyObject *_wrap_SpatialReference_GetDataAxisToSRSAxisMapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7728 97 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7729 97 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7730 97 : int *arg2 = (int *) 0 ;
7731 97 : int **arg3 = (int **) 0 ;
7732 97 : void *argp1 = 0 ;
7733 97 : int res1 = 0 ;
7734 97 : int nLen2 = 0 ;
7735 97 : int *pList2 = NULL ;
7736 97 : PyObject *swig_obj[1] ;
7737 :
7738 97 : {
7739 : /* %typemap(in,numinputs=0) (int *nLen2, const int **pList2) (int nLen2, int *pList2) */
7740 97 : arg2 = &nLen2;
7741 97 : arg3 = &pList2;
7742 : }
7743 97 : if (!args) SWIG_fail;
7744 97 : swig_obj[0] = args;
7745 97 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7746 97 : if (!SWIG_IsOK(res1)) {
7747 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetDataAxisToSRSAxisMapping" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7748 : }
7749 97 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7750 97 : {
7751 97 : const int bLocalUseExceptions = GetUseExceptions();
7752 97 : if ( bLocalUseExceptions ) {
7753 49 : pushErrorHandler();
7754 : }
7755 97 : OSRSpatialReferenceShadow_GetDataAxisToSRSAxisMapping(arg1,arg2,(int const **)arg3);
7756 97 : if ( bLocalUseExceptions ) {
7757 49 : popErrorHandler();
7758 : }
7759 : #ifndef SED_HACKS
7760 : if ( bLocalUseExceptions ) {
7761 : CPLErr eclass = CPLGetLastErrorType();
7762 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7763 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7764 : }
7765 : }
7766 : #endif
7767 : }
7768 97 : resultobj = SWIG_Py_Void();
7769 97 : {
7770 : /* %typemap(argout) (int *nLen, const int **pList ) */
7771 97 : Py_DECREF(resultobj);
7772 97 : PyObject *out = PyList_New( *arg2 );
7773 97 : if( !out ) {
7774 0 : SWIG_fail;
7775 : }
7776 293 : for( int i=0; i<*arg2; i++ ) {
7777 196 : PyObject *val = PyInt_FromLong( (*arg3)[i] );
7778 196 : PyList_SetItem( out, i, val );
7779 : }
7780 97 : resultobj = out;
7781 : }
7782 97 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
7783 : return resultobj;
7784 : fail:
7785 : return NULL;
7786 : }
7787 :
7788 :
7789 15 : SWIGINTERN PyObject *_wrap_SpatialReference_SetDataAxisToSRSAxisMapping(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7790 15 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7791 15 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7792 15 : int arg2 ;
7793 15 : int *arg3 = (int *) 0 ;
7794 15 : void *argp1 = 0 ;
7795 15 : int res1 = 0 ;
7796 15 : PyObject *swig_obj[2] ;
7797 15 : OGRErr result;
7798 :
7799 15 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetDataAxisToSRSAxisMapping", 2, 2, swig_obj)) SWIG_fail;
7800 15 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7801 15 : if (!SWIG_IsOK(res1)) {
7802 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetDataAxisToSRSAxisMapping" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7803 : }
7804 15 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7805 15 : {
7806 : /* %typemap(in,numinputs=1) (int nList, int* pList)*/
7807 15 : arg3 = CreateCIntListFromSequence(swig_obj[1], &arg2);
7808 15 : if( arg2 < 0 ) {
7809 0 : SWIG_fail;
7810 : }
7811 : }
7812 15 : {
7813 15 : const int bLocalUseExceptions = GetUseExceptions();
7814 15 : if ( bLocalUseExceptions ) {
7815 9 : pushErrorHandler();
7816 : }
7817 15 : result = (OGRErr)OSRSpatialReferenceShadow_SetDataAxisToSRSAxisMapping(arg1,arg2,arg3);
7818 15 : if ( bLocalUseExceptions ) {
7819 9 : popErrorHandler();
7820 : }
7821 : #ifndef SED_HACKS
7822 : if ( bLocalUseExceptions ) {
7823 : CPLErr eclass = CPLGetLastErrorType();
7824 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7825 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7826 : }
7827 : }
7828 : #endif
7829 : }
7830 15 : {
7831 : /* %typemap(out) OGRErr */
7832 15 : if ( result != 0 && GetUseExceptions()) {
7833 0 : const char* pszMessage = CPLGetLastErrorMsg();
7834 0 : if( pszMessage[0] != '\0' )
7835 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7836 : else
7837 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7838 0 : SWIG_fail;
7839 : }
7840 : }
7841 15 : {
7842 : /* %typemap(freearg) (int nList, int* pList) */
7843 15 : free(arg3);
7844 : }
7845 15 : {
7846 : /* %typemap(ret) OGRErr */
7847 15 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7848 15 : resultobj = PyInt_FromLong( result );
7849 : }
7850 : }
7851 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; } }
7852 : return resultobj;
7853 0 : fail:
7854 0 : {
7855 : /* %typemap(freearg) (int nList, int* pList) */
7856 0 : free(arg3);
7857 : }
7858 0 : return NULL;
7859 : }
7860 :
7861 :
7862 15 : SWIGINTERN PyObject *_wrap_SpatialReference_SetUTM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7863 15 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7864 15 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7865 15 : int arg2 ;
7866 15 : int arg3 = (int) 1 ;
7867 15 : void *argp1 = 0 ;
7868 15 : int res1 = 0 ;
7869 15 : int val2 ;
7870 15 : int ecode2 = 0 ;
7871 15 : int val3 ;
7872 15 : int ecode3 = 0 ;
7873 15 : PyObject *swig_obj[3] ;
7874 15 : OGRErr result;
7875 :
7876 15 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetUTM", 2, 3, swig_obj)) SWIG_fail;
7877 15 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7878 15 : if (!SWIG_IsOK(res1)) {
7879 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetUTM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7880 : }
7881 15 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7882 15 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
7883 15 : if (!SWIG_IsOK(ecode2)) {
7884 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetUTM" "', argument " "2"" of type '" "int""'");
7885 : }
7886 15 : arg2 = static_cast< int >(val2);
7887 15 : if (swig_obj[2]) {
7888 3 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
7889 3 : if (!SWIG_IsOK(ecode3)) {
7890 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetUTM" "', argument " "3"" of type '" "int""'");
7891 : }
7892 : arg3 = static_cast< int >(val3);
7893 : }
7894 15 : {
7895 15 : const int bLocalUseExceptions = GetUseExceptions();
7896 15 : if ( bLocalUseExceptions ) {
7897 14 : pushErrorHandler();
7898 : }
7899 15 : result = (OGRErr)OSRSpatialReferenceShadow_SetUTM(arg1,arg2,arg3);
7900 15 : if ( bLocalUseExceptions ) {
7901 14 : popErrorHandler();
7902 : }
7903 : #ifndef SED_HACKS
7904 : if ( bLocalUseExceptions ) {
7905 : CPLErr eclass = CPLGetLastErrorType();
7906 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7907 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7908 : }
7909 : }
7910 : #endif
7911 : }
7912 15 : {
7913 : /* %typemap(out) OGRErr */
7914 15 : if ( result != 0 && GetUseExceptions()) {
7915 0 : const char* pszMessage = CPLGetLastErrorMsg();
7916 0 : if( pszMessage[0] != '\0' )
7917 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
7918 : else
7919 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7920 0 : SWIG_fail;
7921 : }
7922 : }
7923 15 : {
7924 : /* %typemap(ret) OGRErr */
7925 15 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
7926 15 : resultobj = PyInt_FromLong( result );
7927 : }
7928 : }
7929 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; } }
7930 : return resultobj;
7931 : fail:
7932 : return NULL;
7933 : }
7934 :
7935 :
7936 6 : SWIGINTERN PyObject *_wrap_SpatialReference_GetUTMZone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7937 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7938 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7939 6 : void *argp1 = 0 ;
7940 6 : int res1 = 0 ;
7941 6 : PyObject *swig_obj[1] ;
7942 6 : int result;
7943 :
7944 6 : if (!args) SWIG_fail;
7945 6 : swig_obj[0] = args;
7946 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7947 6 : if (!SWIG_IsOK(res1)) {
7948 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetUTMZone" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7949 : }
7950 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7951 6 : {
7952 6 : const int bLocalUseExceptions = GetUseExceptions();
7953 6 : if ( bLocalUseExceptions ) {
7954 6 : pushErrorHandler();
7955 : }
7956 6 : result = (int)OSRSpatialReferenceShadow_GetUTMZone(arg1);
7957 6 : if ( bLocalUseExceptions ) {
7958 6 : popErrorHandler();
7959 : }
7960 : #ifndef SED_HACKS
7961 : if ( bLocalUseExceptions ) {
7962 : CPLErr eclass = CPLGetLastErrorType();
7963 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7964 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7965 : }
7966 : }
7967 : #endif
7968 : }
7969 6 : resultobj = SWIG_From_int(static_cast< int >(result));
7970 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; } }
7971 : return resultobj;
7972 : fail:
7973 : return NULL;
7974 : }
7975 :
7976 :
7977 2 : SWIGINTERN PyObject *_wrap_SpatialReference_SetStatePlane(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7978 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
7979 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7980 2 : int arg2 ;
7981 2 : int arg3 = (int) 1 ;
7982 2 : char *arg4 = (char *) "" ;
7983 2 : double arg5 = (double) 0.0 ;
7984 2 : void *argp1 = 0 ;
7985 2 : int res1 = 0 ;
7986 2 : int val2 ;
7987 2 : int ecode2 = 0 ;
7988 2 : int val3 ;
7989 2 : int ecode3 = 0 ;
7990 2 : int res4 ;
7991 2 : char *buf4 = 0 ;
7992 2 : int alloc4 = 0 ;
7993 2 : double val5 ;
7994 2 : int ecode5 = 0 ;
7995 2 : PyObject *swig_obj[5] ;
7996 2 : OGRErr result;
7997 :
7998 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetStatePlane", 2, 5, swig_obj)) SWIG_fail;
7999 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8000 2 : if (!SWIG_IsOK(res1)) {
8001 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetStatePlane" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8002 : }
8003 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8004 2 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
8005 2 : if (!SWIG_IsOK(ecode2)) {
8006 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetStatePlane" "', argument " "2"" of type '" "int""'");
8007 : }
8008 2 : arg2 = static_cast< int >(val2);
8009 2 : if (swig_obj[2]) {
8010 2 : ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
8011 2 : if (!SWIG_IsOK(ecode3)) {
8012 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetStatePlane" "', argument " "3"" of type '" "int""'");
8013 : }
8014 : arg3 = static_cast< int >(val3);
8015 : }
8016 2 : if (swig_obj[3]) {
8017 1 : res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
8018 1 : if (!SWIG_IsOK(res4)) {
8019 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetStatePlane" "', argument " "4"" of type '" "char const *""'");
8020 : }
8021 1 : arg4 = reinterpret_cast< char * >(buf4);
8022 : }
8023 2 : if (swig_obj[4]) {
8024 1 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
8025 1 : if (!SWIG_IsOK(ecode5)) {
8026 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetStatePlane" "', argument " "5"" of type '" "double""'");
8027 : }
8028 1 : arg5 = static_cast< double >(val5);
8029 : }
8030 2 : {
8031 2 : const int bLocalUseExceptions = GetUseExceptions();
8032 2 : if ( bLocalUseExceptions ) {
8033 2 : pushErrorHandler();
8034 : }
8035 2 : result = (OGRErr)OSRSpatialReferenceShadow_SetStatePlane(arg1,arg2,arg3,(char const *)arg4,arg5);
8036 2 : if ( bLocalUseExceptions ) {
8037 2 : popErrorHandler();
8038 : }
8039 : #ifndef SED_HACKS
8040 : if ( bLocalUseExceptions ) {
8041 : CPLErr eclass = CPLGetLastErrorType();
8042 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8043 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8044 : }
8045 : }
8046 : #endif
8047 : }
8048 2 : {
8049 : /* %typemap(out) OGRErr */
8050 2 : if ( result != 0 && GetUseExceptions()) {
8051 0 : const char* pszMessage = CPLGetLastErrorMsg();
8052 0 : if( pszMessage[0] != '\0' )
8053 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8054 : else
8055 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8056 0 : SWIG_fail;
8057 : }
8058 : }
8059 2 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
8060 2 : {
8061 : /* %typemap(ret) OGRErr */
8062 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8063 2 : resultobj = PyInt_FromLong( result );
8064 : }
8065 : }
8066 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; } }
8067 : return resultobj;
8068 0 : fail:
8069 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
8070 : return NULL;
8071 : }
8072 :
8073 :
8074 5 : SWIGINTERN PyObject *_wrap_SpatialReference_AutoIdentifyEPSG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8075 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8076 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8077 5 : void *argp1 = 0 ;
8078 5 : int res1 = 0 ;
8079 5 : PyObject *swig_obj[1] ;
8080 5 : OGRErr result;
8081 :
8082 5 : if (!args) SWIG_fail;
8083 5 : swig_obj[0] = args;
8084 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8085 5 : if (!SWIG_IsOK(res1)) {
8086 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_AutoIdentifyEPSG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8087 : }
8088 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8089 5 : {
8090 5 : const int bLocalUseExceptions = GetUseExceptions();
8091 5 : if ( bLocalUseExceptions ) {
8092 5 : pushErrorHandler();
8093 : }
8094 5 : result = (OGRErr)OSRSpatialReferenceShadow_AutoIdentifyEPSG(arg1);
8095 5 : if ( bLocalUseExceptions ) {
8096 5 : popErrorHandler();
8097 : }
8098 : #ifndef SED_HACKS
8099 : if ( bLocalUseExceptions ) {
8100 : CPLErr eclass = CPLGetLastErrorType();
8101 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8102 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8103 : }
8104 : }
8105 : #endif
8106 : }
8107 5 : {
8108 : /* %typemap(out) OGRErr */
8109 6 : if ( result != 0 && GetUseExceptions()) {
8110 1 : const char* pszMessage = CPLGetLastErrorMsg();
8111 1 : if( pszMessage[0] != '\0' )
8112 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8113 : else
8114 1 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8115 1 : SWIG_fail;
8116 : }
8117 : }
8118 4 : {
8119 : /* %typemap(ret) OGRErr */
8120 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8121 4 : resultobj = PyInt_FromLong( result );
8122 : }
8123 : }
8124 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; } }
8125 : return resultobj;
8126 : fail:
8127 : return NULL;
8128 : }
8129 :
8130 :
8131 5 : SWIGINTERN PyObject *_wrap_SpatialReference_FindMatches(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8132 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8133 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8134 5 : char **arg2 = (char **) NULL ;
8135 5 : OSRSpatialReferenceShadow ***arg3 = (OSRSpatialReferenceShadow ***) NULL ;
8136 5 : int *arg4 = (int *) NULL ;
8137 5 : int **arg5 = (int **) NULL ;
8138 5 : void *argp1 = 0 ;
8139 5 : int res1 = 0 ;
8140 5 : OGRSpatialReferenceH *pahSRS3 = NULL ;
8141 5 : int nvalues3 = 0 ;
8142 5 : int *confidence_values3 = NULL ;
8143 5 : PyObject *swig_obj[2] ;
8144 :
8145 5 : {
8146 : /* %typemap(in) (OSRSpatialReferenceShadow***, int* nvalues3, int** confidence_values3) */
8147 5 : arg3 = &pahSRS3;
8148 5 : arg4 = &nvalues3;
8149 5 : arg5 = &confidence_values3;
8150 : }
8151 5 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_FindMatches", 1, 2, swig_obj)) SWIG_fail;
8152 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8153 5 : if (!SWIG_IsOK(res1)) {
8154 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_FindMatches" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8155 : }
8156 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8157 5 : if (swig_obj[1]) {
8158 0 : {
8159 : /* %typemap(in) char **dict */
8160 0 : arg2 = NULL;
8161 0 : if ( PySequence_Check( swig_obj[1] ) ) {
8162 0 : int bErr = FALSE;
8163 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
8164 0 : if ( bErr )
8165 : {
8166 0 : SWIG_fail;
8167 : }
8168 : }
8169 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
8170 0 : int bErr = FALSE;
8171 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
8172 0 : if ( bErr )
8173 : {
8174 0 : SWIG_fail;
8175 : }
8176 : }
8177 : else {
8178 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
8179 0 : SWIG_fail;
8180 : }
8181 : }
8182 : }
8183 5 : {
8184 5 : const int bLocalUseExceptions = GetUseExceptions();
8185 5 : if ( bLocalUseExceptions ) {
8186 5 : pushErrorHandler();
8187 : }
8188 5 : OSRSpatialReferenceShadow_FindMatches(arg1,arg2,arg3,arg4,arg5);
8189 5 : if ( bLocalUseExceptions ) {
8190 5 : popErrorHandler();
8191 : }
8192 : #ifndef SED_HACKS
8193 : if ( bLocalUseExceptions ) {
8194 : CPLErr eclass = CPLGetLastErrorType();
8195 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8196 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8197 : }
8198 : }
8199 : #endif
8200 : }
8201 5 : resultobj = SWIG_Py_Void();
8202 5 : {
8203 : /* %typemap(argout) (OOSRSpatialReferenceShadow***, int* nvalues, int** confidence_values) */
8204 :
8205 5 : Py_DECREF(resultobj);
8206 :
8207 5 : resultobj = PyList_New( *(arg4));
8208 5 : if( !resultobj ) {
8209 0 : SWIG_fail;
8210 : }
8211 14 : for( int i = 0; i < *(arg4); i++ )
8212 : {
8213 9 : PyObject *tuple = PyTuple_New( 2 );
8214 9 : OSRReference((*(arg3))[i]);
8215 9 : PyTuple_SetItem( tuple, 0,
8216 : SWIG_NewPointerObj(SWIG_as_voidptr((*(arg3))[i]), SWIGTYPE_p_OSRSpatialReferenceShadow, 1 ) );
8217 9 : PyTuple_SetItem( tuple, 1, PyInt_FromLong((*(arg5))[i]) );
8218 9 : PyList_SetItem( resultobj, i, tuple );
8219 : }
8220 : }
8221 5 : {
8222 : /* %typemap(freearg) char **dict */
8223 5 : CSLDestroy( arg2 );
8224 : }
8225 5 : {
8226 : /* %typemap(freearg) (OOSRSpatialReferenceShadow***, int* nvalues, int** confidence_values) */
8227 5 : OSRFreeSRSArray( *(arg3) );
8228 5 : CPLFree( *(arg5) );
8229 : }
8230 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; } }
8231 : return resultobj;
8232 0 : fail:
8233 0 : {
8234 : /* %typemap(freearg) char **dict */
8235 0 : CSLDestroy( arg2 );
8236 : }
8237 0 : {
8238 : /* %typemap(freearg) (OOSRSpatialReferenceShadow***, int* nvalues, int** confidence_values) */
8239 0 : OSRFreeSRSArray( *(arg3) );
8240 0 : CPLFree( *(arg5) );
8241 : }
8242 : return NULL;
8243 : }
8244 :
8245 :
8246 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8247 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8248 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8249 0 : char *arg2 = (char *) 0 ;
8250 0 : void *argp1 = 0 ;
8251 0 : int res1 = 0 ;
8252 0 : int res2 ;
8253 0 : char *buf2 = 0 ;
8254 0 : int alloc2 = 0 ;
8255 0 : PyObject *swig_obj[2] ;
8256 0 : OGRErr result;
8257 :
8258 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetProjection", 2, 2, swig_obj)) SWIG_fail;
8259 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8260 0 : if (!SWIG_IsOK(res1)) {
8261 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjection" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8262 : }
8263 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8264 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8265 0 : if (!SWIG_IsOK(res2)) {
8266 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjection" "', argument " "2"" of type '" "char const *""'");
8267 : }
8268 0 : arg2 = reinterpret_cast< char * >(buf2);
8269 0 : {
8270 0 : const int bLocalUseExceptions = GetUseExceptions();
8271 0 : if ( bLocalUseExceptions ) {
8272 0 : pushErrorHandler();
8273 : }
8274 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjection(arg1,(char const *)arg2);
8275 0 : if ( bLocalUseExceptions ) {
8276 0 : popErrorHandler();
8277 : }
8278 : #ifndef SED_HACKS
8279 : if ( bLocalUseExceptions ) {
8280 : CPLErr eclass = CPLGetLastErrorType();
8281 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8282 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8283 : }
8284 : }
8285 : #endif
8286 : }
8287 0 : {
8288 : /* %typemap(out) OGRErr */
8289 0 : if ( result != 0 && GetUseExceptions()) {
8290 0 : const char* pszMessage = CPLGetLastErrorMsg();
8291 0 : if( pszMessage[0] != '\0' )
8292 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8293 : else
8294 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8295 0 : SWIG_fail;
8296 : }
8297 : }
8298 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8299 0 : {
8300 : /* %typemap(ret) OGRErr */
8301 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8302 0 : resultobj = PyInt_FromLong( result );
8303 : }
8304 : }
8305 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; } }
8306 : return resultobj;
8307 0 : fail:
8308 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8309 : return NULL;
8310 : }
8311 :
8312 :
8313 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8314 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8315 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8316 0 : char *arg2 = (char *) 0 ;
8317 0 : double arg3 ;
8318 0 : void *argp1 = 0 ;
8319 0 : int res1 = 0 ;
8320 0 : int res2 ;
8321 0 : char *buf2 = 0 ;
8322 0 : int alloc2 = 0 ;
8323 0 : double val3 ;
8324 0 : int ecode3 = 0 ;
8325 0 : PyObject *swig_obj[3] ;
8326 0 : OGRErr result;
8327 :
8328 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetProjParm", 3, 3, swig_obj)) SWIG_fail;
8329 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8330 0 : if (!SWIG_IsOK(res1)) {
8331 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8332 : }
8333 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8334 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8335 0 : if (!SWIG_IsOK(res2)) {
8336 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjParm" "', argument " "2"" of type '" "char const *""'");
8337 : }
8338 0 : arg2 = reinterpret_cast< char * >(buf2);
8339 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8340 0 : if (!SWIG_IsOK(ecode3)) {
8341 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetProjParm" "', argument " "3"" of type '" "double""'");
8342 : }
8343 0 : arg3 = static_cast< double >(val3);
8344 0 : {
8345 0 : if (!arg2) {
8346 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8347 : }
8348 : }
8349 0 : {
8350 0 : const int bLocalUseExceptions = GetUseExceptions();
8351 0 : if ( bLocalUseExceptions ) {
8352 0 : pushErrorHandler();
8353 : }
8354 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjParm(arg1,(char const *)arg2,arg3);
8355 0 : if ( bLocalUseExceptions ) {
8356 0 : popErrorHandler();
8357 : }
8358 : #ifndef SED_HACKS
8359 : if ( bLocalUseExceptions ) {
8360 : CPLErr eclass = CPLGetLastErrorType();
8361 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8362 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8363 : }
8364 : }
8365 : #endif
8366 : }
8367 0 : {
8368 : /* %typemap(out) OGRErr */
8369 0 : if ( result != 0 && GetUseExceptions()) {
8370 0 : const char* pszMessage = CPLGetLastErrorMsg();
8371 0 : if( pszMessage[0] != '\0' )
8372 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8373 : else
8374 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8375 0 : SWIG_fail;
8376 : }
8377 : }
8378 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8379 0 : {
8380 : /* %typemap(ret) OGRErr */
8381 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8382 0 : resultobj = PyInt_FromLong( result );
8383 : }
8384 : }
8385 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; } }
8386 : return resultobj;
8387 0 : fail:
8388 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8389 : return NULL;
8390 : }
8391 :
8392 :
8393 65 : SWIGINTERN PyObject *_wrap_SpatialReference_GetProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8394 65 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8395 65 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8396 65 : char *arg2 = (char *) 0 ;
8397 65 : double arg3 = (double) 0.0 ;
8398 65 : void *argp1 = 0 ;
8399 65 : int res1 = 0 ;
8400 65 : int res2 ;
8401 65 : char *buf2 = 0 ;
8402 65 : int alloc2 = 0 ;
8403 65 : double val3 ;
8404 65 : int ecode3 = 0 ;
8405 65 : PyObject *swig_obj[3] ;
8406 65 : double result;
8407 :
8408 65 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetProjParm", 2, 3, swig_obj)) SWIG_fail;
8409 65 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8410 65 : if (!SWIG_IsOK(res1)) {
8411 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8412 : }
8413 65 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8414 65 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8415 65 : if (!SWIG_IsOK(res2)) {
8416 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetProjParm" "', argument " "2"" of type '" "char const *""'");
8417 : }
8418 65 : arg2 = reinterpret_cast< char * >(buf2);
8419 65 : if (swig_obj[2]) {
8420 24 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8421 24 : if (!SWIG_IsOK(ecode3)) {
8422 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetProjParm" "', argument " "3"" of type '" "double""'");
8423 : }
8424 24 : arg3 = static_cast< double >(val3);
8425 : }
8426 65 : {
8427 65 : if (!arg2) {
8428 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8429 : }
8430 : }
8431 65 : {
8432 65 : const int bLocalUseExceptions = GetUseExceptions();
8433 65 : if ( bLocalUseExceptions ) {
8434 58 : pushErrorHandler();
8435 : }
8436 65 : result = (double)OSRSpatialReferenceShadow_GetProjParm(arg1,(char const *)arg2,arg3);
8437 65 : if ( bLocalUseExceptions ) {
8438 58 : popErrorHandler();
8439 : }
8440 : #ifndef SED_HACKS
8441 : if ( bLocalUseExceptions ) {
8442 : CPLErr eclass = CPLGetLastErrorType();
8443 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8444 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8445 : }
8446 : }
8447 : #endif
8448 : }
8449 65 : resultobj = SWIG_From_double(static_cast< double >(result));
8450 65 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8451 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; } }
8452 : return resultobj;
8453 0 : fail:
8454 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8455 : return NULL;
8456 : }
8457 :
8458 :
8459 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetNormProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8460 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8461 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8462 0 : char *arg2 = (char *) 0 ;
8463 0 : double arg3 ;
8464 0 : void *argp1 = 0 ;
8465 0 : int res1 = 0 ;
8466 0 : int res2 ;
8467 0 : char *buf2 = 0 ;
8468 0 : int alloc2 = 0 ;
8469 0 : double val3 ;
8470 0 : int ecode3 = 0 ;
8471 0 : PyObject *swig_obj[3] ;
8472 0 : OGRErr result;
8473 :
8474 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetNormProjParm", 3, 3, swig_obj)) SWIG_fail;
8475 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8476 0 : if (!SWIG_IsOK(res1)) {
8477 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetNormProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8478 : }
8479 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8480 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8481 0 : if (!SWIG_IsOK(res2)) {
8482 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetNormProjParm" "', argument " "2"" of type '" "char const *""'");
8483 : }
8484 0 : arg2 = reinterpret_cast< char * >(buf2);
8485 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8486 0 : if (!SWIG_IsOK(ecode3)) {
8487 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetNormProjParm" "', argument " "3"" of type '" "double""'");
8488 : }
8489 0 : arg3 = static_cast< double >(val3);
8490 0 : {
8491 0 : if (!arg2) {
8492 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8493 : }
8494 : }
8495 0 : {
8496 0 : const int bLocalUseExceptions = GetUseExceptions();
8497 0 : if ( bLocalUseExceptions ) {
8498 0 : pushErrorHandler();
8499 : }
8500 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetNormProjParm(arg1,(char const *)arg2,arg3);
8501 0 : if ( bLocalUseExceptions ) {
8502 0 : popErrorHandler();
8503 : }
8504 : #ifndef SED_HACKS
8505 : if ( bLocalUseExceptions ) {
8506 : CPLErr eclass = CPLGetLastErrorType();
8507 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8508 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8509 : }
8510 : }
8511 : #endif
8512 : }
8513 0 : {
8514 : /* %typemap(out) OGRErr */
8515 0 : if ( result != 0 && GetUseExceptions()) {
8516 0 : const char* pszMessage = CPLGetLastErrorMsg();
8517 0 : if( pszMessage[0] != '\0' )
8518 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8519 : else
8520 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8521 0 : SWIG_fail;
8522 : }
8523 : }
8524 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8525 0 : {
8526 : /* %typemap(ret) OGRErr */
8527 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8528 0 : resultobj = PyInt_FromLong( result );
8529 : }
8530 : }
8531 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; } }
8532 : return resultobj;
8533 0 : fail:
8534 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8535 : return NULL;
8536 : }
8537 :
8538 :
8539 1 : SWIGINTERN PyObject *_wrap_SpatialReference_GetNormProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8540 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8541 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8542 1 : char *arg2 = (char *) 0 ;
8543 1 : double arg3 = (double) 0.0 ;
8544 1 : void *argp1 = 0 ;
8545 1 : int res1 = 0 ;
8546 1 : int res2 ;
8547 1 : char *buf2 = 0 ;
8548 1 : int alloc2 = 0 ;
8549 1 : double val3 ;
8550 1 : int ecode3 = 0 ;
8551 1 : PyObject *swig_obj[3] ;
8552 1 : double result;
8553 :
8554 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_GetNormProjParm", 2, 3, swig_obj)) SWIG_fail;
8555 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8556 1 : if (!SWIG_IsOK(res1)) {
8557 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetNormProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8558 : }
8559 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8560 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
8561 1 : if (!SWIG_IsOK(res2)) {
8562 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetNormProjParm" "', argument " "2"" of type '" "char const *""'");
8563 : }
8564 1 : arg2 = reinterpret_cast< char * >(buf2);
8565 1 : if (swig_obj[2]) {
8566 0 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
8567 0 : if (!SWIG_IsOK(ecode3)) {
8568 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetNormProjParm" "', argument " "3"" of type '" "double""'");
8569 : }
8570 0 : arg3 = static_cast< double >(val3);
8571 : }
8572 1 : {
8573 1 : if (!arg2) {
8574 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
8575 : }
8576 : }
8577 1 : {
8578 1 : const int bLocalUseExceptions = GetUseExceptions();
8579 1 : if ( bLocalUseExceptions ) {
8580 1 : pushErrorHandler();
8581 : }
8582 1 : result = (double)OSRSpatialReferenceShadow_GetNormProjParm(arg1,(char const *)arg2,arg3);
8583 1 : if ( bLocalUseExceptions ) {
8584 1 : popErrorHandler();
8585 : }
8586 : #ifndef SED_HACKS
8587 : if ( bLocalUseExceptions ) {
8588 : CPLErr eclass = CPLGetLastErrorType();
8589 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8590 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8591 : }
8592 : }
8593 : #endif
8594 : }
8595 1 : resultobj = SWIG_From_double(static_cast< double >(result));
8596 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8597 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; } }
8598 : return resultobj;
8599 0 : fail:
8600 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
8601 : return NULL;
8602 : }
8603 :
8604 :
8605 8 : SWIGINTERN PyObject *_wrap_SpatialReference_GetSemiMajor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8606 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8607 8 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8608 8 : void *argp1 = 0 ;
8609 8 : int res1 = 0 ;
8610 8 : PyObject *swig_obj[1] ;
8611 8 : double result;
8612 :
8613 8 : if (!args) SWIG_fail;
8614 8 : swig_obj[0] = args;
8615 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8616 8 : if (!SWIG_IsOK(res1)) {
8617 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMajor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8618 : }
8619 8 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8620 8 : {
8621 8 : const int bLocalUseExceptions = GetUseExceptions();
8622 8 : if ( bLocalUseExceptions ) {
8623 7 : pushErrorHandler();
8624 : }
8625 8 : result = (double)OSRSpatialReferenceShadow_GetSemiMajor(arg1);
8626 8 : if ( bLocalUseExceptions ) {
8627 7 : popErrorHandler();
8628 : }
8629 : #ifndef SED_HACKS
8630 : if ( bLocalUseExceptions ) {
8631 : CPLErr eclass = CPLGetLastErrorType();
8632 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8633 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8634 : }
8635 : }
8636 : #endif
8637 : }
8638 8 : resultobj = SWIG_From_double(static_cast< double >(result));
8639 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; } }
8640 : return resultobj;
8641 : fail:
8642 : return NULL;
8643 : }
8644 :
8645 :
8646 4 : SWIGINTERN PyObject *_wrap_SpatialReference_GetSemiMinor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8647 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8648 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8649 4 : void *argp1 = 0 ;
8650 4 : int res1 = 0 ;
8651 4 : PyObject *swig_obj[1] ;
8652 4 : double result;
8653 :
8654 4 : if (!args) SWIG_fail;
8655 4 : swig_obj[0] = args;
8656 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8657 4 : if (!SWIG_IsOK(res1)) {
8658 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMinor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8659 : }
8660 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8661 4 : {
8662 4 : const int bLocalUseExceptions = GetUseExceptions();
8663 4 : if ( bLocalUseExceptions ) {
8664 3 : pushErrorHandler();
8665 : }
8666 4 : result = (double)OSRSpatialReferenceShadow_GetSemiMinor(arg1);
8667 4 : if ( bLocalUseExceptions ) {
8668 3 : popErrorHandler();
8669 : }
8670 : #ifndef SED_HACKS
8671 : if ( bLocalUseExceptions ) {
8672 : CPLErr eclass = CPLGetLastErrorType();
8673 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8674 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8675 : }
8676 : }
8677 : #endif
8678 : }
8679 4 : resultobj = SWIG_From_double(static_cast< double >(result));
8680 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; } }
8681 : return resultobj;
8682 : fail:
8683 : return NULL;
8684 : }
8685 :
8686 :
8687 10 : SWIGINTERN PyObject *_wrap_SpatialReference_GetInvFlattening(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8688 10 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8689 10 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8690 10 : void *argp1 = 0 ;
8691 10 : int res1 = 0 ;
8692 10 : PyObject *swig_obj[1] ;
8693 10 : double result;
8694 :
8695 10 : if (!args) SWIG_fail;
8696 10 : swig_obj[0] = args;
8697 10 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8698 10 : if (!SWIG_IsOK(res1)) {
8699 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetInvFlattening" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8700 : }
8701 10 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8702 10 : {
8703 10 : const int bLocalUseExceptions = GetUseExceptions();
8704 10 : if ( bLocalUseExceptions ) {
8705 7 : pushErrorHandler();
8706 : }
8707 10 : result = (double)OSRSpatialReferenceShadow_GetInvFlattening(arg1);
8708 10 : if ( bLocalUseExceptions ) {
8709 7 : popErrorHandler();
8710 : }
8711 : #ifndef SED_HACKS
8712 : if ( bLocalUseExceptions ) {
8713 : CPLErr eclass = CPLGetLastErrorType();
8714 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8715 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8716 : }
8717 : }
8718 : #endif
8719 : }
8720 10 : resultobj = SWIG_From_double(static_cast< double >(result));
8721 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; } }
8722 : return resultobj;
8723 : fail:
8724 : return NULL;
8725 : }
8726 :
8727 :
8728 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetACEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8729 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8730 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8731 0 : double arg2 ;
8732 0 : double arg3 ;
8733 0 : double arg4 ;
8734 0 : double arg5 ;
8735 0 : double arg6 ;
8736 0 : double arg7 ;
8737 0 : void *argp1 = 0 ;
8738 0 : int res1 = 0 ;
8739 0 : double val2 ;
8740 0 : int ecode2 = 0 ;
8741 0 : double val3 ;
8742 0 : int ecode3 = 0 ;
8743 0 : double val4 ;
8744 0 : int ecode4 = 0 ;
8745 0 : double val5 ;
8746 0 : int ecode5 = 0 ;
8747 0 : double val6 ;
8748 0 : int ecode6 = 0 ;
8749 0 : double val7 ;
8750 0 : int ecode7 = 0 ;
8751 0 : PyObject * obj0 = 0 ;
8752 0 : PyObject * obj1 = 0 ;
8753 0 : PyObject * obj2 = 0 ;
8754 0 : PyObject * obj3 = 0 ;
8755 0 : PyObject * obj4 = 0 ;
8756 0 : PyObject * obj5 = 0 ;
8757 0 : PyObject * obj6 = 0 ;
8758 0 : char * kwnames[] = {
8759 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
8760 : };
8761 0 : OGRErr result;
8762 :
8763 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetACEA", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
8764 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8765 0 : if (!SWIG_IsOK(res1)) {
8766 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetACEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8767 : }
8768 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8769 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8770 0 : if (!SWIG_IsOK(ecode2)) {
8771 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetACEA" "', argument " "2"" of type '" "double""'");
8772 : }
8773 0 : arg2 = static_cast< double >(val2);
8774 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8775 0 : if (!SWIG_IsOK(ecode3)) {
8776 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetACEA" "', argument " "3"" of type '" "double""'");
8777 : }
8778 0 : arg3 = static_cast< double >(val3);
8779 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8780 0 : if (!SWIG_IsOK(ecode4)) {
8781 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetACEA" "', argument " "4"" of type '" "double""'");
8782 : }
8783 0 : arg4 = static_cast< double >(val4);
8784 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8785 0 : if (!SWIG_IsOK(ecode5)) {
8786 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetACEA" "', argument " "5"" of type '" "double""'");
8787 : }
8788 0 : arg5 = static_cast< double >(val5);
8789 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
8790 0 : if (!SWIG_IsOK(ecode6)) {
8791 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetACEA" "', argument " "6"" of type '" "double""'");
8792 : }
8793 0 : arg6 = static_cast< double >(val6);
8794 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
8795 0 : if (!SWIG_IsOK(ecode7)) {
8796 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetACEA" "', argument " "7"" of type '" "double""'");
8797 : }
8798 0 : arg7 = static_cast< double >(val7);
8799 0 : {
8800 0 : const int bLocalUseExceptions = GetUseExceptions();
8801 0 : if ( bLocalUseExceptions ) {
8802 0 : pushErrorHandler();
8803 : }
8804 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetACEA(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
8805 0 : if ( bLocalUseExceptions ) {
8806 0 : popErrorHandler();
8807 : }
8808 : #ifndef SED_HACKS
8809 : if ( bLocalUseExceptions ) {
8810 : CPLErr eclass = CPLGetLastErrorType();
8811 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8812 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8813 : }
8814 : }
8815 : #endif
8816 : }
8817 0 : {
8818 : /* %typemap(out) OGRErr */
8819 0 : if ( result != 0 && GetUseExceptions()) {
8820 0 : const char* pszMessage = CPLGetLastErrorMsg();
8821 0 : if( pszMessage[0] != '\0' )
8822 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8823 : else
8824 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8825 0 : SWIG_fail;
8826 : }
8827 : }
8828 0 : {
8829 : /* %typemap(ret) OGRErr */
8830 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8831 0 : resultobj = PyInt_FromLong( result );
8832 : }
8833 : }
8834 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; } }
8835 : return resultobj;
8836 : fail:
8837 : return NULL;
8838 : }
8839 :
8840 :
8841 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAE(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8842 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8843 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8844 0 : double arg2 ;
8845 0 : double arg3 ;
8846 0 : double arg4 ;
8847 0 : double arg5 ;
8848 0 : void *argp1 = 0 ;
8849 0 : int res1 = 0 ;
8850 0 : double val2 ;
8851 0 : int ecode2 = 0 ;
8852 0 : double val3 ;
8853 0 : int ecode3 = 0 ;
8854 0 : double val4 ;
8855 0 : int ecode4 = 0 ;
8856 0 : double val5 ;
8857 0 : int ecode5 = 0 ;
8858 0 : PyObject * obj0 = 0 ;
8859 0 : PyObject * obj1 = 0 ;
8860 0 : PyObject * obj2 = 0 ;
8861 0 : PyObject * obj3 = 0 ;
8862 0 : PyObject * obj4 = 0 ;
8863 0 : char * kwnames[] = {
8864 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
8865 : };
8866 0 : OGRErr result;
8867 :
8868 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetAE", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
8869 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8870 0 : if (!SWIG_IsOK(res1)) {
8871 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAE" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8872 : }
8873 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8874 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8875 0 : if (!SWIG_IsOK(ecode2)) {
8876 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetAE" "', argument " "2"" of type '" "double""'");
8877 : }
8878 0 : arg2 = static_cast< double >(val2);
8879 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8880 0 : if (!SWIG_IsOK(ecode3)) {
8881 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetAE" "', argument " "3"" of type '" "double""'");
8882 : }
8883 0 : arg3 = static_cast< double >(val3);
8884 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8885 0 : if (!SWIG_IsOK(ecode4)) {
8886 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetAE" "', argument " "4"" of type '" "double""'");
8887 : }
8888 0 : arg4 = static_cast< double >(val4);
8889 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8890 0 : if (!SWIG_IsOK(ecode5)) {
8891 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetAE" "', argument " "5"" of type '" "double""'");
8892 : }
8893 0 : arg5 = static_cast< double >(val5);
8894 0 : {
8895 0 : const int bLocalUseExceptions = GetUseExceptions();
8896 0 : if ( bLocalUseExceptions ) {
8897 0 : pushErrorHandler();
8898 : }
8899 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAE(arg1,arg2,arg3,arg4,arg5);
8900 0 : if ( bLocalUseExceptions ) {
8901 0 : popErrorHandler();
8902 : }
8903 : #ifndef SED_HACKS
8904 : if ( bLocalUseExceptions ) {
8905 : CPLErr eclass = CPLGetLastErrorType();
8906 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8907 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8908 : }
8909 : }
8910 : #endif
8911 : }
8912 0 : {
8913 : /* %typemap(out) OGRErr */
8914 0 : if ( result != 0 && GetUseExceptions()) {
8915 0 : const char* pszMessage = CPLGetLastErrorMsg();
8916 0 : if( pszMessage[0] != '\0' )
8917 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
8918 : else
8919 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8920 0 : SWIG_fail;
8921 : }
8922 : }
8923 0 : {
8924 : /* %typemap(ret) OGRErr */
8925 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
8926 0 : resultobj = PyInt_FromLong( result );
8927 : }
8928 : }
8929 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; } }
8930 : return resultobj;
8931 : fail:
8932 : return NULL;
8933 : }
8934 :
8935 :
8936 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetBonne(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8937 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
8938 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8939 0 : double arg2 ;
8940 0 : double arg3 ;
8941 0 : double arg4 ;
8942 0 : double arg5 ;
8943 0 : void *argp1 = 0 ;
8944 0 : int res1 = 0 ;
8945 0 : double val2 ;
8946 0 : int ecode2 = 0 ;
8947 0 : double val3 ;
8948 0 : int ecode3 = 0 ;
8949 0 : double val4 ;
8950 0 : int ecode4 = 0 ;
8951 0 : double val5 ;
8952 0 : int ecode5 = 0 ;
8953 0 : PyObject * obj0 = 0 ;
8954 0 : PyObject * obj1 = 0 ;
8955 0 : PyObject * obj2 = 0 ;
8956 0 : PyObject * obj3 = 0 ;
8957 0 : PyObject * obj4 = 0 ;
8958 0 : char * kwnames[] = {
8959 : (char *)"self", (char *)"stdp", (char *)"cm", (char *)"fe", (char *)"fn", NULL
8960 : };
8961 0 : OGRErr result;
8962 :
8963 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetBonne", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
8964 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8965 0 : if (!SWIG_IsOK(res1)) {
8966 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetBonne" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8967 : }
8968 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8969 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8970 0 : if (!SWIG_IsOK(ecode2)) {
8971 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetBonne" "', argument " "2"" of type '" "double""'");
8972 : }
8973 0 : arg2 = static_cast< double >(val2);
8974 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8975 0 : if (!SWIG_IsOK(ecode3)) {
8976 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetBonne" "', argument " "3"" of type '" "double""'");
8977 : }
8978 0 : arg3 = static_cast< double >(val3);
8979 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8980 0 : if (!SWIG_IsOK(ecode4)) {
8981 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetBonne" "', argument " "4"" of type '" "double""'");
8982 : }
8983 0 : arg4 = static_cast< double >(val4);
8984 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8985 0 : if (!SWIG_IsOK(ecode5)) {
8986 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetBonne" "', argument " "5"" of type '" "double""'");
8987 : }
8988 0 : arg5 = static_cast< double >(val5);
8989 0 : {
8990 0 : const int bLocalUseExceptions = GetUseExceptions();
8991 0 : if ( bLocalUseExceptions ) {
8992 0 : pushErrorHandler();
8993 : }
8994 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetBonne(arg1,arg2,arg3,arg4,arg5);
8995 0 : if ( bLocalUseExceptions ) {
8996 0 : popErrorHandler();
8997 : }
8998 : #ifndef SED_HACKS
8999 : if ( bLocalUseExceptions ) {
9000 : CPLErr eclass = CPLGetLastErrorType();
9001 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9002 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9003 : }
9004 : }
9005 : #endif
9006 : }
9007 0 : {
9008 : /* %typemap(out) OGRErr */
9009 0 : if ( result != 0 && GetUseExceptions()) {
9010 0 : const char* pszMessage = CPLGetLastErrorMsg();
9011 0 : if( pszMessage[0] != '\0' )
9012 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9013 : else
9014 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9015 0 : SWIG_fail;
9016 : }
9017 : }
9018 0 : {
9019 : /* %typemap(ret) OGRErr */
9020 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9021 0 : resultobj = PyInt_FromLong( result );
9022 : }
9023 : }
9024 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; } }
9025 : return resultobj;
9026 : fail:
9027 : return NULL;
9028 : }
9029 :
9030 :
9031 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9032 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9033 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9034 0 : double arg2 ;
9035 0 : double arg3 ;
9036 0 : double arg4 ;
9037 0 : double arg5 ;
9038 0 : void *argp1 = 0 ;
9039 0 : int res1 = 0 ;
9040 0 : double val2 ;
9041 0 : int ecode2 = 0 ;
9042 0 : double val3 ;
9043 0 : int ecode3 = 0 ;
9044 0 : double val4 ;
9045 0 : int ecode4 = 0 ;
9046 0 : double val5 ;
9047 0 : int ecode5 = 0 ;
9048 0 : PyObject * obj0 = 0 ;
9049 0 : PyObject * obj1 = 0 ;
9050 0 : PyObject * obj2 = 0 ;
9051 0 : PyObject * obj3 = 0 ;
9052 0 : PyObject * obj4 = 0 ;
9053 0 : char * kwnames[] = {
9054 : (char *)"self", (char *)"stdp1", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9055 : };
9056 0 : OGRErr result;
9057 :
9058 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetCEA", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
9059 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9060 0 : if (!SWIG_IsOK(res1)) {
9061 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9062 : }
9063 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9064 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9065 0 : if (!SWIG_IsOK(ecode2)) {
9066 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCEA" "', argument " "2"" of type '" "double""'");
9067 : }
9068 0 : arg2 = static_cast< double >(val2);
9069 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9070 0 : if (!SWIG_IsOK(ecode3)) {
9071 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetCEA" "', argument " "3"" of type '" "double""'");
9072 : }
9073 0 : arg3 = static_cast< double >(val3);
9074 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9075 0 : if (!SWIG_IsOK(ecode4)) {
9076 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetCEA" "', argument " "4"" of type '" "double""'");
9077 : }
9078 0 : arg4 = static_cast< double >(val4);
9079 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9080 0 : if (!SWIG_IsOK(ecode5)) {
9081 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetCEA" "', argument " "5"" of type '" "double""'");
9082 : }
9083 0 : arg5 = static_cast< double >(val5);
9084 0 : {
9085 0 : const int bLocalUseExceptions = GetUseExceptions();
9086 0 : if ( bLocalUseExceptions ) {
9087 0 : pushErrorHandler();
9088 : }
9089 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetCEA(arg1,arg2,arg3,arg4,arg5);
9090 0 : if ( bLocalUseExceptions ) {
9091 0 : popErrorHandler();
9092 : }
9093 : #ifndef SED_HACKS
9094 : if ( bLocalUseExceptions ) {
9095 : CPLErr eclass = CPLGetLastErrorType();
9096 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9097 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9098 : }
9099 : }
9100 : #endif
9101 : }
9102 0 : {
9103 : /* %typemap(out) OGRErr */
9104 0 : if ( result != 0 && GetUseExceptions()) {
9105 0 : const char* pszMessage = CPLGetLastErrorMsg();
9106 0 : if( pszMessage[0] != '\0' )
9107 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9108 : else
9109 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9110 0 : SWIG_fail;
9111 : }
9112 : }
9113 0 : {
9114 : /* %typemap(ret) OGRErr */
9115 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9116 0 : resultobj = PyInt_FromLong( result );
9117 : }
9118 : }
9119 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; } }
9120 : return resultobj;
9121 : fail:
9122 : return NULL;
9123 : }
9124 :
9125 :
9126 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9127 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9128 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9129 0 : double arg2 ;
9130 0 : double arg3 ;
9131 0 : double arg4 ;
9132 0 : double arg5 ;
9133 0 : void *argp1 = 0 ;
9134 0 : int res1 = 0 ;
9135 0 : double val2 ;
9136 0 : int ecode2 = 0 ;
9137 0 : double val3 ;
9138 0 : int ecode3 = 0 ;
9139 0 : double val4 ;
9140 0 : int ecode4 = 0 ;
9141 0 : double val5 ;
9142 0 : int ecode5 = 0 ;
9143 0 : PyObject * obj0 = 0 ;
9144 0 : PyObject * obj1 = 0 ;
9145 0 : PyObject * obj2 = 0 ;
9146 0 : PyObject * obj3 = 0 ;
9147 0 : PyObject * obj4 = 0 ;
9148 0 : char * kwnames[] = {
9149 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
9150 : };
9151 0 : OGRErr result;
9152 :
9153 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetCS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
9154 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9155 0 : if (!SWIG_IsOK(res1)) {
9156 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9157 : }
9158 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9159 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9160 0 : if (!SWIG_IsOK(ecode2)) {
9161 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCS" "', argument " "2"" of type '" "double""'");
9162 : }
9163 0 : arg2 = static_cast< double >(val2);
9164 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9165 0 : if (!SWIG_IsOK(ecode3)) {
9166 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetCS" "', argument " "3"" of type '" "double""'");
9167 : }
9168 0 : arg3 = static_cast< double >(val3);
9169 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9170 0 : if (!SWIG_IsOK(ecode4)) {
9171 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetCS" "', argument " "4"" of type '" "double""'");
9172 : }
9173 0 : arg4 = static_cast< double >(val4);
9174 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9175 0 : if (!SWIG_IsOK(ecode5)) {
9176 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetCS" "', argument " "5"" of type '" "double""'");
9177 : }
9178 0 : arg5 = static_cast< double >(val5);
9179 0 : {
9180 0 : const int bLocalUseExceptions = GetUseExceptions();
9181 0 : if ( bLocalUseExceptions ) {
9182 0 : pushErrorHandler();
9183 : }
9184 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetCS(arg1,arg2,arg3,arg4,arg5);
9185 0 : if ( bLocalUseExceptions ) {
9186 0 : popErrorHandler();
9187 : }
9188 : #ifndef SED_HACKS
9189 : if ( bLocalUseExceptions ) {
9190 : CPLErr eclass = CPLGetLastErrorType();
9191 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9192 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9193 : }
9194 : }
9195 : #endif
9196 : }
9197 0 : {
9198 : /* %typemap(out) OGRErr */
9199 0 : if ( result != 0 && GetUseExceptions()) {
9200 0 : const char* pszMessage = CPLGetLastErrorMsg();
9201 0 : if( pszMessage[0] != '\0' )
9202 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9203 : else
9204 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9205 0 : SWIG_fail;
9206 : }
9207 : }
9208 0 : {
9209 : /* %typemap(ret) OGRErr */
9210 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9211 0 : resultobj = PyInt_FromLong( result );
9212 : }
9213 : }
9214 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; } }
9215 : return resultobj;
9216 : fail:
9217 : return NULL;
9218 : }
9219 :
9220 :
9221 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9222 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9223 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9224 0 : double arg2 ;
9225 0 : double arg3 ;
9226 0 : double arg4 ;
9227 0 : double arg5 ;
9228 0 : double arg6 ;
9229 0 : double arg7 ;
9230 0 : void *argp1 = 0 ;
9231 0 : int res1 = 0 ;
9232 0 : double val2 ;
9233 0 : int ecode2 = 0 ;
9234 0 : double val3 ;
9235 0 : int ecode3 = 0 ;
9236 0 : double val4 ;
9237 0 : int ecode4 = 0 ;
9238 0 : double val5 ;
9239 0 : int ecode5 = 0 ;
9240 0 : double val6 ;
9241 0 : int ecode6 = 0 ;
9242 0 : double val7 ;
9243 0 : int ecode7 = 0 ;
9244 0 : PyObject * obj0 = 0 ;
9245 0 : PyObject * obj1 = 0 ;
9246 0 : PyObject * obj2 = 0 ;
9247 0 : PyObject * obj3 = 0 ;
9248 0 : PyObject * obj4 = 0 ;
9249 0 : PyObject * obj5 = 0 ;
9250 0 : PyObject * obj6 = 0 ;
9251 0 : char * kwnames[] = {
9252 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
9253 : };
9254 0 : OGRErr result;
9255 :
9256 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetEC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
9257 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9258 0 : if (!SWIG_IsOK(res1)) {
9259 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9260 : }
9261 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9262 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9263 0 : if (!SWIG_IsOK(ecode2)) {
9264 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEC" "', argument " "2"" of type '" "double""'");
9265 : }
9266 0 : arg2 = static_cast< double >(val2);
9267 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9268 0 : if (!SWIG_IsOK(ecode3)) {
9269 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEC" "', argument " "3"" of type '" "double""'");
9270 : }
9271 0 : arg3 = static_cast< double >(val3);
9272 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9273 0 : if (!SWIG_IsOK(ecode4)) {
9274 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEC" "', argument " "4"" of type '" "double""'");
9275 : }
9276 0 : arg4 = static_cast< double >(val4);
9277 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9278 0 : if (!SWIG_IsOK(ecode5)) {
9279 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEC" "', argument " "5"" of type '" "double""'");
9280 : }
9281 0 : arg5 = static_cast< double >(val5);
9282 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9283 0 : if (!SWIG_IsOK(ecode6)) {
9284 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetEC" "', argument " "6"" of type '" "double""'");
9285 : }
9286 0 : arg6 = static_cast< double >(val6);
9287 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
9288 0 : if (!SWIG_IsOK(ecode7)) {
9289 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetEC" "', argument " "7"" of type '" "double""'");
9290 : }
9291 0 : arg7 = static_cast< double >(val7);
9292 0 : {
9293 0 : const int bLocalUseExceptions = GetUseExceptions();
9294 0 : if ( bLocalUseExceptions ) {
9295 0 : pushErrorHandler();
9296 : }
9297 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
9298 0 : if ( bLocalUseExceptions ) {
9299 0 : popErrorHandler();
9300 : }
9301 : #ifndef SED_HACKS
9302 : if ( bLocalUseExceptions ) {
9303 : CPLErr eclass = CPLGetLastErrorType();
9304 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9305 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9306 : }
9307 : }
9308 : #endif
9309 : }
9310 0 : {
9311 : /* %typemap(out) OGRErr */
9312 0 : if ( result != 0 && GetUseExceptions()) {
9313 0 : const char* pszMessage = CPLGetLastErrorMsg();
9314 0 : if( pszMessage[0] != '\0' )
9315 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9316 : else
9317 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9318 0 : SWIG_fail;
9319 : }
9320 : }
9321 0 : {
9322 : /* %typemap(ret) OGRErr */
9323 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9324 0 : resultobj = PyInt_FromLong( result );
9325 : }
9326 : }
9327 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; } }
9328 : return resultobj;
9329 : fail:
9330 : return NULL;
9331 : }
9332 :
9333 :
9334 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEckertIV(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9335 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9336 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9337 0 : double arg2 ;
9338 0 : double arg3 ;
9339 0 : double arg4 ;
9340 0 : void *argp1 = 0 ;
9341 0 : int res1 = 0 ;
9342 0 : double val2 ;
9343 0 : int ecode2 = 0 ;
9344 0 : double val3 ;
9345 0 : int ecode3 = 0 ;
9346 0 : double val4 ;
9347 0 : int ecode4 = 0 ;
9348 0 : PyObject * obj0 = 0 ;
9349 0 : PyObject * obj1 = 0 ;
9350 0 : PyObject * obj2 = 0 ;
9351 0 : PyObject * obj3 = 0 ;
9352 0 : char * kwnames[] = {
9353 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9354 : };
9355 0 : OGRErr result;
9356 :
9357 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetEckertIV", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9358 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9359 0 : if (!SWIG_IsOK(res1)) {
9360 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEckertIV" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9361 : }
9362 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9363 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9364 0 : if (!SWIG_IsOK(ecode2)) {
9365 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEckertIV" "', argument " "2"" of type '" "double""'");
9366 : }
9367 0 : arg2 = static_cast< double >(val2);
9368 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9369 0 : if (!SWIG_IsOK(ecode3)) {
9370 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEckertIV" "', argument " "3"" of type '" "double""'");
9371 : }
9372 0 : arg3 = static_cast< double >(val3);
9373 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9374 0 : if (!SWIG_IsOK(ecode4)) {
9375 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEckertIV" "', argument " "4"" of type '" "double""'");
9376 : }
9377 0 : arg4 = static_cast< double >(val4);
9378 0 : {
9379 0 : const int bLocalUseExceptions = GetUseExceptions();
9380 0 : if ( bLocalUseExceptions ) {
9381 0 : pushErrorHandler();
9382 : }
9383 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEckertIV(arg1,arg2,arg3,arg4);
9384 0 : if ( bLocalUseExceptions ) {
9385 0 : popErrorHandler();
9386 : }
9387 : #ifndef SED_HACKS
9388 : if ( bLocalUseExceptions ) {
9389 : CPLErr eclass = CPLGetLastErrorType();
9390 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9391 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9392 : }
9393 : }
9394 : #endif
9395 : }
9396 0 : {
9397 : /* %typemap(out) OGRErr */
9398 0 : if ( result != 0 && GetUseExceptions()) {
9399 0 : const char* pszMessage = CPLGetLastErrorMsg();
9400 0 : if( pszMessage[0] != '\0' )
9401 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9402 : else
9403 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9404 0 : SWIG_fail;
9405 : }
9406 : }
9407 0 : {
9408 : /* %typemap(ret) OGRErr */
9409 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9410 0 : resultobj = PyInt_FromLong( result );
9411 : }
9412 : }
9413 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; } }
9414 : return resultobj;
9415 : fail:
9416 : return NULL;
9417 : }
9418 :
9419 :
9420 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEckertVI(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9421 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9422 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9423 0 : double arg2 ;
9424 0 : double arg3 ;
9425 0 : double arg4 ;
9426 0 : void *argp1 = 0 ;
9427 0 : int res1 = 0 ;
9428 0 : double val2 ;
9429 0 : int ecode2 = 0 ;
9430 0 : double val3 ;
9431 0 : int ecode3 = 0 ;
9432 0 : double val4 ;
9433 0 : int ecode4 = 0 ;
9434 0 : PyObject * obj0 = 0 ;
9435 0 : PyObject * obj1 = 0 ;
9436 0 : PyObject * obj2 = 0 ;
9437 0 : PyObject * obj3 = 0 ;
9438 0 : char * kwnames[] = {
9439 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9440 : };
9441 0 : OGRErr result;
9442 :
9443 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetEckertVI", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9444 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9445 0 : if (!SWIG_IsOK(res1)) {
9446 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEckertVI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9447 : }
9448 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9449 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9450 0 : if (!SWIG_IsOK(ecode2)) {
9451 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEckertVI" "', argument " "2"" of type '" "double""'");
9452 : }
9453 0 : arg2 = static_cast< double >(val2);
9454 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9455 0 : if (!SWIG_IsOK(ecode3)) {
9456 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEckertVI" "', argument " "3"" of type '" "double""'");
9457 : }
9458 0 : arg3 = static_cast< double >(val3);
9459 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9460 0 : if (!SWIG_IsOK(ecode4)) {
9461 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEckertVI" "', argument " "4"" of type '" "double""'");
9462 : }
9463 0 : arg4 = static_cast< double >(val4);
9464 0 : {
9465 0 : const int bLocalUseExceptions = GetUseExceptions();
9466 0 : if ( bLocalUseExceptions ) {
9467 0 : pushErrorHandler();
9468 : }
9469 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEckertVI(arg1,arg2,arg3,arg4);
9470 0 : if ( bLocalUseExceptions ) {
9471 0 : popErrorHandler();
9472 : }
9473 : #ifndef SED_HACKS
9474 : if ( bLocalUseExceptions ) {
9475 : CPLErr eclass = CPLGetLastErrorType();
9476 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9477 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9478 : }
9479 : }
9480 : #endif
9481 : }
9482 0 : {
9483 : /* %typemap(out) OGRErr */
9484 0 : if ( result != 0 && GetUseExceptions()) {
9485 0 : const char* pszMessage = CPLGetLastErrorMsg();
9486 0 : if( pszMessage[0] != '\0' )
9487 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9488 : else
9489 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9490 0 : SWIG_fail;
9491 : }
9492 : }
9493 0 : {
9494 : /* %typemap(ret) OGRErr */
9495 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9496 0 : resultobj = PyInt_FromLong( result );
9497 : }
9498 : }
9499 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; } }
9500 : return resultobj;
9501 : fail:
9502 : return NULL;
9503 : }
9504 :
9505 :
9506 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEquirectangular(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9507 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9508 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9509 0 : double arg2 ;
9510 0 : double arg3 ;
9511 0 : double arg4 ;
9512 0 : double arg5 ;
9513 0 : void *argp1 = 0 ;
9514 0 : int res1 = 0 ;
9515 0 : double val2 ;
9516 0 : int ecode2 = 0 ;
9517 0 : double val3 ;
9518 0 : int ecode3 = 0 ;
9519 0 : double val4 ;
9520 0 : int ecode4 = 0 ;
9521 0 : double val5 ;
9522 0 : int ecode5 = 0 ;
9523 0 : PyObject * obj0 = 0 ;
9524 0 : PyObject * obj1 = 0 ;
9525 0 : PyObject * obj2 = 0 ;
9526 0 : PyObject * obj3 = 0 ;
9527 0 : PyObject * obj4 = 0 ;
9528 0 : char * kwnames[] = {
9529 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
9530 : };
9531 0 : OGRErr result;
9532 :
9533 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetEquirectangular", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
9534 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9535 0 : if (!SWIG_IsOK(res1)) {
9536 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEquirectangular" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9537 : }
9538 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9539 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9540 0 : if (!SWIG_IsOK(ecode2)) {
9541 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEquirectangular" "', argument " "2"" of type '" "double""'");
9542 : }
9543 0 : arg2 = static_cast< double >(val2);
9544 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9545 0 : if (!SWIG_IsOK(ecode3)) {
9546 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEquirectangular" "', argument " "3"" of type '" "double""'");
9547 : }
9548 0 : arg3 = static_cast< double >(val3);
9549 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9550 0 : if (!SWIG_IsOK(ecode4)) {
9551 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEquirectangular" "', argument " "4"" of type '" "double""'");
9552 : }
9553 0 : arg4 = static_cast< double >(val4);
9554 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9555 0 : if (!SWIG_IsOK(ecode5)) {
9556 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEquirectangular" "', argument " "5"" of type '" "double""'");
9557 : }
9558 0 : arg5 = static_cast< double >(val5);
9559 0 : {
9560 0 : const int bLocalUseExceptions = GetUseExceptions();
9561 0 : if ( bLocalUseExceptions ) {
9562 0 : pushErrorHandler();
9563 : }
9564 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular(arg1,arg2,arg3,arg4,arg5);
9565 0 : if ( bLocalUseExceptions ) {
9566 0 : popErrorHandler();
9567 : }
9568 : #ifndef SED_HACKS
9569 : if ( bLocalUseExceptions ) {
9570 : CPLErr eclass = CPLGetLastErrorType();
9571 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9572 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9573 : }
9574 : }
9575 : #endif
9576 : }
9577 0 : {
9578 : /* %typemap(out) OGRErr */
9579 0 : if ( result != 0 && GetUseExceptions()) {
9580 0 : const char* pszMessage = CPLGetLastErrorMsg();
9581 0 : if( pszMessage[0] != '\0' )
9582 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9583 : else
9584 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9585 0 : SWIG_fail;
9586 : }
9587 : }
9588 0 : {
9589 : /* %typemap(ret) OGRErr */
9590 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9591 0 : resultobj = PyInt_FromLong( result );
9592 : }
9593 : }
9594 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; } }
9595 : return resultobj;
9596 : fail:
9597 : return NULL;
9598 : }
9599 :
9600 :
9601 3 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEquirectangular2(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9602 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9603 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9604 3 : double arg2 ;
9605 3 : double arg3 ;
9606 3 : double arg4 ;
9607 3 : double arg5 ;
9608 3 : double arg6 ;
9609 3 : void *argp1 = 0 ;
9610 3 : int res1 = 0 ;
9611 3 : double val2 ;
9612 3 : int ecode2 = 0 ;
9613 3 : double val3 ;
9614 3 : int ecode3 = 0 ;
9615 3 : double val4 ;
9616 3 : int ecode4 = 0 ;
9617 3 : double val5 ;
9618 3 : int ecode5 = 0 ;
9619 3 : double val6 ;
9620 3 : int ecode6 = 0 ;
9621 3 : PyObject * obj0 = 0 ;
9622 3 : PyObject * obj1 = 0 ;
9623 3 : PyObject * obj2 = 0 ;
9624 3 : PyObject * obj3 = 0 ;
9625 3 : PyObject * obj4 = 0 ;
9626 3 : PyObject * obj5 = 0 ;
9627 3 : char * kwnames[] = {
9628 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"pseudostdparallellat", (char *)"fe", (char *)"fn", NULL
9629 : };
9630 3 : OGRErr result;
9631 :
9632 3 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetEquirectangular2", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
9633 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9634 3 : if (!SWIG_IsOK(res1)) {
9635 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9636 : }
9637 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9638 3 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9639 3 : if (!SWIG_IsOK(ecode2)) {
9640 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "2"" of type '" "double""'");
9641 : }
9642 3 : arg2 = static_cast< double >(val2);
9643 3 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9644 3 : if (!SWIG_IsOK(ecode3)) {
9645 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "3"" of type '" "double""'");
9646 : }
9647 3 : arg3 = static_cast< double >(val3);
9648 3 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9649 3 : if (!SWIG_IsOK(ecode4)) {
9650 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "4"" of type '" "double""'");
9651 : }
9652 3 : arg4 = static_cast< double >(val4);
9653 3 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9654 3 : if (!SWIG_IsOK(ecode5)) {
9655 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "5"" of type '" "double""'");
9656 : }
9657 3 : arg5 = static_cast< double >(val5);
9658 3 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9659 3 : if (!SWIG_IsOK(ecode6)) {
9660 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "6"" of type '" "double""'");
9661 : }
9662 3 : arg6 = static_cast< double >(val6);
9663 3 : {
9664 3 : const int bLocalUseExceptions = GetUseExceptions();
9665 3 : if ( bLocalUseExceptions ) {
9666 3 : pushErrorHandler();
9667 : }
9668 3 : result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular2(arg1,arg2,arg3,arg4,arg5,arg6);
9669 3 : if ( bLocalUseExceptions ) {
9670 3 : popErrorHandler();
9671 : }
9672 : #ifndef SED_HACKS
9673 : if ( bLocalUseExceptions ) {
9674 : CPLErr eclass = CPLGetLastErrorType();
9675 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9676 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9677 : }
9678 : }
9679 : #endif
9680 : }
9681 3 : {
9682 : /* %typemap(out) OGRErr */
9683 3 : if ( result != 0 && GetUseExceptions()) {
9684 0 : const char* pszMessage = CPLGetLastErrorMsg();
9685 0 : if( pszMessage[0] != '\0' )
9686 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9687 : else
9688 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9689 0 : SWIG_fail;
9690 : }
9691 : }
9692 3 : {
9693 : /* %typemap(ret) OGRErr */
9694 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9695 3 : resultobj = PyInt_FromLong( result );
9696 : }
9697 : }
9698 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; } }
9699 : return resultobj;
9700 : fail:
9701 : return NULL;
9702 : }
9703 :
9704 :
9705 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGaussSchreiberTMercator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9706 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9707 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9708 0 : double arg2 ;
9709 0 : double arg3 ;
9710 0 : double arg4 ;
9711 0 : double arg5 ;
9712 0 : double arg6 ;
9713 0 : void *argp1 = 0 ;
9714 0 : int res1 = 0 ;
9715 0 : double val2 ;
9716 0 : int ecode2 = 0 ;
9717 0 : double val3 ;
9718 0 : int ecode3 = 0 ;
9719 0 : double val4 ;
9720 0 : int ecode4 = 0 ;
9721 0 : double val5 ;
9722 0 : int ecode5 = 0 ;
9723 0 : double val6 ;
9724 0 : int ecode6 = 0 ;
9725 0 : PyObject * obj0 = 0 ;
9726 0 : PyObject * obj1 = 0 ;
9727 0 : PyObject * obj2 = 0 ;
9728 0 : PyObject * obj3 = 0 ;
9729 0 : PyObject * obj4 = 0 ;
9730 0 : PyObject * obj5 = 0 ;
9731 0 : char * kwnames[] = {
9732 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"sc", (char *)"fe", (char *)"fn", NULL
9733 : };
9734 0 : OGRErr result;
9735 :
9736 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetGaussSchreiberTMercator", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
9737 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9738 0 : if (!SWIG_IsOK(res1)) {
9739 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9740 : }
9741 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9742 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9743 0 : if (!SWIG_IsOK(ecode2)) {
9744 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "2"" of type '" "double""'");
9745 : }
9746 0 : arg2 = static_cast< double >(val2);
9747 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9748 0 : if (!SWIG_IsOK(ecode3)) {
9749 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "3"" of type '" "double""'");
9750 : }
9751 0 : arg3 = static_cast< double >(val3);
9752 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9753 0 : if (!SWIG_IsOK(ecode4)) {
9754 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "4"" of type '" "double""'");
9755 : }
9756 0 : arg4 = static_cast< double >(val4);
9757 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9758 0 : if (!SWIG_IsOK(ecode5)) {
9759 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "5"" of type '" "double""'");
9760 : }
9761 0 : arg5 = static_cast< double >(val5);
9762 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9763 0 : if (!SWIG_IsOK(ecode6)) {
9764 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "6"" of type '" "double""'");
9765 : }
9766 0 : arg6 = static_cast< double >(val6);
9767 0 : {
9768 0 : const int bLocalUseExceptions = GetUseExceptions();
9769 0 : if ( bLocalUseExceptions ) {
9770 0 : pushErrorHandler();
9771 : }
9772 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(arg1,arg2,arg3,arg4,arg5,arg6);
9773 0 : if ( bLocalUseExceptions ) {
9774 0 : popErrorHandler();
9775 : }
9776 : #ifndef SED_HACKS
9777 : if ( bLocalUseExceptions ) {
9778 : CPLErr eclass = CPLGetLastErrorType();
9779 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9780 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9781 : }
9782 : }
9783 : #endif
9784 : }
9785 0 : {
9786 : /* %typemap(out) OGRErr */
9787 0 : if ( result != 0 && GetUseExceptions()) {
9788 0 : const char* pszMessage = CPLGetLastErrorMsg();
9789 0 : if( pszMessage[0] != '\0' )
9790 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9791 : else
9792 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9793 0 : SWIG_fail;
9794 : }
9795 : }
9796 0 : {
9797 : /* %typemap(ret) OGRErr */
9798 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9799 0 : resultobj = PyInt_FromLong( result );
9800 : }
9801 : }
9802 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; } }
9803 : return resultobj;
9804 : fail:
9805 : return NULL;
9806 : }
9807 :
9808 :
9809 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9810 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9811 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9812 1 : double arg2 ;
9813 1 : double arg3 ;
9814 1 : double arg4 ;
9815 1 : void *argp1 = 0 ;
9816 1 : int res1 = 0 ;
9817 1 : double val2 ;
9818 1 : int ecode2 = 0 ;
9819 1 : double val3 ;
9820 1 : int ecode3 = 0 ;
9821 1 : double val4 ;
9822 1 : int ecode4 = 0 ;
9823 1 : PyObject * obj0 = 0 ;
9824 1 : PyObject * obj1 = 0 ;
9825 1 : PyObject * obj2 = 0 ;
9826 1 : PyObject * obj3 = 0 ;
9827 1 : char * kwnames[] = {
9828 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9829 : };
9830 1 : OGRErr result;
9831 :
9832 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetGS", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9833 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9834 1 : if (!SWIG_IsOK(res1)) {
9835 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9836 : }
9837 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9838 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9839 1 : if (!SWIG_IsOK(ecode2)) {
9840 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGS" "', argument " "2"" of type '" "double""'");
9841 : }
9842 1 : arg2 = static_cast< double >(val2);
9843 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9844 1 : if (!SWIG_IsOK(ecode3)) {
9845 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGS" "', argument " "3"" of type '" "double""'");
9846 : }
9847 1 : arg3 = static_cast< double >(val3);
9848 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9849 1 : if (!SWIG_IsOK(ecode4)) {
9850 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGS" "', argument " "4"" of type '" "double""'");
9851 : }
9852 1 : arg4 = static_cast< double >(val4);
9853 1 : {
9854 1 : const int bLocalUseExceptions = GetUseExceptions();
9855 1 : if ( bLocalUseExceptions ) {
9856 1 : pushErrorHandler();
9857 : }
9858 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetGS(arg1,arg2,arg3,arg4);
9859 1 : if ( bLocalUseExceptions ) {
9860 1 : popErrorHandler();
9861 : }
9862 : #ifndef SED_HACKS
9863 : if ( bLocalUseExceptions ) {
9864 : CPLErr eclass = CPLGetLastErrorType();
9865 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9866 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9867 : }
9868 : }
9869 : #endif
9870 : }
9871 1 : {
9872 : /* %typemap(out) OGRErr */
9873 1 : if ( result != 0 && GetUseExceptions()) {
9874 0 : const char* pszMessage = CPLGetLastErrorMsg();
9875 0 : if( pszMessage[0] != '\0' )
9876 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9877 : else
9878 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9879 0 : SWIG_fail;
9880 : }
9881 : }
9882 1 : {
9883 : /* %typemap(ret) OGRErr */
9884 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9885 1 : resultobj = PyInt_FromLong( result );
9886 : }
9887 : }
9888 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; } }
9889 : return resultobj;
9890 : fail:
9891 : return NULL;
9892 : }
9893 :
9894 :
9895 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGH(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9896 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9897 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9898 0 : double arg2 ;
9899 0 : double arg3 ;
9900 0 : double arg4 ;
9901 0 : void *argp1 = 0 ;
9902 0 : int res1 = 0 ;
9903 0 : double val2 ;
9904 0 : int ecode2 = 0 ;
9905 0 : double val3 ;
9906 0 : int ecode3 = 0 ;
9907 0 : double val4 ;
9908 0 : int ecode4 = 0 ;
9909 0 : PyObject * obj0 = 0 ;
9910 0 : PyObject * obj1 = 0 ;
9911 0 : PyObject * obj2 = 0 ;
9912 0 : PyObject * obj3 = 0 ;
9913 0 : char * kwnames[] = {
9914 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
9915 : };
9916 0 : OGRErr result;
9917 :
9918 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetGH", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
9919 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9920 0 : if (!SWIG_IsOK(res1)) {
9921 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGH" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9922 : }
9923 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9924 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9925 0 : if (!SWIG_IsOK(ecode2)) {
9926 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGH" "', argument " "2"" of type '" "double""'");
9927 : }
9928 0 : arg2 = static_cast< double >(val2);
9929 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9930 0 : if (!SWIG_IsOK(ecode3)) {
9931 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGH" "', argument " "3"" of type '" "double""'");
9932 : }
9933 0 : arg3 = static_cast< double >(val3);
9934 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9935 0 : if (!SWIG_IsOK(ecode4)) {
9936 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGH" "', argument " "4"" of type '" "double""'");
9937 : }
9938 0 : arg4 = static_cast< double >(val4);
9939 0 : {
9940 0 : const int bLocalUseExceptions = GetUseExceptions();
9941 0 : if ( bLocalUseExceptions ) {
9942 0 : pushErrorHandler();
9943 : }
9944 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGH(arg1,arg2,arg3,arg4);
9945 0 : if ( bLocalUseExceptions ) {
9946 0 : popErrorHandler();
9947 : }
9948 : #ifndef SED_HACKS
9949 : if ( bLocalUseExceptions ) {
9950 : CPLErr eclass = CPLGetLastErrorType();
9951 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9952 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9953 : }
9954 : }
9955 : #endif
9956 : }
9957 0 : {
9958 : /* %typemap(out) OGRErr */
9959 0 : if ( result != 0 && GetUseExceptions()) {
9960 0 : const char* pszMessage = CPLGetLastErrorMsg();
9961 0 : if( pszMessage[0] != '\0' )
9962 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
9963 : else
9964 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9965 0 : SWIG_fail;
9966 : }
9967 : }
9968 0 : {
9969 : /* %typemap(ret) OGRErr */
9970 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
9971 0 : resultobj = PyInt_FromLong( result );
9972 : }
9973 : }
9974 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; } }
9975 : return resultobj;
9976 : fail:
9977 : return NULL;
9978 : }
9979 :
9980 :
9981 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetIGH(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9982 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
9983 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9984 0 : void *argp1 = 0 ;
9985 0 : int res1 = 0 ;
9986 0 : PyObject *swig_obj[1] ;
9987 0 : OGRErr result;
9988 :
9989 0 : if (!args) SWIG_fail;
9990 0 : swig_obj[0] = args;
9991 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9992 0 : if (!SWIG_IsOK(res1)) {
9993 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetIGH" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9994 : }
9995 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9996 0 : {
9997 0 : const int bLocalUseExceptions = GetUseExceptions();
9998 0 : if ( bLocalUseExceptions ) {
9999 0 : pushErrorHandler();
10000 : }
10001 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetIGH(arg1);
10002 0 : if ( bLocalUseExceptions ) {
10003 0 : popErrorHandler();
10004 : }
10005 : #ifndef SED_HACKS
10006 : if ( bLocalUseExceptions ) {
10007 : CPLErr eclass = CPLGetLastErrorType();
10008 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10009 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10010 : }
10011 : }
10012 : #endif
10013 : }
10014 0 : {
10015 : /* %typemap(out) OGRErr */
10016 0 : if ( result != 0 && GetUseExceptions()) {
10017 0 : const char* pszMessage = CPLGetLastErrorMsg();
10018 0 : if( pszMessage[0] != '\0' )
10019 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10020 : else
10021 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10022 0 : SWIG_fail;
10023 : }
10024 : }
10025 0 : {
10026 : /* %typemap(ret) OGRErr */
10027 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10028 0 : resultobj = PyInt_FromLong( result );
10029 : }
10030 : }
10031 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; } }
10032 : return resultobj;
10033 : fail:
10034 : return NULL;
10035 : }
10036 :
10037 :
10038 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGEOS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10039 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10040 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10041 0 : double arg2 ;
10042 0 : double arg3 ;
10043 0 : double arg4 ;
10044 0 : double arg5 ;
10045 0 : void *argp1 = 0 ;
10046 0 : int res1 = 0 ;
10047 0 : double val2 ;
10048 0 : int ecode2 = 0 ;
10049 0 : double val3 ;
10050 0 : int ecode3 = 0 ;
10051 0 : double val4 ;
10052 0 : int ecode4 = 0 ;
10053 0 : double val5 ;
10054 0 : int ecode5 = 0 ;
10055 0 : PyObject * obj0 = 0 ;
10056 0 : PyObject * obj1 = 0 ;
10057 0 : PyObject * obj2 = 0 ;
10058 0 : PyObject * obj3 = 0 ;
10059 0 : PyObject * obj4 = 0 ;
10060 0 : char * kwnames[] = {
10061 : (char *)"self", (char *)"cm", (char *)"satelliteheight", (char *)"fe", (char *)"fn", NULL
10062 : };
10063 0 : OGRErr result;
10064 :
10065 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetGEOS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
10066 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10067 0 : if (!SWIG_IsOK(res1)) {
10068 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGEOS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10069 : }
10070 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10071 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10072 0 : if (!SWIG_IsOK(ecode2)) {
10073 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGEOS" "', argument " "2"" of type '" "double""'");
10074 : }
10075 0 : arg2 = static_cast< double >(val2);
10076 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10077 0 : if (!SWIG_IsOK(ecode3)) {
10078 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGEOS" "', argument " "3"" of type '" "double""'");
10079 : }
10080 0 : arg3 = static_cast< double >(val3);
10081 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10082 0 : if (!SWIG_IsOK(ecode4)) {
10083 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGEOS" "', argument " "4"" of type '" "double""'");
10084 : }
10085 0 : arg4 = static_cast< double >(val4);
10086 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10087 0 : if (!SWIG_IsOK(ecode5)) {
10088 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGEOS" "', argument " "5"" of type '" "double""'");
10089 : }
10090 0 : arg5 = static_cast< double >(val5);
10091 0 : {
10092 0 : const int bLocalUseExceptions = GetUseExceptions();
10093 0 : if ( bLocalUseExceptions ) {
10094 0 : pushErrorHandler();
10095 : }
10096 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGEOS(arg1,arg2,arg3,arg4,arg5);
10097 0 : if ( bLocalUseExceptions ) {
10098 0 : popErrorHandler();
10099 : }
10100 : #ifndef SED_HACKS
10101 : if ( bLocalUseExceptions ) {
10102 : CPLErr eclass = CPLGetLastErrorType();
10103 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10104 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10105 : }
10106 : }
10107 : #endif
10108 : }
10109 0 : {
10110 : /* %typemap(out) OGRErr */
10111 0 : if ( result != 0 && GetUseExceptions()) {
10112 0 : const char* pszMessage = CPLGetLastErrorMsg();
10113 0 : if( pszMessage[0] != '\0' )
10114 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10115 : else
10116 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10117 0 : SWIG_fail;
10118 : }
10119 : }
10120 0 : {
10121 : /* %typemap(ret) OGRErr */
10122 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10123 0 : resultobj = PyInt_FromLong( result );
10124 : }
10125 : }
10126 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; } }
10127 : return resultobj;
10128 : fail:
10129 : return NULL;
10130 : }
10131 :
10132 :
10133 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGnomonic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10134 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10135 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10136 0 : double arg2 ;
10137 0 : double arg3 ;
10138 0 : double arg4 ;
10139 0 : double arg5 ;
10140 0 : void *argp1 = 0 ;
10141 0 : int res1 = 0 ;
10142 0 : double val2 ;
10143 0 : int ecode2 = 0 ;
10144 0 : double val3 ;
10145 0 : int ecode3 = 0 ;
10146 0 : double val4 ;
10147 0 : int ecode4 = 0 ;
10148 0 : double val5 ;
10149 0 : int ecode5 = 0 ;
10150 0 : PyObject * obj0 = 0 ;
10151 0 : PyObject * obj1 = 0 ;
10152 0 : PyObject * obj2 = 0 ;
10153 0 : PyObject * obj3 = 0 ;
10154 0 : PyObject * obj4 = 0 ;
10155 0 : char * kwnames[] = {
10156 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10157 : };
10158 0 : OGRErr result;
10159 :
10160 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetGnomonic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
10161 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10162 0 : if (!SWIG_IsOK(res1)) {
10163 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGnomonic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10164 : }
10165 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10166 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10167 0 : if (!SWIG_IsOK(ecode2)) {
10168 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGnomonic" "', argument " "2"" of type '" "double""'");
10169 : }
10170 0 : arg2 = static_cast< double >(val2);
10171 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10172 0 : if (!SWIG_IsOK(ecode3)) {
10173 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGnomonic" "', argument " "3"" of type '" "double""'");
10174 : }
10175 0 : arg3 = static_cast< double >(val3);
10176 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10177 0 : if (!SWIG_IsOK(ecode4)) {
10178 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGnomonic" "', argument " "4"" of type '" "double""'");
10179 : }
10180 0 : arg4 = static_cast< double >(val4);
10181 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10182 0 : if (!SWIG_IsOK(ecode5)) {
10183 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGnomonic" "', argument " "5"" of type '" "double""'");
10184 : }
10185 0 : arg5 = static_cast< double >(val5);
10186 0 : {
10187 0 : const int bLocalUseExceptions = GetUseExceptions();
10188 0 : if ( bLocalUseExceptions ) {
10189 0 : pushErrorHandler();
10190 : }
10191 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGnomonic(arg1,arg2,arg3,arg4,arg5);
10192 0 : if ( bLocalUseExceptions ) {
10193 0 : popErrorHandler();
10194 : }
10195 : #ifndef SED_HACKS
10196 : if ( bLocalUseExceptions ) {
10197 : CPLErr eclass = CPLGetLastErrorType();
10198 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10199 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10200 : }
10201 : }
10202 : #endif
10203 : }
10204 0 : {
10205 : /* %typemap(out) OGRErr */
10206 0 : if ( result != 0 && GetUseExceptions()) {
10207 0 : const char* pszMessage = CPLGetLastErrorMsg();
10208 0 : if( pszMessage[0] != '\0' )
10209 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10210 : else
10211 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10212 0 : SWIG_fail;
10213 : }
10214 : }
10215 0 : {
10216 : /* %typemap(ret) OGRErr */
10217 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10218 0 : resultobj = PyInt_FromLong( result );
10219 : }
10220 : }
10221 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; } }
10222 : return resultobj;
10223 : fail:
10224 : return NULL;
10225 : }
10226 :
10227 :
10228 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetHOM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10229 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10230 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10231 0 : double arg2 ;
10232 0 : double arg3 ;
10233 0 : double arg4 ;
10234 0 : double arg5 ;
10235 0 : double arg6 ;
10236 0 : double arg7 ;
10237 0 : double arg8 ;
10238 0 : void *argp1 = 0 ;
10239 0 : int res1 = 0 ;
10240 0 : double val2 ;
10241 0 : int ecode2 = 0 ;
10242 0 : double val3 ;
10243 0 : int ecode3 = 0 ;
10244 0 : double val4 ;
10245 0 : int ecode4 = 0 ;
10246 0 : double val5 ;
10247 0 : int ecode5 = 0 ;
10248 0 : double val6 ;
10249 0 : int ecode6 = 0 ;
10250 0 : double val7 ;
10251 0 : int ecode7 = 0 ;
10252 0 : double val8 ;
10253 0 : int ecode8 = 0 ;
10254 0 : PyObject * obj0 = 0 ;
10255 0 : PyObject * obj1 = 0 ;
10256 0 : PyObject * obj2 = 0 ;
10257 0 : PyObject * obj3 = 0 ;
10258 0 : PyObject * obj4 = 0 ;
10259 0 : PyObject * obj5 = 0 ;
10260 0 : PyObject * obj6 = 0 ;
10261 0 : PyObject * obj7 = 0 ;
10262 0 : char * kwnames[] = {
10263 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"azimuth", (char *)"recttoskew", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10264 : };
10265 0 : OGRErr result;
10266 :
10267 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:SpatialReference_SetHOM", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
10268 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10269 0 : if (!SWIG_IsOK(res1)) {
10270 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetHOM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10271 : }
10272 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10273 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10274 0 : if (!SWIG_IsOK(ecode2)) {
10275 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetHOM" "', argument " "2"" of type '" "double""'");
10276 : }
10277 0 : arg2 = static_cast< double >(val2);
10278 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10279 0 : if (!SWIG_IsOK(ecode3)) {
10280 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetHOM" "', argument " "3"" of type '" "double""'");
10281 : }
10282 0 : arg3 = static_cast< double >(val3);
10283 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10284 0 : if (!SWIG_IsOK(ecode4)) {
10285 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetHOM" "', argument " "4"" of type '" "double""'");
10286 : }
10287 0 : arg4 = static_cast< double >(val4);
10288 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10289 0 : if (!SWIG_IsOK(ecode5)) {
10290 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetHOM" "', argument " "5"" of type '" "double""'");
10291 : }
10292 0 : arg5 = static_cast< double >(val5);
10293 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10294 0 : if (!SWIG_IsOK(ecode6)) {
10295 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetHOM" "', argument " "6"" of type '" "double""'");
10296 : }
10297 0 : arg6 = static_cast< double >(val6);
10298 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10299 0 : if (!SWIG_IsOK(ecode7)) {
10300 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetHOM" "', argument " "7"" of type '" "double""'");
10301 : }
10302 0 : arg7 = static_cast< double >(val7);
10303 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
10304 0 : if (!SWIG_IsOK(ecode8)) {
10305 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetHOM" "', argument " "8"" of type '" "double""'");
10306 : }
10307 0 : arg8 = static_cast< double >(val8);
10308 0 : {
10309 0 : const int bLocalUseExceptions = GetUseExceptions();
10310 0 : if ( bLocalUseExceptions ) {
10311 0 : pushErrorHandler();
10312 : }
10313 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetHOM(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
10314 0 : if ( bLocalUseExceptions ) {
10315 0 : popErrorHandler();
10316 : }
10317 : #ifndef SED_HACKS
10318 : if ( bLocalUseExceptions ) {
10319 : CPLErr eclass = CPLGetLastErrorType();
10320 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10321 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10322 : }
10323 : }
10324 : #endif
10325 : }
10326 0 : {
10327 : /* %typemap(out) OGRErr */
10328 0 : if ( result != 0 && GetUseExceptions()) {
10329 0 : const char* pszMessage = CPLGetLastErrorMsg();
10330 0 : if( pszMessage[0] != '\0' )
10331 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10332 : else
10333 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10334 0 : SWIG_fail;
10335 : }
10336 : }
10337 0 : {
10338 : /* %typemap(ret) OGRErr */
10339 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10340 0 : resultobj = PyInt_FromLong( result );
10341 : }
10342 : }
10343 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; } }
10344 : return resultobj;
10345 : fail:
10346 : return NULL;
10347 : }
10348 :
10349 :
10350 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetHOM2PNO(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10351 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10352 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10353 0 : double arg2 ;
10354 0 : double arg3 ;
10355 0 : double arg4 ;
10356 0 : double arg5 ;
10357 0 : double arg6 ;
10358 0 : double arg7 ;
10359 0 : double arg8 ;
10360 0 : double arg9 ;
10361 0 : void *argp1 = 0 ;
10362 0 : int res1 = 0 ;
10363 0 : double val2 ;
10364 0 : int ecode2 = 0 ;
10365 0 : double val3 ;
10366 0 : int ecode3 = 0 ;
10367 0 : double val4 ;
10368 0 : int ecode4 = 0 ;
10369 0 : double val5 ;
10370 0 : int ecode5 = 0 ;
10371 0 : double val6 ;
10372 0 : int ecode6 = 0 ;
10373 0 : double val7 ;
10374 0 : int ecode7 = 0 ;
10375 0 : double val8 ;
10376 0 : int ecode8 = 0 ;
10377 0 : double val9 ;
10378 0 : int ecode9 = 0 ;
10379 0 : PyObject * obj0 = 0 ;
10380 0 : PyObject * obj1 = 0 ;
10381 0 : PyObject * obj2 = 0 ;
10382 0 : PyObject * obj3 = 0 ;
10383 0 : PyObject * obj4 = 0 ;
10384 0 : PyObject * obj5 = 0 ;
10385 0 : PyObject * obj6 = 0 ;
10386 0 : PyObject * obj7 = 0 ;
10387 0 : PyObject * obj8 = 0 ;
10388 0 : char * kwnames[] = {
10389 : (char *)"self", (char *)"clat", (char *)"dfLat1", (char *)"dfLong1", (char *)"dfLat2", (char *)"dfLong2", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10390 : };
10391 0 : OGRErr result;
10392 :
10393 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOOO:SpatialReference_SetHOM2PNO", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7, &obj8)) SWIG_fail;
10394 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10395 0 : if (!SWIG_IsOK(res1)) {
10396 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10397 : }
10398 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10399 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10400 0 : if (!SWIG_IsOK(ecode2)) {
10401 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "2"" of type '" "double""'");
10402 : }
10403 0 : arg2 = static_cast< double >(val2);
10404 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10405 0 : if (!SWIG_IsOK(ecode3)) {
10406 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "3"" of type '" "double""'");
10407 : }
10408 0 : arg3 = static_cast< double >(val3);
10409 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10410 0 : if (!SWIG_IsOK(ecode4)) {
10411 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "4"" of type '" "double""'");
10412 : }
10413 0 : arg4 = static_cast< double >(val4);
10414 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10415 0 : if (!SWIG_IsOK(ecode5)) {
10416 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "5"" of type '" "double""'");
10417 : }
10418 0 : arg5 = static_cast< double >(val5);
10419 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10420 0 : if (!SWIG_IsOK(ecode6)) {
10421 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "6"" of type '" "double""'");
10422 : }
10423 0 : arg6 = static_cast< double >(val6);
10424 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10425 0 : if (!SWIG_IsOK(ecode7)) {
10426 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "7"" of type '" "double""'");
10427 : }
10428 0 : arg7 = static_cast< double >(val7);
10429 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
10430 0 : if (!SWIG_IsOK(ecode8)) {
10431 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "8"" of type '" "double""'");
10432 : }
10433 0 : arg8 = static_cast< double >(val8);
10434 0 : ecode9 = SWIG_AsVal_double(obj8, &val9);
10435 0 : if (!SWIG_IsOK(ecode9)) {
10436 0 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "9"" of type '" "double""'");
10437 : }
10438 0 : arg9 = static_cast< double >(val9);
10439 0 : {
10440 0 : const int bLocalUseExceptions = GetUseExceptions();
10441 0 : if ( bLocalUseExceptions ) {
10442 0 : pushErrorHandler();
10443 : }
10444 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetHOM2PNO(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
10445 0 : if ( bLocalUseExceptions ) {
10446 0 : popErrorHandler();
10447 : }
10448 : #ifndef SED_HACKS
10449 : if ( bLocalUseExceptions ) {
10450 : CPLErr eclass = CPLGetLastErrorType();
10451 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10452 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10453 : }
10454 : }
10455 : #endif
10456 : }
10457 0 : {
10458 : /* %typemap(out) OGRErr */
10459 0 : if ( result != 0 && GetUseExceptions()) {
10460 0 : const char* pszMessage = CPLGetLastErrorMsg();
10461 0 : if( pszMessage[0] != '\0' )
10462 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10463 : else
10464 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10465 0 : SWIG_fail;
10466 : }
10467 : }
10468 0 : {
10469 : /* %typemap(ret) OGRErr */
10470 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10471 0 : resultobj = PyInt_FromLong( result );
10472 : }
10473 : }
10474 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; } }
10475 : return resultobj;
10476 : fail:
10477 : return NULL;
10478 : }
10479 :
10480 :
10481 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetKrovak(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10482 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10483 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10484 0 : double arg2 ;
10485 0 : double arg3 ;
10486 0 : double arg4 ;
10487 0 : double arg5 ;
10488 0 : double arg6 ;
10489 0 : double arg7 ;
10490 0 : double arg8 ;
10491 0 : void *argp1 = 0 ;
10492 0 : int res1 = 0 ;
10493 0 : double val2 ;
10494 0 : int ecode2 = 0 ;
10495 0 : double val3 ;
10496 0 : int ecode3 = 0 ;
10497 0 : double val4 ;
10498 0 : int ecode4 = 0 ;
10499 0 : double val5 ;
10500 0 : int ecode5 = 0 ;
10501 0 : double val6 ;
10502 0 : int ecode6 = 0 ;
10503 0 : double val7 ;
10504 0 : int ecode7 = 0 ;
10505 0 : double val8 ;
10506 0 : int ecode8 = 0 ;
10507 0 : PyObject * obj0 = 0 ;
10508 0 : PyObject * obj1 = 0 ;
10509 0 : PyObject * obj2 = 0 ;
10510 0 : PyObject * obj3 = 0 ;
10511 0 : PyObject * obj4 = 0 ;
10512 0 : PyObject * obj5 = 0 ;
10513 0 : PyObject * obj6 = 0 ;
10514 0 : PyObject * obj7 = 0 ;
10515 0 : char * kwnames[] = {
10516 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"azimuth", (char *)"pseudostdparallellat", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10517 : };
10518 0 : OGRErr result;
10519 :
10520 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOOO:SpatialReference_SetKrovak", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6, &obj7)) SWIG_fail;
10521 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10522 0 : if (!SWIG_IsOK(res1)) {
10523 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetKrovak" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10524 : }
10525 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10526 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10527 0 : if (!SWIG_IsOK(ecode2)) {
10528 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetKrovak" "', argument " "2"" of type '" "double""'");
10529 : }
10530 0 : arg2 = static_cast< double >(val2);
10531 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10532 0 : if (!SWIG_IsOK(ecode3)) {
10533 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetKrovak" "', argument " "3"" of type '" "double""'");
10534 : }
10535 0 : arg3 = static_cast< double >(val3);
10536 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10537 0 : if (!SWIG_IsOK(ecode4)) {
10538 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetKrovak" "', argument " "4"" of type '" "double""'");
10539 : }
10540 0 : arg4 = static_cast< double >(val4);
10541 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10542 0 : if (!SWIG_IsOK(ecode5)) {
10543 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetKrovak" "', argument " "5"" of type '" "double""'");
10544 : }
10545 0 : arg5 = static_cast< double >(val5);
10546 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10547 0 : if (!SWIG_IsOK(ecode6)) {
10548 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetKrovak" "', argument " "6"" of type '" "double""'");
10549 : }
10550 0 : arg6 = static_cast< double >(val6);
10551 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10552 0 : if (!SWIG_IsOK(ecode7)) {
10553 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetKrovak" "', argument " "7"" of type '" "double""'");
10554 : }
10555 0 : arg7 = static_cast< double >(val7);
10556 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
10557 0 : if (!SWIG_IsOK(ecode8)) {
10558 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetKrovak" "', argument " "8"" of type '" "double""'");
10559 : }
10560 0 : arg8 = static_cast< double >(val8);
10561 0 : {
10562 0 : const int bLocalUseExceptions = GetUseExceptions();
10563 0 : if ( bLocalUseExceptions ) {
10564 0 : pushErrorHandler();
10565 : }
10566 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetKrovak(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
10567 0 : if ( bLocalUseExceptions ) {
10568 0 : popErrorHandler();
10569 : }
10570 : #ifndef SED_HACKS
10571 : if ( bLocalUseExceptions ) {
10572 : CPLErr eclass = CPLGetLastErrorType();
10573 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10574 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10575 : }
10576 : }
10577 : #endif
10578 : }
10579 0 : {
10580 : /* %typemap(out) OGRErr */
10581 0 : if ( result != 0 && GetUseExceptions()) {
10582 0 : const char* pszMessage = CPLGetLastErrorMsg();
10583 0 : if( pszMessage[0] != '\0' )
10584 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10585 : else
10586 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10587 0 : SWIG_fail;
10588 : }
10589 : }
10590 0 : {
10591 : /* %typemap(ret) OGRErr */
10592 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10593 0 : resultobj = PyInt_FromLong( result );
10594 : }
10595 : }
10596 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; } }
10597 : return resultobj;
10598 : fail:
10599 : return NULL;
10600 : }
10601 :
10602 :
10603 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLAEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10604 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10605 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10606 0 : double arg2 ;
10607 0 : double arg3 ;
10608 0 : double arg4 ;
10609 0 : double arg5 ;
10610 0 : void *argp1 = 0 ;
10611 0 : int res1 = 0 ;
10612 0 : double val2 ;
10613 0 : int ecode2 = 0 ;
10614 0 : double val3 ;
10615 0 : int ecode3 = 0 ;
10616 0 : double val4 ;
10617 0 : int ecode4 = 0 ;
10618 0 : double val5 ;
10619 0 : int ecode5 = 0 ;
10620 0 : PyObject * obj0 = 0 ;
10621 0 : PyObject * obj1 = 0 ;
10622 0 : PyObject * obj2 = 0 ;
10623 0 : PyObject * obj3 = 0 ;
10624 0 : PyObject * obj4 = 0 ;
10625 0 : char * kwnames[] = {
10626 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10627 : };
10628 0 : OGRErr result;
10629 :
10630 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetLAEA", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
10631 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10632 0 : if (!SWIG_IsOK(res1)) {
10633 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLAEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10634 : }
10635 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10636 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10637 0 : if (!SWIG_IsOK(ecode2)) {
10638 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLAEA" "', argument " "2"" of type '" "double""'");
10639 : }
10640 0 : arg2 = static_cast< double >(val2);
10641 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10642 0 : if (!SWIG_IsOK(ecode3)) {
10643 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLAEA" "', argument " "3"" of type '" "double""'");
10644 : }
10645 0 : arg3 = static_cast< double >(val3);
10646 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10647 0 : if (!SWIG_IsOK(ecode4)) {
10648 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLAEA" "', argument " "4"" of type '" "double""'");
10649 : }
10650 0 : arg4 = static_cast< double >(val4);
10651 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10652 0 : if (!SWIG_IsOK(ecode5)) {
10653 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLAEA" "', argument " "5"" of type '" "double""'");
10654 : }
10655 0 : arg5 = static_cast< double >(val5);
10656 0 : {
10657 0 : const int bLocalUseExceptions = GetUseExceptions();
10658 0 : if ( bLocalUseExceptions ) {
10659 0 : pushErrorHandler();
10660 : }
10661 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLAEA(arg1,arg2,arg3,arg4,arg5);
10662 0 : if ( bLocalUseExceptions ) {
10663 0 : popErrorHandler();
10664 : }
10665 : #ifndef SED_HACKS
10666 : if ( bLocalUseExceptions ) {
10667 : CPLErr eclass = CPLGetLastErrorType();
10668 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10669 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10670 : }
10671 : }
10672 : #endif
10673 : }
10674 0 : {
10675 : /* %typemap(out) OGRErr */
10676 0 : if ( result != 0 && GetUseExceptions()) {
10677 0 : const char* pszMessage = CPLGetLastErrorMsg();
10678 0 : if( pszMessage[0] != '\0' )
10679 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10680 : else
10681 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10682 0 : SWIG_fail;
10683 : }
10684 : }
10685 0 : {
10686 : /* %typemap(ret) OGRErr */
10687 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10688 0 : resultobj = PyInt_FromLong( result );
10689 : }
10690 : }
10691 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; } }
10692 : return resultobj;
10693 : fail:
10694 : return NULL;
10695 : }
10696 :
10697 :
10698 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10699 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10700 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10701 1 : double arg2 ;
10702 1 : double arg3 ;
10703 1 : double arg4 ;
10704 1 : double arg5 ;
10705 1 : double arg6 ;
10706 1 : double arg7 ;
10707 1 : void *argp1 = 0 ;
10708 1 : int res1 = 0 ;
10709 1 : double val2 ;
10710 1 : int ecode2 = 0 ;
10711 1 : double val3 ;
10712 1 : int ecode3 = 0 ;
10713 1 : double val4 ;
10714 1 : int ecode4 = 0 ;
10715 1 : double val5 ;
10716 1 : int ecode5 = 0 ;
10717 1 : double val6 ;
10718 1 : int ecode6 = 0 ;
10719 1 : double val7 ;
10720 1 : int ecode7 = 0 ;
10721 1 : PyObject * obj0 = 0 ;
10722 1 : PyObject * obj1 = 0 ;
10723 1 : PyObject * obj2 = 0 ;
10724 1 : PyObject * obj3 = 0 ;
10725 1 : PyObject * obj4 = 0 ;
10726 1 : PyObject * obj5 = 0 ;
10727 1 : PyObject * obj6 = 0 ;
10728 1 : char * kwnames[] = {
10729 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10730 : };
10731 1 : OGRErr result;
10732 :
10733 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetLCC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
10734 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10735 1 : if (!SWIG_IsOK(res1)) {
10736 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10737 : }
10738 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10739 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10740 1 : if (!SWIG_IsOK(ecode2)) {
10741 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCC" "', argument " "2"" of type '" "double""'");
10742 : }
10743 1 : arg2 = static_cast< double >(val2);
10744 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10745 1 : if (!SWIG_IsOK(ecode3)) {
10746 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCC" "', argument " "3"" of type '" "double""'");
10747 : }
10748 1 : arg3 = static_cast< double >(val3);
10749 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10750 1 : if (!SWIG_IsOK(ecode4)) {
10751 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCC" "', argument " "4"" of type '" "double""'");
10752 : }
10753 1 : arg4 = static_cast< double >(val4);
10754 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10755 1 : if (!SWIG_IsOK(ecode5)) {
10756 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCC" "', argument " "5"" of type '" "double""'");
10757 : }
10758 1 : arg5 = static_cast< double >(val5);
10759 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10760 1 : if (!SWIG_IsOK(ecode6)) {
10761 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCC" "', argument " "6"" of type '" "double""'");
10762 : }
10763 1 : arg6 = static_cast< double >(val6);
10764 1 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10765 1 : if (!SWIG_IsOK(ecode7)) {
10766 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetLCC" "', argument " "7"" of type '" "double""'");
10767 : }
10768 1 : arg7 = static_cast< double >(val7);
10769 1 : {
10770 1 : const int bLocalUseExceptions = GetUseExceptions();
10771 1 : if ( bLocalUseExceptions ) {
10772 1 : pushErrorHandler();
10773 : }
10774 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
10775 1 : if ( bLocalUseExceptions ) {
10776 1 : popErrorHandler();
10777 : }
10778 : #ifndef SED_HACKS
10779 : if ( bLocalUseExceptions ) {
10780 : CPLErr eclass = CPLGetLastErrorType();
10781 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10782 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10783 : }
10784 : }
10785 : #endif
10786 : }
10787 1 : {
10788 : /* %typemap(out) OGRErr */
10789 1 : if ( result != 0 && GetUseExceptions()) {
10790 0 : const char* pszMessage = CPLGetLastErrorMsg();
10791 0 : if( pszMessage[0] != '\0' )
10792 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10793 : else
10794 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10795 0 : SWIG_fail;
10796 : }
10797 : }
10798 1 : {
10799 : /* %typemap(ret) OGRErr */
10800 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10801 1 : resultobj = PyInt_FromLong( result );
10802 : }
10803 : }
10804 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; } }
10805 : return resultobj;
10806 : fail:
10807 : return NULL;
10808 : }
10809 :
10810 :
10811 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCC1SP(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10812 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10813 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10814 0 : double arg2 ;
10815 0 : double arg3 ;
10816 0 : double arg4 ;
10817 0 : double arg5 ;
10818 0 : double arg6 ;
10819 0 : void *argp1 = 0 ;
10820 0 : int res1 = 0 ;
10821 0 : double val2 ;
10822 0 : int ecode2 = 0 ;
10823 0 : double val3 ;
10824 0 : int ecode3 = 0 ;
10825 0 : double val4 ;
10826 0 : int ecode4 = 0 ;
10827 0 : double val5 ;
10828 0 : int ecode5 = 0 ;
10829 0 : double val6 ;
10830 0 : int ecode6 = 0 ;
10831 0 : PyObject * obj0 = 0 ;
10832 0 : PyObject * obj1 = 0 ;
10833 0 : PyObject * obj2 = 0 ;
10834 0 : PyObject * obj3 = 0 ;
10835 0 : PyObject * obj4 = 0 ;
10836 0 : PyObject * obj5 = 0 ;
10837 0 : char * kwnames[] = {
10838 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
10839 : };
10840 0 : OGRErr result;
10841 :
10842 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetLCC1SP", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
10843 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10844 0 : if (!SWIG_IsOK(res1)) {
10845 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCC1SP" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10846 : }
10847 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10848 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10849 0 : if (!SWIG_IsOK(ecode2)) {
10850 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCC1SP" "', argument " "2"" of type '" "double""'");
10851 : }
10852 0 : arg2 = static_cast< double >(val2);
10853 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10854 0 : if (!SWIG_IsOK(ecode3)) {
10855 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCC1SP" "', argument " "3"" of type '" "double""'");
10856 : }
10857 0 : arg3 = static_cast< double >(val3);
10858 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10859 0 : if (!SWIG_IsOK(ecode4)) {
10860 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCC1SP" "', argument " "4"" of type '" "double""'");
10861 : }
10862 0 : arg4 = static_cast< double >(val4);
10863 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10864 0 : if (!SWIG_IsOK(ecode5)) {
10865 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCC1SP" "', argument " "5"" of type '" "double""'");
10866 : }
10867 0 : arg5 = static_cast< double >(val5);
10868 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10869 0 : if (!SWIG_IsOK(ecode6)) {
10870 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCC1SP" "', argument " "6"" of type '" "double""'");
10871 : }
10872 0 : arg6 = static_cast< double >(val6);
10873 0 : {
10874 0 : const int bLocalUseExceptions = GetUseExceptions();
10875 0 : if ( bLocalUseExceptions ) {
10876 0 : pushErrorHandler();
10877 : }
10878 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCC1SP(arg1,arg2,arg3,arg4,arg5,arg6);
10879 0 : if ( bLocalUseExceptions ) {
10880 0 : popErrorHandler();
10881 : }
10882 : #ifndef SED_HACKS
10883 : if ( bLocalUseExceptions ) {
10884 : CPLErr eclass = CPLGetLastErrorType();
10885 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10886 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10887 : }
10888 : }
10889 : #endif
10890 : }
10891 0 : {
10892 : /* %typemap(out) OGRErr */
10893 0 : if ( result != 0 && GetUseExceptions()) {
10894 0 : const char* pszMessage = CPLGetLastErrorMsg();
10895 0 : if( pszMessage[0] != '\0' )
10896 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
10897 : else
10898 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10899 0 : SWIG_fail;
10900 : }
10901 : }
10902 0 : {
10903 : /* %typemap(ret) OGRErr */
10904 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
10905 0 : resultobj = PyInt_FromLong( result );
10906 : }
10907 : }
10908 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; } }
10909 : return resultobj;
10910 : fail:
10911 : return NULL;
10912 : }
10913 :
10914 :
10915 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCCB(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
10916 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
10917 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10918 0 : double arg2 ;
10919 0 : double arg3 ;
10920 0 : double arg4 ;
10921 0 : double arg5 ;
10922 0 : double arg6 ;
10923 0 : double arg7 ;
10924 0 : void *argp1 = 0 ;
10925 0 : int res1 = 0 ;
10926 0 : double val2 ;
10927 0 : int ecode2 = 0 ;
10928 0 : double val3 ;
10929 0 : int ecode3 = 0 ;
10930 0 : double val4 ;
10931 0 : int ecode4 = 0 ;
10932 0 : double val5 ;
10933 0 : int ecode5 = 0 ;
10934 0 : double val6 ;
10935 0 : int ecode6 = 0 ;
10936 0 : double val7 ;
10937 0 : int ecode7 = 0 ;
10938 0 : PyObject * obj0 = 0 ;
10939 0 : PyObject * obj1 = 0 ;
10940 0 : PyObject * obj2 = 0 ;
10941 0 : PyObject * obj3 = 0 ;
10942 0 : PyObject * obj4 = 0 ;
10943 0 : PyObject * obj5 = 0 ;
10944 0 : PyObject * obj6 = 0 ;
10945 0 : char * kwnames[] = {
10946 : (char *)"self", (char *)"stdp1", (char *)"stdp2", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
10947 : };
10948 0 : OGRErr result;
10949 :
10950 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetLCCB", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
10951 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10952 0 : if (!SWIG_IsOK(res1)) {
10953 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCCB" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10954 : }
10955 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10956 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
10957 0 : if (!SWIG_IsOK(ecode2)) {
10958 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCCB" "', argument " "2"" of type '" "double""'");
10959 : }
10960 0 : arg2 = static_cast< double >(val2);
10961 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
10962 0 : if (!SWIG_IsOK(ecode3)) {
10963 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCCB" "', argument " "3"" of type '" "double""'");
10964 : }
10965 0 : arg3 = static_cast< double >(val3);
10966 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
10967 0 : if (!SWIG_IsOK(ecode4)) {
10968 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCCB" "', argument " "4"" of type '" "double""'");
10969 : }
10970 0 : arg4 = static_cast< double >(val4);
10971 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10972 0 : if (!SWIG_IsOK(ecode5)) {
10973 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCCB" "', argument " "5"" of type '" "double""'");
10974 : }
10975 0 : arg5 = static_cast< double >(val5);
10976 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10977 0 : if (!SWIG_IsOK(ecode6)) {
10978 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCCB" "', argument " "6"" of type '" "double""'");
10979 : }
10980 0 : arg6 = static_cast< double >(val6);
10981 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
10982 0 : if (!SWIG_IsOK(ecode7)) {
10983 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetLCCB" "', argument " "7"" of type '" "double""'");
10984 : }
10985 0 : arg7 = static_cast< double >(val7);
10986 0 : {
10987 0 : const int bLocalUseExceptions = GetUseExceptions();
10988 0 : if ( bLocalUseExceptions ) {
10989 0 : pushErrorHandler();
10990 : }
10991 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCCB(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
10992 0 : if ( bLocalUseExceptions ) {
10993 0 : popErrorHandler();
10994 : }
10995 : #ifndef SED_HACKS
10996 : if ( bLocalUseExceptions ) {
10997 : CPLErr eclass = CPLGetLastErrorType();
10998 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10999 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11000 : }
11001 : }
11002 : #endif
11003 : }
11004 0 : {
11005 : /* %typemap(out) OGRErr */
11006 0 : if ( result != 0 && GetUseExceptions()) {
11007 0 : const char* pszMessage = CPLGetLastErrorMsg();
11008 0 : if( pszMessage[0] != '\0' )
11009 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11010 : else
11011 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11012 0 : SWIG_fail;
11013 : }
11014 : }
11015 0 : {
11016 : /* %typemap(ret) OGRErr */
11017 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11018 0 : resultobj = PyInt_FromLong( result );
11019 : }
11020 : }
11021 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; } }
11022 : return resultobj;
11023 : fail:
11024 : return NULL;
11025 : }
11026 :
11027 :
11028 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11029 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11030 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11031 0 : double arg2 ;
11032 0 : double arg3 ;
11033 0 : double arg4 ;
11034 0 : double arg5 ;
11035 0 : void *argp1 = 0 ;
11036 0 : int res1 = 0 ;
11037 0 : double val2 ;
11038 0 : int ecode2 = 0 ;
11039 0 : double val3 ;
11040 0 : int ecode3 = 0 ;
11041 0 : double val4 ;
11042 0 : int ecode4 = 0 ;
11043 0 : double val5 ;
11044 0 : int ecode5 = 0 ;
11045 0 : PyObject * obj0 = 0 ;
11046 0 : PyObject * obj1 = 0 ;
11047 0 : PyObject * obj2 = 0 ;
11048 0 : PyObject * obj3 = 0 ;
11049 0 : PyObject * obj4 = 0 ;
11050 0 : char * kwnames[] = {
11051 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11052 : };
11053 0 : OGRErr result;
11054 :
11055 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetMC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11056 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11057 0 : if (!SWIG_IsOK(res1)) {
11058 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11059 : }
11060 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11061 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11062 0 : if (!SWIG_IsOK(ecode2)) {
11063 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMC" "', argument " "2"" of type '" "double""'");
11064 : }
11065 0 : arg2 = static_cast< double >(val2);
11066 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11067 0 : if (!SWIG_IsOK(ecode3)) {
11068 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMC" "', argument " "3"" of type '" "double""'");
11069 : }
11070 0 : arg3 = static_cast< double >(val3);
11071 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11072 0 : if (!SWIG_IsOK(ecode4)) {
11073 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMC" "', argument " "4"" of type '" "double""'");
11074 : }
11075 0 : arg4 = static_cast< double >(val4);
11076 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11077 0 : if (!SWIG_IsOK(ecode5)) {
11078 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMC" "', argument " "5"" of type '" "double""'");
11079 : }
11080 0 : arg5 = static_cast< double >(val5);
11081 0 : {
11082 0 : const int bLocalUseExceptions = GetUseExceptions();
11083 0 : if ( bLocalUseExceptions ) {
11084 0 : pushErrorHandler();
11085 : }
11086 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetMC(arg1,arg2,arg3,arg4,arg5);
11087 0 : if ( bLocalUseExceptions ) {
11088 0 : popErrorHandler();
11089 : }
11090 : #ifndef SED_HACKS
11091 : if ( bLocalUseExceptions ) {
11092 : CPLErr eclass = CPLGetLastErrorType();
11093 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11094 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11095 : }
11096 : }
11097 : #endif
11098 : }
11099 0 : {
11100 : /* %typemap(out) OGRErr */
11101 0 : if ( result != 0 && GetUseExceptions()) {
11102 0 : const char* pszMessage = CPLGetLastErrorMsg();
11103 0 : if( pszMessage[0] != '\0' )
11104 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11105 : else
11106 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11107 0 : SWIG_fail;
11108 : }
11109 : }
11110 0 : {
11111 : /* %typemap(ret) OGRErr */
11112 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11113 0 : resultobj = PyInt_FromLong( result );
11114 : }
11115 : }
11116 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; } }
11117 : return resultobj;
11118 : fail:
11119 : return NULL;
11120 : }
11121 :
11122 :
11123 2 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMercator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11124 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11125 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11126 2 : double arg2 ;
11127 2 : double arg3 ;
11128 2 : double arg4 ;
11129 2 : double arg5 ;
11130 2 : double arg6 ;
11131 2 : void *argp1 = 0 ;
11132 2 : int res1 = 0 ;
11133 2 : double val2 ;
11134 2 : int ecode2 = 0 ;
11135 2 : double val3 ;
11136 2 : int ecode3 = 0 ;
11137 2 : double val4 ;
11138 2 : int ecode4 = 0 ;
11139 2 : double val5 ;
11140 2 : int ecode5 = 0 ;
11141 2 : double val6 ;
11142 2 : int ecode6 = 0 ;
11143 2 : PyObject * obj0 = 0 ;
11144 2 : PyObject * obj1 = 0 ;
11145 2 : PyObject * obj2 = 0 ;
11146 2 : PyObject * obj3 = 0 ;
11147 2 : PyObject * obj4 = 0 ;
11148 2 : PyObject * obj5 = 0 ;
11149 2 : char * kwnames[] = {
11150 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
11151 : };
11152 2 : OGRErr result;
11153 :
11154 2 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetMercator", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11155 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11156 2 : if (!SWIG_IsOK(res1)) {
11157 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMercator" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11158 : }
11159 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11160 2 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11161 2 : if (!SWIG_IsOK(ecode2)) {
11162 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMercator" "', argument " "2"" of type '" "double""'");
11163 : }
11164 2 : arg2 = static_cast< double >(val2);
11165 2 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11166 2 : if (!SWIG_IsOK(ecode3)) {
11167 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMercator" "', argument " "3"" of type '" "double""'");
11168 : }
11169 2 : arg3 = static_cast< double >(val3);
11170 2 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11171 2 : if (!SWIG_IsOK(ecode4)) {
11172 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMercator" "', argument " "4"" of type '" "double""'");
11173 : }
11174 2 : arg4 = static_cast< double >(val4);
11175 2 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11176 2 : if (!SWIG_IsOK(ecode5)) {
11177 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMercator" "', argument " "5"" of type '" "double""'");
11178 : }
11179 2 : arg5 = static_cast< double >(val5);
11180 2 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11181 2 : if (!SWIG_IsOK(ecode6)) {
11182 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetMercator" "', argument " "6"" of type '" "double""'");
11183 : }
11184 2 : arg6 = static_cast< double >(val6);
11185 2 : {
11186 2 : const int bLocalUseExceptions = GetUseExceptions();
11187 2 : if ( bLocalUseExceptions ) {
11188 2 : pushErrorHandler();
11189 : }
11190 2 : result = (OGRErr)OSRSpatialReferenceShadow_SetMercator(arg1,arg2,arg3,arg4,arg5,arg6);
11191 2 : if ( bLocalUseExceptions ) {
11192 2 : popErrorHandler();
11193 : }
11194 : #ifndef SED_HACKS
11195 : if ( bLocalUseExceptions ) {
11196 : CPLErr eclass = CPLGetLastErrorType();
11197 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11198 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11199 : }
11200 : }
11201 : #endif
11202 : }
11203 2 : {
11204 : /* %typemap(out) OGRErr */
11205 2 : if ( result != 0 && GetUseExceptions()) {
11206 0 : const char* pszMessage = CPLGetLastErrorMsg();
11207 0 : if( pszMessage[0] != '\0' )
11208 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11209 : else
11210 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11211 0 : SWIG_fail;
11212 : }
11213 : }
11214 2 : {
11215 : /* %typemap(ret) OGRErr */
11216 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11217 2 : resultobj = PyInt_FromLong( result );
11218 : }
11219 : }
11220 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; } }
11221 : return resultobj;
11222 : fail:
11223 : return NULL;
11224 : }
11225 :
11226 :
11227 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMercator2SP(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11228 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11229 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11230 1 : double arg2 ;
11231 1 : double arg3 ;
11232 1 : double arg4 ;
11233 1 : double arg5 ;
11234 1 : double arg6 ;
11235 1 : void *argp1 = 0 ;
11236 1 : int res1 = 0 ;
11237 1 : double val2 ;
11238 1 : int ecode2 = 0 ;
11239 1 : double val3 ;
11240 1 : int ecode3 = 0 ;
11241 1 : double val4 ;
11242 1 : int ecode4 = 0 ;
11243 1 : double val5 ;
11244 1 : int ecode5 = 0 ;
11245 1 : double val6 ;
11246 1 : int ecode6 = 0 ;
11247 1 : PyObject * obj0 = 0 ;
11248 1 : PyObject * obj1 = 0 ;
11249 1 : PyObject * obj2 = 0 ;
11250 1 : PyObject * obj3 = 0 ;
11251 1 : PyObject * obj4 = 0 ;
11252 1 : PyObject * obj5 = 0 ;
11253 1 : char * kwnames[] = {
11254 : (char *)"self", (char *)"stdp1", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11255 : };
11256 1 : OGRErr result;
11257 :
11258 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetMercator2SP", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11259 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11260 1 : if (!SWIG_IsOK(res1)) {
11261 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMercator2SP" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11262 : }
11263 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11264 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11265 1 : if (!SWIG_IsOK(ecode2)) {
11266 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMercator2SP" "', argument " "2"" of type '" "double""'");
11267 : }
11268 1 : arg2 = static_cast< double >(val2);
11269 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11270 1 : if (!SWIG_IsOK(ecode3)) {
11271 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMercator2SP" "', argument " "3"" of type '" "double""'");
11272 : }
11273 1 : arg3 = static_cast< double >(val3);
11274 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11275 1 : if (!SWIG_IsOK(ecode4)) {
11276 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMercator2SP" "', argument " "4"" of type '" "double""'");
11277 : }
11278 1 : arg4 = static_cast< double >(val4);
11279 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11280 1 : if (!SWIG_IsOK(ecode5)) {
11281 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMercator2SP" "', argument " "5"" of type '" "double""'");
11282 : }
11283 1 : arg5 = static_cast< double >(val5);
11284 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11285 1 : if (!SWIG_IsOK(ecode6)) {
11286 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetMercator2SP" "', argument " "6"" of type '" "double""'");
11287 : }
11288 1 : arg6 = static_cast< double >(val6);
11289 1 : {
11290 1 : const int bLocalUseExceptions = GetUseExceptions();
11291 1 : if ( bLocalUseExceptions ) {
11292 1 : pushErrorHandler();
11293 : }
11294 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetMercator2SP(arg1,arg2,arg3,arg4,arg5,arg6);
11295 1 : if ( bLocalUseExceptions ) {
11296 1 : popErrorHandler();
11297 : }
11298 : #ifndef SED_HACKS
11299 : if ( bLocalUseExceptions ) {
11300 : CPLErr eclass = CPLGetLastErrorType();
11301 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11302 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11303 : }
11304 : }
11305 : #endif
11306 : }
11307 1 : {
11308 : /* %typemap(out) OGRErr */
11309 1 : if ( result != 0 && GetUseExceptions()) {
11310 0 : const char* pszMessage = CPLGetLastErrorMsg();
11311 0 : if( pszMessage[0] != '\0' )
11312 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11313 : else
11314 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11315 0 : SWIG_fail;
11316 : }
11317 : }
11318 1 : {
11319 : /* %typemap(ret) OGRErr */
11320 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11321 1 : resultobj = PyInt_FromLong( result );
11322 : }
11323 : }
11324 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; } }
11325 : return resultobj;
11326 : fail:
11327 : return NULL;
11328 : }
11329 :
11330 :
11331 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMollweide(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11332 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11333 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11334 0 : double arg2 ;
11335 0 : double arg3 ;
11336 0 : double arg4 ;
11337 0 : void *argp1 = 0 ;
11338 0 : int res1 = 0 ;
11339 0 : double val2 ;
11340 0 : int ecode2 = 0 ;
11341 0 : double val3 ;
11342 0 : int ecode3 = 0 ;
11343 0 : double val4 ;
11344 0 : int ecode4 = 0 ;
11345 0 : PyObject * obj0 = 0 ;
11346 0 : PyObject * obj1 = 0 ;
11347 0 : PyObject * obj2 = 0 ;
11348 0 : PyObject * obj3 = 0 ;
11349 0 : char * kwnames[] = {
11350 : (char *)"self", (char *)"cm", (char *)"fe", (char *)"fn", NULL
11351 : };
11352 0 : OGRErr result;
11353 :
11354 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetMollweide", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
11355 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11356 0 : if (!SWIG_IsOK(res1)) {
11357 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMollweide" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11358 : }
11359 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11360 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11361 0 : if (!SWIG_IsOK(ecode2)) {
11362 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMollweide" "', argument " "2"" of type '" "double""'");
11363 : }
11364 0 : arg2 = static_cast< double >(val2);
11365 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11366 0 : if (!SWIG_IsOK(ecode3)) {
11367 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMollweide" "', argument " "3"" of type '" "double""'");
11368 : }
11369 0 : arg3 = static_cast< double >(val3);
11370 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11371 0 : if (!SWIG_IsOK(ecode4)) {
11372 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMollweide" "', argument " "4"" of type '" "double""'");
11373 : }
11374 0 : arg4 = static_cast< double >(val4);
11375 0 : {
11376 0 : const int bLocalUseExceptions = GetUseExceptions();
11377 0 : if ( bLocalUseExceptions ) {
11378 0 : pushErrorHandler();
11379 : }
11380 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetMollweide(arg1,arg2,arg3,arg4);
11381 0 : if ( bLocalUseExceptions ) {
11382 0 : popErrorHandler();
11383 : }
11384 : #ifndef SED_HACKS
11385 : if ( bLocalUseExceptions ) {
11386 : CPLErr eclass = CPLGetLastErrorType();
11387 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11388 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11389 : }
11390 : }
11391 : #endif
11392 : }
11393 0 : {
11394 : /* %typemap(out) OGRErr */
11395 0 : if ( result != 0 && GetUseExceptions()) {
11396 0 : const char* pszMessage = CPLGetLastErrorMsg();
11397 0 : if( pszMessage[0] != '\0' )
11398 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11399 : else
11400 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11401 0 : SWIG_fail;
11402 : }
11403 : }
11404 0 : {
11405 : /* %typemap(ret) OGRErr */
11406 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11407 0 : resultobj = PyInt_FromLong( result );
11408 : }
11409 : }
11410 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; } }
11411 : return resultobj;
11412 : fail:
11413 : return NULL;
11414 : }
11415 :
11416 :
11417 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetNZMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11418 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11419 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11420 0 : double arg2 ;
11421 0 : double arg3 ;
11422 0 : double arg4 ;
11423 0 : double arg5 ;
11424 0 : void *argp1 = 0 ;
11425 0 : int res1 = 0 ;
11426 0 : double val2 ;
11427 0 : int ecode2 = 0 ;
11428 0 : double val3 ;
11429 0 : int ecode3 = 0 ;
11430 0 : double val4 ;
11431 0 : int ecode4 = 0 ;
11432 0 : double val5 ;
11433 0 : int ecode5 = 0 ;
11434 0 : PyObject * obj0 = 0 ;
11435 0 : PyObject * obj1 = 0 ;
11436 0 : PyObject * obj2 = 0 ;
11437 0 : PyObject * obj3 = 0 ;
11438 0 : PyObject * obj4 = 0 ;
11439 0 : char * kwnames[] = {
11440 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11441 : };
11442 0 : OGRErr result;
11443 :
11444 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetNZMG", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11445 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11446 0 : if (!SWIG_IsOK(res1)) {
11447 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetNZMG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11448 : }
11449 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11450 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11451 0 : if (!SWIG_IsOK(ecode2)) {
11452 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetNZMG" "', argument " "2"" of type '" "double""'");
11453 : }
11454 0 : arg2 = static_cast< double >(val2);
11455 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11456 0 : if (!SWIG_IsOK(ecode3)) {
11457 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetNZMG" "', argument " "3"" of type '" "double""'");
11458 : }
11459 0 : arg3 = static_cast< double >(val3);
11460 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11461 0 : if (!SWIG_IsOK(ecode4)) {
11462 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetNZMG" "', argument " "4"" of type '" "double""'");
11463 : }
11464 0 : arg4 = static_cast< double >(val4);
11465 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11466 0 : if (!SWIG_IsOK(ecode5)) {
11467 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetNZMG" "', argument " "5"" of type '" "double""'");
11468 : }
11469 0 : arg5 = static_cast< double >(val5);
11470 0 : {
11471 0 : const int bLocalUseExceptions = GetUseExceptions();
11472 0 : if ( bLocalUseExceptions ) {
11473 0 : pushErrorHandler();
11474 : }
11475 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetNZMG(arg1,arg2,arg3,arg4,arg5);
11476 0 : if ( bLocalUseExceptions ) {
11477 0 : popErrorHandler();
11478 : }
11479 : #ifndef SED_HACKS
11480 : if ( bLocalUseExceptions ) {
11481 : CPLErr eclass = CPLGetLastErrorType();
11482 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11483 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11484 : }
11485 : }
11486 : #endif
11487 : }
11488 0 : {
11489 : /* %typemap(out) OGRErr */
11490 0 : if ( result != 0 && GetUseExceptions()) {
11491 0 : const char* pszMessage = CPLGetLastErrorMsg();
11492 0 : if( pszMessage[0] != '\0' )
11493 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11494 : else
11495 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11496 0 : SWIG_fail;
11497 : }
11498 : }
11499 0 : {
11500 : /* %typemap(ret) OGRErr */
11501 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11502 0 : resultobj = PyInt_FromLong( result );
11503 : }
11504 : }
11505 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; } }
11506 : return resultobj;
11507 : fail:
11508 : return NULL;
11509 : }
11510 :
11511 :
11512 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetOS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11513 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11514 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11515 0 : double arg2 ;
11516 0 : double arg3 ;
11517 0 : double arg4 ;
11518 0 : double arg5 ;
11519 0 : double arg6 ;
11520 0 : void *argp1 = 0 ;
11521 0 : int res1 = 0 ;
11522 0 : double val2 ;
11523 0 : int ecode2 = 0 ;
11524 0 : double val3 ;
11525 0 : int ecode3 = 0 ;
11526 0 : double val4 ;
11527 0 : int ecode4 = 0 ;
11528 0 : double val5 ;
11529 0 : int ecode5 = 0 ;
11530 0 : double val6 ;
11531 0 : int ecode6 = 0 ;
11532 0 : PyObject * obj0 = 0 ;
11533 0 : PyObject * obj1 = 0 ;
11534 0 : PyObject * obj2 = 0 ;
11535 0 : PyObject * obj3 = 0 ;
11536 0 : PyObject * obj4 = 0 ;
11537 0 : PyObject * obj5 = 0 ;
11538 0 : char * kwnames[] = {
11539 : (char *)"self", (char *)"dfOriginLat", (char *)"dfCMeridian", (char *)"scale", (char *)"fe", (char *)"fn", NULL
11540 : };
11541 0 : OGRErr result;
11542 :
11543 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetOS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11544 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11545 0 : if (!SWIG_IsOK(res1)) {
11546 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetOS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11547 : }
11548 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11549 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11550 0 : if (!SWIG_IsOK(ecode2)) {
11551 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetOS" "', argument " "2"" of type '" "double""'");
11552 : }
11553 0 : arg2 = static_cast< double >(val2);
11554 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11555 0 : if (!SWIG_IsOK(ecode3)) {
11556 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetOS" "', argument " "3"" of type '" "double""'");
11557 : }
11558 0 : arg3 = static_cast< double >(val3);
11559 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11560 0 : if (!SWIG_IsOK(ecode4)) {
11561 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetOS" "', argument " "4"" of type '" "double""'");
11562 : }
11563 0 : arg4 = static_cast< double >(val4);
11564 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11565 0 : if (!SWIG_IsOK(ecode5)) {
11566 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetOS" "', argument " "5"" of type '" "double""'");
11567 : }
11568 0 : arg5 = static_cast< double >(val5);
11569 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11570 0 : if (!SWIG_IsOK(ecode6)) {
11571 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetOS" "', argument " "6"" of type '" "double""'");
11572 : }
11573 0 : arg6 = static_cast< double >(val6);
11574 0 : {
11575 0 : const int bLocalUseExceptions = GetUseExceptions();
11576 0 : if ( bLocalUseExceptions ) {
11577 0 : pushErrorHandler();
11578 : }
11579 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetOS(arg1,arg2,arg3,arg4,arg5,arg6);
11580 0 : if ( bLocalUseExceptions ) {
11581 0 : popErrorHandler();
11582 : }
11583 : #ifndef SED_HACKS
11584 : if ( bLocalUseExceptions ) {
11585 : CPLErr eclass = CPLGetLastErrorType();
11586 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11587 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11588 : }
11589 : }
11590 : #endif
11591 : }
11592 0 : {
11593 : /* %typemap(out) OGRErr */
11594 0 : if ( result != 0 && GetUseExceptions()) {
11595 0 : const char* pszMessage = CPLGetLastErrorMsg();
11596 0 : if( pszMessage[0] != '\0' )
11597 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11598 : else
11599 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11600 0 : SWIG_fail;
11601 : }
11602 : }
11603 0 : {
11604 : /* %typemap(ret) OGRErr */
11605 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11606 0 : resultobj = PyInt_FromLong( result );
11607 : }
11608 : }
11609 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; } }
11610 : return resultobj;
11611 : fail:
11612 : return NULL;
11613 : }
11614 :
11615 :
11616 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetOrthographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11617 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11618 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11619 1 : double arg2 ;
11620 1 : double arg3 ;
11621 1 : double arg4 ;
11622 1 : double arg5 ;
11623 1 : void *argp1 = 0 ;
11624 1 : int res1 = 0 ;
11625 1 : double val2 ;
11626 1 : int ecode2 = 0 ;
11627 1 : double val3 ;
11628 1 : int ecode3 = 0 ;
11629 1 : double val4 ;
11630 1 : int ecode4 = 0 ;
11631 1 : double val5 ;
11632 1 : int ecode5 = 0 ;
11633 1 : PyObject * obj0 = 0 ;
11634 1 : PyObject * obj1 = 0 ;
11635 1 : PyObject * obj2 = 0 ;
11636 1 : PyObject * obj3 = 0 ;
11637 1 : PyObject * obj4 = 0 ;
11638 1 : char * kwnames[] = {
11639 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11640 : };
11641 1 : OGRErr result;
11642 :
11643 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetOrthographic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11644 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11645 1 : if (!SWIG_IsOK(res1)) {
11646 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetOrthographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11647 : }
11648 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11649 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11650 1 : if (!SWIG_IsOK(ecode2)) {
11651 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetOrthographic" "', argument " "2"" of type '" "double""'");
11652 : }
11653 1 : arg2 = static_cast< double >(val2);
11654 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11655 1 : if (!SWIG_IsOK(ecode3)) {
11656 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetOrthographic" "', argument " "3"" of type '" "double""'");
11657 : }
11658 1 : arg3 = static_cast< double >(val3);
11659 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11660 1 : if (!SWIG_IsOK(ecode4)) {
11661 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetOrthographic" "', argument " "4"" of type '" "double""'");
11662 : }
11663 1 : arg4 = static_cast< double >(val4);
11664 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11665 1 : if (!SWIG_IsOK(ecode5)) {
11666 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetOrthographic" "', argument " "5"" of type '" "double""'");
11667 : }
11668 1 : arg5 = static_cast< double >(val5);
11669 1 : {
11670 1 : const int bLocalUseExceptions = GetUseExceptions();
11671 1 : if ( bLocalUseExceptions ) {
11672 1 : pushErrorHandler();
11673 : }
11674 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetOrthographic(arg1,arg2,arg3,arg4,arg5);
11675 1 : if ( bLocalUseExceptions ) {
11676 1 : popErrorHandler();
11677 : }
11678 : #ifndef SED_HACKS
11679 : if ( bLocalUseExceptions ) {
11680 : CPLErr eclass = CPLGetLastErrorType();
11681 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11682 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11683 : }
11684 : }
11685 : #endif
11686 : }
11687 1 : {
11688 : /* %typemap(out) OGRErr */
11689 1 : if ( result != 0 && GetUseExceptions()) {
11690 0 : const char* pszMessage = CPLGetLastErrorMsg();
11691 0 : if( pszMessage[0] != '\0' )
11692 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11693 : else
11694 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11695 0 : SWIG_fail;
11696 : }
11697 : }
11698 1 : {
11699 : /* %typemap(ret) OGRErr */
11700 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11701 1 : resultobj = PyInt_FromLong( result );
11702 : }
11703 : }
11704 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; } }
11705 : return resultobj;
11706 : fail:
11707 : return NULL;
11708 : }
11709 :
11710 :
11711 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetPolyconic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11712 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11713 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11714 0 : double arg2 ;
11715 0 : double arg3 ;
11716 0 : double arg4 ;
11717 0 : double arg5 ;
11718 0 : void *argp1 = 0 ;
11719 0 : int res1 = 0 ;
11720 0 : double val2 ;
11721 0 : int ecode2 = 0 ;
11722 0 : double val3 ;
11723 0 : int ecode3 = 0 ;
11724 0 : double val4 ;
11725 0 : int ecode4 = 0 ;
11726 0 : double val5 ;
11727 0 : int ecode5 = 0 ;
11728 0 : PyObject * obj0 = 0 ;
11729 0 : PyObject * obj1 = 0 ;
11730 0 : PyObject * obj2 = 0 ;
11731 0 : PyObject * obj3 = 0 ;
11732 0 : PyObject * obj4 = 0 ;
11733 0 : char * kwnames[] = {
11734 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11735 : };
11736 0 : OGRErr result;
11737 :
11738 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetPolyconic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
11739 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11740 0 : if (!SWIG_IsOK(res1)) {
11741 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetPolyconic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11742 : }
11743 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11744 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11745 0 : if (!SWIG_IsOK(ecode2)) {
11746 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetPolyconic" "', argument " "2"" of type '" "double""'");
11747 : }
11748 0 : arg2 = static_cast< double >(val2);
11749 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11750 0 : if (!SWIG_IsOK(ecode3)) {
11751 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetPolyconic" "', argument " "3"" of type '" "double""'");
11752 : }
11753 0 : arg3 = static_cast< double >(val3);
11754 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11755 0 : if (!SWIG_IsOK(ecode4)) {
11756 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetPolyconic" "', argument " "4"" of type '" "double""'");
11757 : }
11758 0 : arg4 = static_cast< double >(val4);
11759 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11760 0 : if (!SWIG_IsOK(ecode5)) {
11761 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetPolyconic" "', argument " "5"" of type '" "double""'");
11762 : }
11763 0 : arg5 = static_cast< double >(val5);
11764 0 : {
11765 0 : const int bLocalUseExceptions = GetUseExceptions();
11766 0 : if ( bLocalUseExceptions ) {
11767 0 : pushErrorHandler();
11768 : }
11769 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetPolyconic(arg1,arg2,arg3,arg4,arg5);
11770 0 : if ( bLocalUseExceptions ) {
11771 0 : popErrorHandler();
11772 : }
11773 : #ifndef SED_HACKS
11774 : if ( bLocalUseExceptions ) {
11775 : CPLErr eclass = CPLGetLastErrorType();
11776 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11777 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11778 : }
11779 : }
11780 : #endif
11781 : }
11782 0 : {
11783 : /* %typemap(out) OGRErr */
11784 0 : if ( result != 0 && GetUseExceptions()) {
11785 0 : const char* pszMessage = CPLGetLastErrorMsg();
11786 0 : if( pszMessage[0] != '\0' )
11787 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11788 : else
11789 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11790 0 : SWIG_fail;
11791 : }
11792 : }
11793 0 : {
11794 : /* %typemap(ret) OGRErr */
11795 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11796 0 : resultobj = PyInt_FromLong( result );
11797 : }
11798 : }
11799 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; } }
11800 : return resultobj;
11801 : fail:
11802 : return NULL;
11803 : }
11804 :
11805 :
11806 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetPS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11807 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11808 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11809 1 : double arg2 ;
11810 1 : double arg3 ;
11811 1 : double arg4 ;
11812 1 : double arg5 ;
11813 1 : double arg6 ;
11814 1 : void *argp1 = 0 ;
11815 1 : int res1 = 0 ;
11816 1 : double val2 ;
11817 1 : int ecode2 = 0 ;
11818 1 : double val3 ;
11819 1 : int ecode3 = 0 ;
11820 1 : double val4 ;
11821 1 : int ecode4 = 0 ;
11822 1 : double val5 ;
11823 1 : int ecode5 = 0 ;
11824 1 : double val6 ;
11825 1 : int ecode6 = 0 ;
11826 1 : PyObject * obj0 = 0 ;
11827 1 : PyObject * obj1 = 0 ;
11828 1 : PyObject * obj2 = 0 ;
11829 1 : PyObject * obj3 = 0 ;
11830 1 : PyObject * obj4 = 0 ;
11831 1 : PyObject * obj5 = 0 ;
11832 1 : char * kwnames[] = {
11833 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
11834 : };
11835 1 : OGRErr result;
11836 :
11837 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetPS", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
11838 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11839 1 : if (!SWIG_IsOK(res1)) {
11840 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetPS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11841 : }
11842 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11843 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11844 1 : if (!SWIG_IsOK(ecode2)) {
11845 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetPS" "', argument " "2"" of type '" "double""'");
11846 : }
11847 1 : arg2 = static_cast< double >(val2);
11848 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11849 1 : if (!SWIG_IsOK(ecode3)) {
11850 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetPS" "', argument " "3"" of type '" "double""'");
11851 : }
11852 1 : arg3 = static_cast< double >(val3);
11853 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11854 1 : if (!SWIG_IsOK(ecode4)) {
11855 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetPS" "', argument " "4"" of type '" "double""'");
11856 : }
11857 1 : arg4 = static_cast< double >(val4);
11858 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
11859 1 : if (!SWIG_IsOK(ecode5)) {
11860 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetPS" "', argument " "5"" of type '" "double""'");
11861 : }
11862 1 : arg5 = static_cast< double >(val5);
11863 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
11864 1 : if (!SWIG_IsOK(ecode6)) {
11865 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetPS" "', argument " "6"" of type '" "double""'");
11866 : }
11867 1 : arg6 = static_cast< double >(val6);
11868 1 : {
11869 1 : const int bLocalUseExceptions = GetUseExceptions();
11870 1 : if ( bLocalUseExceptions ) {
11871 1 : pushErrorHandler();
11872 : }
11873 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetPS(arg1,arg2,arg3,arg4,arg5,arg6);
11874 1 : if ( bLocalUseExceptions ) {
11875 1 : popErrorHandler();
11876 : }
11877 : #ifndef SED_HACKS
11878 : if ( bLocalUseExceptions ) {
11879 : CPLErr eclass = CPLGetLastErrorType();
11880 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11881 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11882 : }
11883 : }
11884 : #endif
11885 : }
11886 1 : {
11887 : /* %typemap(out) OGRErr */
11888 1 : if ( result != 0 && GetUseExceptions()) {
11889 0 : const char* pszMessage = CPLGetLastErrorMsg();
11890 0 : if( pszMessage[0] != '\0' )
11891 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11892 : else
11893 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11894 0 : SWIG_fail;
11895 : }
11896 : }
11897 1 : {
11898 : /* %typemap(ret) OGRErr */
11899 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11900 1 : resultobj = PyInt_FromLong( result );
11901 : }
11902 : }
11903 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; } }
11904 : return resultobj;
11905 : fail:
11906 : return NULL;
11907 : }
11908 :
11909 :
11910 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetRobinson(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11911 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11912 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11913 0 : double arg2 ;
11914 0 : double arg3 ;
11915 0 : double arg4 ;
11916 0 : void *argp1 = 0 ;
11917 0 : int res1 = 0 ;
11918 0 : double val2 ;
11919 0 : int ecode2 = 0 ;
11920 0 : double val3 ;
11921 0 : int ecode3 = 0 ;
11922 0 : double val4 ;
11923 0 : int ecode4 = 0 ;
11924 0 : PyObject * obj0 = 0 ;
11925 0 : PyObject * obj1 = 0 ;
11926 0 : PyObject * obj2 = 0 ;
11927 0 : PyObject * obj3 = 0 ;
11928 0 : char * kwnames[] = {
11929 : (char *)"self", (char *)"clong", (char *)"fe", (char *)"fn", NULL
11930 : };
11931 0 : OGRErr result;
11932 :
11933 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetRobinson", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
11934 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11935 0 : if (!SWIG_IsOK(res1)) {
11936 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetRobinson" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11937 : }
11938 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11939 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
11940 0 : if (!SWIG_IsOK(ecode2)) {
11941 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetRobinson" "', argument " "2"" of type '" "double""'");
11942 : }
11943 0 : arg2 = static_cast< double >(val2);
11944 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
11945 0 : if (!SWIG_IsOK(ecode3)) {
11946 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetRobinson" "', argument " "3"" of type '" "double""'");
11947 : }
11948 0 : arg3 = static_cast< double >(val3);
11949 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
11950 0 : if (!SWIG_IsOK(ecode4)) {
11951 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetRobinson" "', argument " "4"" of type '" "double""'");
11952 : }
11953 0 : arg4 = static_cast< double >(val4);
11954 0 : {
11955 0 : const int bLocalUseExceptions = GetUseExceptions();
11956 0 : if ( bLocalUseExceptions ) {
11957 0 : pushErrorHandler();
11958 : }
11959 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetRobinson(arg1,arg2,arg3,arg4);
11960 0 : if ( bLocalUseExceptions ) {
11961 0 : popErrorHandler();
11962 : }
11963 : #ifndef SED_HACKS
11964 : if ( bLocalUseExceptions ) {
11965 : CPLErr eclass = CPLGetLastErrorType();
11966 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11967 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11968 : }
11969 : }
11970 : #endif
11971 : }
11972 0 : {
11973 : /* %typemap(out) OGRErr */
11974 0 : if ( result != 0 && GetUseExceptions()) {
11975 0 : const char* pszMessage = CPLGetLastErrorMsg();
11976 0 : if( pszMessage[0] != '\0' )
11977 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
11978 : else
11979 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11980 0 : SWIG_fail;
11981 : }
11982 : }
11983 0 : {
11984 : /* %typemap(ret) OGRErr */
11985 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
11986 0 : resultobj = PyInt_FromLong( result );
11987 : }
11988 : }
11989 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; } }
11990 : return resultobj;
11991 : fail:
11992 : return NULL;
11993 : }
11994 :
11995 :
11996 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetSinusoidal(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
11997 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
11998 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11999 1 : double arg2 ;
12000 1 : double arg3 ;
12001 1 : double arg4 ;
12002 1 : void *argp1 = 0 ;
12003 1 : int res1 = 0 ;
12004 1 : double val2 ;
12005 1 : int ecode2 = 0 ;
12006 1 : double val3 ;
12007 1 : int ecode3 = 0 ;
12008 1 : double val4 ;
12009 1 : int ecode4 = 0 ;
12010 1 : PyObject * obj0 = 0 ;
12011 1 : PyObject * obj1 = 0 ;
12012 1 : PyObject * obj2 = 0 ;
12013 1 : PyObject * obj3 = 0 ;
12014 1 : char * kwnames[] = {
12015 : (char *)"self", (char *)"clong", (char *)"fe", (char *)"fn", NULL
12016 : };
12017 1 : OGRErr result;
12018 :
12019 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetSinusoidal", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
12020 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12021 1 : if (!SWIG_IsOK(res1)) {
12022 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetSinusoidal" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12023 : }
12024 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12025 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12026 1 : if (!SWIG_IsOK(ecode2)) {
12027 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetSinusoidal" "', argument " "2"" of type '" "double""'");
12028 : }
12029 1 : arg2 = static_cast< double >(val2);
12030 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12031 1 : if (!SWIG_IsOK(ecode3)) {
12032 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetSinusoidal" "', argument " "3"" of type '" "double""'");
12033 : }
12034 1 : arg3 = static_cast< double >(val3);
12035 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12036 1 : if (!SWIG_IsOK(ecode4)) {
12037 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetSinusoidal" "', argument " "4"" of type '" "double""'");
12038 : }
12039 1 : arg4 = static_cast< double >(val4);
12040 1 : {
12041 1 : const int bLocalUseExceptions = GetUseExceptions();
12042 1 : if ( bLocalUseExceptions ) {
12043 1 : pushErrorHandler();
12044 : }
12045 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetSinusoidal(arg1,arg2,arg3,arg4);
12046 1 : if ( bLocalUseExceptions ) {
12047 1 : popErrorHandler();
12048 : }
12049 : #ifndef SED_HACKS
12050 : if ( bLocalUseExceptions ) {
12051 : CPLErr eclass = CPLGetLastErrorType();
12052 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12053 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12054 : }
12055 : }
12056 : #endif
12057 : }
12058 1 : {
12059 : /* %typemap(out) OGRErr */
12060 1 : if ( result != 0 && GetUseExceptions()) {
12061 0 : const char* pszMessage = CPLGetLastErrorMsg();
12062 0 : if( pszMessage[0] != '\0' )
12063 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12064 : else
12065 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12066 0 : SWIG_fail;
12067 : }
12068 : }
12069 1 : {
12070 : /* %typemap(ret) OGRErr */
12071 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12072 1 : resultobj = PyInt_FromLong( result );
12073 : }
12074 : }
12075 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; } }
12076 : return resultobj;
12077 : fail:
12078 : return NULL;
12079 : }
12080 :
12081 :
12082 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetStereographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12083 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12084 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12085 0 : double arg2 ;
12086 0 : double arg3 ;
12087 0 : double arg4 ;
12088 0 : double arg5 ;
12089 0 : double arg6 ;
12090 0 : void *argp1 = 0 ;
12091 0 : int res1 = 0 ;
12092 0 : double val2 ;
12093 0 : int ecode2 = 0 ;
12094 0 : double val3 ;
12095 0 : int ecode3 = 0 ;
12096 0 : double val4 ;
12097 0 : int ecode4 = 0 ;
12098 0 : double val5 ;
12099 0 : int ecode5 = 0 ;
12100 0 : double val6 ;
12101 0 : int ecode6 = 0 ;
12102 0 : PyObject * obj0 = 0 ;
12103 0 : PyObject * obj1 = 0 ;
12104 0 : PyObject * obj2 = 0 ;
12105 0 : PyObject * obj3 = 0 ;
12106 0 : PyObject * obj4 = 0 ;
12107 0 : PyObject * obj5 = 0 ;
12108 0 : char * kwnames[] = {
12109 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12110 : };
12111 0 : OGRErr result;
12112 :
12113 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetStereographic", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12114 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12115 0 : if (!SWIG_IsOK(res1)) {
12116 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetStereographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12117 : }
12118 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12119 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12120 0 : if (!SWIG_IsOK(ecode2)) {
12121 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetStereographic" "', argument " "2"" of type '" "double""'");
12122 : }
12123 0 : arg2 = static_cast< double >(val2);
12124 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12125 0 : if (!SWIG_IsOK(ecode3)) {
12126 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetStereographic" "', argument " "3"" of type '" "double""'");
12127 : }
12128 0 : arg3 = static_cast< double >(val3);
12129 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12130 0 : if (!SWIG_IsOK(ecode4)) {
12131 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetStereographic" "', argument " "4"" of type '" "double""'");
12132 : }
12133 0 : arg4 = static_cast< double >(val4);
12134 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12135 0 : if (!SWIG_IsOK(ecode5)) {
12136 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetStereographic" "', argument " "5"" of type '" "double""'");
12137 : }
12138 0 : arg5 = static_cast< double >(val5);
12139 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12140 0 : if (!SWIG_IsOK(ecode6)) {
12141 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetStereographic" "', argument " "6"" of type '" "double""'");
12142 : }
12143 0 : arg6 = static_cast< double >(val6);
12144 0 : {
12145 0 : const int bLocalUseExceptions = GetUseExceptions();
12146 0 : if ( bLocalUseExceptions ) {
12147 0 : pushErrorHandler();
12148 : }
12149 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetStereographic(arg1,arg2,arg3,arg4,arg5,arg6);
12150 0 : if ( bLocalUseExceptions ) {
12151 0 : popErrorHandler();
12152 : }
12153 : #ifndef SED_HACKS
12154 : if ( bLocalUseExceptions ) {
12155 : CPLErr eclass = CPLGetLastErrorType();
12156 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12157 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12158 : }
12159 : }
12160 : #endif
12161 : }
12162 0 : {
12163 : /* %typemap(out) OGRErr */
12164 0 : if ( result != 0 && GetUseExceptions()) {
12165 0 : const char* pszMessage = CPLGetLastErrorMsg();
12166 0 : if( pszMessage[0] != '\0' )
12167 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12168 : else
12169 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12170 0 : SWIG_fail;
12171 : }
12172 : }
12173 0 : {
12174 : /* %typemap(ret) OGRErr */
12175 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12176 0 : resultobj = PyInt_FromLong( result );
12177 : }
12178 : }
12179 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; } }
12180 : return resultobj;
12181 : fail:
12182 : return NULL;
12183 : }
12184 :
12185 :
12186 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetSOC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12187 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12188 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12189 0 : double arg2 ;
12190 0 : double arg3 ;
12191 0 : double arg4 ;
12192 0 : double arg5 ;
12193 0 : void *argp1 = 0 ;
12194 0 : int res1 = 0 ;
12195 0 : double val2 ;
12196 0 : int ecode2 = 0 ;
12197 0 : double val3 ;
12198 0 : int ecode3 = 0 ;
12199 0 : double val4 ;
12200 0 : int ecode4 = 0 ;
12201 0 : double val5 ;
12202 0 : int ecode5 = 0 ;
12203 0 : PyObject * obj0 = 0 ;
12204 0 : PyObject * obj1 = 0 ;
12205 0 : PyObject * obj2 = 0 ;
12206 0 : PyObject * obj3 = 0 ;
12207 0 : PyObject * obj4 = 0 ;
12208 0 : char * kwnames[] = {
12209 : (char *)"self", (char *)"latitudeoforigin", (char *)"cm", (char *)"fe", (char *)"fn", NULL
12210 : };
12211 0 : OGRErr result;
12212 :
12213 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetSOC", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
12214 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12215 0 : if (!SWIG_IsOK(res1)) {
12216 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetSOC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12217 : }
12218 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12219 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12220 0 : if (!SWIG_IsOK(ecode2)) {
12221 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetSOC" "', argument " "2"" of type '" "double""'");
12222 : }
12223 0 : arg2 = static_cast< double >(val2);
12224 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12225 0 : if (!SWIG_IsOK(ecode3)) {
12226 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetSOC" "', argument " "3"" of type '" "double""'");
12227 : }
12228 0 : arg3 = static_cast< double >(val3);
12229 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12230 0 : if (!SWIG_IsOK(ecode4)) {
12231 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetSOC" "', argument " "4"" of type '" "double""'");
12232 : }
12233 0 : arg4 = static_cast< double >(val4);
12234 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12235 0 : if (!SWIG_IsOK(ecode5)) {
12236 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetSOC" "', argument " "5"" of type '" "double""'");
12237 : }
12238 0 : arg5 = static_cast< double >(val5);
12239 0 : {
12240 0 : const int bLocalUseExceptions = GetUseExceptions();
12241 0 : if ( bLocalUseExceptions ) {
12242 0 : pushErrorHandler();
12243 : }
12244 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetSOC(arg1,arg2,arg3,arg4,arg5);
12245 0 : if ( bLocalUseExceptions ) {
12246 0 : popErrorHandler();
12247 : }
12248 : #ifndef SED_HACKS
12249 : if ( bLocalUseExceptions ) {
12250 : CPLErr eclass = CPLGetLastErrorType();
12251 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12252 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12253 : }
12254 : }
12255 : #endif
12256 : }
12257 0 : {
12258 : /* %typemap(out) OGRErr */
12259 0 : if ( result != 0 && GetUseExceptions()) {
12260 0 : const char* pszMessage = CPLGetLastErrorMsg();
12261 0 : if( pszMessage[0] != '\0' )
12262 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12263 : else
12264 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12265 0 : SWIG_fail;
12266 : }
12267 : }
12268 0 : {
12269 : /* %typemap(ret) OGRErr */
12270 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12271 0 : resultobj = PyInt_FromLong( result );
12272 : }
12273 : }
12274 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; } }
12275 : return resultobj;
12276 : fail:
12277 : return NULL;
12278 : }
12279 :
12280 :
12281 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12282 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12283 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12284 1 : double arg2 ;
12285 1 : double arg3 ;
12286 1 : double arg4 ;
12287 1 : double arg5 ;
12288 1 : double arg6 ;
12289 1 : void *argp1 = 0 ;
12290 1 : int res1 = 0 ;
12291 1 : double val2 ;
12292 1 : int ecode2 = 0 ;
12293 1 : double val3 ;
12294 1 : int ecode3 = 0 ;
12295 1 : double val4 ;
12296 1 : int ecode4 = 0 ;
12297 1 : double val5 ;
12298 1 : int ecode5 = 0 ;
12299 1 : double val6 ;
12300 1 : int ecode6 = 0 ;
12301 1 : PyObject * obj0 = 0 ;
12302 1 : PyObject * obj1 = 0 ;
12303 1 : PyObject * obj2 = 0 ;
12304 1 : PyObject * obj3 = 0 ;
12305 1 : PyObject * obj4 = 0 ;
12306 1 : PyObject * obj5 = 0 ;
12307 1 : char * kwnames[] = {
12308 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12309 : };
12310 1 : OGRErr result;
12311 :
12312 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetTM", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12313 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12314 1 : if (!SWIG_IsOK(res1)) {
12315 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12316 : }
12317 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12318 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12319 1 : if (!SWIG_IsOK(ecode2)) {
12320 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTM" "', argument " "2"" of type '" "double""'");
12321 : }
12322 1 : arg2 = static_cast< double >(val2);
12323 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12324 1 : if (!SWIG_IsOK(ecode3)) {
12325 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTM" "', argument " "3"" of type '" "double""'");
12326 : }
12327 1 : arg3 = static_cast< double >(val3);
12328 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12329 1 : if (!SWIG_IsOK(ecode4)) {
12330 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTM" "', argument " "4"" of type '" "double""'");
12331 : }
12332 1 : arg4 = static_cast< double >(val4);
12333 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12334 1 : if (!SWIG_IsOK(ecode5)) {
12335 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTM" "', argument " "5"" of type '" "double""'");
12336 : }
12337 1 : arg5 = static_cast< double >(val5);
12338 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12339 1 : if (!SWIG_IsOK(ecode6)) {
12340 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTM" "', argument " "6"" of type '" "double""'");
12341 : }
12342 1 : arg6 = static_cast< double >(val6);
12343 1 : {
12344 1 : const int bLocalUseExceptions = GetUseExceptions();
12345 1 : if ( bLocalUseExceptions ) {
12346 1 : pushErrorHandler();
12347 : }
12348 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetTM(arg1,arg2,arg3,arg4,arg5,arg6);
12349 1 : if ( bLocalUseExceptions ) {
12350 1 : popErrorHandler();
12351 : }
12352 : #ifndef SED_HACKS
12353 : if ( bLocalUseExceptions ) {
12354 : CPLErr eclass = CPLGetLastErrorType();
12355 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12356 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12357 : }
12358 : }
12359 : #endif
12360 : }
12361 1 : {
12362 : /* %typemap(out) OGRErr */
12363 1 : if ( result != 0 && GetUseExceptions()) {
12364 0 : const char* pszMessage = CPLGetLastErrorMsg();
12365 0 : if( pszMessage[0] != '\0' )
12366 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12367 : else
12368 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12369 0 : SWIG_fail;
12370 : }
12371 : }
12372 1 : {
12373 : /* %typemap(ret) OGRErr */
12374 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12375 1 : resultobj = PyInt_FromLong( result );
12376 : }
12377 : }
12378 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; } }
12379 : return resultobj;
12380 : fail:
12381 : return NULL;
12382 : }
12383 :
12384 :
12385 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMVariant(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12386 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12387 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12388 0 : char *arg2 = (char *) 0 ;
12389 0 : double arg3 ;
12390 0 : double arg4 ;
12391 0 : double arg5 ;
12392 0 : double arg6 ;
12393 0 : double arg7 ;
12394 0 : void *argp1 = 0 ;
12395 0 : int res1 = 0 ;
12396 0 : int res2 ;
12397 0 : char *buf2 = 0 ;
12398 0 : int alloc2 = 0 ;
12399 0 : double val3 ;
12400 0 : int ecode3 = 0 ;
12401 0 : double val4 ;
12402 0 : int ecode4 = 0 ;
12403 0 : double val5 ;
12404 0 : int ecode5 = 0 ;
12405 0 : double val6 ;
12406 0 : int ecode6 = 0 ;
12407 0 : double val7 ;
12408 0 : int ecode7 = 0 ;
12409 0 : PyObject * obj0 = 0 ;
12410 0 : PyObject * obj1 = 0 ;
12411 0 : PyObject * obj2 = 0 ;
12412 0 : PyObject * obj3 = 0 ;
12413 0 : PyObject * obj4 = 0 ;
12414 0 : PyObject * obj5 = 0 ;
12415 0 : PyObject * obj6 = 0 ;
12416 0 : char * kwnames[] = {
12417 : (char *)"self", (char *)"pszVariantName", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12418 : };
12419 0 : OGRErr result;
12420 :
12421 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetTMVariant", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
12422 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12423 0 : if (!SWIG_IsOK(res1)) {
12424 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMVariant" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12425 : }
12426 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12427 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
12428 0 : if (!SWIG_IsOK(res2)) {
12429 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetTMVariant" "', argument " "2"" of type '" "char const *""'");
12430 : }
12431 0 : arg2 = reinterpret_cast< char * >(buf2);
12432 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12433 0 : if (!SWIG_IsOK(ecode3)) {
12434 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMVariant" "', argument " "3"" of type '" "double""'");
12435 : }
12436 0 : arg3 = static_cast< double >(val3);
12437 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12438 0 : if (!SWIG_IsOK(ecode4)) {
12439 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMVariant" "', argument " "4"" of type '" "double""'");
12440 : }
12441 0 : arg4 = static_cast< double >(val4);
12442 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12443 0 : if (!SWIG_IsOK(ecode5)) {
12444 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMVariant" "', argument " "5"" of type '" "double""'");
12445 : }
12446 0 : arg5 = static_cast< double >(val5);
12447 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12448 0 : if (!SWIG_IsOK(ecode6)) {
12449 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTMVariant" "', argument " "6"" of type '" "double""'");
12450 : }
12451 0 : arg6 = static_cast< double >(val6);
12452 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
12453 0 : if (!SWIG_IsOK(ecode7)) {
12454 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetTMVariant" "', argument " "7"" of type '" "double""'");
12455 : }
12456 0 : arg7 = static_cast< double >(val7);
12457 0 : {
12458 0 : const int bLocalUseExceptions = GetUseExceptions();
12459 0 : if ( bLocalUseExceptions ) {
12460 0 : pushErrorHandler();
12461 : }
12462 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMVariant(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
12463 0 : if ( bLocalUseExceptions ) {
12464 0 : popErrorHandler();
12465 : }
12466 : #ifndef SED_HACKS
12467 : if ( bLocalUseExceptions ) {
12468 : CPLErr eclass = CPLGetLastErrorType();
12469 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12470 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12471 : }
12472 : }
12473 : #endif
12474 : }
12475 0 : {
12476 : /* %typemap(out) OGRErr */
12477 0 : if ( result != 0 && GetUseExceptions()) {
12478 0 : const char* pszMessage = CPLGetLastErrorMsg();
12479 0 : if( pszMessage[0] != '\0' )
12480 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12481 : else
12482 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12483 0 : SWIG_fail;
12484 : }
12485 : }
12486 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12487 0 : {
12488 : /* %typemap(ret) OGRErr */
12489 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12490 0 : resultobj = PyInt_FromLong( result );
12491 : }
12492 : }
12493 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; } }
12494 : return resultobj;
12495 0 : fail:
12496 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12497 : return NULL;
12498 : }
12499 :
12500 :
12501 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12502 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12503 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12504 0 : double arg2 ;
12505 0 : double arg3 ;
12506 0 : double arg4 ;
12507 0 : double arg5 ;
12508 0 : void *argp1 = 0 ;
12509 0 : int res1 = 0 ;
12510 0 : double val2 ;
12511 0 : int ecode2 = 0 ;
12512 0 : double val3 ;
12513 0 : int ecode3 = 0 ;
12514 0 : double val4 ;
12515 0 : int ecode4 = 0 ;
12516 0 : double val5 ;
12517 0 : int ecode5 = 0 ;
12518 0 : PyObject * obj0 = 0 ;
12519 0 : PyObject * obj1 = 0 ;
12520 0 : PyObject * obj2 = 0 ;
12521 0 : PyObject * obj3 = 0 ;
12522 0 : PyObject * obj4 = 0 ;
12523 0 : char * kwnames[] = {
12524 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"fe", (char *)"fn", NULL
12525 : };
12526 0 : OGRErr result;
12527 :
12528 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOO:SpatialReference_SetTMG", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4)) SWIG_fail;
12529 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12530 0 : if (!SWIG_IsOK(res1)) {
12531 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12532 : }
12533 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12534 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12535 0 : if (!SWIG_IsOK(ecode2)) {
12536 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTMG" "', argument " "2"" of type '" "double""'");
12537 : }
12538 0 : arg2 = static_cast< double >(val2);
12539 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12540 0 : if (!SWIG_IsOK(ecode3)) {
12541 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMG" "', argument " "3"" of type '" "double""'");
12542 : }
12543 0 : arg3 = static_cast< double >(val3);
12544 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12545 0 : if (!SWIG_IsOK(ecode4)) {
12546 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMG" "', argument " "4"" of type '" "double""'");
12547 : }
12548 0 : arg4 = static_cast< double >(val4);
12549 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12550 0 : if (!SWIG_IsOK(ecode5)) {
12551 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMG" "', argument " "5"" of type '" "double""'");
12552 : }
12553 0 : arg5 = static_cast< double >(val5);
12554 0 : {
12555 0 : const int bLocalUseExceptions = GetUseExceptions();
12556 0 : if ( bLocalUseExceptions ) {
12557 0 : pushErrorHandler();
12558 : }
12559 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMG(arg1,arg2,arg3,arg4,arg5);
12560 0 : if ( bLocalUseExceptions ) {
12561 0 : popErrorHandler();
12562 : }
12563 : #ifndef SED_HACKS
12564 : if ( bLocalUseExceptions ) {
12565 : CPLErr eclass = CPLGetLastErrorType();
12566 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12567 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12568 : }
12569 : }
12570 : #endif
12571 : }
12572 0 : {
12573 : /* %typemap(out) OGRErr */
12574 0 : if ( result != 0 && GetUseExceptions()) {
12575 0 : const char* pszMessage = CPLGetLastErrorMsg();
12576 0 : if( pszMessage[0] != '\0' )
12577 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12578 : else
12579 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12580 0 : SWIG_fail;
12581 : }
12582 : }
12583 0 : {
12584 : /* %typemap(ret) OGRErr */
12585 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12586 0 : resultobj = PyInt_FromLong( result );
12587 : }
12588 : }
12589 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; } }
12590 : return resultobj;
12591 : fail:
12592 : return NULL;
12593 : }
12594 :
12595 :
12596 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMSO(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12597 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12598 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12599 0 : double arg2 ;
12600 0 : double arg3 ;
12601 0 : double arg4 ;
12602 0 : double arg5 ;
12603 0 : double arg6 ;
12604 0 : void *argp1 = 0 ;
12605 0 : int res1 = 0 ;
12606 0 : double val2 ;
12607 0 : int ecode2 = 0 ;
12608 0 : double val3 ;
12609 0 : int ecode3 = 0 ;
12610 0 : double val4 ;
12611 0 : int ecode4 = 0 ;
12612 0 : double val5 ;
12613 0 : int ecode5 = 0 ;
12614 0 : double val6 ;
12615 0 : int ecode6 = 0 ;
12616 0 : PyObject * obj0 = 0 ;
12617 0 : PyObject * obj1 = 0 ;
12618 0 : PyObject * obj2 = 0 ;
12619 0 : PyObject * obj3 = 0 ;
12620 0 : PyObject * obj4 = 0 ;
12621 0 : PyObject * obj5 = 0 ;
12622 0 : char * kwnames[] = {
12623 : (char *)"self", (char *)"clat", (char *)"clong", (char *)"scale", (char *)"fe", (char *)"fn", NULL
12624 : };
12625 0 : OGRErr result;
12626 :
12627 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOO:SpatialReference_SetTMSO", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5)) SWIG_fail;
12628 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12629 0 : if (!SWIG_IsOK(res1)) {
12630 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMSO" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12631 : }
12632 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12633 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12634 0 : if (!SWIG_IsOK(ecode2)) {
12635 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTMSO" "', argument " "2"" of type '" "double""'");
12636 : }
12637 0 : arg2 = static_cast< double >(val2);
12638 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12639 0 : if (!SWIG_IsOK(ecode3)) {
12640 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMSO" "', argument " "3"" of type '" "double""'");
12641 : }
12642 0 : arg3 = static_cast< double >(val3);
12643 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12644 0 : if (!SWIG_IsOK(ecode4)) {
12645 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMSO" "', argument " "4"" of type '" "double""'");
12646 : }
12647 0 : arg4 = static_cast< double >(val4);
12648 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12649 0 : if (!SWIG_IsOK(ecode5)) {
12650 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMSO" "', argument " "5"" of type '" "double""'");
12651 : }
12652 0 : arg5 = static_cast< double >(val5);
12653 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12654 0 : if (!SWIG_IsOK(ecode6)) {
12655 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTMSO" "', argument " "6"" of type '" "double""'");
12656 : }
12657 0 : arg6 = static_cast< double >(val6);
12658 0 : {
12659 0 : const int bLocalUseExceptions = GetUseExceptions();
12660 0 : if ( bLocalUseExceptions ) {
12661 0 : pushErrorHandler();
12662 : }
12663 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMSO(arg1,arg2,arg3,arg4,arg5,arg6);
12664 0 : if ( bLocalUseExceptions ) {
12665 0 : popErrorHandler();
12666 : }
12667 : #ifndef SED_HACKS
12668 : if ( bLocalUseExceptions ) {
12669 : CPLErr eclass = CPLGetLastErrorType();
12670 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12671 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12672 : }
12673 : }
12674 : #endif
12675 : }
12676 0 : {
12677 : /* %typemap(out) OGRErr */
12678 0 : if ( result != 0 && GetUseExceptions()) {
12679 0 : const char* pszMessage = CPLGetLastErrorMsg();
12680 0 : if( pszMessage[0] != '\0' )
12681 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12682 : else
12683 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12684 0 : SWIG_fail;
12685 : }
12686 : }
12687 0 : {
12688 : /* %typemap(ret) OGRErr */
12689 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12690 0 : resultobj = PyInt_FromLong( result );
12691 : }
12692 : }
12693 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; } }
12694 : return resultobj;
12695 : fail:
12696 : return NULL;
12697 : }
12698 :
12699 :
12700 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVDG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12701 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12702 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12703 0 : double arg2 ;
12704 0 : double arg3 ;
12705 0 : double arg4 ;
12706 0 : void *argp1 = 0 ;
12707 0 : int res1 = 0 ;
12708 0 : double val2 ;
12709 0 : int ecode2 = 0 ;
12710 0 : double val3 ;
12711 0 : int ecode3 = 0 ;
12712 0 : double val4 ;
12713 0 : int ecode4 = 0 ;
12714 0 : PyObject * obj0 = 0 ;
12715 0 : PyObject * obj1 = 0 ;
12716 0 : PyObject * obj2 = 0 ;
12717 0 : PyObject * obj3 = 0 ;
12718 0 : char * kwnames[] = {
12719 : (char *)"self", (char *)"clong", (char *)"fe", (char *)"fn", NULL
12720 : };
12721 0 : OGRErr result;
12722 :
12723 0 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOO:SpatialReference_SetVDG", kwnames, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
12724 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12725 0 : if (!SWIG_IsOK(res1)) {
12726 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVDG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12727 : }
12728 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12729 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12730 0 : if (!SWIG_IsOK(ecode2)) {
12731 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetVDG" "', argument " "2"" of type '" "double""'");
12732 : }
12733 0 : arg2 = static_cast< double >(val2);
12734 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12735 0 : if (!SWIG_IsOK(ecode3)) {
12736 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetVDG" "', argument " "3"" of type '" "double""'");
12737 : }
12738 0 : arg3 = static_cast< double >(val3);
12739 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12740 0 : if (!SWIG_IsOK(ecode4)) {
12741 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVDG" "', argument " "4"" of type '" "double""'");
12742 : }
12743 0 : arg4 = static_cast< double >(val4);
12744 0 : {
12745 0 : const int bLocalUseExceptions = GetUseExceptions();
12746 0 : if ( bLocalUseExceptions ) {
12747 0 : pushErrorHandler();
12748 : }
12749 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetVDG(arg1,arg2,arg3,arg4);
12750 0 : if ( bLocalUseExceptions ) {
12751 0 : popErrorHandler();
12752 : }
12753 : #ifndef SED_HACKS
12754 : if ( bLocalUseExceptions ) {
12755 : CPLErr eclass = CPLGetLastErrorType();
12756 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12757 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12758 : }
12759 : }
12760 : #endif
12761 : }
12762 0 : {
12763 : /* %typemap(out) OGRErr */
12764 0 : if ( result != 0 && GetUseExceptions()) {
12765 0 : const char* pszMessage = CPLGetLastErrorMsg();
12766 0 : if( pszMessage[0] != '\0' )
12767 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12768 : else
12769 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12770 0 : SWIG_fail;
12771 : }
12772 : }
12773 0 : {
12774 : /* %typemap(ret) OGRErr */
12775 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12776 0 : resultobj = PyInt_FromLong( result );
12777 : }
12778 : }
12779 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; } }
12780 : return resultobj;
12781 : fail:
12782 : return NULL;
12783 : }
12784 :
12785 :
12786 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVerticalPerspective(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12787 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12788 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12789 1 : double arg2 ;
12790 1 : double arg3 ;
12791 1 : double arg4 ;
12792 1 : double arg5 ;
12793 1 : double arg6 ;
12794 1 : double arg7 ;
12795 1 : void *argp1 = 0 ;
12796 1 : int res1 = 0 ;
12797 1 : double val2 ;
12798 1 : int ecode2 = 0 ;
12799 1 : double val3 ;
12800 1 : int ecode3 = 0 ;
12801 1 : double val4 ;
12802 1 : int ecode4 = 0 ;
12803 1 : double val5 ;
12804 1 : int ecode5 = 0 ;
12805 1 : double val6 ;
12806 1 : int ecode6 = 0 ;
12807 1 : double val7 ;
12808 1 : int ecode7 = 0 ;
12809 1 : PyObject * obj0 = 0 ;
12810 1 : PyObject * obj1 = 0 ;
12811 1 : PyObject * obj2 = 0 ;
12812 1 : PyObject * obj3 = 0 ;
12813 1 : PyObject * obj4 = 0 ;
12814 1 : PyObject * obj5 = 0 ;
12815 1 : PyObject * obj6 = 0 ;
12816 1 : char * kwnames[] = {
12817 : (char *)"self", (char *)"topoOriginLat", (char *)"topoOriginLon", (char *)"topoOriginHeight", (char *)"viewPointHeight", (char *)"fe", (char *)"fn", NULL
12818 : };
12819 1 : OGRErr result;
12820 :
12821 1 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OOOOOOO:SpatialReference_SetVerticalPerspective", kwnames, &obj0, &obj1, &obj2, &obj3, &obj4, &obj5, &obj6)) SWIG_fail;
12822 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12823 1 : if (!SWIG_IsOK(res1)) {
12824 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12825 : }
12826 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12827 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
12828 1 : if (!SWIG_IsOK(ecode2)) {
12829 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "2"" of type '" "double""'");
12830 : }
12831 1 : arg2 = static_cast< double >(val2);
12832 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
12833 1 : if (!SWIG_IsOK(ecode3)) {
12834 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "3"" of type '" "double""'");
12835 : }
12836 1 : arg3 = static_cast< double >(val3);
12837 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
12838 1 : if (!SWIG_IsOK(ecode4)) {
12839 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "4"" of type '" "double""'");
12840 : }
12841 1 : arg4 = static_cast< double >(val4);
12842 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
12843 1 : if (!SWIG_IsOK(ecode5)) {
12844 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "5"" of type '" "double""'");
12845 : }
12846 1 : arg5 = static_cast< double >(val5);
12847 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
12848 1 : if (!SWIG_IsOK(ecode6)) {
12849 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "6"" of type '" "double""'");
12850 : }
12851 1 : arg6 = static_cast< double >(val6);
12852 1 : ecode7 = SWIG_AsVal_double(obj6, &val7);
12853 1 : if (!SWIG_IsOK(ecode7)) {
12854 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetVerticalPerspective" "', argument " "7"" of type '" "double""'");
12855 : }
12856 1 : arg7 = static_cast< double >(val7);
12857 1 : {
12858 1 : const int bLocalUseExceptions = GetUseExceptions();
12859 1 : if ( bLocalUseExceptions ) {
12860 1 : pushErrorHandler();
12861 : }
12862 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetVerticalPerspective(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
12863 1 : if ( bLocalUseExceptions ) {
12864 1 : popErrorHandler();
12865 : }
12866 : #ifndef SED_HACKS
12867 : if ( bLocalUseExceptions ) {
12868 : CPLErr eclass = CPLGetLastErrorType();
12869 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12870 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12871 : }
12872 : }
12873 : #endif
12874 : }
12875 1 : {
12876 : /* %typemap(out) OGRErr */
12877 1 : if ( result != 0 && GetUseExceptions()) {
12878 0 : const char* pszMessage = CPLGetLastErrorMsg();
12879 0 : if( pszMessage[0] != '\0' )
12880 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12881 : else
12882 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12883 0 : SWIG_fail;
12884 : }
12885 : }
12886 1 : {
12887 : /* %typemap(ret) OGRErr */
12888 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12889 1 : resultobj = PyInt_FromLong( result );
12890 : }
12891 : }
12892 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; } }
12893 : return resultobj;
12894 : fail:
12895 : return NULL;
12896 : }
12897 :
12898 :
12899 56 : SWIGINTERN PyObject *_wrap_SpatialReference_SetWellKnownGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12900 56 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12901 56 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12902 56 : char *arg2 = (char *) 0 ;
12903 56 : void *argp1 = 0 ;
12904 56 : int res1 = 0 ;
12905 56 : int res2 ;
12906 56 : char *buf2 = 0 ;
12907 56 : int alloc2 = 0 ;
12908 56 : PyObject *swig_obj[2] ;
12909 56 : OGRErr result;
12910 :
12911 56 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetWellKnownGeogCS", 2, 2, swig_obj)) SWIG_fail;
12912 56 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12913 56 : if (!SWIG_IsOK(res1)) {
12914 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetWellKnownGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12915 : }
12916 56 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12917 56 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
12918 56 : if (!SWIG_IsOK(res2)) {
12919 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetWellKnownGeogCS" "', argument " "2"" of type '" "char const *""'");
12920 : }
12921 56 : arg2 = reinterpret_cast< char * >(buf2);
12922 56 : {
12923 56 : if (!arg2) {
12924 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
12925 : }
12926 : }
12927 56 : {
12928 56 : const int bLocalUseExceptions = GetUseExceptions();
12929 56 : if ( bLocalUseExceptions ) {
12930 55 : pushErrorHandler();
12931 : }
12932 56 : result = (OGRErr)OSRSpatialReferenceShadow_SetWellKnownGeogCS(arg1,(char const *)arg2);
12933 56 : if ( bLocalUseExceptions ) {
12934 55 : popErrorHandler();
12935 : }
12936 : #ifndef SED_HACKS
12937 : if ( bLocalUseExceptions ) {
12938 : CPLErr eclass = CPLGetLastErrorType();
12939 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12940 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12941 : }
12942 : }
12943 : #endif
12944 : }
12945 56 : {
12946 : /* %typemap(out) OGRErr */
12947 56 : if ( result != 0 && GetUseExceptions()) {
12948 0 : const char* pszMessage = CPLGetLastErrorMsg();
12949 0 : if( pszMessage[0] != '\0' )
12950 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
12951 : else
12952 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12953 0 : SWIG_fail;
12954 : }
12955 : }
12956 56 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12957 56 : {
12958 : /* %typemap(ret) OGRErr */
12959 56 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
12960 56 : resultobj = PyInt_FromLong( result );
12961 : }
12962 : }
12963 56 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
12964 : return resultobj;
12965 0 : fail:
12966 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
12967 : return NULL;
12968 : }
12969 :
12970 :
12971 938 : SWIGINTERN PyObject *_wrap_SpatialReference_SetFromUserInput(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
12972 938 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
12973 938 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12974 938 : char *arg2 = (char *) 0 ;
12975 938 : char **arg3 = (char **) NULL ;
12976 938 : void *argp1 = 0 ;
12977 938 : int res1 = 0 ;
12978 938 : int res2 ;
12979 938 : char *buf2 = 0 ;
12980 938 : int alloc2 = 0 ;
12981 938 : PyObject * obj0 = 0 ;
12982 938 : PyObject * obj1 = 0 ;
12983 938 : PyObject * obj2 = 0 ;
12984 938 : char * kwnames[] = {
12985 : (char *)"self", (char *)"name", (char *)"options", NULL
12986 : };
12987 938 : OGRErr result;
12988 :
12989 938 : if (!PyArg_ParseTupleAndKeywords(args, kwargs, "OO|O:SpatialReference_SetFromUserInput", kwnames, &obj0, &obj1, &obj2)) SWIG_fail;
12990 938 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12991 938 : if (!SWIG_IsOK(res1)) {
12992 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetFromUserInput" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12993 : }
12994 938 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12995 938 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
12996 938 : if (!SWIG_IsOK(res2)) {
12997 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetFromUserInput" "', argument " "2"" of type '" "char const *""'");
12998 : }
12999 938 : arg2 = reinterpret_cast< char * >(buf2);
13000 938 : if (obj2) {
13001 1 : {
13002 : /* %typemap(in) char **dict */
13003 1 : arg3 = NULL;
13004 1 : if ( PySequence_Check( obj2 ) ) {
13005 1 : int bErr = FALSE;
13006 1 : arg3 = CSLFromPySequence(obj2, &bErr);
13007 1 : if ( bErr )
13008 : {
13009 0 : SWIG_fail;
13010 : }
13011 : }
13012 0 : else if ( PyMapping_Check( obj2 ) ) {
13013 0 : int bErr = FALSE;
13014 0 : arg3 = CSLFromPyMapping(obj2, &bErr);
13015 0 : if ( bErr )
13016 : {
13017 0 : SWIG_fail;
13018 : }
13019 : }
13020 : else {
13021 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
13022 0 : SWIG_fail;
13023 : }
13024 : }
13025 : }
13026 938 : {
13027 938 : if (!arg2) {
13028 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13029 : }
13030 : }
13031 938 : {
13032 938 : const int bLocalUseExceptions = GetUseExceptions();
13033 938 : if ( bLocalUseExceptions ) {
13034 726 : pushErrorHandler();
13035 : }
13036 938 : result = (OGRErr)OSRSpatialReferenceShadow_SetFromUserInput(arg1,(char const *)arg2,arg3);
13037 938 : if ( bLocalUseExceptions ) {
13038 726 : popErrorHandler();
13039 : }
13040 : #ifndef SED_HACKS
13041 : if ( bLocalUseExceptions ) {
13042 : CPLErr eclass = CPLGetLastErrorType();
13043 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13044 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13045 : }
13046 : }
13047 : #endif
13048 : }
13049 938 : {
13050 : /* %typemap(out) OGRErr */
13051 949 : if ( result != 0 && GetUseExceptions()) {
13052 10 : const char* pszMessage = CPLGetLastErrorMsg();
13053 10 : if( pszMessage[0] != '\0' )
13054 8 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13055 : else
13056 2 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13057 10 : SWIG_fail;
13058 : }
13059 : }
13060 928 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13061 928 : {
13062 : /* %typemap(freearg) char **dict */
13063 928 : CSLDestroy( arg3 );
13064 : }
13065 928 : {
13066 : /* %typemap(ret) OGRErr */
13067 928 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13068 928 : resultobj = PyInt_FromLong( result );
13069 : }
13070 : }
13071 938 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
13072 : return resultobj;
13073 10 : fail:
13074 10 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13075 10 : {
13076 : /* %typemap(freearg) char **dict */
13077 10 : CSLDestroy( arg3 );
13078 : }
13079 : return NULL;
13080 : }
13081 :
13082 :
13083 1 : SWIGINTERN PyObject *_wrap_SpatialReference_CopyGeogCSFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13084 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13085 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13086 1 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
13087 1 : void *argp1 = 0 ;
13088 1 : int res1 = 0 ;
13089 1 : void *argp2 = 0 ;
13090 1 : int res2 = 0 ;
13091 1 : PyObject *swig_obj[2] ;
13092 1 : OGRErr result;
13093 :
13094 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_CopyGeogCSFrom", 2, 2, swig_obj)) SWIG_fail;
13095 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13096 1 : if (!SWIG_IsOK(res1)) {
13097 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_CopyGeogCSFrom" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13098 : }
13099 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13100 1 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13101 1 : if (!SWIG_IsOK(res2)) {
13102 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_CopyGeogCSFrom" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
13103 : }
13104 1 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
13105 1 : {
13106 1 : if (!arg2) {
13107 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13108 : }
13109 : }
13110 1 : {
13111 1 : const int bLocalUseExceptions = GetUseExceptions();
13112 1 : if ( bLocalUseExceptions ) {
13113 0 : pushErrorHandler();
13114 : }
13115 1 : result = (OGRErr)OSRSpatialReferenceShadow_CopyGeogCSFrom(arg1,arg2);
13116 1 : if ( bLocalUseExceptions ) {
13117 0 : popErrorHandler();
13118 : }
13119 : #ifndef SED_HACKS
13120 : if ( bLocalUseExceptions ) {
13121 : CPLErr eclass = CPLGetLastErrorType();
13122 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13123 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13124 : }
13125 : }
13126 : #endif
13127 : }
13128 1 : {
13129 : /* %typemap(out) OGRErr */
13130 1 : if ( result != 0 && GetUseExceptions()) {
13131 0 : const char* pszMessage = CPLGetLastErrorMsg();
13132 0 : if( pszMessage[0] != '\0' )
13133 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13134 : else
13135 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13136 0 : SWIG_fail;
13137 : }
13138 : }
13139 1 : {
13140 : /* %typemap(ret) OGRErr */
13141 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13142 1 : resultobj = PyInt_FromLong( result );
13143 : }
13144 : }
13145 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; } }
13146 : return resultobj;
13147 : fail:
13148 : return NULL;
13149 : }
13150 :
13151 :
13152 3 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13153 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13154 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13155 3 : double arg2 ;
13156 3 : double arg3 ;
13157 3 : double arg4 ;
13158 3 : double arg5 = (double) 0.0 ;
13159 3 : double arg6 = (double) 0.0 ;
13160 3 : double arg7 = (double) 0.0 ;
13161 3 : double arg8 = (double) 0.0 ;
13162 3 : void *argp1 = 0 ;
13163 3 : int res1 = 0 ;
13164 3 : double val2 ;
13165 3 : int ecode2 = 0 ;
13166 3 : double val3 ;
13167 3 : int ecode3 = 0 ;
13168 3 : double val4 ;
13169 3 : int ecode4 = 0 ;
13170 3 : double val5 ;
13171 3 : int ecode5 = 0 ;
13172 3 : double val6 ;
13173 3 : int ecode6 = 0 ;
13174 3 : double val7 ;
13175 3 : int ecode7 = 0 ;
13176 3 : double val8 ;
13177 3 : int ecode8 = 0 ;
13178 3 : PyObject *swig_obj[8] ;
13179 3 : OGRErr result;
13180 :
13181 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetTOWGS84", 4, 8, swig_obj)) SWIG_fail;
13182 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13183 3 : if (!SWIG_IsOK(res1)) {
13184 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13185 : }
13186 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13187 3 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
13188 3 : if (!SWIG_IsOK(ecode2)) {
13189 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTOWGS84" "', argument " "2"" of type '" "double""'");
13190 : }
13191 3 : arg2 = static_cast< double >(val2);
13192 3 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
13193 3 : if (!SWIG_IsOK(ecode3)) {
13194 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTOWGS84" "', argument " "3"" of type '" "double""'");
13195 : }
13196 3 : arg3 = static_cast< double >(val3);
13197 3 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
13198 3 : if (!SWIG_IsOK(ecode4)) {
13199 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTOWGS84" "', argument " "4"" of type '" "double""'");
13200 : }
13201 3 : arg4 = static_cast< double >(val4);
13202 3 : if (swig_obj[4]) {
13203 2 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
13204 2 : if (!SWIG_IsOK(ecode5)) {
13205 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTOWGS84" "', argument " "5"" of type '" "double""'");
13206 : }
13207 2 : arg5 = static_cast< double >(val5);
13208 : }
13209 3 : if (swig_obj[5]) {
13210 2 : ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
13211 2 : if (!SWIG_IsOK(ecode6)) {
13212 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTOWGS84" "', argument " "6"" of type '" "double""'");
13213 : }
13214 2 : arg6 = static_cast< double >(val6);
13215 : }
13216 3 : if (swig_obj[6]) {
13217 2 : ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
13218 2 : if (!SWIG_IsOK(ecode7)) {
13219 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetTOWGS84" "', argument " "7"" of type '" "double""'");
13220 : }
13221 2 : arg7 = static_cast< double >(val7);
13222 : }
13223 3 : if (swig_obj[7]) {
13224 2 : ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
13225 2 : if (!SWIG_IsOK(ecode8)) {
13226 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetTOWGS84" "', argument " "8"" of type '" "double""'");
13227 : }
13228 2 : arg8 = static_cast< double >(val8);
13229 : }
13230 3 : {
13231 3 : const int bLocalUseExceptions = GetUseExceptions();
13232 3 : if ( bLocalUseExceptions ) {
13233 1 : pushErrorHandler();
13234 : }
13235 3 : result = (OGRErr)OSRSpatialReferenceShadow_SetTOWGS84(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
13236 3 : if ( bLocalUseExceptions ) {
13237 1 : popErrorHandler();
13238 : }
13239 : #ifndef SED_HACKS
13240 : if ( bLocalUseExceptions ) {
13241 : CPLErr eclass = CPLGetLastErrorType();
13242 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13243 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13244 : }
13245 : }
13246 : #endif
13247 : }
13248 3 : {
13249 : /* %typemap(out) OGRErr */
13250 3 : if ( result != 0 && GetUseExceptions()) {
13251 0 : const char* pszMessage = CPLGetLastErrorMsg();
13252 0 : if( pszMessage[0] != '\0' )
13253 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13254 : else
13255 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13256 0 : SWIG_fail;
13257 : }
13258 : }
13259 3 : {
13260 : /* %typemap(ret) OGRErr */
13261 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13262 3 : resultobj = PyInt_FromLong( result );
13263 : }
13264 : }
13265 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; } }
13266 : return resultobj;
13267 : fail:
13268 : return NULL;
13269 : }
13270 :
13271 :
13272 4 : SWIGINTERN PyObject *_wrap_SpatialReference_HasTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13273 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13274 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13275 4 : void *argp1 = 0 ;
13276 4 : int res1 = 0 ;
13277 4 : PyObject *swig_obj[1] ;
13278 4 : bool result;
13279 :
13280 4 : if (!args) SWIG_fail;
13281 4 : swig_obj[0] = args;
13282 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13283 4 : if (!SWIG_IsOK(res1)) {
13284 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_HasTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13285 : }
13286 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13287 4 : {
13288 4 : const int bLocalUseExceptions = GetUseExceptions();
13289 4 : if ( bLocalUseExceptions ) {
13290 0 : pushErrorHandler();
13291 : }
13292 4 : result = (bool)OSRSpatialReferenceShadow_HasTOWGS84(arg1);
13293 4 : if ( bLocalUseExceptions ) {
13294 0 : popErrorHandler();
13295 : }
13296 : #ifndef SED_HACKS
13297 : if ( bLocalUseExceptions ) {
13298 : CPLErr eclass = CPLGetLastErrorType();
13299 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13300 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13301 : }
13302 : }
13303 : #endif
13304 : }
13305 4 : resultobj = SWIG_From_bool(static_cast< bool >(result));
13306 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; } }
13307 : return resultobj;
13308 : fail:
13309 : return NULL;
13310 : }
13311 :
13312 :
13313 4 : SWIGINTERN PyObject *_wrap_SpatialReference_GetTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13314 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13315 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13316 4 : double *arg2 ;
13317 4 : void *argp1 = 0 ;
13318 4 : int res1 = 0 ;
13319 4 : double argout2[7] ;
13320 4 : PyObject *swig_obj[1] ;
13321 4 : OGRErr result;
13322 :
13323 4 : {
13324 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
13325 4 : memset(argout2, 0, sizeof(argout2));
13326 4 : arg2 = argout2;
13327 : }
13328 4 : if (!args) SWIG_fail;
13329 4 : swig_obj[0] = args;
13330 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13331 4 : if (!SWIG_IsOK(res1)) {
13332 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13333 : }
13334 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13335 4 : {
13336 4 : const int bLocalUseExceptions = GetUseExceptions();
13337 4 : if ( bLocalUseExceptions ) {
13338 2 : pushErrorHandler();
13339 : }
13340 4 : result = (OGRErr)OSRSpatialReferenceShadow_GetTOWGS84(arg1,arg2);
13341 4 : if ( bLocalUseExceptions ) {
13342 2 : popErrorHandler();
13343 : }
13344 : #ifndef SED_HACKS
13345 : if ( bLocalUseExceptions ) {
13346 : CPLErr eclass = CPLGetLastErrorType();
13347 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13348 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13349 : }
13350 : }
13351 : #endif
13352 : }
13353 4 : {
13354 : /* %typemap(out) OGRErr */
13355 4 : if ( result != 0 && GetUseExceptions()) {
13356 0 : const char* pszMessage = CPLGetLastErrorMsg();
13357 0 : if( pszMessage[0] != '\0' )
13358 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13359 : else
13360 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13361 0 : SWIG_fail;
13362 : }
13363 : }
13364 4 : {
13365 : /* %typemap(argout) (double argout[ANY]) */
13366 4 : PyObject *out = CreateTupleFromDoubleArray( arg2, 7 );
13367 : #if SWIG_VERSION >= 0x040300
13368 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
13369 : #else
13370 4 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
13371 : #endif
13372 : }
13373 4 : {
13374 : /* %typemap(ret) OGRErr */
13375 8 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13376 0 : resultobj = PyInt_FromLong( result );
13377 : }
13378 : }
13379 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; } }
13380 : return resultobj;
13381 : fail:
13382 : return NULL;
13383 : }
13384 :
13385 :
13386 2 : SWIGINTERN PyObject *_wrap_SpatialReference_AddGuessedTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13387 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13388 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13389 2 : void *argp1 = 0 ;
13390 2 : int res1 = 0 ;
13391 2 : PyObject *swig_obj[1] ;
13392 2 : OGRErr result;
13393 :
13394 2 : if (!args) SWIG_fail;
13395 2 : swig_obj[0] = args;
13396 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13397 2 : if (!SWIG_IsOK(res1)) {
13398 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_AddGuessedTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13399 : }
13400 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13401 2 : {
13402 2 : const int bLocalUseExceptions = GetUseExceptions();
13403 2 : if ( bLocalUseExceptions ) {
13404 0 : pushErrorHandler();
13405 : }
13406 2 : result = (OGRErr)OSRSpatialReferenceShadow_AddGuessedTOWGS84(arg1);
13407 2 : if ( bLocalUseExceptions ) {
13408 0 : popErrorHandler();
13409 : }
13410 : #ifndef SED_HACKS
13411 : if ( bLocalUseExceptions ) {
13412 : CPLErr eclass = CPLGetLastErrorType();
13413 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13414 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13415 : }
13416 : }
13417 : #endif
13418 : }
13419 2 : {
13420 : /* %typemap(out) OGRErr */
13421 2 : if ( result != 0 && GetUseExceptions()) {
13422 0 : const char* pszMessage = CPLGetLastErrorMsg();
13423 0 : if( pszMessage[0] != '\0' )
13424 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13425 : else
13426 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13427 0 : SWIG_fail;
13428 : }
13429 : }
13430 2 : {
13431 : /* %typemap(ret) OGRErr */
13432 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13433 2 : resultobj = PyInt_FromLong( result );
13434 : }
13435 : }
13436 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; } }
13437 : return resultobj;
13438 : fail:
13439 : return NULL;
13440 : }
13441 :
13442 :
13443 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLocalCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13444 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13445 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13446 1 : char *arg2 = (char *) 0 ;
13447 1 : void *argp1 = 0 ;
13448 1 : int res1 = 0 ;
13449 1 : int res2 ;
13450 1 : char *buf2 = 0 ;
13451 1 : int alloc2 = 0 ;
13452 1 : PyObject *swig_obj[2] ;
13453 1 : OGRErr result;
13454 :
13455 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetLocalCS", 2, 2, swig_obj)) SWIG_fail;
13456 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13457 1 : if (!SWIG_IsOK(res1)) {
13458 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLocalCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13459 : }
13460 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13461 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13462 1 : if (!SWIG_IsOK(res2)) {
13463 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLocalCS" "', argument " "2"" of type '" "char const *""'");
13464 : }
13465 1 : arg2 = reinterpret_cast< char * >(buf2);
13466 1 : {
13467 1 : const int bLocalUseExceptions = GetUseExceptions();
13468 1 : if ( bLocalUseExceptions ) {
13469 1 : pushErrorHandler();
13470 : }
13471 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetLocalCS(arg1,(char const *)arg2);
13472 1 : if ( bLocalUseExceptions ) {
13473 1 : popErrorHandler();
13474 : }
13475 : #ifndef SED_HACKS
13476 : if ( bLocalUseExceptions ) {
13477 : CPLErr eclass = CPLGetLastErrorType();
13478 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13479 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13480 : }
13481 : }
13482 : #endif
13483 : }
13484 1 : {
13485 : /* %typemap(out) OGRErr */
13486 1 : if ( result != 0 && GetUseExceptions()) {
13487 0 : const char* pszMessage = CPLGetLastErrorMsg();
13488 0 : if( pszMessage[0] != '\0' )
13489 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13490 : else
13491 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13492 0 : SWIG_fail;
13493 : }
13494 : }
13495 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13496 1 : {
13497 : /* %typemap(ret) OGRErr */
13498 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13499 1 : resultobj = PyInt_FromLong( result );
13500 : }
13501 : }
13502 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; } }
13503 : return resultobj;
13504 0 : fail:
13505 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13506 : return NULL;
13507 : }
13508 :
13509 :
13510 17 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13511 17 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13512 17 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13513 17 : char *arg2 = (char *) 0 ;
13514 17 : char *arg3 = (char *) 0 ;
13515 17 : char *arg4 = (char *) 0 ;
13516 17 : double arg5 ;
13517 17 : double arg6 ;
13518 17 : char *arg7 = (char *) "Greenwich" ;
13519 17 : double arg8 = (double) 0.0 ;
13520 17 : char *arg9 = (char *) "degree" ;
13521 17 : double arg10 = (double) 0.0174532925199433 ;
13522 17 : void *argp1 = 0 ;
13523 17 : int res1 = 0 ;
13524 17 : int res2 ;
13525 17 : char *buf2 = 0 ;
13526 17 : int alloc2 = 0 ;
13527 17 : int res3 ;
13528 17 : char *buf3 = 0 ;
13529 17 : int alloc3 = 0 ;
13530 17 : int res4 ;
13531 17 : char *buf4 = 0 ;
13532 17 : int alloc4 = 0 ;
13533 17 : double val5 ;
13534 17 : int ecode5 = 0 ;
13535 17 : double val6 ;
13536 17 : int ecode6 = 0 ;
13537 17 : int res7 ;
13538 17 : char *buf7 = 0 ;
13539 17 : int alloc7 = 0 ;
13540 17 : double val8 ;
13541 17 : int ecode8 = 0 ;
13542 17 : int res9 ;
13543 17 : char *buf9 = 0 ;
13544 17 : int alloc9 = 0 ;
13545 17 : double val10 ;
13546 17 : int ecode10 = 0 ;
13547 17 : PyObject *swig_obj[10] ;
13548 17 : OGRErr result;
13549 :
13550 17 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetGeogCS", 6, 10, swig_obj)) SWIG_fail;
13551 17 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13552 17 : if (!SWIG_IsOK(res1)) {
13553 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13554 : }
13555 17 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13556 17 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13557 17 : if (!SWIG_IsOK(res2)) {
13558 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetGeogCS" "', argument " "2"" of type '" "char const *""'");
13559 : }
13560 17 : arg2 = reinterpret_cast< char * >(buf2);
13561 17 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
13562 17 : if (!SWIG_IsOK(res3)) {
13563 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetGeogCS" "', argument " "3"" of type '" "char const *""'");
13564 : }
13565 17 : arg3 = reinterpret_cast< char * >(buf3);
13566 17 : res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
13567 17 : if (!SWIG_IsOK(res4)) {
13568 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetGeogCS" "', argument " "4"" of type '" "char const *""'");
13569 : }
13570 17 : arg4 = reinterpret_cast< char * >(buf4);
13571 17 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
13572 17 : if (!SWIG_IsOK(ecode5)) {
13573 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGeogCS" "', argument " "5"" of type '" "double""'");
13574 : }
13575 17 : arg5 = static_cast< double >(val5);
13576 17 : ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
13577 17 : if (!SWIG_IsOK(ecode6)) {
13578 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetGeogCS" "', argument " "6"" of type '" "double""'");
13579 : }
13580 17 : arg6 = static_cast< double >(val6);
13581 17 : if (swig_obj[6]) {
13582 3 : res7 = SWIG_AsCharPtrAndSize(swig_obj[6], &buf7, NULL, &alloc7);
13583 3 : if (!SWIG_IsOK(res7)) {
13584 0 : SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "SpatialReference_SetGeogCS" "', argument " "7"" of type '" "char const *""'");
13585 : }
13586 3 : arg7 = reinterpret_cast< char * >(buf7);
13587 : }
13588 17 : if (swig_obj[7]) {
13589 3 : ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
13590 3 : if (!SWIG_IsOK(ecode8)) {
13591 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetGeogCS" "', argument " "8"" of type '" "double""'");
13592 : }
13593 3 : arg8 = static_cast< double >(val8);
13594 : }
13595 17 : if (swig_obj[8]) {
13596 3 : res9 = SWIG_AsCharPtrAndSize(swig_obj[8], &buf9, NULL, &alloc9);
13597 3 : if (!SWIG_IsOK(res9)) {
13598 0 : SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "SpatialReference_SetGeogCS" "', argument " "9"" of type '" "char const *""'");
13599 : }
13600 3 : arg9 = reinterpret_cast< char * >(buf9);
13601 : }
13602 17 : if (swig_obj[9]) {
13603 3 : ecode10 = SWIG_AsVal_double(swig_obj[9], &val10);
13604 3 : if (!SWIG_IsOK(ecode10)) {
13605 0 : SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "SpatialReference_SetGeogCS" "', argument " "10"" of type '" "double""'");
13606 : }
13607 3 : arg10 = static_cast< double >(val10);
13608 : }
13609 17 : {
13610 17 : const int bLocalUseExceptions = GetUseExceptions();
13611 17 : if ( bLocalUseExceptions ) {
13612 15 : pushErrorHandler();
13613 : }
13614 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);
13615 17 : if ( bLocalUseExceptions ) {
13616 15 : popErrorHandler();
13617 : }
13618 : #ifndef SED_HACKS
13619 : if ( bLocalUseExceptions ) {
13620 : CPLErr eclass = CPLGetLastErrorType();
13621 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13622 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13623 : }
13624 : }
13625 : #endif
13626 : }
13627 17 : {
13628 : /* %typemap(out) OGRErr */
13629 17 : if ( result != 0 && GetUseExceptions()) {
13630 0 : const char* pszMessage = CPLGetLastErrorMsg();
13631 0 : if( pszMessage[0] != '\0' )
13632 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13633 : else
13634 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13635 0 : SWIG_fail;
13636 : }
13637 : }
13638 17 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13639 17 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13640 17 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
13641 17 : if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
13642 17 : if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
13643 17 : {
13644 : /* %typemap(ret) OGRErr */
13645 17 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13646 17 : resultobj = PyInt_FromLong( result );
13647 : }
13648 : }
13649 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; } }
13650 : return resultobj;
13651 0 : fail:
13652 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13653 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13654 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
13655 0 : if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
13656 0 : if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
13657 : return NULL;
13658 : }
13659 :
13660 :
13661 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13662 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13663 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13664 1 : char *arg2 = (char *) "unnamed" ;
13665 1 : void *argp1 = 0 ;
13666 1 : int res1 = 0 ;
13667 1 : int res2 ;
13668 1 : char *buf2 = 0 ;
13669 1 : int alloc2 = 0 ;
13670 1 : PyObject *swig_obj[2] ;
13671 1 : OGRErr result;
13672 :
13673 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetProjCS", 1, 2, swig_obj)) SWIG_fail;
13674 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13675 1 : if (!SWIG_IsOK(res1)) {
13676 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13677 : }
13678 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13679 1 : if (swig_obj[1]) {
13680 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13681 1 : if (!SWIG_IsOK(res2)) {
13682 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjCS" "', argument " "2"" of type '" "char const *""'");
13683 : }
13684 1 : arg2 = reinterpret_cast< char * >(buf2);
13685 : }
13686 1 : {
13687 1 : if (!arg2) {
13688 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13689 : }
13690 : }
13691 1 : {
13692 1 : const int bLocalUseExceptions = GetUseExceptions();
13693 1 : if ( bLocalUseExceptions ) {
13694 1 : pushErrorHandler();
13695 : }
13696 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjCS(arg1,(char const *)arg2);
13697 1 : if ( bLocalUseExceptions ) {
13698 1 : popErrorHandler();
13699 : }
13700 : #ifndef SED_HACKS
13701 : if ( bLocalUseExceptions ) {
13702 : CPLErr eclass = CPLGetLastErrorType();
13703 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13704 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13705 : }
13706 : }
13707 : #endif
13708 : }
13709 1 : {
13710 : /* %typemap(out) OGRErr */
13711 1 : if ( result != 0 && GetUseExceptions()) {
13712 0 : const char* pszMessage = CPLGetLastErrorMsg();
13713 0 : if( pszMessage[0] != '\0' )
13714 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13715 : else
13716 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13717 0 : SWIG_fail;
13718 : }
13719 : }
13720 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13721 1 : {
13722 : /* %typemap(ret) OGRErr */
13723 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13724 1 : resultobj = PyInt_FromLong( result );
13725 : }
13726 : }
13727 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; } }
13728 : return resultobj;
13729 0 : fail:
13730 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13731 : return NULL;
13732 : }
13733 :
13734 :
13735 4 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGeocCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13736 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13737 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13738 4 : char *arg2 = (char *) "unnamed" ;
13739 4 : void *argp1 = 0 ;
13740 4 : int res1 = 0 ;
13741 4 : int res2 ;
13742 4 : char *buf2 = 0 ;
13743 4 : int alloc2 = 0 ;
13744 4 : PyObject *swig_obj[2] ;
13745 4 : OGRErr result;
13746 :
13747 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetGeocCS", 1, 2, swig_obj)) SWIG_fail;
13748 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13749 4 : if (!SWIG_IsOK(res1)) {
13750 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGeocCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13751 : }
13752 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13753 4 : if (swig_obj[1]) {
13754 4 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13755 4 : if (!SWIG_IsOK(res2)) {
13756 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetGeocCS" "', argument " "2"" of type '" "char const *""'");
13757 : }
13758 4 : arg2 = reinterpret_cast< char * >(buf2);
13759 : }
13760 4 : {
13761 4 : if (!arg2) {
13762 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13763 : }
13764 : }
13765 4 : {
13766 4 : const int bLocalUseExceptions = GetUseExceptions();
13767 4 : if ( bLocalUseExceptions ) {
13768 4 : pushErrorHandler();
13769 : }
13770 4 : result = (OGRErr)OSRSpatialReferenceShadow_SetGeocCS(arg1,(char const *)arg2);
13771 4 : if ( bLocalUseExceptions ) {
13772 4 : popErrorHandler();
13773 : }
13774 : #ifndef SED_HACKS
13775 : if ( bLocalUseExceptions ) {
13776 : CPLErr eclass = CPLGetLastErrorType();
13777 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13778 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13779 : }
13780 : }
13781 : #endif
13782 : }
13783 4 : {
13784 : /* %typemap(out) OGRErr */
13785 5 : if ( result != 0 && GetUseExceptions()) {
13786 1 : const char* pszMessage = CPLGetLastErrorMsg();
13787 1 : if( pszMessage[0] != '\0' )
13788 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13789 : else
13790 1 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13791 1 : SWIG_fail;
13792 : }
13793 : }
13794 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13795 3 : {
13796 : /* %typemap(ret) OGRErr */
13797 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13798 3 : resultobj = PyInt_FromLong( result );
13799 : }
13800 : }
13801 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; } }
13802 : return resultobj;
13803 1 : fail:
13804 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13805 : return NULL;
13806 : }
13807 :
13808 :
13809 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVertCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13810 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13811 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13812 0 : char *arg2 = (char *) "unnamed" ;
13813 0 : char *arg3 = (char *) "unnamed" ;
13814 0 : int arg4 = (int) 0 ;
13815 0 : void *argp1 = 0 ;
13816 0 : int res1 = 0 ;
13817 0 : int res2 ;
13818 0 : char *buf2 = 0 ;
13819 0 : int alloc2 = 0 ;
13820 0 : int res3 ;
13821 0 : char *buf3 = 0 ;
13822 0 : int alloc3 = 0 ;
13823 0 : int val4 ;
13824 0 : int ecode4 = 0 ;
13825 0 : PyObject *swig_obj[4] ;
13826 0 : OGRErr result;
13827 :
13828 0 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetVertCS", 1, 4, swig_obj)) SWIG_fail;
13829 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13830 0 : if (!SWIG_IsOK(res1)) {
13831 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13832 : }
13833 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13834 0 : if (swig_obj[1]) {
13835 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13836 0 : if (!SWIG_IsOK(res2)) {
13837 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetVertCS" "', argument " "2"" of type '" "char const *""'");
13838 : }
13839 0 : arg2 = reinterpret_cast< char * >(buf2);
13840 : }
13841 0 : if (swig_obj[2]) {
13842 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
13843 0 : if (!SWIG_IsOK(res3)) {
13844 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetVertCS" "', argument " "3"" of type '" "char const *""'");
13845 : }
13846 0 : arg3 = reinterpret_cast< char * >(buf3);
13847 : }
13848 0 : if (swig_obj[3]) {
13849 0 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
13850 0 : if (!SWIG_IsOK(ecode4)) {
13851 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVertCS" "', argument " "4"" of type '" "int""'");
13852 : }
13853 : arg4 = static_cast< int >(val4);
13854 : }
13855 0 : {
13856 0 : const int bLocalUseExceptions = GetUseExceptions();
13857 0 : if ( bLocalUseExceptions ) {
13858 0 : pushErrorHandler();
13859 : }
13860 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetVertCS(arg1,(char const *)arg2,(char const *)arg3,arg4);
13861 0 : if ( bLocalUseExceptions ) {
13862 0 : popErrorHandler();
13863 : }
13864 : #ifndef SED_HACKS
13865 : if ( bLocalUseExceptions ) {
13866 : CPLErr eclass = CPLGetLastErrorType();
13867 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13868 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13869 : }
13870 : }
13871 : #endif
13872 : }
13873 0 : {
13874 : /* %typemap(out) OGRErr */
13875 0 : if ( result != 0 && GetUseExceptions()) {
13876 0 : const char* pszMessage = CPLGetLastErrorMsg();
13877 0 : if( pszMessage[0] != '\0' )
13878 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13879 : else
13880 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13881 0 : SWIG_fail;
13882 : }
13883 : }
13884 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13885 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13886 0 : {
13887 : /* %typemap(ret) OGRErr */
13888 0 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13889 0 : resultobj = PyInt_FromLong( result );
13890 : }
13891 : }
13892 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; } }
13893 : return resultobj;
13894 0 : fail:
13895 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13896 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
13897 : return NULL;
13898 : }
13899 :
13900 :
13901 8 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCompoundCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13902 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
13903 8 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
13904 8 : char *arg2 = (char *) 0 ;
13905 8 : OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) 0 ;
13906 8 : OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
13907 8 : void *argp1 = 0 ;
13908 8 : int res1 = 0 ;
13909 8 : int res2 ;
13910 8 : char *buf2 = 0 ;
13911 8 : int alloc2 = 0 ;
13912 8 : void *argp3 = 0 ;
13913 8 : int res3 = 0 ;
13914 8 : void *argp4 = 0 ;
13915 8 : int res4 = 0 ;
13916 8 : PyObject *swig_obj[4] ;
13917 8 : OGRErr result;
13918 :
13919 8 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_SetCompoundCS", 4, 4, swig_obj)) SWIG_fail;
13920 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13921 8 : if (!SWIG_IsOK(res1)) {
13922 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCompoundCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
13923 : }
13924 8 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
13925 8 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
13926 8 : if (!SWIG_IsOK(res2)) {
13927 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetCompoundCS" "', argument " "2"" of type '" "char const *""'");
13928 : }
13929 8 : arg2 = reinterpret_cast< char * >(buf2);
13930 8 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13931 8 : if (!SWIG_IsOK(res3)) {
13932 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetCompoundCS" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'");
13933 : }
13934 8 : arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
13935 8 : res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
13936 8 : if (!SWIG_IsOK(res4)) {
13937 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetCompoundCS" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'");
13938 : }
13939 8 : arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
13940 8 : {
13941 8 : if (!arg2) {
13942 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13943 : }
13944 : }
13945 8 : {
13946 8 : if (!arg3) {
13947 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13948 : }
13949 : }
13950 8 : {
13951 8 : if (!arg4) {
13952 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
13953 : }
13954 : }
13955 8 : {
13956 8 : const int bLocalUseExceptions = GetUseExceptions();
13957 8 : if ( bLocalUseExceptions ) {
13958 8 : pushErrorHandler();
13959 : }
13960 8 : result = (OGRErr)OSRSpatialReferenceShadow_SetCompoundCS(arg1,(char const *)arg2,arg3,arg4);
13961 8 : if ( bLocalUseExceptions ) {
13962 8 : popErrorHandler();
13963 : }
13964 : #ifndef SED_HACKS
13965 : if ( bLocalUseExceptions ) {
13966 : CPLErr eclass = CPLGetLastErrorType();
13967 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
13968 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
13969 : }
13970 : }
13971 : #endif
13972 : }
13973 8 : {
13974 : /* %typemap(out) OGRErr */
13975 8 : if ( result != 0 && GetUseExceptions()) {
13976 0 : const char* pszMessage = CPLGetLastErrorMsg();
13977 0 : if( pszMessage[0] != '\0' )
13978 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
13979 : else
13980 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
13981 0 : SWIG_fail;
13982 : }
13983 : }
13984 8 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13985 8 : {
13986 : /* %typemap(ret) OGRErr */
13987 8 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
13988 8 : resultobj = PyInt_FromLong( result );
13989 : }
13990 : }
13991 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; } }
13992 : return resultobj;
13993 0 : fail:
13994 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
13995 : return NULL;
13996 : }
13997 :
13998 :
13999 285 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14000 285 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14001 285 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14002 285 : char **arg2 = (char **) 0 ;
14003 285 : void *argp1 = 0 ;
14004 285 : int res1 = 0 ;
14005 285 : char *val2 ;
14006 285 : PyObject *swig_obj[2] ;
14007 285 : OGRErr result;
14008 :
14009 285 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromWkt", 2, 2, swig_obj)) SWIG_fail;
14010 285 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14011 285 : if (!SWIG_IsOK(res1)) {
14012 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14013 : }
14014 285 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14015 285 : {
14016 : /* %typemap(in) (char **ignorechange) */
14017 285 : if( !PyArg_Parse( swig_obj[1], "s", &val2 ) ) {
14018 0 : PyErr_SetString( PyExc_TypeError, "not a string" );
14019 0 : SWIG_fail;
14020 : }
14021 285 : arg2 = &val2;
14022 : }
14023 285 : {
14024 285 : const int bLocalUseExceptions = GetUseExceptions();
14025 285 : if ( bLocalUseExceptions ) {
14026 180 : pushErrorHandler();
14027 : }
14028 285 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromWkt(arg1,arg2);
14029 285 : if ( bLocalUseExceptions ) {
14030 180 : popErrorHandler();
14031 : }
14032 : #ifndef SED_HACKS
14033 : if ( bLocalUseExceptions ) {
14034 : CPLErr eclass = CPLGetLastErrorType();
14035 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14036 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14037 : }
14038 : }
14039 : #endif
14040 : }
14041 285 : {
14042 : /* %typemap(out) OGRErr */
14043 320 : if ( result != 0 && GetUseExceptions()) {
14044 0 : const char* pszMessage = CPLGetLastErrorMsg();
14045 0 : if( pszMessage[0] != '\0' )
14046 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14047 : else
14048 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14049 0 : SWIG_fail;
14050 : }
14051 : }
14052 285 : {
14053 : /* %typemap(ret) OGRErr */
14054 285 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14055 285 : resultobj = PyInt_FromLong( result );
14056 : }
14057 : }
14058 285 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14059 : return resultobj;
14060 : fail:
14061 : return NULL;
14062 : }
14063 :
14064 :
14065 179 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromProj4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14066 179 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14067 179 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14068 179 : char *arg2 = (char *) 0 ;
14069 179 : void *argp1 = 0 ;
14070 179 : int res1 = 0 ;
14071 179 : int res2 ;
14072 179 : char *buf2 = 0 ;
14073 179 : int alloc2 = 0 ;
14074 179 : PyObject *swig_obj[2] ;
14075 179 : OGRErr result;
14076 :
14077 179 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromProj4", 2, 2, swig_obj)) SWIG_fail;
14078 179 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14079 179 : if (!SWIG_IsOK(res1)) {
14080 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromProj4" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14081 : }
14082 179 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14083 179 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14084 179 : if (!SWIG_IsOK(res2)) {
14085 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromProj4" "', argument " "2"" of type '" "char *""'");
14086 : }
14087 179 : arg2 = reinterpret_cast< char * >(buf2);
14088 179 : {
14089 179 : const int bLocalUseExceptions = GetUseExceptions();
14090 179 : if ( bLocalUseExceptions ) {
14091 150 : pushErrorHandler();
14092 : }
14093 179 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromProj4(arg1,arg2);
14094 179 : if ( bLocalUseExceptions ) {
14095 150 : popErrorHandler();
14096 : }
14097 : #ifndef SED_HACKS
14098 : if ( bLocalUseExceptions ) {
14099 : CPLErr eclass = CPLGetLastErrorType();
14100 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14101 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14102 : }
14103 : }
14104 : #endif
14105 : }
14106 179 : {
14107 : /* %typemap(out) OGRErr */
14108 184 : if ( result != 0 && GetUseExceptions()) {
14109 5 : const char* pszMessage = CPLGetLastErrorMsg();
14110 5 : if( pszMessage[0] != '\0' )
14111 5 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14112 : else
14113 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14114 5 : SWIG_fail;
14115 : }
14116 : }
14117 174 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14118 174 : {
14119 : /* %typemap(ret) OGRErr */
14120 174 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14121 174 : resultobj = PyInt_FromLong( result );
14122 : }
14123 : }
14124 179 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14125 : return resultobj;
14126 5 : fail:
14127 5 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14128 : return NULL;
14129 : }
14130 :
14131 :
14132 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromUrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14133 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14134 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14135 3 : char *arg2 = (char *) 0 ;
14136 3 : void *argp1 = 0 ;
14137 3 : int res1 = 0 ;
14138 3 : int res2 ;
14139 3 : char *buf2 = 0 ;
14140 3 : int alloc2 = 0 ;
14141 3 : PyObject *swig_obj[2] ;
14142 3 : OGRErr result;
14143 :
14144 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromUrl", 2, 2, swig_obj)) SWIG_fail;
14145 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14146 3 : if (!SWIG_IsOK(res1)) {
14147 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromUrl" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14148 : }
14149 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14150 3 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14151 3 : if (!SWIG_IsOK(res2)) {
14152 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromUrl" "', argument " "2"" of type '" "char *""'");
14153 : }
14154 3 : arg2 = reinterpret_cast< char * >(buf2);
14155 3 : {
14156 3 : if (!arg2) {
14157 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14158 : }
14159 : }
14160 3 : {
14161 3 : const int bLocalUseExceptions = GetUseExceptions();
14162 3 : if ( bLocalUseExceptions ) {
14163 3 : pushErrorHandler();
14164 : }
14165 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUrl(arg1,arg2);
14166 3 : if ( bLocalUseExceptions ) {
14167 3 : popErrorHandler();
14168 : }
14169 : #ifndef SED_HACKS
14170 : if ( bLocalUseExceptions ) {
14171 : CPLErr eclass = CPLGetLastErrorType();
14172 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14173 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14174 : }
14175 : }
14176 : #endif
14177 : }
14178 3 : {
14179 : /* %typemap(out) OGRErr */
14180 3 : if ( result != 0 && GetUseExceptions()) {
14181 0 : const char* pszMessage = CPLGetLastErrorMsg();
14182 0 : if( pszMessage[0] != '\0' )
14183 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14184 : else
14185 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14186 0 : SWIG_fail;
14187 : }
14188 : }
14189 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14190 3 : {
14191 : /* %typemap(ret) OGRErr */
14192 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14193 3 : resultobj = PyInt_FromLong( result );
14194 : }
14195 : }
14196 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; } }
14197 : return resultobj;
14198 0 : fail:
14199 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14200 : return NULL;
14201 : }
14202 :
14203 :
14204 11 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14205 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14206 11 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14207 11 : char **arg2 = (char **) 0 ;
14208 11 : void *argp1 = 0 ;
14209 11 : int res1 = 0 ;
14210 11 : PyObject *swig_obj[2] ;
14211 11 : OGRErr result;
14212 :
14213 11 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromESRI", 2, 2, swig_obj)) SWIG_fail;
14214 11 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14215 11 : if (!SWIG_IsOK(res1)) {
14216 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14217 : }
14218 11 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14219 11 : {
14220 : /* %typemap(in) char **dict */
14221 11 : arg2 = NULL;
14222 11 : if ( PySequence_Check( swig_obj[1] ) ) {
14223 11 : int bErr = FALSE;
14224 11 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
14225 11 : if ( bErr )
14226 : {
14227 0 : SWIG_fail;
14228 : }
14229 : }
14230 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
14231 0 : int bErr = FALSE;
14232 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
14233 0 : if ( bErr )
14234 : {
14235 0 : SWIG_fail;
14236 : }
14237 : }
14238 : else {
14239 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
14240 0 : SWIG_fail;
14241 : }
14242 : }
14243 11 : {
14244 11 : const int bLocalUseExceptions = GetUseExceptions();
14245 11 : if ( bLocalUseExceptions ) {
14246 11 : pushErrorHandler();
14247 : }
14248 11 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromESRI(arg1,arg2);
14249 11 : if ( bLocalUseExceptions ) {
14250 11 : popErrorHandler();
14251 : }
14252 : #ifndef SED_HACKS
14253 : if ( bLocalUseExceptions ) {
14254 : CPLErr eclass = CPLGetLastErrorType();
14255 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14256 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14257 : }
14258 : }
14259 : #endif
14260 : }
14261 11 : {
14262 : /* %typemap(out) OGRErr */
14263 12 : if ( result != 0 && GetUseExceptions()) {
14264 1 : const char* pszMessage = CPLGetLastErrorMsg();
14265 1 : if( pszMessage[0] != '\0' )
14266 1 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14267 : else
14268 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14269 1 : SWIG_fail;
14270 : }
14271 : }
14272 10 : {
14273 : /* %typemap(freearg) char **dict */
14274 10 : CSLDestroy( arg2 );
14275 : }
14276 10 : {
14277 : /* %typemap(ret) OGRErr */
14278 10 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14279 10 : resultobj = PyInt_FromLong( result );
14280 : }
14281 : }
14282 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; } }
14283 : return resultobj;
14284 1 : fail:
14285 1 : {
14286 : /* %typemap(freearg) char **dict */
14287 1 : CSLDestroy( arg2 );
14288 : }
14289 : return NULL;
14290 : }
14291 :
14292 :
14293 945 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromEPSG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14294 945 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14295 945 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14296 945 : int arg2 ;
14297 945 : void *argp1 = 0 ;
14298 945 : int res1 = 0 ;
14299 945 : int val2 ;
14300 945 : int ecode2 = 0 ;
14301 945 : PyObject *swig_obj[2] ;
14302 945 : OGRErr result;
14303 :
14304 945 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromEPSG", 2, 2, swig_obj)) SWIG_fail;
14305 945 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14306 945 : if (!SWIG_IsOK(res1)) {
14307 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromEPSG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14308 : }
14309 945 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14310 945 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14311 945 : if (!SWIG_IsOK(ecode2)) {
14312 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromEPSG" "', argument " "2"" of type '" "int""'");
14313 : }
14314 945 : arg2 = static_cast< int >(val2);
14315 945 : {
14316 945 : const int bLocalUseExceptions = GetUseExceptions();
14317 945 : if ( bLocalUseExceptions ) {
14318 626 : pushErrorHandler();
14319 : }
14320 945 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSG(arg1,arg2);
14321 945 : if ( bLocalUseExceptions ) {
14322 626 : popErrorHandler();
14323 : }
14324 : #ifndef SED_HACKS
14325 : if ( bLocalUseExceptions ) {
14326 : CPLErr eclass = CPLGetLastErrorType();
14327 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14328 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14329 : }
14330 : }
14331 : #endif
14332 : }
14333 945 : {
14334 : /* %typemap(out) OGRErr */
14335 950 : if ( result != 0 && GetUseExceptions()) {
14336 5 : const char* pszMessage = CPLGetLastErrorMsg();
14337 5 : if( pszMessage[0] != '\0' )
14338 5 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14339 : else
14340 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14341 5 : SWIG_fail;
14342 : }
14343 : }
14344 940 : {
14345 : /* %typemap(ret) OGRErr */
14346 940 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14347 940 : resultobj = PyInt_FromLong( result );
14348 : }
14349 : }
14350 945 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
14351 : return resultobj;
14352 : fail:
14353 : return NULL;
14354 : }
14355 :
14356 :
14357 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromEPSGA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14358 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14359 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14360 2 : int arg2 ;
14361 2 : void *argp1 = 0 ;
14362 2 : int res1 = 0 ;
14363 2 : int val2 ;
14364 2 : int ecode2 = 0 ;
14365 2 : PyObject *swig_obj[2] ;
14366 2 : OGRErr result;
14367 :
14368 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromEPSGA", 2, 2, swig_obj)) SWIG_fail;
14369 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14370 2 : if (!SWIG_IsOK(res1)) {
14371 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromEPSGA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14372 : }
14373 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14374 2 : ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
14375 2 : if (!SWIG_IsOK(ecode2)) {
14376 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromEPSGA" "', argument " "2"" of type '" "int""'");
14377 : }
14378 2 : arg2 = static_cast< int >(val2);
14379 2 : {
14380 2 : const int bLocalUseExceptions = GetUseExceptions();
14381 2 : if ( bLocalUseExceptions ) {
14382 2 : pushErrorHandler();
14383 : }
14384 2 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSGA(arg1,arg2);
14385 2 : if ( bLocalUseExceptions ) {
14386 2 : popErrorHandler();
14387 : }
14388 : #ifndef SED_HACKS
14389 : if ( bLocalUseExceptions ) {
14390 : CPLErr eclass = CPLGetLastErrorType();
14391 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14392 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14393 : }
14394 : }
14395 : #endif
14396 : }
14397 2 : {
14398 : /* %typemap(out) OGRErr */
14399 2 : if ( result != 0 && GetUseExceptions()) {
14400 0 : const char* pszMessage = CPLGetLastErrorMsg();
14401 0 : if( pszMessage[0] != '\0' )
14402 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14403 : else
14404 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14405 0 : SWIG_fail;
14406 : }
14407 : }
14408 2 : {
14409 : /* %typemap(ret) OGRErr */
14410 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14411 2 : resultobj = PyInt_FromLong( result );
14412 : }
14413 : }
14414 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; } }
14415 : return resultobj;
14416 : fail:
14417 : return NULL;
14418 : }
14419 :
14420 :
14421 7 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromPCI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14422 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14423 7 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14424 7 : char *arg2 = (char *) 0 ;
14425 7 : char *arg3 = (char *) "METRE" ;
14426 7 : double *arg4 = (double *) (double *)0 ;
14427 7 : void *argp1 = 0 ;
14428 7 : int res1 = 0 ;
14429 7 : int res2 ;
14430 7 : char *buf2 = 0 ;
14431 7 : int alloc2 = 0 ;
14432 7 : int res3 ;
14433 7 : char *buf3 = 0 ;
14434 7 : int alloc3 = 0 ;
14435 7 : double argin4[17] ;
14436 7 : PyObject *swig_obj[4] ;
14437 7 : OGRErr result;
14438 :
14439 7 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromPCI", 2, 4, swig_obj)) SWIG_fail;
14440 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14441 7 : if (!SWIG_IsOK(res1)) {
14442 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromPCI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14443 : }
14444 7 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14445 7 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14446 7 : if (!SWIG_IsOK(res2)) {
14447 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromPCI" "', argument " "2"" of type '" "char const *""'");
14448 : }
14449 7 : arg2 = reinterpret_cast< char * >(buf2);
14450 7 : if (swig_obj[2]) {
14451 7 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
14452 7 : if (!SWIG_IsOK(res3)) {
14453 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromPCI" "', argument " "3"" of type '" "char const *""'");
14454 : }
14455 7 : arg3 = reinterpret_cast< char * >(buf3);
14456 : }
14457 7 : if (swig_obj[3]) {
14458 7 : {
14459 : /* %typemap(in) (double argin4[ANY]) */
14460 7 : arg4 = argin4;
14461 7 : if (! PySequence_Check(swig_obj[3]) ) {
14462 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
14463 0 : SWIG_fail;
14464 : }
14465 7 : Py_ssize_t seq_size = PySequence_Size(swig_obj[3]);
14466 7 : if ( seq_size != 17 ) {
14467 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
14468 0 : SWIG_fail;
14469 : }
14470 126 : for (unsigned int i=0; i<17; i++) {
14471 119 : PyObject *o = PySequence_GetItem(swig_obj[3],i);
14472 119 : double val;
14473 119 : if ( !PyArg_Parse(o, "d", &val ) ) {
14474 0 : PyErr_SetString(PyExc_TypeError, "not a number");
14475 0 : Py_DECREF(o);
14476 0 : SWIG_fail;
14477 : }
14478 119 : arg4[i] = val;
14479 119 : Py_DECREF(o);
14480 : }
14481 : }
14482 : }
14483 7 : {
14484 7 : const int bLocalUseExceptions = GetUseExceptions();
14485 7 : if ( bLocalUseExceptions ) {
14486 7 : pushErrorHandler();
14487 : }
14488 7 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromPCI(arg1,(char const *)arg2,(char const *)arg3,arg4);
14489 7 : if ( bLocalUseExceptions ) {
14490 7 : popErrorHandler();
14491 : }
14492 : #ifndef SED_HACKS
14493 : if ( bLocalUseExceptions ) {
14494 : CPLErr eclass = CPLGetLastErrorType();
14495 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14496 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14497 : }
14498 : }
14499 : #endif
14500 : }
14501 7 : {
14502 : /* %typemap(out) OGRErr */
14503 7 : if ( result != 0 && GetUseExceptions()) {
14504 0 : const char* pszMessage = CPLGetLastErrorMsg();
14505 0 : if( pszMessage[0] != '\0' )
14506 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14507 : else
14508 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14509 0 : SWIG_fail;
14510 : }
14511 : }
14512 7 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14513 7 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14514 7 : {
14515 : /* %typemap(ret) OGRErr */
14516 7 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14517 7 : resultobj = PyInt_FromLong( result );
14518 : }
14519 : }
14520 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; } }
14521 : return resultobj;
14522 0 : fail:
14523 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14524 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14525 : return NULL;
14526 : }
14527 :
14528 :
14529 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromUSGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14530 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14531 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14532 2 : long arg2 ;
14533 2 : long arg3 = (long) 0 ;
14534 2 : double *arg4 = (double *) (double *)0 ;
14535 2 : long arg5 = (long) 0 ;
14536 2 : void *argp1 = 0 ;
14537 2 : int res1 = 0 ;
14538 2 : long val2 ;
14539 2 : int ecode2 = 0 ;
14540 2 : long val3 ;
14541 2 : int ecode3 = 0 ;
14542 2 : double argin4[15] ;
14543 2 : long val5 ;
14544 2 : int ecode5 = 0 ;
14545 2 : PyObject *swig_obj[5] ;
14546 2 : OGRErr result;
14547 :
14548 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromUSGS", 2, 5, swig_obj)) SWIG_fail;
14549 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14550 2 : if (!SWIG_IsOK(res1)) {
14551 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14552 : }
14553 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14554 2 : ecode2 = SWIG_AsVal_long(swig_obj[1], &val2);
14555 2 : if (!SWIG_IsOK(ecode2)) {
14556 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "2"" of type '" "long""'");
14557 : }
14558 2 : arg2 = static_cast< long >(val2);
14559 2 : if (swig_obj[2]) {
14560 2 : ecode3 = SWIG_AsVal_long(swig_obj[2], &val3);
14561 2 : if (!SWIG_IsOK(ecode3)) {
14562 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "3"" of type '" "long""'");
14563 : }
14564 2 : arg3 = static_cast< long >(val3);
14565 : }
14566 2 : if (swig_obj[3]) {
14567 2 : {
14568 : /* %typemap(in) (double argin4[ANY]) */
14569 2 : arg4 = argin4;
14570 2 : if (! PySequence_Check(swig_obj[3]) ) {
14571 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
14572 0 : SWIG_fail;
14573 : }
14574 2 : Py_ssize_t seq_size = PySequence_Size(swig_obj[3]);
14575 2 : if ( seq_size != 15 ) {
14576 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
14577 0 : SWIG_fail;
14578 : }
14579 32 : for (unsigned int i=0; i<15; i++) {
14580 30 : PyObject *o = PySequence_GetItem(swig_obj[3],i);
14581 30 : double val;
14582 30 : if ( !PyArg_Parse(o, "d", &val ) ) {
14583 0 : PyErr_SetString(PyExc_TypeError, "not a number");
14584 0 : Py_DECREF(o);
14585 0 : SWIG_fail;
14586 : }
14587 30 : arg4[i] = val;
14588 30 : Py_DECREF(o);
14589 : }
14590 : }
14591 : }
14592 2 : if (swig_obj[4]) {
14593 2 : ecode5 = SWIG_AsVal_long(swig_obj[4], &val5);
14594 2 : if (!SWIG_IsOK(ecode5)) {
14595 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "5"" of type '" "long""'");
14596 : }
14597 2 : arg5 = static_cast< long >(val5);
14598 : }
14599 2 : {
14600 2 : const int bLocalUseExceptions = GetUseExceptions();
14601 2 : if ( bLocalUseExceptions ) {
14602 2 : pushErrorHandler();
14603 : }
14604 2 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUSGS(arg1,arg2,arg3,arg4,arg5);
14605 2 : if ( bLocalUseExceptions ) {
14606 2 : popErrorHandler();
14607 : }
14608 : #ifndef SED_HACKS
14609 : if ( bLocalUseExceptions ) {
14610 : CPLErr eclass = CPLGetLastErrorType();
14611 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14612 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14613 : }
14614 : }
14615 : #endif
14616 : }
14617 2 : {
14618 : /* %typemap(out) OGRErr */
14619 2 : if ( result != 0 && GetUseExceptions()) {
14620 0 : const char* pszMessage = CPLGetLastErrorMsg();
14621 0 : if( pszMessage[0] != '\0' )
14622 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14623 : else
14624 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14625 0 : SWIG_fail;
14626 : }
14627 : }
14628 2 : {
14629 : /* %typemap(ret) OGRErr */
14630 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14631 2 : resultobj = PyInt_FromLong( result );
14632 : }
14633 : }
14634 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; } }
14635 : return resultobj;
14636 : fail:
14637 : return NULL;
14638 : }
14639 :
14640 :
14641 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromXML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14642 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14643 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14644 1 : char *arg2 = (char *) 0 ;
14645 1 : void *argp1 = 0 ;
14646 1 : int res1 = 0 ;
14647 1 : int res2 ;
14648 1 : char *buf2 = 0 ;
14649 1 : int alloc2 = 0 ;
14650 1 : PyObject *swig_obj[2] ;
14651 1 : OGRErr result;
14652 :
14653 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromXML", 2, 2, swig_obj)) SWIG_fail;
14654 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14655 1 : if (!SWIG_IsOK(res1)) {
14656 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromXML" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14657 : }
14658 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14659 1 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14660 1 : if (!SWIG_IsOK(res2)) {
14661 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromXML" "', argument " "2"" of type '" "char const *""'");
14662 : }
14663 1 : arg2 = reinterpret_cast< char * >(buf2);
14664 1 : {
14665 1 : const int bLocalUseExceptions = GetUseExceptions();
14666 1 : if ( bLocalUseExceptions ) {
14667 1 : pushErrorHandler();
14668 : }
14669 1 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromXML(arg1,(char const *)arg2);
14670 1 : if ( bLocalUseExceptions ) {
14671 1 : popErrorHandler();
14672 : }
14673 : #ifndef SED_HACKS
14674 : if ( bLocalUseExceptions ) {
14675 : CPLErr eclass = CPLGetLastErrorType();
14676 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14677 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14678 : }
14679 : }
14680 : #endif
14681 : }
14682 1 : {
14683 : /* %typemap(out) OGRErr */
14684 1 : if ( result != 0 && GetUseExceptions()) {
14685 0 : const char* pszMessage = CPLGetLastErrorMsg();
14686 0 : if( pszMessage[0] != '\0' )
14687 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14688 : else
14689 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14690 0 : SWIG_fail;
14691 : }
14692 : }
14693 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14694 1 : {
14695 : /* %typemap(ret) OGRErr */
14696 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14697 1 : resultobj = PyInt_FromLong( result );
14698 : }
14699 : }
14700 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; } }
14701 : return resultobj;
14702 0 : fail:
14703 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14704 : return NULL;
14705 : }
14706 :
14707 :
14708 7 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromERM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14709 7 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14710 7 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14711 7 : char *arg2 = (char *) 0 ;
14712 7 : char *arg3 = (char *) 0 ;
14713 7 : char *arg4 = (char *) 0 ;
14714 7 : void *argp1 = 0 ;
14715 7 : int res1 = 0 ;
14716 7 : int res2 ;
14717 7 : char *buf2 = 0 ;
14718 7 : int alloc2 = 0 ;
14719 7 : int res3 ;
14720 7 : char *buf3 = 0 ;
14721 7 : int alloc3 = 0 ;
14722 7 : int res4 ;
14723 7 : char *buf4 = 0 ;
14724 7 : int alloc4 = 0 ;
14725 7 : PyObject *swig_obj[4] ;
14726 7 : OGRErr result;
14727 :
14728 7 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromERM", 4, 4, swig_obj)) SWIG_fail;
14729 7 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14730 7 : if (!SWIG_IsOK(res1)) {
14731 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromERM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14732 : }
14733 7 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14734 7 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14735 7 : if (!SWIG_IsOK(res2)) {
14736 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromERM" "', argument " "2"" of type '" "char const *""'");
14737 : }
14738 7 : arg2 = reinterpret_cast< char * >(buf2);
14739 7 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
14740 7 : if (!SWIG_IsOK(res3)) {
14741 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromERM" "', argument " "3"" of type '" "char const *""'");
14742 : }
14743 7 : arg3 = reinterpret_cast< char * >(buf3);
14744 7 : res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
14745 7 : if (!SWIG_IsOK(res4)) {
14746 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_ImportFromERM" "', argument " "4"" of type '" "char const *""'");
14747 : }
14748 7 : arg4 = reinterpret_cast< char * >(buf4);
14749 7 : {
14750 7 : if (!arg2) {
14751 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14752 : }
14753 : }
14754 7 : {
14755 7 : if (!arg3) {
14756 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14757 : }
14758 : }
14759 7 : {
14760 7 : const int bLocalUseExceptions = GetUseExceptions();
14761 7 : if ( bLocalUseExceptions ) {
14762 7 : pushErrorHandler();
14763 : }
14764 7 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromERM(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
14765 7 : if ( bLocalUseExceptions ) {
14766 7 : popErrorHandler();
14767 : }
14768 : #ifndef SED_HACKS
14769 : if ( bLocalUseExceptions ) {
14770 : CPLErr eclass = CPLGetLastErrorType();
14771 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14772 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14773 : }
14774 : }
14775 : #endif
14776 : }
14777 7 : {
14778 : /* %typemap(out) OGRErr */
14779 7 : if ( result != 0 && GetUseExceptions()) {
14780 0 : const char* pszMessage = CPLGetLastErrorMsg();
14781 0 : if( pszMessage[0] != '\0' )
14782 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14783 : else
14784 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14785 0 : SWIG_fail;
14786 : }
14787 : }
14788 7 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14789 7 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14790 7 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
14791 7 : {
14792 : /* %typemap(ret) OGRErr */
14793 7 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14794 7 : resultobj = PyInt_FromLong( result );
14795 : }
14796 : }
14797 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; } }
14798 : return resultobj;
14799 0 : fail:
14800 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14801 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
14802 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
14803 : return NULL;
14804 : }
14805 :
14806 :
14807 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromMICoordSys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14808 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14809 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14810 3 : char *arg2 = (char *) 0 ;
14811 3 : void *argp1 = 0 ;
14812 3 : int res1 = 0 ;
14813 3 : int res2 ;
14814 3 : char *buf2 = 0 ;
14815 3 : int alloc2 = 0 ;
14816 3 : PyObject *swig_obj[2] ;
14817 3 : OGRErr result;
14818 :
14819 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromMICoordSys", 2, 2, swig_obj)) SWIG_fail;
14820 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14821 3 : if (!SWIG_IsOK(res1)) {
14822 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromMICoordSys" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14823 : }
14824 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14825 3 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
14826 3 : if (!SWIG_IsOK(res2)) {
14827 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromMICoordSys" "', argument " "2"" of type '" "char const *""'");
14828 : }
14829 3 : arg2 = reinterpret_cast< char * >(buf2);
14830 3 : {
14831 3 : const int bLocalUseExceptions = GetUseExceptions();
14832 3 : if ( bLocalUseExceptions ) {
14833 2 : pushErrorHandler();
14834 : }
14835 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromMICoordSys(arg1,(char const *)arg2);
14836 3 : if ( bLocalUseExceptions ) {
14837 2 : popErrorHandler();
14838 : }
14839 : #ifndef SED_HACKS
14840 : if ( bLocalUseExceptions ) {
14841 : CPLErr eclass = CPLGetLastErrorType();
14842 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14843 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14844 : }
14845 : }
14846 : #endif
14847 : }
14848 3 : {
14849 : /* %typemap(out) OGRErr */
14850 3 : if ( result != 0 && GetUseExceptions()) {
14851 0 : const char* pszMessage = CPLGetLastErrorMsg();
14852 0 : if( pszMessage[0] != '\0' )
14853 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14854 : else
14855 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14856 0 : SWIG_fail;
14857 : }
14858 : }
14859 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14860 3 : {
14861 : /* %typemap(ret) OGRErr */
14862 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14863 3 : resultobj = PyInt_FromLong( result );
14864 : }
14865 : }
14866 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; } }
14867 : return resultobj;
14868 0 : fail:
14869 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
14870 : return NULL;
14871 : }
14872 :
14873 :
14874 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromOzi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14875 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14876 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14877 3 : char **arg2 = (char **) 0 ;
14878 3 : void *argp1 = 0 ;
14879 3 : int res1 = 0 ;
14880 3 : PyObject *swig_obj[2] ;
14881 3 : OGRErr result;
14882 :
14883 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromOzi", 2, 2, swig_obj)) SWIG_fail;
14884 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14885 3 : if (!SWIG_IsOK(res1)) {
14886 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromOzi" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14887 : }
14888 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14889 3 : {
14890 : /* %typemap(in) char **dict */
14891 3 : arg2 = NULL;
14892 3 : if ( PySequence_Check( swig_obj[1] ) ) {
14893 3 : int bErr = FALSE;
14894 3 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
14895 3 : if ( bErr )
14896 : {
14897 0 : SWIG_fail;
14898 : }
14899 : }
14900 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
14901 0 : int bErr = FALSE;
14902 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
14903 0 : if ( bErr )
14904 : {
14905 0 : SWIG_fail;
14906 : }
14907 : }
14908 : else {
14909 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
14910 0 : SWIG_fail;
14911 : }
14912 : }
14913 3 : {
14914 3 : if (!arg2) {
14915 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
14916 : }
14917 : }
14918 3 : {
14919 3 : const int bLocalUseExceptions = GetUseExceptions();
14920 3 : if ( bLocalUseExceptions ) {
14921 3 : pushErrorHandler();
14922 : }
14923 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromOzi(arg1,(char const *const *)arg2);
14924 3 : if ( bLocalUseExceptions ) {
14925 3 : popErrorHandler();
14926 : }
14927 : #ifndef SED_HACKS
14928 : if ( bLocalUseExceptions ) {
14929 : CPLErr eclass = CPLGetLastErrorType();
14930 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
14931 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
14932 : }
14933 : }
14934 : #endif
14935 : }
14936 3 : {
14937 : /* %typemap(out) OGRErr */
14938 3 : if ( result != 0 && GetUseExceptions()) {
14939 0 : const char* pszMessage = CPLGetLastErrorMsg();
14940 0 : if( pszMessage[0] != '\0' )
14941 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
14942 : else
14943 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
14944 0 : SWIG_fail;
14945 : }
14946 : }
14947 3 : {
14948 : /* %typemap(freearg) char **dict */
14949 3 : CSLDestroy( arg2 );
14950 : }
14951 3 : {
14952 : /* %typemap(ret) OGRErr */
14953 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
14954 3 : resultobj = PyInt_FromLong( result );
14955 : }
14956 : }
14957 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; } }
14958 : return resultobj;
14959 0 : fail:
14960 0 : {
14961 : /* %typemap(freearg) char **dict */
14962 0 : CSLDestroy( arg2 );
14963 : }
14964 : return NULL;
14965 : }
14966 :
14967 :
14968 4 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromCF1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14969 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
14970 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
14971 4 : char **arg2 = (char **) 0 ;
14972 4 : char *arg3 = (char *) NULL ;
14973 4 : void *argp1 = 0 ;
14974 4 : int res1 = 0 ;
14975 4 : int res3 ;
14976 4 : char *buf3 = 0 ;
14977 4 : int alloc3 = 0 ;
14978 4 : PyObject *swig_obj[3] ;
14979 4 : OGRErr result;
14980 :
14981 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ImportFromCF1", 2, 3, swig_obj)) SWIG_fail;
14982 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
14983 4 : if (!SWIG_IsOK(res1)) {
14984 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromCF1" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
14985 : }
14986 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
14987 4 : {
14988 : /* %typemap(in) char **dict */
14989 4 : arg2 = NULL;
14990 4 : if ( PySequence_Check( swig_obj[1] ) ) {
14991 0 : int bErr = FALSE;
14992 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
14993 0 : if ( bErr )
14994 : {
14995 0 : SWIG_fail;
14996 : }
14997 : }
14998 4 : else if ( PyMapping_Check( swig_obj[1] ) ) {
14999 4 : int bErr = FALSE;
15000 4 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
15001 4 : if ( bErr )
15002 : {
15003 0 : SWIG_fail;
15004 : }
15005 : }
15006 : else {
15007 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15008 0 : SWIG_fail;
15009 : }
15010 : }
15011 4 : if (swig_obj[2]) {
15012 4 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
15013 4 : if (!SWIG_IsOK(res3)) {
15014 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromCF1" "', argument " "3"" of type '" "char const *""'");
15015 : }
15016 4 : arg3 = reinterpret_cast< char * >(buf3);
15017 : }
15018 4 : {
15019 4 : const int bLocalUseExceptions = GetUseExceptions();
15020 4 : if ( bLocalUseExceptions ) {
15021 4 : pushErrorHandler();
15022 : }
15023 4 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromCF1(arg1,arg2,(char const *)arg3);
15024 4 : if ( bLocalUseExceptions ) {
15025 4 : popErrorHandler();
15026 : }
15027 : #ifndef SED_HACKS
15028 : if ( bLocalUseExceptions ) {
15029 : CPLErr eclass = CPLGetLastErrorType();
15030 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15031 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15032 : }
15033 : }
15034 : #endif
15035 : }
15036 4 : {
15037 : /* %typemap(out) OGRErr */
15038 4 : if ( result != 0 && GetUseExceptions()) {
15039 0 : const char* pszMessage = CPLGetLastErrorMsg();
15040 0 : if( pszMessage[0] != '\0' )
15041 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15042 : else
15043 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15044 0 : SWIG_fail;
15045 : }
15046 : }
15047 4 : {
15048 : /* %typemap(freearg) char **dict */
15049 4 : CSLDestroy( arg2 );
15050 : }
15051 4 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
15052 4 : {
15053 : /* %typemap(ret) OGRErr */
15054 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15055 4 : resultobj = PyInt_FromLong( result );
15056 : }
15057 : }
15058 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; } }
15059 : return resultobj;
15060 0 : fail:
15061 0 : {
15062 : /* %typemap(freearg) char **dict */
15063 0 : CSLDestroy( arg2 );
15064 : }
15065 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
15066 : return NULL;
15067 : }
15068 :
15069 :
15070 1212 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15071 1212 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15072 1212 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15073 1212 : char **arg2 = (char **) 0 ;
15074 1212 : char **arg3 = (char **) NULL ;
15075 1212 : void *argp1 = 0 ;
15076 1212 : int res1 = 0 ;
15077 1212 : char *argout2 = 0 ;
15078 1212 : PyObject *swig_obj[2] ;
15079 1212 : OGRErr result;
15080 :
15081 1212 : {
15082 : /* %typemap(in,numinputs=0) (char **argout2) */
15083 1212 : arg2 = &argout2;
15084 : }
15085 1212 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToWkt", 1, 2, swig_obj)) SWIG_fail;
15086 1212 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15087 1212 : if (!SWIG_IsOK(res1)) {
15088 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15089 : }
15090 1212 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15091 1212 : if (swig_obj[1]) {
15092 28 : {
15093 : /* %typemap(in) char **dict */
15094 28 : arg3 = NULL;
15095 28 : if ( PySequence_Check( swig_obj[1] ) ) {
15096 28 : int bErr = FALSE;
15097 28 : arg3 = CSLFromPySequence(swig_obj[1], &bErr);
15098 28 : if ( bErr )
15099 : {
15100 0 : SWIG_fail;
15101 : }
15102 : }
15103 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
15104 0 : int bErr = FALSE;
15105 0 : arg3 = CSLFromPyMapping(swig_obj[1], &bErr);
15106 0 : if ( bErr )
15107 : {
15108 0 : SWIG_fail;
15109 : }
15110 : }
15111 : else {
15112 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15113 0 : SWIG_fail;
15114 : }
15115 : }
15116 : }
15117 1212 : {
15118 1212 : const int bLocalUseExceptions = GetUseExceptions();
15119 1212 : if ( bLocalUseExceptions ) {
15120 897 : pushErrorHandler();
15121 : }
15122 1212 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToWkt(arg1,arg2,arg3);
15123 1212 : if ( bLocalUseExceptions ) {
15124 897 : popErrorHandler();
15125 : }
15126 : #ifndef SED_HACKS
15127 : if ( bLocalUseExceptions ) {
15128 : CPLErr eclass = CPLGetLastErrorType();
15129 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15130 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15131 : }
15132 : }
15133 : #endif
15134 : }
15135 1212 : {
15136 : /* %typemap(out) OGRErr */
15137 1212 : if ( result != 0 && GetUseExceptions()) {
15138 0 : const char* pszMessage = CPLGetLastErrorMsg();
15139 0 : if( pszMessage[0] != '\0' )
15140 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15141 : else
15142 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15143 0 : SWIG_fail;
15144 : }
15145 : }
15146 1212 : {
15147 : /* %typemap(argout) (char **argout) */
15148 1212 : PyObject *o;
15149 1212 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15150 1212 : o = GDALPythonObjectFromCStr( *arg2 );
15151 : }
15152 : else {
15153 0 : o = Py_None;
15154 0 : Py_INCREF( o );
15155 : }
15156 : #if SWIG_VERSION >= 0x040300
15157 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15158 : #else
15159 1212 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15160 : #endif
15161 : }
15162 1212 : {
15163 : /* %typemap(freearg) (char **argout) */
15164 1212 : if ( *arg2 )
15165 1212 : CPLFree( *arg2 );
15166 : }
15167 1212 : {
15168 : /* %typemap(freearg) char **dict */
15169 1212 : CSLDestroy( arg3 );
15170 : }
15171 1212 : {
15172 : /* %typemap(ret) OGRErr */
15173 2424 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15174 0 : resultobj = PyInt_FromLong( result );
15175 : }
15176 : }
15177 1212 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15178 : return resultobj;
15179 0 : fail:
15180 0 : {
15181 : /* %typemap(freearg) (char **argout) */
15182 0 : if ( *arg2 )
15183 0 : CPLFree( *arg2 );
15184 : }
15185 0 : {
15186 : /* %typemap(freearg) char **dict */
15187 0 : CSLDestroy( arg3 );
15188 : }
15189 : return NULL;
15190 : }
15191 :
15192 :
15193 50 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPrettyWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15194 50 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15195 50 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15196 50 : char **arg2 = (char **) 0 ;
15197 50 : int arg3 = (int) 0 ;
15198 50 : void *argp1 = 0 ;
15199 50 : int res1 = 0 ;
15200 50 : char *argout2 = 0 ;
15201 50 : int val3 ;
15202 50 : int ecode3 = 0 ;
15203 50 : PyObject *swig_obj[2] ;
15204 50 : OGRErr result;
15205 :
15206 50 : {
15207 : /* %typemap(in,numinputs=0) (char **argout2) */
15208 50 : arg2 = &argout2;
15209 : }
15210 50 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToPrettyWkt", 1, 2, swig_obj)) SWIG_fail;
15211 50 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15212 50 : if (!SWIG_IsOK(res1)) {
15213 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPrettyWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15214 : }
15215 50 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15216 50 : if (swig_obj[1]) {
15217 14 : ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
15218 14 : if (!SWIG_IsOK(ecode3)) {
15219 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_ExportToPrettyWkt" "', argument " "3"" of type '" "int""'");
15220 : }
15221 : arg3 = static_cast< int >(val3);
15222 : }
15223 50 : {
15224 50 : const int bLocalUseExceptions = GetUseExceptions();
15225 50 : if ( bLocalUseExceptions ) {
15226 21 : pushErrorHandler();
15227 : }
15228 50 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPrettyWkt(arg1,arg2,arg3);
15229 50 : if ( bLocalUseExceptions ) {
15230 21 : popErrorHandler();
15231 : }
15232 : #ifndef SED_HACKS
15233 : if ( bLocalUseExceptions ) {
15234 : CPLErr eclass = CPLGetLastErrorType();
15235 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15236 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15237 : }
15238 : }
15239 : #endif
15240 : }
15241 50 : {
15242 : /* %typemap(out) OGRErr */
15243 50 : if ( result != 0 && GetUseExceptions()) {
15244 0 : const char* pszMessage = CPLGetLastErrorMsg();
15245 0 : if( pszMessage[0] != '\0' )
15246 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15247 : else
15248 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15249 0 : SWIG_fail;
15250 : }
15251 : }
15252 50 : {
15253 : /* %typemap(argout) (char **argout) */
15254 50 : PyObject *o;
15255 50 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15256 50 : o = GDALPythonObjectFromCStr( *arg2 );
15257 : }
15258 : else {
15259 0 : o = Py_None;
15260 0 : Py_INCREF( o );
15261 : }
15262 : #if SWIG_VERSION >= 0x040300
15263 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15264 : #else
15265 50 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15266 : #endif
15267 : }
15268 50 : {
15269 : /* %typemap(freearg) (char **argout) */
15270 50 : if ( *arg2 )
15271 50 : CPLFree( *arg2 );
15272 : }
15273 50 : {
15274 : /* %typemap(ret) OGRErr */
15275 100 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15276 0 : resultobj = PyInt_FromLong( result );
15277 : }
15278 : }
15279 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; } }
15280 : return resultobj;
15281 0 : fail:
15282 0 : {
15283 : /* %typemap(freearg) (char **argout) */
15284 0 : if ( *arg2 )
15285 0 : CPLFree( *arg2 );
15286 : }
15287 : return NULL;
15288 : }
15289 :
15290 :
15291 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPROJJSON(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15292 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15293 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15294 2 : char **arg2 = (char **) 0 ;
15295 2 : char **arg3 = (char **) NULL ;
15296 2 : void *argp1 = 0 ;
15297 2 : int res1 = 0 ;
15298 2 : char *argout2 = 0 ;
15299 2 : PyObject *swig_obj[2] ;
15300 2 : OGRErr result;
15301 :
15302 2 : {
15303 : /* %typemap(in,numinputs=0) (char **argout2) */
15304 2 : arg2 = &argout2;
15305 : }
15306 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToPROJJSON", 1, 2, swig_obj)) SWIG_fail;
15307 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15308 2 : if (!SWIG_IsOK(res1)) {
15309 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPROJJSON" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15310 : }
15311 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15312 2 : if (swig_obj[1]) {
15313 0 : {
15314 : /* %typemap(in) char **dict */
15315 0 : arg3 = NULL;
15316 0 : if ( PySequence_Check( swig_obj[1] ) ) {
15317 0 : int bErr = FALSE;
15318 0 : arg3 = CSLFromPySequence(swig_obj[1], &bErr);
15319 0 : if ( bErr )
15320 : {
15321 0 : SWIG_fail;
15322 : }
15323 : }
15324 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
15325 0 : int bErr = FALSE;
15326 0 : arg3 = CSLFromPyMapping(swig_obj[1], &bErr);
15327 0 : if ( bErr )
15328 : {
15329 0 : SWIG_fail;
15330 : }
15331 : }
15332 : else {
15333 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
15334 0 : SWIG_fail;
15335 : }
15336 : }
15337 : }
15338 2 : {
15339 2 : const int bLocalUseExceptions = GetUseExceptions();
15340 2 : if ( bLocalUseExceptions ) {
15341 2 : pushErrorHandler();
15342 : }
15343 2 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPROJJSON(arg1,arg2,arg3);
15344 2 : if ( bLocalUseExceptions ) {
15345 2 : popErrorHandler();
15346 : }
15347 : #ifndef SED_HACKS
15348 : if ( bLocalUseExceptions ) {
15349 : CPLErr eclass = CPLGetLastErrorType();
15350 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15351 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15352 : }
15353 : }
15354 : #endif
15355 : }
15356 2 : {
15357 : /* %typemap(out) OGRErr */
15358 2 : if ( result != 0 && GetUseExceptions()) {
15359 0 : const char* pszMessage = CPLGetLastErrorMsg();
15360 0 : if( pszMessage[0] != '\0' )
15361 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15362 : else
15363 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15364 0 : SWIG_fail;
15365 : }
15366 : }
15367 2 : {
15368 : /* %typemap(argout) (char **argout) */
15369 2 : PyObject *o;
15370 2 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15371 2 : o = GDALPythonObjectFromCStr( *arg2 );
15372 : }
15373 : else {
15374 0 : o = Py_None;
15375 0 : Py_INCREF( o );
15376 : }
15377 : #if SWIG_VERSION >= 0x040300
15378 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15379 : #else
15380 2 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15381 : #endif
15382 : }
15383 2 : {
15384 : /* %typemap(freearg) (char **argout) */
15385 2 : if ( *arg2 )
15386 2 : CPLFree( *arg2 );
15387 : }
15388 2 : {
15389 : /* %typemap(freearg) char **dict */
15390 2 : CSLDestroy( arg3 );
15391 : }
15392 2 : {
15393 : /* %typemap(ret) OGRErr */
15394 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15395 0 : resultobj = PyInt_FromLong( result );
15396 : }
15397 : }
15398 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; } }
15399 : return resultobj;
15400 0 : fail:
15401 0 : {
15402 : /* %typemap(freearg) (char **argout) */
15403 0 : if ( *arg2 )
15404 0 : CPLFree( *arg2 );
15405 : }
15406 0 : {
15407 : /* %typemap(freearg) char **dict */
15408 0 : CSLDestroy( arg3 );
15409 : }
15410 : return NULL;
15411 : }
15412 :
15413 :
15414 424 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToProj4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15415 424 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15416 424 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15417 424 : char **arg2 = (char **) 0 ;
15418 424 : void *argp1 = 0 ;
15419 424 : int res1 = 0 ;
15420 424 : char *argout2 = 0 ;
15421 424 : PyObject *swig_obj[1] ;
15422 424 : OGRErr result;
15423 :
15424 424 : {
15425 : /* %typemap(in,numinputs=0) (char **argout2) */
15426 424 : arg2 = &argout2;
15427 : }
15428 424 : if (!args) SWIG_fail;
15429 424 : swig_obj[0] = args;
15430 424 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15431 424 : if (!SWIG_IsOK(res1)) {
15432 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToProj4" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15433 : }
15434 424 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15435 424 : {
15436 424 : const int bLocalUseExceptions = GetUseExceptions();
15437 424 : if ( bLocalUseExceptions ) {
15438 311 : pushErrorHandler();
15439 : }
15440 424 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToProj4(arg1,arg2);
15441 424 : if ( bLocalUseExceptions ) {
15442 311 : popErrorHandler();
15443 : }
15444 : #ifndef SED_HACKS
15445 : if ( bLocalUseExceptions ) {
15446 : CPLErr eclass = CPLGetLastErrorType();
15447 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15448 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15449 : }
15450 : }
15451 : #endif
15452 : }
15453 424 : {
15454 : /* %typemap(out) OGRErr */
15455 428 : if ( result != 0 && GetUseExceptions()) {
15456 3 : const char* pszMessage = CPLGetLastErrorMsg();
15457 3 : if( pszMessage[0] != '\0' )
15458 3 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15459 : else
15460 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15461 3 : SWIG_fail;
15462 : }
15463 : }
15464 421 : {
15465 : /* %typemap(argout) (char **argout) */
15466 421 : PyObject *o;
15467 421 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15468 421 : o = GDALPythonObjectFromCStr( *arg2 );
15469 : }
15470 : else {
15471 0 : o = Py_None;
15472 0 : Py_INCREF( o );
15473 : }
15474 : #if SWIG_VERSION >= 0x040300
15475 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15476 : #else
15477 421 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15478 : #endif
15479 : }
15480 421 : {
15481 : /* %typemap(freearg) (char **argout) */
15482 421 : if ( *arg2 )
15483 421 : CPLFree( *arg2 );
15484 : }
15485 421 : {
15486 : /* %typemap(ret) OGRErr */
15487 842 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15488 0 : resultobj = PyInt_FromLong( result );
15489 : }
15490 : }
15491 424 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
15492 : return resultobj;
15493 3 : fail:
15494 3 : {
15495 : /* %typemap(freearg) (char **argout) */
15496 3 : if ( *arg2 )
15497 3 : CPLFree( *arg2 );
15498 : }
15499 : return NULL;
15500 : }
15501 :
15502 :
15503 6 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPCI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15504 6 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15505 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15506 6 : char **arg2 = (char **) 0 ;
15507 6 : char **arg3 = (char **) 0 ;
15508 6 : double **arg4 ;
15509 6 : void *argp1 = 0 ;
15510 6 : int res1 = 0 ;
15511 6 : char *argout2 = 0 ;
15512 6 : char *argout3 = 0 ;
15513 6 : double *argout4 ;
15514 6 : PyObject *swig_obj[1] ;
15515 6 : OGRErr result;
15516 :
15517 6 : {
15518 : /* %typemap(in,numinputs=0) (char **argout2) */
15519 6 : arg2 = &argout2;
15520 : }
15521 6 : {
15522 : /* %typemap(in,numinputs=0) (char **argout3) */
15523 6 : arg3 = &argout3;
15524 : }
15525 6 : {
15526 : /* %typemap(in,numinputs=0) (double *argout4[ANY]) */
15527 6 : argout4 = NULL;
15528 6 : arg4 = &argout4;
15529 : }
15530 6 : if (!args) SWIG_fail;
15531 6 : swig_obj[0] = args;
15532 6 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15533 6 : if (!SWIG_IsOK(res1)) {
15534 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPCI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15535 : }
15536 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15537 6 : {
15538 6 : const int bLocalUseExceptions = GetUseExceptions();
15539 6 : if ( bLocalUseExceptions ) {
15540 6 : pushErrorHandler();
15541 : }
15542 6 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPCI(arg1,arg2,arg3,arg4);
15543 6 : if ( bLocalUseExceptions ) {
15544 6 : popErrorHandler();
15545 : }
15546 : #ifndef SED_HACKS
15547 : if ( bLocalUseExceptions ) {
15548 : CPLErr eclass = CPLGetLastErrorType();
15549 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15550 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15551 : }
15552 : }
15553 : #endif
15554 : }
15555 6 : {
15556 : /* %typemap(out) OGRErr */
15557 6 : if ( result != 0 && GetUseExceptions()) {
15558 0 : const char* pszMessage = CPLGetLastErrorMsg();
15559 0 : if( pszMessage[0] != '\0' )
15560 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15561 : else
15562 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15563 0 : SWIG_fail;
15564 : }
15565 : }
15566 6 : {
15567 : /* %typemap(argout) (char **argout) */
15568 6 : PyObject *o;
15569 6 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15570 6 : o = GDALPythonObjectFromCStr( *arg2 );
15571 : }
15572 : else {
15573 0 : o = Py_None;
15574 0 : Py_INCREF( o );
15575 : }
15576 : #if SWIG_VERSION >= 0x040300
15577 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15578 : #else
15579 6 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15580 : #endif
15581 : }
15582 6 : {
15583 : /* %typemap(argout) (char **argout) */
15584 6 : PyObject *o;
15585 6 : if ( ReturnSame(arg3) != NULL && *arg3 != NULL ) {
15586 6 : o = GDALPythonObjectFromCStr( *arg3 );
15587 : }
15588 : else {
15589 0 : o = Py_None;
15590 0 : Py_INCREF( o );
15591 : }
15592 : #if SWIG_VERSION >= 0x040300
15593 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15594 : #else
15595 6 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15596 : #endif
15597 : }
15598 6 : {
15599 : /* %typemap(argout) (double *argout[ANY]) */
15600 6 : PyObject *out = CreateTupleFromDoubleArray( *arg4, 17 );
15601 : #if SWIG_VERSION >= 0x040300
15602 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
15603 : #else
15604 6 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
15605 : #endif
15606 : }
15607 6 : {
15608 : /* %typemap(freearg) (char **argout) */
15609 6 : if ( *arg2 )
15610 6 : CPLFree( *arg2 );
15611 : }
15612 6 : {
15613 : /* %typemap(freearg) (char **argout) */
15614 6 : if ( *arg3 )
15615 6 : CPLFree( *arg3 );
15616 : }
15617 6 : {
15618 : /* %typemap(freearg) (double *argout[ANY]) */
15619 6 : CPLFree(*arg4);
15620 : }
15621 6 : {
15622 : /* %typemap(ret) OGRErr */
15623 12 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15624 0 : resultobj = PyInt_FromLong( result );
15625 : }
15626 : }
15627 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; } }
15628 : return resultobj;
15629 0 : fail:
15630 0 : {
15631 : /* %typemap(freearg) (char **argout) */
15632 0 : if ( *arg2 )
15633 0 : CPLFree( *arg2 );
15634 : }
15635 0 : {
15636 : /* %typemap(freearg) (char **argout) */
15637 0 : if ( *arg3 )
15638 0 : CPLFree( *arg3 );
15639 : }
15640 0 : {
15641 : /* %typemap(freearg) (double *argout[ANY]) */
15642 0 : CPLFree(*arg4);
15643 : }
15644 : return NULL;
15645 : }
15646 :
15647 :
15648 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToUSGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15649 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15650 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15651 2 : long *arg2 = (long *) 0 ;
15652 2 : long *arg3 = (long *) 0 ;
15653 2 : double **arg4 ;
15654 2 : long *arg5 = (long *) 0 ;
15655 2 : void *argp1 = 0 ;
15656 2 : int res1 = 0 ;
15657 2 : long temp2 ;
15658 2 : int res2 = SWIG_TMPOBJ ;
15659 2 : long temp3 ;
15660 2 : int res3 = SWIG_TMPOBJ ;
15661 2 : double *argout4 ;
15662 2 : long temp5 ;
15663 2 : int res5 = SWIG_TMPOBJ ;
15664 2 : PyObject *swig_obj[1] ;
15665 2 : OGRErr result;
15666 :
15667 2 : arg2 = &temp2;
15668 2 : arg3 = &temp3;
15669 2 : {
15670 : /* %typemap(in,numinputs=0) (double *argout4[ANY]) */
15671 2 : argout4 = NULL;
15672 2 : arg4 = &argout4;
15673 : }
15674 2 : arg5 = &temp5;
15675 2 : if (!args) SWIG_fail;
15676 2 : swig_obj[0] = args;
15677 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15678 2 : if (!SWIG_IsOK(res1)) {
15679 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToUSGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15680 : }
15681 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15682 2 : {
15683 2 : const int bLocalUseExceptions = GetUseExceptions();
15684 2 : if ( bLocalUseExceptions ) {
15685 2 : pushErrorHandler();
15686 : }
15687 2 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToUSGS(arg1,arg2,arg3,arg4,arg5);
15688 2 : if ( bLocalUseExceptions ) {
15689 2 : popErrorHandler();
15690 : }
15691 : #ifndef SED_HACKS
15692 : if ( bLocalUseExceptions ) {
15693 : CPLErr eclass = CPLGetLastErrorType();
15694 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15695 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15696 : }
15697 : }
15698 : #endif
15699 : }
15700 2 : {
15701 : /* %typemap(out) OGRErr */
15702 2 : if ( result != 0 && GetUseExceptions()) {
15703 0 : const char* pszMessage = CPLGetLastErrorMsg();
15704 0 : if( pszMessage[0] != '\0' )
15705 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15706 : else
15707 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15708 0 : SWIG_fail;
15709 : }
15710 : }
15711 2 : if (ReturnSame(SWIG_IsTmpObj(res2))) {
15712 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg2)));
15713 : } else {
15714 0 : int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
15715 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_long, new_flags));
15716 : }
15717 2 : if (ReturnSame(SWIG_IsTmpObj(res3))) {
15718 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg3)));
15719 : } else {
15720 0 : int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
15721 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_long, new_flags));
15722 : }
15723 2 : {
15724 : /* %typemap(argout) (double *argout[ANY]) */
15725 2 : PyObject *out = CreateTupleFromDoubleArray( *arg4, 15 );
15726 : #if SWIG_VERSION >= 0x040300
15727 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
15728 : #else
15729 2 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
15730 : #endif
15731 : }
15732 2 : if (ReturnSame(SWIG_IsTmpObj(res5))) {
15733 2 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg5)));
15734 : } else {
15735 0 : int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
15736 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_long, new_flags));
15737 : }
15738 2 : {
15739 : /* %typemap(freearg) (double *argout[ANY]) */
15740 2 : CPLFree(*arg4);
15741 : }
15742 2 : {
15743 : /* %typemap(ret) OGRErr */
15744 4 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15745 0 : resultobj = PyInt_FromLong( result );
15746 : }
15747 : }
15748 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; } }
15749 : return resultobj;
15750 0 : fail:
15751 0 : {
15752 : /* %typemap(freearg) (double *argout[ANY]) */
15753 0 : CPLFree(*arg4);
15754 : }
15755 : return NULL;
15756 : }
15757 :
15758 :
15759 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToERM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15760 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15761 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15762 1 : char **arg2 = (char **) 0 ;
15763 1 : char **arg3 = (char **) 0 ;
15764 1 : char **arg4 = (char **) 0 ;
15765 1 : void *argp1 = 0 ;
15766 1 : int res1 = 0 ;
15767 1 : char *argout2 = 0 ;
15768 1 : char *argout3 = 0 ;
15769 1 : char *argout4 = 0 ;
15770 1 : PyObject *swig_obj[1] ;
15771 1 : OGRErr result;
15772 :
15773 1 : {
15774 : /* %typemap(in,numinputs=0) (char **argout2) */
15775 1 : arg2 = &argout2;
15776 : }
15777 1 : {
15778 : /* %typemap(in,numinputs=0) (char **argout3) */
15779 1 : arg3 = &argout3;
15780 : }
15781 1 : {
15782 : /* %typemap(in,numinputs=0) (char **argout4) */
15783 1 : arg4 = &argout4;
15784 : }
15785 1 : if (!args) SWIG_fail;
15786 1 : swig_obj[0] = args;
15787 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15788 1 : if (!SWIG_IsOK(res1)) {
15789 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToERM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15790 : }
15791 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15792 1 : {
15793 1 : const int bLocalUseExceptions = GetUseExceptions();
15794 1 : if ( bLocalUseExceptions ) {
15795 1 : pushErrorHandler();
15796 : }
15797 1 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToERM(arg1,arg2,arg3,arg4);
15798 1 : if ( bLocalUseExceptions ) {
15799 1 : popErrorHandler();
15800 : }
15801 : #ifndef SED_HACKS
15802 : if ( bLocalUseExceptions ) {
15803 : CPLErr eclass = CPLGetLastErrorType();
15804 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15805 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15806 : }
15807 : }
15808 : #endif
15809 : }
15810 1 : {
15811 : /* %typemap(out) OGRErr */
15812 1 : if ( result != 0 && GetUseExceptions()) {
15813 0 : const char* pszMessage = CPLGetLastErrorMsg();
15814 0 : if( pszMessage[0] != '\0' )
15815 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15816 : else
15817 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15818 0 : SWIG_fail;
15819 : }
15820 : }
15821 1 : {
15822 : /* %typemap(argout) (char **argout) */
15823 1 : PyObject *o;
15824 1 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15825 1 : o = GDALPythonObjectFromCStr( *arg2 );
15826 : }
15827 : else {
15828 0 : o = Py_None;
15829 0 : Py_INCREF( o );
15830 : }
15831 : #if SWIG_VERSION >= 0x040300
15832 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15833 : #else
15834 1 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15835 : #endif
15836 : }
15837 1 : {
15838 : /* %typemap(argout) (char **argout) */
15839 1 : PyObject *o;
15840 1 : if ( ReturnSame(arg3) != NULL && *arg3 != NULL ) {
15841 1 : o = GDALPythonObjectFromCStr( *arg3 );
15842 : }
15843 : else {
15844 0 : o = Py_None;
15845 0 : Py_INCREF( o );
15846 : }
15847 : #if SWIG_VERSION >= 0x040300
15848 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15849 : #else
15850 1 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15851 : #endif
15852 : }
15853 1 : {
15854 : /* %typemap(argout) (char **argout) */
15855 1 : PyObject *o;
15856 1 : if ( ReturnSame(arg4) != NULL && *arg4 != NULL ) {
15857 1 : o = GDALPythonObjectFromCStr( *arg4 );
15858 : }
15859 : else {
15860 0 : o = Py_None;
15861 0 : Py_INCREF( o );
15862 : }
15863 : #if SWIG_VERSION >= 0x040300
15864 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15865 : #else
15866 1 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15867 : #endif
15868 : }
15869 1 : {
15870 : /* %typemap(freearg) (char **argout) */
15871 1 : if ( *arg2 )
15872 1 : CPLFree( *arg2 );
15873 : }
15874 1 : {
15875 : /* %typemap(freearg) (char **argout) */
15876 1 : if ( *arg3 )
15877 1 : CPLFree( *arg3 );
15878 : }
15879 1 : {
15880 : /* %typemap(freearg) (char **argout) */
15881 1 : if ( *arg4 )
15882 1 : CPLFree( *arg4 );
15883 : }
15884 1 : {
15885 : /* %typemap(ret) OGRErr */
15886 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15887 0 : resultobj = PyInt_FromLong( result );
15888 : }
15889 : }
15890 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; } }
15891 : return resultobj;
15892 0 : fail:
15893 0 : {
15894 : /* %typemap(freearg) (char **argout) */
15895 0 : if ( *arg2 )
15896 0 : CPLFree( *arg2 );
15897 : }
15898 0 : {
15899 : /* %typemap(freearg) (char **argout) */
15900 0 : if ( *arg3 )
15901 0 : CPLFree( *arg3 );
15902 : }
15903 0 : {
15904 : /* %typemap(freearg) (char **argout) */
15905 0 : if ( *arg4 )
15906 0 : CPLFree( *arg4 );
15907 : }
15908 : return NULL;
15909 : }
15910 :
15911 :
15912 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToXML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15913 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
15914 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
15915 2 : char **arg2 = (char **) 0 ;
15916 2 : char *arg3 = (char *) "" ;
15917 2 : void *argp1 = 0 ;
15918 2 : int res1 = 0 ;
15919 2 : char *argout2 = 0 ;
15920 2 : int res3 ;
15921 2 : char *buf3 = 0 ;
15922 2 : int alloc3 = 0 ;
15923 2 : PyObject *swig_obj[2] ;
15924 2 : OGRErr result;
15925 :
15926 2 : {
15927 : /* %typemap(in,numinputs=0) (char **argout2) */
15928 2 : arg2 = &argout2;
15929 : }
15930 2 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToXML", 1, 2, swig_obj)) SWIG_fail;
15931 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
15932 2 : if (!SWIG_IsOK(res1)) {
15933 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToXML" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
15934 : }
15935 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
15936 2 : if (swig_obj[1]) {
15937 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf3, NULL, &alloc3);
15938 0 : if (!SWIG_IsOK(res3)) {
15939 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ExportToXML" "', argument " "3"" of type '" "char const *""'");
15940 : }
15941 0 : arg3 = reinterpret_cast< char * >(buf3);
15942 : }
15943 2 : {
15944 2 : const int bLocalUseExceptions = GetUseExceptions();
15945 2 : if ( bLocalUseExceptions ) {
15946 2 : pushErrorHandler();
15947 : }
15948 2 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToXML(arg1,arg2,(char const *)arg3);
15949 2 : if ( bLocalUseExceptions ) {
15950 2 : popErrorHandler();
15951 : }
15952 : #ifndef SED_HACKS
15953 : if ( bLocalUseExceptions ) {
15954 : CPLErr eclass = CPLGetLastErrorType();
15955 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
15956 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
15957 : }
15958 : }
15959 : #endif
15960 : }
15961 2 : {
15962 : /* %typemap(out) OGRErr */
15963 3 : if ( result != 0 && GetUseExceptions()) {
15964 1 : const char* pszMessage = CPLGetLastErrorMsg();
15965 1 : if( pszMessage[0] != '\0' )
15966 1 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
15967 : else
15968 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
15969 1 : SWIG_fail;
15970 : }
15971 : }
15972 1 : {
15973 : /* %typemap(argout) (char **argout) */
15974 1 : PyObject *o;
15975 1 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
15976 1 : o = GDALPythonObjectFromCStr( *arg2 );
15977 : }
15978 : else {
15979 0 : o = Py_None;
15980 0 : Py_INCREF( o );
15981 : }
15982 : #if SWIG_VERSION >= 0x040300
15983 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
15984 : #else
15985 1 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
15986 : #endif
15987 : }
15988 1 : {
15989 : /* %typemap(freearg) (char **argout) */
15990 1 : if ( *arg2 )
15991 1 : CPLFree( *arg2 );
15992 : }
15993 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
15994 1 : {
15995 : /* %typemap(ret) OGRErr */
15996 2 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
15997 0 : resultobj = PyInt_FromLong( result );
15998 : }
15999 : }
16000 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; } }
16001 : return resultobj;
16002 1 : fail:
16003 1 : {
16004 : /* %typemap(freearg) (char **argout) */
16005 1 : if ( *arg2 )
16006 0 : CPLFree( *arg2 );
16007 : }
16008 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
16009 : return NULL;
16010 : }
16011 :
16012 :
16013 5 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToMICoordSys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16014 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16015 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16016 5 : char **arg2 = (char **) 0 ;
16017 5 : void *argp1 = 0 ;
16018 5 : int res1 = 0 ;
16019 5 : char *argout2 = 0 ;
16020 5 : PyObject *swig_obj[1] ;
16021 5 : OGRErr result;
16022 :
16023 5 : {
16024 : /* %typemap(in,numinputs=0) (char **argout2) */
16025 5 : arg2 = &argout2;
16026 : }
16027 5 : if (!args) SWIG_fail;
16028 5 : swig_obj[0] = args;
16029 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16030 5 : if (!SWIG_IsOK(res1)) {
16031 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToMICoordSys" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16032 : }
16033 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16034 5 : {
16035 5 : const int bLocalUseExceptions = GetUseExceptions();
16036 5 : if ( bLocalUseExceptions ) {
16037 3 : pushErrorHandler();
16038 : }
16039 5 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToMICoordSys(arg1,arg2);
16040 5 : if ( bLocalUseExceptions ) {
16041 3 : popErrorHandler();
16042 : }
16043 : #ifndef SED_HACKS
16044 : if ( bLocalUseExceptions ) {
16045 : CPLErr eclass = CPLGetLastErrorType();
16046 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16047 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16048 : }
16049 : }
16050 : #endif
16051 : }
16052 5 : {
16053 : /* %typemap(out) OGRErr */
16054 5 : if ( result != 0 && GetUseExceptions()) {
16055 0 : const char* pszMessage = CPLGetLastErrorMsg();
16056 0 : if( pszMessage[0] != '\0' )
16057 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16058 : else
16059 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16060 0 : SWIG_fail;
16061 : }
16062 : }
16063 5 : {
16064 : /* %typemap(argout) (char **argout) */
16065 5 : PyObject *o;
16066 5 : if ( ReturnSame(arg2) != NULL && *arg2 != NULL ) {
16067 5 : o = GDALPythonObjectFromCStr( *arg2 );
16068 : }
16069 : else {
16070 0 : o = Py_None;
16071 0 : Py_INCREF( o );
16072 : }
16073 : #if SWIG_VERSION >= 0x040300
16074 : resultobj = SWIG_Python_AppendOutput(resultobj,o,$isvoid);
16075 : #else
16076 5 : resultobj = SWIG_Python_AppendOutput(resultobj,o);
16077 : #endif
16078 : }
16079 5 : {
16080 : /* %typemap(freearg) (char **argout) */
16081 5 : if ( *arg2 )
16082 5 : CPLFree( *arg2 );
16083 : }
16084 5 : {
16085 : /* %typemap(ret) OGRErr */
16086 10 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16087 0 : resultobj = PyInt_FromLong( result );
16088 : }
16089 : }
16090 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; } }
16091 : return resultobj;
16092 0 : fail:
16093 0 : {
16094 : /* %typemap(freearg) (char **argout) */
16095 0 : if ( *arg2 )
16096 0 : CPLFree( *arg2 );
16097 : }
16098 : return NULL;
16099 : }
16100 :
16101 :
16102 4 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToCF1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16103 4 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16104 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16105 4 : char **arg2 = (char **) NULL ;
16106 4 : void *argp1 = 0 ;
16107 4 : int res1 = 0 ;
16108 4 : PyObject *swig_obj[2] ;
16109 4 : char **result = 0 ;
16110 :
16111 4 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToCF1", 1, 2, swig_obj)) SWIG_fail;
16112 4 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16113 4 : if (!SWIG_IsOK(res1)) {
16114 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToCF1" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16115 : }
16116 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16117 4 : if (swig_obj[1]) {
16118 4 : {
16119 : /* %typemap(in) char **dict */
16120 4 : arg2 = NULL;
16121 4 : if ( PySequence_Check( swig_obj[1] ) ) {
16122 0 : int bErr = FALSE;
16123 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
16124 0 : if ( bErr )
16125 : {
16126 0 : SWIG_fail;
16127 : }
16128 : }
16129 4 : else if ( PyMapping_Check( swig_obj[1] ) ) {
16130 4 : int bErr = FALSE;
16131 4 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
16132 4 : if ( bErr )
16133 : {
16134 0 : SWIG_fail;
16135 : }
16136 : }
16137 : else {
16138 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
16139 0 : SWIG_fail;
16140 : }
16141 : }
16142 : }
16143 4 : {
16144 4 : const int bLocalUseExceptions = GetUseExceptions();
16145 4 : if ( bLocalUseExceptions ) {
16146 4 : pushErrorHandler();
16147 : }
16148 4 : result = (char **)OSRSpatialReferenceShadow_ExportToCF1(arg1,arg2);
16149 4 : if ( bLocalUseExceptions ) {
16150 4 : popErrorHandler();
16151 : }
16152 : #ifndef SED_HACKS
16153 : if ( bLocalUseExceptions ) {
16154 : CPLErr eclass = CPLGetLastErrorType();
16155 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16156 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16157 : }
16158 : }
16159 : #endif
16160 : }
16161 4 : {
16162 : /* %typemap(out) char **dict */
16163 4 : resultobj = GetCSLStringAsPyDict(result, true);
16164 : }
16165 4 : {
16166 : /* %typemap(freearg) char **dict */
16167 4 : CSLDestroy( arg2 );
16168 : }
16169 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; } }
16170 : return resultobj;
16171 0 : fail:
16172 0 : {
16173 : /* %typemap(freearg) char **dict */
16174 0 : CSLDestroy( arg2 );
16175 : }
16176 : return NULL;
16177 : }
16178 :
16179 :
16180 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToCF1Units(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16181 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16182 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16183 1 : char **arg2 = (char **) NULL ;
16184 1 : void *argp1 = 0 ;
16185 1 : int res1 = 0 ;
16186 1 : PyObject *swig_obj[2] ;
16187 1 : retStringAndCPLFree *result = 0 ;
16188 :
16189 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ExportToCF1Units", 1, 2, swig_obj)) SWIG_fail;
16190 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16191 1 : if (!SWIG_IsOK(res1)) {
16192 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToCF1Units" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16193 : }
16194 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16195 1 : if (swig_obj[1]) {
16196 0 : {
16197 : /* %typemap(in) char **dict */
16198 0 : arg2 = NULL;
16199 0 : if ( PySequence_Check( swig_obj[1] ) ) {
16200 0 : int bErr = FALSE;
16201 0 : arg2 = CSLFromPySequence(swig_obj[1], &bErr);
16202 0 : if ( bErr )
16203 : {
16204 0 : SWIG_fail;
16205 : }
16206 : }
16207 0 : else if ( PyMapping_Check( swig_obj[1] ) ) {
16208 0 : int bErr = FALSE;
16209 0 : arg2 = CSLFromPyMapping(swig_obj[1], &bErr);
16210 0 : if ( bErr )
16211 : {
16212 0 : SWIG_fail;
16213 : }
16214 : }
16215 : else {
16216 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
16217 0 : SWIG_fail;
16218 : }
16219 : }
16220 : }
16221 1 : {
16222 1 : const int bLocalUseExceptions = GetUseExceptions();
16223 1 : if ( bLocalUseExceptions ) {
16224 1 : pushErrorHandler();
16225 : }
16226 1 : result = (retStringAndCPLFree *)OSRSpatialReferenceShadow_ExportToCF1Units(arg1,arg2);
16227 1 : if ( bLocalUseExceptions ) {
16228 1 : popErrorHandler();
16229 : }
16230 : #ifndef SED_HACKS
16231 : if ( bLocalUseExceptions ) {
16232 : CPLErr eclass = CPLGetLastErrorType();
16233 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16234 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16235 : }
16236 : }
16237 : #endif
16238 : }
16239 1 : {
16240 : /* %typemap(out) (retStringAndCPLFree*) */
16241 1 : Py_XDECREF(resultobj);
16242 1 : if(result)
16243 : {
16244 1 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
16245 1 : CPLFree(result);
16246 : }
16247 : else
16248 : {
16249 0 : resultobj = Py_None;
16250 0 : Py_INCREF(resultobj);
16251 : }
16252 : }
16253 1 : {
16254 : /* %typemap(freearg) char **dict */
16255 1 : CSLDestroy( arg2 );
16256 : }
16257 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; } }
16258 : return resultobj;
16259 0 : fail:
16260 0 : {
16261 : /* %typemap(freearg) char **dict */
16262 0 : CSLDestroy( arg2 );
16263 : }
16264 : return NULL;
16265 : }
16266 :
16267 :
16268 16 : SWIGINTERN PyObject *_wrap_SpatialReference_CloneGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16269 16 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16270 16 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16271 16 : void *argp1 = 0 ;
16272 16 : int res1 = 0 ;
16273 16 : PyObject *swig_obj[1] ;
16274 16 : OSRSpatialReferenceShadow *result = 0 ;
16275 :
16276 16 : if (!args) SWIG_fail;
16277 16 : swig_obj[0] = args;
16278 16 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16279 16 : if (!SWIG_IsOK(res1)) {
16280 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_CloneGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16281 : }
16282 16 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16283 16 : {
16284 16 : const int bLocalUseExceptions = GetUseExceptions();
16285 16 : if ( bLocalUseExceptions ) {
16286 3 : pushErrorHandler();
16287 : }
16288 16 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_CloneGeogCS(arg1);
16289 16 : if ( bLocalUseExceptions ) {
16290 3 : popErrorHandler();
16291 : }
16292 : #ifndef SED_HACKS
16293 : if ( bLocalUseExceptions ) {
16294 : CPLErr eclass = CPLGetLastErrorType();
16295 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16296 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16297 : }
16298 : }
16299 : #endif
16300 : }
16301 16 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
16302 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; } }
16303 : return resultobj;
16304 : fail:
16305 : return NULL;
16306 : }
16307 :
16308 :
16309 56 : SWIGINTERN PyObject *_wrap_SpatialReference_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16310 56 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16311 56 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16312 56 : void *argp1 = 0 ;
16313 56 : int res1 = 0 ;
16314 56 : PyObject *swig_obj[1] ;
16315 56 : OSRSpatialReferenceShadow *result = 0 ;
16316 :
16317 56 : if (!args) SWIG_fail;
16318 56 : swig_obj[0] = args;
16319 56 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16320 56 : if (!SWIG_IsOK(res1)) {
16321 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Clone" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16322 : }
16323 56 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16324 56 : {
16325 56 : const int bLocalUseExceptions = GetUseExceptions();
16326 56 : if ( bLocalUseExceptions ) {
16327 4 : pushErrorHandler();
16328 : }
16329 56 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_Clone(arg1);
16330 56 : if ( bLocalUseExceptions ) {
16331 4 : popErrorHandler();
16332 : }
16333 : #ifndef SED_HACKS
16334 : if ( bLocalUseExceptions ) {
16335 : CPLErr eclass = CPLGetLastErrorType();
16336 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16337 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16338 : }
16339 : }
16340 : #endif
16341 : }
16342 56 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
16343 56 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
16344 : return resultobj;
16345 : fail:
16346 : return NULL;
16347 : }
16348 :
16349 :
16350 1 : SWIGINTERN PyObject *_wrap_SpatialReference_StripVertical(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16351 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16352 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16353 1 : void *argp1 = 0 ;
16354 1 : int res1 = 0 ;
16355 1 : PyObject *swig_obj[1] ;
16356 1 : OGRErr result;
16357 :
16358 1 : if (!args) SWIG_fail;
16359 1 : swig_obj[0] = args;
16360 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16361 1 : if (!SWIG_IsOK(res1)) {
16362 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_StripVertical" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16363 : }
16364 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16365 1 : {
16366 1 : const int bLocalUseExceptions = GetUseExceptions();
16367 1 : if ( bLocalUseExceptions ) {
16368 1 : pushErrorHandler();
16369 : }
16370 1 : result = (OGRErr)OSRSpatialReferenceShadow_StripVertical(arg1);
16371 1 : if ( bLocalUseExceptions ) {
16372 1 : popErrorHandler();
16373 : }
16374 : #ifndef SED_HACKS
16375 : if ( bLocalUseExceptions ) {
16376 : CPLErr eclass = CPLGetLastErrorType();
16377 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16378 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16379 : }
16380 : }
16381 : #endif
16382 : }
16383 1 : {
16384 : /* %typemap(out) OGRErr */
16385 1 : if ( result != 0 && GetUseExceptions()) {
16386 0 : const char* pszMessage = CPLGetLastErrorMsg();
16387 0 : if( pszMessage[0] != '\0' )
16388 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16389 : else
16390 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16391 0 : SWIG_fail;
16392 : }
16393 : }
16394 1 : {
16395 : /* %typemap(ret) OGRErr */
16396 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16397 1 : resultobj = PyInt_FromLong( result );
16398 : }
16399 : }
16400 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; } }
16401 : return resultobj;
16402 : fail:
16403 : return NULL;
16404 : }
16405 :
16406 :
16407 114 : SWIGINTERN PyObject *_wrap_SpatialReference_Validate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16408 114 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16409 114 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16410 114 : void *argp1 = 0 ;
16411 114 : int res1 = 0 ;
16412 114 : PyObject *swig_obj[1] ;
16413 114 : OGRErr result;
16414 :
16415 114 : if (!args) SWIG_fail;
16416 114 : swig_obj[0] = args;
16417 114 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16418 114 : if (!SWIG_IsOK(res1)) {
16419 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Validate" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16420 : }
16421 114 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16422 114 : {
16423 114 : const int bLocalUseExceptions = GetUseExceptions();
16424 114 : if ( bLocalUseExceptions ) {
16425 114 : pushErrorHandler();
16426 : }
16427 114 : result = (OGRErr)OSRSpatialReferenceShadow_Validate(arg1);
16428 114 : if ( bLocalUseExceptions ) {
16429 114 : popErrorHandler();
16430 : }
16431 : #ifndef SED_HACKS
16432 : if ( bLocalUseExceptions ) {
16433 : CPLErr eclass = CPLGetLastErrorType();
16434 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16435 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16436 : }
16437 : }
16438 : #endif
16439 : }
16440 114 : {
16441 : /* %typemap(out) OGRErr */
16442 150 : if ( result != 0 && GetUseExceptions()) {
16443 36 : const char* pszMessage = CPLGetLastErrorMsg();
16444 36 : if( pszMessage[0] != '\0' )
16445 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16446 : else
16447 36 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16448 36 : SWIG_fail;
16449 : }
16450 : }
16451 78 : {
16452 : /* %typemap(ret) OGRErr */
16453 78 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16454 78 : resultobj = PyInt_FromLong( result );
16455 : }
16456 : }
16457 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; } }
16458 : return resultobj;
16459 : fail:
16460 : return NULL;
16461 : }
16462 :
16463 :
16464 17 : SWIGINTERN PyObject *_wrap_SpatialReference_MorphToESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16465 17 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16466 17 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16467 17 : void *argp1 = 0 ;
16468 17 : int res1 = 0 ;
16469 17 : PyObject *swig_obj[1] ;
16470 17 : OGRErr result;
16471 :
16472 17 : if (!args) SWIG_fail;
16473 17 : swig_obj[0] = args;
16474 17 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16475 17 : if (!SWIG_IsOK(res1)) {
16476 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_MorphToESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16477 : }
16478 17 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16479 17 : {
16480 17 : const int bLocalUseExceptions = GetUseExceptions();
16481 17 : if ( bLocalUseExceptions ) {
16482 17 : pushErrorHandler();
16483 : }
16484 17 : result = (OGRErr)OSRSpatialReferenceShadow_MorphToESRI(arg1);
16485 17 : if ( bLocalUseExceptions ) {
16486 17 : popErrorHandler();
16487 : }
16488 : #ifndef SED_HACKS
16489 : if ( bLocalUseExceptions ) {
16490 : CPLErr eclass = CPLGetLastErrorType();
16491 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16492 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16493 : }
16494 : }
16495 : #endif
16496 : }
16497 17 : {
16498 : /* %typemap(out) OGRErr */
16499 17 : if ( result != 0 && GetUseExceptions()) {
16500 0 : const char* pszMessage = CPLGetLastErrorMsg();
16501 0 : if( pszMessage[0] != '\0' )
16502 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16503 : else
16504 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16505 0 : SWIG_fail;
16506 : }
16507 : }
16508 17 : {
16509 : /* %typemap(ret) OGRErr */
16510 17 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16511 17 : resultobj = PyInt_FromLong( result );
16512 : }
16513 : }
16514 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; } }
16515 : return resultobj;
16516 : fail:
16517 : return NULL;
16518 : }
16519 :
16520 :
16521 19 : SWIGINTERN PyObject *_wrap_SpatialReference_MorphFromESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16522 19 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16523 19 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16524 19 : void *argp1 = 0 ;
16525 19 : int res1 = 0 ;
16526 19 : PyObject *swig_obj[1] ;
16527 19 : OGRErr result;
16528 :
16529 19 : if (!args) SWIG_fail;
16530 19 : swig_obj[0] = args;
16531 19 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16532 19 : if (!SWIG_IsOK(res1)) {
16533 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_MorphFromESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16534 : }
16535 19 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16536 19 : {
16537 19 : const int bLocalUseExceptions = GetUseExceptions();
16538 19 : if ( bLocalUseExceptions ) {
16539 19 : pushErrorHandler();
16540 : }
16541 19 : result = (OGRErr)OSRSpatialReferenceShadow_MorphFromESRI(arg1);
16542 19 : if ( bLocalUseExceptions ) {
16543 19 : popErrorHandler();
16544 : }
16545 : #ifndef SED_HACKS
16546 : if ( bLocalUseExceptions ) {
16547 : CPLErr eclass = CPLGetLastErrorType();
16548 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16549 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16550 : }
16551 : }
16552 : #endif
16553 : }
16554 19 : {
16555 : /* %typemap(out) OGRErr */
16556 19 : if ( result != 0 && GetUseExceptions()) {
16557 0 : const char* pszMessage = CPLGetLastErrorMsg();
16558 0 : if( pszMessage[0] != '\0' )
16559 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16560 : else
16561 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16562 0 : SWIG_fail;
16563 : }
16564 : }
16565 19 : {
16566 : /* %typemap(ret) OGRErr */
16567 19 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16568 19 : resultobj = PyInt_FromLong( result );
16569 : }
16570 : }
16571 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; } }
16572 : return resultobj;
16573 : fail:
16574 : return NULL;
16575 : }
16576 :
16577 :
16578 28 : SWIGINTERN PyObject *_wrap_SpatialReference_ConvertToOtherProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16579 28 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16580 28 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16581 28 : char *arg2 = (char *) 0 ;
16582 28 : char **arg3 = (char **) NULL ;
16583 28 : void *argp1 = 0 ;
16584 28 : int res1 = 0 ;
16585 28 : int res2 ;
16586 28 : char *buf2 = 0 ;
16587 28 : int alloc2 = 0 ;
16588 28 : PyObject *swig_obj[3] ;
16589 28 : OSRSpatialReferenceShadow *result = 0 ;
16590 :
16591 28 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_ConvertToOtherProjection", 2, 3, swig_obj)) SWIG_fail;
16592 28 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16593 28 : if (!SWIG_IsOK(res1)) {
16594 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ConvertToOtherProjection" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16595 : }
16596 28 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16597 28 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16598 28 : if (!SWIG_IsOK(res2)) {
16599 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ConvertToOtherProjection" "', argument " "2"" of type '" "char const *""'");
16600 : }
16601 28 : arg2 = reinterpret_cast< char * >(buf2);
16602 28 : if (swig_obj[2]) {
16603 0 : {
16604 : /* %typemap(in) char **dict */
16605 0 : arg3 = NULL;
16606 0 : if ( PySequence_Check( swig_obj[2] ) ) {
16607 0 : int bErr = FALSE;
16608 0 : arg3 = CSLFromPySequence(swig_obj[2], &bErr);
16609 0 : if ( bErr )
16610 : {
16611 0 : SWIG_fail;
16612 : }
16613 : }
16614 0 : else if ( PyMapping_Check( swig_obj[2] ) ) {
16615 0 : int bErr = FALSE;
16616 0 : arg3 = CSLFromPyMapping(swig_obj[2], &bErr);
16617 0 : if ( bErr )
16618 : {
16619 0 : SWIG_fail;
16620 : }
16621 : }
16622 : else {
16623 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
16624 0 : SWIG_fail;
16625 : }
16626 : }
16627 : }
16628 28 : {
16629 28 : const int bLocalUseExceptions = GetUseExceptions();
16630 28 : if ( bLocalUseExceptions ) {
16631 14 : pushErrorHandler();
16632 : }
16633 28 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_ConvertToOtherProjection(arg1,(char const *)arg2,arg3);
16634 28 : if ( bLocalUseExceptions ) {
16635 14 : popErrorHandler();
16636 : }
16637 : #ifndef SED_HACKS
16638 : if ( bLocalUseExceptions ) {
16639 : CPLErr eclass = CPLGetLastErrorType();
16640 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16641 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16642 : }
16643 : }
16644 : #endif
16645 : }
16646 28 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
16647 28 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16648 28 : {
16649 : /* %typemap(freearg) char **dict */
16650 28 : CSLDestroy( arg3 );
16651 : }
16652 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; } }
16653 : return resultobj;
16654 0 : fail:
16655 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16656 0 : {
16657 : /* %typemap(freearg) char **dict */
16658 0 : CSLDestroy( arg3 );
16659 : }
16660 : return NULL;
16661 : }
16662 :
16663 :
16664 3 : SWIGINTERN PyObject *_wrap_SpatialReference_PromoteTo3D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16665 3 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16666 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16667 3 : char *arg2 = (char *) NULL ;
16668 3 : void *argp1 = 0 ;
16669 3 : int res1 = 0 ;
16670 3 : int res2 ;
16671 3 : char *buf2 = 0 ;
16672 3 : int alloc2 = 0 ;
16673 3 : PyObject *swig_obj[2] ;
16674 3 : OGRErr result;
16675 :
16676 3 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_PromoteTo3D", 1, 2, swig_obj)) SWIG_fail;
16677 3 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16678 3 : if (!SWIG_IsOK(res1)) {
16679 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_PromoteTo3D" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16680 : }
16681 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16682 3 : if (swig_obj[1]) {
16683 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16684 0 : if (!SWIG_IsOK(res2)) {
16685 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_PromoteTo3D" "', argument " "2"" of type '" "char const *""'");
16686 : }
16687 0 : arg2 = reinterpret_cast< char * >(buf2);
16688 : }
16689 3 : {
16690 3 : const int bLocalUseExceptions = GetUseExceptions();
16691 3 : if ( bLocalUseExceptions ) {
16692 3 : pushErrorHandler();
16693 : }
16694 3 : result = (OGRErr)OSRSpatialReferenceShadow_PromoteTo3D(arg1,(char const *)arg2);
16695 3 : if ( bLocalUseExceptions ) {
16696 3 : popErrorHandler();
16697 : }
16698 : #ifndef SED_HACKS
16699 : if ( bLocalUseExceptions ) {
16700 : CPLErr eclass = CPLGetLastErrorType();
16701 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16702 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16703 : }
16704 : }
16705 : #endif
16706 : }
16707 3 : {
16708 : /* %typemap(out) OGRErr */
16709 3 : if ( result != 0 && GetUseExceptions()) {
16710 0 : const char* pszMessage = CPLGetLastErrorMsg();
16711 0 : if( pszMessage[0] != '\0' )
16712 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16713 : else
16714 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16715 0 : SWIG_fail;
16716 : }
16717 : }
16718 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16719 3 : {
16720 : /* %typemap(ret) OGRErr */
16721 3 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16722 3 : resultobj = PyInt_FromLong( result );
16723 : }
16724 : }
16725 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; } }
16726 : return resultobj;
16727 0 : fail:
16728 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16729 : return NULL;
16730 : }
16731 :
16732 :
16733 1 : SWIGINTERN PyObject *_wrap_SpatialReference_DemoteTo2D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16734 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16735 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
16736 1 : char *arg2 = (char *) NULL ;
16737 1 : void *argp1 = 0 ;
16738 1 : int res1 = 0 ;
16739 1 : int res2 ;
16740 1 : char *buf2 = 0 ;
16741 1 : int alloc2 = 0 ;
16742 1 : PyObject *swig_obj[2] ;
16743 1 : OGRErr result;
16744 :
16745 1 : if (!SWIG_Python_UnpackTuple(args, "SpatialReference_DemoteTo2D", 1, 2, swig_obj)) SWIG_fail;
16746 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
16747 1 : if (!SWIG_IsOK(res1)) {
16748 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_DemoteTo2D" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
16749 : }
16750 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
16751 1 : if (swig_obj[1]) {
16752 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16753 0 : if (!SWIG_IsOK(res2)) {
16754 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_DemoteTo2D" "', argument " "2"" of type '" "char const *""'");
16755 : }
16756 0 : arg2 = reinterpret_cast< char * >(buf2);
16757 : }
16758 1 : {
16759 1 : const int bLocalUseExceptions = GetUseExceptions();
16760 1 : if ( bLocalUseExceptions ) {
16761 1 : pushErrorHandler();
16762 : }
16763 1 : result = (OGRErr)OSRSpatialReferenceShadow_DemoteTo2D(arg1,(char const *)arg2);
16764 1 : if ( bLocalUseExceptions ) {
16765 1 : popErrorHandler();
16766 : }
16767 : #ifndef SED_HACKS
16768 : if ( bLocalUseExceptions ) {
16769 : CPLErr eclass = CPLGetLastErrorType();
16770 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16771 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16772 : }
16773 : }
16774 : #endif
16775 : }
16776 1 : {
16777 : /* %typemap(out) OGRErr */
16778 1 : if ( result != 0 && GetUseExceptions()) {
16779 0 : const char* pszMessage = CPLGetLastErrorMsg();
16780 0 : if( pszMessage[0] != '\0' )
16781 0 : PyErr_SetString( PyExc_RuntimeError, pszMessage );
16782 : else
16783 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
16784 0 : SWIG_fail;
16785 : }
16786 : }
16787 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16788 1 : {
16789 : /* %typemap(ret) OGRErr */
16790 1 : if ( ReturnSame(resultobj == Py_None || resultobj == 0) ) {
16791 1 : resultobj = PyInt_FromLong( result );
16792 : }
16793 : }
16794 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; } }
16795 : return resultobj;
16796 0 : fail:
16797 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
16798 : return NULL;
16799 : }
16800 :
16801 :
16802 276 : SWIGINTERN PyObject *SpatialReference_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16803 276 : PyObject *obj;
16804 276 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
16805 276 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_NewClientData(obj));
16806 276 : return SWIG_Py_Void();
16807 : }
16808 :
16809 2419 : SWIGINTERN PyObject *SpatialReference_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16810 2419 : return SWIG_Python_InitShadowInstance(args);
16811 : }
16812 :
16813 11 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformationOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16814 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16815 11 : OGRCoordinateTransformationOptions *result = 0 ;
16816 :
16817 11 : if (!SWIG_Python_UnpackTuple(args, "new_CoordinateTransformationOptions", 0, 0, 0)) SWIG_fail;
16818 11 : {
16819 11 : const int bLocalUseExceptions = GetUseExceptions();
16820 11 : if ( bLocalUseExceptions ) {
16821 10 : pushErrorHandler();
16822 : }
16823 11 : result = (OGRCoordinateTransformationOptions *)new_OGRCoordinateTransformationOptions();
16824 11 : if ( bLocalUseExceptions ) {
16825 10 : popErrorHandler();
16826 : }
16827 : #ifndef SED_HACKS
16828 : if ( bLocalUseExceptions ) {
16829 : CPLErr eclass = CPLGetLastErrorType();
16830 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16831 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16832 : }
16833 : }
16834 : #endif
16835 : }
16836 11 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRCoordinateTransformationOptions, SWIG_POINTER_NEW | 0 );
16837 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; } }
16838 : return resultobj;
16839 0 : fail:
16840 0 : return NULL;
16841 : }
16842 :
16843 :
16844 11 : SWIGINTERN PyObject *_wrap_delete_CoordinateTransformationOptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16845 11 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16846 11 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16847 11 : void *argp1 = 0 ;
16848 11 : int res1 = 0 ;
16849 11 : PyObject *swig_obj[1] ;
16850 :
16851 11 : if (!args) SWIG_fail;
16852 11 : swig_obj[0] = args;
16853 11 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, SWIG_POINTER_DISOWN | 0 );
16854 11 : if (!SWIG_IsOK(res1)) {
16855 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoordinateTransformationOptions" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16856 : }
16857 11 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16858 11 : {
16859 11 : const int bLocalUseExceptions = GetUseExceptions();
16860 11 : if ( bLocalUseExceptions ) {
16861 10 : pushErrorHandler();
16862 : }
16863 11 : delete_OGRCoordinateTransformationOptions(arg1);
16864 11 : if ( bLocalUseExceptions ) {
16865 10 : popErrorHandler();
16866 : }
16867 : #ifndef SED_HACKS
16868 : if ( bLocalUseExceptions ) {
16869 : CPLErr eclass = CPLGetLastErrorType();
16870 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16871 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16872 : }
16873 : }
16874 : #endif
16875 : }
16876 11 : resultobj = SWIG_Py_Void();
16877 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; } }
16878 : return resultobj;
16879 : fail:
16880 : return NULL;
16881 : }
16882 :
16883 :
16884 5 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetAreaOfInterest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16885 5 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16886 5 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16887 5 : double arg2 ;
16888 5 : double arg3 ;
16889 5 : double arg4 ;
16890 5 : double arg5 ;
16891 5 : void *argp1 = 0 ;
16892 5 : int res1 = 0 ;
16893 5 : double val2 ;
16894 5 : int ecode2 = 0 ;
16895 5 : double val3 ;
16896 5 : int ecode3 = 0 ;
16897 5 : double val4 ;
16898 5 : int ecode4 = 0 ;
16899 5 : double val5 ;
16900 5 : int ecode5 = 0 ;
16901 5 : PyObject *swig_obj[5] ;
16902 5 : bool result;
16903 :
16904 5 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetAreaOfInterest", 5, 5, swig_obj)) SWIG_fail;
16905 5 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
16906 5 : if (!SWIG_IsOK(res1)) {
16907 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16908 : }
16909 5 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16910 5 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
16911 5 : if (!SWIG_IsOK(ecode2)) {
16912 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "2"" of type '" "double""'");
16913 : }
16914 5 : arg2 = static_cast< double >(val2);
16915 5 : ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
16916 5 : if (!SWIG_IsOK(ecode3)) {
16917 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "3"" of type '" "double""'");
16918 : }
16919 5 : arg3 = static_cast< double >(val3);
16920 5 : ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
16921 5 : if (!SWIG_IsOK(ecode4)) {
16922 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "4"" of type '" "double""'");
16923 : }
16924 5 : arg4 = static_cast< double >(val4);
16925 5 : ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
16926 5 : if (!SWIG_IsOK(ecode5)) {
16927 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformationOptions_SetAreaOfInterest" "', argument " "5"" of type '" "double""'");
16928 : }
16929 5 : arg5 = static_cast< double >(val5);
16930 5 : {
16931 5 : const int bLocalUseExceptions = GetUseExceptions();
16932 5 : if ( bLocalUseExceptions ) {
16933 5 : pushErrorHandler();
16934 : }
16935 5 : result = (bool)OGRCoordinateTransformationOptions_SetAreaOfInterest(arg1,arg2,arg3,arg4,arg5);
16936 5 : if ( bLocalUseExceptions ) {
16937 5 : popErrorHandler();
16938 : }
16939 : #ifndef SED_HACKS
16940 : if ( bLocalUseExceptions ) {
16941 : CPLErr eclass = CPLGetLastErrorType();
16942 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
16943 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
16944 : }
16945 : }
16946 : #endif
16947 : }
16948 5 : resultobj = SWIG_From_bool(static_cast< bool >(result));
16949 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; } }
16950 : return resultobj;
16951 : fail:
16952 : return NULL;
16953 : }
16954 :
16955 :
16956 8 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetOperation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16957 8 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
16958 8 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
16959 8 : char *arg2 = (char *) 0 ;
16960 8 : bool arg3 = (bool) false ;
16961 8 : void *argp1 = 0 ;
16962 8 : int res1 = 0 ;
16963 8 : int res2 ;
16964 8 : char *buf2 = 0 ;
16965 8 : int alloc2 = 0 ;
16966 8 : bool val3 ;
16967 8 : int ecode3 = 0 ;
16968 8 : PyObject *swig_obj[3] ;
16969 8 : bool result;
16970 :
16971 8 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetOperation", 2, 3, swig_obj)) SWIG_fail;
16972 8 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
16973 8 : if (!SWIG_IsOK(res1)) {
16974 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetOperation" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
16975 : }
16976 8 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
16977 8 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
16978 8 : if (!SWIG_IsOK(res2)) {
16979 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CoordinateTransformationOptions_SetOperation" "', argument " "2"" of type '" "char const *""'");
16980 : }
16981 8 : arg2 = reinterpret_cast< char * >(buf2);
16982 8 : if (swig_obj[2]) {
16983 1 : ecode3 = SWIG_AsVal_bool(swig_obj[2], &val3);
16984 1 : if (!SWIG_IsOK(ecode3)) {
16985 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformationOptions_SetOperation" "', argument " "3"" of type '" "bool""'");
16986 : }
16987 : arg3 = static_cast< bool >(val3);
16988 : }
16989 8 : {
16990 8 : const int bLocalUseExceptions = GetUseExceptions();
16991 8 : if ( bLocalUseExceptions ) {
16992 7 : pushErrorHandler();
16993 : }
16994 8 : result = (bool)OGRCoordinateTransformationOptions_SetOperation(arg1,(char const *)arg2,arg3);
16995 8 : if ( bLocalUseExceptions ) {
16996 7 : popErrorHandler();
16997 : }
16998 : #ifndef SED_HACKS
16999 : if ( bLocalUseExceptions ) {
17000 : CPLErr eclass = CPLGetLastErrorType();
17001 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17002 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17003 : }
17004 : }
17005 : #endif
17006 : }
17007 8 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17008 8 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
17009 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; } }
17010 : return resultobj;
17011 0 : fail:
17012 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
17013 : return NULL;
17014 : }
17015 :
17016 :
17017 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetDesiredAccuracy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17018 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17019 1 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
17020 1 : double arg2 ;
17021 1 : void *argp1 = 0 ;
17022 1 : int res1 = 0 ;
17023 1 : double val2 ;
17024 1 : int ecode2 = 0 ;
17025 1 : PyObject *swig_obj[2] ;
17026 1 : bool result;
17027 :
17028 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetDesiredAccuracy", 2, 2, swig_obj)) SWIG_fail;
17029 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17030 1 : if (!SWIG_IsOK(res1)) {
17031 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetDesiredAccuracy" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
17032 : }
17033 1 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
17034 1 : ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
17035 1 : if (!SWIG_IsOK(ecode2)) {
17036 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetDesiredAccuracy" "', argument " "2"" of type '" "double""'");
17037 : }
17038 1 : arg2 = static_cast< double >(val2);
17039 1 : {
17040 1 : const int bLocalUseExceptions = GetUseExceptions();
17041 1 : if ( bLocalUseExceptions ) {
17042 1 : pushErrorHandler();
17043 : }
17044 1 : result = (bool)OGRCoordinateTransformationOptions_SetDesiredAccuracy(arg1,arg2);
17045 1 : if ( bLocalUseExceptions ) {
17046 1 : popErrorHandler();
17047 : }
17048 : #ifndef SED_HACKS
17049 : if ( bLocalUseExceptions ) {
17050 : CPLErr eclass = CPLGetLastErrorType();
17051 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17052 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17053 : }
17054 : }
17055 : #endif
17056 : }
17057 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17058 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; } }
17059 : return resultobj;
17060 : fail:
17061 : return NULL;
17062 : }
17063 :
17064 :
17065 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetBallparkAllowed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17066 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17067 1 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
17068 1 : bool arg2 ;
17069 1 : void *argp1 = 0 ;
17070 1 : int res1 = 0 ;
17071 1 : bool val2 ;
17072 1 : int ecode2 = 0 ;
17073 1 : PyObject *swig_obj[2] ;
17074 1 : bool result;
17075 :
17076 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetBallparkAllowed", 2, 2, swig_obj)) SWIG_fail;
17077 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17078 1 : if (!SWIG_IsOK(res1)) {
17079 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetBallparkAllowed" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
17080 : }
17081 1 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
17082 1 : ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
17083 1 : if (!SWIG_IsOK(ecode2)) {
17084 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetBallparkAllowed" "', argument " "2"" of type '" "bool""'");
17085 : }
17086 1 : arg2 = static_cast< bool >(val2);
17087 1 : {
17088 1 : const int bLocalUseExceptions = GetUseExceptions();
17089 1 : if ( bLocalUseExceptions ) {
17090 1 : pushErrorHandler();
17091 : }
17092 1 : result = (bool)OGRCoordinateTransformationOptions_SetBallparkAllowed(arg1,arg2);
17093 1 : if ( bLocalUseExceptions ) {
17094 1 : popErrorHandler();
17095 : }
17096 : #ifndef SED_HACKS
17097 : if ( bLocalUseExceptions ) {
17098 : CPLErr eclass = CPLGetLastErrorType();
17099 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17100 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17101 : }
17102 : }
17103 : #endif
17104 : }
17105 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17106 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; } }
17107 : return resultobj;
17108 : fail:
17109 : return NULL;
17110 : }
17111 :
17112 :
17113 0 : SWIGINTERN PyObject *_wrap_CoordinateTransformationOptions_SetOnlyBest(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17114 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17115 0 : OGRCoordinateTransformationOptions *arg1 = (OGRCoordinateTransformationOptions *) 0 ;
17116 0 : bool arg2 ;
17117 0 : void *argp1 = 0 ;
17118 0 : int res1 = 0 ;
17119 0 : bool val2 ;
17120 0 : int ecode2 = 0 ;
17121 0 : PyObject *swig_obj[2] ;
17122 0 : bool result;
17123 :
17124 0 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformationOptions_SetOnlyBest", 2, 2, swig_obj)) SWIG_fail;
17125 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17126 0 : if (!SWIG_IsOK(res1)) {
17127 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformationOptions_SetOnlyBest" "', argument " "1"" of type '" "OGRCoordinateTransformationOptions *""'");
17128 : }
17129 0 : arg1 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp1);
17130 0 : ecode2 = SWIG_AsVal_bool(swig_obj[1], &val2);
17131 0 : if (!SWIG_IsOK(ecode2)) {
17132 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CoordinateTransformationOptions_SetOnlyBest" "', argument " "2"" of type '" "bool""'");
17133 : }
17134 0 : arg2 = static_cast< bool >(val2);
17135 0 : {
17136 0 : const int bLocalUseExceptions = GetUseExceptions();
17137 0 : if ( bLocalUseExceptions ) {
17138 0 : pushErrorHandler();
17139 : }
17140 0 : result = (bool)OGRCoordinateTransformationOptions_SetOnlyBest(arg1,arg2);
17141 0 : if ( bLocalUseExceptions ) {
17142 0 : popErrorHandler();
17143 : }
17144 : #ifndef SED_HACKS
17145 : if ( bLocalUseExceptions ) {
17146 : CPLErr eclass = CPLGetLastErrorType();
17147 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17148 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17149 : }
17150 : }
17151 : #endif
17152 : }
17153 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
17154 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; } }
17155 : return resultobj;
17156 : fail:
17157 : return NULL;
17158 : }
17159 :
17160 :
17161 276 : SWIGINTERN PyObject *CoordinateTransformationOptions_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17162 276 : PyObject *obj;
17163 276 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
17164 276 : SWIG_TypeNewClientData(SWIGTYPE_p_OGRCoordinateTransformationOptions, SWIG_NewClientData(obj));
17165 276 : return SWIG_Py_Void();
17166 : }
17167 :
17168 11 : SWIGINTERN PyObject *CoordinateTransformationOptions_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17169 11 : return SWIG_Python_InitShadowInstance(args);
17170 : }
17171 :
17172 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformation__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17173 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17174 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
17175 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
17176 : void *argp1 = 0 ;
17177 : int res1 = 0 ;
17178 : void *argp2 = 0 ;
17179 : int res2 = 0 ;
17180 : OSRCoordinateTransformationShadow *result = 0 ;
17181 :
17182 : if ((nobjs < 2) || (nobjs > 2)) SWIG_fail;
17183 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17184 : if (!SWIG_IsOK(res1)) {
17185 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
17186 : }
17187 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
17188 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17189 : if (!SWIG_IsOK(res2)) {
17190 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
17191 : }
17192 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
17193 : {
17194 : const int bLocalUseExceptions = GetUseExceptions();
17195 : if ( bLocalUseExceptions ) {
17196 : pushErrorHandler();
17197 : }
17198 : result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow__SWIG_0(arg1,arg2);
17199 : if ( bLocalUseExceptions ) {
17200 : popErrorHandler();
17201 : }
17202 : #ifndef SED_HACKS
17203 : if ( bLocalUseExceptions ) {
17204 : CPLErr eclass = CPLGetLastErrorType();
17205 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17206 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17207 : }
17208 : }
17209 : #endif
17210 : }
17211 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_NEW | 0 );
17212 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17213 : return resultobj;
17214 : fail:
17215 : return NULL;
17216 : }
17217 :
17218 :
17219 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformation__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17220 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17221 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
17222 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
17223 : OGRCoordinateTransformationOptions *arg3 = (OGRCoordinateTransformationOptions *) 0 ;
17224 : void *argp1 = 0 ;
17225 : int res1 = 0 ;
17226 : void *argp2 = 0 ;
17227 : int res2 = 0 ;
17228 : void *argp3 = 0 ;
17229 : int res3 = 0 ;
17230 : OSRCoordinateTransformationShadow *result = 0 ;
17231 :
17232 : if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
17233 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17234 : if (!SWIG_IsOK(res1)) {
17235 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
17236 : }
17237 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
17238 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
17239 : if (!SWIG_IsOK(res2)) {
17240 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
17241 : }
17242 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
17243 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
17244 : if (!SWIG_IsOK(res3)) {
17245 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CoordinateTransformation" "', argument " "3"" of type '" "OGRCoordinateTransformationOptions *""'");
17246 : }
17247 : arg3 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp3);
17248 : {
17249 : const int bLocalUseExceptions = GetUseExceptions();
17250 : if ( bLocalUseExceptions ) {
17251 : pushErrorHandler();
17252 : }
17253 : result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow__SWIG_1(arg1,arg2,arg3);
17254 : if ( bLocalUseExceptions ) {
17255 : popErrorHandler();
17256 : }
17257 : #ifndef SED_HACKS
17258 : if ( bLocalUseExceptions ) {
17259 : CPLErr eclass = CPLGetLastErrorType();
17260 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17261 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17262 : }
17263 : }
17264 : #endif
17265 : }
17266 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_NEW | 0 );
17267 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17268 : return resultobj;
17269 : fail:
17270 : return NULL;
17271 : }
17272 :
17273 :
17274 152 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformation(PyObject *self, PyObject *args) {
17275 152 : Py_ssize_t argc;
17276 152 : PyObject *argv[4] = {
17277 : 0
17278 : };
17279 :
17280 152 : if (!(argc = SWIG_Python_UnpackTuple(args, "new_CoordinateTransformation", 0, 3, argv))) SWIG_fail;
17281 152 : --argc;
17282 152 : if (argc == 2) {
17283 142 : int _v;
17284 142 : void *vptr = 0;
17285 142 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17286 142 : _v = SWIG_CheckState(res);
17287 142 : if (_v) {
17288 142 : void *vptr = 0;
17289 142 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17290 142 : _v = SWIG_CheckState(res);
17291 0 : if (_v) {
17292 142 : return _wrap_new_CoordinateTransformation__SWIG_0(self, argc, argv);
17293 : }
17294 : }
17295 : }
17296 10 : if (argc == 3) {
17297 10 : int _v;
17298 10 : void *vptr = 0;
17299 10 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17300 10 : _v = SWIG_CheckState(res);
17301 10 : if (_v) {
17302 10 : void *vptr = 0;
17303 10 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_OSRSpatialReferenceShadow, 0);
17304 10 : _v = SWIG_CheckState(res);
17305 10 : if (_v) {
17306 10 : void *vptr = 0;
17307 10 : int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_OGRCoordinateTransformationOptions, 0);
17308 10 : _v = SWIG_CheckState(res);
17309 0 : if (_v) {
17310 10 : return _wrap_new_CoordinateTransformation__SWIG_1(self, argc, argv);
17311 : }
17312 : }
17313 : }
17314 : }
17315 :
17316 0 : fail:
17317 0 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_CoordinateTransformation'.\n"
17318 : " Possible C/C++ prototypes are:\n"
17319 : " OSRCoordinateTransformationShadow::OSRCoordinateTransformationShadow(OSRSpatialReferenceShadow *,OSRSpatialReferenceShadow *)\n"
17320 : " OSRCoordinateTransformationShadow::OSRCoordinateTransformationShadow(OSRSpatialReferenceShadow *,OSRSpatialReferenceShadow *,OGRCoordinateTransformationOptions *)\n");
17321 : return 0;
17322 : }
17323 :
17324 :
17325 152 : SWIGINTERN PyObject *_wrap_delete_CoordinateTransformation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17326 152 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17327 152 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17328 152 : void *argp1 = 0 ;
17329 152 : int res1 = 0 ;
17330 152 : PyObject *swig_obj[1] ;
17331 :
17332 152 : if (!args) SWIG_fail;
17333 152 : swig_obj[0] = args;
17334 152 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_DISOWN | 0 );
17335 152 : if (!SWIG_IsOK(res1)) {
17336 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoordinateTransformation" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17337 : }
17338 152 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17339 152 : {
17340 152 : const int bLocalUseExceptions = GetUseExceptions();
17341 152 : if ( bLocalUseExceptions ) {
17342 134 : pushErrorHandler();
17343 : }
17344 152 : delete_OSRCoordinateTransformationShadow(arg1);
17345 152 : if ( bLocalUseExceptions ) {
17346 134 : popErrorHandler();
17347 : }
17348 : #ifndef SED_HACKS
17349 : if ( bLocalUseExceptions ) {
17350 : CPLErr eclass = CPLGetLastErrorType();
17351 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17352 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17353 : }
17354 : }
17355 : #endif
17356 : }
17357 152 : resultobj = SWIG_Py_Void();
17358 152 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17359 : return resultobj;
17360 : fail:
17361 : return NULL;
17362 : }
17363 :
17364 :
17365 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_GetInverse(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17366 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17367 1 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17368 1 : void *argp1 = 0 ;
17369 1 : int res1 = 0 ;
17370 1 : PyObject *swig_obj[1] ;
17371 1 : OSRCoordinateTransformationShadow *result = 0 ;
17372 :
17373 1 : if (!args) SWIG_fail;
17374 1 : swig_obj[0] = args;
17375 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17376 1 : if (!SWIG_IsOK(res1)) {
17377 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_GetInverse" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17378 : }
17379 1 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17380 1 : {
17381 1 : const int bLocalUseExceptions = GetUseExceptions();
17382 1 : if ( bLocalUseExceptions ) {
17383 1 : pushErrorHandler();
17384 : }
17385 1 : result = (OSRCoordinateTransformationShadow *)OSRCoordinateTransformationShadow_GetInverse(arg1);
17386 1 : if ( bLocalUseExceptions ) {
17387 1 : popErrorHandler();
17388 : }
17389 : #ifndef SED_HACKS
17390 : if ( bLocalUseExceptions ) {
17391 : CPLErr eclass = CPLGetLastErrorType();
17392 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17393 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17394 : }
17395 : }
17396 : #endif
17397 : }
17398 1 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_OWN | 0 );
17399 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; } }
17400 : return resultobj;
17401 : fail:
17402 : return NULL;
17403 : }
17404 :
17405 :
17406 1 : SWIGINTERN PyObject *_wrap_CoordinateTransformation__TransformPoint3Double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17407 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17408 1 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17409 1 : double *arg2 ;
17410 1 : void *argp1 = 0 ;
17411 1 : int res1 = 0 ;
17412 1 : double argin2[3] ;
17413 1 : PyObject *swig_obj[2] ;
17414 :
17415 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation__TransformPoint3Double", 2, 2, swig_obj)) SWIG_fail;
17416 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17417 1 : if (!SWIG_IsOK(res1)) {
17418 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation__TransformPoint3Double" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17419 : }
17420 1 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17421 1 : {
17422 : /* %typemap(in) (double argin2[ANY]) */
17423 1 : arg2 = argin2;
17424 1 : if (! PySequence_Check(swig_obj[1]) ) {
17425 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
17426 0 : SWIG_fail;
17427 : }
17428 1 : Py_ssize_t seq_size = PySequence_Size(swig_obj[1]);
17429 1 : if ( seq_size != 3 ) {
17430 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
17431 0 : SWIG_fail;
17432 : }
17433 4 : for (unsigned int i=0; i<3; i++) {
17434 3 : PyObject *o = PySequence_GetItem(swig_obj[1],i);
17435 3 : double val;
17436 3 : if ( !PyArg_Parse(o, "d", &val ) ) {
17437 0 : PyErr_SetString(PyExc_TypeError, "not a number");
17438 0 : Py_DECREF(o);
17439 0 : SWIG_fail;
17440 : }
17441 3 : arg2[i] = val;
17442 3 : Py_DECREF(o);
17443 : }
17444 : }
17445 1 : {
17446 1 : const int bLocalUseExceptions = GetUseExceptions();
17447 1 : if ( bLocalUseExceptions ) {
17448 1 : pushErrorHandler();
17449 : }
17450 1 : OSRCoordinateTransformationShadow__TransformPoint3Double(arg1,arg2);
17451 1 : if ( bLocalUseExceptions ) {
17452 1 : popErrorHandler();
17453 : }
17454 : #ifndef SED_HACKS
17455 : if ( bLocalUseExceptions ) {
17456 : CPLErr eclass = CPLGetLastErrorType();
17457 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17458 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17459 : }
17460 : }
17461 : #endif
17462 : }
17463 1 : resultobj = SWIG_Py_Void();
17464 1 : {
17465 : /* %typemap(argout) (double argout[ANY]) */
17466 1 : PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
17467 : #if SWIG_VERSION >= 0x040300
17468 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
17469 : #else
17470 1 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
17471 : #endif
17472 : }
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__TransformPoint4Double(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[4] ;
17487 1 : PyObject *swig_obj[2] ;
17488 :
17489 1 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation__TransformPoint4Double", 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__TransformPoint4Double" "', 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 != 4 ) {
17504 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
17505 0 : SWIG_fail;
17506 : }
17507 5 : for (unsigned int i=0; i<4; i++) {
17508 4 : PyObject *o = PySequence_GetItem(swig_obj[1],i);
17509 4 : double val;
17510 4 : 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 4 : arg2[i] = val;
17516 4 : Py_DECREF(o);
17517 : }
17518 : }
17519 1 : {
17520 1 : const int bLocalUseExceptions = GetUseExceptions();
17521 1 : if ( bLocalUseExceptions ) {
17522 1 : pushErrorHandler();
17523 : }
17524 1 : OSRCoordinateTransformationShadow__TransformPoint4Double(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, 4 );
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 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17555 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17556 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17557 : double *arg2 ;
17558 : double arg3 ;
17559 : double arg4 ;
17560 : double arg5 = (double) 0.0 ;
17561 : void *argp1 = 0 ;
17562 : int res1 = 0 ;
17563 : double argout2[3] ;
17564 : double val3 ;
17565 : int ecode3 = 0 ;
17566 : double val4 ;
17567 : int ecode4 = 0 ;
17568 : double val5 ;
17569 : int ecode5 = 0 ;
17570 :
17571 : {
17572 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
17573 : memset(argout2, 0, sizeof(argout2));
17574 : arg2 = argout2;
17575 : }
17576 : if ((nobjs < 3) || (nobjs > 4)) SWIG_fail;
17577 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17578 : if (!SWIG_IsOK(res1)) {
17579 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17580 : }
17581 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17582 : ecode3 = SWIG_AsVal_double(swig_obj[1], &val3);
17583 : if (!SWIG_IsOK(ecode3)) {
17584 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "3"" of type '" "double""'");
17585 : }
17586 : arg3 = static_cast< double >(val3);
17587 : ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
17588 : if (!SWIG_IsOK(ecode4)) {
17589 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "4"" of type '" "double""'");
17590 : }
17591 : arg4 = static_cast< double >(val4);
17592 : if (swig_obj[3]) {
17593 : ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
17594 : if (!SWIG_IsOK(ecode5)) {
17595 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "5"" of type '" "double""'");
17596 : }
17597 : arg5 = static_cast< double >(val5);
17598 : }
17599 : {
17600 : const int bLocalUseExceptions = GetUseExceptions();
17601 : if ( bLocalUseExceptions ) {
17602 : pushErrorHandler();
17603 : }
17604 : OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(arg1,arg2,arg3,arg4,arg5);
17605 : if ( bLocalUseExceptions ) {
17606 : popErrorHandler();
17607 : }
17608 : #ifndef SED_HACKS
17609 : if ( bLocalUseExceptions ) {
17610 : CPLErr eclass = CPLGetLastErrorType();
17611 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17612 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17613 : }
17614 : }
17615 : #endif
17616 : }
17617 : resultobj = SWIG_Py_Void();
17618 : {
17619 : /* %typemap(argout) (double argout[ANY]) */
17620 : PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
17621 : #if SWIG_VERSION >= 0x040300
17622 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
17623 : #else
17624 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
17625 : #endif
17626 : }
17627 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17628 : return resultobj;
17629 : fail:
17630 : return NULL;
17631 : }
17632 :
17633 :
17634 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
17635 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17636 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17637 : double *arg2 ;
17638 : double arg3 ;
17639 : double arg4 ;
17640 : double arg5 ;
17641 : double arg6 ;
17642 : void *argp1 = 0 ;
17643 : int res1 = 0 ;
17644 : double argout2[4] ;
17645 : double val3 ;
17646 : int ecode3 = 0 ;
17647 : double val4 ;
17648 : int ecode4 = 0 ;
17649 : double val5 ;
17650 : int ecode5 = 0 ;
17651 : double val6 ;
17652 : int ecode6 = 0 ;
17653 :
17654 : {
17655 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
17656 : memset(argout2, 0, sizeof(argout2));
17657 : arg2 = argout2;
17658 : }
17659 : if ((nobjs < 5) || (nobjs > 5)) SWIG_fail;
17660 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17661 : if (!SWIG_IsOK(res1)) {
17662 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17663 : }
17664 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17665 : ecode3 = SWIG_AsVal_double(swig_obj[1], &val3);
17666 : if (!SWIG_IsOK(ecode3)) {
17667 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "3"" of type '" "double""'");
17668 : }
17669 : arg3 = static_cast< double >(val3);
17670 : ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
17671 : if (!SWIG_IsOK(ecode4)) {
17672 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "4"" of type '" "double""'");
17673 : }
17674 : arg4 = static_cast< double >(val4);
17675 : ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
17676 : if (!SWIG_IsOK(ecode5)) {
17677 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "5"" of type '" "double""'");
17678 : }
17679 : arg5 = static_cast< double >(val5);
17680 : ecode6 = SWIG_AsVal_double(swig_obj[4], &val6);
17681 : if (!SWIG_IsOK(ecode6)) {
17682 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "6"" of type '" "double""'");
17683 : }
17684 : arg6 = static_cast< double >(val6);
17685 : {
17686 : const int bLocalUseExceptions = GetUseExceptions();
17687 : if ( bLocalUseExceptions ) {
17688 : pushErrorHandler();
17689 : }
17690 : OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6);
17691 : if ( bLocalUseExceptions ) {
17692 : popErrorHandler();
17693 : }
17694 : #ifndef SED_HACKS
17695 : if ( bLocalUseExceptions ) {
17696 : CPLErr eclass = CPLGetLastErrorType();
17697 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17698 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17699 : }
17700 : }
17701 : #endif
17702 : }
17703 : resultobj = SWIG_Py_Void();
17704 : {
17705 : /* %typemap(argout) (double argout[ANY]) */
17706 : PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
17707 : #if SWIG_VERSION >= 0x040300
17708 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
17709 : #else
17710 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
17711 : #endif
17712 : }
17713 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
17714 : return resultobj;
17715 : fail:
17716 : return NULL;
17717 : }
17718 :
17719 :
17720 206 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint(PyObject *self, PyObject *args) {
17721 206 : Py_ssize_t argc;
17722 206 : PyObject *argv[6] = {
17723 : 0
17724 : };
17725 :
17726 206 : if (!(argc = SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformPoint", 0, 5, argv))) SWIG_fail;
17727 206 : --argc;
17728 206 : if ((argc >= 3) && (argc <= 4)) {
17729 202 : int _v;
17730 202 : void *vptr = 0;
17731 202 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
17732 202 : _v = SWIG_CheckState(res);
17733 200 : if (_v) {
17734 200 : {
17735 200 : int res = SWIG_AsVal_double(argv[1], NULL);
17736 200 : _v = SWIG_CheckState(res);
17737 : }
17738 200 : if (_v) {
17739 200 : {
17740 200 : int res = SWIG_AsVal_double(argv[2], NULL);
17741 200 : _v = SWIG_CheckState(res);
17742 : }
17743 200 : if (_v) {
17744 200 : if (argc <= 3) {
17745 200 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_0(self, argc, argv);
17746 : }
17747 116 : {
17748 116 : int res = SWIG_AsVal_double(argv[3], NULL);
17749 116 : _v = SWIG_CheckState(res);
17750 : }
17751 116 : if (_v) {
17752 116 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_0(self, argc, argv);
17753 : }
17754 : }
17755 : }
17756 : }
17757 : }
17758 6 : if (argc == 5) {
17759 4 : int _v;
17760 4 : void *vptr = 0;
17761 4 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
17762 4 : _v = SWIG_CheckState(res);
17763 4 : if (_v) {
17764 4 : {
17765 4 : int res = SWIG_AsVal_double(argv[1], NULL);
17766 4 : _v = SWIG_CheckState(res);
17767 : }
17768 4 : if (_v) {
17769 4 : {
17770 4 : int res = SWIG_AsVal_double(argv[2], NULL);
17771 4 : _v = SWIG_CheckState(res);
17772 : }
17773 4 : if (_v) {
17774 4 : {
17775 4 : int res = SWIG_AsVal_double(argv[3], NULL);
17776 4 : _v = SWIG_CheckState(res);
17777 : }
17778 4 : if (_v) {
17779 4 : {
17780 4 : int res = SWIG_AsVal_double(argv[4], NULL);
17781 4 : _v = SWIG_CheckState(res);
17782 : }
17783 4 : if (_v) {
17784 4 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_1(self, argc, argv);
17785 : }
17786 : }
17787 : }
17788 : }
17789 : }
17790 : }
17791 :
17792 2 : fail:
17793 2 : SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'CoordinateTransformation_TransformPoint'.\n"
17794 : " Possible C/C++ prototypes are:\n"
17795 : " OSRCoordinateTransformationShadow::TransformPoint(double [3],double,double,double)\n"
17796 : " OSRCoordinateTransformationShadow::TransformPoint(double [4],double,double,double,double)\n");
17797 : return 0;
17798 : }
17799 :
17800 :
17801 0 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPointWithErrorCode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17802 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17803 0 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17804 0 : double *arg2 ;
17805 0 : int *arg3 ;
17806 0 : double arg4 ;
17807 0 : double arg5 ;
17808 0 : double arg6 ;
17809 0 : double arg7 ;
17810 0 : void *argp1 = 0 ;
17811 0 : int res1 = 0 ;
17812 0 : double argout2[4] ;
17813 0 : int errorCode2[1] ;
17814 0 : double val4 ;
17815 0 : int ecode4 = 0 ;
17816 0 : double val5 ;
17817 0 : int ecode5 = 0 ;
17818 0 : double val6 ;
17819 0 : int ecode6 = 0 ;
17820 0 : double val7 ;
17821 0 : int ecode7 = 0 ;
17822 0 : PyObject *swig_obj[5] ;
17823 :
17824 0 : {
17825 : /* %typemap(in) (double argout2[4], int errorCode2[1]) */
17826 0 : arg2 = argout2;
17827 0 : arg3 = errorCode2;
17828 : }
17829 0 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformPointWithErrorCode", 5, 5, swig_obj)) SWIG_fail;
17830 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17831 0 : if (!SWIG_IsOK(res1)) {
17832 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17833 : }
17834 0 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17835 0 : ecode4 = SWIG_AsVal_double(swig_obj[1], &val4);
17836 0 : if (!SWIG_IsOK(ecode4)) {
17837 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "4"" of type '" "double""'");
17838 : }
17839 0 : arg4 = static_cast< double >(val4);
17840 0 : ecode5 = SWIG_AsVal_double(swig_obj[2], &val5);
17841 0 : if (!SWIG_IsOK(ecode5)) {
17842 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "5"" of type '" "double""'");
17843 : }
17844 0 : arg5 = static_cast< double >(val5);
17845 0 : ecode6 = SWIG_AsVal_double(swig_obj[3], &val6);
17846 0 : if (!SWIG_IsOK(ecode6)) {
17847 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "6"" of type '" "double""'");
17848 : }
17849 0 : arg6 = static_cast< double >(val6);
17850 0 : ecode7 = SWIG_AsVal_double(swig_obj[4], &val7);
17851 0 : if (!SWIG_IsOK(ecode7)) {
17852 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CoordinateTransformation_TransformPointWithErrorCode" "', argument " "7"" of type '" "double""'");
17853 : }
17854 0 : arg7 = static_cast< double >(val7);
17855 0 : {
17856 0 : const int bLocalUseExceptions = GetUseExceptions();
17857 0 : if ( bLocalUseExceptions ) {
17858 0 : pushErrorHandler();
17859 : }
17860 0 : OSRCoordinateTransformationShadow_TransformPointWithErrorCode(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
17861 0 : if ( bLocalUseExceptions ) {
17862 0 : popErrorHandler();
17863 : }
17864 : #ifndef SED_HACKS
17865 : if ( bLocalUseExceptions ) {
17866 : CPLErr eclass = CPLGetLastErrorType();
17867 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17868 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17869 : }
17870 : }
17871 : #endif
17872 : }
17873 0 : resultobj = SWIG_Py_Void();
17874 0 : {
17875 : /* %typemap(argout) (double argout[4], int errorCode[1]) */
17876 0 : PyObject *r = PyTuple_New( 5 );
17877 0 : PyTuple_SetItem( r, 0, PyFloat_FromDouble(arg2[0]));
17878 0 : PyTuple_SetItem( r, 1, PyFloat_FromDouble(arg2[1]));
17879 0 : PyTuple_SetItem( r, 2, PyFloat_FromDouble(arg2[2]));
17880 0 : PyTuple_SetItem( r, 3, PyFloat_FromDouble(arg2[3]));
17881 0 : PyTuple_SetItem( r, 4, PyLong_FromLong(arg3[0]));
17882 : #if SWIG_VERSION >= 0x040300
17883 : resultobj = SWIG_Python_AppendOutput(resultobj,r,$isvoid);
17884 : #else
17885 0 : resultobj = SWIG_Python_AppendOutput(resultobj,r);
17886 : #endif
17887 : }
17888 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; } }
17889 : return resultobj;
17890 : fail:
17891 : return NULL;
17892 : }
17893 :
17894 :
17895 10 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17896 10 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
17897 10 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
17898 10 : int arg2 ;
17899 10 : double *arg3 = (double *) 0 ;
17900 10 : double *arg4 = (double *) 0 ;
17901 10 : double *arg5 = (double *) 0 ;
17902 10 : double *arg6 = (double *) 0 ;
17903 10 : void *argp1 = 0 ;
17904 10 : int res1 = 0 ;
17905 10 : int foundTime2 = FALSE ;
17906 10 : PyObject *swig_obj[2] ;
17907 :
17908 10 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformPoints", 2, 2, swig_obj)) SWIG_fail;
17909 10 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
17910 10 : if (!SWIG_IsOK(res1)) {
17911 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoints" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
17912 : }
17913 10 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
17914 10 : {
17915 10 : if ( !PySequence_Check(swig_obj[1]) ) {
17916 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
17917 0 : SWIG_fail;
17918 : }
17919 :
17920 10 : Py_ssize_t size = PySequence_Size(swig_obj[1]);
17921 10 : if( size != (int)size ) {
17922 0 : PyErr_SetString(PyExc_TypeError, "too big sequence");
17923 0 : SWIG_fail;
17924 : }
17925 10 : arg2 = (int)size;
17926 10 : arg3 = (double*) VSIMalloc(arg2*sizeof(double));
17927 10 : arg4 = (double*) VSIMalloc(arg2*sizeof(double));
17928 10 : arg5 = (double*) VSIMalloc(arg2*sizeof(double));
17929 10 : arg6 = (double*) VSIMalloc(arg2*sizeof(double));
17930 :
17931 10 : if (arg3 == NULL || arg4 == NULL || arg5 == NULL || arg6 == NULL)
17932 : {
17933 0 : PyErr_SetString( PyExc_RuntimeError, "Out of memory" );
17934 0 : SWIG_fail;
17935 : }
17936 :
17937 10 : if (!DecomposeSequenceOf4DCoordinates(swig_obj[1],arg2,arg3,arg4,arg5,arg6, &foundTime2)) {
17938 0 : SWIG_fail;
17939 : }
17940 : }
17941 10 : {
17942 10 : const int bLocalUseExceptions = GetUseExceptions();
17943 10 : if ( bLocalUseExceptions ) {
17944 10 : pushErrorHandler();
17945 : }
17946 10 : OSRCoordinateTransformationShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5,arg6);
17947 10 : if ( bLocalUseExceptions ) {
17948 10 : popErrorHandler();
17949 : }
17950 : #ifndef SED_HACKS
17951 : if ( bLocalUseExceptions ) {
17952 : CPLErr eclass = CPLGetLastErrorType();
17953 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
17954 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
17955 : }
17956 : }
17957 : #endif
17958 : }
17959 10 : resultobj = SWIG_Py_Void();
17960 10 : {
17961 : /* %typemap(argout) (int nCount, double *x, double *y, double *z, double *t) */
17962 10 : Py_DECREF(resultobj);
17963 10 : PyObject *out = PyList_New( arg2 );
17964 10 : if( !out ) {
17965 0 : SWIG_fail;
17966 : }
17967 10 : int foundTime = foundTime2;
17968 33 : for( int i=0; i< arg2; i++ ) {
17969 38 : PyObject *tuple = PyTuple_New( foundTime ? 4 : 3 );
17970 23 : PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (arg3)[i] ) );
17971 23 : PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (arg4)[i] ) );
17972 23 : PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (arg5)[i] ) );
17973 23 : if( foundTime )
17974 8 : PyTuple_SetItem( tuple, 3, PyFloat_FromDouble( (arg6)[i] ) );
17975 23 : PyList_SetItem( out, i, tuple );
17976 : }
17977 10 : resultobj = out;
17978 : }
17979 10 : {
17980 : /* %typemap(freearg) (int nCount, double *x, double *y, double *z, double *t) */
17981 10 : VSIFree(arg3);
17982 10 : VSIFree(arg4);
17983 10 : VSIFree(arg5);
17984 10 : VSIFree(arg6);
17985 : }
17986 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; } }
17987 : return resultobj;
17988 0 : fail:
17989 0 : {
17990 : /* %typemap(freearg) (int nCount, double *x, double *y, double *z, double *t) */
17991 0 : VSIFree(arg3);
17992 0 : VSIFree(arg4);
17993 0 : VSIFree(arg5);
17994 0 : VSIFree(arg6);
17995 : }
17996 : return NULL;
17997 : }
17998 :
17999 :
18000 25 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformBounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18001 25 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18002 25 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
18003 25 : double *arg2 ;
18004 25 : double arg3 ;
18005 25 : double arg4 ;
18006 25 : double arg5 ;
18007 25 : double arg6 ;
18008 25 : int arg7 ;
18009 25 : void *argp1 = 0 ;
18010 25 : int res1 = 0 ;
18011 25 : double argout2[4] ;
18012 25 : double val3 ;
18013 25 : int ecode3 = 0 ;
18014 25 : double val4 ;
18015 25 : int ecode4 = 0 ;
18016 25 : double val5 ;
18017 25 : int ecode5 = 0 ;
18018 25 : double val6 ;
18019 25 : int ecode6 = 0 ;
18020 25 : int val7 ;
18021 25 : int ecode7 = 0 ;
18022 25 : PyObject *swig_obj[6] ;
18023 :
18024 25 : {
18025 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
18026 25 : memset(argout2, 0, sizeof(argout2));
18027 25 : arg2 = argout2;
18028 : }
18029 25 : if (!SWIG_Python_UnpackTuple(args, "CoordinateTransformation_TransformBounds", 6, 6, swig_obj)) SWIG_fail;
18030 25 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
18031 25 : if (!SWIG_IsOK(res1)) {
18032 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
18033 : }
18034 25 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
18035 25 : ecode3 = SWIG_AsVal_double(swig_obj[1], &val3);
18036 25 : if (!SWIG_IsOK(ecode3)) {
18037 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "3"" of type '" "double""'");
18038 : }
18039 25 : arg3 = static_cast< double >(val3);
18040 25 : ecode4 = SWIG_AsVal_double(swig_obj[2], &val4);
18041 25 : if (!SWIG_IsOK(ecode4)) {
18042 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "4"" of type '" "double""'");
18043 : }
18044 25 : arg4 = static_cast< double >(val4);
18045 25 : ecode5 = SWIG_AsVal_double(swig_obj[3], &val5);
18046 25 : if (!SWIG_IsOK(ecode5)) {
18047 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "5"" of type '" "double""'");
18048 : }
18049 25 : arg5 = static_cast< double >(val5);
18050 25 : ecode6 = SWIG_AsVal_double(swig_obj[4], &val6);
18051 25 : if (!SWIG_IsOK(ecode6)) {
18052 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "6"" of type '" "double""'");
18053 : }
18054 25 : arg6 = static_cast< double >(val6);
18055 25 : ecode7 = SWIG_AsVal_int(swig_obj[5], &val7);
18056 25 : if (!SWIG_IsOK(ecode7)) {
18057 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "CoordinateTransformation_TransformBounds" "', argument " "7"" of type '" "int""'");
18058 : }
18059 25 : arg7 = static_cast< int >(val7);
18060 25 : {
18061 25 : const int bLocalUseExceptions = GetUseExceptions();
18062 25 : if ( bLocalUseExceptions ) {
18063 24 : pushErrorHandler();
18064 : }
18065 25 : OSRCoordinateTransformationShadow_TransformBounds(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
18066 25 : if ( bLocalUseExceptions ) {
18067 24 : popErrorHandler();
18068 : }
18069 : #ifndef SED_HACKS
18070 : if ( bLocalUseExceptions ) {
18071 : CPLErr eclass = CPLGetLastErrorType();
18072 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18073 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18074 : }
18075 : }
18076 : #endif
18077 : }
18078 25 : resultobj = SWIG_Py_Void();
18079 25 : {
18080 : /* %typemap(argout) (double argout[ANY]) */
18081 25 : PyObject *out = CreateTupleFromDoubleArray( arg2, 4 );
18082 : #if SWIG_VERSION >= 0x040300
18083 : resultobj = SWIG_Python_AppendOutput(resultobj,out,$isvoid);
18084 : #else
18085 25 : resultobj = SWIG_Python_AppendOutput(resultobj,out);
18086 : #endif
18087 : }
18088 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; } }
18089 : return resultobj;
18090 : fail:
18091 : return NULL;
18092 : }
18093 :
18094 :
18095 276 : SWIGINTERN PyObject *CoordinateTransformation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18096 276 : PyObject *obj;
18097 276 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
18098 276 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_NewClientData(obj));
18099 276 : return SWIG_Py_Void();
18100 : }
18101 :
18102 152 : SWIGINTERN PyObject *CoordinateTransformation_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18103 152 : return SWIG_Python_InitShadowInstance(args);
18104 : }
18105 :
18106 2 : SWIGINTERN PyObject *_wrap_CreateCoordinateTransformation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18107 2 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18108 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
18109 2 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
18110 2 : OGRCoordinateTransformationOptions *arg3 = (OGRCoordinateTransformationOptions *) NULL ;
18111 2 : void *argp1 = 0 ;
18112 2 : int res1 = 0 ;
18113 2 : void *argp2 = 0 ;
18114 2 : int res2 = 0 ;
18115 2 : void *argp3 = 0 ;
18116 2 : int res3 = 0 ;
18117 2 : PyObject *swig_obj[3] ;
18118 2 : OSRCoordinateTransformationShadow *result = 0 ;
18119 :
18120 2 : if (!SWIG_Python_UnpackTuple(args, "CreateCoordinateTransformation", 2, 3, swig_obj)) SWIG_fail;
18121 2 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
18122 2 : if (!SWIG_IsOK(res1)) {
18123 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateCoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
18124 : }
18125 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
18126 2 : res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
18127 2 : if (!SWIG_IsOK(res2)) {
18128 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CreateCoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
18129 : }
18130 2 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
18131 2 : if (swig_obj[2]) {
18132 0 : res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_OGRCoordinateTransformationOptions, 0 | 0 );
18133 0 : if (!SWIG_IsOK(res3)) {
18134 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "CreateCoordinateTransformation" "', argument " "3"" of type '" "OGRCoordinateTransformationOptions *""'");
18135 : }
18136 0 : arg3 = reinterpret_cast< OGRCoordinateTransformationOptions * >(argp3);
18137 : }
18138 2 : {
18139 2 : const int bLocalUseExceptions = GetUseExceptions();
18140 2 : if ( bLocalUseExceptions ) {
18141 2 : pushErrorHandler();
18142 : }
18143 2 : result = (OSRCoordinateTransformationShadow *)CreateCoordinateTransformation(arg1,arg2,arg3);
18144 2 : if ( bLocalUseExceptions ) {
18145 2 : popErrorHandler();
18146 : }
18147 : #ifndef SED_HACKS
18148 : if ( bLocalUseExceptions ) {
18149 : CPLErr eclass = CPLGetLastErrorType();
18150 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18151 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18152 : }
18153 : }
18154 : #endif
18155 : }
18156 2 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_OWN | 0 );
18157 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; } }
18158 : return resultobj;
18159 : fail:
18160 : return NULL;
18161 : }
18162 :
18163 :
18164 6609 : SWIGINTERN PyObject *_wrap_CRSInfo_auth_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18165 6609 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18166 6609 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18167 6609 : void *argp1 = 0 ;
18168 6609 : int res1 = 0 ;
18169 6609 : PyObject *swig_obj[1] ;
18170 6609 : char *result = 0 ;
18171 :
18172 6609 : if (!args) SWIG_fail;
18173 6609 : swig_obj[0] = args;
18174 6609 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18175 6609 : if (!SWIG_IsOK(res1)) {
18176 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_auth_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18177 : }
18178 6609 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18179 6609 : {
18180 6609 : const int bLocalUseExceptions = GetUseExceptions();
18181 6609 : if ( bLocalUseExceptions ) {
18182 6609 : pushErrorHandler();
18183 : }
18184 6609 : result = (char *)OSRCRSInfo_auth_name_get(arg1);
18185 6609 : if ( bLocalUseExceptions ) {
18186 6609 : popErrorHandler();
18187 : }
18188 : #ifndef SED_HACKS
18189 : if ( bLocalUseExceptions ) {
18190 : CPLErr eclass = CPLGetLastErrorType();
18191 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18192 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18193 : }
18194 : }
18195 : #endif
18196 : }
18197 6609 : resultobj = SWIG_FromCharPtr((const char *)result);
18198 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; } }
18199 : return resultobj;
18200 : fail:
18201 : return NULL;
18202 : }
18203 :
18204 :
18205 6609 : SWIGINTERN PyObject *_wrap_CRSInfo_code_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18206 6609 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18207 6609 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18208 6609 : void *argp1 = 0 ;
18209 6609 : int res1 = 0 ;
18210 6609 : PyObject *swig_obj[1] ;
18211 6609 : char *result = 0 ;
18212 :
18213 6609 : if (!args) SWIG_fail;
18214 6609 : swig_obj[0] = args;
18215 6609 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18216 6609 : if (!SWIG_IsOK(res1)) {
18217 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_code_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18218 : }
18219 6609 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18220 6609 : {
18221 6609 : const int bLocalUseExceptions = GetUseExceptions();
18222 6609 : if ( bLocalUseExceptions ) {
18223 6609 : pushErrorHandler();
18224 : }
18225 6609 : result = (char *)OSRCRSInfo_code_get(arg1);
18226 6609 : if ( bLocalUseExceptions ) {
18227 6609 : popErrorHandler();
18228 : }
18229 : #ifndef SED_HACKS
18230 : if ( bLocalUseExceptions ) {
18231 : CPLErr eclass = CPLGetLastErrorType();
18232 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18233 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18234 : }
18235 : }
18236 : #endif
18237 : }
18238 6609 : resultobj = SWIG_FromCharPtr((const char *)result);
18239 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; } }
18240 : return resultobj;
18241 : fail:
18242 : return NULL;
18243 : }
18244 :
18245 :
18246 1 : SWIGINTERN PyObject *_wrap_CRSInfo_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18247 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18248 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18249 1 : void *argp1 = 0 ;
18250 1 : int res1 = 0 ;
18251 1 : PyObject *swig_obj[1] ;
18252 1 : char *result = 0 ;
18253 :
18254 1 : if (!args) SWIG_fail;
18255 1 : swig_obj[0] = args;
18256 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18257 1 : if (!SWIG_IsOK(res1)) {
18258 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18259 : }
18260 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18261 1 : {
18262 1 : const int bLocalUseExceptions = GetUseExceptions();
18263 1 : if ( bLocalUseExceptions ) {
18264 1 : pushErrorHandler();
18265 : }
18266 1 : result = (char *)OSRCRSInfo_name_get(arg1);
18267 1 : if ( bLocalUseExceptions ) {
18268 1 : popErrorHandler();
18269 : }
18270 : #ifndef SED_HACKS
18271 : if ( bLocalUseExceptions ) {
18272 : CPLErr eclass = CPLGetLastErrorType();
18273 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18274 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18275 : }
18276 : }
18277 : #endif
18278 : }
18279 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18280 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; } }
18281 : return resultobj;
18282 : fail:
18283 : return NULL;
18284 : }
18285 :
18286 :
18287 1 : SWIGINTERN PyObject *_wrap_CRSInfo_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18288 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18289 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18290 1 : void *argp1 = 0 ;
18291 1 : int res1 = 0 ;
18292 1 : PyObject *swig_obj[1] ;
18293 1 : OSRCRSType result;
18294 :
18295 1 : if (!args) SWIG_fail;
18296 1 : swig_obj[0] = args;
18297 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18298 1 : if (!SWIG_IsOK(res1)) {
18299 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_type_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18300 : }
18301 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18302 1 : {
18303 1 : const int bLocalUseExceptions = GetUseExceptions();
18304 1 : if ( bLocalUseExceptions ) {
18305 1 : pushErrorHandler();
18306 : }
18307 1 : result = (OSRCRSType)OSRCRSInfo_type_get(arg1);
18308 1 : if ( bLocalUseExceptions ) {
18309 1 : popErrorHandler();
18310 : }
18311 : #ifndef SED_HACKS
18312 : if ( bLocalUseExceptions ) {
18313 : CPLErr eclass = CPLGetLastErrorType();
18314 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18315 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18316 : }
18317 : }
18318 : #endif
18319 : }
18320 1 : resultobj = SWIG_From_int(static_cast< int >(result));
18321 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; } }
18322 : return resultobj;
18323 : fail:
18324 : return NULL;
18325 : }
18326 :
18327 :
18328 1 : SWIGINTERN PyObject *_wrap_CRSInfo_deprecated_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18329 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18330 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18331 1 : void *argp1 = 0 ;
18332 1 : int res1 = 0 ;
18333 1 : PyObject *swig_obj[1] ;
18334 1 : bool result;
18335 :
18336 1 : if (!args) SWIG_fail;
18337 1 : swig_obj[0] = args;
18338 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18339 1 : if (!SWIG_IsOK(res1)) {
18340 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_deprecated_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18341 : }
18342 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18343 1 : {
18344 1 : const int bLocalUseExceptions = GetUseExceptions();
18345 1 : if ( bLocalUseExceptions ) {
18346 1 : pushErrorHandler();
18347 : }
18348 1 : result = (bool)OSRCRSInfo_deprecated_get(arg1);
18349 1 : if ( bLocalUseExceptions ) {
18350 1 : popErrorHandler();
18351 : }
18352 : #ifndef SED_HACKS
18353 : if ( bLocalUseExceptions ) {
18354 : CPLErr eclass = CPLGetLastErrorType();
18355 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18356 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18357 : }
18358 : }
18359 : #endif
18360 : }
18361 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
18362 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; } }
18363 : return resultobj;
18364 : fail:
18365 : return NULL;
18366 : }
18367 :
18368 :
18369 1 : SWIGINTERN PyObject *_wrap_CRSInfo_bbox_valid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18370 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18371 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18372 1 : void *argp1 = 0 ;
18373 1 : int res1 = 0 ;
18374 1 : PyObject *swig_obj[1] ;
18375 1 : bool result;
18376 :
18377 1 : if (!args) SWIG_fail;
18378 1 : swig_obj[0] = args;
18379 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18380 1 : if (!SWIG_IsOK(res1)) {
18381 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_bbox_valid_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18382 : }
18383 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18384 1 : {
18385 1 : const int bLocalUseExceptions = GetUseExceptions();
18386 1 : if ( bLocalUseExceptions ) {
18387 1 : pushErrorHandler();
18388 : }
18389 1 : result = (bool)OSRCRSInfo_bbox_valid_get(arg1);
18390 1 : if ( bLocalUseExceptions ) {
18391 1 : popErrorHandler();
18392 : }
18393 : #ifndef SED_HACKS
18394 : if ( bLocalUseExceptions ) {
18395 : CPLErr eclass = CPLGetLastErrorType();
18396 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18397 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18398 : }
18399 : }
18400 : #endif
18401 : }
18402 1 : resultobj = SWIG_From_bool(static_cast< bool >(result));
18403 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; } }
18404 : return resultobj;
18405 : fail:
18406 : return NULL;
18407 : }
18408 :
18409 :
18410 1 : SWIGINTERN PyObject *_wrap_CRSInfo_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18411 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18412 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18413 1 : void *argp1 = 0 ;
18414 1 : int res1 = 0 ;
18415 1 : PyObject *swig_obj[1] ;
18416 1 : double result;
18417 :
18418 1 : if (!args) SWIG_fail;
18419 1 : swig_obj[0] = args;
18420 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18421 1 : if (!SWIG_IsOK(res1)) {
18422 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_west_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18423 : }
18424 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18425 1 : {
18426 1 : const int bLocalUseExceptions = GetUseExceptions();
18427 1 : if ( bLocalUseExceptions ) {
18428 1 : pushErrorHandler();
18429 : }
18430 1 : result = (double)OSRCRSInfo_west_lon_degree_get(arg1);
18431 1 : if ( bLocalUseExceptions ) {
18432 1 : popErrorHandler();
18433 : }
18434 : #ifndef SED_HACKS
18435 : if ( bLocalUseExceptions ) {
18436 : CPLErr eclass = CPLGetLastErrorType();
18437 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18438 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18439 : }
18440 : }
18441 : #endif
18442 : }
18443 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18444 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; } }
18445 : return resultobj;
18446 : fail:
18447 : return NULL;
18448 : }
18449 :
18450 :
18451 1 : SWIGINTERN PyObject *_wrap_CRSInfo_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18452 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18453 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18454 1 : void *argp1 = 0 ;
18455 1 : int res1 = 0 ;
18456 1 : PyObject *swig_obj[1] ;
18457 1 : double result;
18458 :
18459 1 : if (!args) SWIG_fail;
18460 1 : swig_obj[0] = args;
18461 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18462 1 : if (!SWIG_IsOK(res1)) {
18463 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_south_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18464 : }
18465 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18466 1 : {
18467 1 : const int bLocalUseExceptions = GetUseExceptions();
18468 1 : if ( bLocalUseExceptions ) {
18469 1 : pushErrorHandler();
18470 : }
18471 1 : result = (double)OSRCRSInfo_south_lat_degree_get(arg1);
18472 1 : if ( bLocalUseExceptions ) {
18473 1 : popErrorHandler();
18474 : }
18475 : #ifndef SED_HACKS
18476 : if ( bLocalUseExceptions ) {
18477 : CPLErr eclass = CPLGetLastErrorType();
18478 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18479 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18480 : }
18481 : }
18482 : #endif
18483 : }
18484 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18485 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; } }
18486 : return resultobj;
18487 : fail:
18488 : return NULL;
18489 : }
18490 :
18491 :
18492 1 : SWIGINTERN PyObject *_wrap_CRSInfo_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18493 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18494 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18495 1 : void *argp1 = 0 ;
18496 1 : int res1 = 0 ;
18497 1 : PyObject *swig_obj[1] ;
18498 1 : double result;
18499 :
18500 1 : if (!args) SWIG_fail;
18501 1 : swig_obj[0] = args;
18502 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18503 1 : if (!SWIG_IsOK(res1)) {
18504 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_east_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18505 : }
18506 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18507 1 : {
18508 1 : const int bLocalUseExceptions = GetUseExceptions();
18509 1 : if ( bLocalUseExceptions ) {
18510 1 : pushErrorHandler();
18511 : }
18512 1 : result = (double)OSRCRSInfo_east_lon_degree_get(arg1);
18513 1 : if ( bLocalUseExceptions ) {
18514 1 : popErrorHandler();
18515 : }
18516 : #ifndef SED_HACKS
18517 : if ( bLocalUseExceptions ) {
18518 : CPLErr eclass = CPLGetLastErrorType();
18519 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18520 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18521 : }
18522 : }
18523 : #endif
18524 : }
18525 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18526 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; } }
18527 : return resultobj;
18528 : fail:
18529 : return NULL;
18530 : }
18531 :
18532 :
18533 1 : SWIGINTERN PyObject *_wrap_CRSInfo_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18534 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18535 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18536 1 : void *argp1 = 0 ;
18537 1 : int res1 = 0 ;
18538 1 : PyObject *swig_obj[1] ;
18539 1 : double result;
18540 :
18541 1 : if (!args) SWIG_fail;
18542 1 : swig_obj[0] = args;
18543 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18544 1 : if (!SWIG_IsOK(res1)) {
18545 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_north_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18546 : }
18547 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18548 1 : {
18549 1 : const int bLocalUseExceptions = GetUseExceptions();
18550 1 : if ( bLocalUseExceptions ) {
18551 1 : pushErrorHandler();
18552 : }
18553 1 : result = (double)OSRCRSInfo_north_lat_degree_get(arg1);
18554 1 : if ( bLocalUseExceptions ) {
18555 1 : popErrorHandler();
18556 : }
18557 : #ifndef SED_HACKS
18558 : if ( bLocalUseExceptions ) {
18559 : CPLErr eclass = CPLGetLastErrorType();
18560 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18561 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18562 : }
18563 : }
18564 : #endif
18565 : }
18566 1 : resultobj = SWIG_From_double(static_cast< double >(result));
18567 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; } }
18568 : return resultobj;
18569 : fail:
18570 : return NULL;
18571 : }
18572 :
18573 :
18574 1 : SWIGINTERN PyObject *_wrap_CRSInfo_area_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18575 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18576 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18577 1 : void *argp1 = 0 ;
18578 1 : int res1 = 0 ;
18579 1 : PyObject *swig_obj[1] ;
18580 1 : char *result = 0 ;
18581 :
18582 1 : if (!args) SWIG_fail;
18583 1 : swig_obj[0] = args;
18584 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18585 1 : if (!SWIG_IsOK(res1)) {
18586 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_area_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18587 : }
18588 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18589 1 : {
18590 1 : const int bLocalUseExceptions = GetUseExceptions();
18591 1 : if ( bLocalUseExceptions ) {
18592 1 : pushErrorHandler();
18593 : }
18594 1 : result = (char *)OSRCRSInfo_area_name_get(arg1);
18595 1 : if ( bLocalUseExceptions ) {
18596 1 : popErrorHandler();
18597 : }
18598 : #ifndef SED_HACKS
18599 : if ( bLocalUseExceptions ) {
18600 : CPLErr eclass = CPLGetLastErrorType();
18601 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18602 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18603 : }
18604 : }
18605 : #endif
18606 : }
18607 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18608 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; } }
18609 : return resultobj;
18610 : fail:
18611 : return NULL;
18612 : }
18613 :
18614 :
18615 1 : SWIGINTERN PyObject *_wrap_CRSInfo_projection_method_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18616 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18617 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18618 1 : void *argp1 = 0 ;
18619 1 : int res1 = 0 ;
18620 1 : PyObject *swig_obj[1] ;
18621 1 : char *result = 0 ;
18622 :
18623 1 : if (!args) SWIG_fail;
18624 1 : swig_obj[0] = args;
18625 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18626 1 : if (!SWIG_IsOK(res1)) {
18627 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_projection_method_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18628 : }
18629 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18630 1 : {
18631 1 : const int bLocalUseExceptions = GetUseExceptions();
18632 1 : if ( bLocalUseExceptions ) {
18633 1 : pushErrorHandler();
18634 : }
18635 1 : result = (char *)OSRCRSInfo_projection_method_get(arg1);
18636 1 : if ( bLocalUseExceptions ) {
18637 1 : popErrorHandler();
18638 : }
18639 : #ifndef SED_HACKS
18640 : if ( bLocalUseExceptions ) {
18641 : CPLErr eclass = CPLGetLastErrorType();
18642 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18643 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18644 : }
18645 : }
18646 : #endif
18647 : }
18648 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18649 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; } }
18650 : return resultobj;
18651 : fail:
18652 : return NULL;
18653 : }
18654 :
18655 :
18656 1 : SWIGINTERN PyObject *_wrap_CRSInfo_celestial_body_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18657 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18658 1 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18659 1 : void *argp1 = 0 ;
18660 1 : int res1 = 0 ;
18661 1 : PyObject *swig_obj[1] ;
18662 1 : char *result = 0 ;
18663 :
18664 1 : if (!args) SWIG_fail;
18665 1 : swig_obj[0] = args;
18666 1 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18667 1 : if (!SWIG_IsOK(res1)) {
18668 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CRSInfo_celestial_body_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18669 : }
18670 1 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18671 1 : {
18672 1 : const int bLocalUseExceptions = GetUseExceptions();
18673 1 : if ( bLocalUseExceptions ) {
18674 1 : pushErrorHandler();
18675 : }
18676 1 : result = (char *)OSRCRSInfo_celestial_body_name_get(arg1);
18677 1 : if ( bLocalUseExceptions ) {
18678 1 : popErrorHandler();
18679 : }
18680 : #ifndef SED_HACKS
18681 : if ( bLocalUseExceptions ) {
18682 : CPLErr eclass = CPLGetLastErrorType();
18683 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18684 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18685 : }
18686 : }
18687 : #endif
18688 : }
18689 1 : resultobj = SWIG_FromCharPtr((const char *)result);
18690 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; } }
18691 : return resultobj;
18692 : fail:
18693 : return NULL;
18694 : }
18695 :
18696 :
18697 0 : SWIGINTERN PyObject *_wrap_new_CRSInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18698 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18699 0 : char *arg1 = (char *) 0 ;
18700 0 : char *arg2 = (char *) 0 ;
18701 0 : char *arg3 = (char *) 0 ;
18702 0 : OSRCRSType arg4 ;
18703 0 : bool arg5 ;
18704 0 : bool arg6 ;
18705 0 : double arg7 ;
18706 0 : double arg8 ;
18707 0 : double arg9 ;
18708 0 : double arg10 ;
18709 0 : char *arg11 = (char *) 0 ;
18710 0 : char *arg12 = (char *) 0 ;
18711 0 : char *arg13 = (char *) 0 ;
18712 0 : int res1 ;
18713 0 : char *buf1 = 0 ;
18714 0 : int alloc1 = 0 ;
18715 0 : int res2 ;
18716 0 : char *buf2 = 0 ;
18717 0 : int alloc2 = 0 ;
18718 0 : int res3 ;
18719 0 : char *buf3 = 0 ;
18720 0 : int alloc3 = 0 ;
18721 0 : int val4 ;
18722 0 : int ecode4 = 0 ;
18723 0 : bool val5 ;
18724 0 : int ecode5 = 0 ;
18725 0 : bool val6 ;
18726 0 : int ecode6 = 0 ;
18727 0 : double val7 ;
18728 0 : int ecode7 = 0 ;
18729 0 : double val8 ;
18730 0 : int ecode8 = 0 ;
18731 0 : double val9 ;
18732 0 : int ecode9 = 0 ;
18733 0 : double val10 ;
18734 0 : int ecode10 = 0 ;
18735 0 : int res11 ;
18736 0 : char *buf11 = 0 ;
18737 0 : int alloc11 = 0 ;
18738 0 : int res12 ;
18739 0 : char *buf12 = 0 ;
18740 0 : int alloc12 = 0 ;
18741 0 : int res13 ;
18742 0 : char *buf13 = 0 ;
18743 0 : int alloc13 = 0 ;
18744 0 : PyObject *swig_obj[13] ;
18745 0 : OSRCRSInfo *result = 0 ;
18746 :
18747 0 : if (!SWIG_Python_UnpackTuple(args, "new_CRSInfo", 13, 13, swig_obj)) SWIG_fail;
18748 0 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
18749 0 : if (!SWIG_IsOK(res1)) {
18750 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CRSInfo" "', argument " "1"" of type '" "char const *""'");
18751 : }
18752 0 : arg1 = reinterpret_cast< char * >(buf1);
18753 0 : res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
18754 0 : if (!SWIG_IsOK(res2)) {
18755 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CRSInfo" "', argument " "2"" of type '" "char const *""'");
18756 : }
18757 0 : arg2 = reinterpret_cast< char * >(buf2);
18758 0 : res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
18759 0 : if (!SWIG_IsOK(res3)) {
18760 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_CRSInfo" "', argument " "3"" of type '" "char const *""'");
18761 : }
18762 0 : arg3 = reinterpret_cast< char * >(buf3);
18763 0 : ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
18764 0 : if (!SWIG_IsOK(ecode4)) {
18765 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_CRSInfo" "', argument " "4"" of type '" "OSRCRSType""'");
18766 : }
18767 0 : arg4 = static_cast< OSRCRSType >(val4);
18768 0 : ecode5 = SWIG_AsVal_bool(swig_obj[4], &val5);
18769 0 : if (!SWIG_IsOK(ecode5)) {
18770 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_CRSInfo" "', argument " "5"" of type '" "bool""'");
18771 : }
18772 0 : arg5 = static_cast< bool >(val5);
18773 0 : ecode6 = SWIG_AsVal_bool(swig_obj[5], &val6);
18774 0 : if (!SWIG_IsOK(ecode6)) {
18775 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_CRSInfo" "', argument " "6"" of type '" "bool""'");
18776 : }
18777 0 : arg6 = static_cast< bool >(val6);
18778 0 : ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
18779 0 : if (!SWIG_IsOK(ecode7)) {
18780 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_CRSInfo" "', argument " "7"" of type '" "double""'");
18781 : }
18782 0 : arg7 = static_cast< double >(val7);
18783 0 : ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
18784 0 : if (!SWIG_IsOK(ecode8)) {
18785 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_CRSInfo" "', argument " "8"" of type '" "double""'");
18786 : }
18787 0 : arg8 = static_cast< double >(val8);
18788 0 : ecode9 = SWIG_AsVal_double(swig_obj[8], &val9);
18789 0 : if (!SWIG_IsOK(ecode9)) {
18790 0 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_CRSInfo" "', argument " "9"" of type '" "double""'");
18791 : }
18792 0 : arg9 = static_cast< double >(val9);
18793 0 : ecode10 = SWIG_AsVal_double(swig_obj[9], &val10);
18794 0 : if (!SWIG_IsOK(ecode10)) {
18795 0 : SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_CRSInfo" "', argument " "10"" of type '" "double""'");
18796 : }
18797 0 : arg10 = static_cast< double >(val10);
18798 0 : res11 = SWIG_AsCharPtrAndSize(swig_obj[10], &buf11, NULL, &alloc11);
18799 0 : if (!SWIG_IsOK(res11)) {
18800 0 : SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "new_CRSInfo" "', argument " "11"" of type '" "char const *""'");
18801 : }
18802 0 : arg11 = reinterpret_cast< char * >(buf11);
18803 0 : res12 = SWIG_AsCharPtrAndSize(swig_obj[11], &buf12, NULL, &alloc12);
18804 0 : if (!SWIG_IsOK(res12)) {
18805 0 : SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "new_CRSInfo" "', argument " "12"" of type '" "char const *""'");
18806 : }
18807 0 : arg12 = reinterpret_cast< char * >(buf12);
18808 0 : res13 = SWIG_AsCharPtrAndSize(swig_obj[12], &buf13, NULL, &alloc13);
18809 0 : if (!SWIG_IsOK(res13)) {
18810 0 : SWIG_exception_fail(SWIG_ArgError(res13), "in method '" "new_CRSInfo" "', argument " "13"" of type '" "char const *""'");
18811 : }
18812 0 : arg13 = reinterpret_cast< char * >(buf13);
18813 0 : {
18814 0 : if (!arg3) {
18815 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18816 : }
18817 : }
18818 0 : {
18819 0 : const int bLocalUseExceptions = GetUseExceptions();
18820 0 : if ( bLocalUseExceptions ) {
18821 0 : pushErrorHandler();
18822 : }
18823 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);
18824 0 : if ( bLocalUseExceptions ) {
18825 0 : popErrorHandler();
18826 : }
18827 : #ifndef SED_HACKS
18828 : if ( bLocalUseExceptions ) {
18829 : CPLErr eclass = CPLGetLastErrorType();
18830 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18831 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18832 : }
18833 : }
18834 : #endif
18835 : }
18836 0 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCRSInfo, SWIG_POINTER_NEW | 0 );
18837 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
18838 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
18839 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
18840 0 : if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
18841 0 : if (alloc12 == SWIG_NEWOBJ) delete[] buf12;
18842 0 : if (alloc13 == SWIG_NEWOBJ) delete[] buf13;
18843 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; } }
18844 : return resultobj;
18845 0 : fail:
18846 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
18847 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
18848 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
18849 0 : if (alloc11 == SWIG_NEWOBJ) delete[] buf11;
18850 0 : if (alloc12 == SWIG_NEWOBJ) delete[] buf12;
18851 0 : if (alloc13 == SWIG_NEWOBJ) delete[] buf13;
18852 : return NULL;
18853 : }
18854 :
18855 :
18856 6609 : SWIGINTERN PyObject *_wrap_delete_CRSInfo(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18857 6609 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18858 6609 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18859 6609 : void *argp1 = 0 ;
18860 6609 : int res1 = 0 ;
18861 6609 : PyObject *swig_obj[1] ;
18862 :
18863 6609 : if (!args) SWIG_fail;
18864 6609 : swig_obj[0] = args;
18865 6609 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, SWIG_POINTER_DISOWN | 0 );
18866 6609 : if (!SWIG_IsOK(res1)) {
18867 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CRSInfo" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18868 : }
18869 6609 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18870 6609 : {
18871 6609 : const int bLocalUseExceptions = GetUseExceptions();
18872 6609 : if ( bLocalUseExceptions ) {
18873 6609 : pushErrorHandler();
18874 : }
18875 6609 : delete_OSRCRSInfo(arg1);
18876 6609 : if ( bLocalUseExceptions ) {
18877 6609 : popErrorHandler();
18878 : }
18879 : #ifndef SED_HACKS
18880 : if ( bLocalUseExceptions ) {
18881 : CPLErr eclass = CPLGetLastErrorType();
18882 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18883 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18884 : }
18885 : }
18886 : #endif
18887 : }
18888 6609 : resultobj = SWIG_Py_Void();
18889 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; } }
18890 : return resultobj;
18891 : fail:
18892 : return NULL;
18893 : }
18894 :
18895 :
18896 276 : SWIGINTERN PyObject *CRSInfo_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18897 276 : PyObject *obj;
18898 276 : if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
18899 276 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRCRSInfo, SWIG_NewClientData(obj));
18900 276 : return SWIG_Py_Void();
18901 : }
18902 :
18903 0 : SWIGINTERN PyObject *CRSInfo_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18904 0 : return SWIG_Python_InitShadowInstance(args);
18905 : }
18906 :
18907 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_auth_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18908 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18909 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18910 0 : void *argp1 = 0 ;
18911 0 : int res1 = 0 ;
18912 0 : PyObject *swig_obj[1] ;
18913 0 : char *result = 0 ;
18914 :
18915 0 : if (!args) SWIG_fail;
18916 0 : swig_obj[0] = args;
18917 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18918 0 : if (!SWIG_IsOK(res1)) {
18919 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_auth_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18920 : }
18921 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18922 0 : {
18923 0 : if (!arg1) {
18924 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18925 : }
18926 : }
18927 0 : {
18928 0 : const int bLocalUseExceptions = GetUseExceptions();
18929 0 : if ( bLocalUseExceptions ) {
18930 0 : pushErrorHandler();
18931 : }
18932 0 : result = (char *)OSRCRSInfo_auth_name_get(arg1);
18933 0 : if ( bLocalUseExceptions ) {
18934 0 : popErrorHandler();
18935 : }
18936 : #ifndef SED_HACKS
18937 : if ( bLocalUseExceptions ) {
18938 : CPLErr eclass = CPLGetLastErrorType();
18939 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18940 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18941 : }
18942 : }
18943 : #endif
18944 : }
18945 0 : resultobj = SWIG_FromCharPtr((const char *)result);
18946 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; } }
18947 : return resultobj;
18948 : fail:
18949 : return NULL;
18950 : }
18951 :
18952 :
18953 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_code_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18954 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
18955 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
18956 0 : void *argp1 = 0 ;
18957 0 : int res1 = 0 ;
18958 0 : PyObject *swig_obj[1] ;
18959 0 : char *result = 0 ;
18960 :
18961 0 : if (!args) SWIG_fail;
18962 0 : swig_obj[0] = args;
18963 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
18964 0 : if (!SWIG_IsOK(res1)) {
18965 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_code_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
18966 : }
18967 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
18968 0 : {
18969 0 : if (!arg1) {
18970 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
18971 : }
18972 : }
18973 0 : {
18974 0 : const int bLocalUseExceptions = GetUseExceptions();
18975 0 : if ( bLocalUseExceptions ) {
18976 0 : pushErrorHandler();
18977 : }
18978 0 : result = (char *)OSRCRSInfo_code_get(arg1);
18979 0 : if ( bLocalUseExceptions ) {
18980 0 : popErrorHandler();
18981 : }
18982 : #ifndef SED_HACKS
18983 : if ( bLocalUseExceptions ) {
18984 : CPLErr eclass = CPLGetLastErrorType();
18985 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
18986 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
18987 : }
18988 : }
18989 : #endif
18990 : }
18991 0 : resultobj = SWIG_FromCharPtr((const char *)result);
18992 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; } }
18993 : return resultobj;
18994 : fail:
18995 : return NULL;
18996 : }
18997 :
18998 :
18999 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19000 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19001 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19002 0 : void *argp1 = 0 ;
19003 0 : int res1 = 0 ;
19004 0 : PyObject *swig_obj[1] ;
19005 0 : char *result = 0 ;
19006 :
19007 0 : if (!args) SWIG_fail;
19008 0 : swig_obj[0] = args;
19009 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19010 0 : if (!SWIG_IsOK(res1)) {
19011 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19012 : }
19013 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19014 0 : {
19015 0 : if (!arg1) {
19016 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19017 : }
19018 : }
19019 0 : {
19020 0 : const int bLocalUseExceptions = GetUseExceptions();
19021 0 : if ( bLocalUseExceptions ) {
19022 0 : pushErrorHandler();
19023 : }
19024 0 : result = (char *)OSRCRSInfo_name_get(arg1);
19025 0 : if ( bLocalUseExceptions ) {
19026 0 : popErrorHandler();
19027 : }
19028 : #ifndef SED_HACKS
19029 : if ( bLocalUseExceptions ) {
19030 : CPLErr eclass = CPLGetLastErrorType();
19031 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19032 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19033 : }
19034 : }
19035 : #endif
19036 : }
19037 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19038 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; } }
19039 : return resultobj;
19040 : fail:
19041 : return NULL;
19042 : }
19043 :
19044 :
19045 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19046 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19047 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19048 0 : void *argp1 = 0 ;
19049 0 : int res1 = 0 ;
19050 0 : PyObject *swig_obj[1] ;
19051 0 : OSRCRSType result;
19052 :
19053 0 : if (!args) SWIG_fail;
19054 0 : swig_obj[0] = args;
19055 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19056 0 : if (!SWIG_IsOK(res1)) {
19057 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_type_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19058 : }
19059 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19060 0 : {
19061 0 : if (!arg1) {
19062 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19063 : }
19064 : }
19065 0 : {
19066 0 : const int bLocalUseExceptions = GetUseExceptions();
19067 0 : if ( bLocalUseExceptions ) {
19068 0 : pushErrorHandler();
19069 : }
19070 0 : result = (OSRCRSType)OSRCRSInfo_type_get(arg1);
19071 0 : if ( bLocalUseExceptions ) {
19072 0 : popErrorHandler();
19073 : }
19074 : #ifndef SED_HACKS
19075 : if ( bLocalUseExceptions ) {
19076 : CPLErr eclass = CPLGetLastErrorType();
19077 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19078 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19079 : }
19080 : }
19081 : #endif
19082 : }
19083 0 : resultobj = SWIG_From_int(static_cast< int >(result));
19084 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; } }
19085 : return resultobj;
19086 : fail:
19087 : return NULL;
19088 : }
19089 :
19090 :
19091 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_deprecated_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19092 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19093 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19094 0 : void *argp1 = 0 ;
19095 0 : int res1 = 0 ;
19096 0 : PyObject *swig_obj[1] ;
19097 0 : bool result;
19098 :
19099 0 : if (!args) SWIG_fail;
19100 0 : swig_obj[0] = args;
19101 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19102 0 : if (!SWIG_IsOK(res1)) {
19103 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_deprecated_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19104 : }
19105 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19106 0 : {
19107 0 : if (!arg1) {
19108 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19109 : }
19110 : }
19111 0 : {
19112 0 : const int bLocalUseExceptions = GetUseExceptions();
19113 0 : if ( bLocalUseExceptions ) {
19114 0 : pushErrorHandler();
19115 : }
19116 0 : result = (bool)OSRCRSInfo_deprecated_get(arg1);
19117 0 : if ( bLocalUseExceptions ) {
19118 0 : popErrorHandler();
19119 : }
19120 : #ifndef SED_HACKS
19121 : if ( bLocalUseExceptions ) {
19122 : CPLErr eclass = CPLGetLastErrorType();
19123 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19124 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19125 : }
19126 : }
19127 : #endif
19128 : }
19129 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
19130 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; } }
19131 : return resultobj;
19132 : fail:
19133 : return NULL;
19134 : }
19135 :
19136 :
19137 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_bbox_valid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19138 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19139 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19140 0 : void *argp1 = 0 ;
19141 0 : int res1 = 0 ;
19142 0 : PyObject *swig_obj[1] ;
19143 0 : bool result;
19144 :
19145 0 : if (!args) SWIG_fail;
19146 0 : swig_obj[0] = args;
19147 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19148 0 : if (!SWIG_IsOK(res1)) {
19149 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_bbox_valid_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19150 : }
19151 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19152 0 : {
19153 0 : if (!arg1) {
19154 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19155 : }
19156 : }
19157 0 : {
19158 0 : const int bLocalUseExceptions = GetUseExceptions();
19159 0 : if ( bLocalUseExceptions ) {
19160 0 : pushErrorHandler();
19161 : }
19162 0 : result = (bool)OSRCRSInfo_bbox_valid_get(arg1);
19163 0 : if ( bLocalUseExceptions ) {
19164 0 : popErrorHandler();
19165 : }
19166 : #ifndef SED_HACKS
19167 : if ( bLocalUseExceptions ) {
19168 : CPLErr eclass = CPLGetLastErrorType();
19169 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19170 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19171 : }
19172 : }
19173 : #endif
19174 : }
19175 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
19176 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; } }
19177 : return resultobj;
19178 : fail:
19179 : return NULL;
19180 : }
19181 :
19182 :
19183 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_west_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19184 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19185 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19186 0 : void *argp1 = 0 ;
19187 0 : int res1 = 0 ;
19188 0 : PyObject *swig_obj[1] ;
19189 0 : double result;
19190 :
19191 0 : if (!args) SWIG_fail;
19192 0 : swig_obj[0] = args;
19193 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19194 0 : if (!SWIG_IsOK(res1)) {
19195 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_west_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19196 : }
19197 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19198 0 : {
19199 0 : if (!arg1) {
19200 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19201 : }
19202 : }
19203 0 : {
19204 0 : const int bLocalUseExceptions = GetUseExceptions();
19205 0 : if ( bLocalUseExceptions ) {
19206 0 : pushErrorHandler();
19207 : }
19208 0 : result = (double)OSRCRSInfo_west_lon_degree_get(arg1);
19209 0 : if ( bLocalUseExceptions ) {
19210 0 : popErrorHandler();
19211 : }
19212 : #ifndef SED_HACKS
19213 : if ( bLocalUseExceptions ) {
19214 : CPLErr eclass = CPLGetLastErrorType();
19215 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19216 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19217 : }
19218 : }
19219 : #endif
19220 : }
19221 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19222 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; } }
19223 : return resultobj;
19224 : fail:
19225 : return NULL;
19226 : }
19227 :
19228 :
19229 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_south_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19230 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19231 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19232 0 : void *argp1 = 0 ;
19233 0 : int res1 = 0 ;
19234 0 : PyObject *swig_obj[1] ;
19235 0 : double result;
19236 :
19237 0 : if (!args) SWIG_fail;
19238 0 : swig_obj[0] = args;
19239 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19240 0 : if (!SWIG_IsOK(res1)) {
19241 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_south_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19242 : }
19243 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19244 0 : {
19245 0 : if (!arg1) {
19246 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19247 : }
19248 : }
19249 0 : {
19250 0 : const int bLocalUseExceptions = GetUseExceptions();
19251 0 : if ( bLocalUseExceptions ) {
19252 0 : pushErrorHandler();
19253 : }
19254 0 : result = (double)OSRCRSInfo_south_lat_degree_get(arg1);
19255 0 : if ( bLocalUseExceptions ) {
19256 0 : popErrorHandler();
19257 : }
19258 : #ifndef SED_HACKS
19259 : if ( bLocalUseExceptions ) {
19260 : CPLErr eclass = CPLGetLastErrorType();
19261 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19262 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19263 : }
19264 : }
19265 : #endif
19266 : }
19267 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19268 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; } }
19269 : return resultobj;
19270 : fail:
19271 : return NULL;
19272 : }
19273 :
19274 :
19275 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_east_lon_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19276 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19277 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19278 0 : void *argp1 = 0 ;
19279 0 : int res1 = 0 ;
19280 0 : PyObject *swig_obj[1] ;
19281 0 : double result;
19282 :
19283 0 : if (!args) SWIG_fail;
19284 0 : swig_obj[0] = args;
19285 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19286 0 : if (!SWIG_IsOK(res1)) {
19287 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_east_lon_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19288 : }
19289 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19290 0 : {
19291 0 : if (!arg1) {
19292 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19293 : }
19294 : }
19295 0 : {
19296 0 : const int bLocalUseExceptions = GetUseExceptions();
19297 0 : if ( bLocalUseExceptions ) {
19298 0 : pushErrorHandler();
19299 : }
19300 0 : result = (double)OSRCRSInfo_east_lon_degree_get(arg1);
19301 0 : if ( bLocalUseExceptions ) {
19302 0 : popErrorHandler();
19303 : }
19304 : #ifndef SED_HACKS
19305 : if ( bLocalUseExceptions ) {
19306 : CPLErr eclass = CPLGetLastErrorType();
19307 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19308 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19309 : }
19310 : }
19311 : #endif
19312 : }
19313 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19314 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; } }
19315 : return resultobj;
19316 : fail:
19317 : return NULL;
19318 : }
19319 :
19320 :
19321 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_north_lat_degree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19322 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19323 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19324 0 : void *argp1 = 0 ;
19325 0 : int res1 = 0 ;
19326 0 : PyObject *swig_obj[1] ;
19327 0 : double result;
19328 :
19329 0 : if (!args) SWIG_fail;
19330 0 : swig_obj[0] = args;
19331 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19332 0 : if (!SWIG_IsOK(res1)) {
19333 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_north_lat_degree_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19334 : }
19335 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19336 0 : {
19337 0 : if (!arg1) {
19338 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19339 : }
19340 : }
19341 0 : {
19342 0 : const int bLocalUseExceptions = GetUseExceptions();
19343 0 : if ( bLocalUseExceptions ) {
19344 0 : pushErrorHandler();
19345 : }
19346 0 : result = (double)OSRCRSInfo_north_lat_degree_get(arg1);
19347 0 : if ( bLocalUseExceptions ) {
19348 0 : popErrorHandler();
19349 : }
19350 : #ifndef SED_HACKS
19351 : if ( bLocalUseExceptions ) {
19352 : CPLErr eclass = CPLGetLastErrorType();
19353 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19354 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19355 : }
19356 : }
19357 : #endif
19358 : }
19359 0 : resultobj = SWIG_From_double(static_cast< double >(result));
19360 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; } }
19361 : return resultobj;
19362 : fail:
19363 : return NULL;
19364 : }
19365 :
19366 :
19367 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_area_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19368 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19369 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19370 0 : void *argp1 = 0 ;
19371 0 : int res1 = 0 ;
19372 0 : PyObject *swig_obj[1] ;
19373 0 : char *result = 0 ;
19374 :
19375 0 : if (!args) SWIG_fail;
19376 0 : swig_obj[0] = args;
19377 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19378 0 : if (!SWIG_IsOK(res1)) {
19379 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_area_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19380 : }
19381 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19382 0 : {
19383 0 : if (!arg1) {
19384 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19385 : }
19386 : }
19387 0 : {
19388 0 : const int bLocalUseExceptions = GetUseExceptions();
19389 0 : if ( bLocalUseExceptions ) {
19390 0 : pushErrorHandler();
19391 : }
19392 0 : result = (char *)OSRCRSInfo_area_name_get(arg1);
19393 0 : if ( bLocalUseExceptions ) {
19394 0 : popErrorHandler();
19395 : }
19396 : #ifndef SED_HACKS
19397 : if ( bLocalUseExceptions ) {
19398 : CPLErr eclass = CPLGetLastErrorType();
19399 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19400 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19401 : }
19402 : }
19403 : #endif
19404 : }
19405 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19406 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; } }
19407 : return resultobj;
19408 : fail:
19409 : return NULL;
19410 : }
19411 :
19412 :
19413 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_projection_method_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19414 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19415 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19416 0 : void *argp1 = 0 ;
19417 0 : int res1 = 0 ;
19418 0 : PyObject *swig_obj[1] ;
19419 0 : char *result = 0 ;
19420 :
19421 0 : if (!args) SWIG_fail;
19422 0 : swig_obj[0] = args;
19423 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19424 0 : if (!SWIG_IsOK(res1)) {
19425 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_projection_method_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19426 : }
19427 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19428 0 : {
19429 0 : if (!arg1) {
19430 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19431 : }
19432 : }
19433 0 : {
19434 0 : const int bLocalUseExceptions = GetUseExceptions();
19435 0 : if ( bLocalUseExceptions ) {
19436 0 : pushErrorHandler();
19437 : }
19438 0 : result = (char *)OSRCRSInfo_projection_method_get(arg1);
19439 0 : if ( bLocalUseExceptions ) {
19440 0 : popErrorHandler();
19441 : }
19442 : #ifndef SED_HACKS
19443 : if ( bLocalUseExceptions ) {
19444 : CPLErr eclass = CPLGetLastErrorType();
19445 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19446 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19447 : }
19448 : }
19449 : #endif
19450 : }
19451 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19452 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; } }
19453 : return resultobj;
19454 : fail:
19455 : return NULL;
19456 : }
19457 :
19458 :
19459 0 : SWIGINTERN PyObject *_wrap_OSRCRSInfo_celestial_body_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19460 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19461 0 : OSRCRSInfo *arg1 = (OSRCRSInfo *) 0 ;
19462 0 : void *argp1 = 0 ;
19463 0 : int res1 = 0 ;
19464 0 : PyObject *swig_obj[1] ;
19465 0 : char *result = 0 ;
19466 :
19467 0 : if (!args) SWIG_fail;
19468 0 : swig_obj[0] = args;
19469 0 : res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OSRCRSInfo, 0 | 0 );
19470 0 : if (!SWIG_IsOK(res1)) {
19471 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OSRCRSInfo_celestial_body_name_get" "', argument " "1"" of type '" "OSRCRSInfo *""'");
19472 : }
19473 0 : arg1 = reinterpret_cast< OSRCRSInfo * >(argp1);
19474 0 : {
19475 0 : if (!arg1) {
19476 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
19477 : }
19478 : }
19479 0 : {
19480 0 : const int bLocalUseExceptions = GetUseExceptions();
19481 0 : if ( bLocalUseExceptions ) {
19482 0 : pushErrorHandler();
19483 : }
19484 0 : result = (char *)OSRCRSInfo_celestial_body_name_get(arg1);
19485 0 : if ( bLocalUseExceptions ) {
19486 0 : popErrorHandler();
19487 : }
19488 : #ifndef SED_HACKS
19489 : if ( bLocalUseExceptions ) {
19490 : CPLErr eclass = CPLGetLastErrorType();
19491 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19492 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19493 : }
19494 : }
19495 : #endif
19496 : }
19497 0 : resultobj = SWIG_FromCharPtr((const char *)result);
19498 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; } }
19499 : return resultobj;
19500 : fail:
19501 : return NULL;
19502 : }
19503 :
19504 :
19505 1 : SWIGINTERN PyObject *_wrap_GetAuthorityListFromDatabase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19506 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19507 1 : char **result = 0 ;
19508 :
19509 1 : if (!SWIG_Python_UnpackTuple(args, "GetAuthorityListFromDatabase", 0, 0, 0)) SWIG_fail;
19510 1 : {
19511 1 : const int bLocalUseExceptions = GetUseExceptions();
19512 1 : if ( bLocalUseExceptions ) {
19513 1 : pushErrorHandler();
19514 : }
19515 1 : result = (char **)GetAuthorityListFromDatabase();
19516 1 : if ( bLocalUseExceptions ) {
19517 1 : popErrorHandler();
19518 : }
19519 : #ifndef SED_HACKS
19520 : if ( bLocalUseExceptions ) {
19521 : CPLErr eclass = CPLGetLastErrorType();
19522 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19523 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19524 : }
19525 : }
19526 : #endif
19527 : }
19528 1 : {
19529 : /* %typemap(out) char **CSL -> ( string ) */
19530 1 : bool bErr = false;
19531 1 : resultobj = CSLToList(result, &bErr);
19532 1 : CSLDestroy(result);
19533 1 : if( bErr ) {
19534 0 : SWIG_fail;
19535 : }
19536 : }
19537 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; } }
19538 : return resultobj;
19539 : fail:
19540 : return NULL;
19541 : }
19542 :
19543 :
19544 1 : SWIGINTERN PyObject *_wrap_GetCRSInfoListFromDatabase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19545 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19546 1 : char *arg1 = (char *) 0 ;
19547 1 : OSRCRSInfo ***arg2 = (OSRCRSInfo ***) 0 ;
19548 1 : int *arg3 = (int *) 0 ;
19549 1 : int res1 ;
19550 1 : char *buf1 = 0 ;
19551 1 : int alloc1 = 0 ;
19552 1 : OSRCRSInfo **list2 = 0 ;
19553 1 : int count2 = 0 ;
19554 1 : PyObject *swig_obj[1] ;
19555 :
19556 1 : {
19557 : /* %typemap(in,numinputs=0) (OSRCRSInfo*** pList, int* pnListCount) */
19558 1 : arg2 = &list2;
19559 1 : arg3 = &count2;
19560 : }
19561 1 : if (!args) SWIG_fail;
19562 1 : swig_obj[0] = args;
19563 1 : res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
19564 1 : if (!SWIG_IsOK(res1)) {
19565 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetCRSInfoListFromDatabase" "', argument " "1"" of type '" "char const *""'");
19566 : }
19567 1 : arg1 = reinterpret_cast< char * >(buf1);
19568 1 : {
19569 1 : const int bLocalUseExceptions = GetUseExceptions();
19570 1 : if ( bLocalUseExceptions ) {
19571 1 : pushErrorHandler();
19572 : }
19573 1 : GetCRSInfoListFromDatabase((char const *)arg1,arg2,arg3);
19574 1 : if ( bLocalUseExceptions ) {
19575 1 : popErrorHandler();
19576 : }
19577 : #ifndef SED_HACKS
19578 : if ( bLocalUseExceptions ) {
19579 : CPLErr eclass = CPLGetLastErrorType();
19580 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19581 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19582 : }
19583 : }
19584 : #endif
19585 : }
19586 1 : resultobj = SWIG_Py_Void();
19587 1 : {
19588 : /* %typemap(argout) (OSRCRSInfo*** pList, int* pnListCount) */
19589 1 : PyObject *dict = PyTuple_New( *arg3 );
19590 6610 : for( int i = 0; i < *arg3; i++ ) {
19591 13218 : OSRCRSInfo *o = new_OSRCRSInfo( (*arg2)[i]->pszAuthName,
19592 6609 : (*arg2)[i]->pszCode,
19593 6609 : (*arg2)[i]->pszName,
19594 : (*arg2)[i]->eType,
19595 6609 : (*arg2)[i]->bDeprecated,
19596 6609 : (*arg2)[i]->bBboxValid,
19597 : (*arg2)[i]->dfWestLongitudeDeg,
19598 : (*arg2)[i]->dfSouthLatitudeDeg,
19599 : (*arg2)[i]->dfEastLongitudeDeg,
19600 : (*arg2)[i]->dfNorthLatitudeDeg,
19601 6609 : (*arg2)[i]->pszAreaName,
19602 6609 : (*arg2)[i]->pszProjectionMethod,
19603 6609 : (*arg2)[i]->pszCelestialBodyName );
19604 :
19605 6609 : PyTuple_SetItem(dict, i,
19606 : SWIG_NewPointerObj((void*)o,SWIGTYPE_p_OSRCRSInfo,1) );
19607 : }
19608 1 : Py_DECREF(resultobj);
19609 1 : resultobj = dict;
19610 : }
19611 1 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
19612 1 : {
19613 : /* %typemap(freearg) (OSRCRSInfo*** pList, int* pnListCount) */
19614 1 : OSRDestroyCRSInfoList( *(arg2) );
19615 : }
19616 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; } }
19617 : return resultobj;
19618 0 : fail:
19619 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
19620 0 : {
19621 : /* %typemap(freearg) (OSRCRSInfo*** pList, int* pnListCount) */
19622 0 : OSRDestroyCRSInfoList( *(arg2) );
19623 : }
19624 : return NULL;
19625 : }
19626 :
19627 :
19628 1 : SWIGINTERN PyObject *_wrap_SetPROJSearchPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19629 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19630 1 : char *arg1 = (char *) 0 ;
19631 1 : int bToFree1 = 0 ;
19632 1 : PyObject *swig_obj[1] ;
19633 :
19634 1 : if (!args) SWIG_fail;
19635 1 : swig_obj[0] = args;
19636 1 : {
19637 : /* %typemap(in) (const char *utf8_path) */
19638 1 : if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
19639 : {
19640 1 : arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
19641 : }
19642 : else
19643 : {
19644 0 : arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
19645 :
19646 : }
19647 1 : if (arg1 == NULL)
19648 : {
19649 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
19650 0 : SWIG_fail;
19651 : }
19652 : }
19653 1 : {
19654 1 : const int bLocalUseExceptions = GetUseExceptions();
19655 1 : if ( bLocalUseExceptions ) {
19656 1 : pushErrorHandler();
19657 : }
19658 1 : SetPROJSearchPath((char const *)arg1);
19659 1 : if ( bLocalUseExceptions ) {
19660 1 : popErrorHandler();
19661 : }
19662 : #ifndef SED_HACKS
19663 : if ( bLocalUseExceptions ) {
19664 : CPLErr eclass = CPLGetLastErrorType();
19665 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19666 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19667 : }
19668 : }
19669 : #endif
19670 : }
19671 1 : resultobj = SWIG_Py_Void();
19672 1 : {
19673 : /* %typemap(freearg) (const char *utf8_path) */
19674 1 : GDALPythonFreeCStr(arg1, bToFree1);
19675 : }
19676 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; } }
19677 : return resultobj;
19678 0 : fail:
19679 0 : {
19680 : /* %typemap(freearg) (const char *utf8_path) */
19681 1 : GDALPythonFreeCStr(arg1, bToFree1);
19682 : }
19683 : return NULL;
19684 : }
19685 :
19686 :
19687 16 : SWIGINTERN PyObject *_wrap_SetPROJSearchPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19688 16 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19689 16 : char **arg1 = (char **) 0 ;
19690 16 : PyObject *swig_obj[1] ;
19691 :
19692 16 : if (!args) SWIG_fail;
19693 16 : swig_obj[0] = args;
19694 16 : {
19695 : /* %typemap(in) char **dict */
19696 16 : arg1 = NULL;
19697 16 : if ( PySequence_Check( swig_obj[0] ) ) {
19698 16 : int bErr = FALSE;
19699 16 : arg1 = CSLFromPySequence(swig_obj[0], &bErr);
19700 16 : if ( bErr )
19701 : {
19702 0 : SWIG_fail;
19703 : }
19704 : }
19705 0 : else if ( PyMapping_Check( swig_obj[0] ) ) {
19706 0 : int bErr = FALSE;
19707 0 : arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
19708 0 : if ( bErr )
19709 : {
19710 0 : SWIG_fail;
19711 : }
19712 : }
19713 : else {
19714 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
19715 0 : SWIG_fail;
19716 : }
19717 : }
19718 16 : {
19719 16 : const int bLocalUseExceptions = GetUseExceptions();
19720 16 : if ( bLocalUseExceptions ) {
19721 16 : pushErrorHandler();
19722 : }
19723 16 : SetPROJSearchPaths(arg1);
19724 16 : if ( bLocalUseExceptions ) {
19725 16 : popErrorHandler();
19726 : }
19727 : #ifndef SED_HACKS
19728 : if ( bLocalUseExceptions ) {
19729 : CPLErr eclass = CPLGetLastErrorType();
19730 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19731 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19732 : }
19733 : }
19734 : #endif
19735 : }
19736 16 : resultobj = SWIG_Py_Void();
19737 16 : {
19738 : /* %typemap(freearg) char **dict */
19739 16 : CSLDestroy( arg1 );
19740 : }
19741 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; } }
19742 : return resultobj;
19743 0 : fail:
19744 0 : {
19745 : /* %typemap(freearg) char **dict */
19746 0 : CSLDestroy( arg1 );
19747 : }
19748 : return NULL;
19749 : }
19750 :
19751 :
19752 21 : SWIGINTERN PyObject *_wrap_GetPROJSearchPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19753 21 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19754 21 : char **result = 0 ;
19755 :
19756 21 : if (!SWIG_Python_UnpackTuple(args, "GetPROJSearchPaths", 0, 0, 0)) SWIG_fail;
19757 21 : {
19758 21 : const int bLocalUseExceptions = GetUseExceptions();
19759 21 : if ( bLocalUseExceptions ) {
19760 21 : pushErrorHandler();
19761 : }
19762 21 : result = (char **)GetPROJSearchPaths();
19763 21 : if ( bLocalUseExceptions ) {
19764 21 : popErrorHandler();
19765 : }
19766 : #ifndef SED_HACKS
19767 : if ( bLocalUseExceptions ) {
19768 : CPLErr eclass = CPLGetLastErrorType();
19769 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19770 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19771 : }
19772 : }
19773 : #endif
19774 : }
19775 21 : {
19776 : /* %typemap(out) char **CSL -> ( string ) */
19777 21 : bool bErr = false;
19778 21 : resultobj = CSLToList(result, &bErr);
19779 21 : CSLDestroy(result);
19780 21 : if( bErr ) {
19781 0 : SWIG_fail;
19782 : }
19783 : }
19784 21 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19785 : return resultobj;
19786 : fail:
19787 : return NULL;
19788 : }
19789 :
19790 :
19791 77 : SWIGINTERN PyObject *_wrap_GetPROJVersionMajor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19792 77 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19793 77 : int result;
19794 :
19795 77 : if (!SWIG_Python_UnpackTuple(args, "GetPROJVersionMajor", 0, 0, 0)) SWIG_fail;
19796 77 : {
19797 77 : const int bLocalUseExceptions = GetUseExceptions();
19798 77 : if ( bLocalUseExceptions ) {
19799 73 : pushErrorHandler();
19800 : }
19801 77 : result = (int)GetPROJVersionMajor();
19802 77 : if ( bLocalUseExceptions ) {
19803 73 : popErrorHandler();
19804 : }
19805 : #ifndef SED_HACKS
19806 : if ( bLocalUseExceptions ) {
19807 : CPLErr eclass = CPLGetLastErrorType();
19808 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19809 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19810 : }
19811 : }
19812 : #endif
19813 : }
19814 77 : resultobj = SWIG_From_int(static_cast< int >(result));
19815 77 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19816 : return resultobj;
19817 0 : fail:
19818 0 : return NULL;
19819 : }
19820 :
19821 :
19822 71 : SWIGINTERN PyObject *_wrap_GetPROJVersionMinor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19823 71 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19824 71 : int result;
19825 :
19826 71 : if (!SWIG_Python_UnpackTuple(args, "GetPROJVersionMinor", 0, 0, 0)) SWIG_fail;
19827 71 : {
19828 71 : const int bLocalUseExceptions = GetUseExceptions();
19829 71 : if ( bLocalUseExceptions ) {
19830 70 : pushErrorHandler();
19831 : }
19832 71 : result = (int)GetPROJVersionMinor();
19833 71 : if ( bLocalUseExceptions ) {
19834 70 : popErrorHandler();
19835 : }
19836 : #ifndef SED_HACKS
19837 : if ( bLocalUseExceptions ) {
19838 : CPLErr eclass = CPLGetLastErrorType();
19839 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19840 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19841 : }
19842 : }
19843 : #endif
19844 : }
19845 71 : resultobj = SWIG_From_int(static_cast< int >(result));
19846 71 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19847 : return resultobj;
19848 0 : fail:
19849 0 : return NULL;
19850 : }
19851 :
19852 :
19853 59 : SWIGINTERN PyObject *_wrap_GetPROJVersionMicro(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19854 59 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19855 59 : int result;
19856 :
19857 59 : if (!SWIG_Python_UnpackTuple(args, "GetPROJVersionMicro", 0, 0, 0)) SWIG_fail;
19858 59 : {
19859 59 : const int bLocalUseExceptions = GetUseExceptions();
19860 59 : if ( bLocalUseExceptions ) {
19861 59 : pushErrorHandler();
19862 : }
19863 59 : result = (int)GetPROJVersionMicro();
19864 59 : if ( bLocalUseExceptions ) {
19865 59 : popErrorHandler();
19866 : }
19867 : #ifndef SED_HACKS
19868 : if ( bLocalUseExceptions ) {
19869 : CPLErr eclass = CPLGetLastErrorType();
19870 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19871 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19872 : }
19873 : }
19874 : #endif
19875 : }
19876 59 : resultobj = SWIG_From_int(static_cast< int >(result));
19877 59 : if ( ReturnSame(bLocalUseExceptionsCode) ) { CPLErr eclass = CPLGetLastErrorType(); if ( eclass == CE_Failure || eclass == CE_Fatal ) { std::string osMsg = CPLGetLastErrorMsg(); Py_XDECREF(resultobj); SWIG_Error( SWIG_RuntimeError, osMsg.c_str() ); return NULL; } }
19878 : return resultobj;
19879 0 : fail:
19880 0 : return NULL;
19881 : }
19882 :
19883 :
19884 0 : SWIGINTERN PyObject *_wrap_GetPROJEnableNetwork(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19885 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19886 0 : bool result;
19887 :
19888 0 : if (!SWIG_Python_UnpackTuple(args, "GetPROJEnableNetwork", 0, 0, 0)) SWIG_fail;
19889 0 : {
19890 0 : const int bLocalUseExceptions = GetUseExceptions();
19891 0 : if ( bLocalUseExceptions ) {
19892 0 : pushErrorHandler();
19893 : }
19894 0 : result = (bool)GetPROJEnableNetwork();
19895 0 : if ( bLocalUseExceptions ) {
19896 0 : popErrorHandler();
19897 : }
19898 : #ifndef SED_HACKS
19899 : if ( bLocalUseExceptions ) {
19900 : CPLErr eclass = CPLGetLastErrorType();
19901 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19902 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19903 : }
19904 : }
19905 : #endif
19906 : }
19907 0 : resultobj = SWIG_From_bool(static_cast< bool >(result));
19908 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; } }
19909 : return resultobj;
19910 0 : fail:
19911 0 : return NULL;
19912 : }
19913 :
19914 :
19915 0 : SWIGINTERN PyObject *_wrap_SetPROJEnableNetwork(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19916 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19917 0 : bool arg1 ;
19918 0 : bool val1 ;
19919 0 : int ecode1 = 0 ;
19920 0 : PyObject *swig_obj[1] ;
19921 :
19922 0 : if (!args) SWIG_fail;
19923 0 : swig_obj[0] = args;
19924 0 : ecode1 = SWIG_AsVal_bool(swig_obj[0], &val1);
19925 0 : if (!SWIG_IsOK(ecode1)) {
19926 0 : SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "SetPROJEnableNetwork" "', argument " "1"" of type '" "bool""'");
19927 : }
19928 0 : arg1 = static_cast< bool >(val1);
19929 0 : {
19930 0 : const int bLocalUseExceptions = GetUseExceptions();
19931 0 : if ( bLocalUseExceptions ) {
19932 0 : pushErrorHandler();
19933 : }
19934 0 : SetPROJEnableNetwork(arg1);
19935 0 : if ( bLocalUseExceptions ) {
19936 0 : popErrorHandler();
19937 : }
19938 : #ifndef SED_HACKS
19939 : if ( bLocalUseExceptions ) {
19940 : CPLErr eclass = CPLGetLastErrorType();
19941 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19942 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19943 : }
19944 : }
19945 : #endif
19946 : }
19947 0 : resultobj = SWIG_Py_Void();
19948 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; } }
19949 : return resultobj;
19950 : fail:
19951 : return NULL;
19952 : }
19953 :
19954 :
19955 1 : SWIGINTERN PyObject *_wrap_SetPROJAuxDbPath(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19956 1 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
19957 1 : char *arg1 = (char *) 0 ;
19958 1 : int bToFree1 = 0 ;
19959 1 : PyObject *swig_obj[1] ;
19960 :
19961 1 : if (!args) SWIG_fail;
19962 1 : swig_obj[0] = args;
19963 1 : {
19964 : /* %typemap(in) (const char *utf8_path) */
19965 1 : if (PyUnicode_Check(swig_obj[0]) || PyBytes_Check(swig_obj[0]))
19966 : {
19967 1 : arg1 = GDALPythonObjectToCStr( swig_obj[0], &bToFree1 );
19968 : }
19969 : else
19970 : {
19971 0 : arg1 = GDALPythonPathToCStr(swig_obj[0], &bToFree1);
19972 :
19973 : }
19974 1 : if (arg1 == NULL)
19975 : {
19976 0 : PyErr_SetString( PyExc_RuntimeError, "not a string or os.PathLike" );
19977 0 : SWIG_fail;
19978 : }
19979 : }
19980 1 : {
19981 1 : const int bLocalUseExceptions = GetUseExceptions();
19982 1 : if ( bLocalUseExceptions ) {
19983 1 : pushErrorHandler();
19984 : }
19985 1 : SetPROJAuxDbPath((char const *)arg1);
19986 1 : if ( bLocalUseExceptions ) {
19987 1 : popErrorHandler();
19988 : }
19989 : #ifndef SED_HACKS
19990 : if ( bLocalUseExceptions ) {
19991 : CPLErr eclass = CPLGetLastErrorType();
19992 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
19993 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
19994 : }
19995 : }
19996 : #endif
19997 : }
19998 1 : resultobj = SWIG_Py_Void();
19999 1 : {
20000 : /* %typemap(freearg) (const char *utf8_path) */
20001 1 : GDALPythonFreeCStr(arg1, bToFree1);
20002 : }
20003 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; } }
20004 : return resultobj;
20005 0 : fail:
20006 0 : {
20007 : /* %typemap(freearg) (const char *utf8_path) */
20008 1 : GDALPythonFreeCStr(arg1, bToFree1);
20009 : }
20010 : return NULL;
20011 : }
20012 :
20013 :
20014 0 : SWIGINTERN PyObject *_wrap_SetPROJAuxDbPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20015 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20016 0 : char **arg1 = (char **) 0 ;
20017 0 : PyObject *swig_obj[1] ;
20018 :
20019 0 : if (!args) SWIG_fail;
20020 0 : swig_obj[0] = args;
20021 0 : {
20022 : /* %typemap(in) char **dict */
20023 0 : arg1 = NULL;
20024 0 : if ( PySequence_Check( swig_obj[0] ) ) {
20025 0 : int bErr = FALSE;
20026 0 : arg1 = CSLFromPySequence(swig_obj[0], &bErr);
20027 0 : if ( bErr )
20028 : {
20029 0 : SWIG_fail;
20030 : }
20031 : }
20032 0 : else if ( PyMapping_Check( swig_obj[0] ) ) {
20033 0 : int bErr = FALSE;
20034 0 : arg1 = CSLFromPyMapping(swig_obj[0], &bErr);
20035 0 : if ( bErr )
20036 : {
20037 0 : SWIG_fail;
20038 : }
20039 : }
20040 : else {
20041 0 : PyErr_SetString(PyExc_TypeError,"Argument must be dictionary or sequence of strings");
20042 0 : SWIG_fail;
20043 : }
20044 : }
20045 0 : {
20046 0 : const int bLocalUseExceptions = GetUseExceptions();
20047 0 : if ( bLocalUseExceptions ) {
20048 0 : pushErrorHandler();
20049 : }
20050 0 : SetPROJAuxDbPaths(arg1);
20051 0 : if ( bLocalUseExceptions ) {
20052 0 : popErrorHandler();
20053 : }
20054 : #ifndef SED_HACKS
20055 : if ( bLocalUseExceptions ) {
20056 : CPLErr eclass = CPLGetLastErrorType();
20057 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20058 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20059 : }
20060 : }
20061 : #endif
20062 : }
20063 0 : resultobj = SWIG_Py_Void();
20064 0 : {
20065 : /* %typemap(freearg) char **dict */
20066 0 : CSLDestroy( arg1 );
20067 : }
20068 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; } }
20069 : return resultobj;
20070 0 : fail:
20071 0 : {
20072 : /* %typemap(freearg) char **dict */
20073 0 : CSLDestroy( arg1 );
20074 : }
20075 : return NULL;
20076 : }
20077 :
20078 :
20079 0 : SWIGINTERN PyObject *_wrap_GetPROJAuxDbPaths(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20080 0 : PyObject *resultobj = 0; int bLocalUseExceptionsCode = GetUseExceptions();
20081 0 : char **result = 0 ;
20082 :
20083 0 : if (!SWIG_Python_UnpackTuple(args, "GetPROJAuxDbPaths", 0, 0, 0)) SWIG_fail;
20084 0 : {
20085 0 : const int bLocalUseExceptions = GetUseExceptions();
20086 0 : if ( bLocalUseExceptions ) {
20087 0 : pushErrorHandler();
20088 : }
20089 0 : result = (char **)GetPROJAuxDbPaths();
20090 0 : if ( bLocalUseExceptions ) {
20091 0 : popErrorHandler();
20092 : }
20093 : #ifndef SED_HACKS
20094 : if ( bLocalUseExceptions ) {
20095 : CPLErr eclass = CPLGetLastErrorType();
20096 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
20097 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
20098 : }
20099 : }
20100 : #endif
20101 : }
20102 0 : {
20103 : /* %typemap(out) char **CSL -> ( string ) */
20104 0 : bool bErr = false;
20105 0 : resultobj = CSLToList(result, &bErr);
20106 0 : CSLDestroy(result);
20107 0 : if( bErr ) {
20108 0 : SWIG_fail;
20109 : }
20110 : }
20111 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; } }
20112 : return resultobj;
20113 : fail:
20114 : return NULL;
20115 : }
20116 :
20117 :
20118 : static PyMethodDef SwigMethods[] = {
20119 : { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
20120 : { "GetUseExceptions", _wrap_GetUseExceptions, METH_NOARGS, "GetUseExceptions() -> int"},
20121 : { "_GetExceptionsLocal", _wrap__GetExceptionsLocal, METH_NOARGS, "_GetExceptionsLocal() -> int"},
20122 : { "_SetExceptionsLocal", _wrap__SetExceptionsLocal, METH_O, "_SetExceptionsLocal(int bVal)"},
20123 : { "_UseExceptions", _wrap__UseExceptions, METH_NOARGS, "_UseExceptions()"},
20124 : { "_DontUseExceptions", _wrap__DontUseExceptions, METH_NOARGS, "_DontUseExceptions()"},
20125 : { "_UserHasSpecifiedIfUsingExceptions", _wrap__UserHasSpecifiedIfUsingExceptions, METH_NOARGS, "_UserHasSpecifiedIfUsingExceptions() -> int"},
20126 : { "GetWellKnownGeogCSAsWKT", _wrap_GetWellKnownGeogCSAsWKT, METH_O, "GetWellKnownGeogCSAsWKT(char const * name) -> OGRErr"},
20127 : { "GetUserInputAsWKT", _wrap_GetUserInputAsWKT, METH_O, "GetUserInputAsWKT(char const * name) -> OGRErr"},
20128 : { "AreaOfUse_west_lon_degree_get", _wrap_AreaOfUse_west_lon_degree_get, METH_O, "AreaOfUse_west_lon_degree_get(AreaOfUse self) -> double"},
20129 : { "AreaOfUse_south_lat_degree_get", _wrap_AreaOfUse_south_lat_degree_get, METH_O, "AreaOfUse_south_lat_degree_get(AreaOfUse self) -> double"},
20130 : { "AreaOfUse_east_lon_degree_get", _wrap_AreaOfUse_east_lon_degree_get, METH_O, "AreaOfUse_east_lon_degree_get(AreaOfUse self) -> double"},
20131 : { "AreaOfUse_north_lat_degree_get", _wrap_AreaOfUse_north_lat_degree_get, METH_O, "AreaOfUse_north_lat_degree_get(AreaOfUse self) -> double"},
20132 : { "AreaOfUse_name_get", _wrap_AreaOfUse_name_get, METH_O, "AreaOfUse_name_get(AreaOfUse self) -> char *"},
20133 : { "new_AreaOfUse", _wrap_new_AreaOfUse, METH_VARARGS, "new_AreaOfUse(double west_lon_degree, double south_lat_degree, double east_lon_degree, double north_lat_degree, char * name) -> AreaOfUse"},
20134 : { "delete_AreaOfUse", _wrap_delete_AreaOfUse, METH_O, "delete_AreaOfUse(AreaOfUse self)"},
20135 : { "AreaOfUse_swigregister", AreaOfUse_swigregister, METH_O, NULL},
20136 : { "AreaOfUse_swiginit", AreaOfUse_swiginit, METH_VARARGS, NULL},
20137 : { "OSRAreaOfUse_west_lon_degree_get", _wrap_OSRAreaOfUse_west_lon_degree_get, METH_O, "OSRAreaOfUse_west_lon_degree_get(AreaOfUse area) -> double"},
20138 : { "OSRAreaOfUse_south_lat_degree_get", _wrap_OSRAreaOfUse_south_lat_degree_get, METH_O, "OSRAreaOfUse_south_lat_degree_get(AreaOfUse area) -> double"},
20139 : { "OSRAreaOfUse_east_lon_degree_get", _wrap_OSRAreaOfUse_east_lon_degree_get, METH_O, "OSRAreaOfUse_east_lon_degree_get(AreaOfUse area) -> double"},
20140 : { "OSRAreaOfUse_north_lat_degree_get", _wrap_OSRAreaOfUse_north_lat_degree_get, METH_O, "OSRAreaOfUse_north_lat_degree_get(AreaOfUse area) -> double"},
20141 : { "OSRAreaOfUse_name_get", _wrap_OSRAreaOfUse_name_get, METH_O, "OSRAreaOfUse_name_get(AreaOfUse area) -> char const *"},
20142 : { "new_SpatialReference", (PyCFunction)(void(*)(void))_wrap_new_SpatialReference, METH_VARARGS|METH_KEYWORDS, "\n"
20143 : "new_SpatialReference(char const * wkt=\"\") -> SpatialReference\n"
20144 : "\n"
20145 : "Python proxy of an :cpp:class:`OGRSpatialReference`.\n"
20146 : "\n"
20147 : "Create a new spatial reference object. An empty object will be created\n"
20148 : "unless exactly one of the following parameters is provided.\n"
20149 : "\n"
20150 : "Parameters\n"
20151 : "----------\n"
20152 : "name : str / dict, optional\n"
20153 : " SRS description in a format understood by :py:meth:`SetFromUserInput`.\n"
20154 : "epsg : int, optional\n"
20155 : " EPSG CRS code, as understood by :py:meth:`ImportFromEPSG`\n"
20156 : "wkt : str, optional\n"
20157 : " WKT CRS string, as understood by :py:meth:`ImportFromWkt`\n"
20158 : "\n"
20159 : "Examples\n"
20160 : "--------\n"
20161 : ">>> osr.SpatialReference(epsg=5646).GetName()\n"
20162 : "'NAD83 / Vermont (ftUS)'\n"
20163 : ">>> osr.SpatialReference('+proj=utm +zone=18 +datum=WGS84').GetUTMZone()\n"
20164 : "18\n"
20165 : "\n"
20166 : ""},
20167 : { "delete_SpatialReference", _wrap_delete_SpatialReference, METH_O, "delete_SpatialReference(SpatialReference self)"},
20168 : { "SpatialReference___str__", _wrap_SpatialReference___str__, METH_O, "SpatialReference___str__(SpatialReference self) -> retStringAndCPLFree *"},
20169 : { "SpatialReference_GetName", _wrap_SpatialReference_GetName, METH_O, "\n"
20170 : "SpatialReference_GetName(SpatialReference self) -> char const *\n"
20171 : "\n"
20172 : "\n"
20173 : "Return the CRS name.\n"
20174 : "\n"
20175 : "See :cpp:func:`OGRSpatialReference::GetName`.\n"
20176 : "\n"
20177 : "Returns\n"
20178 : "-------\n"
20179 : "str\n"
20180 : "\n"
20181 : "Examples\n"
20182 : "--------\n"
20183 : ">>> vt_sp = osr.SpatialReference()\n"
20184 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20185 : "0\n"
20186 : ">>> vt_sp.GetName()\n"
20187 : "'NAD83 / Vermont (ftUS)'\n"
20188 : "\n"
20189 : "\n"
20190 : ""},
20191 : { "SpatialReference_GetCelestialBodyName", _wrap_SpatialReference_GetCelestialBodyName, METH_O, "SpatialReference_GetCelestialBodyName(SpatialReference self) -> char const *"},
20192 : { "SpatialReference_IsSame", (PyCFunction)(void(*)(void))_wrap_SpatialReference_IsSame, METH_VARARGS|METH_KEYWORDS, "\n"
20193 : "SpatialReference_IsSame(SpatialReference self, SpatialReference rhs, char ** options=None) -> int\n"
20194 : "\n"
20195 : "\n"
20196 : "Determine if two spatial references describe the same system.\n"
20197 : "\n"
20198 : "See :cpp:func:`OGRSpatialReference::IsSame`.\n"
20199 : "\n"
20200 : "Parameters\n"
20201 : "----------\n"
20202 : "rhs : SpatialReference\n"
20203 : "options : list/dict\n"
20204 : "\n"
20205 : "Returns\n"
20206 : "-------\n"
20207 : "int\n"
20208 : " 1 if the spatial references describe the same system, 0 otherwise\n"
20209 : "\n"
20210 : "\n"
20211 : ""},
20212 : { "SpatialReference_IsSameGeogCS", _wrap_SpatialReference_IsSameGeogCS, METH_VARARGS, "\n"
20213 : "SpatialReference_IsSameGeogCS(SpatialReference self, SpatialReference rhs) -> int\n"
20214 : "\n"
20215 : "\n"
20216 : "Determine if two spatial references share the same geographic coordinate system.\n"
20217 : "\n"
20218 : "See :cpp:func:`OGRSpatialReference::IsSameGeogCS`.\n"
20219 : "\n"
20220 : "Parameters\n"
20221 : "----------\n"
20222 : "rhs : SpatialReference\n"
20223 : "options : list/dict\n"
20224 : "\n"
20225 : "Returns\n"
20226 : "-------\n"
20227 : "int\n"
20228 : " 1 if the spatial references have the same GeogCS, 0 otherwise\n"
20229 : "\n"
20230 : "\n"
20231 : ""},
20232 : { "SpatialReference_IsSameVertCS", _wrap_SpatialReference_IsSameVertCS, METH_VARARGS, "\n"
20233 : "SpatialReference_IsSameVertCS(SpatialReference self, SpatialReference rhs) -> int\n"
20234 : "\n"
20235 : "\n"
20236 : "Determine if two spatial references share the same vertical coordinate system.\n"
20237 : "\n"
20238 : "See :cpp:func:`OGRSpatialReference::IsSameVertCS`.\n"
20239 : "\n"
20240 : "Parameters\n"
20241 : "----------\n"
20242 : "rhs : SpatialReference\n"
20243 : "options : list/dict\n"
20244 : "\n"
20245 : "Returns\n"
20246 : "-------\n"
20247 : "int\n"
20248 : " 1 if the spatial references have the same VertCS, 0 otherwise\n"
20249 : "\n"
20250 : "\n"
20251 : ""},
20252 : { "SpatialReference_IsGeographic", _wrap_SpatialReference_IsGeographic, METH_O, "\n"
20253 : "SpatialReference_IsGeographic(SpatialReference self) -> int\n"
20254 : "\n"
20255 : "\n"
20256 : "Check if this SRS is a geographic coordinate system.\n"
20257 : "\n"
20258 : "See :cpp:func:`OGRSpatialReference::IsGeographic`.\n"
20259 : "\n"
20260 : "Returns\n"
20261 : "-------\n"
20262 : "int\n"
20263 : " 1 if the SRS is geographic, 0 otherwise\n"
20264 : "\n"
20265 : ""},
20266 : { "SpatialReference_IsDerivedGeographic", _wrap_SpatialReference_IsDerivedGeographic, METH_O, "\n"
20267 : "SpatialReference_IsDerivedGeographic(SpatialReference self) -> int\n"
20268 : "\n"
20269 : "\n"
20270 : "Check if this CRS is a derived geographic CRS, such as a rotated long/lat grid.\n"
20271 : "\n"
20272 : "See :cpp:func:`OGRSpatialReference::IsDerivedGeographic`.\n"
20273 : "\n"
20274 : "Returns\n"
20275 : "-------\n"
20276 : "int\n"
20277 : " 1 if the CRS is derived geographic, 0 otherwise\n"
20278 : "\n"
20279 : ""},
20280 : { "SpatialReference_IsProjected", _wrap_SpatialReference_IsProjected, METH_O, "\n"
20281 : "SpatialReference_IsProjected(SpatialReference self) -> int\n"
20282 : "\n"
20283 : "\n"
20284 : "Check if this SRS is a projected coordinate system.\n"
20285 : "\n"
20286 : "See :cpp:func:`OGRSpatialReference::IsProjected`.\n"
20287 : "\n"
20288 : "Returns\n"
20289 : "-------\n"
20290 : "int\n"
20291 : " 1 if the SRS is projected, 0 otherwise\n"
20292 : "\n"
20293 : ""},
20294 : { "SpatialReference_IsDerivedProjected", _wrap_SpatialReference_IsDerivedProjected, METH_O, "SpatialReference_IsDerivedProjected(SpatialReference self) -> int"},
20295 : { "SpatialReference_IsCompound", _wrap_SpatialReference_IsCompound, METH_O, "\n"
20296 : "SpatialReference_IsCompound(SpatialReference self) -> int\n"
20297 : "\n"
20298 : "\n"
20299 : "Check if this CRS is a compound CRS.\n"
20300 : "\n"
20301 : "See :cpp:func:`OGRSpatialReference::IsCompound`.\n"
20302 : "\n"
20303 : "Returns\n"
20304 : "-------\n"
20305 : "int\n"
20306 : " 1 if the CRS is compound, 0 otherwise\n"
20307 : "\n"
20308 : ""},
20309 : { "SpatialReference_IsGeocentric", _wrap_SpatialReference_IsGeocentric, METH_O, "\n"
20310 : "SpatialReference_IsGeocentric(SpatialReference self) -> int\n"
20311 : "\n"
20312 : "\n"
20313 : "Check if this SRS is a geocentric coordinate system.\n"
20314 : "\n"
20315 : "See :cpp:func:`OGRSpatialReference::IsGeocentric`.\n"
20316 : "\n"
20317 : "Returns\n"
20318 : "-------\n"
20319 : "int\n"
20320 : " 1 if the SRS is geocentric, 0 otherwise\n"
20321 : "\n"
20322 : ""},
20323 : { "SpatialReference_IsLocal", _wrap_SpatialReference_IsLocal, METH_O, "\n"
20324 : "SpatialReference_IsLocal(SpatialReference self) -> int\n"
20325 : "\n"
20326 : "\n"
20327 : "Check if this CRS is a local CRS.\n"
20328 : "\n"
20329 : "See :cpp:func:`OGRSpatialReference::IsLocal`.\n"
20330 : "\n"
20331 : "Returns\n"
20332 : "-------\n"
20333 : "int\n"
20334 : " 1 if the SRS is local, 0 otherwise\n"
20335 : "\n"
20336 : ""},
20337 : { "SpatialReference_IsVertical", _wrap_SpatialReference_IsVertical, METH_O, "\n"
20338 : "SpatialReference_IsVertical(SpatialReference self) -> int\n"
20339 : "\n"
20340 : "\n"
20341 : "Check if this is a vertical coordinate system.\n"
20342 : "\n"
20343 : "See :cpp:func:`OGRSpatialReference::IsVertical`.\n"
20344 : "\n"
20345 : "Returns\n"
20346 : "-------\n"
20347 : "int\n"
20348 : " 1 if the CRS is vertical, 0 otherwise\n"
20349 : "\n"
20350 : "\n"
20351 : ""},
20352 : { "SpatialReference_IsDynamic", _wrap_SpatialReference_IsDynamic, METH_O, "\n"
20353 : "SpatialReference_IsDynamic(SpatialReference self) -> bool\n"
20354 : "\n"
20355 : "\n"
20356 : "Check if this CRS is a dynamic coordinate CRS.\n"
20357 : "\n"
20358 : "See :cpp:func:`OGRSpatialReference::IsDynamic`.\n"
20359 : "\n"
20360 : "Returns\n"
20361 : "-------\n"
20362 : "bool\n"
20363 : "\n"
20364 : ""},
20365 : { "SpatialReference_HasPointMotionOperation", _wrap_SpatialReference_HasPointMotionOperation, METH_O, "\n"
20366 : "SpatialReference_HasPointMotionOperation(SpatialReference self) -> bool\n"
20367 : "\n"
20368 : "\n"
20369 : "Check if a CRS has an associated point motion operation.\n"
20370 : "\n"
20371 : "See :cpp:func:`OGRSpatialReference::HasPointMotionOperation`.\n"
20372 : "\n"
20373 : "Returns\n"
20374 : "-------\n"
20375 : "bool\n"
20376 : "\n"
20377 : "\n"
20378 : ""},
20379 : { "SpatialReference_GetCoordinateEpoch", _wrap_SpatialReference_GetCoordinateEpoch, METH_O, "\n"
20380 : "SpatialReference_GetCoordinateEpoch(SpatialReference self) -> double\n"
20381 : "\n"
20382 : "\n"
20383 : "Return the coordinate epoch as a decimal year.\n"
20384 : "\n"
20385 : "See :cpp:func:`OGRSpatialReference::GetCoordinateEpoch`.\n"
20386 : "\n"
20387 : "Returns\n"
20388 : "-------\n"
20389 : "float\n"
20390 : " coordinate epoch as a decimal year, or 0 if not set/relevant\n"
20391 : "\n"
20392 : "\n"
20393 : ""},
20394 : { "SpatialReference_SetCoordinateEpoch", _wrap_SpatialReference_SetCoordinateEpoch, METH_VARARGS, "SpatialReference_SetCoordinateEpoch(SpatialReference self, double coordinateEpoch)"},
20395 : { "SpatialReference_EPSGTreatsAsLatLong", _wrap_SpatialReference_EPSGTreatsAsLatLong, METH_O, "SpatialReference_EPSGTreatsAsLatLong(SpatialReference self) -> int"},
20396 : { "SpatialReference_EPSGTreatsAsNorthingEasting", _wrap_SpatialReference_EPSGTreatsAsNorthingEasting, METH_O, "SpatialReference_EPSGTreatsAsNorthingEasting(SpatialReference self) -> int"},
20397 : { "SpatialReference_SetAuthority", _wrap_SpatialReference_SetAuthority, METH_VARARGS, "SpatialReference_SetAuthority(SpatialReference self, char const * pszTargetKey, char const * pszAuthority, int nCode) -> OGRErr"},
20398 : { "SpatialReference_GetAttrValue", _wrap_SpatialReference_GetAttrValue, METH_VARARGS, "\n"
20399 : "SpatialReference_GetAttrValue(SpatialReference self, char const * name, int child=0) -> char const *\n"
20400 : "\n"
20401 : "\n"
20402 : "Fetch indicated attribute of named node.\n"
20403 : "\n"
20404 : "See :cpp:func:`OGRSpatialReference::GetAttrValue`.\n"
20405 : "\n"
20406 : "Parameters\n"
20407 : "----------\n"
20408 : "name : str\n"
20409 : " tree node to look for (case insensitive)\n"
20410 : "child : int, default = 0\n"
20411 : " 0-indexed child of the node\n"
20412 : "\n"
20413 : "Returns\n"
20414 : "-------\n"
20415 : "str\n"
20416 : "\n"
20417 : "Examples\n"
20418 : "--------\n"
20419 : ">>> vt_sp = osr.SpatialReference()\n"
20420 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20421 : "0\n"
20422 : ">>> vt_sp.GetAttrValue('UNIT', 0)\n"
20423 : "'US survey foot'\n"
20424 : "\n"
20425 : "\n"
20426 : ""},
20427 : { "SpatialReference_SetAttrValue", _wrap_SpatialReference_SetAttrValue, METH_VARARGS, "SpatialReference_SetAttrValue(SpatialReference self, char const * name, char const * value) -> OGRErr"},
20428 : { "SpatialReference_SetAngularUnits", _wrap_SpatialReference_SetAngularUnits, METH_VARARGS, "SpatialReference_SetAngularUnits(SpatialReference self, char const * name, double to_radians) -> OGRErr"},
20429 : { "SpatialReference_GetAngularUnits", _wrap_SpatialReference_GetAngularUnits, METH_O, "\n"
20430 : "SpatialReference_GetAngularUnits(SpatialReference self) -> double\n"
20431 : "\n"
20432 : "\n"
20433 : "Fetch conversion between angular geographic coordinate system units and radians.\n"
20434 : "\n"
20435 : "See :cpp:func:`OGRSpatialReference::GetAngularUnits`.\n"
20436 : "\n"
20437 : "Returns\n"
20438 : "-------\n"
20439 : "float\n"
20440 : " Value to multiply angular distances by to transform them to radians.\n"
20441 : "\n"
20442 : "Examples\n"
20443 : "--------\n"
20444 : ">>> srs = osr.SpatialReference()\n"
20445 : ">>> srs.ImportFromEPSG(4326)\n"
20446 : "0\n"
20447 : ">>> srs.GetAngularUnits()\n"
20448 : "0.017453292519943295\n"
20449 : "\n"
20450 : "\n"
20451 : ""},
20452 : { "SpatialReference_GetAngularUnitsName", _wrap_SpatialReference_GetAngularUnitsName, METH_O, "\n"
20453 : "SpatialReference_GetAngularUnitsName(SpatialReference self) -> char const *\n"
20454 : "\n"
20455 : "\n"
20456 : "Fetch angular geographic coordinate system units.\n"
20457 : "\n"
20458 : "See :cpp:func:`OGRSpatialReference::GetAngularUnits`.\n"
20459 : "\n"
20460 : "Returns\n"
20461 : "-------\n"
20462 : "str\n"
20463 : "\n"
20464 : "Examples\n"
20465 : "--------\n"
20466 : ">>> srs = osr.SpatialReference()\n"
20467 : ">>> srs.ImportFromEPSG(4326)\n"
20468 : "0\n"
20469 : ">>> srs.GetAngularUnitsName()\n"
20470 : "'degree'\n"
20471 : "\n"
20472 : "\n"
20473 : ""},
20474 : { "SpatialReference_SetTargetLinearUnits", _wrap_SpatialReference_SetTargetLinearUnits, METH_VARARGS, "SpatialReference_SetTargetLinearUnits(SpatialReference self, char const * target, char const * name, double to_meters) -> OGRErr"},
20475 : { "SpatialReference_SetLinearUnits", _wrap_SpatialReference_SetLinearUnits, METH_VARARGS, "SpatialReference_SetLinearUnits(SpatialReference self, char const * name, double to_meters) -> OGRErr"},
20476 : { "SpatialReference_SetLinearUnitsAndUpdateParameters", _wrap_SpatialReference_SetLinearUnitsAndUpdateParameters, METH_VARARGS, "SpatialReference_SetLinearUnitsAndUpdateParameters(SpatialReference self, char const * name, double to_meters) -> OGRErr"},
20477 : { "SpatialReference_GetTargetLinearUnits", _wrap_SpatialReference_GetTargetLinearUnits, METH_VARARGS, "\n"
20478 : "SpatialReference_GetTargetLinearUnits(SpatialReference self, char const * target_key) -> double\n"
20479 : "\n"
20480 : "\n"
20481 : "Fetch linear units for a target.\n"
20482 : "\n"
20483 : "See :cpp:func:`OGRSpatialReference::GetTargetLinearUnits`.\n"
20484 : "\n"
20485 : "Parameters\n"
20486 : "----------\n"
20487 : "target_key : str\n"
20488 : " key to look un, such as 'PROJCS' or 'VERT_CS'\n"
20489 : "\n"
20490 : "Returns\n"
20491 : "-------\n"
20492 : "double\n"
20493 : "\n"
20494 : "\n"
20495 : ""},
20496 : { "SpatialReference_GetLinearUnits", _wrap_SpatialReference_GetLinearUnits, METH_O, "\n"
20497 : "SpatialReference_GetLinearUnits(SpatialReference self) -> double\n"
20498 : "\n"
20499 : "\n"
20500 : "Fetch the conversion between linear projection units and meters.\n"
20501 : "\n"
20502 : "See :cpp:func:`OGRSpatialReference::GetLinearUnits`.\n"
20503 : "\n"
20504 : "Returns\n"
20505 : "-------\n"
20506 : "float\n"
20507 : "\n"
20508 : "Examples\n"
20509 : "--------\n"
20510 : ">>> vt_sp = osr.SpatialReference()\n"
20511 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20512 : "0\n"
20513 : ">>> vt_sp.GetLinearUnits()\n"
20514 : "0.30480060960121924\n"
20515 : "\n"
20516 : "\n"
20517 : ""},
20518 : { "SpatialReference_GetLinearUnitsName", _wrap_SpatialReference_GetLinearUnitsName, METH_O, "\n"
20519 : "SpatialReference_GetLinearUnitsName(SpatialReference self) -> char const *\n"
20520 : "\n"
20521 : "\n"
20522 : "Fetch the name of the linear projection units.\n"
20523 : "\n"
20524 : "See :cpp:func:`OGRSpatialReference::GetLinearUnits`.\n"
20525 : "\n"
20526 : "Returns\n"
20527 : "-------\n"
20528 : "str\n"
20529 : "\n"
20530 : "Examples\n"
20531 : "--------\n"
20532 : ">>> vt_sp = osr.SpatialReference()\n"
20533 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20534 : "0\n"
20535 : ">>> vt_sp.GetLinearUnitsName()\n"
20536 : "'US survey foot'\n"
20537 : "\n"
20538 : "\n"
20539 : ""},
20540 : { "SpatialReference_GetAuthorityCode", _wrap_SpatialReference_GetAuthorityCode, METH_VARARGS, "\n"
20541 : "SpatialReference_GetAuthorityCode(SpatialReference self, char const * target_key) -> char const *\n"
20542 : "\n"
20543 : "\n"
20544 : "Get the authority code for a node.\n"
20545 : "\n"
20546 : "See :cpp:func:`OGRSpatialReference::GetAuthorityCode`.\n"
20547 : "\n"
20548 : "Parameters\n"
20549 : "----------\n"
20550 : "target_key : str\n"
20551 : " the partial or complete path to the node to get an authority from\n"
20552 : " (e.g., 'PROJCS', 'GEOGCS' or ``None`` to get an authority code\n"
20553 : " on the root element)\n"
20554 : "\n"
20555 : "Returns\n"
20556 : "-------\n"
20557 : "str or ``None`` on failure\n"
20558 : "\n"
20559 : "Examples\n"
20560 : "--------\n"
20561 : ">>> srs = osr.SpatialReference()\n"
20562 : ">>> srs.ImportFromEPSG(4326)\n"
20563 : "0\n"
20564 : ">>> srs.GetAuthorityName('DATUM')\n"
20565 : "'EPSG'\n"
20566 : ">>> srs.GetAuthorityCode('DATUM')\n"
20567 : "'6326'\n"
20568 : ">>> srs.GetAuthorityCode(None)\n"
20569 : "'4326'\n"
20570 : "\n"
20571 : "\n"
20572 : ""},
20573 : { "SpatialReference_GetAuthorityName", _wrap_SpatialReference_GetAuthorityName, METH_VARARGS, "\n"
20574 : "SpatialReference_GetAuthorityName(SpatialReference self, char const * target_key) -> char const *\n"
20575 : "\n"
20576 : "\n"
20577 : "Get the authority name for a node.\n"
20578 : "\n"
20579 : "See :cpp:func:`OGRSpatialReference::GetAuthorityName`.\n"
20580 : "\n"
20581 : "Parameters\n"
20582 : "----------\n"
20583 : "target_key : str\n"
20584 : " the partial or complete path to the node to get an authority from\n"
20585 : " (e.g., 'PROJCS', 'GEOGCS' or ``None`` to get an authority name\n"
20586 : " on the root element)\n"
20587 : "\n"
20588 : "Returns\n"
20589 : "-------\n"
20590 : "str\n"
20591 : "\n"
20592 : ""},
20593 : { "SpatialReference_GetAreaOfUse", _wrap_SpatialReference_GetAreaOfUse, METH_O, "\n"
20594 : "SpatialReference_GetAreaOfUse(SpatialReference self) -> AreaOfUse\n"
20595 : "\n"
20596 : "\n"
20597 : "Return the area of use of the SRS.\n"
20598 : "\n"
20599 : "See :cpp:func:`OGRSpatialReference::GetAreaOfUse`.\n"
20600 : "\n"
20601 : "Returns\n"
20602 : "-------\n"
20603 : "AreaOfUse\n"
20604 : " object providing a description of the area of use as well as bounding parallels / meridians\n"
20605 : "\n"
20606 : "Examples\n"
20607 : "--------\n"
20608 : "\n"
20609 : ">>> vt_sp = osr.SpatialReference()\n"
20610 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20611 : "0\n"
20612 : ">>> aou = vt_sp.GetAreaOfUse()\n"
20613 : ">>> aou.name\n"
20614 : "'United States (USA) - Vermont - counties of Addison; Bennington; Caledonia; Chittenden; Essex; Franklin; Grand Isle; Lamoille; Orange; Orleans; Rutland; Washington; Windham; Windsor.'\n"
20615 : ">>> aou.west_lon_degree, aou.south_lat_degree, aou.east_lon_degree, aou.north_lat_degree\n"
20616 : "(-73.44, 42.72, -71.5, 45.03)\n"
20617 : "\n"
20618 : "\n"
20619 : ""},
20620 : { "SpatialReference_GetAxisName", _wrap_SpatialReference_GetAxisName, METH_VARARGS, "\n"
20621 : "SpatialReference_GetAxisName(SpatialReference self, char const * target_key, int iAxis) -> char const *\n"
20622 : "\n"
20623 : "\n"
20624 : "Fetch an axis description.\n"
20625 : "\n"
20626 : "See :cpp:func:`OGRSpatialReference::GetAxis`.\n"
20627 : "\n"
20628 : "Parameters\n"
20629 : "----------\n"
20630 : "target_key : str\n"
20631 : " The portion of the coordinate system, either 'GEOGCS' or 'PROJCS'\n"
20632 : "iAxis : int\n"
20633 : " The 0-based index of the axis to fetch\n"
20634 : "\n"
20635 : "Returns\n"
20636 : "-------\n"
20637 : "str\n"
20638 : "\n"
20639 : "Examples\n"
20640 : "--------\n"
20641 : ">>> srs = osr.SpatialReference()\n"
20642 : ">>> srs.ImportFromEPSG(4979)\n"
20643 : "0\n"
20644 : ">>> for i in range(3):\n"
20645 : "... srs.GetAxisName('GEOGCS', i)\n"
20646 : "...\n"
20647 : "'Geodetic latitude'\n"
20648 : "'Geodetic longitude'\n"
20649 : "'Ellipsoidal height'\n"
20650 : "\n"
20651 : "\n"
20652 : ""},
20653 : { "SpatialReference_GetAxesCount", _wrap_SpatialReference_GetAxesCount, METH_O, "\n"
20654 : "SpatialReference_GetAxesCount(SpatialReference self) -> int\n"
20655 : "\n"
20656 : "\n"
20657 : "Return the number of axes of the coordinate system of the CRS.\n"
20658 : "\n"
20659 : "See :cpp:func:`OGRSpatialReference::GetAxesCount`.\n"
20660 : "\n"
20661 : "Returns\n"
20662 : "-------\n"
20663 : "int\n"
20664 : "\n"
20665 : "Examples\n"
20666 : "--------\n"
20667 : ">>> srs = osr.SpatialReference()\n"
20668 : ">>> srs.ImportFromEPSG(4326)\n"
20669 : "0\n"
20670 : ">>> srs.GetAxesCount()\n"
20671 : "2\n"
20672 : ">>> srs.ImportFromEPSG(4979)\n"
20673 : "0\n"
20674 : ">>> srs.GetAxesCount()\n"
20675 : "3\n"
20676 : "\n"
20677 : ""},
20678 : { "SpatialReference_GetAxisOrientation", _wrap_SpatialReference_GetAxisOrientation, METH_VARARGS, "\n"
20679 : "SpatialReference_GetAxisOrientation(SpatialReference self, char const * target_key, int iAxis) -> OGRAxisOrientation\n"
20680 : "\n"
20681 : "\n"
20682 : "Fetch an axis orientation.\n"
20683 : "\n"
20684 : "See :cpp:func:`OGRSpatialReference::GetAxis`.\n"
20685 : "\n"
20686 : "Parameters\n"
20687 : "----------\n"
20688 : "target_key : str\n"
20689 : " The portion of the coordinate system, either 'GEOGCS' or 'PROJCS'\n"
20690 : "iAxis : int\n"
20691 : " The 0-based index of the axis to fetch\n"
20692 : "\n"
20693 : "Returns\n"
20694 : "-------\n"
20695 : "int\n"
20696 : "\n"
20697 : "Examples\n"
20698 : "--------\n"
20699 : ">>> srs = osr.SpatialReference()\n"
20700 : ">>> srs.ImportFromEPSG(4979)\n"
20701 : "0\n"
20702 : ">>> srs.GetAxisOrientation('GEOGCS', 0) == osr.OAO_North\n"
20703 : "True\n"
20704 : ">>> srs.GetAxisOrientation('GEOGCS', 1) == osr.OAO_East\n"
20705 : "True\n"
20706 : ">>> srs.GetAxisOrientation('GEOGCS', 2) == osr.OAO_Up\n"
20707 : "True\n"
20708 : "\n"
20709 : ""},
20710 : { "SpatialReference_GetAxisMappingStrategy", _wrap_SpatialReference_GetAxisMappingStrategy, METH_O, "\n"
20711 : "SpatialReference_GetAxisMappingStrategy(SpatialReference self) -> OSRAxisMappingStrategy\n"
20712 : "\n"
20713 : "\n"
20714 : "Return the data axis to CRS axis mapping strategy:\n"
20715 : "\n"
20716 : "- :py:const:`OAMS_TRADITIONAL_GIS_ORDER` means that for geographic CRS\n"
20717 : " with lag/long order, the data will still be long/lat ordered. Similarly\n"
20718 : " for a projected CRS with northing/easting order, the data will still be\n"
20719 : " easting/northing ordered.\n"
20720 : "- :py:const:`OAMS_AUTHORITY_COMPLIANT` means that the data axis will be\n"
20721 : " identical to the CRS axis.\n"
20722 : "- :py:const:`OAMS_CUSTOM` means that the ordering is defined with\n"
20723 : " :py:meth:`SetDataAxisToSRSAxisMapping`.\n"
20724 : "\n"
20725 : "See :cpp:func:`OGRSpatialReference::GetAxisMappingStrategy`.\n"
20726 : "\n"
20727 : "Returns\n"
20728 : "-------\n"
20729 : "int\n"
20730 : "\n"
20731 : "\n"
20732 : ""},
20733 : { "SpatialReference_SetAxisMappingStrategy", _wrap_SpatialReference_SetAxisMappingStrategy, METH_VARARGS, "SpatialReference_SetAxisMappingStrategy(SpatialReference self, OSRAxisMappingStrategy strategy)"},
20734 : { "SpatialReference_GetDataAxisToSRSAxisMapping", _wrap_SpatialReference_GetDataAxisToSRSAxisMapping, METH_O, "\n"
20735 : "SpatialReference_GetDataAxisToSRSAxisMapping(SpatialReference self)\n"
20736 : "\n"
20737 : "\n"
20738 : "Return the data axis to SRS axis mapping.\n"
20739 : "\n"
20740 : "See :cpp:func:`OGRSpatialReference::GetDataAxisToSRSAxisMapping`.\n"
20741 : "\n"
20742 : "Returns\n"
20743 : "-------\n"
20744 : "tuple\n"
20745 : "\n"
20746 : "\n"
20747 : ""},
20748 : { "SpatialReference_SetDataAxisToSRSAxisMapping", _wrap_SpatialReference_SetDataAxisToSRSAxisMapping, METH_VARARGS, "SpatialReference_SetDataAxisToSRSAxisMapping(SpatialReference self, int nList) -> OGRErr"},
20749 : { "SpatialReference_SetUTM", _wrap_SpatialReference_SetUTM, METH_VARARGS, "SpatialReference_SetUTM(SpatialReference self, int zone, int north=1) -> OGRErr"},
20750 : { "SpatialReference_GetUTMZone", _wrap_SpatialReference_GetUTMZone, METH_O, "\n"
20751 : "SpatialReference_GetUTMZone(SpatialReference self) -> int\n"
20752 : "\n"
20753 : "\n"
20754 : "Get UTM zone.\n"
20755 : "\n"
20756 : "See :cpp:func:`OGRSpatialReference::GetUTMZone`.\n"
20757 : "\n"
20758 : "Returns\n"
20759 : "-------\n"
20760 : "int\n"
20761 : " 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"
20762 : "\n"
20763 : "\n"
20764 : ""},
20765 : { "SpatialReference_SetStatePlane", _wrap_SpatialReference_SetStatePlane, METH_VARARGS, "SpatialReference_SetStatePlane(SpatialReference self, int zone, int is_nad83=1, char const * unitsname=\"\", double units=0.0) -> OGRErr"},
20766 : { "SpatialReference_AutoIdentifyEPSG", _wrap_SpatialReference_AutoIdentifyEPSG, METH_O, "\n"
20767 : "SpatialReference_AutoIdentifyEPSG(SpatialReference self) -> OGRErr\n"
20768 : "\n"
20769 : "\n"
20770 : "Add an EPSG authority code to the CRS\n"
20771 : "where an aspect of the coordinate system can be easily and safely\n"
20772 : "corresponded with an EPSG identifier.\n"
20773 : "\n"
20774 : "See :cpp:func:`OGRSpatialReference::AutoIdentifyEPSG`.\n"
20775 : "\n"
20776 : "Returns\n"
20777 : "-------\n"
20778 : "int\n"
20779 : " :py:const:`OGRERR_NONE` or :py:const:`OGRERR_UNSUPPORTED_SRS`.\n"
20780 : "\n"
20781 : "\n"
20782 : ""},
20783 : { "SpatialReference_FindMatches", _wrap_SpatialReference_FindMatches, METH_VARARGS, "SpatialReference_FindMatches(SpatialReference self, char ** options=None)"},
20784 : { "SpatialReference_SetProjection", _wrap_SpatialReference_SetProjection, METH_VARARGS, "SpatialReference_SetProjection(SpatialReference self, char const * arg) -> OGRErr"},
20785 : { "SpatialReference_SetProjParm", _wrap_SpatialReference_SetProjParm, METH_VARARGS, "SpatialReference_SetProjParm(SpatialReference self, char const * name, double val) -> OGRErr"},
20786 : { "SpatialReference_GetProjParm", _wrap_SpatialReference_GetProjParm, METH_VARARGS, "\n"
20787 : "SpatialReference_GetProjParm(SpatialReference self, char const * name, double default_val=0.0) -> double\n"
20788 : "\n"
20789 : "\n"
20790 : "Fetch a projection parameter value.\n"
20791 : "\n"
20792 : "See :cpp:func:`OGRSpatialReference::GetProjParm`.\n"
20793 : "\n"
20794 : "Parameters\n"
20795 : "----------\n"
20796 : "name : str\n"
20797 : " parameter name, available as constants prefixed with `SRS_PP`.\n"
20798 : "default_val : float, default = 0.0\n"
20799 : " value to return if this parameter doesn't exist\n"
20800 : "\n"
20801 : "Returns\n"
20802 : "-------\n"
20803 : "float\n"
20804 : "\n"
20805 : "Examples\n"
20806 : "--------\n"
20807 : ">>> vt_sp = osr.SpatialReference()\n"
20808 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20809 : "0\n"
20810 : ">>> vt_sp.GetProjParm(osr.SRS_PP_FALSE_EASTING)\n"
20811 : "1640416.6667\n"
20812 : ">>> vt_sp.GetProjParm(osr.SRS_PP_FALSE_NORTHING)\n"
20813 : "0.0\n"
20814 : "\n"
20815 : "\n"
20816 : ""},
20817 : { "SpatialReference_SetNormProjParm", _wrap_SpatialReference_SetNormProjParm, METH_VARARGS, "SpatialReference_SetNormProjParm(SpatialReference self, char const * name, double val) -> OGRErr"},
20818 : { "SpatialReference_GetNormProjParm", _wrap_SpatialReference_GetNormProjParm, METH_VARARGS, "\n"
20819 : "SpatialReference_GetNormProjParm(SpatialReference self, char const * name, double default_val=0.0) -> double\n"
20820 : "\n"
20821 : "\n"
20822 : "Fetch a normalized projection parameter value.\n"
20823 : "\n"
20824 : "This method is the same as :py:meth:`GetProjParm` except that the value of the\n"
20825 : "parameter is normalized into degrees or meters depending on whether it is\n"
20826 : "linear or angular.\n"
20827 : "\n"
20828 : "See :cpp:func:`OGRSpatialReference::GetNormProjParm`.\n"
20829 : "\n"
20830 : "Parameters\n"
20831 : "----------\n"
20832 : "name : str\n"
20833 : " parameter name, available as constants prefixed with `SRS_PP`.\n"
20834 : "default_val : float, default = 0.0\n"
20835 : " value to return if this parameter doesn't exist\n"
20836 : "\n"
20837 : "Returns\n"
20838 : "-------\n"
20839 : "float\n"
20840 : "\n"
20841 : "Examples\n"
20842 : "--------\n"
20843 : ">>> vt_sp = osr.SpatialReference()\n"
20844 : ">>> vt_sp.ImportFromEPSG(5646)\n"
20845 : "0\n"
20846 : ">>> vt_sp.GetProjParm(osr.SRS_PP_FALSE_EASTING)\n"
20847 : "1640416.6667\n"
20848 : ">>> vt_sp.GetNormProjParm(osr.SRS_PP_FALSE_EASTING)\n"
20849 : "500000.0000101601\n"
20850 : "\n"
20851 : "\n"
20852 : ""},
20853 : { "SpatialReference_GetSemiMajor", _wrap_SpatialReference_GetSemiMajor, METH_O, "\n"
20854 : "SpatialReference_GetSemiMajor(SpatialReference self) -> double\n"
20855 : "\n"
20856 : "\n"
20857 : "Get spheroid semi major axis (in meters starting with GDAL 3.0)\n"
20858 : "\n"
20859 : "See :cpp:func:`OGRSpatialReference::GetSemiMajor`.\n"
20860 : "\n"
20861 : "Returns\n"
20862 : "-------\n"
20863 : "float\n"
20864 : " semi-major axis, or :py:const:`SRS_WGS84_SEMIMAJOR` if it cannot be found.\n"
20865 : "\n"
20866 : ""},
20867 : { "SpatialReference_GetSemiMinor", _wrap_SpatialReference_GetSemiMinor, METH_O, "\n"
20868 : "SpatialReference_GetSemiMinor(SpatialReference self) -> double\n"
20869 : "\n"
20870 : "\n"
20871 : "Get spheroid semi minor axis.\n"
20872 : "\n"
20873 : "See :cpp:func:`OGRSpatialReference::GetSemiMinor`.\n"
20874 : "\n"
20875 : "Returns\n"
20876 : "-------\n"
20877 : "float\n"
20878 : " semi-minor axis, or :py:const:`SRS_WGS84_SEMIMINOR` if it cannot be found.\n"
20879 : "\n"
20880 : ""},
20881 : { "SpatialReference_GetInvFlattening", _wrap_SpatialReference_GetInvFlattening, METH_O, "\n"
20882 : "SpatialReference_GetInvFlattening(SpatialReference self) -> double\n"
20883 : "\n"
20884 : "\n"
20885 : "Get the spheroid inverse flattening.\n"
20886 : "\n"
20887 : "See :cpp:func:`OGRSpatialReference::GetInvFlattening`.\n"
20888 : "\n"
20889 : "Returns\n"
20890 : "-------\n"
20891 : "float\n"
20892 : "\n"
20893 : "Examples\n"
20894 : "--------\n"
20895 : ">>> srs = osr.SpatialReference()\n"
20896 : ">>> srs.ImportFromEPSG(4326) # WGS84\n"
20897 : "0\n"
20898 : ">>> srs.GetInvFlattening()\n"
20899 : "298.257223563\n"
20900 : ">>> srs.ImportFromEPSG(4269) # NAD83\n"
20901 : "0\n"
20902 : ">>> srs.GetInvFlattening()\n"
20903 : "298.257222101\n"
20904 : "\n"
20905 : ""},
20906 : { "SpatialReference_SetACEA", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetACEA, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetACEA(SpatialReference self, double stdp1, double stdp2, double clat, double clong, double fe, double fn) -> OGRErr"},
20907 : { "SpatialReference_SetAE", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetAE, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetAE(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20908 : { "SpatialReference_SetBonne", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetBonne, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetBonne(SpatialReference self, double stdp, double cm, double fe, double fn) -> OGRErr"},
20909 : { "SpatialReference_SetCEA", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetCEA, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetCEA(SpatialReference self, double stdp1, double cm, double fe, double fn) -> OGRErr"},
20910 : { "SpatialReference_SetCS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetCS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetCS(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20911 : { "SpatialReference_SetEC", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEC, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEC(SpatialReference self, double stdp1, double stdp2, double clat, double clong, double fe, double fn) -> OGRErr"},
20912 : { "SpatialReference_SetEckertIV", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEckertIV, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEckertIV(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
20913 : { "SpatialReference_SetEckertVI", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEckertVI, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEckertVI(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
20914 : { "SpatialReference_SetEquirectangular", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEquirectangular, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEquirectangular(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20915 : { "SpatialReference_SetEquirectangular2", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetEquirectangular2, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetEquirectangular2(SpatialReference self, double clat, double clong, double pseudostdparallellat, double fe, double fn) -> OGRErr"},
20916 : { "SpatialReference_SetGaussSchreiberTMercator", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGaussSchreiberTMercator, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGaussSchreiberTMercator(SpatialReference self, double clat, double clong, double sc, double fe, double fn) -> OGRErr"},
20917 : { "SpatialReference_SetGS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGS(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
20918 : { "SpatialReference_SetGH", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGH, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGH(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
20919 : { "SpatialReference_SetIGH", _wrap_SpatialReference_SetIGH, METH_O, "SpatialReference_SetIGH(SpatialReference self) -> OGRErr"},
20920 : { "SpatialReference_SetGEOS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGEOS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGEOS(SpatialReference self, double cm, double satelliteheight, double fe, double fn) -> OGRErr"},
20921 : { "SpatialReference_SetGnomonic", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetGnomonic, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetGnomonic(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20922 : { "SpatialReference_SetHOM", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetHOM, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetHOM(SpatialReference self, double clat, double clong, double azimuth, double recttoskew, double scale, double fe, double fn) -> OGRErr"},
20923 : { "SpatialReference_SetHOM2PNO", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetHOM2PNO, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetHOM2PNO(SpatialReference self, double clat, double dfLat1, double dfLong1, double dfLat2, double dfLong2, double scale, double fe, double fn) -> OGRErr"},
20924 : { "SpatialReference_SetKrovak", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetKrovak, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetKrovak(SpatialReference self, double clat, double clong, double azimuth, double pseudostdparallellat, double scale, double fe, double fn) -> OGRErr"},
20925 : { "SpatialReference_SetLAEA", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetLAEA, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetLAEA(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20926 : { "SpatialReference_SetLCC", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetLCC, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetLCC(SpatialReference self, double stdp1, double stdp2, double clat, double clong, double fe, double fn) -> OGRErr"},
20927 : { "SpatialReference_SetLCC1SP", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetLCC1SP, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetLCC1SP(SpatialReference self, double clat, double clong, double scale, double fe, double fn) -> OGRErr"},
20928 : { "SpatialReference_SetLCCB", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetLCCB, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetLCCB(SpatialReference self, double stdp1, double stdp2, double clat, double clong, double fe, double fn) -> OGRErr"},
20929 : { "SpatialReference_SetMC", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetMC, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetMC(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20930 : { "SpatialReference_SetMercator", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetMercator, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetMercator(SpatialReference self, double clat, double clong, double scale, double fe, double fn) -> OGRErr"},
20931 : { "SpatialReference_SetMercator2SP", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetMercator2SP, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetMercator2SP(SpatialReference self, double stdp1, double clat, double clong, double fe, double fn) -> OGRErr"},
20932 : { "SpatialReference_SetMollweide", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetMollweide, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetMollweide(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
20933 : { "SpatialReference_SetNZMG", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetNZMG, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetNZMG(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20934 : { "SpatialReference_SetOS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetOS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetOS(SpatialReference self, double dfOriginLat, double dfCMeridian, double scale, double fe, double fn) -> OGRErr"},
20935 : { "SpatialReference_SetOrthographic", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetOrthographic, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetOrthographic(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20936 : { "SpatialReference_SetPolyconic", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetPolyconic, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetPolyconic(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20937 : { "SpatialReference_SetPS", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetPS, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetPS(SpatialReference self, double clat, double clong, double scale, double fe, double fn) -> OGRErr"},
20938 : { "SpatialReference_SetRobinson", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetRobinson, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetRobinson(SpatialReference self, double clong, double fe, double fn) -> OGRErr"},
20939 : { "SpatialReference_SetSinusoidal", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetSinusoidal, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetSinusoidal(SpatialReference self, double clong, double fe, double fn) -> OGRErr"},
20940 : { "SpatialReference_SetStereographic", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetStereographic, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetStereographic(SpatialReference self, double clat, double clong, double scale, double fe, double fn) -> OGRErr"},
20941 : { "SpatialReference_SetSOC", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetSOC, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetSOC(SpatialReference self, double latitudeoforigin, double cm, double fe, double fn) -> OGRErr"},
20942 : { "SpatialReference_SetTM", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetTM, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetTM(SpatialReference self, double clat, double clong, double scale, double fe, double fn) -> OGRErr"},
20943 : { "SpatialReference_SetTMVariant", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetTMVariant, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetTMVariant(SpatialReference self, char const * pszVariantName, double clat, double clong, double scale, double fe, double fn) -> OGRErr"},
20944 : { "SpatialReference_SetTMG", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetTMG, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetTMG(SpatialReference self, double clat, double clong, double fe, double fn) -> OGRErr"},
20945 : { "SpatialReference_SetTMSO", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetTMSO, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetTMSO(SpatialReference self, double clat, double clong, double scale, double fe, double fn) -> OGRErr"},
20946 : { "SpatialReference_SetVDG", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetVDG, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetVDG(SpatialReference self, double clong, double fe, double fn) -> OGRErr"},
20947 : { "SpatialReference_SetVerticalPerspective", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetVerticalPerspective, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetVerticalPerspective(SpatialReference self, double topoOriginLat, double topoOriginLon, double topoOriginHeight, double viewPointHeight, double fe, double fn) -> OGRErr"},
20948 : { "SpatialReference_SetWellKnownGeogCS", _wrap_SpatialReference_SetWellKnownGeogCS, METH_VARARGS, "SpatialReference_SetWellKnownGeogCS(SpatialReference self, char const * name) -> OGRErr"},
20949 : { "SpatialReference_SetFromUserInput", (PyCFunction)(void(*)(void))_wrap_SpatialReference_SetFromUserInput, METH_VARARGS|METH_KEYWORDS, "SpatialReference_SetFromUserInput(SpatialReference self, char const * name, char ** options=None) -> OGRErr"},
20950 : { "SpatialReference_CopyGeogCSFrom", _wrap_SpatialReference_CopyGeogCSFrom, METH_VARARGS, "SpatialReference_CopyGeogCSFrom(SpatialReference self, SpatialReference rhs) -> OGRErr"},
20951 : { "SpatialReference_SetTOWGS84", _wrap_SpatialReference_SetTOWGS84, METH_VARARGS, "SpatialReference_SetTOWGS84(SpatialReference self, double p1, double p2, double p3, double p4=0.0, double p5=0.0, double p6=0.0, double p7=0.0) -> OGRErr"},
20952 : { "SpatialReference_HasTOWGS84", _wrap_SpatialReference_HasTOWGS84, METH_O, "\n"
20953 : "SpatialReference_HasTOWGS84(SpatialReference self) -> bool\n"
20954 : "\n"
20955 : "\n"
20956 : "Return whether the SRS has a TOWGS84 parameter.\n"
20957 : "\n"
20958 : "See :cpp:func:`OGRSpatialReference::GetTOWGS84`.\n"
20959 : "\n"
20960 : "Returns\n"
20961 : "-------\n"
20962 : "bool\n"
20963 : "\n"
20964 : "\n"
20965 : ""},
20966 : { "SpatialReference_GetTOWGS84", _wrap_SpatialReference_GetTOWGS84, METH_O, "\n"
20967 : "SpatialReference_GetTOWGS84(SpatialReference self) -> OGRErr\n"
20968 : "\n"
20969 : "\n"
20970 : "Fetch TOWGS84 parameter, if available.\n"
20971 : "\n"
20972 : "See :cpp:func:`OGRSpatialReference::GetTOWGS84`.\n"
20973 : "\n"
20974 : "Returns\n"
20975 : "-------\n"
20976 : "tuple\n"
20977 : "\n"
20978 : "\n"
20979 : ""},
20980 : { "SpatialReference_AddGuessedTOWGS84", _wrap_SpatialReference_AddGuessedTOWGS84, METH_O, "SpatialReference_AddGuessedTOWGS84(SpatialReference self) -> OGRErr"},
20981 : { "SpatialReference_SetLocalCS", _wrap_SpatialReference_SetLocalCS, METH_VARARGS, "SpatialReference_SetLocalCS(SpatialReference self, char const * pszName) -> OGRErr"},
20982 : { "SpatialReference_SetGeogCS", _wrap_SpatialReference_SetGeogCS, METH_VARARGS, "SpatialReference_SetGeogCS(SpatialReference 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) -> OGRErr"},
20983 : { "SpatialReference_SetProjCS", _wrap_SpatialReference_SetProjCS, METH_VARARGS, "SpatialReference_SetProjCS(SpatialReference self, char const * name=\"unnamed\") -> OGRErr"},
20984 : { "SpatialReference_SetGeocCS", _wrap_SpatialReference_SetGeocCS, METH_VARARGS, "SpatialReference_SetGeocCS(SpatialReference self, char const * name=\"unnamed\") -> OGRErr"},
20985 : { "SpatialReference_SetVertCS", _wrap_SpatialReference_SetVertCS, METH_VARARGS, "SpatialReference_SetVertCS(SpatialReference self, char const * VertCSName=\"unnamed\", char const * VertDatumName=\"unnamed\", int VertDatumType=0) -> OGRErr"},
20986 : { "SpatialReference_SetCompoundCS", _wrap_SpatialReference_SetCompoundCS, METH_VARARGS, "SpatialReference_SetCompoundCS(SpatialReference self, char const * name, SpatialReference horizcs, SpatialReference vertcs) -> OGRErr"},
20987 : { "SpatialReference_ImportFromWkt", _wrap_SpatialReference_ImportFromWkt, METH_VARARGS, "\n"
20988 : "SpatialReference_ImportFromWkt(SpatialReference self, char ** ppszInput) -> OGRErr\n"
20989 : "\n"
20990 : "\n"
20991 : "Import from WKT string.\n"
20992 : "\n"
20993 : "See :cpp:func:`OGRSpatialReference::importFromWkt`.\n"
20994 : "\n"
20995 : "Parameters\n"
20996 : "----------\n"
20997 : "ppszInput : str\n"
20998 : " WKT string\n"
20999 : "\n"
21000 : "Returns\n"
21001 : "-------\n"
21002 : "int\n"
21003 : " :py:const:`OGRERR_NONE` if import succeeds, or :py:const:`OGRERR_CORRUPT_DATA` if it fails for any reason.\n"
21004 : "\n"
21005 : "\n"
21006 : ""},
21007 : { "SpatialReference_ImportFromProj4", _wrap_SpatialReference_ImportFromProj4, METH_VARARGS, "\n"
21008 : "SpatialReference_ImportFromProj4(SpatialReference self, char * ppszInput) -> OGRErr\n"
21009 : "\n"
21010 : "\n"
21011 : "Initialize SRS based on PROJ coordinate string.\n"
21012 : "\n"
21013 : "See :cpp:func:`OGRSpatialReference::importFromProj4`.\n"
21014 : "\n"
21015 : "Parameters\n"
21016 : "----------\n"
21017 : "ppszInput : str\n"
21018 : " PROJ coordinate string\n"
21019 : "\n"
21020 : "Returns\n"
21021 : "-------\n"
21022 : "int\n"
21023 : " :py:const:`OGRERR_NONE` on success, or :py:const:`OGRERR_CORRUPT_DATA` on failure\n"
21024 : "\n"
21025 : "Examples\n"
21026 : "--------\n"
21027 : ">>> srs = osr.SpatialReference()\n"
21028 : ">>> srs.ImportFromProj4('+proj=utm +zone=18 +datum=WGS84')\n"
21029 : "0\n"
21030 : "\n"
21031 : ""},
21032 : { "SpatialReference_ImportFromUrl", _wrap_SpatialReference_ImportFromUrl, METH_VARARGS, "\n"
21033 : "SpatialReference_ImportFromUrl(SpatialReference self, char * url) -> OGRErr\n"
21034 : "\n"
21035 : "\n"
21036 : "Initialize SRS based on a URL.\n"
21037 : "\n"
21038 : "This method will download the spatial reference at a given URL and\n"
21039 : "feed it into :py:meth:`SetFromUserInput` for you.\n"
21040 : "\n"
21041 : "See :cpp:func:`OGRSpatialReference::importFromUrl`.\n"
21042 : "\n"
21043 : "Parameters\n"
21044 : "----------\n"
21045 : "url : str\n"
21046 : "\n"
21047 : "Returns\n"
21048 : "-------\n"
21049 : "int\n"
21050 : " :py:const:`OGRERR_NONE` on success, or an error code on failure\n"
21051 : "\n"
21052 : "\n"
21053 : ""},
21054 : { "SpatialReference_ImportFromESRI", _wrap_SpatialReference_ImportFromESRI, METH_VARARGS, "SpatialReference_ImportFromESRI(SpatialReference self, char ** ppszInput) -> OGRErr"},
21055 : { "SpatialReference_ImportFromEPSG", _wrap_SpatialReference_ImportFromEPSG, METH_VARARGS, "\n"
21056 : "SpatialReference_ImportFromEPSG(SpatialReference self, int arg) -> OGRErr\n"
21057 : "\n"
21058 : "\n"
21059 : "Initialize SRS based on EPSG geographic, projected or vertical CRS code.\n"
21060 : "\n"
21061 : "Since GDAL 3.0, this method is identical to :py:meth:`ImportFromEPSGA`.\n"
21062 : "\n"
21063 : "See :cpp:func:`OGRSpatialReference::importFromEPSG`.\n"
21064 : "\n"
21065 : "Parameters\n"
21066 : "----------\n"
21067 : "arg : int\n"
21068 : " EPSG code to search in PROJ database\n"
21069 : "\n"
21070 : "Returns\n"
21071 : "-------\n"
21072 : "int\n"
21073 : " :py:const:`OGRERR_NONE` on success, or an error code on failure\n"
21074 : "\n"
21075 : "Examples\n"
21076 : "--------\n"
21077 : ">>> srs = osr.SpatialReference()\n"
21078 : ">>> srs.ImportFromEPSG(4326)\n"
21079 : "0\n"
21080 : "\n"
21081 : "\n"
21082 : ""},
21083 : { "SpatialReference_ImportFromEPSGA", _wrap_SpatialReference_ImportFromEPSGA, METH_VARARGS, "\n"
21084 : "SpatialReference_ImportFromEPSGA(SpatialReference self, int arg) -> OGRErr\n"
21085 : "\n"
21086 : "\n"
21087 : "Initialize SRS based on EPSG geographic, projected or vertical CRS code.\n"
21088 : "\n"
21089 : "Since GDAL 3.0, this method is identical to :py:meth:`ImportFromEPSG`.\n"
21090 : "\n"
21091 : "See :cpp:func:`OGRSpatialReference::importFromEPSGA`.\n"
21092 : "\n"
21093 : "Parameters\n"
21094 : "----------\n"
21095 : "arg : int\n"
21096 : " EPSG code to search in PROJ database\n"
21097 : "\n"
21098 : "Returns\n"
21099 : "-------\n"
21100 : "int\n"
21101 : " :py:const:`OGRERR_NONE` on success, or an error code on failure\n"
21102 : "\n"
21103 : "\n"
21104 : ""},
21105 : { "SpatialReference_ImportFromPCI", _wrap_SpatialReference_ImportFromPCI, METH_VARARGS, "SpatialReference_ImportFromPCI(SpatialReference self, char const * proj, char const * units=\"METRE\", double [17] argin=0) -> OGRErr"},
21106 : { "SpatialReference_ImportFromUSGS", _wrap_SpatialReference_ImportFromUSGS, METH_VARARGS, "SpatialReference_ImportFromUSGS(SpatialReference self, long proj_code, long zone=0, double [15] argin=0, long datum_code=0) -> OGRErr"},
21107 : { "SpatialReference_ImportFromXML", _wrap_SpatialReference_ImportFromXML, METH_VARARGS, "SpatialReference_ImportFromXML(SpatialReference self, char const * xmlString) -> OGRErr"},
21108 : { "SpatialReference_ImportFromERM", _wrap_SpatialReference_ImportFromERM, METH_VARARGS, "SpatialReference_ImportFromERM(SpatialReference self, char const * proj, char const * datum, char const * units) -> OGRErr"},
21109 : { "SpatialReference_ImportFromMICoordSys", _wrap_SpatialReference_ImportFromMICoordSys, METH_VARARGS, "SpatialReference_ImportFromMICoordSys(SpatialReference self, char const * pszCoordSys) -> OGRErr"},
21110 : { "SpatialReference_ImportFromOzi", _wrap_SpatialReference_ImportFromOzi, METH_VARARGS, "SpatialReference_ImportFromOzi(SpatialReference self, char const *const * papszLines) -> OGRErr"},
21111 : { "SpatialReference_ImportFromCF1", _wrap_SpatialReference_ImportFromCF1, METH_VARARGS, "SpatialReference_ImportFromCF1(SpatialReference self, char ** keyValues, char const * units=None) -> OGRErr"},
21112 : { "SpatialReference_ExportToWkt", _wrap_SpatialReference_ExportToWkt, METH_VARARGS, "\n"
21113 : "SpatialReference_ExportToWkt(SpatialReference self, char ** options=None) -> OGRErr\n"
21114 : "\n"
21115 : "\n"
21116 : "Export this SRS into WKT 1 format.\n"
21117 : "\n"
21118 : "See :cpp:func:`OGRSpatialReference::exportToWkt`.\n"
21119 : "\n"
21120 : "Returns\n"
21121 : "-------\n"
21122 : "str\n"
21123 : "\n"
21124 : "See Also\n"
21125 : "--------\n"
21126 : ":py:meth:`ExportToPrettyWkt`\n"
21127 : "\n"
21128 : "\n"
21129 : ""},
21130 : { "SpatialReference_ExportToPrettyWkt", _wrap_SpatialReference_ExportToPrettyWkt, METH_VARARGS, "\n"
21131 : "SpatialReference_ExportToPrettyWkt(SpatialReference self, int simplify=0) -> OGRErr\n"
21132 : "\n"
21133 : "\n"
21134 : "Convert this SRS into a nicely formatted WKT 1 string for display to a\n"
21135 : "person.\n"
21136 : "\n"
21137 : "See :cpp:func:`OGRSpatialReference::exportToPrettyWkt`.\n"
21138 : "\n"
21139 : "Parameters\n"
21140 : "----------\n"
21141 : "simplify : bool, default = False\n"
21142 : "\n"
21143 : "Returns\n"
21144 : "-------\n"
21145 : "str\n"
21146 : "\n"
21147 : "\n"
21148 : ""},
21149 : { "SpatialReference_ExportToPROJJSON", _wrap_SpatialReference_ExportToPROJJSON, METH_VARARGS, "\n"
21150 : "SpatialReference_ExportToPROJJSON(SpatialReference self, char ** options=None) -> OGRErr\n"
21151 : "\n"
21152 : "\n"
21153 : "Export this SRS in `PROJJSON <https://proj.org/en/latest/specifications/projjson.html>`_ format.\n"
21154 : "\n"
21155 : "See :cpp:func:`OGRSpatialReference::exportToPROJJSON`.\n"
21156 : "\n"
21157 : "Parameters\n"
21158 : "----------\n"
21159 : "options : list/dict\n"
21160 : " Options to control the format of the output. See :cpp:func:`OGRSpatialReference::ExportToPROJJSON`.\n"
21161 : "\n"
21162 : "Returns\n"
21163 : "-------\n"
21164 : "str\n"
21165 : "\n"
21166 : "\n"
21167 : ""},
21168 : { "SpatialReference_ExportToProj4", _wrap_SpatialReference_ExportToProj4, METH_O, "\n"
21169 : "SpatialReference_ExportToProj4(SpatialReference self) -> OGRErr\n"
21170 : "\n"
21171 : "\n"
21172 : "Export this SRS to PROJ.4 legacy format.\n"
21173 : "\n"
21174 : ".. warning::\n"
21175 : "\n"
21176 : " Use of this function is discouraged. See :cpp:func:`OGRSpatialReference::exportToProj4`.\n"
21177 : "\n"
21178 : "Returns\n"
21179 : "-------\n"
21180 : "str\n"
21181 : "\n"
21182 : "\n"
21183 : ""},
21184 : { "SpatialReference_ExportToPCI", _wrap_SpatialReference_ExportToPCI, METH_O, "SpatialReference_ExportToPCI(SpatialReference self) -> OGRErr"},
21185 : { "SpatialReference_ExportToUSGS", _wrap_SpatialReference_ExportToUSGS, METH_O, "SpatialReference_ExportToUSGS(SpatialReference self) -> OGRErr"},
21186 : { "SpatialReference_ExportToERM", _wrap_SpatialReference_ExportToERM, METH_O, "SpatialReference_ExportToERM(SpatialReference self) -> OGRErr"},
21187 : { "SpatialReference_ExportToXML", _wrap_SpatialReference_ExportToXML, METH_VARARGS, "SpatialReference_ExportToXML(SpatialReference self, char const * dialect=\"\") -> OGRErr"},
21188 : { "SpatialReference_ExportToMICoordSys", _wrap_SpatialReference_ExportToMICoordSys, METH_O, "SpatialReference_ExportToMICoordSys(SpatialReference self) -> OGRErr"},
21189 : { "SpatialReference_ExportToCF1", _wrap_SpatialReference_ExportToCF1, METH_VARARGS, "SpatialReference_ExportToCF1(SpatialReference self, char ** options=None) -> char **"},
21190 : { "SpatialReference_ExportToCF1Units", _wrap_SpatialReference_ExportToCF1Units, METH_VARARGS, "SpatialReference_ExportToCF1Units(SpatialReference self, char ** options=None) -> retStringAndCPLFree *"},
21191 : { "SpatialReference_CloneGeogCS", _wrap_SpatialReference_CloneGeogCS, METH_O, "SpatialReference_CloneGeogCS(SpatialReference self) -> SpatialReference"},
21192 : { "SpatialReference_Clone", _wrap_SpatialReference_Clone, METH_O, "SpatialReference_Clone(SpatialReference self) -> SpatialReference"},
21193 : { "SpatialReference_StripVertical", _wrap_SpatialReference_StripVertical, METH_O, "\n"
21194 : "SpatialReference_StripVertical(SpatialReference self) -> OGRErr\n"
21195 : "\n"
21196 : "\n"
21197 : "Convert a compound CRS into a horizontal CRS.\n"
21198 : "\n"
21199 : "See :cpp:func:`OGRSpatialReference::StripVertical`.\n"
21200 : "\n"
21201 : ".. versionadded:: 3.6\n"
21202 : "\n"
21203 : "Returns\n"
21204 : "-------\n"
21205 : "OGRErr:\n"
21206 : " :py:const:`OGRERR_NONE` if the operation succeeds\n"
21207 : "\n"
21208 : ""},
21209 : { "SpatialReference_Validate", _wrap_SpatialReference_Validate, METH_O, "SpatialReference_Validate(SpatialReference self) -> OGRErr"},
21210 : { "SpatialReference_MorphToESRI", _wrap_SpatialReference_MorphToESRI, METH_O, "SpatialReference_MorphToESRI(SpatialReference self) -> OGRErr"},
21211 : { "SpatialReference_MorphFromESRI", _wrap_SpatialReference_MorphFromESRI, METH_O, "SpatialReference_MorphFromESRI(SpatialReference self) -> OGRErr"},
21212 : { "SpatialReference_ConvertToOtherProjection", _wrap_SpatialReference_ConvertToOtherProjection, METH_VARARGS, "SpatialReference_ConvertToOtherProjection(SpatialReference self, char const * other_projection, char ** options=None) -> SpatialReference"},
21213 : { "SpatialReference_PromoteTo3D", _wrap_SpatialReference_PromoteTo3D, METH_VARARGS, "SpatialReference_PromoteTo3D(SpatialReference self, char const * name=None) -> OGRErr"},
21214 : { "SpatialReference_DemoteTo2D", _wrap_SpatialReference_DemoteTo2D, METH_VARARGS, "SpatialReference_DemoteTo2D(SpatialReference self, char const * name=None) -> OGRErr"},
21215 : { "SpatialReference_swigregister", SpatialReference_swigregister, METH_O, NULL},
21216 : { "SpatialReference_swiginit", SpatialReference_swiginit, METH_VARARGS, NULL},
21217 : { "new_CoordinateTransformationOptions", _wrap_new_CoordinateTransformationOptions, METH_NOARGS, "new_CoordinateTransformationOptions() -> CoordinateTransformationOptions"},
21218 : { "delete_CoordinateTransformationOptions", _wrap_delete_CoordinateTransformationOptions, METH_O, "delete_CoordinateTransformationOptions(CoordinateTransformationOptions self)"},
21219 : { "CoordinateTransformationOptions_SetAreaOfInterest", _wrap_CoordinateTransformationOptions_SetAreaOfInterest, METH_VARARGS, "CoordinateTransformationOptions_SetAreaOfInterest(CoordinateTransformationOptions self, double westLongitudeDeg, double southLatitudeDeg, double eastLongitudeDeg, double northLatitudeDeg) -> bool"},
21220 : { "CoordinateTransformationOptions_SetOperation", _wrap_CoordinateTransformationOptions_SetOperation, METH_VARARGS, "CoordinateTransformationOptions_SetOperation(CoordinateTransformationOptions self, char const * operation, bool inverseCT=False) -> bool"},
21221 : { "CoordinateTransformationOptions_SetDesiredAccuracy", _wrap_CoordinateTransformationOptions_SetDesiredAccuracy, METH_VARARGS, "CoordinateTransformationOptions_SetDesiredAccuracy(CoordinateTransformationOptions self, double accuracy) -> bool"},
21222 : { "CoordinateTransformationOptions_SetBallparkAllowed", _wrap_CoordinateTransformationOptions_SetBallparkAllowed, METH_VARARGS, "CoordinateTransformationOptions_SetBallparkAllowed(CoordinateTransformationOptions self, bool allowBallpark) -> bool"},
21223 : { "CoordinateTransformationOptions_SetOnlyBest", _wrap_CoordinateTransformationOptions_SetOnlyBest, METH_VARARGS, "CoordinateTransformationOptions_SetOnlyBest(CoordinateTransformationOptions self, bool onlyBest) -> bool"},
21224 : { "CoordinateTransformationOptions_swigregister", CoordinateTransformationOptions_swigregister, METH_O, NULL},
21225 : { "CoordinateTransformationOptions_swiginit", CoordinateTransformationOptions_swiginit, METH_VARARGS, NULL},
21226 : { "new_CoordinateTransformation", _wrap_new_CoordinateTransformation, METH_VARARGS, "\n"
21227 : "CoordinateTransformation(SpatialReference src, SpatialReference dst)\n"
21228 : "new_CoordinateTransformation(SpatialReference src, SpatialReference dst, CoordinateTransformationOptions options) -> CoordinateTransformation\n"
21229 : "\n"
21230 : "Python proxy of an :cpp:class:`OGRCoordinateTransformation`.\n"
21231 : "\n"
21232 : ""},
21233 : { "delete_CoordinateTransformation", _wrap_delete_CoordinateTransformation, METH_O, "delete_CoordinateTransformation(CoordinateTransformation self)"},
21234 : { "CoordinateTransformation_GetInverse", _wrap_CoordinateTransformation_GetInverse, METH_O, "CoordinateTransformation_GetInverse(CoordinateTransformation self) -> CoordinateTransformation"},
21235 : { "CoordinateTransformation__TransformPoint3Double", _wrap_CoordinateTransformation__TransformPoint3Double, METH_VARARGS, "CoordinateTransformation__TransformPoint3Double(CoordinateTransformation self, double [3] inout)"},
21236 : { "CoordinateTransformation__TransformPoint4Double", _wrap_CoordinateTransformation__TransformPoint4Double, METH_VARARGS, "CoordinateTransformation__TransformPoint4Double(CoordinateTransformation self, double [4] inout)"},
21237 : { "CoordinateTransformation_TransformPoint", _wrap_CoordinateTransformation_TransformPoint, METH_VARARGS, "\n"
21238 : "CoordinateTransformation_TransformPoint(CoordinateTransformation self, double x, double y, double z=0.0)\n"
21239 : "CoordinateTransformation_TransformPoint(CoordinateTransformation self, double x, double y, double z, double t)\n"
21240 : ""},
21241 : { "CoordinateTransformation_TransformPointWithErrorCode", _wrap_CoordinateTransformation_TransformPointWithErrorCode, METH_VARARGS, "\n"
21242 : "CoordinateTransformation_TransformPointWithErrorCode(CoordinateTransformation self, double x, double y, double z, double t)\n"
21243 : "\n"
21244 : "\n"
21245 : "Variant of :py:meth:`TransformPoint` that provides an error code.\n"
21246 : "\n"
21247 : "See :cpp:func:`OCTTransformEx`.\n"
21248 : "\n"
21249 : "Parameters\n"
21250 : "----------\n"
21251 : "x : float\n"
21252 : "y : float\n"
21253 : "z : float\n"
21254 : "t : float\n"
21255 : "\n"
21256 : "Returns\n"
21257 : "-------\n"
21258 : "tuple\n"
21259 : " tuple of (x, y, z, t, error) values\n"
21260 : "\n"
21261 : "\n"
21262 : ""},
21263 : { "CoordinateTransformation_TransformPoints", _wrap_CoordinateTransformation_TransformPoints, METH_VARARGS, "\n"
21264 : "CoordinateTransformation_TransformPoints(CoordinateTransformation self, int nCount)\n"
21265 : "\n"
21266 : "\n"
21267 : "Transform multiple points.\n"
21268 : "\n"
21269 : "See :cpp:func:`OCTTransform`.\n"
21270 : "\n"
21271 : "Parameters\n"
21272 : "----------\n"
21273 : "arg\n"
21274 : " A list of tuples, or a 2xN, 3xN, or 4xN numpy array\n"
21275 : "\n"
21276 : "Returns\n"
21277 : "-------\n"
21278 : "list\n"
21279 : " A list of tuples of (x, y, z) or (x, y, z, t) values, depending on the input.\n"
21280 : "\n"
21281 : "Examples\n"
21282 : "--------\n"
21283 : ">>> wgs84 = osr.SpatialReference()\n"
21284 : ">>> wgs84.ImportFromEPSG(4326)\n"
21285 : "0\n"
21286 : ">>> vt_sp = osr.SpatialReference()\n"
21287 : ">>> vt_sp.ImportFromEPSG(5646)\n"
21288 : "0\n"
21289 : ">>> ct = osr.CoordinateTransformation(wgs84, vt_sp)\n"
21290 : ">>> # Transform two points from WGS84 lat/long to Vermont State Plane easting/northing\n"
21291 : ">>> ct.TransformPoints([(44.26, -72.58), (44.26, -72.59)])\n"
21292 : "[(1619458.1108559777, 641509.1883246159, 0.0), (1616838.2913193079, 641511.9008312856, 0.0)]\n"
21293 : "\n"
21294 : ">>> import numpy as np\n"
21295 : ">>> ct.TransformPoints(np.array([[44.26, -72.58], [44.26, -72.59]]))\n"
21296 : "[(1619458.1108559777, 641509.1883246159, 0.0), (1616838.2913193079, 641511.9008312856, 0.0)]\n"
21297 : "\n"
21298 : "\n"
21299 : ""},
21300 : { "CoordinateTransformation_TransformBounds", _wrap_CoordinateTransformation_TransformBounds, METH_VARARGS, "\n"
21301 : "CoordinateTransformation_TransformBounds(CoordinateTransformation self, double minx, double miny, double maxx, double maxy, int densify_pts)\n"
21302 : "\n"
21303 : "\n"
21304 : "Transform a boundary, densifying the edges to account for nonlinear\n"
21305 : "transformations along these edges.\n"
21306 : "\n"
21307 : "See :cpp:func:`OCTTransformBounds`.\n"
21308 : "\n"
21309 : "Parameters\n"
21310 : "----------\n"
21311 : "minx : float\n"
21312 : " Minimum bounding coordinate of the first axis in source CRS\n"
21313 : "miny : float\n"
21314 : " Minimum bounding coordinate of the second axis in source CRS\n"
21315 : "maxx : float\n"
21316 : " Maximum bounding coordinate of the first axis in source CRS\n"
21317 : "maxy : float\n"
21318 : " Maximum bounding coordinate of the second axis in source CRS\n"
21319 : "densify_pts : int\n"
21320 : " The number of points to use to densify the bounding polygon.\n"
21321 : " Recommended to use 21.\n"
21322 : "\n"
21323 : "Returns\n"
21324 : "-------\n"
21325 : "tuple\n"
21326 : " Transformed values of xmin, ymin, xmax, ymax\n"
21327 : "\n"
21328 : "Examples\n"
21329 : "--------\n"
21330 : ">>> wgs84 = osr.SpatialReference()\n"
21331 : ">>> wgs84.ImportFromEPSG(4326)\n"
21332 : "0\n"
21333 : ">>> vt_sp = osr.SpatialReference()\n"
21334 : ">>> vt_sp.ImportFromEPSG(5646)\n"
21335 : "0\n"
21336 : ">>> ct = osr.CoordinateTransformation(wgs84, vt_sp)\n"
21337 : ">>> ct.TransformBounds(44.2,-72.5, 44.3, -72.4, 21)\n"
21338 : "(1640416.6667, 619626.4287465283, 1666641.4901271078, 656096.7597360199)\n"
21339 : "\n"
21340 : "\n"
21341 : ""},
21342 : { "CoordinateTransformation_swigregister", CoordinateTransformation_swigregister, METH_O, NULL},
21343 : { "CoordinateTransformation_swiginit", CoordinateTransformation_swiginit, METH_VARARGS, NULL},
21344 : { "CreateCoordinateTransformation", _wrap_CreateCoordinateTransformation, METH_VARARGS, "\n"
21345 : "CreateCoordinateTransformation(SpatialReference src, SpatialReference dst, CoordinateTransformationOptions options=None) -> CoordinateTransformation\n"
21346 : "\n"
21347 : "\n"
21348 : "Create a :py:class:`CoordinateTransformation` using a set of :py:class:`CoordinateTransformationOptions`.\n"
21349 : "\n"
21350 : "See :cpp:func:`OCTNewCoordinateTransformationEx`.\n"
21351 : "\n"
21352 : "Parameters\n"
21353 : "----------\n"
21354 : "src : SpatialReference\n"
21355 : " source spatial reference system\n"
21356 : "dst : SpatialReference\n"
21357 : " target spatial reference system\n"
21358 : "options : CoordinateTransformationOptions\n"
21359 : "\n"
21360 : "Returns\n"
21361 : "-------\n"
21362 : "CoordinateTransformation\n"
21363 : "\n"
21364 : "\n"
21365 : ""},
21366 : { "CRSInfo_auth_name_get", _wrap_CRSInfo_auth_name_get, METH_O, "CRSInfo_auth_name_get(CRSInfo self) -> char *"},
21367 : { "CRSInfo_code_get", _wrap_CRSInfo_code_get, METH_O, "CRSInfo_code_get(CRSInfo self) -> char *"},
21368 : { "CRSInfo_name_get", _wrap_CRSInfo_name_get, METH_O, "CRSInfo_name_get(CRSInfo self) -> char *"},
21369 : { "CRSInfo_type_get", _wrap_CRSInfo_type_get, METH_O, "CRSInfo_type_get(CRSInfo self) -> OSRCRSType"},
21370 : { "CRSInfo_deprecated_get", _wrap_CRSInfo_deprecated_get, METH_O, "CRSInfo_deprecated_get(CRSInfo self) -> bool"},
21371 : { "CRSInfo_bbox_valid_get", _wrap_CRSInfo_bbox_valid_get, METH_O, "CRSInfo_bbox_valid_get(CRSInfo self) -> bool"},
21372 : { "CRSInfo_west_lon_degree_get", _wrap_CRSInfo_west_lon_degree_get, METH_O, "CRSInfo_west_lon_degree_get(CRSInfo self) -> double"},
21373 : { "CRSInfo_south_lat_degree_get", _wrap_CRSInfo_south_lat_degree_get, METH_O, "CRSInfo_south_lat_degree_get(CRSInfo self) -> double"},
21374 : { "CRSInfo_east_lon_degree_get", _wrap_CRSInfo_east_lon_degree_get, METH_O, "CRSInfo_east_lon_degree_get(CRSInfo self) -> double"},
21375 : { "CRSInfo_north_lat_degree_get", _wrap_CRSInfo_north_lat_degree_get, METH_O, "CRSInfo_north_lat_degree_get(CRSInfo self) -> double"},
21376 : { "CRSInfo_area_name_get", _wrap_CRSInfo_area_name_get, METH_O, "CRSInfo_area_name_get(CRSInfo self) -> char *"},
21377 : { "CRSInfo_projection_method_get", _wrap_CRSInfo_projection_method_get, METH_O, "CRSInfo_projection_method_get(CRSInfo self) -> char *"},
21378 : { "CRSInfo_celestial_body_name_get", _wrap_CRSInfo_celestial_body_name_get, METH_O, "CRSInfo_celestial_body_name_get(CRSInfo self) -> char *"},
21379 : { "new_CRSInfo", _wrap_new_CRSInfo, METH_VARARGS, "new_CRSInfo(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) -> CRSInfo"},
21380 : { "delete_CRSInfo", _wrap_delete_CRSInfo, METH_O, "delete_CRSInfo(CRSInfo self)"},
21381 : { "CRSInfo_swigregister", CRSInfo_swigregister, METH_O, NULL},
21382 : { "CRSInfo_swiginit", CRSInfo_swiginit, METH_VARARGS, NULL},
21383 : { "OSRCRSInfo_auth_name_get", _wrap_OSRCRSInfo_auth_name_get, METH_O, "OSRCRSInfo_auth_name_get(CRSInfo crsInfo) -> char const *"},
21384 : { "OSRCRSInfo_code_get", _wrap_OSRCRSInfo_code_get, METH_O, "OSRCRSInfo_code_get(CRSInfo crsInfo) -> char const *"},
21385 : { "OSRCRSInfo_name_get", _wrap_OSRCRSInfo_name_get, METH_O, "OSRCRSInfo_name_get(CRSInfo crsInfo) -> char const *"},
21386 : { "OSRCRSInfo_type_get", _wrap_OSRCRSInfo_type_get, METH_O, "OSRCRSInfo_type_get(CRSInfo crsInfo) -> OSRCRSType"},
21387 : { "OSRCRSInfo_deprecated_get", _wrap_OSRCRSInfo_deprecated_get, METH_O, "OSRCRSInfo_deprecated_get(CRSInfo crsInfo) -> bool"},
21388 : { "OSRCRSInfo_bbox_valid_get", _wrap_OSRCRSInfo_bbox_valid_get, METH_O, "OSRCRSInfo_bbox_valid_get(CRSInfo crsInfo) -> bool"},
21389 : { "OSRCRSInfo_west_lon_degree_get", _wrap_OSRCRSInfo_west_lon_degree_get, METH_O, "OSRCRSInfo_west_lon_degree_get(CRSInfo crsInfo) -> double"},
21390 : { "OSRCRSInfo_south_lat_degree_get", _wrap_OSRCRSInfo_south_lat_degree_get, METH_O, "OSRCRSInfo_south_lat_degree_get(CRSInfo crsInfo) -> double"},
21391 : { "OSRCRSInfo_east_lon_degree_get", _wrap_OSRCRSInfo_east_lon_degree_get, METH_O, "OSRCRSInfo_east_lon_degree_get(CRSInfo crsInfo) -> double"},
21392 : { "OSRCRSInfo_north_lat_degree_get", _wrap_OSRCRSInfo_north_lat_degree_get, METH_O, "OSRCRSInfo_north_lat_degree_get(CRSInfo crsInfo) -> double"},
21393 : { "OSRCRSInfo_area_name_get", _wrap_OSRCRSInfo_area_name_get, METH_O, "OSRCRSInfo_area_name_get(CRSInfo crsInfo) -> char const *"},
21394 : { "OSRCRSInfo_projection_method_get", _wrap_OSRCRSInfo_projection_method_get, METH_O, "OSRCRSInfo_projection_method_get(CRSInfo crsInfo) -> char const *"},
21395 : { "OSRCRSInfo_celestial_body_name_get", _wrap_OSRCRSInfo_celestial_body_name_get, METH_O, "OSRCRSInfo_celestial_body_name_get(CRSInfo crsInfo) -> char const *"},
21396 : { "GetAuthorityListFromDatabase", _wrap_GetAuthorityListFromDatabase, METH_NOARGS, "GetAuthorityListFromDatabase() -> char **"},
21397 : { "GetCRSInfoListFromDatabase", _wrap_GetCRSInfoListFromDatabase, METH_O, "GetCRSInfoListFromDatabase(char const * authName)"},
21398 : { "SetPROJSearchPath", _wrap_SetPROJSearchPath, METH_O, "SetPROJSearchPath(char const * utf8_path)"},
21399 : { "SetPROJSearchPaths", _wrap_SetPROJSearchPaths, METH_O, "SetPROJSearchPaths(char ** paths)"},
21400 : { "GetPROJSearchPaths", _wrap_GetPROJSearchPaths, METH_NOARGS, "GetPROJSearchPaths() -> char **"},
21401 : { "GetPROJVersionMajor", _wrap_GetPROJVersionMajor, METH_NOARGS, "GetPROJVersionMajor() -> int"},
21402 : { "GetPROJVersionMinor", _wrap_GetPROJVersionMinor, METH_NOARGS, "GetPROJVersionMinor() -> int"},
21403 : { "GetPROJVersionMicro", _wrap_GetPROJVersionMicro, METH_NOARGS, "GetPROJVersionMicro() -> int"},
21404 : { "GetPROJEnableNetwork", _wrap_GetPROJEnableNetwork, METH_NOARGS, "GetPROJEnableNetwork() -> bool"},
21405 : { "SetPROJEnableNetwork", _wrap_SetPROJEnableNetwork, METH_O, "SetPROJEnableNetwork(bool enabled)"},
21406 : { "SetPROJAuxDbPath", _wrap_SetPROJAuxDbPath, METH_O, "SetPROJAuxDbPath(char const * utf8_path)"},
21407 : { "SetPROJAuxDbPaths", _wrap_SetPROJAuxDbPaths, METH_O, "SetPROJAuxDbPaths(char ** paths)"},
21408 : { "GetPROJAuxDbPaths", _wrap_GetPROJAuxDbPaths, METH_NOARGS, "GetPROJAuxDbPaths() -> char **"},
21409 : { NULL, NULL, 0, NULL }
21410 : };
21411 :
21412 : static PyMethodDef SwigMethods_proxydocs[] = {
21413 : { NULL, NULL, 0, NULL }
21414 : };
21415 :
21416 :
21417 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
21418 :
21419 : static swig_type_info _swigt__p_OGRCoordinateTransformationOptions = {"_p_OGRCoordinateTransformationOptions", "OGRCoordinateTransformationOptions *", 0, 0, (void*)0, 0};
21420 : static swig_type_info _swigt__p_OSRAreaOfUse = {"_p_OSRAreaOfUse", "OSRAreaOfUse *", 0, 0, (void*)0, 0};
21421 : static swig_type_info _swigt__p_OSRCRSInfo = {"_p_OSRCRSInfo", "OSRCRSInfo *", 0, 0, (void*)0, 0};
21422 : static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0};
21423 : static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
21424 : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
21425 : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
21426 : static swig_type_info _swigt__p_int = {"_p_int", "OSRAxisMappingStrategy *|int *|OGRAxisOrientation *|OGRErr *", 0, 0, (void*)0, 0};
21427 : static swig_type_info _swigt__p_long = {"_p_long", "long *", 0, 0, (void*)0, 0};
21428 : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
21429 : static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
21430 : static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
21431 : static swig_type_info _swigt__p_p_p_OSRCRSInfo = {"_p_p_p_OSRCRSInfo", "OSRCRSInfo ***", 0, 0, (void*)0, 0};
21432 : static swig_type_info _swigt__p_p_p_OSRSpatialReferenceShadow = {"_p_p_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow ***", 0, 0, (void*)0, 0};
21433 :
21434 : static swig_type_info *swig_type_initial[] = {
21435 : &_swigt__p_OGRCoordinateTransformationOptions,
21436 : &_swigt__p_OSRAreaOfUse,
21437 : &_swigt__p_OSRCRSInfo,
21438 : &_swigt__p_OSRCoordinateTransformationShadow,
21439 : &_swigt__p_OSRSpatialReferenceShadow,
21440 : &_swigt__p_char,
21441 : &_swigt__p_double,
21442 : &_swigt__p_int,
21443 : &_swigt__p_long,
21444 : &_swigt__p_p_char,
21445 : &_swigt__p_p_double,
21446 : &_swigt__p_p_int,
21447 : &_swigt__p_p_p_OSRCRSInfo,
21448 : &_swigt__p_p_p_OSRSpatialReferenceShadow,
21449 : };
21450 :
21451 : static swig_cast_info _swigc__p_OGRCoordinateTransformationOptions[] = { {&_swigt__p_OGRCoordinateTransformationOptions, 0, 0, 0},{0, 0, 0, 0}};
21452 : static swig_cast_info _swigc__p_OSRAreaOfUse[] = { {&_swigt__p_OSRAreaOfUse, 0, 0, 0},{0, 0, 0, 0}};
21453 : static swig_cast_info _swigc__p_OSRCRSInfo[] = { {&_swigt__p_OSRCRSInfo, 0, 0, 0},{0, 0, 0, 0}};
21454 : static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = { {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
21455 : static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = { {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
21456 : static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
21457 : static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
21458 : static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
21459 : static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
21460 : static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
21461 : static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
21462 : static swig_cast_info _swigc__p_p_int[] = { {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
21463 : static swig_cast_info _swigc__p_p_p_OSRCRSInfo[] = { {&_swigt__p_p_p_OSRCRSInfo, 0, 0, 0},{0, 0, 0, 0}};
21464 : static swig_cast_info _swigc__p_p_p_OSRSpatialReferenceShadow[] = { {&_swigt__p_p_p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
21465 :
21466 : static swig_cast_info *swig_cast_initial[] = {
21467 : _swigc__p_OGRCoordinateTransformationOptions,
21468 : _swigc__p_OSRAreaOfUse,
21469 : _swigc__p_OSRCRSInfo,
21470 : _swigc__p_OSRCoordinateTransformationShadow,
21471 : _swigc__p_OSRSpatialReferenceShadow,
21472 : _swigc__p_char,
21473 : _swigc__p_double,
21474 : _swigc__p_int,
21475 : _swigc__p_long,
21476 : _swigc__p_p_char,
21477 : _swigc__p_p_double,
21478 : _swigc__p_p_int,
21479 : _swigc__p_p_p_OSRCRSInfo,
21480 : _swigc__p_p_p_OSRSpatialReferenceShadow,
21481 : };
21482 :
21483 :
21484 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
21485 :
21486 : static swig_const_info swig_const_table[] = {
21487 : {0, 0, 0, 0.0, 0, 0}};
21488 :
21489 : #ifdef __cplusplus
21490 : }
21491 : #endif
21492 : /* -----------------------------------------------------------------------------
21493 : * Type initialization:
21494 : * This problem is tough by the requirement that no dynamic
21495 : * memory is used. Also, since swig_type_info structures store pointers to
21496 : * swig_cast_info structures and swig_cast_info structures store pointers back
21497 : * to swig_type_info structures, we need some lookup code at initialization.
21498 : * The idea is that swig generates all the structures that are needed.
21499 : * The runtime then collects these partially filled structures.
21500 : * The SWIG_InitializeModule function takes these initial arrays out of
21501 : * swig_module, and does all the lookup, filling in the swig_module.types
21502 : * array with the correct data and linking the correct swig_cast_info
21503 : * structures together.
21504 : *
21505 : * The generated swig_type_info structures are assigned statically to an initial
21506 : * array. We just loop through that array, and handle each type individually.
21507 : * First we lookup if this type has been already loaded, and if so, use the
21508 : * loaded structure instead of the generated one. Then we have to fill in the
21509 : * cast linked list. The cast data is initially stored in something like a
21510 : * two-dimensional array. Each row corresponds to a type (there are the same
21511 : * number of rows as there are in the swig_type_initial array). Each entry in
21512 : * a column is one of the swig_cast_info structures for that type.
21513 : * The cast_initial array is actually an array of arrays, because each row has
21514 : * a variable number of columns. So to actually build the cast linked list,
21515 : * we find the array of casts associated with the type, and loop through it
21516 : * adding the casts to the list. The one last trick we need to do is making
21517 : * sure the type pointer in the swig_cast_info struct is correct.
21518 : *
21519 : * First off, we lookup the cast->type name to see if it is already loaded.
21520 : * There are three cases to handle:
21521 : * 1) If the cast->type has already been loaded AND the type we are adding
21522 : * casting info to has not been loaded (it is in this module), THEN we
21523 : * replace the cast->type pointer with the type pointer that has already
21524 : * been loaded.
21525 : * 2) If BOTH types (the one we are adding casting info to, and the
21526 : * cast->type) are loaded, THEN the cast info has already been loaded by
21527 : * the previous module so we just ignore it.
21528 : * 3) Finally, if cast->type has not already been loaded, then we add that
21529 : * swig_cast_info to the linked list (because the cast->type) pointer will
21530 : * be correct.
21531 : * ----------------------------------------------------------------------------- */
21532 :
21533 : #ifdef __cplusplus
21534 : extern "C" {
21535 : #if 0
21536 : } /* c-mode */
21537 : #endif
21538 : #endif
21539 :
21540 : #if 0
21541 : #define SWIGRUNTIME_DEBUG
21542 : #endif
21543 :
21544 :
21545 : SWIGRUNTIME void
21546 : SWIG_InitializeModule(void *clientdata) {
21547 : size_t i;
21548 : swig_module_info *module_head, *iter;
21549 : int init;
21550 :
21551 : /* check to see if the circular list has been setup, if not, set it up */
21552 : if (swig_module.next==0) {
21553 : /* Initialize the swig_module */
21554 : swig_module.type_initial = swig_type_initial;
21555 : swig_module.cast_initial = swig_cast_initial;
21556 : swig_module.next = &swig_module;
21557 : init = 1;
21558 : } else {
21559 : init = 0;
21560 : }
21561 :
21562 : /* Try and load any already created modules */
21563 : module_head = SWIG_GetModule(clientdata);
21564 : if (!module_head) {
21565 : /* This is the first module loaded for this interpreter */
21566 : /* so set the swig module into the interpreter */
21567 : SWIG_SetModule(clientdata, &swig_module);
21568 : } else {
21569 : /* the interpreter has loaded a SWIG module, but has it loaded this one? */
21570 : iter=module_head;
21571 : do {
21572 : if (iter==&swig_module) {
21573 : /* Our module is already in the list, so there's nothing more to do. */
21574 : return;
21575 : }
21576 : iter=iter->next;
21577 : } while (iter!= module_head);
21578 :
21579 : /* otherwise we must add our module into the list */
21580 : swig_module.next = module_head->next;
21581 : module_head->next = &swig_module;
21582 : }
21583 :
21584 : /* When multiple interpreters are used, a module could have already been initialized in
21585 : a different interpreter, but not yet have a pointer in this interpreter.
21586 : In this case, we do not want to continue adding types... everything should be
21587 : set up already */
21588 : if (init == 0) return;
21589 :
21590 : /* Now work on filling in swig_module.types */
21591 : #ifdef SWIGRUNTIME_DEBUG
21592 : printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
21593 : #endif
21594 : for (i = 0; i < swig_module.size; ++i) {
21595 : swig_type_info *type = 0;
21596 : swig_type_info *ret;
21597 : swig_cast_info *cast;
21598 :
21599 : #ifdef SWIGRUNTIME_DEBUG
21600 : printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
21601 : #endif
21602 :
21603 : /* if there is another module already loaded */
21604 : if (swig_module.next != &swig_module) {
21605 : type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
21606 : }
21607 : if (type) {
21608 : /* Overwrite clientdata field */
21609 : #ifdef SWIGRUNTIME_DEBUG
21610 : printf("SWIG_InitializeModule: found type %s\n", type->name);
21611 : #endif
21612 : if (swig_module.type_initial[i]->clientdata) {
21613 : type->clientdata = swig_module.type_initial[i]->clientdata;
21614 : #ifdef SWIGRUNTIME_DEBUG
21615 : printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
21616 : #endif
21617 : }
21618 : } else {
21619 : type = swig_module.type_initial[i];
21620 : }
21621 :
21622 : /* Insert casting types */
21623 : cast = swig_module.cast_initial[i];
21624 : while (cast->type) {
21625 : /* Don't need to add information already in the list */
21626 : ret = 0;
21627 : #ifdef SWIGRUNTIME_DEBUG
21628 : printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
21629 : #endif
21630 : if (swig_module.next != &swig_module) {
21631 : ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
21632 : #ifdef SWIGRUNTIME_DEBUG
21633 : if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
21634 : #endif
21635 : }
21636 : if (ret) {
21637 : if (type == swig_module.type_initial[i]) {
21638 : #ifdef SWIGRUNTIME_DEBUG
21639 : printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
21640 : #endif
21641 : cast->type = ret;
21642 : ret = 0;
21643 : } else {
21644 : /* Check for casting already in the list */
21645 : swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
21646 : #ifdef SWIGRUNTIME_DEBUG
21647 : if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
21648 : #endif
21649 : if (!ocast) ret = 0;
21650 : }
21651 : }
21652 :
21653 : if (!ret) {
21654 : #ifdef SWIGRUNTIME_DEBUG
21655 : printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
21656 : #endif
21657 : if (type->cast) {
21658 : type->cast->prev = cast;
21659 : cast->next = type->cast;
21660 : }
21661 : type->cast = cast;
21662 : }
21663 : cast++;
21664 : }
21665 : /* Set entry in modules->types array equal to the type */
21666 : swig_module.types[i] = type;
21667 : }
21668 : swig_module.types[i] = 0;
21669 :
21670 : #ifdef SWIGRUNTIME_DEBUG
21671 : printf("**** SWIG_InitializeModule: Cast List ******\n");
21672 : for (i = 0; i < swig_module.size; ++i) {
21673 : int j = 0;
21674 : swig_cast_info *cast = swig_module.cast_initial[i];
21675 : printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
21676 : while (cast->type) {
21677 : printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
21678 : cast++;
21679 : ++j;
21680 : }
21681 : printf("---- Total casts: %d\n",j);
21682 : }
21683 : printf("**** SWIG_InitializeModule: Cast List ******\n");
21684 : #endif
21685 : }
21686 :
21687 : /* This function will propagate the clientdata field of type to
21688 : * any new swig_type_info structures that have been added into the list
21689 : * of equivalent types. It is like calling
21690 : * SWIG_TypeClientData(type, clientdata) a second time.
21691 : */
21692 : SWIGRUNTIME void
21693 : SWIG_PropagateClientData(void) {
21694 : size_t i;
21695 : swig_cast_info *equiv;
21696 : static int init_run = 0;
21697 :
21698 : if (init_run) return;
21699 : init_run = 1;
21700 :
21701 : for (i = 0; i < swig_module.size; i++) {
21702 : if (swig_module.types[i]->clientdata) {
21703 : equiv = swig_module.types[i]->cast;
21704 : while (equiv) {
21705 : if (!equiv->converter) {
21706 : if (equiv->type && !equiv->type->clientdata)
21707 : SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
21708 : }
21709 : equiv = equiv->next;
21710 : }
21711 : }
21712 : }
21713 : }
21714 :
21715 : #ifdef __cplusplus
21716 : #if 0
21717 : {
21718 : /* c-mode */
21719 : #endif
21720 : }
21721 : #endif
21722 :
21723 :
21724 :
21725 : #ifdef __cplusplus
21726 : extern "C" {
21727 : #endif
21728 :
21729 : /* Python-specific SWIG API */
21730 : #define SWIG_newvarlink() SWIG_Python_newvarlink()
21731 : #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
21732 : #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
21733 :
21734 : /* -----------------------------------------------------------------------------
21735 : * global variable support code.
21736 : * ----------------------------------------------------------------------------- */
21737 :
21738 : typedef struct swig_globalvar {
21739 : char *name; /* Name of global variable */
21740 : PyObject *(*get_attr)(void); /* Return the current value */
21741 : int (*set_attr)(PyObject *); /* Set the value */
21742 : struct swig_globalvar *next;
21743 : } swig_globalvar;
21744 :
21745 : typedef struct swig_varlinkobject {
21746 : PyObject_HEAD
21747 : swig_globalvar *vars;
21748 : } swig_varlinkobject;
21749 :
21750 : SWIGINTERN PyObject *
21751 : swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
21752 : #if PY_VERSION_HEX >= 0x03000000
21753 : return PyUnicode_InternFromString("<Swig global variables>");
21754 : #else
21755 : return PyString_FromString("<Swig global variables>");
21756 : #endif
21757 : }
21758 :
21759 : SWIGINTERN PyObject *
21760 : swig_varlink_str(swig_varlinkobject *v) {
21761 : #if PY_VERSION_HEX >= 0x03000000
21762 : PyObject *str = PyUnicode_InternFromString("(");
21763 : PyObject *tail;
21764 : PyObject *joined;
21765 : swig_globalvar *var;
21766 : for (var = v->vars; var; var=var->next) {
21767 : tail = PyUnicode_FromString(var->name);
21768 : joined = PyUnicode_Concat(str, tail);
21769 : Py_DecRef(str);
21770 : Py_DecRef(tail);
21771 : str = joined;
21772 : if (var->next) {
21773 : tail = PyUnicode_InternFromString(", ");
21774 : joined = PyUnicode_Concat(str, tail);
21775 : Py_DecRef(str);
21776 : Py_DecRef(tail);
21777 : str = joined;
21778 : }
21779 : }
21780 : tail = PyUnicode_InternFromString(")");
21781 : joined = PyUnicode_Concat(str, tail);
21782 : Py_DecRef(str);
21783 : Py_DecRef(tail);
21784 : str = joined;
21785 : #else
21786 : PyObject *str = PyString_FromString("(");
21787 : swig_globalvar *var;
21788 : for (var = v->vars; var; var=var->next) {
21789 : PyString_ConcatAndDel(&str,PyString_FromString(var->name));
21790 : if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
21791 : }
21792 : PyString_ConcatAndDel(&str,PyString_FromString(")"));
21793 : #endif
21794 : return str;
21795 : }
21796 :
21797 : SWIGINTERN void
21798 : swig_varlink_dealloc(swig_varlinkobject *v) {
21799 : swig_globalvar *var = v->vars;
21800 : while (var) {
21801 : swig_globalvar *n = var->next;
21802 : free(var->name);
21803 : free(var);
21804 : var = n;
21805 : }
21806 : }
21807 :
21808 : SWIGINTERN PyObject *
21809 : swig_varlink_getattr(swig_varlinkobject *v, char *n) {
21810 : PyObject *res = NULL;
21811 : swig_globalvar *var = v->vars;
21812 : while (var) {
21813 : if (strcmp(var->name,n) == 0) {
21814 : res = (*var->get_attr)();
21815 : break;
21816 : }
21817 : var = var->next;
21818 : }
21819 : if (res == NULL && !PyErr_Occurred()) {
21820 : PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
21821 : }
21822 : return res;
21823 : }
21824 :
21825 : SWIGINTERN int
21826 : swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
21827 : int res = 1;
21828 : swig_globalvar *var = v->vars;
21829 : while (var) {
21830 : if (strcmp(var->name,n) == 0) {
21831 : res = (*var->set_attr)(p);
21832 : break;
21833 : }
21834 : var = var->next;
21835 : }
21836 : if (res == 1 && !PyErr_Occurred()) {
21837 : PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
21838 : }
21839 : return res;
21840 : }
21841 :
21842 : SWIGINTERN PyTypeObject*
21843 : swig_varlink_type(void) {
21844 : static char varlink__doc__[] = "Swig var link object";
21845 : static PyTypeObject varlink_type;
21846 : static int type_init = 0;
21847 : if (!type_init) {
21848 : const PyTypeObject tmp = {
21849 : #if PY_VERSION_HEX >= 0x03000000
21850 : PyVarObject_HEAD_INIT(NULL, 0)
21851 : #else
21852 : PyObject_HEAD_INIT(NULL)
21853 : 0, /* ob_size */
21854 : #endif
21855 : "swigvarlink", /* tp_name */
21856 : sizeof(swig_varlinkobject), /* tp_basicsize */
21857 : 0, /* tp_itemsize */
21858 : (destructor) swig_varlink_dealloc, /* tp_dealloc */
21859 : 0, /* tp_print */
21860 : (getattrfunc) swig_varlink_getattr, /* tp_getattr */
21861 : (setattrfunc) swig_varlink_setattr, /* tp_setattr */
21862 : 0, /* tp_compare */
21863 : (reprfunc) swig_varlink_repr, /* tp_repr */
21864 : 0, /* tp_as_number */
21865 : 0, /* tp_as_sequence */
21866 : 0, /* tp_as_mapping */
21867 : 0, /* tp_hash */
21868 : 0, /* tp_call */
21869 : (reprfunc) swig_varlink_str, /* tp_str */
21870 : 0, /* tp_getattro */
21871 : 0, /* tp_setattro */
21872 : 0, /* tp_as_buffer */
21873 : 0, /* tp_flags */
21874 : varlink__doc__, /* tp_doc */
21875 : 0, /* tp_traverse */
21876 : 0, /* tp_clear */
21877 : 0, /* tp_richcompare */
21878 : 0, /* tp_weaklistoffset */
21879 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
21880 : 0, /* tp_del */
21881 : 0, /* tp_version_tag */
21882 : #if PY_VERSION_HEX >= 0x03040000
21883 : 0, /* tp_finalize */
21884 : #endif
21885 : #ifdef COUNT_ALLOCS
21886 : 0, /* tp_allocs */
21887 : 0, /* tp_frees */
21888 : 0, /* tp_maxalloc */
21889 : 0, /* tp_prev */
21890 : 0 /* tp_next */
21891 : #endif
21892 : };
21893 : varlink_type = tmp;
21894 : type_init = 1;
21895 : if (PyType_Ready(&varlink_type) < 0)
21896 : return NULL;
21897 : }
21898 : return &varlink_type;
21899 : }
21900 :
21901 : /* Create a variable linking object for use later */
21902 : SWIGINTERN PyObject *
21903 : SWIG_Python_newvarlink(void) {
21904 : swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
21905 : if (result) {
21906 : result->vars = 0;
21907 : }
21908 : return ((PyObject*) result);
21909 : }
21910 :
21911 : SWIGINTERN void
21912 : SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
21913 : swig_varlinkobject *v = (swig_varlinkobject *) p;
21914 : swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
21915 : if (gv) {
21916 : size_t size = strlen(name)+1;
21917 : gv->name = (char *)malloc(size);
21918 : if (gv->name) {
21919 : memcpy(gv->name, name, size);
21920 : gv->get_attr = get_attr;
21921 : gv->set_attr = set_attr;
21922 : gv->next = v->vars;
21923 : }
21924 : }
21925 : v->vars = gv;
21926 : }
21927 :
21928 : SWIGINTERN PyObject *
21929 : SWIG_globals(void) {
21930 : static PyObject *globals = 0;
21931 : if (!globals) {
21932 : globals = SWIG_newvarlink();
21933 : }
21934 : return globals;
21935 : }
21936 :
21937 : /* -----------------------------------------------------------------------------
21938 : * constants/methods manipulation
21939 : * ----------------------------------------------------------------------------- */
21940 :
21941 : /* Install Constants */
21942 : SWIGINTERN void
21943 276 : SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
21944 276 : PyObject *obj = 0;
21945 276 : size_t i;
21946 276 : for (i = 0; constants[i].type; ++i) {
21947 0 : switch(constants[i].type) {
21948 0 : case SWIG_PY_POINTER:
21949 0 : obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
21950 0 : break;
21951 0 : case SWIG_PY_BINARY:
21952 0 : obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
21953 : break;
21954 : default:
21955 : obj = 0;
21956 : break;
21957 : }
21958 0 : if (obj) {
21959 0 : PyDict_SetItemString(d, constants[i].name, obj);
21960 0 : Py_DECREF(obj);
21961 : }
21962 : }
21963 276 : }
21964 :
21965 : /* -----------------------------------------------------------------------------*/
21966 : /* Fix SwigMethods to carry the callback ptrs when needed */
21967 : /* -----------------------------------------------------------------------------*/
21968 :
21969 : SWIGINTERN void
21970 276 : SWIG_Python_FixMethods(PyMethodDef *methods,
21971 : swig_const_info *const_table,
21972 : swig_type_info **types,
21973 : swig_type_info **types_initial) {
21974 276 : size_t i;
21975 64860 : for (i = 0; methods[i].ml_name; ++i) {
21976 64584 : const char *c = methods[i].ml_doc;
21977 64584 : if (!c) continue;
21978 61548 : c = strstr(c, "swig_ptr: ");
21979 61548 : if (c) {
21980 0 : int j;
21981 0 : swig_const_info *ci = 0;
21982 0 : const char *name = c + 10;
21983 0 : for (j = 0; const_table[j].type; ++j) {
21984 0 : if (strncmp(const_table[j].name, name,
21985 : strlen(const_table[j].name)) == 0) {
21986 : ci = &(const_table[j]);
21987 : break;
21988 : }
21989 : }
21990 0 : if (ci) {
21991 64584 : void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
21992 0 : if (ptr) {
21993 0 : size_t shift = (ci->ptype) - types;
21994 0 : swig_type_info *ty = types_initial[shift];
21995 0 : size_t ldoc = (c - methods[i].ml_doc);
21996 0 : size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
21997 0 : char *ndoc = (char*)malloc(ldoc + lptr + 10);
21998 0 : if (ndoc) {
21999 0 : char *buff = ndoc;
22000 0 : memcpy(buff, methods[i].ml_doc, ldoc);
22001 0 : buff += ldoc;
22002 0 : memcpy(buff, "swig_ptr: ", 10);
22003 0 : buff += 10;
22004 0 : SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
22005 0 : methods[i].ml_doc = ndoc;
22006 : }
22007 : }
22008 : }
22009 : }
22010 : }
22011 276 : }
22012 :
22013 : /* -----------------------------------------------------------------------------
22014 : * Method creation and docstring support functions
22015 : * ----------------------------------------------------------------------------- */
22016 :
22017 : /* -----------------------------------------------------------------------------
22018 : * Function to find the method definition with the correct docstring for the
22019 : * proxy module as opposed to the low-level API
22020 : * ----------------------------------------------------------------------------- */
22021 :
22022 0 : SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
22023 : /* Find the function in the modified method table */
22024 0 : size_t offset = 0;
22025 0 : int found = 0;
22026 0 : while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
22027 0 : if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
22028 : found = 1;
22029 : break;
22030 : }
22031 0 : offset++;
22032 : }
22033 : /* Use the copy with the modified docstring if available */
22034 0 : return found ? &SwigMethods_proxydocs[offset] : NULL;
22035 : }
22036 :
22037 : /* -----------------------------------------------------------------------------
22038 : * Wrapper of PyInstanceMethod_New() used in Python 3
22039 : * It is exported to the generated module, used for -fastproxy
22040 : * ----------------------------------------------------------------------------- */
22041 :
22042 0 : SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
22043 0 : if (PyCFunction_Check(func)) {
22044 0 : PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
22045 0 : PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
22046 0 : if (ml)
22047 0 : func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
22048 : }
22049 : #if PY_VERSION_HEX >= 0x03000000
22050 0 : return PyInstanceMethod_New(func);
22051 : #else
22052 : return PyMethod_New(func, NULL, NULL);
22053 : #endif
22054 : }
22055 :
22056 : /* -----------------------------------------------------------------------------
22057 : * Wrapper of PyStaticMethod_New()
22058 : * It is exported to the generated module, used for -fastproxy
22059 : * ----------------------------------------------------------------------------- */
22060 :
22061 : SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
22062 : if (PyCFunction_Check(func)) {
22063 : PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
22064 : PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
22065 : if (ml)
22066 : func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
22067 : }
22068 : return PyStaticMethod_New(func);
22069 : }
22070 :
22071 : #ifdef __cplusplus
22072 : }
22073 : #endif
22074 :
22075 : /* -----------------------------------------------------------------------------*
22076 : * Partial Init method
22077 : * -----------------------------------------------------------------------------*/
22078 :
22079 : #ifdef __cplusplus
22080 : extern "C"
22081 : #endif
22082 :
22083 : SWIGEXPORT
22084 : #if PY_VERSION_HEX >= 0x03000000
22085 : PyObject*
22086 : #else
22087 : void
22088 : #endif
22089 276 : SWIG_init(void) {
22090 276 : PyObject *m, *d, *md, *globals;
22091 :
22092 : #if PY_VERSION_HEX >= 0x03000000
22093 276 : static struct PyModuleDef SWIG_module = {
22094 : PyModuleDef_HEAD_INIT,
22095 : SWIG_name,
22096 : NULL,
22097 : -1,
22098 : SwigMethods,
22099 : NULL,
22100 : NULL,
22101 : NULL,
22102 : NULL
22103 : };
22104 : #endif
22105 :
22106 : #if defined(SWIGPYTHON_BUILTIN)
22107 : static SwigPyClientData SwigPyObject_clientdata = {
22108 : 0, 0, 0, 0, 0, 0, 0
22109 : };
22110 : static PyGetSetDef this_getset_def = {
22111 : (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
22112 : };
22113 : static SwigPyGetSet thisown_getset_closure = {
22114 : SwigPyObject_own,
22115 : SwigPyObject_own
22116 : };
22117 : static PyGetSetDef thisown_getset_def = {
22118 : (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
22119 : };
22120 : PyTypeObject *builtin_pytype;
22121 : int builtin_base_count;
22122 : swig_type_info *builtin_basetype;
22123 : PyObject *tuple;
22124 : PyGetSetDescrObject *static_getset;
22125 : PyTypeObject *metatype;
22126 : PyTypeObject *swigpyobject;
22127 : SwigPyClientData *cd;
22128 : PyObject *public_interface, *public_symbol;
22129 : PyObject *this_descr;
22130 : PyObject *thisown_descr;
22131 : PyObject *self = 0;
22132 : int i;
22133 :
22134 : (void)builtin_pytype;
22135 : (void)builtin_base_count;
22136 : (void)builtin_basetype;
22137 : (void)tuple;
22138 : (void)static_getset;
22139 : (void)self;
22140 :
22141 : /* Metaclass is used to implement static member variables */
22142 : metatype = SwigPyObjectType();
22143 : assert(metatype);
22144 : #endif
22145 :
22146 276 : (void)globals;
22147 :
22148 : /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
22149 276 : SWIG_This();
22150 276 : SWIG_Python_TypeCache();
22151 276 : SwigPyPacked_type();
22152 : #ifndef SWIGPYTHON_BUILTIN
22153 276 : SwigPyObject_type();
22154 : #endif
22155 :
22156 : /* Fix SwigMethods to carry the callback ptrs when needed */
22157 276 : SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
22158 :
22159 : #if PY_VERSION_HEX >= 0x03000000
22160 276 : m = PyModule_Create(&SWIG_module);
22161 : #else
22162 : m = Py_InitModule(SWIG_name, SwigMethods);
22163 : #endif
22164 :
22165 276 : md = d = PyModule_GetDict(m);
22166 276 : (void)md;
22167 :
22168 276 : SWIG_InitializeModule(0);
22169 :
22170 : #ifdef SWIGPYTHON_BUILTIN
22171 : swigpyobject = SwigPyObject_TypeOnce();
22172 :
22173 : SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
22174 : assert(SwigPyObject_stype);
22175 : cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
22176 : if (!cd) {
22177 : SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
22178 : SwigPyObject_clientdata.pytype = swigpyobject;
22179 : } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
22180 : PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
22181 : # if PY_VERSION_HEX >= 0x03000000
22182 : return NULL;
22183 : # else
22184 : return;
22185 : # endif
22186 : }
22187 :
22188 : /* All objects have a 'this' attribute */
22189 : this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
22190 : (void)this_descr;
22191 :
22192 : /* All objects have a 'thisown' attribute */
22193 : thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
22194 : (void)thisown_descr;
22195 :
22196 : public_interface = PyList_New(0);
22197 : public_symbol = 0;
22198 : (void)public_symbol;
22199 :
22200 : PyDict_SetItemString(md, "__all__", public_interface);
22201 : Py_DECREF(public_interface);
22202 : for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
22203 : SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
22204 : for (i = 0; swig_const_table[i].name != 0; ++i)
22205 : SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
22206 : #endif
22207 :
22208 276 : SWIG_InstallConstants(d,swig_const_table);
22209 :
22210 276 : 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\"]]"));
22211 276 : SWIG_Python_SetConstant(d, "SRS_PT_ALBERS_CONIC_EQUAL_AREA",SWIG_FromCharPtr("Albers_Conic_Equal_Area"));
22212 276 : SWIG_Python_SetConstant(d, "SRS_PT_AZIMUTHAL_EQUIDISTANT",SWIG_FromCharPtr("Azimuthal_Equidistant"));
22213 276 : SWIG_Python_SetConstant(d, "SRS_PT_CASSINI_SOLDNER",SWIG_FromCharPtr("Cassini_Soldner"));
22214 276 : SWIG_Python_SetConstant(d, "SRS_PT_CYLINDRICAL_EQUAL_AREA",SWIG_FromCharPtr("Cylindrical_Equal_Area"));
22215 276 : SWIG_Python_SetConstant(d, "SRS_PT_BONNE",SWIG_FromCharPtr("Bonne"));
22216 276 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_I",SWIG_FromCharPtr("Eckert_I"));
22217 276 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_II",SWIG_FromCharPtr("Eckert_II"));
22218 276 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_III",SWIG_FromCharPtr("Eckert_III"));
22219 276 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_IV",SWIG_FromCharPtr("Eckert_IV"));
22220 276 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_V",SWIG_FromCharPtr("Eckert_V"));
22221 276 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_VI",SWIG_FromCharPtr("Eckert_VI"));
22222 276 : SWIG_Python_SetConstant(d, "SRS_PT_EQUIDISTANT_CONIC",SWIG_FromCharPtr("Equidistant_Conic"));
22223 276 : SWIG_Python_SetConstant(d, "SRS_PT_EQUIRECTANGULAR",SWIG_FromCharPtr("Equirectangular"));
22224 276 : SWIG_Python_SetConstant(d, "SRS_PT_GALL_STEREOGRAPHIC",SWIG_FromCharPtr("Gall_Stereographic"));
22225 276 : SWIG_Python_SetConstant(d, "SRS_PT_GAUSSSCHREIBERTMERCATOR",SWIG_FromCharPtr("Gauss_Schreiber_Transverse_Mercator"));
22226 276 : SWIG_Python_SetConstant(d, "SRS_PT_GEOSTATIONARY_SATELLITE",SWIG_FromCharPtr("Geostationary_Satellite"));
22227 276 : SWIG_Python_SetConstant(d, "SRS_PT_GOODE_HOMOLOSINE",SWIG_FromCharPtr("Goode_Homolosine"));
22228 276 : SWIG_Python_SetConstant(d, "SRS_PT_IGH",SWIG_FromCharPtr("Interrupted_Goode_Homolosine"));
22229 276 : SWIG_Python_SetConstant(d, "SRS_PT_GNOMONIC",SWIG_FromCharPtr("Gnomonic"));
22230 276 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR_AZIMUTH_CENTER",SWIG_FromCharPtr("Hotine_Oblique_Mercator_Azimuth_Center"));
22231 276 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR",SWIG_FromCharPtr("Hotine_Oblique_Mercator"));
22232 276 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN",SWIG_FromCharPtr("Hotine_Oblique_Mercator_Two_Point_Natural_Origin"));
22233 276 : SWIG_Python_SetConstant(d, "SRS_PT_LABORDE_OBLIQUE_MERCATOR",SWIG_FromCharPtr("Laborde_Oblique_Mercator"));
22234 276 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP",SWIG_FromCharPtr("Lambert_Conformal_Conic_1SP"));
22235 276 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP",SWIG_FromCharPtr("Lambert_Conformal_Conic_2SP"));
22236 276 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM",SWIG_FromCharPtr("Lambert_Conformal_Conic_2SP_Belgium"));
22237 276 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA",SWIG_FromCharPtr("Lambert_Azimuthal_Equal_Area"));
22238 276 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_1SP",SWIG_FromCharPtr("Mercator_1SP"));
22239 276 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_2SP",SWIG_FromCharPtr("Mercator_2SP"));
22240 276 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_AUXILIARY_SPHERE",SWIG_FromCharPtr("Mercator_Auxiliary_Sphere"));
22241 276 : SWIG_Python_SetConstant(d, "SRS_PT_MILLER_CYLINDRICAL",SWIG_FromCharPtr("Miller_Cylindrical"));
22242 276 : SWIG_Python_SetConstant(d, "SRS_PT_MOLLWEIDE",SWIG_FromCharPtr("Mollweide"));
22243 276 : SWIG_Python_SetConstant(d, "SRS_PT_NEW_ZEALAND_MAP_GRID",SWIG_FromCharPtr("New_Zealand_Map_Grid"));
22244 276 : SWIG_Python_SetConstant(d, "SRS_PT_OBLIQUE_STEREOGRAPHIC",SWIG_FromCharPtr("Oblique_Stereographic"));
22245 276 : SWIG_Python_SetConstant(d, "SRS_PT_ORTHOGRAPHIC",SWIG_FromCharPtr("Orthographic"));
22246 276 : SWIG_Python_SetConstant(d, "SRS_PT_POLAR_STEREOGRAPHIC",SWIG_FromCharPtr("Polar_Stereographic"));
22247 276 : SWIG_Python_SetConstant(d, "SRS_PT_POLYCONIC",SWIG_FromCharPtr("Polyconic"));
22248 276 : SWIG_Python_SetConstant(d, "SRS_PT_ROBINSON",SWIG_FromCharPtr("Robinson"));
22249 276 : SWIG_Python_SetConstant(d, "SRS_PT_SINUSOIDAL",SWIG_FromCharPtr("Sinusoidal"));
22250 276 : SWIG_Python_SetConstant(d, "SRS_PT_STEREOGRAPHIC",SWIG_FromCharPtr("Stereographic"));
22251 276 : SWIG_Python_SetConstant(d, "SRS_PT_SWISS_OBLIQUE_CYLINDRICAL",SWIG_FromCharPtr("Swiss_Oblique_Cylindrical"));
22252 276 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR",SWIG_FromCharPtr("Transverse_Mercator"));
22253 276 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED",SWIG_FromCharPtr("Transverse_Mercator_South_Orientated"));
22254 276 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_21",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_21"));
22255 276 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_22",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_22"));
22256 276 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_23",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_23"));
22257 276 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_24",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_24"));
22258 276 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_25",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_25"));
22259 276 : SWIG_Python_SetConstant(d, "SRS_PT_TUNISIA_MINING_GRID",SWIG_FromCharPtr("Tunisia_Mining_Grid"));
22260 276 : SWIG_Python_SetConstant(d, "SRS_PT_TWO_POINT_EQUIDISTANT",SWIG_FromCharPtr("Two_Point_Equidistant"));
22261 276 : SWIG_Python_SetConstant(d, "SRS_PT_VANDERGRINTEN",SWIG_FromCharPtr("VanDerGrinten"));
22262 276 : SWIG_Python_SetConstant(d, "SRS_PT_KROVAK",SWIG_FromCharPtr("Krovak"));
22263 276 : SWIG_Python_SetConstant(d, "SRS_PT_IMW_POLYCONIC",SWIG_FromCharPtr("International_Map_of_the_World_Polyconic"));
22264 276 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_I",SWIG_FromCharPtr("Wagner_I"));
22265 276 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_II",SWIG_FromCharPtr("Wagner_II"));
22266 276 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_III",SWIG_FromCharPtr("Wagner_III"));
22267 276 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_IV",SWIG_FromCharPtr("Wagner_IV"));
22268 276 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_V",SWIG_FromCharPtr("Wagner_V"));
22269 276 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_VI",SWIG_FromCharPtr("Wagner_VI"));
22270 276 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_VII",SWIG_FromCharPtr("Wagner_VII"));
22271 276 : SWIG_Python_SetConstant(d, "SRS_PT_QSC",SWIG_FromCharPtr("Quadrilateralized_Spherical_Cube"));
22272 276 : SWIG_Python_SetConstant(d, "SRS_PT_AITOFF",SWIG_FromCharPtr("Aitoff"));
22273 276 : SWIG_Python_SetConstant(d, "SRS_PT_WINKEL_I",SWIG_FromCharPtr("Winkel_I"));
22274 276 : SWIG_Python_SetConstant(d, "SRS_PT_WINKEL_II",SWIG_FromCharPtr("Winkel_II"));
22275 276 : SWIG_Python_SetConstant(d, "SRS_PT_WINKEL_TRIPEL",SWIG_FromCharPtr("Winkel_Tripel"));
22276 276 : SWIG_Python_SetConstant(d, "SRS_PT_CRASTER_PARABOLIC",SWIG_FromCharPtr("Craster_Parabolic"));
22277 276 : SWIG_Python_SetConstant(d, "SRS_PT_LOXIMUTHAL",SWIG_FromCharPtr("Loximuthal"));
22278 276 : SWIG_Python_SetConstant(d, "SRS_PT_QUARTIC_AUTHALIC",SWIG_FromCharPtr("Quartic_Authalic"));
22279 276 : SWIG_Python_SetConstant(d, "SRS_PT_SCH",SWIG_FromCharPtr("Spherical_Cross_Track_Height"));
22280 276 : SWIG_Python_SetConstant(d, "SRS_PP_CENTRAL_MERIDIAN",SWIG_FromCharPtr("central_meridian"));
22281 276 : SWIG_Python_SetConstant(d, "SRS_PP_SCALE_FACTOR",SWIG_FromCharPtr("scale_factor"));
22282 276 : SWIG_Python_SetConstant(d, "SRS_PP_STANDARD_PARALLEL_1",SWIG_FromCharPtr("standard_parallel_1"));
22283 276 : SWIG_Python_SetConstant(d, "SRS_PP_STANDARD_PARALLEL_2",SWIG_FromCharPtr("standard_parallel_2"));
22284 276 : SWIG_Python_SetConstant(d, "SRS_PP_PSEUDO_STD_PARALLEL_1",SWIG_FromCharPtr("pseudo_standard_parallel_1"));
22285 276 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_CENTER",SWIG_FromCharPtr("longitude_of_center"));
22286 276 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_CENTER",SWIG_FromCharPtr("latitude_of_center"));
22287 276 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_ORIGIN",SWIG_FromCharPtr("longitude_of_origin"));
22288 276 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_ORIGIN",SWIG_FromCharPtr("latitude_of_origin"));
22289 276 : SWIG_Python_SetConstant(d, "SRS_PP_FALSE_EASTING",SWIG_FromCharPtr("false_easting"));
22290 276 : SWIG_Python_SetConstant(d, "SRS_PP_FALSE_NORTHING",SWIG_FromCharPtr("false_northing"));
22291 276 : SWIG_Python_SetConstant(d, "SRS_PP_AZIMUTH",SWIG_FromCharPtr("azimuth"));
22292 276 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_1",SWIG_FromCharPtr("longitude_of_point_1"));
22293 276 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_1",SWIG_FromCharPtr("latitude_of_point_1"));
22294 276 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_2",SWIG_FromCharPtr("longitude_of_point_2"));
22295 276 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_2",SWIG_FromCharPtr("latitude_of_point_2"));
22296 276 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_3",SWIG_FromCharPtr("longitude_of_point_3"));
22297 276 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_3",SWIG_FromCharPtr("latitude_of_point_3"));
22298 276 : SWIG_Python_SetConstant(d, "SRS_PP_RECTIFIED_GRID_ANGLE",SWIG_FromCharPtr("rectified_grid_angle"));
22299 276 : SWIG_Python_SetConstant(d, "SRS_PP_LANDSAT_NUMBER",SWIG_FromCharPtr("landsat_number"));
22300 276 : SWIG_Python_SetConstant(d, "SRS_PP_PATH_NUMBER",SWIG_FromCharPtr("path_number"));
22301 276 : SWIG_Python_SetConstant(d, "SRS_PP_PERSPECTIVE_POINT_HEIGHT",SWIG_FromCharPtr("perspective_point_height"));
22302 276 : SWIG_Python_SetConstant(d, "SRS_PP_SATELLITE_HEIGHT",SWIG_FromCharPtr("satellite_height"));
22303 276 : SWIG_Python_SetConstant(d, "SRS_PP_FIPSZONE",SWIG_FromCharPtr("fipszone"));
22304 276 : SWIG_Python_SetConstant(d, "SRS_PP_ZONE",SWIG_FromCharPtr("zone"));
22305 276 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_1ST_POINT",SWIG_FromCharPtr("Latitude_Of_1st_Point"));
22306 276 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_1ST_POINT",SWIG_FromCharPtr("Longitude_Of_1st_Point"));
22307 276 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_2ND_POINT",SWIG_FromCharPtr("Latitude_Of_2nd_Point"));
22308 276 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_2ND_POINT",SWIG_FromCharPtr("Longitude_Of_2nd_Point"));
22309 276 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_LATITUDE",SWIG_FromCharPtr("peg_point_latitude"));
22310 276 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_LONGITUDE",SWIG_FromCharPtr("peg_point_longitude"));
22311 276 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_HEADING",SWIG_FromCharPtr("peg_point_heading"));
22312 276 : SWIG_Python_SetConstant(d, "SRS_PP_PEG_POINT_HEIGHT",SWIG_FromCharPtr("peg_point_height"));
22313 276 : SWIG_Python_SetConstant(d, "SRS_UL_METER",SWIG_FromCharPtr("Meter"));
22314 276 : SWIG_Python_SetConstant(d, "SRS_UL_FOOT",SWIG_FromCharPtr("Foot (International)"));
22315 276 : SWIG_Python_SetConstant(d, "SRS_UL_FOOT_CONV",SWIG_FromCharPtr("0.3048"));
22316 276 : SWIG_Python_SetConstant(d, "SRS_UL_US_FOOT",SWIG_FromCharPtr("Foot_US"));
22317 276 : SWIG_Python_SetConstant(d, "SRS_UL_US_FOOT_CONV",SWIG_FromCharPtr("0.3048006096012192"));
22318 276 : SWIG_Python_SetConstant(d, "SRS_UL_NAUTICAL_MILE",SWIG_FromCharPtr("Nautical Mile"));
22319 276 : SWIG_Python_SetConstant(d, "SRS_UL_NAUTICAL_MILE_CONV",SWIG_FromCharPtr("1852.0"));
22320 276 : SWIG_Python_SetConstant(d, "SRS_UL_LINK",SWIG_FromCharPtr("Link"));
22321 276 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_CONV",SWIG_FromCharPtr("0.20116684023368047"));
22322 276 : SWIG_Python_SetConstant(d, "SRS_UL_CHAIN",SWIG_FromCharPtr("Chain"));
22323 276 : SWIG_Python_SetConstant(d, "SRS_UL_CHAIN_CONV",SWIG_FromCharPtr("20.116684023368047"));
22324 276 : SWIG_Python_SetConstant(d, "SRS_UL_ROD",SWIG_FromCharPtr("Rod"));
22325 276 : SWIG_Python_SetConstant(d, "SRS_UL_ROD_CONV",SWIG_FromCharPtr("5.02921005842012"));
22326 276 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_Clarke",SWIG_FromCharPtr("Link_Clarke"));
22327 276 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_Clarke_CONV",SWIG_FromCharPtr("0.2011661949"));
22328 276 : SWIG_Python_SetConstant(d, "SRS_UL_KILOMETER",SWIG_FromCharPtr("Kilometer"));
22329 276 : SWIG_Python_SetConstant(d, "SRS_UL_KILOMETER_CONV",SWIG_FromCharPtr("1000."));
22330 276 : SWIG_Python_SetConstant(d, "SRS_UL_DECIMETER",SWIG_FromCharPtr("Decimeter"));
22331 276 : SWIG_Python_SetConstant(d, "SRS_UL_DECIMETER_CONV",SWIG_FromCharPtr("0.1"));
22332 276 : SWIG_Python_SetConstant(d, "SRS_UL_CENTIMETER",SWIG_FromCharPtr("Centimeter"));
22333 276 : SWIG_Python_SetConstant(d, "SRS_UL_CENTIMETER_CONV",SWIG_FromCharPtr("0.01"));
22334 276 : SWIG_Python_SetConstant(d, "SRS_UL_MILLIMETER",SWIG_FromCharPtr("Millimeter"));
22335 276 : SWIG_Python_SetConstant(d, "SRS_UL_MILLIMETER_CONV",SWIG_FromCharPtr("0.001"));
22336 276 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_NAUT_MILE",SWIG_FromCharPtr("Nautical_Mile_International"));
22337 276 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_NAUT_MILE_CONV",SWIG_FromCharPtr("1852.0"));
22338 276 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_INCH",SWIG_FromCharPtr("Inch_International"));
22339 276 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_INCH_CONV",SWIG_FromCharPtr("0.0254"));
22340 276 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FOOT",SWIG_FromCharPtr("Foot_International"));
22341 276 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FOOT_CONV",SWIG_FromCharPtr("0.3048"));
22342 276 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_YARD",SWIG_FromCharPtr("Yard_International"));
22343 276 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_YARD_CONV",SWIG_FromCharPtr("0.9144"));
22344 276 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_STAT_MILE",SWIG_FromCharPtr("Statute_Mile_International"));
22345 276 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_STAT_MILE_CONV",SWIG_FromCharPtr("1609.344"));
22346 276 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FATHOM",SWIG_FromCharPtr("Fathom_International"));
22347 276 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_FATHOM_CONV",SWIG_FromCharPtr("1.8288"));
22348 276 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_CHAIN",SWIG_FromCharPtr("Chain_International"));
22349 276 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_CHAIN_CONV",SWIG_FromCharPtr("20.1168"));
22350 276 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_LINK",SWIG_FromCharPtr("Link_International"));
22351 276 : SWIG_Python_SetConstant(d, "SRS_UL_INTL_LINK_CONV",SWIG_FromCharPtr("0.201168"));
22352 276 : SWIG_Python_SetConstant(d, "SRS_UL_US_INCH",SWIG_FromCharPtr("Inch_US_Surveyor"));
22353 276 : SWIG_Python_SetConstant(d, "SRS_UL_US_INCH_CONV",SWIG_FromCharPtr("0.025400050800101603"));
22354 276 : SWIG_Python_SetConstant(d, "SRS_UL_US_YARD",SWIG_FromCharPtr("Yard_US_Surveyor"));
22355 276 : SWIG_Python_SetConstant(d, "SRS_UL_US_YARD_CONV",SWIG_FromCharPtr("0.914401828803658"));
22356 276 : SWIG_Python_SetConstant(d, "SRS_UL_US_CHAIN",SWIG_FromCharPtr("Chain_US_Surveyor"));
22357 276 : SWIG_Python_SetConstant(d, "SRS_UL_US_CHAIN_CONV",SWIG_FromCharPtr("20.11684023368047"));
22358 276 : SWIG_Python_SetConstant(d, "SRS_UL_US_STAT_MILE",SWIG_FromCharPtr("Statute_Mile_US_Surveyor"));
22359 276 : SWIG_Python_SetConstant(d, "SRS_UL_US_STAT_MILE_CONV",SWIG_FromCharPtr("1609.347218694437"));
22360 276 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_YARD",SWIG_FromCharPtr("Yard_Indian"));
22361 276 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_YARD_CONV",SWIG_FromCharPtr("0.91439523"));
22362 276 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_FOOT",SWIG_FromCharPtr("Foot_Indian"));
22363 276 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_FOOT_CONV",SWIG_FromCharPtr("0.30479841"));
22364 276 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_CHAIN",SWIG_FromCharPtr("Chain_Indian"));
22365 276 : SWIG_Python_SetConstant(d, "SRS_UL_INDIAN_CHAIN_CONV",SWIG_FromCharPtr("20.11669506"));
22366 276 : SWIG_Python_SetConstant(d, "SRS_UA_DEGREE",SWIG_FromCharPtr("degree"));
22367 276 : SWIG_Python_SetConstant(d, "SRS_UA_DEGREE_CONV",SWIG_FromCharPtr("0.0174532925199433"));
22368 276 : SWIG_Python_SetConstant(d, "SRS_UA_RADIAN",SWIG_FromCharPtr("radian"));
22369 276 : SWIG_Python_SetConstant(d, "SRS_PM_GREENWICH",SWIG_FromCharPtr("Greenwich"));
22370 276 : SWIG_Python_SetConstant(d, "SRS_DN_NAD27",SWIG_FromCharPtr("North_American_Datum_1927"));
22371 276 : SWIG_Python_SetConstant(d, "SRS_DN_NAD83",SWIG_FromCharPtr("North_American_Datum_1983"));
22372 276 : SWIG_Python_SetConstant(d, "SRS_DN_WGS72",SWIG_FromCharPtr("WGS_1972"));
22373 276 : SWIG_Python_SetConstant(d, "SRS_DN_WGS84",SWIG_FromCharPtr("WGS_1984"));
22374 276 : SWIG_Python_SetConstant(d, "SRS_WGS84_SEMIMAJOR",SWIG_From_double(static_cast< double >(6378137.0)));
22375 276 : SWIG_Python_SetConstant(d, "SRS_WGS84_INVFLATTENING",SWIG_From_double(static_cast< double >(298.257223563)));
22376 276 : SWIG_Python_SetConstant(d, "OAO_Other",SWIG_From_int(static_cast< int >(0)));
22377 276 : SWIG_Python_SetConstant(d, "OAO_North",SWIG_From_int(static_cast< int >(1)));
22378 276 : SWIG_Python_SetConstant(d, "OAO_South",SWIG_From_int(static_cast< int >(2)));
22379 276 : SWIG_Python_SetConstant(d, "OAO_East",SWIG_From_int(static_cast< int >(3)));
22380 276 : SWIG_Python_SetConstant(d, "OAO_West",SWIG_From_int(static_cast< int >(4)));
22381 276 : SWIG_Python_SetConstant(d, "OAO_Up",SWIG_From_int(static_cast< int >(5)));
22382 276 : SWIG_Python_SetConstant(d, "OAO_Down",SWIG_From_int(static_cast< int >(6)));
22383 276 : SWIG_Python_SetConstant(d, "OAMS_TRADITIONAL_GIS_ORDER",SWIG_From_int(static_cast< int >(0)));
22384 276 : SWIG_Python_SetConstant(d, "OAMS_AUTHORITY_COMPLIANT",SWIG_From_int(static_cast< int >(1)));
22385 276 : SWIG_Python_SetConstant(d, "OAMS_CUSTOM",SWIG_From_int(static_cast< int >(2)));
22386 276 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP",SWIG_From_int(static_cast< int >(1024)));
22387 276 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_WRONG_SYNTAX",SWIG_From_int(static_cast< int >(1025)));
22388 276 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_MISSING_ARG",SWIG_From_int(static_cast< int >(1026)));
22389 276 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_ILLEGAL_ARG_VALUE",SWIG_From_int(static_cast< int >(1027)));
22390 276 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_MUTUALLY_EXCLUSIVE_ARGS",SWIG_From_int(static_cast< int >(1028)));
22391 276 : SWIG_Python_SetConstant(d, "PROJ_ERR_INVALID_OP_FILE_NOT_FOUND_OR_INVALID",SWIG_From_int(static_cast< int >(1029)));
22392 276 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM",SWIG_From_int(static_cast< int >(2048)));
22393 276 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_INVALID_COORD",SWIG_From_int(static_cast< int >(2049)));
22394 276 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_OUTSIDE_PROJECTION_DOMAIN",SWIG_From_int(static_cast< int >(2050)));
22395 276 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_NO_OPERATION",SWIG_From_int(static_cast< int >(2051)));
22396 276 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_OUTSIDE_GRID",SWIG_From_int(static_cast< int >(2052)));
22397 276 : SWIG_Python_SetConstant(d, "PROJ_ERR_COORD_TRANSFM_GRID_AT_NODATA",SWIG_From_int(static_cast< int >(2053)));
22398 276 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER",SWIG_From_int(static_cast< int >(4096)));
22399 276 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER_API_MISUSE",SWIG_From_int(static_cast< int >(4097)));
22400 276 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER_NO_INVERSE_OP",SWIG_From_int(static_cast< int >(4098)));
22401 276 : SWIG_Python_SetConstant(d, "PROJ_ERR_OTHER_NETWORK_ERROR",SWIG_From_int(static_cast< int >(4099)));
22402 :
22403 : // Will be turned on for GDAL 4.0
22404 : // UseExceptions();
22405 :
22406 276 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_GEOGRAPHIC_2D",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_GEOGRAPHIC_2D)));
22407 276 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_GEOGRAPHIC_3D",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_GEOGRAPHIC_3D)));
22408 276 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_GEOCENTRIC",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_GEOCENTRIC)));
22409 276 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_PROJECTED",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_PROJECTED)));
22410 276 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_VERTICAL",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_VERTICAL)));
22411 276 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_COMPOUND",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_COMPOUND)));
22412 276 : SWIG_Python_SetConstant(d, "OSR_CRS_TYPE_OTHER",SWIG_From_int(static_cast< int >(OSR_CRS_TYPE_OTHER)));
22413 :
22414 : /* Initialize threading */
22415 276 : SWIG_PYTHON_INITIALIZE_THREADS;
22416 : #if PY_VERSION_HEX >= 0x03000000
22417 276 : return m;
22418 : #else
22419 : return;
22420 : #endif
22421 : }
22422 :
|