1 : /* ----------------------------------------------------------------------------
2 : * This file was automatically generated by SWIG (http://www.swig.org).
3 : * Version 1.3.40
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 : #define SWIGPYTHON
12 : #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
13 :
14 :
15 : #ifdef __cplusplus
16 : /* SwigValueWrapper is described in swig.swg */
17 : template<typename T> class SwigValueWrapper {
18 : struct SwigMovePointer {
19 : T *ptr;
20 : SwigMovePointer(T *p) : ptr(p) { }
21 : ~SwigMovePointer() { delete ptr; }
22 : SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
23 : } pointer;
24 : SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
25 : SwigValueWrapper(const SwigValueWrapper<T>& rhs);
26 : public:
27 : SwigValueWrapper() : pointer(0) { }
28 : SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
29 : operator T&() const { return *pointer.ptr; }
30 : T *operator&() { return pointer.ptr; }
31 : };
32 :
33 : template <typename T> T SwigValueInit() {
34 : return T();
35 : }
36 : #endif
37 :
38 : /* -----------------------------------------------------------------------------
39 : * This section contains generic SWIG labels for method/variable
40 : * declarations/attributes, and other compiler dependent labels.
41 : * ----------------------------------------------------------------------------- */
42 :
43 : /* template workaround for compilers that cannot correctly implement the C++ standard */
44 : #ifndef SWIGTEMPLATEDISAMBIGUATOR
45 : # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
46 : # define SWIGTEMPLATEDISAMBIGUATOR template
47 : # elif defined(__HP_aCC)
48 : /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
49 : /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
50 : # define SWIGTEMPLATEDISAMBIGUATOR template
51 : # else
52 : # define SWIGTEMPLATEDISAMBIGUATOR
53 : # endif
54 : #endif
55 :
56 : /* inline attribute */
57 : #ifndef SWIGINLINE
58 : # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
59 : # define SWIGINLINE inline
60 : # else
61 : # define SWIGINLINE
62 : # endif
63 : #endif
64 :
65 : /* attribute recognised by some compilers to avoid 'unused' warnings */
66 : #ifndef SWIGUNUSED
67 : # if defined(__GNUC__)
68 : # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
69 : # define SWIGUNUSED __attribute__ ((__unused__))
70 : # else
71 : # define SWIGUNUSED
72 : # endif
73 : # elif defined(__ICC)
74 : # define SWIGUNUSED __attribute__ ((__unused__))
75 : # else
76 : # define SWIGUNUSED
77 : # endif
78 : #endif
79 :
80 : #ifndef SWIG_MSC_UNSUPPRESS_4505
81 : # if defined(_MSC_VER)
82 : # pragma warning(disable : 4505) /* unreferenced local function has been removed */
83 : # endif
84 : #endif
85 :
86 : #ifndef SWIGUNUSEDPARM
87 : # ifdef __cplusplus
88 : # define SWIGUNUSEDPARM(p)
89 : # else
90 : # define SWIGUNUSEDPARM(p) p SWIGUNUSED
91 : # endif
92 : #endif
93 :
94 : /* internal SWIG method */
95 : #ifndef SWIGINTERN
96 : # define SWIGINTERN static SWIGUNUSED
97 : #endif
98 :
99 : /* internal inline SWIG method */
100 : #ifndef SWIGINTERNINLINE
101 : # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
102 : #endif
103 :
104 : /* exporting methods */
105 : #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
106 : # ifndef GCC_HASCLASSVISIBILITY
107 : # define GCC_HASCLASSVISIBILITY
108 : # endif
109 : #endif
110 :
111 : #ifndef SWIGEXPORT
112 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
113 : # if defined(STATIC_LINKED)
114 : # define SWIGEXPORT
115 : # else
116 : # define SWIGEXPORT __declspec(dllexport)
117 : # endif
118 : # else
119 : # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
120 : # define SWIGEXPORT __attribute__ ((visibility("default")))
121 : # else
122 : # define SWIGEXPORT
123 : # endif
124 : # endif
125 : #endif
126 :
127 : /* calling conventions for Windows */
128 : #ifndef SWIGSTDCALL
129 : # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
130 : # define SWIGSTDCALL __stdcall
131 : # else
132 : # define SWIGSTDCALL
133 : # endif
134 : #endif
135 :
136 : /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
137 : #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
138 : # define _CRT_SECURE_NO_DEPRECATE
139 : #endif
140 :
141 : /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
142 : #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
143 : # define _SCL_SECURE_NO_DEPRECATE
144 : #endif
145 :
146 :
147 :
148 : /* Python.h has to appear first */
149 : #include <Python.h>
150 :
151 : /* -----------------------------------------------------------------------------
152 : * swigrun.swg
153 : *
154 : * This file contains generic C API SWIG runtime support for pointer
155 : * type checking.
156 : * ----------------------------------------------------------------------------- */
157 :
158 : /* This should only be incremented when either the layout of swig_type_info changes,
159 : or for whatever reason, the runtime changes incompatibly */
160 : #define SWIG_RUNTIME_VERSION "4"
161 :
162 : /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
163 : #ifdef SWIG_TYPE_TABLE
164 : # define SWIG_QUOTE_STRING(x) #x
165 : # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
166 : # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
167 : #else
168 : # define SWIG_TYPE_TABLE_NAME
169 : #endif
170 :
171 : /*
172 : You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
173 : creating a static or dynamic library from the SWIG runtime code.
174 : In 99.9% of the cases, SWIG just needs to declare them as 'static'.
175 :
176 : But only do this if strictly necessary, ie, if you have problems
177 : with your compiler or suchlike.
178 : */
179 :
180 : #ifndef SWIGRUNTIME
181 : # define SWIGRUNTIME SWIGINTERN
182 : #endif
183 :
184 : #ifndef SWIGRUNTIMEINLINE
185 : # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
186 : #endif
187 :
188 : /* Generic buffer size */
189 : #ifndef SWIG_BUFFER_SIZE
190 : # define SWIG_BUFFER_SIZE 1024
191 : #endif
192 :
193 : /* Flags for pointer conversions */
194 : #define SWIG_POINTER_DISOWN 0x1
195 : #define SWIG_CAST_NEW_MEMORY 0x2
196 :
197 : /* Flags for new pointer objects */
198 : #define SWIG_POINTER_OWN 0x1
199 :
200 :
201 : /*
202 : Flags/methods for returning states.
203 :
204 : The SWIG conversion methods, as ConvertPtr, return and integer
205 : that tells if the conversion was successful or not. And if not,
206 : an error code can be returned (see swigerrors.swg for the codes).
207 :
208 : Use the following macros/flags to set or process the returning
209 : states.
210 :
211 : In old versions of SWIG, code such as the following was usually written:
212 :
213 : if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
214 : // success code
215 : } else {
216 : //fail code
217 : }
218 :
219 : Now you can be more explicit:
220 :
221 : int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
222 : if (SWIG_IsOK(res)) {
223 : // success code
224 : } else {
225 : // fail code
226 : }
227 :
228 : which is the same really, but now you can also do
229 :
230 : Type *ptr;
231 : int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
232 : if (SWIG_IsOK(res)) {
233 : // success code
234 : if (SWIG_IsNewObj(res) {
235 : ...
236 : delete *ptr;
237 : } else {
238 : ...
239 : }
240 : } else {
241 : // fail code
242 : }
243 :
244 : I.e., now SWIG_ConvertPtr can return new objects and you can
245 : identify the case and take care of the deallocation. Of course that
246 : also requires SWIG_ConvertPtr to return new result values, such as
247 :
248 : int SWIG_ConvertPtr(obj, ptr,...) {
249 : if (<obj is ok>) {
250 : if (<need new object>) {
251 : *ptr = <ptr to new allocated object>;
252 : return SWIG_NEWOBJ;
253 : } else {
254 : *ptr = <ptr to old object>;
255 : return SWIG_OLDOBJ;
256 : }
257 : } else {
258 : return SWIG_BADOBJ;
259 : }
260 : }
261 :
262 : Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
263 : more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
264 : SWIG errors code.
265 :
266 : Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
267 : allows to return the 'cast rank', for example, if you have this
268 :
269 : int food(double)
270 : int fooi(int);
271 :
272 : and you call
273 :
274 : food(1) // cast rank '1' (1 -> 1.0)
275 : fooi(1) // cast rank '0'
276 :
277 : just use the SWIG_AddCast()/SWIG_CheckState()
278 : */
279 :
280 : #define SWIG_OK (0)
281 : #define SWIG_ERROR (-1)
282 : #define SWIG_IsOK(r) (r >= 0)
283 : #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
284 :
285 : /* The CastRankLimit says how many bits are used for the cast rank */
286 : #define SWIG_CASTRANKLIMIT (1 << 8)
287 : /* The NewMask denotes the object was created (using new/malloc) */
288 : #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
289 : /* The TmpMask is for in/out typemaps that use temporal objects */
290 : #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
291 : /* Simple returning values */
292 : #define SWIG_BADOBJ (SWIG_ERROR)
293 : #define SWIG_OLDOBJ (SWIG_OK)
294 : #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
295 : #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
296 : /* Check, add and del mask methods */
297 : #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
298 : #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
299 : #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
300 : #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
301 : #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
302 : #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
303 :
304 : /* Cast-Rank Mode */
305 : #if defined(SWIG_CASTRANK_MODE)
306 : # ifndef SWIG_TypeRank
307 : # define SWIG_TypeRank unsigned long
308 : # endif
309 : # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
310 : # define SWIG_MAXCASTRANK (2)
311 : # endif
312 : # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
313 : # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
314 : SWIGINTERNINLINE int SWIG_AddCast(int r) {
315 : return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
316 : }
317 : SWIGINTERNINLINE int SWIG_CheckState(int r) {
318 : return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
319 : }
320 : #else /* no cast-rank mode */
321 : # define SWIG_AddCast
322 : # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
323 : #endif
324 :
325 :
326 : #include <string.h>
327 :
328 : #ifdef __cplusplus
329 : extern "C" {
330 : #endif
331 :
332 : typedef void *(*swig_converter_func)(void *, int *);
333 : typedef struct swig_type_info *(*swig_dycast_func)(void **);
334 :
335 : /* Structure to store information on one type */
336 : typedef struct swig_type_info {
337 : const char *name; /* mangled name of this type */
338 : const char *str; /* human readable name of this type */
339 : swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
340 : struct swig_cast_info *cast; /* linked list of types that can cast into this type */
341 : void *clientdata; /* language specific type data */
342 : int owndata; /* flag if the structure owns the clientdata */
343 : } swig_type_info;
344 :
345 : /* Structure to store a type and conversion function used for casting */
346 : typedef struct swig_cast_info {
347 : swig_type_info *type; /* pointer to type that is equivalent to this type */
348 : swig_converter_func converter; /* function to cast the void pointers */
349 : struct swig_cast_info *next; /* pointer to next cast in linked list */
350 : struct swig_cast_info *prev; /* pointer to the previous cast */
351 : } swig_cast_info;
352 :
353 : /* Structure used to store module information
354 : * Each module generates one structure like this, and the runtime collects
355 : * all of these structures and stores them in a circularly linked list.*/
356 : typedef struct swig_module_info {
357 : swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
358 : size_t size; /* Number of types in this module */
359 : struct swig_module_info *next; /* Pointer to next element in circularly linked list */
360 : swig_type_info **type_initial; /* Array of initially generated type structures */
361 : swig_cast_info **cast_initial; /* Array of initially generated casting structures */
362 : void *clientdata; /* Language specific module data */
363 : } swig_module_info;
364 :
365 : /*
366 : Compare two type names skipping the space characters, therefore
367 : "char*" == "char *" and "Class<int>" == "Class<int >", etc.
368 :
369 : Return 0 when the two name types are equivalent, as in
370 : strncmp, but skipping ' '.
371 : */
372 : SWIGRUNTIME int
373 : SWIG_TypeNameComp(const char *f1, const char *l1,
374 : const char *f2, const char *l2) {
375 0 : for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
376 0 : while ((*f1 == ' ') && (f1 != l1)) ++f1;
377 0 : while ((*f2 == ' ') && (f2 != l2)) ++f2;
378 0 : if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
379 : }
380 0 : return (int)((l1 - f1) - (l2 - f2));
381 : }
382 :
383 : /*
384 : Check type equivalence in a name list like <name1>|<name2>|...
385 : Return 0 if not equal, 1 if equal
386 : */
387 : SWIGRUNTIME int
388 : SWIG_TypeEquiv(const char *nb, const char *tb) {
389 0 : int equiv = 0;
390 0 : const char* te = tb + strlen(tb);
391 0 : const char* ne = nb;
392 0 : while (!equiv && *ne) {
393 0 : for (nb = ne; *ne; ++ne) {
394 0 : if (*ne == '|') break;
395 : }
396 0 : equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
397 0 : if (*ne) ++ne;
398 : }
399 0 : return equiv;
400 : }
401 :
402 : /*
403 : Check type equivalence in a name list like <name1>|<name2>|...
404 : Return 0 if equal, -1 if nb < tb, 1 if nb > tb
405 : */
406 : SWIGRUNTIME int
407 : SWIG_TypeCompare(const char *nb, const char *tb) {
408 : int equiv = 0;
409 : const char* te = tb + strlen(tb);
410 : const char* ne = nb;
411 : while (!equiv && *ne) {
412 : for (nb = ne; *ne; ++ne) {
413 : if (*ne == '|') break;
414 : }
415 : equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0;
416 : if (*ne) ++ne;
417 : }
418 : return equiv;
419 : }
420 :
421 :
422 : /*
423 : Check the typename
424 : */
425 : SWIGRUNTIME swig_cast_info *
426 16 : SWIG_TypeCheck(const char *c, swig_type_info *ty) {
427 16 : if (ty) {
428 16 : swig_cast_info *iter = ty->cast;
429 32 : while (iter) {
430 16 : if (strcmp(iter->type->name, c) == 0) {
431 16 : if (iter == ty->cast)
432 16 : return iter;
433 : /* Move iter to the top of the linked list */
434 0 : iter->prev->next = iter->next;
435 0 : if (iter->next)
436 0 : iter->next->prev = iter->prev;
437 0 : iter->next = ty->cast;
438 0 : iter->prev = 0;
439 0 : if (ty->cast) ty->cast->prev = iter;
440 0 : ty->cast = iter;
441 0 : return iter;
442 : }
443 0 : iter = iter->next;
444 : }
445 : }
446 0 : return 0;
447 : }
448 :
449 : /*
450 : Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
451 : */
452 : SWIGRUNTIME swig_cast_info *
453 : SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
454 : if (ty) {
455 : swig_cast_info *iter = ty->cast;
456 : while (iter) {
457 : if (iter->type == from) {
458 : if (iter == ty->cast)
459 : return iter;
460 : /* Move iter to the top of the linked list */
461 : iter->prev->next = iter->next;
462 : if (iter->next)
463 : iter->next->prev = iter->prev;
464 : iter->next = ty->cast;
465 : iter->prev = 0;
466 : if (ty->cast) ty->cast->prev = iter;
467 : ty->cast = iter;
468 : return iter;
469 : }
470 : iter = iter->next;
471 : }
472 : }
473 : return 0;
474 : }
475 :
476 : /*
477 : Cast a pointer up an inheritance hierarchy
478 : */
479 : SWIGRUNTIMEINLINE void *
480 : SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
481 0 : return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
482 : }
483 :
484 : /*
485 : Dynamic pointer casting. Down an inheritance hierarchy
486 : */
487 : SWIGRUNTIME swig_type_info *
488 : SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
489 : swig_type_info *lastty = ty;
490 : if (!ty || !ty->dcast) return ty;
491 : while (ty && (ty->dcast)) {
492 : ty = (*ty->dcast)(ptr);
493 : if (ty) lastty = ty;
494 : }
495 : return lastty;
496 : }
497 :
498 : /*
499 : Return the name associated with this type
500 : */
501 : SWIGRUNTIMEINLINE const char *
502 : SWIG_TypeName(const swig_type_info *ty) {
503 : return ty->name;
504 : }
505 :
506 : /*
507 : Return the pretty name associated with this type,
508 : that is an unmangled type name in a form presentable to the user.
509 : */
510 : SWIGRUNTIME const char *
511 : SWIG_TypePrettyName(const swig_type_info *type) {
512 : /* The "str" field contains the equivalent pretty names of the
513 : type, separated by vertical-bar characters. We choose
514 : to print the last name, as it is often (?) the most
515 : specific. */
516 0 : if (!type) return NULL;
517 0 : if (type->str != NULL) {
518 0 : const char *last_name = type->str;
519 : const char *s;
520 0 : for (s = type->str; *s; s++)
521 0 : if (*s == '|') last_name = s+1;
522 0 : return last_name;
523 : }
524 : else
525 0 : return type->name;
526 : }
527 :
528 : /*
529 : Set the clientdata field for a type
530 : */
531 : SWIGRUNTIME void
532 8 : SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
533 8 : swig_cast_info *cast = ti->cast;
534 : /* if (ti->clientdata == clientdata) return; */
535 8 : ti->clientdata = clientdata;
536 :
537 24 : while (cast) {
538 8 : if (!cast->converter) {
539 8 : swig_type_info *tc = cast->type;
540 8 : if (!tc->clientdata) {
541 0 : SWIG_TypeClientData(tc, clientdata);
542 : }
543 : }
544 8 : cast = cast->next;
545 : }
546 8 : }
547 : SWIGRUNTIME void
548 : SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
549 8 : SWIG_TypeClientData(ti, clientdata);
550 8 : ti->owndata = 1;
551 : }
552 :
553 : /*
554 : Search for a swig_type_info structure only by mangled name
555 : Search is a O(log #types)
556 :
557 : We start searching at module start, and finish searching when start == end.
558 : Note: if start == end at the beginning of the function, we go all the way around
559 : the circular list.
560 : */
561 : SWIGRUNTIME swig_type_info *
562 64 : SWIG_MangledTypeQueryModule(swig_module_info *start,
563 : swig_module_info *end,
564 : const char *name) {
565 64 : swig_module_info *iter = start;
566 88 : do {
567 120 : if (iter->size) {
568 120 : register size_t l = 0;
569 120 : register size_t r = iter->size - 1;
570 240 : do {
571 : /* since l+r >= 0, we can (>> 1) instead (/ 2) */
572 288 : register size_t i = (l + r) >> 1;
573 288 : const char *iname = iter->types[i]->name;
574 288 : if (iname) {
575 288 : register int compare = strcmp(name, iname);
576 288 : if (compare == 0) {
577 32 : return iter->types[i];
578 256 : } else if (compare < 0) {
579 88 : if (i) {
580 72 : r = i - 1;
581 : } else {
582 : break;
583 : }
584 168 : } else if (compare > 0) {
585 168 : l = i + 1;
586 : }
587 : } else {
588 : break; /* should never happen */
589 : }
590 : } while (l <= r);
591 : }
592 88 : iter = iter->next;
593 : } while (iter != end);
594 32 : return 0;
595 : }
596 :
597 : /*
598 : Search for a swig_type_info structure for either a mangled name or a human readable name.
599 : It first searches the mangled names of the types, which is a O(log #types)
600 : If a type is not found it then searches the human readable names, which is O(#types).
601 :
602 : We start searching at module start, and finish searching when start == end.
603 : Note: if start == end at the beginning of the function, we go all the way around
604 : the circular list.
605 : */
606 : SWIGRUNTIME swig_type_info *
607 0 : SWIG_TypeQueryModule(swig_module_info *start,
608 : swig_module_info *end,
609 : const char *name) {
610 : /* STEP 1: Search the name field using binary search */
611 0 : swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
612 0 : if (ret) {
613 0 : return ret;
614 : } else {
615 : /* STEP 2: If the type hasn't been found, do a complete search
616 : of the str field (the human readable name) */
617 0 : swig_module_info *iter = start;
618 0 : do {
619 0 : register size_t i = 0;
620 0 : for (; i < iter->size; ++i) {
621 0 : if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
622 0 : return iter->types[i];
623 : }
624 0 : iter = iter->next;
625 : } while (iter != end);
626 : }
627 :
628 : /* neither found a match */
629 0 : return 0;
630 : }
631 :
632 : /*
633 : Pack binary data into a string
634 : */
635 : SWIGRUNTIME char *
636 : SWIG_PackData(char *c, void *ptr, size_t sz) {
637 : static const char hex[17] = "0123456789abcdef";
638 0 : register const unsigned char *u = (unsigned char *) ptr;
639 0 : register const unsigned char *eu = u + sz;
640 0 : for (; u != eu; ++u) {
641 0 : register unsigned char uu = *u;
642 0 : *(c++) = hex[(uu & 0xf0) >> 4];
643 0 : *(c++) = hex[uu & 0xf];
644 : }
645 0 : return c;
646 : }
647 :
648 : /*
649 : Unpack binary data from a string
650 : */
651 : SWIGRUNTIME const char *
652 : SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
653 : register unsigned char *u = (unsigned char *) ptr;
654 : register const unsigned char *eu = u + sz;
655 : for (; u != eu; ++u) {
656 : register char d = *(c++);
657 : register unsigned char uu;
658 : if ((d >= '0') && (d <= '9'))
659 : uu = ((d - '0') << 4);
660 : else if ((d >= 'a') && (d <= 'f'))
661 : uu = ((d - ('a'-10)) << 4);
662 : else
663 : return (char *) 0;
664 : d = *(c++);
665 : if ((d >= '0') && (d <= '9'))
666 : uu |= (d - '0');
667 : else if ((d >= 'a') && (d <= 'f'))
668 : uu |= (d - ('a'-10));
669 : else
670 : return (char *) 0;
671 : *u = uu;
672 : }
673 : return c;
674 : }
675 :
676 : /*
677 : Pack 'void *' into a string buffer.
678 : */
679 : SWIGRUNTIME char *
680 0 : SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
681 0 : char *r = buff;
682 0 : if ((2*sizeof(void *) + 2) > bsz) return 0;
683 0 : *(r++) = '_';
684 0 : r = SWIG_PackData(r,&ptr,sizeof(void *));
685 0 : if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
686 : strcpy(r,name);
687 0 : return buff;
688 : }
689 :
690 : SWIGRUNTIME const char *
691 : SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
692 : if (*c != '_') {
693 : if (strcmp(c,"NULL") == 0) {
694 : *ptr = (void *) 0;
695 : return name;
696 : } else {
697 : return 0;
698 : }
699 : }
700 : return SWIG_UnpackData(++c,ptr,sizeof(void *));
701 : }
702 :
703 : SWIGRUNTIME char *
704 0 : SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
705 0 : char *r = buff;
706 0 : size_t lname = (name ? strlen(name) : 0);
707 0 : if ((2*sz + 2 + lname) > bsz) return 0;
708 0 : *(r++) = '_';
709 0 : r = SWIG_PackData(r,ptr,sz);
710 0 : if (lname) {
711 0 : strncpy(r,name,lname+1);
712 : } else {
713 0 : *r = 0;
714 : }
715 0 : return buff;
716 : }
717 :
718 : SWIGRUNTIME const char *
719 : SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
720 : if (*c != '_') {
721 : if (strcmp(c,"NULL") == 0) {
722 : memset(ptr,0,sz);
723 : return name;
724 : } else {
725 : return 0;
726 : }
727 : }
728 : return SWIG_UnpackData(++c,ptr,sz);
729 : }
730 :
731 : #ifdef __cplusplus
732 : }
733 : #endif
734 :
735 : /* Errors in SWIG */
736 : #define SWIG_UnknownError -1
737 : #define SWIG_IOError -2
738 : #define SWIG_RuntimeError -3
739 : #define SWIG_IndexError -4
740 : #define SWIG_TypeError -5
741 : #define SWIG_DivisionByZero -6
742 : #define SWIG_OverflowError -7
743 : #define SWIG_SyntaxError -8
744 : #define SWIG_ValueError -9
745 : #define SWIG_SystemError -10
746 : #define SWIG_AttributeError -11
747 : #define SWIG_MemoryError -12
748 : #define SWIG_NullReferenceError -13
749 :
750 :
751 :
752 : /* Compatibility macros for Python 3 */
753 : #if PY_VERSION_HEX >= 0x03000000
754 :
755 : #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
756 : #define PyInt_Check(x) PyLong_Check(x)
757 : #define PyInt_AsLong(x) PyLong_AsLong(x)
758 : #define PyInt_FromLong(x) PyLong_FromLong(x)
759 : #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
760 :
761 : #endif
762 :
763 : #ifndef Py_TYPE
764 : # define Py_TYPE(op) ((op)->ob_type)
765 : #endif
766 :
767 : /* SWIG APIs for compatibility of both Python 2 & 3 */
768 :
769 : #if PY_VERSION_HEX >= 0x03000000
770 : # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
771 : #else
772 : # define SWIG_Python_str_FromFormat PyString_FromFormat
773 : #endif
774 :
775 :
776 : /* Warning: This function will allocate a new string in Python 3,
777 : * so please call SWIG_Python_str_DelForPy3(x) to free the space.
778 : */
779 : SWIGINTERN char*
780 : SWIG_Python_str_AsChar(PyObject *str)
781 : {
782 : #if PY_VERSION_HEX >= 0x03000000
783 : char *cstr;
784 : char *newstr;
785 : Py_ssize_t len;
786 : str = PyUnicode_AsUTF8String(str);
787 : PyBytes_AsStringAndSize(str, &cstr, &len);
788 : newstr = (char *) malloc(len+1);
789 : memcpy(newstr, cstr, len+1);
790 : Py_XDECREF(str);
791 : return newstr;
792 : #else
793 0 : return PyString_AsString(str);
794 : #endif
795 : }
796 :
797 : #if PY_VERSION_HEX >= 0x03000000
798 : # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
799 : #else
800 : # define SWIG_Python_str_DelForPy3(x)
801 : #endif
802 :
803 :
804 : SWIGINTERN PyObject*
805 : SWIG_Python_str_FromChar(const char *c)
806 : {
807 : #if PY_VERSION_HEX >= 0x03000000
808 : return PyUnicode_FromString(c);
809 : #else
810 2 : return PyString_FromString(c);
811 : #endif
812 : }
813 :
814 : /* Add PyOS_snprintf for old Pythons */
815 : #if PY_VERSION_HEX < 0x02020000
816 : # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
817 : # define PyOS_snprintf _snprintf
818 : # else
819 : # define PyOS_snprintf snprintf
820 : # endif
821 : #endif
822 :
823 : /* A crude PyString_FromFormat implementation for old Pythons */
824 : #if PY_VERSION_HEX < 0x02020000
825 :
826 : #ifndef SWIG_PYBUFFER_SIZE
827 : # define SWIG_PYBUFFER_SIZE 1024
828 : #endif
829 :
830 : static PyObject *
831 : PyString_FromFormat(const char *fmt, ...) {
832 : va_list ap;
833 : char buf[SWIG_PYBUFFER_SIZE * 2];
834 : int res;
835 : va_start(ap, fmt);
836 : res = vsnprintf(buf, sizeof(buf), fmt, ap);
837 : va_end(ap);
838 : return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
839 : }
840 : #endif
841 :
842 : /* Add PyObject_Del for old Pythons */
843 : #if PY_VERSION_HEX < 0x01060000
844 : # define PyObject_Del(op) PyMem_DEL((op))
845 : #endif
846 : #ifndef PyObject_DEL
847 : # define PyObject_DEL PyObject_Del
848 : #endif
849 :
850 : /* A crude PyExc_StopIteration exception for old Pythons */
851 : #if PY_VERSION_HEX < 0x02020000
852 : # ifndef PyExc_StopIteration
853 : # define PyExc_StopIteration PyExc_RuntimeError
854 : # endif
855 : # ifndef PyObject_GenericGetAttr
856 : # define PyObject_GenericGetAttr 0
857 : # endif
858 : #endif
859 :
860 : /* Py_NotImplemented is defined in 2.1 and up. */
861 : #if PY_VERSION_HEX < 0x02010000
862 : # ifndef Py_NotImplemented
863 : # define Py_NotImplemented PyExc_RuntimeError
864 : # endif
865 : #endif
866 :
867 : /* A crude PyString_AsStringAndSize implementation for old Pythons */
868 : #if PY_VERSION_HEX < 0x02010000
869 : # ifndef PyString_AsStringAndSize
870 : # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
871 : # endif
872 : #endif
873 :
874 : /* PySequence_Size for old Pythons */
875 : #if PY_VERSION_HEX < 0x02000000
876 : # ifndef PySequence_Size
877 : # define PySequence_Size PySequence_Length
878 : # endif
879 : #endif
880 :
881 : /* PyBool_FromLong for old Pythons */
882 : #if PY_VERSION_HEX < 0x02030000
883 : static
884 : PyObject *PyBool_FromLong(long ok)
885 : {
886 : PyObject *result = ok ? Py_True : Py_False;
887 : Py_INCREF(result);
888 : return result;
889 : }
890 : #endif
891 :
892 : /* Py_ssize_t for old Pythons */
893 : /* This code is as recommended by: */
894 : /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
895 : #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
896 : typedef int Py_ssize_t;
897 : # define PY_SSIZE_T_MAX INT_MAX
898 : # define PY_SSIZE_T_MIN INT_MIN
899 : #endif
900 :
901 : /* -----------------------------------------------------------------------------
902 : * error manipulation
903 : * ----------------------------------------------------------------------------- */
904 :
905 : SWIGRUNTIME PyObject*
906 0 : SWIG_Python_ErrorType(int code) {
907 0 : PyObject* type = 0;
908 0 : switch(code) {
909 : case SWIG_MemoryError:
910 0 : type = PyExc_MemoryError;
911 0 : break;
912 : case SWIG_IOError:
913 0 : type = PyExc_IOError;
914 0 : break;
915 : case SWIG_RuntimeError:
916 0 : type = PyExc_RuntimeError;
917 0 : break;
918 : case SWIG_IndexError:
919 0 : type = PyExc_IndexError;
920 0 : break;
921 : case SWIG_TypeError:
922 0 : type = PyExc_TypeError;
923 0 : break;
924 : case SWIG_DivisionByZero:
925 0 : type = PyExc_ZeroDivisionError;
926 0 : break;
927 : case SWIG_OverflowError:
928 0 : type = PyExc_OverflowError;
929 0 : break;
930 : case SWIG_SyntaxError:
931 0 : type = PyExc_SyntaxError;
932 0 : break;
933 : case SWIG_ValueError:
934 0 : type = PyExc_ValueError;
935 0 : break;
936 : case SWIG_SystemError:
937 0 : type = PyExc_SystemError;
938 0 : break;
939 : case SWIG_AttributeError:
940 0 : type = PyExc_AttributeError;
941 0 : break;
942 : default:
943 0 : type = PyExc_RuntimeError;
944 : }
945 0 : return type;
946 : }
947 :
948 :
949 : SWIGRUNTIME void
950 : SWIG_Python_AddErrorMsg(const char* mesg)
951 : {
952 : PyObject *type = 0;
953 : PyObject *value = 0;
954 : PyObject *traceback = 0;
955 :
956 : if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
957 : if (value) {
958 : char *tmp;
959 : PyObject *old_str = PyObject_Str(value);
960 : PyErr_Clear();
961 : Py_XINCREF(type);
962 :
963 : PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
964 : SWIG_Python_str_DelForPy3(tmp);
965 : Py_DECREF(old_str);
966 : Py_DECREF(value);
967 : } else {
968 : PyErr_SetString(PyExc_RuntimeError, mesg);
969 : }
970 : }
971 :
972 : #if defined(SWIG_PYTHON_NO_THREADS)
973 : # if defined(SWIG_PYTHON_THREADS)
974 : # undef SWIG_PYTHON_THREADS
975 : # endif
976 : #endif
977 : #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
978 : # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
979 : # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
980 : # define SWIG_PYTHON_USE_GIL
981 : # endif
982 : # endif
983 : # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
984 : # ifndef SWIG_PYTHON_INITIALIZE_THREADS
985 : # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
986 : # endif
987 : # ifdef __cplusplus /* C++ code */
988 : class SWIG_Python_Thread_Block {
989 : bool status;
990 : PyGILState_STATE state;
991 : public:
992 : void end() { if (status) { PyGILState_Release(state); status = false;} }
993 : SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
994 : ~SWIG_Python_Thread_Block() { end(); }
995 : };
996 : class SWIG_Python_Thread_Allow {
997 : bool status;
998 : PyThreadState *save;
999 : public:
1000 : void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
1001 : SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
1002 : ~SWIG_Python_Thread_Allow() { end(); }
1003 : };
1004 : # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
1005 : # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
1006 : # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1007 : # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1008 : # else /* C code */
1009 : # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1010 : # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1011 : # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1012 : # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1013 : # endif
1014 : # else /* Old thread way, not implemented, user must provide it */
1015 : # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1016 : # define SWIG_PYTHON_INITIALIZE_THREADS
1017 : # endif
1018 : # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1019 : # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1020 : # endif
1021 : # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1022 : # define SWIG_PYTHON_THREAD_END_BLOCK
1023 : # endif
1024 : # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1025 : # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1026 : # endif
1027 : # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1028 : # define SWIG_PYTHON_THREAD_END_ALLOW
1029 : # endif
1030 : # endif
1031 : #else /* No thread support */
1032 : # define SWIG_PYTHON_INITIALIZE_THREADS
1033 : # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1034 : # define SWIG_PYTHON_THREAD_END_BLOCK
1035 : # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1036 : # define SWIG_PYTHON_THREAD_END_ALLOW
1037 : #endif
1038 :
1039 : /* -----------------------------------------------------------------------------
1040 : * Python API portion that goes into the runtime
1041 : * ----------------------------------------------------------------------------- */
1042 :
1043 : #ifdef __cplusplus
1044 : extern "C" {
1045 : #if 0
1046 : } /* cc-mode */
1047 : #endif
1048 : #endif
1049 :
1050 : /* -----------------------------------------------------------------------------
1051 : * Constant declarations
1052 : * ----------------------------------------------------------------------------- */
1053 :
1054 : /* Constant Types */
1055 : #define SWIG_PY_POINTER 4
1056 : #define SWIG_PY_BINARY 5
1057 :
1058 : /* Constant information structure */
1059 : typedef struct swig_const_info {
1060 : int type;
1061 : char *name;
1062 : long lvalue;
1063 : double dvalue;
1064 : void *pvalue;
1065 : swig_type_info **ptype;
1066 : } swig_const_info;
1067 :
1068 :
1069 : /* -----------------------------------------------------------------------------
1070 : * Wrapper of PyInstanceMethod_New() used in Python 3
1071 : * It is exported to the generated module, used for -fastproxy
1072 : * ----------------------------------------------------------------------------- */
1073 0 : SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *self, PyObject *func)
1074 : {
1075 : #if PY_VERSION_HEX >= 0x03000000
1076 : return PyInstanceMethod_New(func);
1077 : #else
1078 0 : return NULL;
1079 : #endif
1080 : }
1081 :
1082 : #ifdef __cplusplus
1083 : #if 0
1084 : { /* cc-mode */
1085 : #endif
1086 : }
1087 : #endif
1088 :
1089 :
1090 : /* -----------------------------------------------------------------------------
1091 : * See the LICENSE file for information on copyright, usage and redistribution
1092 : * of SWIG, and the README file for authors - http://www.swig.org/release.html.
1093 : *
1094 : * pyrun.swg
1095 : *
1096 : * This file contains the runtime support for Python modules
1097 : * and includes code for managing global variables and pointer
1098 : * type checking.
1099 : *
1100 : * ----------------------------------------------------------------------------- */
1101 :
1102 : /* Common SWIG API */
1103 :
1104 : /* for raw pointers */
1105 : #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1106 : #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1107 : #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1108 : #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(ptr, type, flags)
1109 : #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1110 : #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1111 : #define swig_owntype int
1112 :
1113 : /* for raw packed data */
1114 : #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1115 : #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1116 :
1117 : /* for class or struct pointers */
1118 : #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1119 : #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1120 :
1121 : /* for C or C++ function pointers */
1122 : #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1123 : #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(ptr, type, 0)
1124 :
1125 : /* for C++ member pointers, ie, member methods */
1126 : #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1127 : #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1128 :
1129 :
1130 : /* Runtime API */
1131 :
1132 : #if PY_VERSION_HEX >= 0x03020000
1133 : #define SWIG_PYTHON_USE_CAPSULE
1134 : #endif
1135 :
1136 : #define SWIG_GetModule(clientdata) SWIG_Python_GetModule()
1137 : #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1138 : #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1139 :
1140 : #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1141 : #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1142 : #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1143 : #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1144 : #define SWIG_fail goto fail
1145 :
1146 :
1147 : /* Runtime API implementation */
1148 :
1149 : /* Error manipulation */
1150 :
1151 : SWIGINTERN void
1152 : SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1153 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1154 : PyErr_SetObject(errtype, obj);
1155 : Py_DECREF(obj);
1156 : SWIG_PYTHON_THREAD_END_BLOCK;
1157 : }
1158 :
1159 : SWIGINTERN void
1160 : SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1161 : SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1162 0 : PyErr_SetString(errtype, (char *) msg);
1163 : SWIG_PYTHON_THREAD_END_BLOCK;
1164 : }
1165 :
1166 : #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1167 :
1168 : /* Set a constant value */
1169 :
1170 : SWIGINTERN void
1171 452 : SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1172 452 : PyDict_SetItemString(d, (char*) name, obj);
1173 452 : Py_DECREF(obj);
1174 452 : }
1175 :
1176 : /* Append a value to the result obj */
1177 :
1178 : SWIGINTERN PyObject*
1179 60648 : SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1180 : #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1181 60648 : if (!result) {
1182 60550 : result = obj;
1183 98 : } else if (result == Py_None) {
1184 83 : Py_DECREF(result);
1185 83 : result = obj;
1186 : } else {
1187 15 : if (!PyList_Check(result)) {
1188 7 : PyObject *o2 = result;
1189 7 : result = PyList_New(1);
1190 7 : PyList_SetItem(result, 0, o2);
1191 : }
1192 15 : PyList_Append(result,obj);
1193 15 : Py_DECREF(obj);
1194 : }
1195 60648 : return result;
1196 : #else
1197 : PyObject* o2;
1198 : PyObject* o3;
1199 : if (!result) {
1200 : result = obj;
1201 : } else if (result == Py_None) {
1202 : Py_DECREF(result);
1203 : result = obj;
1204 : } else {
1205 : if (!PyTuple_Check(result)) {
1206 : o2 = result;
1207 : result = PyTuple_New(1);
1208 : PyTuple_SET_ITEM(result, 0, o2);
1209 : }
1210 : o3 = PyTuple_New(1);
1211 : PyTuple_SET_ITEM(o3, 0, obj);
1212 : o2 = result;
1213 : result = PySequence_Concat(o2, o3);
1214 : Py_DECREF(o2);
1215 : Py_DECREF(o3);
1216 : }
1217 : return result;
1218 : #endif
1219 : }
1220 :
1221 : /* Unpack the argument tuple */
1222 :
1223 : SWIGINTERN int
1224 : SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1225 : {
1226 : if (!args) {
1227 : if (!min && !max) {
1228 : return 1;
1229 : } else {
1230 : PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1231 : name, (min == max ? "" : "at least "), (int)min);
1232 : return 0;
1233 : }
1234 : }
1235 : if (!PyTuple_Check(args)) {
1236 : PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1237 : return 0;
1238 : } else {
1239 : register Py_ssize_t l = PyTuple_GET_SIZE(args);
1240 : if (l < min) {
1241 : PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1242 : name, (min == max ? "" : "at least "), (int)min, (int)l);
1243 : return 0;
1244 : } else if (l > max) {
1245 : PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1246 : name, (min == max ? "" : "at most "), (int)max, (int)l);
1247 : return 0;
1248 : } else {
1249 : register int i;
1250 : for (i = 0; i < l; ++i) {
1251 : objs[i] = PyTuple_GET_ITEM(args, i);
1252 : }
1253 : for (; l < max; ++l) {
1254 : objs[l] = 0;
1255 : }
1256 : return i + 1;
1257 : }
1258 : }
1259 : }
1260 :
1261 : /* A functor is a function object with one single object argument */
1262 : #if PY_VERSION_HEX >= 0x02020000
1263 : #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1264 : #else
1265 : #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
1266 : #endif
1267 :
1268 : /*
1269 : Helper for static pointer initialization for both C and C++ code, for example
1270 : static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1271 : */
1272 : #ifdef __cplusplus
1273 : #define SWIG_STATIC_POINTER(var) var
1274 : #else
1275 : #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1276 : #endif
1277 :
1278 : /* -----------------------------------------------------------------------------
1279 : * Pointer declarations
1280 : * ----------------------------------------------------------------------------- */
1281 :
1282 : /* Flags for new pointer objects */
1283 : #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1284 : #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1285 :
1286 : #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1287 :
1288 : #ifdef __cplusplus
1289 : extern "C" {
1290 : #if 0
1291 : } /* cc-mode */
1292 : #endif
1293 : #endif
1294 :
1295 : /* How to access Py_None */
1296 : #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1297 : # ifndef SWIG_PYTHON_NO_BUILD_NONE
1298 : # ifndef SWIG_PYTHON_BUILD_NONE
1299 : # define SWIG_PYTHON_BUILD_NONE
1300 : # endif
1301 : # endif
1302 : #endif
1303 :
1304 : #ifdef SWIG_PYTHON_BUILD_NONE
1305 : # ifdef Py_None
1306 : # undef Py_None
1307 : # define Py_None SWIG_Py_None()
1308 : # endif
1309 : SWIGRUNTIMEINLINE PyObject *
1310 : _SWIG_Py_None(void)
1311 : {
1312 : PyObject *none = Py_BuildValue((char*)"");
1313 : Py_DECREF(none);
1314 : return none;
1315 : }
1316 : SWIGRUNTIME PyObject *
1317 : SWIG_Py_None(void)
1318 : {
1319 : static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1320 : return none;
1321 : }
1322 : #endif
1323 :
1324 : /* The python void return value */
1325 :
1326 : SWIGRUNTIMEINLINE PyObject *
1327 : SWIG_Py_Void(void)
1328 : {
1329 48873 : PyObject *none = Py_None;
1330 48873 : Py_INCREF(none);
1331 48873 : return none;
1332 : }
1333 :
1334 : /* SwigPyClientData */
1335 :
1336 : typedef struct {
1337 : PyObject *klass;
1338 : PyObject *newraw;
1339 : PyObject *newargs;
1340 : PyObject *destroy;
1341 : int delargs;
1342 : int implicitconv;
1343 : } SwigPyClientData;
1344 :
1345 : SWIGRUNTIMEINLINE int
1346 : SWIG_Python_CheckImplicit(swig_type_info *ty)
1347 : {
1348 : SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
1349 : return data ? data->implicitconv : 0;
1350 : }
1351 :
1352 : SWIGRUNTIMEINLINE PyObject *
1353 : SWIG_Python_ExceptionType(swig_type_info *desc) {
1354 : SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1355 : PyObject *klass = data ? data->klass : 0;
1356 : return (klass ? klass : PyExc_RuntimeError);
1357 : }
1358 :
1359 :
1360 : SWIGRUNTIME SwigPyClientData *
1361 8 : SwigPyClientData_New(PyObject* obj)
1362 : {
1363 8 : if (!obj) {
1364 0 : return 0;
1365 : } else {
1366 8 : SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1367 : /* the klass element */
1368 8 : data->klass = obj;
1369 8 : Py_INCREF(data->klass);
1370 : /* the newraw method and newargs arguments used to create a new raw instance */
1371 8 : if (PyClass_Check(obj)) {
1372 0 : data->newraw = 0;
1373 0 : data->newargs = obj;
1374 0 : Py_INCREF(obj);
1375 : } else {
1376 : #if (PY_VERSION_HEX < 0x02020000)
1377 : data->newraw = 0;
1378 : #else
1379 8 : data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
1380 : #endif
1381 8 : if (data->newraw) {
1382 8 : Py_INCREF(data->newraw);
1383 8 : data->newargs = PyTuple_New(1);
1384 8 : PyTuple_SetItem(data->newargs, 0, obj);
1385 : } else {
1386 0 : data->newargs = obj;
1387 : }
1388 8 : Py_INCREF(data->newargs);
1389 : }
1390 : /* the destroy method, aka as the C++ delete method */
1391 8 : data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
1392 8 : if (PyErr_Occurred()) {
1393 0 : PyErr_Clear();
1394 0 : data->destroy = 0;
1395 : }
1396 8 : if (data->destroy) {
1397 : int flags;
1398 8 : Py_INCREF(data->destroy);
1399 8 : flags = PyCFunction_GET_FLAGS(data->destroy);
1400 : #ifdef METH_O
1401 8 : data->delargs = !(flags & (METH_O));
1402 : #else
1403 : data->delargs = 0;
1404 : #endif
1405 : } else {
1406 0 : data->delargs = 0;
1407 : }
1408 8 : data->implicitconv = 0;
1409 8 : return data;
1410 : }
1411 : }
1412 :
1413 : SWIGRUNTIME void
1414 : SwigPyClientData_Del(SwigPyClientData* data)
1415 : {
1416 0 : Py_XDECREF(data->newraw);
1417 0 : Py_XDECREF(data->newargs);
1418 0 : Py_XDECREF(data->destroy);
1419 : }
1420 :
1421 : /* =============== SwigPyObject =====================*/
1422 :
1423 : typedef struct {
1424 : PyObject_HEAD
1425 : void *ptr;
1426 : swig_type_info *ty;
1427 : int own;
1428 : PyObject *next;
1429 : } SwigPyObject;
1430 :
1431 : SWIGRUNTIME PyObject *
1432 0 : SwigPyObject_long(SwigPyObject *v)
1433 : {
1434 0 : return PyLong_FromVoidPtr(v->ptr);
1435 : }
1436 :
1437 : SWIGRUNTIME PyObject *
1438 0 : SwigPyObject_format(const char* fmt, SwigPyObject *v)
1439 : {
1440 0 : PyObject *res = NULL;
1441 0 : PyObject *args = PyTuple_New(1);
1442 0 : if (args) {
1443 0 : if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1444 0 : PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1445 0 : if (ofmt) {
1446 : #if PY_VERSION_HEX >= 0x03000000
1447 : res = PyUnicode_Format(ofmt,args);
1448 : #else
1449 0 : res = PyString_Format(ofmt,args);
1450 : #endif
1451 0 : Py_DECREF(ofmt);
1452 : }
1453 0 : Py_DECREF(args);
1454 : }
1455 : }
1456 0 : return res;
1457 : }
1458 :
1459 : SWIGRUNTIME PyObject *
1460 0 : SwigPyObject_oct(SwigPyObject *v)
1461 : {
1462 0 : return SwigPyObject_format("%o",v);
1463 : }
1464 :
1465 : SWIGRUNTIME PyObject *
1466 0 : SwigPyObject_hex(SwigPyObject *v)
1467 : {
1468 0 : return SwigPyObject_format("%x",v);
1469 : }
1470 :
1471 : SWIGRUNTIME PyObject *
1472 : #ifdef METH_NOARGS
1473 0 : SwigPyObject_repr(SwigPyObject *v)
1474 : #else
1475 : SwigPyObject_repr(SwigPyObject *v, PyObject *args)
1476 : #endif
1477 : {
1478 0 : const char *name = SWIG_TypePrettyName(v->ty);
1479 0 : PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", name, v);
1480 0 : if (v->next) {
1481 : #ifdef METH_NOARGS
1482 0 : PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1483 : #else
1484 : PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
1485 : #endif
1486 : #if PY_VERSION_HEX >= 0x03000000
1487 : PyObject *joined = PyUnicode_Concat(repr, nrep);
1488 : Py_DecRef(repr);
1489 : Py_DecRef(nrep);
1490 : repr = joined;
1491 : #else
1492 0 : PyString_ConcatAndDel(&repr,nrep);
1493 : #endif
1494 : }
1495 0 : return repr;
1496 : }
1497 :
1498 : SWIGRUNTIME int
1499 0 : SwigPyObject_print(SwigPyObject *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1500 : {
1501 : char *str;
1502 : #ifdef METH_NOARGS
1503 0 : PyObject *repr = SwigPyObject_repr(v);
1504 : #else
1505 : PyObject *repr = SwigPyObject_repr(v, NULL);
1506 : #endif
1507 0 : if (repr) {
1508 0 : str = SWIG_Python_str_AsChar(repr);
1509 0 : fputs(str, fp);
1510 : SWIG_Python_str_DelForPy3(str);
1511 0 : Py_DECREF(repr);
1512 0 : return 0;
1513 : } else {
1514 0 : return 1;
1515 : }
1516 : }
1517 :
1518 : SWIGRUNTIME PyObject *
1519 0 : SwigPyObject_str(SwigPyObject *v)
1520 : {
1521 : char result[SWIG_BUFFER_SIZE];
1522 : return SWIG_PackVoidPtr(result, v->ptr, v->ty->name, sizeof(result)) ?
1523 0 : SWIG_Python_str_FromChar(result) : 0;
1524 : }
1525 :
1526 : SWIGRUNTIME int
1527 0 : SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
1528 : {
1529 0 : void *i = v->ptr;
1530 0 : void *j = w->ptr;
1531 0 : return (i < j) ? -1 : ((i > j) ? 1 : 0);
1532 : }
1533 :
1534 : /* Added for Python 3.x, would it also be useful for Python 2.x? */
1535 : SWIGRUNTIME PyObject*
1536 0 : SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
1537 : {
1538 : PyObject* res;
1539 0 : if( op != Py_EQ && op != Py_NE ) {
1540 0 : Py_INCREF(Py_NotImplemented);
1541 0 : return Py_NotImplemented;
1542 : }
1543 0 : if( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) )
1544 0 : res = Py_True;
1545 : else
1546 0 : res = Py_False;
1547 0 : Py_INCREF(res);
1548 0 : return res;
1549 : }
1550 :
1551 :
1552 : SWIGRUNTIME PyTypeObject* _PySwigObject_type(void);
1553 :
1554 : SWIGRUNTIME PyTypeObject*
1555 640649 : SwigPyObject_type(void) {
1556 640649 : static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigObject_type();
1557 640649 : return type;
1558 : }
1559 :
1560 : SWIGRUNTIMEINLINE int
1561 464213 : SwigPyObject_Check(PyObject *op) {
1562 : return (Py_TYPE(op) == SwigPyObject_type())
1563 464213 : || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1564 : }
1565 :
1566 : SWIGRUNTIME PyObject *
1567 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1568 :
1569 : SWIGRUNTIME void
1570 88218 : SwigPyObject_dealloc(PyObject *v)
1571 : {
1572 88218 : SwigPyObject *sobj = (SwigPyObject *) v;
1573 88218 : PyObject *next = sobj->next;
1574 88218 : if (sobj->own == SWIG_POINTER_OWN) {
1575 44109 : swig_type_info *ty = sobj->ty;
1576 44109 : SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1577 44109 : PyObject *destroy = data ? data->destroy : 0;
1578 44109 : if (destroy) {
1579 : /* destroy is always a VARARGS method */
1580 : PyObject *res;
1581 44109 : if (data->delargs) {
1582 : /* we need to create a temporary object to carry the destroy operation */
1583 44109 : PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1584 44109 : res = SWIG_Python_CallFunctor(destroy, tmp);
1585 44109 : Py_DECREF(tmp);
1586 : } else {
1587 0 : PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1588 0 : PyObject *mself = PyCFunction_GET_SELF(destroy);
1589 0 : res = ((*meth)(mself, v));
1590 : }
1591 44109 : Py_XDECREF(res);
1592 : }
1593 : #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1594 : else {
1595 0 : const char *name = SWIG_TypePrettyName(ty);
1596 0 : printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1597 : }
1598 : #endif
1599 : }
1600 88218 : Py_XDECREF(next);
1601 88218 : PyObject_DEL(v);
1602 88218 : }
1603 :
1604 : SWIGRUNTIME PyObject*
1605 0 : SwigPyObject_append(PyObject* v, PyObject* next)
1606 : {
1607 0 : SwigPyObject *sobj = (SwigPyObject *) v;
1608 : #ifndef METH_O
1609 : PyObject *tmp = 0;
1610 : if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
1611 : next = tmp;
1612 : #endif
1613 0 : if (!SwigPyObject_Check(next)) {
1614 0 : return NULL;
1615 : }
1616 0 : sobj->next = next;
1617 0 : Py_INCREF(next);
1618 0 : return SWIG_Py_Void();
1619 : }
1620 :
1621 : SWIGRUNTIME PyObject*
1622 : #ifdef METH_NOARGS
1623 0 : SwigPyObject_next(PyObject* v)
1624 : #else
1625 : SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1626 : #endif
1627 : {
1628 0 : SwigPyObject *sobj = (SwigPyObject *) v;
1629 0 : if (sobj->next) {
1630 0 : Py_INCREF(sobj->next);
1631 0 : return sobj->next;
1632 : } else {
1633 0 : return SWIG_Py_Void();
1634 : }
1635 : }
1636 :
1637 : SWIGINTERN PyObject*
1638 : #ifdef METH_NOARGS
1639 0 : SwigPyObject_disown(PyObject *v)
1640 : #else
1641 : SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1642 : #endif
1643 : {
1644 0 : SwigPyObject *sobj = (SwigPyObject *)v;
1645 0 : sobj->own = 0;
1646 0 : return SWIG_Py_Void();
1647 : }
1648 :
1649 : SWIGINTERN PyObject*
1650 : #ifdef METH_NOARGS
1651 0 : SwigPyObject_acquire(PyObject *v)
1652 : #else
1653 : SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1654 : #endif
1655 : {
1656 0 : SwigPyObject *sobj = (SwigPyObject *)v;
1657 0 : sobj->own = SWIG_POINTER_OWN;
1658 0 : return SWIG_Py_Void();
1659 : }
1660 :
1661 : SWIGINTERN PyObject*
1662 0 : SwigPyObject_own(PyObject *v, PyObject *args)
1663 : {
1664 0 : PyObject *val = 0;
1665 : #if (PY_VERSION_HEX < 0x02020000)
1666 : if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
1667 : #else
1668 0 : if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
1669 : #endif
1670 : {
1671 0 : return NULL;
1672 : }
1673 : else
1674 : {
1675 0 : SwigPyObject *sobj = (SwigPyObject *)v;
1676 0 : PyObject *obj = PyBool_FromLong(sobj->own);
1677 0 : if (val) {
1678 : #ifdef METH_NOARGS
1679 0 : if (PyObject_IsTrue(val)) {
1680 : SwigPyObject_acquire(v);
1681 : } else {
1682 : SwigPyObject_disown(v);
1683 : }
1684 : #else
1685 : if (PyObject_IsTrue(val)) {
1686 : SwigPyObject_acquire(v,args);
1687 : } else {
1688 : SwigPyObject_disown(v,args);
1689 : }
1690 : #endif
1691 : }
1692 0 : return obj;
1693 : }
1694 : }
1695 :
1696 : #ifdef METH_O
1697 : static PyMethodDef
1698 : swigobject_methods[] = {
1699 : {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
1700 : {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"aquires ownership of the pointer"},
1701 : {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1702 : {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
1703 : {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
1704 : {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
1705 : {0, 0, 0, 0}
1706 : };
1707 : #else
1708 : static PyMethodDef
1709 : swigobject_methods[] = {
1710 : {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
1711 : {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
1712 : {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1713 : {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
1714 : {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
1715 : {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
1716 : {0, 0, 0, 0}
1717 : };
1718 : #endif
1719 :
1720 : #if PY_VERSION_HEX < 0x02020000
1721 : SWIGINTERN PyObject *
1722 : SwigPyObject_getattr(SwigPyObject *sobj,char *name)
1723 : {
1724 : return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1725 : }
1726 : #endif
1727 :
1728 : SWIGRUNTIME PyTypeObject*
1729 2 : _PySwigObject_type(void) {
1730 : static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1731 :
1732 : static PyNumberMethods SwigPyObject_as_number = {
1733 : (binaryfunc)0, /*nb_add*/
1734 : (binaryfunc)0, /*nb_subtract*/
1735 : (binaryfunc)0, /*nb_multiply*/
1736 : /* nb_divide removed in Python 3 */
1737 : #if PY_VERSION_HEX < 0x03000000
1738 : (binaryfunc)0, /*nb_divide*/
1739 : #endif
1740 : (binaryfunc)0, /*nb_remainder*/
1741 : (binaryfunc)0, /*nb_divmod*/
1742 : (ternaryfunc)0,/*nb_power*/
1743 : (unaryfunc)0, /*nb_negative*/
1744 : (unaryfunc)0, /*nb_positive*/
1745 : (unaryfunc)0, /*nb_absolute*/
1746 : (inquiry)0, /*nb_nonzero*/
1747 : 0, /*nb_invert*/
1748 : 0, /*nb_lshift*/
1749 : 0, /*nb_rshift*/
1750 : 0, /*nb_and*/
1751 : 0, /*nb_xor*/
1752 : 0, /*nb_or*/
1753 : #if PY_VERSION_HEX < 0x03000000
1754 : 0, /*nb_coerce*/
1755 : #endif
1756 : (unaryfunc)SwigPyObject_long, /*nb_int*/
1757 : #if PY_VERSION_HEX < 0x03000000
1758 : (unaryfunc)SwigPyObject_long, /*nb_long*/
1759 : #else
1760 : 0, /*nb_reserved*/
1761 : #endif
1762 : (unaryfunc)0, /*nb_float*/
1763 : #if PY_VERSION_HEX < 0x03000000
1764 : (unaryfunc)SwigPyObject_oct, /*nb_oct*/
1765 : (unaryfunc)SwigPyObject_hex, /*nb_hex*/
1766 : #endif
1767 : #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1768 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1769 : #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
1770 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1771 : #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
1772 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1773 : #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
1774 : 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1775 : #endif
1776 : };
1777 :
1778 : static PyTypeObject swigpyobject_type;
1779 : static int type_init = 0;
1780 2 : if (!type_init) {
1781 : const PyTypeObject tmp
1782 : = {
1783 : /* PyObject header changed in Python 3 */
1784 : #if PY_VERSION_HEX >= 0x03000000
1785 : PyVarObject_HEAD_INIT(&PyType_Type, 0)
1786 : #else
1787 : PyObject_HEAD_INIT(NULL)
1788 : 0, /* ob_size */
1789 : #endif
1790 : (char *)"SwigPyObject", /* tp_name */
1791 : sizeof(SwigPyObject), /* tp_basicsize */
1792 : 0, /* tp_itemsize */
1793 : (destructor)SwigPyObject_dealloc, /* tp_dealloc */
1794 : (printfunc)SwigPyObject_print, /* tp_print */
1795 : #if PY_VERSION_HEX < 0x02020000
1796 : (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
1797 : #else
1798 : (getattrfunc)0, /* tp_getattr */
1799 : #endif
1800 : (setattrfunc)0, /* tp_setattr */
1801 : #if PY_VERSION_HEX >= 0x03000000
1802 : 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1803 : #else
1804 : (cmpfunc)SwigPyObject_compare, /* tp_compare */
1805 : #endif
1806 : (reprfunc)SwigPyObject_repr, /* tp_repr */
1807 : &SwigPyObject_as_number, /* tp_as_number */
1808 : 0, /* tp_as_sequence */
1809 : 0, /* tp_as_mapping */
1810 : (hashfunc)0, /* tp_hash */
1811 : (ternaryfunc)0, /* tp_call */
1812 : (reprfunc)SwigPyObject_str, /* tp_str */
1813 : PyObject_GenericGetAttr, /* tp_getattro */
1814 : 0, /* tp_setattro */
1815 : 0, /* tp_as_buffer */
1816 : Py_TPFLAGS_DEFAULT, /* tp_flags */
1817 : swigobject_doc, /* tp_doc */
1818 : 0, /* tp_traverse */
1819 : 0, /* tp_clear */
1820 : (richcmpfunc)SwigPyObject_richcompare, /* tp_richcompare */
1821 : 0, /* tp_weaklistoffset */
1822 : #if PY_VERSION_HEX >= 0x02020000
1823 : 0, /* tp_iter */
1824 : 0, /* tp_iternext */
1825 : swigobject_methods, /* tp_methods */
1826 : 0, /* tp_members */
1827 : 0, /* tp_getset */
1828 : 0, /* tp_base */
1829 : 0, /* tp_dict */
1830 : 0, /* tp_descr_get */
1831 : 0, /* tp_descr_set */
1832 : 0, /* tp_dictoffset */
1833 : 0, /* tp_init */
1834 : 0, /* tp_alloc */
1835 : 0, /* tp_new */
1836 : 0, /* tp_free */
1837 : 0, /* tp_is_gc */
1838 : 0, /* tp_bases */
1839 : 0, /* tp_mro */
1840 : 0, /* tp_cache */
1841 : 0, /* tp_subclasses */
1842 : 0, /* tp_weaklist */
1843 : #endif
1844 : #if PY_VERSION_HEX >= 0x02030000
1845 : 0, /* tp_del */
1846 : #endif
1847 : #ifdef COUNT_ALLOCS
1848 : 0,0,0,0 /* tp_alloc -> tp_next */
1849 : #endif
1850 2 : };
1851 2 : swigpyobject_type = tmp;
1852 : /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
1853 : #if PY_VERSION_HEX < 0x03000000
1854 2 : swigpyobject_type.ob_type = &PyType_Type;
1855 : #endif
1856 2 : type_init = 1;
1857 : }
1858 2 : return &swigpyobject_type;
1859 : }
1860 :
1861 : SWIGRUNTIME PyObject *
1862 88218 : SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
1863 : {
1864 88218 : SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
1865 88218 : if (sobj) {
1866 88218 : sobj->ptr = ptr;
1867 88218 : sobj->ty = ty;
1868 88218 : sobj->own = own;
1869 88218 : sobj->next = 0;
1870 : }
1871 88218 : return (PyObject *)sobj;
1872 : }
1873 :
1874 : /* -----------------------------------------------------------------------------
1875 : * Implements a simple Swig Packed type, and use it instead of string
1876 : * ----------------------------------------------------------------------------- */
1877 :
1878 : typedef struct {
1879 : PyObject_HEAD
1880 : void *pack;
1881 : swig_type_info *ty;
1882 : size_t size;
1883 : } SwigPyPacked;
1884 :
1885 : SWIGRUNTIME int
1886 0 : SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
1887 : {
1888 : char result[SWIG_BUFFER_SIZE];
1889 0 : fputs("<Swig Packed ", fp);
1890 0 : if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1891 0 : fputs("at ", fp);
1892 0 : fputs(result, fp);
1893 : }
1894 0 : fputs(v->ty->name,fp);
1895 0 : fputs(">", fp);
1896 0 : return 0;
1897 : }
1898 :
1899 : SWIGRUNTIME PyObject *
1900 0 : SwigPyPacked_repr(SwigPyPacked *v)
1901 : {
1902 : char result[SWIG_BUFFER_SIZE];
1903 0 : if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
1904 0 : return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
1905 : } else {
1906 0 : return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
1907 : }
1908 : }
1909 :
1910 : SWIGRUNTIME PyObject *
1911 0 : SwigPyPacked_str(SwigPyPacked *v)
1912 : {
1913 : char result[SWIG_BUFFER_SIZE];
1914 0 : if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
1915 0 : return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
1916 : } else {
1917 0 : return SWIG_Python_str_FromChar(v->ty->name);
1918 : }
1919 : }
1920 :
1921 : SWIGRUNTIME int
1922 0 : SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
1923 : {
1924 0 : size_t i = v->size;
1925 0 : size_t j = w->size;
1926 0 : int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
1927 0 : return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
1928 : }
1929 :
1930 : SWIGRUNTIME PyTypeObject* _PySwigPacked_type(void);
1931 :
1932 : SWIGRUNTIME PyTypeObject*
1933 0 : SwigPyPacked_type(void) {
1934 0 : static PyTypeObject *SWIG_STATIC_POINTER(type) = _PySwigPacked_type();
1935 0 : return type;
1936 : }
1937 :
1938 : SWIGRUNTIMEINLINE int
1939 : SwigPyPacked_Check(PyObject *op) {
1940 : return ((op)->ob_type == _PySwigPacked_type())
1941 0 : || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
1942 : }
1943 :
1944 : SWIGRUNTIME void
1945 0 : SwigPyPacked_dealloc(PyObject *v)
1946 : {
1947 0 : if (SwigPyPacked_Check(v)) {
1948 0 : SwigPyPacked *sobj = (SwigPyPacked *) v;
1949 0 : free(sobj->pack);
1950 : }
1951 0 : PyObject_DEL(v);
1952 0 : }
1953 :
1954 : SWIGRUNTIME PyTypeObject*
1955 0 : _PySwigPacked_type(void) {
1956 : static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
1957 : static PyTypeObject swigpypacked_type;
1958 : static int type_init = 0;
1959 0 : if (!type_init) {
1960 : const PyTypeObject tmp
1961 : = {
1962 : /* PyObject header changed in Python 3 */
1963 : #if PY_VERSION_HEX>=0x03000000
1964 : PyVarObject_HEAD_INIT(&PyType_Type, 0)
1965 : #else
1966 : PyObject_HEAD_INIT(NULL)
1967 : 0, /* ob_size */
1968 : #endif
1969 : (char *)"SwigPyPacked", /* tp_name */
1970 : sizeof(SwigPyPacked), /* tp_basicsize */
1971 : 0, /* tp_itemsize */
1972 : (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
1973 : (printfunc)SwigPyPacked_print, /* tp_print */
1974 : (getattrfunc)0, /* tp_getattr */
1975 : (setattrfunc)0, /* tp_setattr */
1976 : #if PY_VERSION_HEX>=0x03000000
1977 : 0, /* tp_reserved in 3.0.1 */
1978 : #else
1979 : (cmpfunc)SwigPyPacked_compare, /* tp_compare */
1980 : #endif
1981 : (reprfunc)SwigPyPacked_repr, /* tp_repr */
1982 : 0, /* tp_as_number */
1983 : 0, /* tp_as_sequence */
1984 : 0, /* tp_as_mapping */
1985 : (hashfunc)0, /* tp_hash */
1986 : (ternaryfunc)0, /* tp_call */
1987 : (reprfunc)SwigPyPacked_str, /* tp_str */
1988 : PyObject_GenericGetAttr, /* tp_getattro */
1989 : 0, /* tp_setattro */
1990 : 0, /* tp_as_buffer */
1991 : Py_TPFLAGS_DEFAULT, /* tp_flags */
1992 : swigpacked_doc, /* tp_doc */
1993 : 0, /* tp_traverse */
1994 : 0, /* tp_clear */
1995 : 0, /* tp_richcompare */
1996 : 0, /* tp_weaklistoffset */
1997 : #if PY_VERSION_HEX >= 0x02020000
1998 : 0, /* tp_iter */
1999 : 0, /* tp_iternext */
2000 : 0, /* tp_methods */
2001 : 0, /* tp_members */
2002 : 0, /* tp_getset */
2003 : 0, /* tp_base */
2004 : 0, /* tp_dict */
2005 : 0, /* tp_descr_get */
2006 : 0, /* tp_descr_set */
2007 : 0, /* tp_dictoffset */
2008 : 0, /* tp_init */
2009 : 0, /* tp_alloc */
2010 : 0, /* tp_new */
2011 : 0, /* tp_free */
2012 : 0, /* tp_is_gc */
2013 : 0, /* tp_bases */
2014 : 0, /* tp_mro */
2015 : 0, /* tp_cache */
2016 : 0, /* tp_subclasses */
2017 : 0, /* tp_weaklist */
2018 : #endif
2019 : #if PY_VERSION_HEX >= 0x02030000
2020 : 0, /* tp_del */
2021 : #endif
2022 : #ifdef COUNT_ALLOCS
2023 : 0,0,0,0 /* tp_alloc -> tp_next */
2024 : #endif
2025 0 : };
2026 0 : swigpypacked_type = tmp;
2027 : /* for Python 3 the ob_type already assigned in PyVarObject_HEAD_INIT() */
2028 : #if PY_VERSION_HEX < 0x03000000
2029 0 : swigpypacked_type.ob_type = &PyType_Type;
2030 : #endif
2031 0 : type_init = 1;
2032 : }
2033 0 : return &swigpypacked_type;
2034 : }
2035 :
2036 : SWIGRUNTIME PyObject *
2037 0 : SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
2038 : {
2039 0 : SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
2040 0 : if (sobj) {
2041 0 : void *pack = malloc(size);
2042 0 : if (pack) {
2043 : memcpy(pack, ptr, size);
2044 0 : sobj->pack = pack;
2045 0 : sobj->ty = ty;
2046 0 : sobj->size = size;
2047 : } else {
2048 0 : PyObject_DEL((PyObject *) sobj);
2049 0 : sobj = 0;
2050 : }
2051 : }
2052 0 : return (PyObject *) sobj;
2053 : }
2054 :
2055 : SWIGRUNTIME swig_type_info *
2056 : SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
2057 : {
2058 : if (SwigPyPacked_Check(obj)) {
2059 : SwigPyPacked *sobj = (SwigPyPacked *)obj;
2060 : if (sobj->size != size) return 0;
2061 : memcpy(ptr, sobj->pack, size);
2062 : return sobj->ty;
2063 : } else {
2064 : return 0;
2065 : }
2066 : }
2067 :
2068 : /* -----------------------------------------------------------------------------
2069 : * pointers/data manipulation
2070 : * ----------------------------------------------------------------------------- */
2071 :
2072 : SWIGRUNTIMEINLINE PyObject *
2073 : _SWIG_This(void)
2074 : {
2075 2 : return SWIG_Python_str_FromChar("this");
2076 : }
2077 :
2078 : SWIGRUNTIME PyObject *
2079 238479 : SWIG_This(void)
2080 : {
2081 238481 : static PyObject *SWIG_STATIC_POINTER(swig_this) = _SWIG_This();
2082 238479 : return swig_this;
2083 : }
2084 :
2085 : /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
2086 :
2087 : /* TODO: I don't know how to implement the fast getset in Python 3 right now */
2088 : #if PY_VERSION_HEX>=0x03000000
2089 : #define SWIG_PYTHON_SLOW_GETSET_THIS
2090 : #endif
2091 :
2092 : SWIGRUNTIME SwigPyObject *
2093 254242 : SWIG_Python_GetSwigThis(PyObject *pyobj)
2094 : {
2095 254242 : if (SwigPyObject_Check(pyobj)) {
2096 44271 : return (SwigPyObject *) pyobj;
2097 : } else {
2098 209971 : PyObject *obj = 0;
2099 : #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
2100 209971 : if (PyInstance_Check(pyobj)) {
2101 0 : obj = _PyInstance_Lookup(pyobj, SWIG_This());
2102 : } else {
2103 209971 : PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2104 209971 : if (dictptr != NULL) {
2105 209971 : PyObject *dict = *dictptr;
2106 209971 : obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2107 : } else {
2108 : #ifdef PyWeakref_CheckProxy
2109 0 : if (PyWeakref_CheckProxy(pyobj)) {
2110 0 : PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2111 0 : return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2112 : }
2113 : #endif
2114 0 : obj = PyObject_GetAttr(pyobj,SWIG_This());
2115 0 : if (obj) {
2116 0 : Py_DECREF(obj);
2117 : } else {
2118 0 : if (PyErr_Occurred()) PyErr_Clear();
2119 0 : return 0;
2120 : }
2121 : }
2122 : }
2123 : #else
2124 : obj = PyObject_GetAttr(pyobj,SWIG_This());
2125 : if (obj) {
2126 : Py_DECREF(obj);
2127 : } else {
2128 : if (PyErr_Occurred()) PyErr_Clear();
2129 : return 0;
2130 : }
2131 : #endif
2132 209971 : if (obj && !SwigPyObject_Check(obj)) {
2133 : /* a PyObject is called 'this', try to get the 'real this'
2134 : SwigPyObject from it */
2135 0 : return SWIG_Python_GetSwigThis(obj);
2136 : }
2137 209971 : return (SwigPyObject *)obj;
2138 : }
2139 : }
2140 :
2141 : /* Acquire a pointer value */
2142 :
2143 : SWIGRUNTIME int
2144 : SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2145 : if (own == SWIG_POINTER_OWN) {
2146 : SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
2147 : if (sobj) {
2148 : int oldown = sobj->own;
2149 : sobj->own = own;
2150 : return oldown;
2151 : }
2152 : }
2153 : return 0;
2154 : }
2155 :
2156 : /* Convert a pointer value */
2157 :
2158 : SWIGRUNTIME int
2159 254242 : SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2160 254242 : if (!obj) return SWIG_ERROR;
2161 254242 : if (obj == Py_None) {
2162 0 : if (ptr) *ptr = 0;
2163 0 : return SWIG_OK;
2164 : } else {
2165 254242 : SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
2166 254242 : if (own)
2167 0 : *own = 0;
2168 254242 : while (sobj) {
2169 254242 : void *vptr = sobj->ptr;
2170 254242 : if (ty) {
2171 254242 : swig_type_info *to = sobj->ty;
2172 254242 : if (to == ty) {
2173 : /* no type cast needed */
2174 254242 : if (ptr) *ptr = vptr;
2175 : break;
2176 : } else {
2177 0 : swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2178 0 : if (!tc) {
2179 0 : sobj = (SwigPyObject *)sobj->next;
2180 : } else {
2181 0 : if (ptr) {
2182 0 : int newmemory = 0;
2183 0 : *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2184 0 : if (newmemory == SWIG_CAST_NEW_MEMORY) {
2185 : assert(own);
2186 0 : if (own)
2187 0 : *own = *own | SWIG_CAST_NEW_MEMORY;
2188 : }
2189 : }
2190 : break;
2191 : }
2192 : }
2193 : } else {
2194 0 : if (ptr) *ptr = vptr;
2195 : break;
2196 : }
2197 : }
2198 254242 : if (sobj) {
2199 254242 : if (own)
2200 0 : *own = *own | sobj->own;
2201 254242 : if (flags & SWIG_POINTER_DISOWN) {
2202 44271 : sobj->own = 0;
2203 : }
2204 254242 : return SWIG_OK;
2205 : } else {
2206 0 : int res = SWIG_ERROR;
2207 0 : if (flags & SWIG_POINTER_IMPLICIT_CONV) {
2208 0 : SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2209 0 : if (data && !data->implicitconv) {
2210 0 : PyObject *klass = data->klass;
2211 0 : if (klass) {
2212 : PyObject *impconv;
2213 0 : data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2214 0 : impconv = SWIG_Python_CallFunctor(klass, obj);
2215 0 : data->implicitconv = 0;
2216 0 : if (PyErr_Occurred()) {
2217 0 : PyErr_Clear();
2218 0 : impconv = 0;
2219 : }
2220 0 : if (impconv) {
2221 0 : SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2222 0 : if (iobj) {
2223 : void *vptr;
2224 0 : res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2225 0 : if (SWIG_IsOK(res)) {
2226 0 : if (ptr) {
2227 0 : *ptr = vptr;
2228 : /* transfer the ownership to 'ptr' */
2229 0 : iobj->own = 0;
2230 0 : res = SWIG_AddCast(res);
2231 0 : res = SWIG_AddNewMask(res);
2232 : } else {
2233 0 : res = SWIG_AddCast(res);
2234 : }
2235 : }
2236 : }
2237 0 : Py_DECREF(impconv);
2238 : }
2239 : }
2240 : }
2241 : }
2242 0 : return res;
2243 : }
2244 : }
2245 : }
2246 :
2247 : /* Convert a function ptr value */
2248 :
2249 : SWIGRUNTIME int
2250 : SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2251 : if (!PyCFunction_Check(obj)) {
2252 : return SWIG_ConvertPtr(obj, ptr, ty, 0);
2253 : } else {
2254 : void *vptr = 0;
2255 :
2256 : /* here we get the method pointer for callbacks */
2257 : const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2258 : const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2259 : if (desc)
2260 : desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2261 : if (!desc)
2262 : return SWIG_ERROR;
2263 : if (ty) {
2264 : swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
2265 : if (tc) {
2266 : int newmemory = 0;
2267 : *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2268 : assert(!newmemory); /* newmemory handling not yet implemented */
2269 : } else {
2270 : return SWIG_ERROR;
2271 : }
2272 : } else {
2273 : *ptr = vptr;
2274 : }
2275 : return SWIG_OK;
2276 : }
2277 : }
2278 :
2279 : /* Convert a packed value value */
2280 :
2281 : SWIGRUNTIME int
2282 : SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2283 : swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2284 : if (!to) return SWIG_ERROR;
2285 : if (ty) {
2286 : if (to != ty) {
2287 : /* check type cast? */
2288 : swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2289 : if (!tc) return SWIG_ERROR;
2290 : }
2291 : }
2292 : return SWIG_OK;
2293 : }
2294 :
2295 : /* -----------------------------------------------------------------------------
2296 : * Create a new pointer object
2297 : * ----------------------------------------------------------------------------- */
2298 :
2299 : /*
2300 : Create a new instance object, without calling __init__, and set the
2301 : 'this' attribute.
2302 : */
2303 :
2304 : SWIGRUNTIME PyObject*
2305 28508 : SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
2306 : {
2307 : #if (PY_VERSION_HEX >= 0x02020000)
2308 28508 : PyObject *inst = 0;
2309 28508 : PyObject *newraw = data->newraw;
2310 28508 : if (newraw) {
2311 28508 : inst = PyObject_Call(newraw, data->newargs, NULL);
2312 28508 : if (inst) {
2313 : #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2314 28508 : PyObject **dictptr = _PyObject_GetDictPtr(inst);
2315 28508 : if (dictptr != NULL) {
2316 28508 : PyObject *dict = *dictptr;
2317 28508 : if (dict == NULL) {
2318 28508 : dict = PyDict_New();
2319 28508 : *dictptr = dict;
2320 28508 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2321 : }
2322 : }
2323 : #else
2324 : PyObject *key = SWIG_This();
2325 : PyObject_SetAttr(inst, key, swig_this);
2326 : #endif
2327 : }
2328 : } else {
2329 : #if PY_VERSION_HEX >= 0x03000000
2330 : inst = PyBaseObject_Type.tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
2331 : PyObject_SetAttr(inst, SWIG_This(), swig_this);
2332 : Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2333 : #else
2334 0 : PyObject *dict = PyDict_New();
2335 0 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2336 0 : inst = PyInstance_NewRaw(data->newargs, dict);
2337 0 : Py_DECREF(dict);
2338 : #endif
2339 : }
2340 28508 : return inst;
2341 : #else
2342 : #if (PY_VERSION_HEX >= 0x02010000)
2343 : PyObject *inst;
2344 : PyObject *dict = PyDict_New();
2345 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2346 : inst = PyInstance_NewRaw(data->newargs, dict);
2347 : Py_DECREF(dict);
2348 : return (PyObject *) inst;
2349 : #else
2350 : PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2351 : if (inst == NULL) {
2352 : return NULL;
2353 : }
2354 : inst->in_class = (PyClassObject *)data->newargs;
2355 : Py_INCREF(inst->in_class);
2356 : inst->in_dict = PyDict_New();
2357 : if (inst->in_dict == NULL) {
2358 : Py_DECREF(inst);
2359 : return NULL;
2360 : }
2361 : #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2362 : inst->in_weakreflist = NULL;
2363 : #endif
2364 : #ifdef Py_TPFLAGS_GC
2365 : PyObject_GC_Init(inst);
2366 : #endif
2367 : PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2368 : return (PyObject *) inst;
2369 : #endif
2370 : #endif
2371 : }
2372 :
2373 : SWIGRUNTIME void
2374 : SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2375 : {
2376 : PyObject *dict;
2377 : #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2378 : PyObject **dictptr = _PyObject_GetDictPtr(inst);
2379 : if (dictptr != NULL) {
2380 : dict = *dictptr;
2381 : if (dict == NULL) {
2382 : dict = PyDict_New();
2383 : *dictptr = dict;
2384 : }
2385 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2386 : return;
2387 : }
2388 : #endif
2389 : dict = PyObject_GetAttrString(inst, (char*)"__dict__");
2390 : PyDict_SetItem(dict, SWIG_This(), swig_this);
2391 : Py_DECREF(dict);
2392 : }
2393 :
2394 :
2395 : SWIGINTERN PyObject *
2396 : SWIG_Python_InitShadowInstance(PyObject *args) {
2397 : PyObject *obj[2];
2398 : if (!SWIG_Python_UnpackTuple(args,(char*)"swiginit", 2, 2, obj)) {
2399 : return NULL;
2400 : } else {
2401 : SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2402 : if (sthis) {
2403 : SwigPyObject_append((PyObject*) sthis, obj[1]);
2404 : } else {
2405 : SWIG_Python_SetSwigThis(obj[0], obj[1]);
2406 : }
2407 : return SWIG_Py_Void();
2408 : }
2409 : }
2410 :
2411 : /* Create a new pointer object */
2412 :
2413 : SWIGRUNTIME PyObject *
2414 44109 : SWIG_Python_NewPointerObj(void *ptr, swig_type_info *type, int flags) {
2415 44109 : if (!ptr) {
2416 0 : return SWIG_Py_Void();
2417 : } else {
2418 44109 : int own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2419 44109 : PyObject *robj = SwigPyObject_New(ptr, type, own);
2420 44109 : SwigPyClientData *clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2421 44109 : if (clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2422 28508 : PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2423 28508 : if (inst) {
2424 28508 : Py_DECREF(robj);
2425 28508 : robj = inst;
2426 : }
2427 : }
2428 44109 : return robj;
2429 : }
2430 : }
2431 :
2432 : /* Create a new packed object */
2433 :
2434 : SWIGRUNTIMEINLINE PyObject *
2435 : SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2436 0 : return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2437 : }
2438 :
2439 : /* -----------------------------------------------------------------------------*
2440 : * Get type list
2441 : * -----------------------------------------------------------------------------*/
2442 :
2443 : #ifdef SWIG_LINK_RUNTIME
2444 : void *SWIG_ReturnGlobalTypeList(void *);
2445 : #endif
2446 :
2447 : SWIGRUNTIME swig_module_info *
2448 : SWIG_Python_GetModule(void) {
2449 : static void *type_pointer = (void *)0;
2450 : /* first check if module already created */
2451 4 : if (!type_pointer) {
2452 : #ifdef SWIG_LINK_RUNTIME
2453 : type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2454 : #else
2455 : #ifdef SWIG_PYTHON_USE_CAPSULE
2456 : type_pointer = PyCapsule_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer" SWIG_TYPE_TABLE_NAME, 0);
2457 : #else
2458 : type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2459 4 : (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
2460 : #endif
2461 4 : if (PyErr_Occurred()) {
2462 0 : PyErr_Clear();
2463 0 : type_pointer = (void *)0;
2464 : }
2465 : #endif
2466 : }
2467 4 : return (swig_module_info *) type_pointer;
2468 : }
2469 :
2470 : #if PY_MAJOR_VERSION < 2
2471 : /* PyModule_AddObject function was introduced in Python 2.0. The following function
2472 : is copied out of Python/modsupport.c in python version 2.3.4 */
2473 : SWIGINTERN int
2474 : PyModule_AddObject(PyObject *m, char *name, PyObject *o)
2475 : {
2476 : PyObject *dict;
2477 : if (!PyModule_Check(m)) {
2478 : PyErr_SetString(PyExc_TypeError,
2479 : "PyModule_AddObject() needs module as first arg");
2480 : return SWIG_ERROR;
2481 : }
2482 : if (!o) {
2483 : PyErr_SetString(PyExc_TypeError,
2484 : "PyModule_AddObject() needs non-NULL value");
2485 : return SWIG_ERROR;
2486 : }
2487 :
2488 : dict = PyModule_GetDict(m);
2489 : if (dict == NULL) {
2490 : /* Internal error -- modules must have a dict! */
2491 : PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
2492 : PyModule_GetName(m));
2493 : return SWIG_ERROR;
2494 : }
2495 : if (PyDict_SetItemString(dict, name, o))
2496 : return SWIG_ERROR;
2497 : Py_DECREF(o);
2498 : return SWIG_OK;
2499 : }
2500 : #endif
2501 :
2502 : SWIGRUNTIME void
2503 : #ifdef SWIG_PYTHON_USE_CAPSULE
2504 : SWIG_Python_DestroyModule(PyObject *capsule)
2505 : {
2506 : swig_module_info *swig_module;
2507 : swig_type_info **types;
2508 : size_t i;
2509 : swig_module = (swig_module_info *)PyCapsule_GetPointer(capsule, (char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
2510 : if (swig_module == NULL)
2511 : {
2512 : PyErr_Clear();
2513 : return;
2514 : }
2515 : types = swig_module->types;
2516 : #else
2517 0 : SWIG_Python_DestroyModule(void *vptr)
2518 : {
2519 0 : swig_module_info *swig_module = (swig_module_info *) vptr;
2520 0 : swig_type_info **types = swig_module->types;
2521 : size_t i;
2522 : #endif
2523 0 : for (i =0; i < swig_module->size; ++i) {
2524 0 : swig_type_info *ty = types[i];
2525 0 : if (ty->owndata) {
2526 0 : SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
2527 0 : if (data) SwigPyClientData_Del(data);
2528 : }
2529 : }
2530 0 : Py_DECREF(SWIG_This());
2531 0 : }
2532 :
2533 : SWIGRUNTIME void
2534 : SWIG_Python_SetModule(swig_module_info *swig_module) {
2535 : static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
2536 :
2537 : #if PY_VERSION_HEX >= 0x03000000
2538 : /* Add a dummy module object into sys.modules */
2539 : PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
2540 : #else
2541 0 : PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2542 : swig_empty_runtime_method_table);
2543 : #endif
2544 : #ifdef SWIG_PYTHON_USE_CAPSULE
2545 : PyObject *pointer = PyCapsule_New((void *) swig_module,
2546 : (char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer" SWIG_TYPE_TABLE_NAME,
2547 : SWIG_Python_DestroyModule);
2548 : #else
2549 0 : PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
2550 : #endif
2551 0 : if (pointer && module) {
2552 0 : PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2553 : } else {
2554 0 : Py_XDECREF(pointer);
2555 : }
2556 : }
2557 :
2558 : /* The python cached type query */
2559 : SWIGRUNTIME PyObject *
2560 : SWIG_Python_TypeCache(void) {
2561 : static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2562 : return cache;
2563 : }
2564 :
2565 : SWIGRUNTIME swig_type_info *
2566 : SWIG_Python_TypeQuery(const char *type)
2567 : {
2568 : PyObject *cache = SWIG_Python_TypeCache();
2569 : PyObject *key = SWIG_Python_str_FromChar(type);
2570 : PyObject *obj = PyDict_GetItem(cache, key);
2571 : swig_type_info *descriptor;
2572 : if (obj) {
2573 : #ifdef SWIG_PYTHON_USE_CAPSULE
2574 : descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, (char*)"swig_type_info");
2575 : #else
2576 : descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
2577 : #endif
2578 : } else {
2579 : swig_module_info *swig_module = SWIG_Python_GetModule();
2580 : descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2581 : if (descriptor) {
2582 : #ifdef SWIG_PYTHON_USE_CAPSULE
2583 : obj = PyCapsule_New(descriptor, (char*)"swig_type_info", NULL);
2584 : #else
2585 : obj = PyCObject_FromVoidPtr(descriptor, NULL);
2586 : #endif
2587 : PyDict_SetItem(cache, key, obj);
2588 : Py_DECREF(obj);
2589 : }
2590 : }
2591 : Py_DECREF(key);
2592 : return descriptor;
2593 : }
2594 :
2595 : /*
2596 : For backward compatibility only
2597 : */
2598 : #define SWIG_POINTER_EXCEPTION 0
2599 : #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2600 : #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2601 :
2602 : SWIGRUNTIME int
2603 : SWIG_Python_AddErrMesg(const char* mesg, int infront)
2604 : {
2605 : if (PyErr_Occurred()) {
2606 : PyObject *type = 0;
2607 : PyObject *value = 0;
2608 : PyObject *traceback = 0;
2609 : PyErr_Fetch(&type, &value, &traceback);
2610 : if (value) {
2611 : char *tmp;
2612 : PyObject *old_str = PyObject_Str(value);
2613 : Py_XINCREF(type);
2614 : PyErr_Clear();
2615 : if (infront) {
2616 : PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
2617 : } else {
2618 : PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
2619 : }
2620 : SWIG_Python_str_DelForPy3(tmp);
2621 : Py_DECREF(old_str);
2622 : }
2623 : return 1;
2624 : } else {
2625 : return 0;
2626 : }
2627 : }
2628 :
2629 : SWIGRUNTIME int
2630 : SWIG_Python_ArgFail(int argnum)
2631 : {
2632 : if (PyErr_Occurred()) {
2633 : /* add information about failing argument */
2634 : char mesg[256];
2635 : PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2636 : return SWIG_Python_AddErrMesg(mesg, 1);
2637 : } else {
2638 : return 0;
2639 : }
2640 : }
2641 :
2642 : SWIGRUNTIMEINLINE const char *
2643 : SwigPyObject_GetDesc(PyObject *self)
2644 : {
2645 : SwigPyObject *v = (SwigPyObject *)self;
2646 : swig_type_info *ty = v ? v->ty : 0;
2647 : return ty ? ty->str : (char*)"";
2648 : }
2649 :
2650 : SWIGRUNTIME void
2651 : SWIG_Python_TypeError(const char *type, PyObject *obj)
2652 : {
2653 : if (type) {
2654 : #if defined(SWIG_COBJECT_TYPES)
2655 : if (obj && SwigPyObject_Check(obj)) {
2656 : const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2657 : if (otype) {
2658 : PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2659 : type, otype);
2660 : return;
2661 : }
2662 : } else
2663 : #endif
2664 : {
2665 : const char *otype = (obj ? obj->ob_type->tp_name : 0);
2666 : if (otype) {
2667 : PyObject *str = PyObject_Str(obj);
2668 : const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2669 : if (cstr) {
2670 : PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2671 : type, otype, cstr);
2672 : SWIG_Python_str_DelForPy3(cstr);
2673 : } else {
2674 : PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2675 : type, otype);
2676 : }
2677 : Py_XDECREF(str);
2678 : return;
2679 : }
2680 : }
2681 : PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2682 : } else {
2683 : PyErr_Format(PyExc_TypeError, "unexpected type is received");
2684 : }
2685 : }
2686 :
2687 :
2688 : /* Convert a pointer value, signal an exception on a type mismatch */
2689 : SWIGRUNTIME void *
2690 : SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int argnum, int flags) {
2691 : void *result;
2692 : if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2693 : PyErr_Clear();
2694 : #if SWIG_POINTER_EXCEPTION
2695 : if (flags) {
2696 : SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2697 : SWIG_Python_ArgFail(argnum);
2698 : }
2699 : #endif
2700 : }
2701 : return result;
2702 : }
2703 :
2704 :
2705 : #ifdef __cplusplus
2706 : #if 0
2707 : { /* cc-mode */
2708 : #endif
2709 : }
2710 : #endif
2711 :
2712 :
2713 :
2714 : #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2715 :
2716 : #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
2717 :
2718 :
2719 :
2720 : #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
2721 :
2722 :
2723 : /* -------- TYPES TABLE (BEGIN) -------- */
2724 :
2725 : #define SWIGTYPE_p_OSRCoordinateTransformationShadow swig_types[0]
2726 : #define SWIGTYPE_p_OSRSpatialReferenceShadow swig_types[1]
2727 : #define SWIGTYPE_p_char swig_types[2]
2728 : #define SWIGTYPE_p_double swig_types[3]
2729 : #define SWIGTYPE_p_int swig_types[4]
2730 : #define SWIGTYPE_p_long swig_types[5]
2731 : #define SWIGTYPE_p_p_char swig_types[6]
2732 : #define SWIGTYPE_p_p_double swig_types[7]
2733 : static swig_type_info *swig_types[9];
2734 : static swig_module_info swig_module = {swig_types, 8, 0, 0, 0, 0};
2735 : #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
2736 : #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
2737 :
2738 : /* -------- TYPES TABLE (END) -------- */
2739 :
2740 : #if (PY_VERSION_HEX <= 0x02000000)
2741 : # if !defined(SWIG_PYTHON_CLASSIC)
2742 : # error "This python version requires swig to be run with the '-classic' option"
2743 : # endif
2744 : #endif
2745 :
2746 : /*-----------------------------------------------
2747 : @(target):= _osr.so
2748 : ------------------------------------------------*/
2749 : #if PY_VERSION_HEX >= 0x03000000
2750 : # define SWIG_init PyInit__osr
2751 :
2752 : #else
2753 : # define SWIG_init init_osr
2754 :
2755 : #endif
2756 : #define SWIG_name "_osr"
2757 :
2758 : #define SWIGVERSION 0x010340
2759 : #define SWIG_VERSION SWIGVERSION
2760 :
2761 :
2762 : #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
2763 : #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
2764 :
2765 :
2766 : #include <stdexcept>
2767 :
2768 :
2769 : namespace swig {
2770 : class SwigPtr_PyObject {
2771 : protected:
2772 : PyObject *_obj;
2773 :
2774 : public:
2775 : SwigPtr_PyObject() :_obj(0)
2776 : {
2777 : }
2778 :
2779 : SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
2780 : {
2781 : Py_XINCREF(_obj);
2782 : }
2783 :
2784 : SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
2785 : {
2786 : if (initial_ref) {
2787 : Py_XINCREF(_obj);
2788 : }
2789 : }
2790 :
2791 : SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
2792 : {
2793 : Py_XINCREF(item._obj);
2794 : Py_XDECREF(_obj);
2795 : _obj = item._obj;
2796 : return *this;
2797 : }
2798 :
2799 : ~SwigPtr_PyObject()
2800 : {
2801 : Py_XDECREF(_obj);
2802 : }
2803 :
2804 : operator PyObject *() const
2805 : {
2806 : return _obj;
2807 : }
2808 :
2809 : PyObject *operator->() const
2810 : {
2811 : return _obj;
2812 : }
2813 : };
2814 : }
2815 :
2816 :
2817 : namespace swig {
2818 : struct SwigVar_PyObject : SwigPtr_PyObject {
2819 : SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
2820 :
2821 : SwigVar_PyObject & operator = (PyObject* obj)
2822 : {
2823 : Py_XDECREF(_obj);
2824 : _obj = obj;
2825 : return *this;
2826 : }
2827 : };
2828 : }
2829 :
2830 :
2831 : SWIGINTERN swig_type_info*
2832 : SWIG_pchar_descriptor(void)
2833 : {
2834 : static int init = 0;
2835 : static swig_type_info* info = 0;
2836 0 : if (!init) {
2837 0 : info = SWIG_TypeQuery("_p_char");
2838 0 : init = 1;
2839 : }
2840 0 : return info;
2841 : }
2842 :
2843 :
2844 : SWIGINTERNINLINE PyObject *
2845 : SWIG_FromCharPtrAndSize(const char* carray, size_t size)
2846 : {
2847 21968 : if (carray) {
2848 17459 : if (size > INT_MAX) {
2849 0 : swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
2850 : return pchar_descriptor ?
2851 0 : SWIG_NewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
2852 : } else {
2853 : #if PY_VERSION_HEX >= 0x03000000
2854 : return PyUnicode_FromStringAndSize(carray, static_cast< int >(size));
2855 : #else
2856 17459 : return PyString_FromStringAndSize(carray, static_cast< int >(size));
2857 : #endif
2858 : }
2859 : } else {
2860 4509 : return SWIG_Py_Void();
2861 : }
2862 : }
2863 :
2864 :
2865 : SWIGINTERNINLINE PyObject *
2866 21968 : SWIG_FromCharPtr(const char *cptr)
2867 : {
2868 43936 : return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
2869 : }
2870 :
2871 :
2872 : #define SWIG_From_double PyFloat_FromDouble
2873 :
2874 :
2875 : typedef char retStringAndCPLFree;
2876 :
2877 :
2878 : #include <iostream>
2879 : using namespace std;
2880 :
2881 : #include "cpl_string.h"
2882 : #include "cpl_conv.h"
2883 :
2884 : #include "ogr_srs_api.h"
2885 :
2886 : #ifdef DEBUG
2887 : typedef struct OGRSpatialReferenceHS OSRSpatialReferenceShadow;
2888 : typedef struct OGRCoordinateTransformationHS OSRCoordinateTransformationShadow;
2889 : typedef struct OGRCoordinateTransformationHS OGRCoordinateTransformationShadow;
2890 : #else
2891 : typedef void OSRSpatialReferenceShadow;
2892 : typedef void OSRCoordinateTransformationShadow;
2893 : #endif
2894 :
2895 :
2896 : int bUseExceptions=0;
2897 : CPLErrorHandler pfnPreviousHandler = CPLDefaultErrorHandler;
2898 :
2899 : void CPL_STDCALL
2900 0 : PythonBindingErrorHandler(CPLErr eclass, int code, const char *msg )
2901 : {
2902 : /*
2903 : ** Generally we want to supress error reporting if we have exceptions
2904 : ** enabled as the error message will be in the exception thrown in
2905 : ** Python.
2906 : */
2907 :
2908 : /* If the error class is CE_Fatal, we want to have a message issued
2909 : because the CPL support code does an abort() before any exception
2910 : can be generated */
2911 0 : if (eclass == CE_Fatal ) {
2912 0 : pfnPreviousHandler(eclass, code, msg );
2913 : }
2914 :
2915 : /*
2916 : ** We do not want to interfere with warnings or debug messages since
2917 : ** they won't be translated into exceptions.
2918 : */
2919 0 : if (eclass == CE_Warning || eclass == CE_Debug ) {
2920 0 : pfnPreviousHandler(eclass, code, msg );
2921 : }
2922 0 : }
2923 :
2924 :
2925 :
2926 0 : int GetUseExceptions() {
2927 0 : return bUseExceptions;
2928 : }
2929 :
2930 0 : void UseExceptions() {
2931 0 : bUseExceptions = 1;
2932 : pfnPreviousHandler =
2933 0 : CPLSetErrorHandler( (CPLErrorHandler) PythonBindingErrorHandler );
2934 0 : }
2935 :
2936 0 : void DontUseExceptions() {
2937 0 : bUseExceptions = 0;
2938 0 : CPLSetErrorHandler( pfnPreviousHandler );
2939 0 : }
2940 :
2941 :
2942 : #define SWIG_From_long PyInt_FromLong
2943 :
2944 :
2945 : SWIGINTERNINLINE PyObject *
2946 : SWIG_From_int (int value)
2947 : {
2948 14513 : return SWIG_From_long (value);
2949 : }
2950 :
2951 :
2952 :
2953 : /* Return a PyObject* from a NULL terminated C String */
2954 60567 : static PyObject* GDALPythonObjectFromCStr(const char *pszStr)
2955 : {
2956 60567 : const unsigned char* pszIter = (const unsigned char*) pszStr;
2957 26526703 : while(*pszIter != 0)
2958 : {
2959 26405569 : if (*pszIter > 127)
2960 : {
2961 0 : PyObject* pyObj = PyUnicode_DecodeUTF8(pszStr, strlen(pszStr), "ignore");
2962 0 : if (pyObj != NULL)
2963 0 : return pyObj;
2964 : #if PY_VERSION_HEX >= 0x03000000
2965 : return PyBytes_FromString(pszStr);
2966 : #else
2967 0 : return PyString_FromString(pszStr);
2968 : #endif
2969 : }
2970 26405569 : pszIter ++;
2971 : }
2972 : #if PY_VERSION_HEX >= 0x03000000
2973 : return PyUnicode_FromString(pszStr);
2974 : #else
2975 60567 : return PyString_FromString(pszStr);
2976 : #endif
2977 : }
2978 :
2979 : /* Return a NULL terminated c String from a PyObject */
2980 : /* Result must be freed with GDALPythonFreeCStr */
2981 : static char* GDALPythonObjectToCStr(PyObject* pyObject, int* pbToFree)
2982 : {
2983 : *pbToFree = 0;
2984 : if (PyUnicode_Check(pyObject))
2985 : {
2986 : char *pszStr;
2987 : char *pszNewStr;
2988 : Py_ssize_t nLen;
2989 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObject);
2990 : #if PY_VERSION_HEX >= 0x03000000
2991 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
2992 : #else
2993 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
2994 : #endif
2995 : pszNewStr = (char *) malloc(nLen+1);
2996 : memcpy(pszNewStr, pszStr, nLen+1);
2997 : Py_XDECREF(pyUTF8Str);
2998 : *pbToFree = 1;
2999 : return pszNewStr;
3000 : }
3001 : else
3002 : {
3003 : #if PY_VERSION_HEX >= 0x03000000
3004 : return PyBytes_AsString(pyObject);
3005 : #else
3006 : return PyString_AsString(pyObject);
3007 : #endif
3008 : }
3009 : }
3010 :
3011 : static void GDALPythonFreeCStr(void* ptr, int bToFree)
3012 : {
3013 : if (bToFree)
3014 : free(ptr);
3015 : }
3016 :
3017 :
3018 :
3019 : static PyObject *
3020 1 : py_OPTGetProjectionMethods(PyObject *self, PyObject *args) {
3021 :
3022 : PyObject *py_MList;
3023 : char **papszMethods;
3024 : int iMethod;
3025 :
3026 1 : self = self;
3027 1 : args = args;
3028 :
3029 1 : papszMethods = OPTGetProjectionMethods();
3030 1 : py_MList = PyList_New(CSLCount(papszMethods));
3031 :
3032 49 : for( iMethod = 0; papszMethods[iMethod] != NULL; iMethod++ )
3033 : {
3034 : char *pszUserMethodName;
3035 : char **papszParameters;
3036 : PyObject *py_PList;
3037 : int iParam;
3038 :
3039 48 : papszParameters = OPTGetParameterList( papszMethods[iMethod],
3040 96 : &pszUserMethodName );
3041 48 : if( papszParameters == NULL )
3042 0 : return NULL;
3043 :
3044 48 : py_PList = PyList_New(CSLCount(papszParameters));
3045 236 : for( iParam = 0; papszParameters[iParam] != NULL; iParam++ )
3046 : {
3047 : char *pszType;
3048 : char *pszUserParamName;
3049 : double dfDefault;
3050 :
3051 188 : OPTGetParameterInfo( papszMethods[iMethod],
3052 188 : papszParameters[iParam],
3053 : &pszUserParamName,
3054 564 : &pszType, &dfDefault );
3055 : PyList_SetItem(py_PList, iParam,
3056 : Py_BuildValue("(sssd)",
3057 : papszParameters[iParam],
3058 : pszUserParamName,
3059 188 : pszType, dfDefault ));
3060 : }
3061 :
3062 48 : CSLDestroy( papszParameters );
3063 :
3064 : PyList_SetItem(py_MList, iMethod,
3065 : Py_BuildValue("(ssO)",
3066 : papszMethods[iMethod],
3067 : pszUserMethodName,
3068 48 : py_PList));
3069 :
3070 48 : Py_XDECREF( py_PList );
3071 : }
3072 :
3073 1 : CSLDestroy( papszMethods );
3074 :
3075 1 : return py_MList;
3076 : }
3077 :
3078 :
3079 0 : OGRErr GetWellKnownGeogCSAsWKT( const char *name, char **argout ) {
3080 0 : OGRSpatialReferenceH srs = OSRNewSpatialReference("");
3081 0 : OGRErr rcode = OSRSetWellKnownGeogCS( srs, name );
3082 0 : if( rcode == OGRERR_NONE )
3083 0 : rcode = OSRExportToWkt ( srs, argout );
3084 0 : OSRDestroySpatialReference( srs );
3085 0 : return rcode;
3086 : }
3087 :
3088 :
3089 : SWIGINTERN int
3090 32152 : SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3091 : {
3092 : #if PY_VERSION_HEX>=0x03000000
3093 : if (PyUnicode_Check(obj))
3094 : #else
3095 32152 : if (PyString_Check(obj))
3096 : #endif
3097 : {
3098 : char *cstr; Py_ssize_t len;
3099 : #if PY_VERSION_HEX>=0x03000000
3100 : if (!alloc && cptr) {
3101 : /* We can't allow converting without allocation, since the internal
3102 : representation of string in Python 3 is UCS-2/UCS-4 but we require
3103 : a UTF-8 representation.
3104 : TODO(bhy) More detailed explanation */
3105 : return SWIG_RuntimeError;
3106 : }
3107 : obj = PyUnicode_AsUTF8String(obj);
3108 : PyBytes_AsStringAndSize(obj, &cstr, &len);
3109 : if(alloc) *alloc = SWIG_NEWOBJ;
3110 : #else
3111 32152 : PyString_AsStringAndSize(obj, &cstr, &len);
3112 : #endif
3113 32152 : if (cptr) {
3114 32152 : if (alloc) {
3115 : /*
3116 : In python the user should not be able to modify the inner
3117 : string representation. To warranty that, if you define
3118 : SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
3119 : buffer is always returned.
3120 :
3121 : The default behavior is just to return the pointer value,
3122 : so, be careful.
3123 : */
3124 : #if defined(SWIG_PYTHON_SAFE_CSTRINGS)
3125 : if (*alloc != SWIG_OLDOBJ)
3126 : #else
3127 32152 : if (*alloc == SWIG_NEWOBJ)
3128 : #endif
3129 : {
3130 0 : *cptr = reinterpret_cast< char* >(memcpy((new char[len + 1]), cstr, sizeof(char)*(len + 1)));
3131 0 : *alloc = SWIG_NEWOBJ;
3132 : }
3133 : else {
3134 32152 : *cptr = cstr;
3135 32152 : *alloc = SWIG_OLDOBJ;
3136 : }
3137 : } else {
3138 : #if PY_VERSION_HEX>=0x03000000
3139 : assert(0); /* Should never reach here in Python 3 */
3140 : #endif
3141 0 : *cptr = SWIG_Python_str_AsChar(obj);
3142 : }
3143 : }
3144 32152 : if (psize) *psize = len + 1;
3145 : #if PY_VERSION_HEX>=0x03000000
3146 : Py_XDECREF(obj);
3147 : #endif
3148 32152 : return SWIG_OK;
3149 : } else {
3150 0 : swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3151 0 : if (pchar_descriptor) {
3152 0 : void* vptr = 0;
3153 0 : if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3154 0 : if (cptr) *cptr = (char *) vptr;
3155 0 : if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3156 0 : if (alloc) *alloc = SWIG_OLDOBJ;
3157 0 : return SWIG_OK;
3158 : }
3159 : }
3160 : }
3161 0 : return SWIG_TypeError;
3162 : }
3163 :
3164 :
3165 :
3166 :
3167 :
3168 : #define t_output_helper SWIG_Python_AppendOutput
3169 :
3170 :
3171 :
3172 : #include "ogr_core.h"
3173 : static char const *
3174 0 : OGRErrMessages( int rc ) {
3175 0 : switch( rc ) {
3176 : case OGRERR_NONE:
3177 0 : return "OGR Error: None";
3178 : case OGRERR_NOT_ENOUGH_DATA:
3179 0 : return "OGR Error: Not enough data to deserialize";
3180 : case OGRERR_NOT_ENOUGH_MEMORY:
3181 0 : return "OGR Error: Not enough memory";
3182 : case OGRERR_UNSUPPORTED_GEOMETRY_TYPE:
3183 0 : return "OGR Error: Unsupported geometry type";
3184 : case OGRERR_UNSUPPORTED_OPERATION:
3185 0 : return "OGR Error: Unsupported operation";
3186 : case OGRERR_CORRUPT_DATA:
3187 0 : return "OGR Error: Corrupt data";
3188 : case OGRERR_FAILURE:
3189 0 : return "OGR Error: General Error";
3190 : case OGRERR_UNSUPPORTED_SRS:
3191 0 : return "OGR Error: Unsupported SRS";
3192 : case OGRERR_INVALID_HANDLE:
3193 0 : return "OGR Error: Invalid handle";
3194 : default:
3195 0 : return "OGR Error: Unknown";
3196 : }
3197 : }
3198 :
3199 :
3200 8 : OGRErr GetUserInputAsWKT( const char *name, char **argout ) {
3201 8 : OGRSpatialReferenceH srs = OSRNewSpatialReference("");
3202 8 : OGRErr rcode = OSRSetFromUserInput( srs, name );
3203 8 : if( rcode == OGRERR_NONE )
3204 8 : rcode = OSRExportToWkt ( srs, argout );
3205 8 : OSRDestroySpatialReference( srs );
3206 8 : return rcode;
3207 : }
3208 :
3209 : SWIGINTERN OSRSpatialReferenceShadow *new_OSRSpatialReferenceShadow(char const *wkt=""){
3210 15563 : return (OSRSpatialReferenceShadow*) OSRNewSpatialReference(wkt);
3211 : }
3212 : SWIGINTERN void delete_OSRSpatialReferenceShadow(OSRSpatialReferenceShadow *self){
3213 44233 : if (OSRDereference( self ) == 0 ) {
3214 44084 : OSRDestroySpatialReference( self );
3215 : }
3216 : }
3217 : SWIGINTERN retStringAndCPLFree *OSRSpatialReferenceShadow___str__(OSRSpatialReferenceShadow *self){
3218 14 : char *buf = 0;
3219 14 : OSRExportToPrettyWkt( self, &buf, 0 );
3220 14 : return buf;
3221 : }
3222 : SWIGINTERN int OSRSpatialReferenceShadow_IsSame(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
3223 14499 : return OSRIsSame( self, rhs );
3224 : }
3225 : SWIGINTERN int OSRSpatialReferenceShadow_IsSameGeogCS(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
3226 0 : return OSRIsSameGeogCS( self, rhs );
3227 : }
3228 : SWIGINTERN int OSRSpatialReferenceShadow_IsSameVertCS(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
3229 0 : return OSRIsSameVertCS( self, rhs );
3230 : }
3231 : SWIGINTERN int OSRSpatialReferenceShadow_IsGeographic(OSRSpatialReferenceShadow *self){
3232 1 : return OSRIsGeographic(self);
3233 : }
3234 : SWIGINTERN int OSRSpatialReferenceShadow_IsProjected(OSRSpatialReferenceShadow *self){
3235 3 : return OSRIsProjected(self);
3236 : }
3237 : SWIGINTERN int OSRSpatialReferenceShadow_IsCompound(OSRSpatialReferenceShadow *self){
3238 1 : return OSRIsCompound(self);
3239 : }
3240 : SWIGINTERN int OSRSpatialReferenceShadow_IsGeocentric(OSRSpatialReferenceShadow *self){
3241 2 : return OSRIsGeocentric(self);
3242 : }
3243 : SWIGINTERN int OSRSpatialReferenceShadow_IsLocal(OSRSpatialReferenceShadow *self){
3244 1 : return OSRIsLocal(self);
3245 : }
3246 : SWIGINTERN int OSRSpatialReferenceShadow_IsVertical(OSRSpatialReferenceShadow *self){
3247 0 : return OSRIsVertical(self);
3248 : }
3249 : SWIGINTERN int OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(OSRSpatialReferenceShadow *self){
3250 4 : return OSREPSGTreatsAsLatLong(self);
3251 : }
3252 :
3253 : #include <limits.h>
3254 : #if !defined(SWIG_NO_LLONG_MAX)
3255 : # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3256 : # define LLONG_MAX __LONG_LONG_MAX__
3257 : # define LLONG_MIN (-LLONG_MAX - 1LL)
3258 : # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3259 : # endif
3260 : #endif
3261 :
3262 :
3263 : SWIGINTERN int
3264 803 : SWIG_AsVal_double (PyObject *obj, double *val)
3265 : {
3266 803 : int res = SWIG_TypeError;
3267 803 : if (PyFloat_Check(obj)) {
3268 515 : if (val) *val = PyFloat_AsDouble(obj);
3269 515 : return SWIG_OK;
3270 288 : } else if (PyInt_Check(obj)) {
3271 288 : if (val) *val = PyInt_AsLong(obj);
3272 288 : return SWIG_OK;
3273 0 : } else if (PyLong_Check(obj)) {
3274 0 : double v = PyLong_AsDouble(obj);
3275 0 : if (!PyErr_Occurred()) {
3276 0 : if (val) *val = v;
3277 0 : return SWIG_OK;
3278 : } else {
3279 0 : PyErr_Clear();
3280 : }
3281 : }
3282 : #ifdef SWIG_PYTHON_CAST_MODE
3283 : {
3284 : int dispatch = 0;
3285 : double d = PyFloat_AsDouble(obj);
3286 : if (!PyErr_Occurred()) {
3287 : if (val) *val = d;
3288 : return SWIG_AddCast(SWIG_OK);
3289 : } else {
3290 : PyErr_Clear();
3291 : }
3292 : if (!dispatch) {
3293 : long v = PyLong_AsLong(obj);
3294 : if (!PyErr_Occurred()) {
3295 : if (val) *val = v;
3296 : return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3297 : } else {
3298 : PyErr_Clear();
3299 : }
3300 : }
3301 : }
3302 : #endif
3303 0 : return res;
3304 : }
3305 :
3306 :
3307 : #include <float.h>
3308 :
3309 :
3310 : #include <math.h>
3311 :
3312 :
3313 : SWIGINTERNINLINE int
3314 : SWIG_CanCastAsInteger(double *d, double min, double max) {
3315 : double x = *d;
3316 : if ((min <= x && x <= max)) {
3317 : double fx = floor(x);
3318 : double cx = ceil(x);
3319 : double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3320 : if ((errno == EDOM) || (errno == ERANGE)) {
3321 : errno = 0;
3322 : } else {
3323 : double summ, reps, diff;
3324 : if (rd < x) {
3325 : diff = x - rd;
3326 : } else if (rd > x) {
3327 : diff = rd - x;
3328 : } else {
3329 : return 1;
3330 : }
3331 : summ = rd + x;
3332 : reps = diff/summ;
3333 : if (reps < 8*DBL_EPSILON) {
3334 : *d = rd;
3335 : return 1;
3336 : }
3337 : }
3338 : }
3339 : return 0;
3340 : }
3341 :
3342 :
3343 : SWIGINTERN int
3344 9113 : SWIG_AsVal_long (PyObject *obj, long* val)
3345 : {
3346 9113 : if (PyInt_Check(obj)) {
3347 9113 : if (val) *val = PyInt_AsLong(obj);
3348 9113 : return SWIG_OK;
3349 0 : } else if (PyLong_Check(obj)) {
3350 0 : long v = PyLong_AsLong(obj);
3351 0 : if (!PyErr_Occurred()) {
3352 0 : if (val) *val = v;
3353 0 : return SWIG_OK;
3354 : } else {
3355 0 : PyErr_Clear();
3356 : }
3357 : }
3358 : #ifdef SWIG_PYTHON_CAST_MODE
3359 : {
3360 : int dispatch = 0;
3361 : long v = PyInt_AsLong(obj);
3362 : if (!PyErr_Occurred()) {
3363 : if (val) *val = v;
3364 : return SWIG_AddCast(SWIG_OK);
3365 : } else {
3366 : PyErr_Clear();
3367 : }
3368 : if (!dispatch) {
3369 : double d;
3370 : int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3371 : if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3372 : if (val) *val = (long)(d);
3373 : return res;
3374 : }
3375 : }
3376 : }
3377 : #endif
3378 0 : return SWIG_TypeError;
3379 : }
3380 :
3381 :
3382 : SWIGINTERN int
3383 9110 : SWIG_AsVal_int (PyObject * obj, int *val)
3384 : {
3385 : long v;
3386 9110 : int res = SWIG_AsVal_long (obj, &v);
3387 9110 : if (SWIG_IsOK(res)) {
3388 9110 : if ((v < INT_MIN || v > INT_MAX)) {
3389 0 : return SWIG_OverflowError;
3390 : } else {
3391 9110 : if (val) *val = static_cast< int >(v);
3392 : }
3393 : }
3394 9110 : return res;
3395 : }
3396 :
3397 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAuthority(OSRSpatialReferenceShadow *self,char const *pszTargetKey,char const *pszAuthority,int nCode){
3398 0 : return OSRSetAuthority( self, pszTargetKey, pszAuthority, nCode );
3399 : }
3400 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAttrValue(OSRSpatialReferenceShadow *self,char const *name,int child=0){
3401 20257 : return OSRGetAttrValue( self, name, child );
3402 : }
3403 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAttrValue(OSRSpatialReferenceShadow *self,char const *name,char const *value){
3404 621 : return OSRSetAttrValue( self, name, value );
3405 : }
3406 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAngularUnits(OSRSpatialReferenceShadow *self,char const *name,double to_radians){
3407 0 : return OSRSetAngularUnits( self, name, to_radians );
3408 : }
3409 : SWIGINTERN double OSRSpatialReferenceShadow_GetAngularUnits(OSRSpatialReferenceShadow *self){
3410 : // Return code ignored.
3411 0 : return OSRGetAngularUnits( self, 0 );
3412 : }
3413 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTargetLinearUnits(OSRSpatialReferenceShadow *self,char const *target,char const *name,double to_meters){
3414 1 : return OSRSetTargetLinearUnits( self, target, name, to_meters );
3415 : }
3416 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLinearUnits(OSRSpatialReferenceShadow *self,char const *name,double to_meters){
3417 2 : return OSRSetLinearUnits( self, name, to_meters );
3418 : }
3419 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(OSRSpatialReferenceShadow *self,char const *name,double to_meters){
3420 1 : return OSRSetLinearUnitsAndUpdateParameters( self, name, to_meters );
3421 : }
3422 : SWIGINTERN double OSRSpatialReferenceShadow_GetLinearUnits(OSRSpatialReferenceShadow *self){
3423 : // Return code ignored.
3424 0 : return OSRGetLinearUnits( self, 0 );
3425 : }
3426 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetLinearUnitsName(OSRSpatialReferenceShadow *self){
3427 2 : const char *name = 0;
3428 2 : if ( OSRIsProjected( self ) ) {
3429 2 : name = OSRGetAttrValue( self, "PROJCS|UNIT", 0 );
3430 : }
3431 0 : else if ( OSRIsLocal( self ) ) {
3432 0 : name = OSRGetAttrValue( self, "LOCAL_CS|UNIT", 0 );
3433 : }
3434 :
3435 2 : if (name != 0)
3436 2 : return name;
3437 :
3438 0 : return "Meter";
3439 : }
3440 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAuthorityCode(OSRSpatialReferenceShadow *self,char const *target_key){
3441 1256 : return OSRGetAuthorityCode( self, target_key );
3442 : }
3443 : SWIGINTERN char const *OSRSpatialReferenceShadow_GetAuthorityName(OSRSpatialReferenceShadow *self,char const *target_key){
3444 9 : return OSRGetAuthorityName( self, target_key );
3445 : }
3446 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetUTM(OSRSpatialReferenceShadow *self,int zone,int north=1){
3447 10 : return OSRSetUTM( self, zone, north );
3448 : }
3449 : SWIGINTERN int OSRSpatialReferenceShadow_GetUTMZone(OSRSpatialReferenceShadow *self){
3450 : // Note: we will return south zones as negative since it is
3451 : // hard to return two values as the C API does.
3452 2 : int bNorth = FALSE;
3453 2 : int nZone = OSRGetUTMZone( self, &bNorth );
3454 2 : if( !bNorth )
3455 1 : nZone = -1 * ABS(nZone);
3456 2 : return nZone;
3457 : }
3458 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetStatePlane(OSRSpatialReferenceShadow *self,int zone,int is_nad83=1,char const *unitsname="",double units=0.0){
3459 2 : return OSRSetStatePlaneWithUnits( self, zone, is_nad83, unitsname, units );
3460 : }
3461 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_AutoIdentifyEPSG(OSRSpatialReferenceShadow *self){
3462 0 : return OSRAutoIdentifyEPSG( self );
3463 : }
3464 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjection(OSRSpatialReferenceShadow *self,char const *arg){
3465 0 : return OSRSetProjection( self, arg );
3466 : }
3467 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
3468 142 : return OSRSetProjParm( self, name, val );
3469 : }
3470 : SWIGINTERN double OSRSpatialReferenceShadow_GetProjParm(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
3471 : // Return code ignored.
3472 8643 : return OSRGetProjParm( self, name, default_val, 0 );
3473 : }
3474 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetNormProjParm(OSRSpatialReferenceShadow *self,char const *name,double val){
3475 0 : return OSRSetNormProjParm( self, name, val );
3476 : }
3477 : SWIGINTERN double OSRSpatialReferenceShadow_GetNormProjParm(OSRSpatialReferenceShadow *self,char const *name,double default_val=0.0){
3478 : // Return code ignored.
3479 0 : return OSRGetNormProjParm( self, name, default_val, 0 );
3480 : }
3481 : SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMajor(OSRSpatialReferenceShadow *self){
3482 : // Return code ignored.
3483 3 : return OSRGetSemiMajor( self, 0 );
3484 : }
3485 : SWIGINTERN double OSRSpatialReferenceShadow_GetSemiMinor(OSRSpatialReferenceShadow *self){
3486 : // Return code ignored.
3487 3 : return OSRGetSemiMinor( self, 0 );
3488 : }
3489 : SWIGINTERN double OSRSpatialReferenceShadow_GetInvFlattening(OSRSpatialReferenceShadow *self){
3490 : // Return code ignored.
3491 3 : return OSRGetInvFlattening( self, 0 );
3492 : }
3493 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetACEA(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3494 : return OSRSetACEA( self, stdp1, stdp2, clat, clong,
3495 0 : fe, fn );
3496 : }
3497 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetAE(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3498 : return OSRSetAE( self, clat, clong,
3499 0 : fe, fn );
3500 : }
3501 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetBonne(OSRSpatialReferenceShadow *self,double stdp,double cm,double fe,double fn){
3502 0 : return OSRSetBonne( self, stdp, cm, fe, fn );
3503 : }
3504 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCEA(OSRSpatialReferenceShadow *self,double stdp1,double cm,double fe,double fn){
3505 : return OSRSetCEA( self, stdp1, cm,
3506 0 : fe, fn );
3507 : }
3508 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCS(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3509 : return OSRSetCS( self, clat, clong,
3510 0 : fe, fn );
3511 : }
3512 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEC(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3513 : return OSRSetEC( self, stdp1, stdp2, clat, clong,
3514 0 : fe, fn );
3515 : }
3516 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEckertIV(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3517 0 : return OSRSetEckertIV( self, cm, fe, fn);
3518 : }
3519 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEckertVI(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3520 0 : return OSRSetEckertVI( self, cm, fe, fn);
3521 : }
3522 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEquirectangular(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3523 : return OSRSetEquirectangular( self, clat, clong,
3524 0 : fe, fn );
3525 : }
3526 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetEquirectangular2(OSRSpatialReferenceShadow *self,double clat,double clong,double pseudostdparallellat,double fe,double fn){
3527 : return OSRSetEquirectangular2( self, clat, clong,
3528 : pseudostdparallellat,
3529 0 : fe, fn );
3530 : }
3531 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(OSRSpatialReferenceShadow *self,double clat,double clong,double sc,double fe,double fn){
3532 0 : return OSRSetGaussSchreiberTMercator( self, clat, clong, sc, fe, fn );
3533 : }
3534 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGS(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3535 1 : return OSRSetGS( self, cm, fe, fn );
3536 : }
3537 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGH(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3538 0 : return OSRSetGH( self, cm, fe, fn );
3539 : }
3540 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetIGH(OSRSpatialReferenceShadow *self){
3541 0 : return OSRSetIGH( self );
3542 : }
3543 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGEOS(OSRSpatialReferenceShadow *self,double cm,double satelliteheight,double fe,double fn){
3544 : return OSRSetGEOS( self, cm, satelliteheight,
3545 0 : fe, fn );
3546 : }
3547 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGnomonic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3548 : return OSRSetGnomonic( self, clat, clong,
3549 0 : fe, fn );
3550 : }
3551 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetHOM(OSRSpatialReferenceShadow *self,double clat,double clong,double azimuth,double recttoskew,double scale,double fe,double fn){
3552 : return OSRSetHOM( self, clat, clong, azimuth, recttoskew,
3553 0 : scale, fe, fn );
3554 : }
3555 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetHOM2PNO(OSRSpatialReferenceShadow *self,double clat,double dfLat1,double dfLong1,double dfLat2,double dfLong2,double scale,double fe,double fn){
3556 : return OSRSetHOM2PNO( self, clat, dfLat1, dfLong1, dfLat2, dfLong2,
3557 0 : scale, fe, fn );
3558 : }
3559 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetKrovak(OSRSpatialReferenceShadow *self,double clat,double clong,double azimuth,double pseudostdparallellat,double scale,double fe,double fn){
3560 : return OSRSetKrovak( self, clat, clong,
3561 : azimuth, pseudostdparallellat,
3562 0 : scale, fe, fn );
3563 : }
3564 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLAEA(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3565 : return OSRSetLAEA( self, clat, clong,
3566 0 : fe, fn );
3567 : }
3568 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCC(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3569 : return OSRSetLCC( self, stdp1, stdp2, clat, clong,
3570 0 : fe, fn );
3571 : }
3572 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCC1SP(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
3573 : return OSRSetLCC1SP( self, clat, clong, scale,
3574 0 : fe, fn );
3575 : }
3576 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLCCB(OSRSpatialReferenceShadow *self,double stdp1,double stdp2,double clat,double clong,double fe,double fn){
3577 : return OSRSetLCCB( self, stdp1, stdp2, clat, clong,
3578 0 : fe, fn );
3579 : }
3580 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMC(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3581 : return OSRSetMC( self, clat, clong,
3582 0 : fe, fn );
3583 : }
3584 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMercator(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
3585 : return OSRSetMercator( self, clat, clong,
3586 0 : scale, fe, fn );
3587 : }
3588 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetMollweide(OSRSpatialReferenceShadow *self,double cm,double fe,double fn){
3589 : return OSRSetMollweide( self, cm,
3590 0 : fe, fn );
3591 : }
3592 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetNZMG(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3593 : return OSRSetNZMG( self, clat, clong,
3594 0 : fe, fn );
3595 : }
3596 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetOS(OSRSpatialReferenceShadow *self,double dfOriginLat,double dfCMeridian,double scale,double fe,double fn){
3597 : return OSRSetOS( self, dfOriginLat, dfCMeridian, scale,
3598 0 : fe, fn );
3599 : }
3600 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetOrthographic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3601 : return OSRSetOrthographic( self, clat, clong,
3602 0 : fe, fn );
3603 : }
3604 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetPolyconic(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3605 : return OSRSetPolyconic( self, clat, clong,
3606 0 : fe, fn );
3607 : }
3608 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetPS(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
3609 : return OSRSetPS( self, clat, clong, scale,
3610 0 : fe, fn );
3611 : }
3612 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetRobinson(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
3613 0 : return OSRSetRobinson( self, clong, fe, fn );
3614 : }
3615 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetSinusoidal(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
3616 0 : return OSRSetSinusoidal( self, clong, fe, fn );
3617 : }
3618 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetStereographic(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
3619 : return OSRSetStereographic( self, clat, clong, scale,
3620 0 : fe, fn );
3621 : }
3622 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetSOC(OSRSpatialReferenceShadow *self,double latitudeoforigin,double cm,double fe,double fn){
3623 : return OSRSetSOC( self, latitudeoforigin, cm,
3624 0 : fe, fn );
3625 : }
3626 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTM(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
3627 : return OSRSetTM( self, clat, clong, scale,
3628 0 : fe, fn );
3629 : }
3630 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMVariant(OSRSpatialReferenceShadow *self,char const *pszVariantName,double clat,double clong,double scale,double fe,double fn){
3631 : return OSRSetTMVariant( self, pszVariantName, clat, clong,
3632 0 : scale, fe, fn );
3633 : }
3634 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMG(OSRSpatialReferenceShadow *self,double clat,double clong,double fe,double fn){
3635 : return OSRSetTMG( self, clat, clong,
3636 0 : fe, fn );
3637 : }
3638 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetTMSO(OSRSpatialReferenceShadow *self,double clat,double clong,double scale,double fe,double fn){
3639 : return OSRSetTMSO( self, clat, clong, scale,
3640 0 : fe, fn );
3641 : }
3642 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVDG(OSRSpatialReferenceShadow *self,double clong,double fe,double fn){
3643 0 : return OSRSetVDG( self, clong, fe, fn );
3644 : }
3645 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetWellKnownGeogCS(OSRSpatialReferenceShadow *self,char const *name){
3646 37 : return OSRSetWellKnownGeogCS( self, name );
3647 : }
3648 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetFromUserInput(OSRSpatialReferenceShadow *self,char const *name){
3649 241 : return OSRSetFromUserInput( self, name );
3650 : }
3651 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_CopyGeogCSFrom(OSRSpatialReferenceShadow *self,OSRSpatialReferenceShadow *rhs){
3652 0 : return OSRCopyGeogCSFrom( self, rhs );
3653 : }
3654 : 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){
3655 :
3656 20 : return OSRSetTOWGS84( self, p1, p2, p3, p4, p5, p6, p7 );
3657 : }
3658 :
3659 : static PyObject *
3660 92 : CreateTupleFromDoubleArray( double *first, unsigned int size ) {
3661 92 : PyObject *out = PyTuple_New( size );
3662 472 : for( unsigned int i=0; i<size; i++ ) {
3663 380 : PyObject *val = PyFloat_FromDouble( *first );
3664 380 : ++first;
3665 380 : PyTuple_SetItem( out, i, val );
3666 : }
3667 92 : return out;
3668 : }
3669 :
3670 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_GetTOWGS84(OSRSpatialReferenceShadow *self,double argout[7]){
3671 2 : return OSRGetTOWGS84( self, argout, 7 );
3672 : }
3673 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetLocalCS(OSRSpatialReferenceShadow *self,char const *pszName){
3674 0 : return OSRSetLocalCS( self, pszName );
3675 : }
3676 : 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){
3677 : return OSRSetGeogCS( self, pszGeogName, pszDatumName, pszEllipsoidName,
3678 : dfSemiMajor, dfInvFlattening,
3679 1 : pszPMName, dfPMOffset, pszUnits, dfConvertToRadians );
3680 : }
3681 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetProjCS(OSRSpatialReferenceShadow *self,char const *name="unnamed"){
3682 0 : return OSRSetProjCS( self, name );
3683 : }
3684 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetGeocCS(OSRSpatialReferenceShadow *self,char const *name="unnamed"){
3685 5 : return OSRSetGeocCS( self, name );
3686 : }
3687 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetVertCS(OSRSpatialReferenceShadow *self,char const *VertCSName="unnamed",char const *VertDatumName="unnamed",int VertDatumType=0){
3688 0 : return OSRSetVertCS( self, VertCSName, VertDatumName, VertDatumType );
3689 : }
3690 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_SetCompoundCS(OSRSpatialReferenceShadow *self,char const *name,OSRSpatialReferenceShadow *horizcs,OSRSpatialReferenceShadow *vertcs){
3691 1 : return OSRSetCompoundCS( self, name, horizcs, vertcs );
3692 : }
3693 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromWkt(OSRSpatialReferenceShadow *self,char **ppszInput){
3694 6021 : return OSRImportFromWkt( self, ppszInput );
3695 : }
3696 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromProj4(OSRSpatialReferenceShadow *self,char *ppszInput){
3697 69 : return OSRImportFromProj4( self, ppszInput );
3698 : }
3699 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromUrl(OSRSpatialReferenceShadow *self,char *url){
3700 2 : return OSRImportFromUrl( self, url );
3701 : }
3702 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromESRI(OSRSpatialReferenceShadow *self,char **ppszInput){
3703 5 : return OSRImportFromESRI( self, ppszInput );
3704 : }
3705 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromEPSG(OSRSpatialReferenceShadow *self,int arg){
3706 8988 : return OSRImportFromEPSG(self, arg);
3707 : }
3708 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromEPSGA(OSRSpatialReferenceShadow *self,int arg){
3709 3 : return OSRImportFromEPSGA(self, arg);
3710 : }
3711 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromPCI(OSRSpatialReferenceShadow *self,char const *proj,char const *units="METRE",double argin[17]=0){
3712 7 : return OSRImportFromPCI( self, proj, units, argin );
3713 : }
3714 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromUSGS(OSRSpatialReferenceShadow *self,long proj_code,long zone=0,double argin[15]=0,long datum_code=0){
3715 1 : return OSRImportFromUSGS( self, proj_code, zone, argin, datum_code );
3716 : }
3717 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromXML(OSRSpatialReferenceShadow *self,char const *xmlString){
3718 1 : return OSRImportFromXML( self, xmlString );
3719 : }
3720 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromERM(OSRSpatialReferenceShadow *self,char const *proj,char const *datum,char const *units){
3721 6 : return OSRImportFromERM( self, proj, datum, units );
3722 : }
3723 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromMICoordSys(OSRSpatialReferenceShadow *self,char const *pszCoordSys){
3724 1 : return OSRImportFromMICoordSys( self, pszCoordSys );
3725 : }
3726 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ImportFromOzi(OSRSpatialReferenceShadow *self,char const *datum,char const *proj,char const *projParms){
3727 3 : return OSRImportFromOzi( self, datum, proj, projParms );
3728 : }
3729 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToWkt(OSRSpatialReferenceShadow *self,char **argout){
3730 60393 : return OSRExportToWkt( self, argout );
3731 : }
3732 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPrettyWkt(OSRSpatialReferenceShadow *self,char **argout,int simplify=0){
3733 34 : return OSRExportToPrettyWkt( self, argout, simplify );
3734 : }
3735 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToProj4(OSRSpatialReferenceShadow *self,char **argout){
3736 104 : return OSRExportToProj4( self, argout );
3737 : }
3738 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToPCI(OSRSpatialReferenceShadow *self,char **proj,char **units,double *parms[17]){
3739 6 : return OSRExportToPCI( self, proj, units, parms );
3740 : }
3741 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToUSGS(OSRSpatialReferenceShadow *self,long *code,long *zone,double *parms[15],long *datum){
3742 1 : return OSRExportToUSGS( self, code, zone, parms, datum );
3743 : }
3744 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToXML(OSRSpatialReferenceShadow *self,char **argout,char const *dialect=""){
3745 1 : return OSRExportToXML( self, argout, dialect );
3746 : }
3747 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_ExportToMICoordSys(OSRSpatialReferenceShadow *self,char **argout){
3748 1 : return OSRExportToMICoordSys( self, argout );
3749 : }
3750 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_CloneGeogCS(OSRSpatialReferenceShadow *self){
3751 14 : return (OSRSpatialReferenceShadow*) OSRCloneGeogCS(self);
3752 : }
3753 : SWIGINTERN OSRSpatialReferenceShadow *OSRSpatialReferenceShadow_Clone(OSRSpatialReferenceShadow *self){
3754 28494 : return (OSRSpatialReferenceShadow*) OSRClone(self);
3755 : }
3756 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_Validate(OSRSpatialReferenceShadow *self){
3757 60 : return OSRValidate(self);
3758 : }
3759 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_StripCTParms(OSRSpatialReferenceShadow *self){
3760 16693 : return OSRStripCTParms(self);
3761 : }
3762 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_FixupOrdering(OSRSpatialReferenceShadow *self){
3763 0 : return OSRFixupOrdering(self);
3764 : }
3765 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_Fixup(OSRSpatialReferenceShadow *self){
3766 1 : return OSRFixup(self);
3767 : }
3768 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphToESRI(OSRSpatialReferenceShadow *self){
3769 14262 : return OSRMorphToESRI(self);
3770 : }
3771 : SWIGINTERN OGRErr OSRSpatialReferenceShadow_MorphFromESRI(OSRSpatialReferenceShadow *self){
3772 14265 : return OSRMorphFromESRI(self);
3773 : }
3774 : SWIGINTERN OSRCoordinateTransformationShadow *new_OSRCoordinateTransformationShadow(OSRSpatialReferenceShadow *src,OSRSpatialReferenceShadow *dst){
3775 38 : OSRCoordinateTransformationShadow *obj = (OSRCoordinateTransformationShadow*) OCTNewCoordinateTransformation( src, dst );
3776 38 : return obj;
3777 : }
3778 : SWIGINTERN void delete_OSRCoordinateTransformationShadow(OSRCoordinateTransformationShadow *self){
3779 38 : OCTDestroyCoordinateTransformation( self );
3780 : }
3781 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(OSRCoordinateTransformationShadow *self,double inout[3]){
3782 0 : if (self == NULL)
3783 : return;
3784 0 : OCTTransform( self, 1, &inout[0], &inout[1], &inout[2] );
3785 : }
3786 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(OSRCoordinateTransformationShadow *self,double argout[3],double x,double y,double z=0.0){
3787 83 : if (self == NULL)
3788 : return;
3789 83 : argout[0] = x;
3790 83 : argout[1] = y;
3791 83 : argout[2] = z;
3792 83 : OCTTransform( self, 1, &argout[0], &argout[1], &argout[2] );
3793 : }
3794 :
3795 : static int
3796 2 : DecomposeSequenceOfCoordinates( PyObject *seq, int nCount, double *x, double *y, double *z )
3797 : {
3798 6 : for( int i = 0; i<nCount; ++i )
3799 : {
3800 :
3801 4 : PyObject *o = PySequence_GetItem(seq, i);
3802 4 : if ( !PySequence_Check(o) )
3803 : {
3804 0 : Py_DECREF(o);
3805 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
3806 :
3807 0 : return FALSE;
3808 : }
3809 :
3810 4 : Py_ssize_t len = PySequence_Size(o);
3811 :
3812 4 : if (len == 2 || len == 3)
3813 : {
3814 4 : PyObject *o1 = PySequence_GetItem(o, 0);
3815 4 : if (!PyNumber_Check(o1))
3816 : {
3817 0 : Py_DECREF(o); Py_DECREF(o1);
3818 0 : PyErr_SetString(PyExc_TypeError, "not a number");
3819 :
3820 0 : return FALSE;
3821 : }
3822 4 : x[i] = PyFloat_AsDouble(o1);
3823 4 : Py_DECREF(o1);
3824 :
3825 4 : o1 = PySequence_GetItem(o, 1);
3826 4 : if (!PyNumber_Check(o1))
3827 : {
3828 0 : Py_DECREF(o); Py_DECREF(o1);
3829 0 : PyErr_SetString(PyExc_TypeError, "not a number");
3830 :
3831 0 : return FALSE;
3832 : }
3833 4 : y[i] = PyFloat_AsDouble(o1);
3834 4 : Py_DECREF(o1);
3835 :
3836 : /* The 3rd coordinate is optional, default 0.0 */
3837 4 : if (len == 3)
3838 : {
3839 2 : o1 = PySequence_GetItem(o, 2);
3840 2 : if (!PyNumber_Check(o1))
3841 : {
3842 0 : Py_DECREF(o); Py_DECREF(o1);
3843 0 : PyErr_SetString(PyExc_TypeError, "not a number");
3844 :
3845 0 : return FALSE;
3846 : }
3847 2 : z[i] = PyFloat_AsDouble(o1);
3848 2 : Py_DECREF(o1);
3849 : }
3850 : else
3851 : {
3852 2 : z[i] = 0.0;
3853 : }
3854 : }
3855 : else
3856 : {
3857 0 : Py_DECREF(o);
3858 0 : PyErr_SetString(PyExc_TypeError, "invalid coordinate");
3859 :
3860 0 : return FALSE;
3861 : }
3862 :
3863 4 : Py_DECREF(o);
3864 : }
3865 :
3866 2 : return TRUE;
3867 : }
3868 :
3869 : SWIGINTERN void OSRCoordinateTransformationShadow_TransformPoints(OSRCoordinateTransformationShadow *self,int nCount,double *x,double *y,double *z){
3870 2 : if (self == NULL)
3871 : return;
3872 2 : OCTTransform( self, nCount, x, y, z );
3873 : }
3874 : #ifdef __cplusplus
3875 : extern "C" {
3876 : #endif
3877 0 : SWIGINTERN PyObject *_wrap_GetUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3878 0 : PyObject *resultobj = 0;
3879 : int result;
3880 :
3881 0 : if (!PyArg_ParseTuple(args,(char *)":GetUseExceptions")) SWIG_fail;
3882 0 : result = (int)GetUseExceptions();
3883 0 : resultobj = SWIG_From_int(static_cast< int >(result));
3884 0 : return resultobj;
3885 : fail:
3886 0 : return NULL;
3887 : }
3888 :
3889 :
3890 0 : SWIGINTERN PyObject *_wrap_UseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3891 0 : PyObject *resultobj = 0;
3892 :
3893 0 : if (!PyArg_ParseTuple(args,(char *)":UseExceptions")) SWIG_fail;
3894 0 : UseExceptions();
3895 0 : resultobj = SWIG_Py_Void();
3896 0 : return resultobj;
3897 : fail:
3898 0 : return NULL;
3899 : }
3900 :
3901 :
3902 0 : SWIGINTERN PyObject *_wrap_DontUseExceptions(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3903 0 : PyObject *resultobj = 0;
3904 :
3905 0 : if (!PyArg_ParseTuple(args,(char *)":DontUseExceptions")) SWIG_fail;
3906 0 : DontUseExceptions();
3907 0 : resultobj = SWIG_Py_Void();
3908 0 : return resultobj;
3909 : fail:
3910 0 : return NULL;
3911 : }
3912 :
3913 :
3914 0 : SWIGINTERN PyObject *_wrap_GetWellKnownGeogCSAsWKT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
3915 0 : PyObject *resultobj = 0;
3916 0 : char *arg1 = (char *) 0 ;
3917 0 : char **arg2 = (char **) 0 ;
3918 : int res1 ;
3919 0 : char *buf1 = 0 ;
3920 0 : int alloc1 = 0 ;
3921 0 : char *argout2 = 0 ;
3922 0 : PyObject * obj0 = 0 ;
3923 : OGRErr result;
3924 :
3925 : {
3926 : /* %typemap(in,numinputs=0) (char **argout2) */
3927 0 : arg2 = &argout2;
3928 : }
3929 0 : if (!PyArg_ParseTuple(args,(char *)"O:GetWellKnownGeogCSAsWKT",&obj0)) SWIG_fail;
3930 0 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
3931 0 : if (!SWIG_IsOK(res1)) {
3932 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetWellKnownGeogCSAsWKT" "', argument " "1"" of type '" "char const *""'");
3933 : }
3934 0 : arg1 = reinterpret_cast< char * >(buf1);
3935 : {
3936 0 : if (!arg1) {
3937 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
3938 : }
3939 : }
3940 : {
3941 0 : if ( bUseExceptions ) {
3942 0 : CPLErrorReset();
3943 : }
3944 0 : result = (OGRErr)GetWellKnownGeogCSAsWKT((char const *)arg1,arg2);
3945 0 : if ( bUseExceptions ) {
3946 0 : CPLErr eclass = CPLGetLastErrorType();
3947 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
3948 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
3949 : }
3950 : }
3951 : }
3952 : {
3953 : /* %typemap(out) OGRErr */
3954 0 : if ( result != 0 && bUseExceptions) {
3955 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
3956 0 : SWIG_fail;
3957 : }
3958 : }
3959 : {
3960 : /* %typemap(argout) (char **argout) */
3961 : PyObject *o;
3962 0 : if ( arg2 != NULL && *arg2 != NULL) {
3963 0 : o = GDALPythonObjectFromCStr( *arg2 );
3964 : }
3965 : else {
3966 0 : o = Py_None;
3967 0 : Py_INCREF( o );
3968 : }
3969 0 : resultobj = t_output_helper(resultobj, o);
3970 : }
3971 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3972 : {
3973 : /* %typemap(freearg) (char **argout) */
3974 0 : if ( *arg2 )
3975 0 : CPLFree( *arg2 );
3976 : }
3977 : {
3978 : /* %typemap(ret) OGRErr */
3979 0 : if (resultobj == Py_None ) {
3980 0 : Py_DECREF(resultobj);
3981 0 : resultobj = 0;
3982 : }
3983 0 : if (resultobj == 0) {
3984 0 : resultobj = PyInt_FromLong( result );
3985 : }
3986 : }
3987 0 : return resultobj;
3988 : fail:
3989 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
3990 : {
3991 : /* %typemap(freearg) (char **argout) */
3992 0 : if ( *arg2 )
3993 0 : CPLFree( *arg2 );
3994 : }
3995 0 : return NULL;
3996 : }
3997 :
3998 :
3999 8 : SWIGINTERN PyObject *_wrap_GetUserInputAsWKT(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4000 8 : PyObject *resultobj = 0;
4001 8 : char *arg1 = (char *) 0 ;
4002 8 : char **arg2 = (char **) 0 ;
4003 : int res1 ;
4004 8 : char *buf1 = 0 ;
4005 8 : int alloc1 = 0 ;
4006 8 : char *argout2 = 0 ;
4007 8 : PyObject * obj0 = 0 ;
4008 : OGRErr result;
4009 :
4010 : {
4011 : /* %typemap(in,numinputs=0) (char **argout2) */
4012 8 : arg2 = &argout2;
4013 : }
4014 8 : if (!PyArg_ParseTuple(args,(char *)"O:GetUserInputAsWKT",&obj0)) SWIG_fail;
4015 8 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
4016 8 : if (!SWIG_IsOK(res1)) {
4017 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetUserInputAsWKT" "', argument " "1"" of type '" "char const *""'");
4018 : }
4019 8 : arg1 = reinterpret_cast< char * >(buf1);
4020 : {
4021 8 : if (!arg1) {
4022 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4023 : }
4024 : }
4025 : {
4026 8 : if ( bUseExceptions ) {
4027 0 : CPLErrorReset();
4028 : }
4029 8 : result = (OGRErr)GetUserInputAsWKT((char const *)arg1,arg2);
4030 8 : if ( bUseExceptions ) {
4031 0 : CPLErr eclass = CPLGetLastErrorType();
4032 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4033 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4034 : }
4035 : }
4036 : }
4037 : {
4038 : /* %typemap(out) OGRErr */
4039 8 : if ( result != 0 && bUseExceptions) {
4040 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4041 0 : SWIG_fail;
4042 : }
4043 : }
4044 : {
4045 : /* %typemap(argout) (char **argout) */
4046 : PyObject *o;
4047 16 : if ( arg2 != NULL && *arg2 != NULL) {
4048 8 : o = GDALPythonObjectFromCStr( *arg2 );
4049 : }
4050 : else {
4051 0 : o = Py_None;
4052 0 : Py_INCREF( o );
4053 : }
4054 8 : resultobj = t_output_helper(resultobj, o);
4055 : }
4056 8 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4057 : {
4058 : /* %typemap(freearg) (char **argout) */
4059 8 : if ( *arg2 )
4060 8 : CPLFree( *arg2 );
4061 : }
4062 : {
4063 : /* %typemap(ret) OGRErr */
4064 8 : if (resultobj == Py_None ) {
4065 0 : Py_DECREF(resultobj);
4066 0 : resultobj = 0;
4067 : }
4068 8 : if (resultobj == 0) {
4069 0 : resultobj = PyInt_FromLong( result );
4070 : }
4071 : }
4072 8 : return resultobj;
4073 : fail:
4074 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4075 : {
4076 : /* %typemap(freearg) (char **argout) */
4077 0 : if ( *arg2 )
4078 0 : CPLFree( *arg2 );
4079 : }
4080 0 : return NULL;
4081 : }
4082 :
4083 :
4084 15563 : SWIGINTERN PyObject *_wrap_new_SpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
4085 15563 : PyObject *resultobj = 0;
4086 15563 : char *arg1 = (char *) "" ;
4087 : int res1 ;
4088 15563 : char *buf1 = 0 ;
4089 15563 : int alloc1 = 0 ;
4090 15563 : PyObject * obj0 = 0 ;
4091 : char * kwnames[] = {
4092 : (char *) "wkt", NULL
4093 15563 : };
4094 15563 : OSRSpatialReferenceShadow *result = 0 ;
4095 :
4096 15563 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"|O:new_SpatialReference",kwnames,&obj0)) SWIG_fail;
4097 15563 : if (obj0) {
4098 188 : res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
4099 188 : if (!SWIG_IsOK(res1)) {
4100 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpatialReference" "', argument " "1"" of type '" "char const *""'");
4101 : }
4102 188 : arg1 = reinterpret_cast< char * >(buf1);
4103 : }
4104 : {
4105 15563 : if ( bUseExceptions ) {
4106 0 : CPLErrorReset();
4107 : }
4108 15563 : result = (OSRSpatialReferenceShadow *)new_OSRSpatialReferenceShadow((char const *)arg1);
4109 15563 : if ( bUseExceptions ) {
4110 0 : CPLErr eclass = CPLGetLastErrorType();
4111 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4112 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4113 : }
4114 : }
4115 : }
4116 15563 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_NEW | 0 );
4117 15563 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4118 15563 : return resultobj;
4119 : fail:
4120 0 : if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
4121 0 : return NULL;
4122 : }
4123 :
4124 :
4125 44233 : SWIGINTERN PyObject *_wrap_delete_SpatialReference(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4126 44233 : PyObject *resultobj = 0;
4127 44233 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4128 44233 : void *argp1 = 0 ;
4129 44233 : int res1 = 0 ;
4130 44233 : PyObject * obj0 = 0 ;
4131 :
4132 44233 : if (!PyArg_ParseTuple(args,(char *)"O:delete_SpatialReference",&obj0)) SWIG_fail;
4133 44233 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_DISOWN | 0 );
4134 44233 : if (!SWIG_IsOK(res1)) {
4135 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SpatialReference" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4136 : }
4137 44233 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4138 : {
4139 44233 : if ( bUseExceptions ) {
4140 0 : CPLErrorReset();
4141 : }
4142 : delete_OSRSpatialReferenceShadow(arg1);
4143 44233 : if ( bUseExceptions ) {
4144 0 : CPLErr eclass = CPLGetLastErrorType();
4145 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4146 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4147 : }
4148 : }
4149 : }
4150 44233 : resultobj = SWIG_Py_Void();
4151 44233 : return resultobj;
4152 : fail:
4153 0 : return NULL;
4154 : }
4155 :
4156 :
4157 14 : SWIGINTERN PyObject *_wrap_SpatialReference___str__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4158 14 : PyObject *resultobj = 0;
4159 14 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4160 14 : void *argp1 = 0 ;
4161 14 : int res1 = 0 ;
4162 14 : PyObject * obj0 = 0 ;
4163 14 : retStringAndCPLFree *result = 0 ;
4164 :
4165 14 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference___str__",&obj0)) SWIG_fail;
4166 14 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4167 14 : if (!SWIG_IsOK(res1)) {
4168 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference___str__" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4169 : }
4170 14 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4171 : {
4172 14 : if ( bUseExceptions ) {
4173 0 : CPLErrorReset();
4174 : }
4175 14 : result = (retStringAndCPLFree *)OSRSpatialReferenceShadow___str__(arg1);
4176 14 : if ( bUseExceptions ) {
4177 0 : CPLErr eclass = CPLGetLastErrorType();
4178 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4179 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4180 : }
4181 : }
4182 : }
4183 : {
4184 : /* %typemap(out) (retStringAndCPLFree*) */
4185 14 : if(result)
4186 : {
4187 14 : resultobj = GDALPythonObjectFromCStr( (const char *)result);
4188 14 : CPLFree(result);
4189 : }
4190 : }
4191 14 : return resultobj;
4192 : fail:
4193 0 : return NULL;
4194 : }
4195 :
4196 :
4197 14499 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSame(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4198 14499 : PyObject *resultobj = 0;
4199 14499 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4200 14499 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
4201 14499 : void *argp1 = 0 ;
4202 14499 : int res1 = 0 ;
4203 14499 : void *argp2 = 0 ;
4204 14499 : int res2 = 0 ;
4205 14499 : PyObject * obj0 = 0 ;
4206 14499 : PyObject * obj1 = 0 ;
4207 : int result;
4208 :
4209 14499 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_IsSame",&obj0,&obj1)) SWIG_fail;
4210 14499 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4211 14499 : if (!SWIG_IsOK(res1)) {
4212 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSame" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4213 : }
4214 14499 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4215 14499 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4216 14499 : if (!SWIG_IsOK(res2)) {
4217 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSame" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
4218 : }
4219 14499 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
4220 : {
4221 14499 : if (!arg2) {
4222 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4223 : }
4224 : }
4225 : {
4226 14499 : if ( bUseExceptions ) {
4227 0 : CPLErrorReset();
4228 : }
4229 14499 : result = (int)OSRSpatialReferenceShadow_IsSame(arg1,arg2);
4230 14499 : if ( bUseExceptions ) {
4231 0 : CPLErr eclass = CPLGetLastErrorType();
4232 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4233 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4234 : }
4235 : }
4236 : }
4237 14499 : resultobj = SWIG_From_int(static_cast< int >(result));
4238 14499 : return resultobj;
4239 : fail:
4240 0 : return NULL;
4241 : }
4242 :
4243 :
4244 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSameGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4245 0 : PyObject *resultobj = 0;
4246 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4247 0 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
4248 0 : void *argp1 = 0 ;
4249 0 : int res1 = 0 ;
4250 0 : void *argp2 = 0 ;
4251 0 : int res2 = 0 ;
4252 0 : PyObject * obj0 = 0 ;
4253 0 : PyObject * obj1 = 0 ;
4254 : int result;
4255 :
4256 0 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_IsSameGeogCS",&obj0,&obj1)) SWIG_fail;
4257 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4258 0 : if (!SWIG_IsOK(res1)) {
4259 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSameGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4260 : }
4261 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4262 0 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4263 0 : if (!SWIG_IsOK(res2)) {
4264 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSameGeogCS" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
4265 : }
4266 0 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
4267 : {
4268 0 : if (!arg2) {
4269 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4270 : }
4271 : }
4272 : {
4273 0 : if ( bUseExceptions ) {
4274 0 : CPLErrorReset();
4275 : }
4276 0 : result = (int)OSRSpatialReferenceShadow_IsSameGeogCS(arg1,arg2);
4277 0 : if ( bUseExceptions ) {
4278 0 : CPLErr eclass = CPLGetLastErrorType();
4279 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4280 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4281 : }
4282 : }
4283 : }
4284 0 : resultobj = SWIG_From_int(static_cast< int >(result));
4285 0 : return resultobj;
4286 : fail:
4287 0 : return NULL;
4288 : }
4289 :
4290 :
4291 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsSameVertCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4292 0 : PyObject *resultobj = 0;
4293 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4294 0 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
4295 0 : void *argp1 = 0 ;
4296 0 : int res1 = 0 ;
4297 0 : void *argp2 = 0 ;
4298 0 : int res2 = 0 ;
4299 0 : PyObject * obj0 = 0 ;
4300 0 : PyObject * obj1 = 0 ;
4301 : int result;
4302 :
4303 0 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_IsSameVertCS",&obj0,&obj1)) SWIG_fail;
4304 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4305 0 : if (!SWIG_IsOK(res1)) {
4306 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsSameVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4307 : }
4308 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4309 0 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4310 0 : if (!SWIG_IsOK(res2)) {
4311 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_IsSameVertCS" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
4312 : }
4313 0 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
4314 : {
4315 0 : if (!arg2) {
4316 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4317 : }
4318 : }
4319 : {
4320 0 : if ( bUseExceptions ) {
4321 0 : CPLErrorReset();
4322 : }
4323 0 : result = (int)OSRSpatialReferenceShadow_IsSameVertCS(arg1,arg2);
4324 0 : if ( bUseExceptions ) {
4325 0 : CPLErr eclass = CPLGetLastErrorType();
4326 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4327 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4328 : }
4329 : }
4330 : }
4331 0 : resultobj = SWIG_From_int(static_cast< int >(result));
4332 0 : return resultobj;
4333 : fail:
4334 0 : return NULL;
4335 : }
4336 :
4337 :
4338 1 : SWIGINTERN PyObject *_wrap_SpatialReference_IsGeographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4339 1 : PyObject *resultobj = 0;
4340 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4341 1 : void *argp1 = 0 ;
4342 1 : int res1 = 0 ;
4343 1 : PyObject * obj0 = 0 ;
4344 : int result;
4345 :
4346 1 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_IsGeographic",&obj0)) SWIG_fail;
4347 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4348 1 : if (!SWIG_IsOK(res1)) {
4349 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsGeographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4350 : }
4351 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4352 : {
4353 1 : if ( bUseExceptions ) {
4354 0 : CPLErrorReset();
4355 : }
4356 1 : result = (int)OSRSpatialReferenceShadow_IsGeographic(arg1);
4357 1 : if ( bUseExceptions ) {
4358 0 : CPLErr eclass = CPLGetLastErrorType();
4359 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4360 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4361 : }
4362 : }
4363 : }
4364 1 : resultobj = SWIG_From_int(static_cast< int >(result));
4365 1 : return resultobj;
4366 : fail:
4367 0 : return NULL;
4368 : }
4369 :
4370 :
4371 3 : SWIGINTERN PyObject *_wrap_SpatialReference_IsProjected(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4372 3 : PyObject *resultobj = 0;
4373 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4374 3 : void *argp1 = 0 ;
4375 3 : int res1 = 0 ;
4376 3 : PyObject * obj0 = 0 ;
4377 : int result;
4378 :
4379 3 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_IsProjected",&obj0)) SWIG_fail;
4380 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4381 3 : if (!SWIG_IsOK(res1)) {
4382 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsProjected" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4383 : }
4384 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4385 : {
4386 3 : if ( bUseExceptions ) {
4387 0 : CPLErrorReset();
4388 : }
4389 3 : result = (int)OSRSpatialReferenceShadow_IsProjected(arg1);
4390 3 : if ( bUseExceptions ) {
4391 0 : CPLErr eclass = CPLGetLastErrorType();
4392 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4393 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4394 : }
4395 : }
4396 : }
4397 3 : resultobj = SWIG_From_int(static_cast< int >(result));
4398 3 : return resultobj;
4399 : fail:
4400 0 : return NULL;
4401 : }
4402 :
4403 :
4404 1 : SWIGINTERN PyObject *_wrap_SpatialReference_IsCompound(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4405 1 : PyObject *resultobj = 0;
4406 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4407 1 : void *argp1 = 0 ;
4408 1 : int res1 = 0 ;
4409 1 : PyObject * obj0 = 0 ;
4410 : int result;
4411 :
4412 1 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_IsCompound",&obj0)) SWIG_fail;
4413 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4414 1 : if (!SWIG_IsOK(res1)) {
4415 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsCompound" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4416 : }
4417 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4418 : {
4419 1 : if ( bUseExceptions ) {
4420 0 : CPLErrorReset();
4421 : }
4422 1 : result = (int)OSRSpatialReferenceShadow_IsCompound(arg1);
4423 1 : if ( bUseExceptions ) {
4424 0 : CPLErr eclass = CPLGetLastErrorType();
4425 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4426 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4427 : }
4428 : }
4429 : }
4430 1 : resultobj = SWIG_From_int(static_cast< int >(result));
4431 1 : return resultobj;
4432 : fail:
4433 0 : return NULL;
4434 : }
4435 :
4436 :
4437 2 : SWIGINTERN PyObject *_wrap_SpatialReference_IsGeocentric(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4438 2 : PyObject *resultobj = 0;
4439 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4440 2 : void *argp1 = 0 ;
4441 2 : int res1 = 0 ;
4442 2 : PyObject * obj0 = 0 ;
4443 : int result;
4444 :
4445 2 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_IsGeocentric",&obj0)) SWIG_fail;
4446 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4447 2 : if (!SWIG_IsOK(res1)) {
4448 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsGeocentric" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4449 : }
4450 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4451 : {
4452 2 : if ( bUseExceptions ) {
4453 0 : CPLErrorReset();
4454 : }
4455 2 : result = (int)OSRSpatialReferenceShadow_IsGeocentric(arg1);
4456 2 : if ( bUseExceptions ) {
4457 0 : CPLErr eclass = CPLGetLastErrorType();
4458 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4459 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4460 : }
4461 : }
4462 : }
4463 2 : resultobj = SWIG_From_int(static_cast< int >(result));
4464 2 : return resultobj;
4465 : fail:
4466 0 : return NULL;
4467 : }
4468 :
4469 :
4470 1 : SWIGINTERN PyObject *_wrap_SpatialReference_IsLocal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4471 1 : PyObject *resultobj = 0;
4472 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4473 1 : void *argp1 = 0 ;
4474 1 : int res1 = 0 ;
4475 1 : PyObject * obj0 = 0 ;
4476 : int result;
4477 :
4478 1 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_IsLocal",&obj0)) SWIG_fail;
4479 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4480 1 : if (!SWIG_IsOK(res1)) {
4481 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsLocal" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4482 : }
4483 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4484 : {
4485 1 : if ( bUseExceptions ) {
4486 0 : CPLErrorReset();
4487 : }
4488 1 : result = (int)OSRSpatialReferenceShadow_IsLocal(arg1);
4489 1 : if ( bUseExceptions ) {
4490 0 : CPLErr eclass = CPLGetLastErrorType();
4491 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4492 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4493 : }
4494 : }
4495 : }
4496 1 : resultobj = SWIG_From_int(static_cast< int >(result));
4497 1 : return resultobj;
4498 : fail:
4499 0 : return NULL;
4500 : }
4501 :
4502 :
4503 0 : SWIGINTERN PyObject *_wrap_SpatialReference_IsVertical(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4504 0 : PyObject *resultobj = 0;
4505 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4506 0 : void *argp1 = 0 ;
4507 0 : int res1 = 0 ;
4508 0 : PyObject * obj0 = 0 ;
4509 : int result;
4510 :
4511 0 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_IsVertical",&obj0)) SWIG_fail;
4512 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4513 0 : if (!SWIG_IsOK(res1)) {
4514 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_IsVertical" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4515 : }
4516 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4517 : {
4518 0 : if ( bUseExceptions ) {
4519 0 : CPLErrorReset();
4520 : }
4521 0 : result = (int)OSRSpatialReferenceShadow_IsVertical(arg1);
4522 0 : if ( bUseExceptions ) {
4523 0 : CPLErr eclass = CPLGetLastErrorType();
4524 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4525 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4526 : }
4527 : }
4528 : }
4529 0 : resultobj = SWIG_From_int(static_cast< int >(result));
4530 0 : return resultobj;
4531 : fail:
4532 0 : return NULL;
4533 : }
4534 :
4535 :
4536 4 : SWIGINTERN PyObject *_wrap_SpatialReference_EPSGTreatsAsLatLong(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4537 4 : PyObject *resultobj = 0;
4538 4 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4539 4 : void *argp1 = 0 ;
4540 4 : int res1 = 0 ;
4541 4 : PyObject * obj0 = 0 ;
4542 : int result;
4543 :
4544 4 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_EPSGTreatsAsLatLong",&obj0)) SWIG_fail;
4545 4 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4546 4 : if (!SWIG_IsOK(res1)) {
4547 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_EPSGTreatsAsLatLong" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4548 : }
4549 4 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4550 : {
4551 4 : if ( bUseExceptions ) {
4552 0 : CPLErrorReset();
4553 : }
4554 4 : result = (int)OSRSpatialReferenceShadow_EPSGTreatsAsLatLong(arg1);
4555 4 : if ( bUseExceptions ) {
4556 0 : CPLErr eclass = CPLGetLastErrorType();
4557 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4558 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4559 : }
4560 : }
4561 : }
4562 4 : resultobj = SWIG_From_int(static_cast< int >(result));
4563 4 : return resultobj;
4564 : fail:
4565 0 : return NULL;
4566 : }
4567 :
4568 :
4569 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAuthority(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4570 0 : PyObject *resultobj = 0;
4571 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4572 0 : char *arg2 = (char *) 0 ;
4573 0 : char *arg3 = (char *) 0 ;
4574 : int arg4 ;
4575 0 : void *argp1 = 0 ;
4576 0 : int res1 = 0 ;
4577 : int res2 ;
4578 0 : char *buf2 = 0 ;
4579 0 : int alloc2 = 0 ;
4580 : int res3 ;
4581 0 : char *buf3 = 0 ;
4582 0 : int alloc3 = 0 ;
4583 : int val4 ;
4584 0 : int ecode4 = 0 ;
4585 0 : PyObject * obj0 = 0 ;
4586 0 : PyObject * obj1 = 0 ;
4587 0 : PyObject * obj2 = 0 ;
4588 0 : PyObject * obj3 = 0 ;
4589 : OGRErr result;
4590 :
4591 0 : if (!PyArg_ParseTuple(args,(char *)"OOOO:SpatialReference_SetAuthority",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
4592 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4593 0 : if (!SWIG_IsOK(res1)) {
4594 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAuthority" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4595 : }
4596 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4597 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4598 0 : if (!SWIG_IsOK(res2)) {
4599 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAuthority" "', argument " "2"" of type '" "char const *""'");
4600 : }
4601 0 : arg2 = reinterpret_cast< char * >(buf2);
4602 0 : res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4603 0 : if (!SWIG_IsOK(res3)) {
4604 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetAuthority" "', argument " "3"" of type '" "char const *""'");
4605 : }
4606 0 : arg3 = reinterpret_cast< char * >(buf3);
4607 0 : ecode4 = SWIG_AsVal_int(obj3, &val4);
4608 0 : if (!SWIG_IsOK(ecode4)) {
4609 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetAuthority" "', argument " "4"" of type '" "int""'");
4610 : }
4611 0 : arg4 = static_cast< int >(val4);
4612 : {
4613 0 : if ( bUseExceptions ) {
4614 0 : CPLErrorReset();
4615 : }
4616 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAuthority(arg1,(char const *)arg2,(char const *)arg3,arg4);
4617 0 : if ( bUseExceptions ) {
4618 0 : CPLErr eclass = CPLGetLastErrorType();
4619 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4620 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4621 : }
4622 : }
4623 : }
4624 : {
4625 : /* %typemap(out) OGRErr */
4626 0 : if ( result != 0 && bUseExceptions) {
4627 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4628 0 : SWIG_fail;
4629 : }
4630 : }
4631 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4632 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4633 : {
4634 : /* %typemap(ret) OGRErr */
4635 0 : if (resultobj == Py_None ) {
4636 0 : Py_DECREF(resultobj);
4637 0 : resultobj = 0;
4638 : }
4639 0 : if (resultobj == 0) {
4640 0 : resultobj = PyInt_FromLong( result );
4641 : }
4642 : }
4643 0 : return resultobj;
4644 : fail:
4645 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4646 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4647 0 : return NULL;
4648 : }
4649 :
4650 :
4651 20257 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAttrValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4652 20257 : PyObject *resultobj = 0;
4653 20257 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4654 20257 : char *arg2 = (char *) 0 ;
4655 20257 : int arg3 = (int) 0 ;
4656 20257 : void *argp1 = 0 ;
4657 20257 : int res1 = 0 ;
4658 : int res2 ;
4659 20257 : char *buf2 = 0 ;
4660 20257 : int alloc2 = 0 ;
4661 : int val3 ;
4662 20257 : int ecode3 = 0 ;
4663 20257 : PyObject * obj0 = 0 ;
4664 20257 : PyObject * obj1 = 0 ;
4665 20257 : PyObject * obj2 = 0 ;
4666 20257 : char *result = 0 ;
4667 :
4668 20257 : if (!PyArg_ParseTuple(args,(char *)"OO|O:SpatialReference_GetAttrValue",&obj0,&obj1,&obj2)) SWIG_fail;
4669 20257 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4670 20257 : if (!SWIG_IsOK(res1)) {
4671 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAttrValue" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4672 : }
4673 20257 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4674 20257 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4675 20257 : if (!SWIG_IsOK(res2)) {
4676 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAttrValue" "', argument " "2"" of type '" "char const *""'");
4677 : }
4678 20257 : arg2 = reinterpret_cast< char * >(buf2);
4679 20257 : if (obj2) {
4680 90 : ecode3 = SWIG_AsVal_int(obj2, &val3);
4681 90 : if (!SWIG_IsOK(ecode3)) {
4682 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetAttrValue" "', argument " "3"" of type '" "int""'");
4683 : }
4684 90 : arg3 = static_cast< int >(val3);
4685 : }
4686 : {
4687 20257 : if (!arg2) {
4688 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4689 : }
4690 : }
4691 : {
4692 20257 : if ( bUseExceptions ) {
4693 0 : CPLErrorReset();
4694 : }
4695 20257 : result = (char *)OSRSpatialReferenceShadow_GetAttrValue(arg1,(char const *)arg2,arg3);
4696 20257 : if ( bUseExceptions ) {
4697 0 : CPLErr eclass = CPLGetLastErrorType();
4698 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4699 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4700 : }
4701 : }
4702 : }
4703 20257 : resultobj = SWIG_FromCharPtr((const char *)result);
4704 20257 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4705 20257 : return resultobj;
4706 : fail:
4707 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4708 0 : return NULL;
4709 : }
4710 :
4711 :
4712 621 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAttrValue(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4713 621 : PyObject *resultobj = 0;
4714 621 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4715 621 : char *arg2 = (char *) 0 ;
4716 621 : char *arg3 = (char *) 0 ;
4717 621 : void *argp1 = 0 ;
4718 621 : int res1 = 0 ;
4719 : int res2 ;
4720 621 : char *buf2 = 0 ;
4721 621 : int alloc2 = 0 ;
4722 : int res3 ;
4723 621 : char *buf3 = 0 ;
4724 621 : int alloc3 = 0 ;
4725 621 : PyObject * obj0 = 0 ;
4726 621 : PyObject * obj1 = 0 ;
4727 621 : PyObject * obj2 = 0 ;
4728 : OGRErr result;
4729 :
4730 621 : if (!PyArg_ParseTuple(args,(char *)"OOO:SpatialReference_SetAttrValue",&obj0,&obj1,&obj2)) SWIG_fail;
4731 621 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4732 621 : if (!SWIG_IsOK(res1)) {
4733 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAttrValue" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4734 : }
4735 621 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4736 621 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4737 621 : if (!SWIG_IsOK(res2)) {
4738 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAttrValue" "', argument " "2"" of type '" "char const *""'");
4739 : }
4740 621 : arg2 = reinterpret_cast< char * >(buf2);
4741 621 : res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4742 621 : if (!SWIG_IsOK(res3)) {
4743 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetAttrValue" "', argument " "3"" of type '" "char const *""'");
4744 : }
4745 621 : arg3 = reinterpret_cast< char * >(buf3);
4746 : {
4747 621 : if (!arg2) {
4748 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4749 : }
4750 : }
4751 : {
4752 621 : if ( bUseExceptions ) {
4753 0 : CPLErrorReset();
4754 : }
4755 621 : result = (OGRErr)OSRSpatialReferenceShadow_SetAttrValue(arg1,(char const *)arg2,(char const *)arg3);
4756 621 : if ( bUseExceptions ) {
4757 0 : CPLErr eclass = CPLGetLastErrorType();
4758 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4759 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4760 : }
4761 : }
4762 : }
4763 : {
4764 : /* %typemap(out) OGRErr */
4765 621 : if ( result != 0 && bUseExceptions) {
4766 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4767 0 : SWIG_fail;
4768 : }
4769 : }
4770 621 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4771 621 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4772 : {
4773 : /* %typemap(ret) OGRErr */
4774 621 : if (resultobj == Py_None ) {
4775 0 : Py_DECREF(resultobj);
4776 0 : resultobj = 0;
4777 : }
4778 621 : if (resultobj == 0) {
4779 621 : resultobj = PyInt_FromLong( result );
4780 : }
4781 : }
4782 621 : return resultobj;
4783 : fail:
4784 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4785 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4786 0 : return NULL;
4787 : }
4788 :
4789 :
4790 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAngularUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4791 0 : PyObject *resultobj = 0;
4792 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4793 0 : char *arg2 = (char *) 0 ;
4794 : double arg3 ;
4795 0 : void *argp1 = 0 ;
4796 0 : int res1 = 0 ;
4797 : int res2 ;
4798 0 : char *buf2 = 0 ;
4799 0 : int alloc2 = 0 ;
4800 : double val3 ;
4801 0 : int ecode3 = 0 ;
4802 0 : PyObject * obj0 = 0 ;
4803 0 : PyObject * obj1 = 0 ;
4804 0 : PyObject * obj2 = 0 ;
4805 : OGRErr result;
4806 :
4807 0 : if (!PyArg_ParseTuple(args,(char *)"OOO:SpatialReference_SetAngularUnits",&obj0,&obj1,&obj2)) SWIG_fail;
4808 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4809 0 : if (!SWIG_IsOK(res1)) {
4810 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAngularUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4811 : }
4812 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4813 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4814 0 : if (!SWIG_IsOK(res2)) {
4815 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetAngularUnits" "', argument " "2"" of type '" "char const *""'");
4816 : }
4817 0 : arg2 = reinterpret_cast< char * >(buf2);
4818 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
4819 0 : if (!SWIG_IsOK(ecode3)) {
4820 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetAngularUnits" "', argument " "3"" of type '" "double""'");
4821 : }
4822 0 : arg3 = static_cast< double >(val3);
4823 : {
4824 0 : if (!arg2) {
4825 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4826 : }
4827 : }
4828 : {
4829 0 : if ( bUseExceptions ) {
4830 0 : CPLErrorReset();
4831 : }
4832 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAngularUnits(arg1,(char const *)arg2,arg3);
4833 0 : if ( bUseExceptions ) {
4834 0 : CPLErr eclass = CPLGetLastErrorType();
4835 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4836 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4837 : }
4838 : }
4839 : }
4840 : {
4841 : /* %typemap(out) OGRErr */
4842 0 : if ( result != 0 && bUseExceptions) {
4843 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4844 0 : SWIG_fail;
4845 : }
4846 : }
4847 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4848 : {
4849 : /* %typemap(ret) OGRErr */
4850 0 : if (resultobj == Py_None ) {
4851 0 : Py_DECREF(resultobj);
4852 0 : resultobj = 0;
4853 : }
4854 0 : if (resultobj == 0) {
4855 0 : resultobj = PyInt_FromLong( result );
4856 : }
4857 : }
4858 0 : return resultobj;
4859 : fail:
4860 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4861 0 : return NULL;
4862 : }
4863 :
4864 :
4865 0 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAngularUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4866 0 : PyObject *resultobj = 0;
4867 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4868 0 : void *argp1 = 0 ;
4869 0 : int res1 = 0 ;
4870 0 : PyObject * obj0 = 0 ;
4871 : double result;
4872 :
4873 0 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetAngularUnits",&obj0)) SWIG_fail;
4874 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4875 0 : if (!SWIG_IsOK(res1)) {
4876 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAngularUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4877 : }
4878 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4879 : {
4880 0 : if ( bUseExceptions ) {
4881 0 : CPLErrorReset();
4882 : }
4883 0 : result = (double)OSRSpatialReferenceShadow_GetAngularUnits(arg1);
4884 0 : if ( bUseExceptions ) {
4885 0 : CPLErr eclass = CPLGetLastErrorType();
4886 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4887 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4888 : }
4889 : }
4890 : }
4891 0 : resultobj = SWIG_From_double(static_cast< double >(result));
4892 0 : return resultobj;
4893 : fail:
4894 0 : return NULL;
4895 : }
4896 :
4897 :
4898 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTargetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4899 1 : PyObject *resultobj = 0;
4900 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4901 1 : char *arg2 = (char *) 0 ;
4902 1 : char *arg3 = (char *) 0 ;
4903 : double arg4 ;
4904 1 : void *argp1 = 0 ;
4905 1 : int res1 = 0 ;
4906 : int res2 ;
4907 1 : char *buf2 = 0 ;
4908 1 : int alloc2 = 0 ;
4909 : int res3 ;
4910 1 : char *buf3 = 0 ;
4911 1 : int alloc3 = 0 ;
4912 : double val4 ;
4913 1 : int ecode4 = 0 ;
4914 1 : PyObject * obj0 = 0 ;
4915 1 : PyObject * obj1 = 0 ;
4916 1 : PyObject * obj2 = 0 ;
4917 1 : PyObject * obj3 = 0 ;
4918 : OGRErr result;
4919 :
4920 1 : if (!PyArg_ParseTuple(args,(char *)"OOOO:SpatialReference_SetTargetLinearUnits",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
4921 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
4922 1 : if (!SWIG_IsOK(res1)) {
4923 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
4924 : }
4925 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
4926 1 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
4927 1 : if (!SWIG_IsOK(res2)) {
4928 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "2"" of type '" "char const *""'");
4929 : }
4930 1 : arg2 = reinterpret_cast< char * >(buf2);
4931 1 : res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
4932 1 : if (!SWIG_IsOK(res3)) {
4933 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "3"" of type '" "char const *""'");
4934 : }
4935 1 : arg3 = reinterpret_cast< char * >(buf3);
4936 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
4937 1 : if (!SWIG_IsOK(ecode4)) {
4938 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTargetLinearUnits" "', argument " "4"" of type '" "double""'");
4939 : }
4940 1 : arg4 = static_cast< double >(val4);
4941 : {
4942 1 : if (!arg3) {
4943 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
4944 : }
4945 : }
4946 : {
4947 1 : if ( bUseExceptions ) {
4948 0 : CPLErrorReset();
4949 : }
4950 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetTargetLinearUnits(arg1,(char const *)arg2,(char const *)arg3,arg4);
4951 1 : if ( bUseExceptions ) {
4952 0 : CPLErr eclass = CPLGetLastErrorType();
4953 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
4954 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
4955 : }
4956 : }
4957 : }
4958 : {
4959 : /* %typemap(out) OGRErr */
4960 1 : if ( result != 0 && bUseExceptions) {
4961 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
4962 0 : SWIG_fail;
4963 : }
4964 : }
4965 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4966 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4967 : {
4968 : /* %typemap(ret) OGRErr */
4969 1 : if (resultobj == Py_None ) {
4970 0 : Py_DECREF(resultobj);
4971 0 : resultobj = 0;
4972 : }
4973 1 : if (resultobj == 0) {
4974 1 : resultobj = PyInt_FromLong( result );
4975 : }
4976 : }
4977 1 : return resultobj;
4978 : fail:
4979 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
4980 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
4981 0 : return NULL;
4982 : }
4983 :
4984 :
4985 2 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4986 2 : PyObject *resultobj = 0;
4987 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
4988 2 : char *arg2 = (char *) 0 ;
4989 : double arg3 ;
4990 2 : void *argp1 = 0 ;
4991 2 : int res1 = 0 ;
4992 : int res2 ;
4993 2 : char *buf2 = 0 ;
4994 2 : int alloc2 = 0 ;
4995 : double val3 ;
4996 2 : int ecode3 = 0 ;
4997 2 : PyObject * obj0 = 0 ;
4998 2 : PyObject * obj1 = 0 ;
4999 2 : PyObject * obj2 = 0 ;
5000 : OGRErr result;
5001 :
5002 2 : if (!PyArg_ParseTuple(args,(char *)"OOO:SpatialReference_SetLinearUnits",&obj0,&obj1,&obj2)) SWIG_fail;
5003 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5004 2 : if (!SWIG_IsOK(res1)) {
5005 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5006 : }
5007 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5008 2 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5009 2 : if (!SWIG_IsOK(res2)) {
5010 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLinearUnits" "', argument " "2"" of type '" "char const *""'");
5011 : }
5012 2 : arg2 = reinterpret_cast< char * >(buf2);
5013 2 : ecode3 = SWIG_AsVal_double(obj2, &val3);
5014 2 : if (!SWIG_IsOK(ecode3)) {
5015 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLinearUnits" "', argument " "3"" of type '" "double""'");
5016 : }
5017 2 : arg3 = static_cast< double >(val3);
5018 : {
5019 2 : if (!arg2) {
5020 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5021 : }
5022 : }
5023 : {
5024 2 : if ( bUseExceptions ) {
5025 0 : CPLErrorReset();
5026 : }
5027 2 : result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnits(arg1,(char const *)arg2,arg3);
5028 2 : if ( bUseExceptions ) {
5029 0 : CPLErr eclass = CPLGetLastErrorType();
5030 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5031 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5032 : }
5033 : }
5034 : }
5035 : {
5036 : /* %typemap(out) OGRErr */
5037 2 : if ( result != 0 && bUseExceptions) {
5038 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5039 0 : SWIG_fail;
5040 : }
5041 : }
5042 2 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5043 : {
5044 : /* %typemap(ret) OGRErr */
5045 2 : if (resultobj == Py_None ) {
5046 0 : Py_DECREF(resultobj);
5047 0 : resultobj = 0;
5048 : }
5049 2 : if (resultobj == 0) {
5050 2 : resultobj = PyInt_FromLong( result );
5051 : }
5052 : }
5053 2 : return resultobj;
5054 : fail:
5055 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5056 0 : return NULL;
5057 : }
5058 :
5059 :
5060 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLinearUnitsAndUpdateParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5061 1 : PyObject *resultobj = 0;
5062 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5063 1 : char *arg2 = (char *) 0 ;
5064 : double arg3 ;
5065 1 : void *argp1 = 0 ;
5066 1 : int res1 = 0 ;
5067 : int res2 ;
5068 1 : char *buf2 = 0 ;
5069 1 : int alloc2 = 0 ;
5070 : double val3 ;
5071 1 : int ecode3 = 0 ;
5072 1 : PyObject * obj0 = 0 ;
5073 1 : PyObject * obj1 = 0 ;
5074 1 : PyObject * obj2 = 0 ;
5075 : OGRErr result;
5076 :
5077 1 : if (!PyArg_ParseTuple(args,(char *)"OOO:SpatialReference_SetLinearUnitsAndUpdateParameters",&obj0,&obj1,&obj2)) SWIG_fail;
5078 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5079 1 : if (!SWIG_IsOK(res1)) {
5080 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5081 : }
5082 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5083 1 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5084 1 : if (!SWIG_IsOK(res2)) {
5085 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "2"" of type '" "char const *""'");
5086 : }
5087 1 : arg2 = reinterpret_cast< char * >(buf2);
5088 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
5089 1 : if (!SWIG_IsOK(ecode3)) {
5090 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLinearUnitsAndUpdateParameters" "', argument " "3"" of type '" "double""'");
5091 : }
5092 1 : arg3 = static_cast< double >(val3);
5093 : {
5094 1 : if (!arg2) {
5095 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5096 : }
5097 : }
5098 : {
5099 1 : if ( bUseExceptions ) {
5100 0 : CPLErrorReset();
5101 : }
5102 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetLinearUnitsAndUpdateParameters(arg1,(char const *)arg2,arg3);
5103 1 : if ( bUseExceptions ) {
5104 0 : CPLErr eclass = CPLGetLastErrorType();
5105 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5106 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5107 : }
5108 : }
5109 : }
5110 : {
5111 : /* %typemap(out) OGRErr */
5112 1 : if ( result != 0 && bUseExceptions) {
5113 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5114 0 : SWIG_fail;
5115 : }
5116 : }
5117 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5118 : {
5119 : /* %typemap(ret) OGRErr */
5120 1 : if (resultobj == Py_None ) {
5121 0 : Py_DECREF(resultobj);
5122 0 : resultobj = 0;
5123 : }
5124 1 : if (resultobj == 0) {
5125 1 : resultobj = PyInt_FromLong( result );
5126 : }
5127 : }
5128 1 : return resultobj;
5129 : fail:
5130 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5131 0 : return NULL;
5132 : }
5133 :
5134 :
5135 0 : SWIGINTERN PyObject *_wrap_SpatialReference_GetLinearUnits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5136 0 : PyObject *resultobj = 0;
5137 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5138 0 : void *argp1 = 0 ;
5139 0 : int res1 = 0 ;
5140 0 : PyObject * obj0 = 0 ;
5141 : double result;
5142 :
5143 0 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetLinearUnits",&obj0)) SWIG_fail;
5144 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5145 0 : if (!SWIG_IsOK(res1)) {
5146 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetLinearUnits" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5147 : }
5148 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5149 : {
5150 0 : if ( bUseExceptions ) {
5151 0 : CPLErrorReset();
5152 : }
5153 0 : result = (double)OSRSpatialReferenceShadow_GetLinearUnits(arg1);
5154 0 : if ( bUseExceptions ) {
5155 0 : CPLErr eclass = CPLGetLastErrorType();
5156 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5157 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5158 : }
5159 : }
5160 : }
5161 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5162 0 : return resultobj;
5163 : fail:
5164 0 : return NULL;
5165 : }
5166 :
5167 :
5168 2 : SWIGINTERN PyObject *_wrap_SpatialReference_GetLinearUnitsName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5169 2 : PyObject *resultobj = 0;
5170 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5171 2 : void *argp1 = 0 ;
5172 2 : int res1 = 0 ;
5173 2 : PyObject * obj0 = 0 ;
5174 2 : char *result = 0 ;
5175 :
5176 2 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetLinearUnitsName",&obj0)) SWIG_fail;
5177 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5178 2 : if (!SWIG_IsOK(res1)) {
5179 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetLinearUnitsName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5180 : }
5181 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5182 : {
5183 2 : if ( bUseExceptions ) {
5184 0 : CPLErrorReset();
5185 : }
5186 2 : result = (char *)OSRSpatialReferenceShadow_GetLinearUnitsName(arg1);
5187 2 : if ( bUseExceptions ) {
5188 0 : CPLErr eclass = CPLGetLastErrorType();
5189 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5190 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5191 : }
5192 : }
5193 : }
5194 2 : resultobj = SWIG_FromCharPtr((const char *)result);
5195 2 : return resultobj;
5196 : fail:
5197 0 : return NULL;
5198 : }
5199 :
5200 :
5201 1256 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAuthorityCode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5202 1256 : PyObject *resultobj = 0;
5203 1256 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5204 1256 : char *arg2 = (char *) 0 ;
5205 1256 : void *argp1 = 0 ;
5206 1256 : int res1 = 0 ;
5207 : int res2 ;
5208 1256 : char *buf2 = 0 ;
5209 1256 : int alloc2 = 0 ;
5210 1256 : PyObject * obj0 = 0 ;
5211 1256 : PyObject * obj1 = 0 ;
5212 1256 : char *result = 0 ;
5213 :
5214 1256 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_GetAuthorityCode",&obj0,&obj1)) SWIG_fail;
5215 1256 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5216 1256 : if (!SWIG_IsOK(res1)) {
5217 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAuthorityCode" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5218 : }
5219 1256 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5220 1256 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5221 1256 : if (!SWIG_IsOK(res2)) {
5222 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAuthorityCode" "', argument " "2"" of type '" "char const *""'");
5223 : }
5224 1256 : arg2 = reinterpret_cast< char * >(buf2);
5225 : {
5226 1256 : if ( bUseExceptions ) {
5227 0 : CPLErrorReset();
5228 : }
5229 1256 : result = (char *)OSRSpatialReferenceShadow_GetAuthorityCode(arg1,(char const *)arg2);
5230 1256 : if ( bUseExceptions ) {
5231 0 : CPLErr eclass = CPLGetLastErrorType();
5232 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5233 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5234 : }
5235 : }
5236 : }
5237 1256 : resultobj = SWIG_FromCharPtr((const char *)result);
5238 1256 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5239 1256 : return resultobj;
5240 : fail:
5241 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5242 0 : return NULL;
5243 : }
5244 :
5245 :
5246 9 : SWIGINTERN PyObject *_wrap_SpatialReference_GetAuthorityName(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5247 9 : PyObject *resultobj = 0;
5248 9 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5249 9 : char *arg2 = (char *) 0 ;
5250 9 : void *argp1 = 0 ;
5251 9 : int res1 = 0 ;
5252 : int res2 ;
5253 9 : char *buf2 = 0 ;
5254 9 : int alloc2 = 0 ;
5255 9 : PyObject * obj0 = 0 ;
5256 9 : PyObject * obj1 = 0 ;
5257 9 : char *result = 0 ;
5258 :
5259 9 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_GetAuthorityName",&obj0,&obj1)) SWIG_fail;
5260 9 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5261 9 : if (!SWIG_IsOK(res1)) {
5262 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetAuthorityName" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5263 : }
5264 9 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5265 9 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5266 9 : if (!SWIG_IsOK(res2)) {
5267 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAuthorityName" "', argument " "2"" of type '" "char const *""'");
5268 : }
5269 9 : arg2 = reinterpret_cast< char * >(buf2);
5270 : {
5271 9 : if ( bUseExceptions ) {
5272 0 : CPLErrorReset();
5273 : }
5274 9 : result = (char *)OSRSpatialReferenceShadow_GetAuthorityName(arg1,(char const *)arg2);
5275 9 : if ( bUseExceptions ) {
5276 0 : CPLErr eclass = CPLGetLastErrorType();
5277 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5278 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5279 : }
5280 : }
5281 : }
5282 9 : resultobj = SWIG_FromCharPtr((const char *)result);
5283 9 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5284 9 : return resultobj;
5285 : fail:
5286 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5287 0 : return NULL;
5288 : }
5289 :
5290 :
5291 10 : SWIGINTERN PyObject *_wrap_SpatialReference_SetUTM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5292 10 : PyObject *resultobj = 0;
5293 10 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5294 : int arg2 ;
5295 10 : int arg3 = (int) 1 ;
5296 10 : void *argp1 = 0 ;
5297 10 : int res1 = 0 ;
5298 : int val2 ;
5299 10 : int ecode2 = 0 ;
5300 : int val3 ;
5301 10 : int ecode3 = 0 ;
5302 10 : PyObject * obj0 = 0 ;
5303 10 : PyObject * obj1 = 0 ;
5304 10 : PyObject * obj2 = 0 ;
5305 : OGRErr result;
5306 :
5307 10 : if (!PyArg_ParseTuple(args,(char *)"OO|O:SpatialReference_SetUTM",&obj0,&obj1,&obj2)) SWIG_fail;
5308 10 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5309 10 : if (!SWIG_IsOK(res1)) {
5310 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetUTM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5311 : }
5312 10 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5313 10 : ecode2 = SWIG_AsVal_int(obj1, &val2);
5314 10 : if (!SWIG_IsOK(ecode2)) {
5315 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetUTM" "', argument " "2"" of type '" "int""'");
5316 : }
5317 10 : arg2 = static_cast< int >(val2);
5318 10 : if (obj2) {
5319 1 : ecode3 = SWIG_AsVal_int(obj2, &val3);
5320 1 : if (!SWIG_IsOK(ecode3)) {
5321 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetUTM" "', argument " "3"" of type '" "int""'");
5322 : }
5323 1 : arg3 = static_cast< int >(val3);
5324 : }
5325 : {
5326 10 : if ( bUseExceptions ) {
5327 0 : CPLErrorReset();
5328 : }
5329 10 : result = (OGRErr)OSRSpatialReferenceShadow_SetUTM(arg1,arg2,arg3);
5330 10 : if ( bUseExceptions ) {
5331 0 : CPLErr eclass = CPLGetLastErrorType();
5332 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5333 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5334 : }
5335 : }
5336 : }
5337 : {
5338 : /* %typemap(out) OGRErr */
5339 10 : if ( result != 0 && bUseExceptions) {
5340 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5341 0 : SWIG_fail;
5342 : }
5343 : }
5344 : {
5345 : /* %typemap(ret) OGRErr */
5346 10 : if (resultobj == Py_None ) {
5347 0 : Py_DECREF(resultobj);
5348 0 : resultobj = 0;
5349 : }
5350 10 : if (resultobj == 0) {
5351 10 : resultobj = PyInt_FromLong( result );
5352 : }
5353 : }
5354 10 : return resultobj;
5355 : fail:
5356 0 : return NULL;
5357 : }
5358 :
5359 :
5360 2 : SWIGINTERN PyObject *_wrap_SpatialReference_GetUTMZone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5361 2 : PyObject *resultobj = 0;
5362 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5363 2 : void *argp1 = 0 ;
5364 2 : int res1 = 0 ;
5365 2 : PyObject * obj0 = 0 ;
5366 : int result;
5367 :
5368 2 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetUTMZone",&obj0)) SWIG_fail;
5369 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5370 2 : if (!SWIG_IsOK(res1)) {
5371 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetUTMZone" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5372 : }
5373 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5374 : {
5375 2 : if ( bUseExceptions ) {
5376 0 : CPLErrorReset();
5377 : }
5378 2 : result = (int)OSRSpatialReferenceShadow_GetUTMZone(arg1);
5379 2 : if ( bUseExceptions ) {
5380 0 : CPLErr eclass = CPLGetLastErrorType();
5381 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5382 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5383 : }
5384 : }
5385 : }
5386 2 : resultobj = SWIG_From_int(static_cast< int >(result));
5387 2 : return resultobj;
5388 : fail:
5389 0 : return NULL;
5390 : }
5391 :
5392 :
5393 2 : SWIGINTERN PyObject *_wrap_SpatialReference_SetStatePlane(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5394 2 : PyObject *resultobj = 0;
5395 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5396 : int arg2 ;
5397 2 : int arg3 = (int) 1 ;
5398 2 : char *arg4 = (char *) "" ;
5399 2 : double arg5 = (double) 0.0 ;
5400 2 : void *argp1 = 0 ;
5401 2 : int res1 = 0 ;
5402 : int val2 ;
5403 2 : int ecode2 = 0 ;
5404 : int val3 ;
5405 2 : int ecode3 = 0 ;
5406 : int res4 ;
5407 2 : char *buf4 = 0 ;
5408 2 : int alloc4 = 0 ;
5409 : double val5 ;
5410 2 : int ecode5 = 0 ;
5411 2 : PyObject * obj0 = 0 ;
5412 2 : PyObject * obj1 = 0 ;
5413 2 : PyObject * obj2 = 0 ;
5414 2 : PyObject * obj3 = 0 ;
5415 2 : PyObject * obj4 = 0 ;
5416 : OGRErr result;
5417 :
5418 2 : if (!PyArg_ParseTuple(args,(char *)"OO|OOO:SpatialReference_SetStatePlane",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
5419 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5420 2 : if (!SWIG_IsOK(res1)) {
5421 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetStatePlane" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5422 : }
5423 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5424 2 : ecode2 = SWIG_AsVal_int(obj1, &val2);
5425 2 : if (!SWIG_IsOK(ecode2)) {
5426 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetStatePlane" "', argument " "2"" of type '" "int""'");
5427 : }
5428 2 : arg2 = static_cast< int >(val2);
5429 2 : if (obj2) {
5430 2 : ecode3 = SWIG_AsVal_int(obj2, &val3);
5431 2 : if (!SWIG_IsOK(ecode3)) {
5432 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetStatePlane" "', argument " "3"" of type '" "int""'");
5433 : }
5434 2 : arg3 = static_cast< int >(val3);
5435 : }
5436 2 : if (obj3) {
5437 1 : res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
5438 1 : if (!SWIG_IsOK(res4)) {
5439 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetStatePlane" "', argument " "4"" of type '" "char const *""'");
5440 : }
5441 1 : arg4 = reinterpret_cast< char * >(buf4);
5442 : }
5443 2 : if (obj4) {
5444 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
5445 1 : if (!SWIG_IsOK(ecode5)) {
5446 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetStatePlane" "', argument " "5"" of type '" "double""'");
5447 : }
5448 1 : arg5 = static_cast< double >(val5);
5449 : }
5450 : {
5451 2 : if ( bUseExceptions ) {
5452 0 : CPLErrorReset();
5453 : }
5454 2 : result = (OGRErr)OSRSpatialReferenceShadow_SetStatePlane(arg1,arg2,arg3,(char const *)arg4,arg5);
5455 2 : if ( bUseExceptions ) {
5456 0 : CPLErr eclass = CPLGetLastErrorType();
5457 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5458 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5459 : }
5460 : }
5461 : }
5462 : {
5463 : /* %typemap(out) OGRErr */
5464 2 : if ( result != 0 && bUseExceptions) {
5465 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5466 0 : SWIG_fail;
5467 : }
5468 : }
5469 2 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
5470 : {
5471 : /* %typemap(ret) OGRErr */
5472 2 : if (resultobj == Py_None ) {
5473 0 : Py_DECREF(resultobj);
5474 0 : resultobj = 0;
5475 : }
5476 2 : if (resultobj == 0) {
5477 2 : resultobj = PyInt_FromLong( result );
5478 : }
5479 : }
5480 2 : return resultobj;
5481 : fail:
5482 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
5483 0 : return NULL;
5484 : }
5485 :
5486 :
5487 0 : SWIGINTERN PyObject *_wrap_SpatialReference_AutoIdentifyEPSG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5488 0 : PyObject *resultobj = 0;
5489 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5490 0 : void *argp1 = 0 ;
5491 0 : int res1 = 0 ;
5492 0 : PyObject * obj0 = 0 ;
5493 : OGRErr result;
5494 :
5495 0 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_AutoIdentifyEPSG",&obj0)) SWIG_fail;
5496 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5497 0 : if (!SWIG_IsOK(res1)) {
5498 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_AutoIdentifyEPSG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5499 : }
5500 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5501 : {
5502 0 : if ( bUseExceptions ) {
5503 0 : CPLErrorReset();
5504 : }
5505 0 : result = (OGRErr)OSRSpatialReferenceShadow_AutoIdentifyEPSG(arg1);
5506 0 : if ( bUseExceptions ) {
5507 0 : CPLErr eclass = CPLGetLastErrorType();
5508 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5509 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5510 : }
5511 : }
5512 : }
5513 : {
5514 : /* %typemap(out) OGRErr */
5515 0 : if ( result != 0 && bUseExceptions) {
5516 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5517 0 : SWIG_fail;
5518 : }
5519 : }
5520 : {
5521 : /* %typemap(ret) OGRErr */
5522 0 : if (resultobj == Py_None ) {
5523 0 : Py_DECREF(resultobj);
5524 0 : resultobj = 0;
5525 : }
5526 0 : if (resultobj == 0) {
5527 0 : resultobj = PyInt_FromLong( result );
5528 : }
5529 : }
5530 0 : return resultobj;
5531 : fail:
5532 0 : return NULL;
5533 : }
5534 :
5535 :
5536 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5537 0 : PyObject *resultobj = 0;
5538 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5539 0 : char *arg2 = (char *) 0 ;
5540 0 : void *argp1 = 0 ;
5541 0 : int res1 = 0 ;
5542 : int res2 ;
5543 0 : char *buf2 = 0 ;
5544 0 : int alloc2 = 0 ;
5545 0 : PyObject * obj0 = 0 ;
5546 0 : PyObject * obj1 = 0 ;
5547 : OGRErr result;
5548 :
5549 0 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_SetProjection",&obj0,&obj1)) SWIG_fail;
5550 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5551 0 : if (!SWIG_IsOK(res1)) {
5552 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjection" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5553 : }
5554 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5555 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5556 0 : if (!SWIG_IsOK(res2)) {
5557 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjection" "', argument " "2"" of type '" "char const *""'");
5558 : }
5559 0 : arg2 = reinterpret_cast< char * >(buf2);
5560 : {
5561 0 : if ( bUseExceptions ) {
5562 0 : CPLErrorReset();
5563 : }
5564 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjection(arg1,(char const *)arg2);
5565 0 : if ( bUseExceptions ) {
5566 0 : CPLErr eclass = CPLGetLastErrorType();
5567 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5568 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5569 : }
5570 : }
5571 : }
5572 : {
5573 : /* %typemap(out) OGRErr */
5574 0 : if ( result != 0 && bUseExceptions) {
5575 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5576 0 : SWIG_fail;
5577 : }
5578 : }
5579 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5580 : {
5581 : /* %typemap(ret) OGRErr */
5582 0 : if (resultobj == Py_None ) {
5583 0 : Py_DECREF(resultobj);
5584 0 : resultobj = 0;
5585 : }
5586 0 : if (resultobj == 0) {
5587 0 : resultobj = PyInt_FromLong( result );
5588 : }
5589 : }
5590 0 : return resultobj;
5591 : fail:
5592 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5593 0 : return NULL;
5594 : }
5595 :
5596 :
5597 142 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5598 142 : PyObject *resultobj = 0;
5599 142 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5600 142 : char *arg2 = (char *) 0 ;
5601 : double arg3 ;
5602 142 : void *argp1 = 0 ;
5603 142 : int res1 = 0 ;
5604 : int res2 ;
5605 142 : char *buf2 = 0 ;
5606 142 : int alloc2 = 0 ;
5607 : double val3 ;
5608 142 : int ecode3 = 0 ;
5609 142 : PyObject * obj0 = 0 ;
5610 142 : PyObject * obj1 = 0 ;
5611 142 : PyObject * obj2 = 0 ;
5612 : OGRErr result;
5613 :
5614 142 : if (!PyArg_ParseTuple(args,(char *)"OOO:SpatialReference_SetProjParm",&obj0,&obj1,&obj2)) SWIG_fail;
5615 142 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5616 142 : if (!SWIG_IsOK(res1)) {
5617 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5618 : }
5619 142 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5620 142 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5621 142 : if (!SWIG_IsOK(res2)) {
5622 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjParm" "', argument " "2"" of type '" "char const *""'");
5623 : }
5624 142 : arg2 = reinterpret_cast< char * >(buf2);
5625 142 : ecode3 = SWIG_AsVal_double(obj2, &val3);
5626 142 : if (!SWIG_IsOK(ecode3)) {
5627 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetProjParm" "', argument " "3"" of type '" "double""'");
5628 : }
5629 142 : arg3 = static_cast< double >(val3);
5630 : {
5631 142 : if (!arg2) {
5632 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5633 : }
5634 : }
5635 : {
5636 142 : if ( bUseExceptions ) {
5637 0 : CPLErrorReset();
5638 : }
5639 142 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjParm(arg1,(char const *)arg2,arg3);
5640 142 : if ( bUseExceptions ) {
5641 0 : CPLErr eclass = CPLGetLastErrorType();
5642 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5643 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5644 : }
5645 : }
5646 : }
5647 : {
5648 : /* %typemap(out) OGRErr */
5649 142 : if ( result != 0 && bUseExceptions) {
5650 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5651 0 : SWIG_fail;
5652 : }
5653 : }
5654 142 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5655 : {
5656 : /* %typemap(ret) OGRErr */
5657 142 : if (resultobj == Py_None ) {
5658 0 : Py_DECREF(resultobj);
5659 0 : resultobj = 0;
5660 : }
5661 142 : if (resultobj == 0) {
5662 142 : resultobj = PyInt_FromLong( result );
5663 : }
5664 : }
5665 142 : return resultobj;
5666 : fail:
5667 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5668 0 : return NULL;
5669 : }
5670 :
5671 :
5672 8643 : SWIGINTERN PyObject *_wrap_SpatialReference_GetProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5673 8643 : PyObject *resultobj = 0;
5674 8643 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5675 8643 : char *arg2 = (char *) 0 ;
5676 8643 : double arg3 = (double) 0.0 ;
5677 8643 : void *argp1 = 0 ;
5678 8643 : int res1 = 0 ;
5679 : int res2 ;
5680 8643 : char *buf2 = 0 ;
5681 8643 : int alloc2 = 0 ;
5682 : double val3 ;
5683 8643 : int ecode3 = 0 ;
5684 8643 : PyObject * obj0 = 0 ;
5685 8643 : PyObject * obj1 = 0 ;
5686 8643 : PyObject * obj2 = 0 ;
5687 : double result;
5688 :
5689 8643 : if (!PyArg_ParseTuple(args,(char *)"OO|O:SpatialReference_GetProjParm",&obj0,&obj1,&obj2)) SWIG_fail;
5690 8643 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5691 8643 : if (!SWIG_IsOK(res1)) {
5692 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5693 : }
5694 8643 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5695 8643 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5696 8643 : if (!SWIG_IsOK(res2)) {
5697 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetProjParm" "', argument " "2"" of type '" "char const *""'");
5698 : }
5699 8643 : arg2 = reinterpret_cast< char * >(buf2);
5700 8643 : if (obj2) {
5701 17 : ecode3 = SWIG_AsVal_double(obj2, &val3);
5702 17 : if (!SWIG_IsOK(ecode3)) {
5703 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetProjParm" "', argument " "3"" of type '" "double""'");
5704 : }
5705 17 : arg3 = static_cast< double >(val3);
5706 : }
5707 : {
5708 8643 : if (!arg2) {
5709 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5710 : }
5711 : }
5712 : {
5713 8643 : if ( bUseExceptions ) {
5714 0 : CPLErrorReset();
5715 : }
5716 8643 : result = (double)OSRSpatialReferenceShadow_GetProjParm(arg1,(char const *)arg2,arg3);
5717 8643 : if ( bUseExceptions ) {
5718 0 : CPLErr eclass = CPLGetLastErrorType();
5719 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5720 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5721 : }
5722 : }
5723 : }
5724 8643 : resultobj = SWIG_From_double(static_cast< double >(result));
5725 8643 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5726 8643 : return resultobj;
5727 : fail:
5728 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5729 0 : return NULL;
5730 : }
5731 :
5732 :
5733 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetNormProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5734 0 : PyObject *resultobj = 0;
5735 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5736 0 : char *arg2 = (char *) 0 ;
5737 : double arg3 ;
5738 0 : void *argp1 = 0 ;
5739 0 : int res1 = 0 ;
5740 : int res2 ;
5741 0 : char *buf2 = 0 ;
5742 0 : int alloc2 = 0 ;
5743 : double val3 ;
5744 0 : int ecode3 = 0 ;
5745 0 : PyObject * obj0 = 0 ;
5746 0 : PyObject * obj1 = 0 ;
5747 0 : PyObject * obj2 = 0 ;
5748 : OGRErr result;
5749 :
5750 0 : if (!PyArg_ParseTuple(args,(char *)"OOO:SpatialReference_SetNormProjParm",&obj0,&obj1,&obj2)) SWIG_fail;
5751 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5752 0 : if (!SWIG_IsOK(res1)) {
5753 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetNormProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5754 : }
5755 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5756 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5757 0 : if (!SWIG_IsOK(res2)) {
5758 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetNormProjParm" "', argument " "2"" of type '" "char const *""'");
5759 : }
5760 0 : arg2 = reinterpret_cast< char * >(buf2);
5761 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
5762 0 : if (!SWIG_IsOK(ecode3)) {
5763 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetNormProjParm" "', argument " "3"" of type '" "double""'");
5764 : }
5765 0 : arg3 = static_cast< double >(val3);
5766 : {
5767 0 : if (!arg2) {
5768 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5769 : }
5770 : }
5771 : {
5772 0 : if ( bUseExceptions ) {
5773 0 : CPLErrorReset();
5774 : }
5775 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetNormProjParm(arg1,(char const *)arg2,arg3);
5776 0 : if ( bUseExceptions ) {
5777 0 : CPLErr eclass = CPLGetLastErrorType();
5778 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5779 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5780 : }
5781 : }
5782 : }
5783 : {
5784 : /* %typemap(out) OGRErr */
5785 0 : if ( result != 0 && bUseExceptions) {
5786 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
5787 0 : SWIG_fail;
5788 : }
5789 : }
5790 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5791 : {
5792 : /* %typemap(ret) OGRErr */
5793 0 : if (resultobj == Py_None ) {
5794 0 : Py_DECREF(resultobj);
5795 0 : resultobj = 0;
5796 : }
5797 0 : if (resultobj == 0) {
5798 0 : resultobj = PyInt_FromLong( result );
5799 : }
5800 : }
5801 0 : return resultobj;
5802 : fail:
5803 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5804 0 : return NULL;
5805 : }
5806 :
5807 :
5808 0 : SWIGINTERN PyObject *_wrap_SpatialReference_GetNormProjParm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5809 0 : PyObject *resultobj = 0;
5810 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5811 0 : char *arg2 = (char *) 0 ;
5812 0 : double arg3 = (double) 0.0 ;
5813 0 : void *argp1 = 0 ;
5814 0 : int res1 = 0 ;
5815 : int res2 ;
5816 0 : char *buf2 = 0 ;
5817 0 : int alloc2 = 0 ;
5818 : double val3 ;
5819 0 : int ecode3 = 0 ;
5820 0 : PyObject * obj0 = 0 ;
5821 0 : PyObject * obj1 = 0 ;
5822 0 : PyObject * obj2 = 0 ;
5823 : double result;
5824 :
5825 0 : if (!PyArg_ParseTuple(args,(char *)"OO|O:SpatialReference_GetNormProjParm",&obj0,&obj1,&obj2)) SWIG_fail;
5826 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5827 0 : if (!SWIG_IsOK(res1)) {
5828 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetNormProjParm" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5829 : }
5830 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5831 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
5832 0 : if (!SWIG_IsOK(res2)) {
5833 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetNormProjParm" "', argument " "2"" of type '" "char const *""'");
5834 : }
5835 0 : arg2 = reinterpret_cast< char * >(buf2);
5836 0 : if (obj2) {
5837 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
5838 0 : if (!SWIG_IsOK(ecode3)) {
5839 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_GetNormProjParm" "', argument " "3"" of type '" "double""'");
5840 : }
5841 0 : arg3 = static_cast< double >(val3);
5842 : }
5843 : {
5844 0 : if (!arg2) {
5845 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
5846 : }
5847 : }
5848 : {
5849 0 : if ( bUseExceptions ) {
5850 0 : CPLErrorReset();
5851 : }
5852 0 : result = (double)OSRSpatialReferenceShadow_GetNormProjParm(arg1,(char const *)arg2,arg3);
5853 0 : if ( bUseExceptions ) {
5854 0 : CPLErr eclass = CPLGetLastErrorType();
5855 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5856 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5857 : }
5858 : }
5859 : }
5860 0 : resultobj = SWIG_From_double(static_cast< double >(result));
5861 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5862 0 : return resultobj;
5863 : fail:
5864 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
5865 0 : return NULL;
5866 : }
5867 :
5868 :
5869 3 : SWIGINTERN PyObject *_wrap_SpatialReference_GetSemiMajor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5870 3 : PyObject *resultobj = 0;
5871 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5872 3 : void *argp1 = 0 ;
5873 3 : int res1 = 0 ;
5874 3 : PyObject * obj0 = 0 ;
5875 : double result;
5876 :
5877 3 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetSemiMajor",&obj0)) SWIG_fail;
5878 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5879 3 : if (!SWIG_IsOK(res1)) {
5880 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMajor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5881 : }
5882 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5883 : {
5884 3 : if ( bUseExceptions ) {
5885 0 : CPLErrorReset();
5886 : }
5887 3 : result = (double)OSRSpatialReferenceShadow_GetSemiMajor(arg1);
5888 3 : if ( bUseExceptions ) {
5889 0 : CPLErr eclass = CPLGetLastErrorType();
5890 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5891 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5892 : }
5893 : }
5894 : }
5895 3 : resultobj = SWIG_From_double(static_cast< double >(result));
5896 3 : return resultobj;
5897 : fail:
5898 0 : return NULL;
5899 : }
5900 :
5901 :
5902 3 : SWIGINTERN PyObject *_wrap_SpatialReference_GetSemiMinor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5903 3 : PyObject *resultobj = 0;
5904 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5905 3 : void *argp1 = 0 ;
5906 3 : int res1 = 0 ;
5907 3 : PyObject * obj0 = 0 ;
5908 : double result;
5909 :
5910 3 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetSemiMinor",&obj0)) SWIG_fail;
5911 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5912 3 : if (!SWIG_IsOK(res1)) {
5913 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetSemiMinor" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5914 : }
5915 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5916 : {
5917 3 : if ( bUseExceptions ) {
5918 0 : CPLErrorReset();
5919 : }
5920 3 : result = (double)OSRSpatialReferenceShadow_GetSemiMinor(arg1);
5921 3 : if ( bUseExceptions ) {
5922 0 : CPLErr eclass = CPLGetLastErrorType();
5923 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5924 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5925 : }
5926 : }
5927 : }
5928 3 : resultobj = SWIG_From_double(static_cast< double >(result));
5929 3 : return resultobj;
5930 : fail:
5931 0 : return NULL;
5932 : }
5933 :
5934 :
5935 3 : SWIGINTERN PyObject *_wrap_SpatialReference_GetInvFlattening(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5936 3 : PyObject *resultobj = 0;
5937 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5938 3 : void *argp1 = 0 ;
5939 3 : int res1 = 0 ;
5940 3 : PyObject * obj0 = 0 ;
5941 : double result;
5942 :
5943 3 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetInvFlattening",&obj0)) SWIG_fail;
5944 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
5945 3 : if (!SWIG_IsOK(res1)) {
5946 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetInvFlattening" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
5947 : }
5948 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
5949 : {
5950 3 : if ( bUseExceptions ) {
5951 0 : CPLErrorReset();
5952 : }
5953 3 : result = (double)OSRSpatialReferenceShadow_GetInvFlattening(arg1);
5954 3 : if ( bUseExceptions ) {
5955 0 : CPLErr eclass = CPLGetLastErrorType();
5956 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
5957 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
5958 : }
5959 : }
5960 : }
5961 3 : resultobj = SWIG_From_double(static_cast< double >(result));
5962 3 : return resultobj;
5963 : fail:
5964 0 : return NULL;
5965 : }
5966 :
5967 :
5968 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetACEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
5969 0 : PyObject *resultobj = 0;
5970 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
5971 : double arg2 ;
5972 : double arg3 ;
5973 : double arg4 ;
5974 : double arg5 ;
5975 : double arg6 ;
5976 : double arg7 ;
5977 0 : void *argp1 = 0 ;
5978 0 : int res1 = 0 ;
5979 : double val2 ;
5980 0 : int ecode2 = 0 ;
5981 : double val3 ;
5982 0 : int ecode3 = 0 ;
5983 : double val4 ;
5984 0 : int ecode4 = 0 ;
5985 : double val5 ;
5986 0 : int ecode5 = 0 ;
5987 : double val6 ;
5988 0 : int ecode6 = 0 ;
5989 : double val7 ;
5990 0 : int ecode7 = 0 ;
5991 0 : PyObject * obj0 = 0 ;
5992 0 : PyObject * obj1 = 0 ;
5993 0 : PyObject * obj2 = 0 ;
5994 0 : PyObject * obj3 = 0 ;
5995 0 : PyObject * obj4 = 0 ;
5996 0 : PyObject * obj5 = 0 ;
5997 0 : PyObject * obj6 = 0 ;
5998 : char * kwnames[] = {
5999 : (char *) "self",(char *) "stdp1",(char *) "stdp2",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
6000 0 : };
6001 : OGRErr result;
6002 :
6003 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOO:SpatialReference_SetACEA",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
6004 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6005 0 : if (!SWIG_IsOK(res1)) {
6006 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetACEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6007 : }
6008 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6009 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6010 0 : if (!SWIG_IsOK(ecode2)) {
6011 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetACEA" "', argument " "2"" of type '" "double""'");
6012 : }
6013 0 : arg2 = static_cast< double >(val2);
6014 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6015 0 : if (!SWIG_IsOK(ecode3)) {
6016 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetACEA" "', argument " "3"" of type '" "double""'");
6017 : }
6018 0 : arg3 = static_cast< double >(val3);
6019 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6020 0 : if (!SWIG_IsOK(ecode4)) {
6021 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetACEA" "', argument " "4"" of type '" "double""'");
6022 : }
6023 0 : arg4 = static_cast< double >(val4);
6024 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6025 0 : if (!SWIG_IsOK(ecode5)) {
6026 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetACEA" "', argument " "5"" of type '" "double""'");
6027 : }
6028 0 : arg5 = static_cast< double >(val5);
6029 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
6030 0 : if (!SWIG_IsOK(ecode6)) {
6031 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetACEA" "', argument " "6"" of type '" "double""'");
6032 : }
6033 0 : arg6 = static_cast< double >(val6);
6034 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
6035 0 : if (!SWIG_IsOK(ecode7)) {
6036 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetACEA" "', argument " "7"" of type '" "double""'");
6037 : }
6038 0 : arg7 = static_cast< double >(val7);
6039 : {
6040 0 : if ( bUseExceptions ) {
6041 0 : CPLErrorReset();
6042 : }
6043 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetACEA(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
6044 0 : if ( bUseExceptions ) {
6045 0 : CPLErr eclass = CPLGetLastErrorType();
6046 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6047 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6048 : }
6049 : }
6050 : }
6051 : {
6052 : /* %typemap(out) OGRErr */
6053 0 : if ( result != 0 && bUseExceptions) {
6054 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6055 0 : SWIG_fail;
6056 : }
6057 : }
6058 : {
6059 : /* %typemap(ret) OGRErr */
6060 0 : if (resultobj == Py_None ) {
6061 0 : Py_DECREF(resultobj);
6062 0 : resultobj = 0;
6063 : }
6064 0 : if (resultobj == 0) {
6065 0 : resultobj = PyInt_FromLong( result );
6066 : }
6067 : }
6068 0 : return resultobj;
6069 : fail:
6070 0 : return NULL;
6071 : }
6072 :
6073 :
6074 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetAE(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6075 0 : PyObject *resultobj = 0;
6076 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6077 : double arg2 ;
6078 : double arg3 ;
6079 : double arg4 ;
6080 : double arg5 ;
6081 0 : void *argp1 = 0 ;
6082 0 : int res1 = 0 ;
6083 : double val2 ;
6084 0 : int ecode2 = 0 ;
6085 : double val3 ;
6086 0 : int ecode3 = 0 ;
6087 : double val4 ;
6088 0 : int ecode4 = 0 ;
6089 : double val5 ;
6090 0 : int ecode5 = 0 ;
6091 0 : PyObject * obj0 = 0 ;
6092 0 : PyObject * obj1 = 0 ;
6093 0 : PyObject * obj2 = 0 ;
6094 0 : PyObject * obj3 = 0 ;
6095 0 : PyObject * obj4 = 0 ;
6096 : char * kwnames[] = {
6097 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
6098 0 : };
6099 : OGRErr result;
6100 :
6101 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetAE",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
6102 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6103 0 : if (!SWIG_IsOK(res1)) {
6104 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetAE" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6105 : }
6106 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6107 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6108 0 : if (!SWIG_IsOK(ecode2)) {
6109 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetAE" "', argument " "2"" of type '" "double""'");
6110 : }
6111 0 : arg2 = static_cast< double >(val2);
6112 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6113 0 : if (!SWIG_IsOK(ecode3)) {
6114 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetAE" "', argument " "3"" of type '" "double""'");
6115 : }
6116 0 : arg3 = static_cast< double >(val3);
6117 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6118 0 : if (!SWIG_IsOK(ecode4)) {
6119 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetAE" "', argument " "4"" of type '" "double""'");
6120 : }
6121 0 : arg4 = static_cast< double >(val4);
6122 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6123 0 : if (!SWIG_IsOK(ecode5)) {
6124 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetAE" "', argument " "5"" of type '" "double""'");
6125 : }
6126 0 : arg5 = static_cast< double >(val5);
6127 : {
6128 0 : if ( bUseExceptions ) {
6129 0 : CPLErrorReset();
6130 : }
6131 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetAE(arg1,arg2,arg3,arg4,arg5);
6132 0 : if ( bUseExceptions ) {
6133 0 : CPLErr eclass = CPLGetLastErrorType();
6134 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6135 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6136 : }
6137 : }
6138 : }
6139 : {
6140 : /* %typemap(out) OGRErr */
6141 0 : if ( result != 0 && bUseExceptions) {
6142 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6143 0 : SWIG_fail;
6144 : }
6145 : }
6146 : {
6147 : /* %typemap(ret) OGRErr */
6148 0 : if (resultobj == Py_None ) {
6149 0 : Py_DECREF(resultobj);
6150 0 : resultobj = 0;
6151 : }
6152 0 : if (resultobj == 0) {
6153 0 : resultobj = PyInt_FromLong( result );
6154 : }
6155 : }
6156 0 : return resultobj;
6157 : fail:
6158 0 : return NULL;
6159 : }
6160 :
6161 :
6162 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetBonne(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6163 0 : PyObject *resultobj = 0;
6164 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6165 : double arg2 ;
6166 : double arg3 ;
6167 : double arg4 ;
6168 : double arg5 ;
6169 0 : void *argp1 = 0 ;
6170 0 : int res1 = 0 ;
6171 : double val2 ;
6172 0 : int ecode2 = 0 ;
6173 : double val3 ;
6174 0 : int ecode3 = 0 ;
6175 : double val4 ;
6176 0 : int ecode4 = 0 ;
6177 : double val5 ;
6178 0 : int ecode5 = 0 ;
6179 0 : PyObject * obj0 = 0 ;
6180 0 : PyObject * obj1 = 0 ;
6181 0 : PyObject * obj2 = 0 ;
6182 0 : PyObject * obj3 = 0 ;
6183 0 : PyObject * obj4 = 0 ;
6184 : char * kwnames[] = {
6185 : (char *) "self",(char *) "stdp",(char *) "cm",(char *) "fe",(char *) "fn", NULL
6186 0 : };
6187 : OGRErr result;
6188 :
6189 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetBonne",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
6190 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6191 0 : if (!SWIG_IsOK(res1)) {
6192 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetBonne" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6193 : }
6194 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6195 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6196 0 : if (!SWIG_IsOK(ecode2)) {
6197 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetBonne" "', argument " "2"" of type '" "double""'");
6198 : }
6199 0 : arg2 = static_cast< double >(val2);
6200 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6201 0 : if (!SWIG_IsOK(ecode3)) {
6202 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetBonne" "', argument " "3"" of type '" "double""'");
6203 : }
6204 0 : arg3 = static_cast< double >(val3);
6205 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6206 0 : if (!SWIG_IsOK(ecode4)) {
6207 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetBonne" "', argument " "4"" of type '" "double""'");
6208 : }
6209 0 : arg4 = static_cast< double >(val4);
6210 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6211 0 : if (!SWIG_IsOK(ecode5)) {
6212 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetBonne" "', argument " "5"" of type '" "double""'");
6213 : }
6214 0 : arg5 = static_cast< double >(val5);
6215 : {
6216 0 : if ( bUseExceptions ) {
6217 0 : CPLErrorReset();
6218 : }
6219 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetBonne(arg1,arg2,arg3,arg4,arg5);
6220 0 : if ( bUseExceptions ) {
6221 0 : CPLErr eclass = CPLGetLastErrorType();
6222 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6223 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6224 : }
6225 : }
6226 : }
6227 : {
6228 : /* %typemap(out) OGRErr */
6229 0 : if ( result != 0 && bUseExceptions) {
6230 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6231 0 : SWIG_fail;
6232 : }
6233 : }
6234 : {
6235 : /* %typemap(ret) OGRErr */
6236 0 : if (resultobj == Py_None ) {
6237 0 : Py_DECREF(resultobj);
6238 0 : resultobj = 0;
6239 : }
6240 0 : if (resultobj == 0) {
6241 0 : resultobj = PyInt_FromLong( result );
6242 : }
6243 : }
6244 0 : return resultobj;
6245 : fail:
6246 0 : return NULL;
6247 : }
6248 :
6249 :
6250 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6251 0 : PyObject *resultobj = 0;
6252 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6253 : double arg2 ;
6254 : double arg3 ;
6255 : double arg4 ;
6256 : double arg5 ;
6257 0 : void *argp1 = 0 ;
6258 0 : int res1 = 0 ;
6259 : double val2 ;
6260 0 : int ecode2 = 0 ;
6261 : double val3 ;
6262 0 : int ecode3 = 0 ;
6263 : double val4 ;
6264 0 : int ecode4 = 0 ;
6265 : double val5 ;
6266 0 : int ecode5 = 0 ;
6267 0 : PyObject * obj0 = 0 ;
6268 0 : PyObject * obj1 = 0 ;
6269 0 : PyObject * obj2 = 0 ;
6270 0 : PyObject * obj3 = 0 ;
6271 0 : PyObject * obj4 = 0 ;
6272 : char * kwnames[] = {
6273 : (char *) "self",(char *) "stdp1",(char *) "cm",(char *) "fe",(char *) "fn", NULL
6274 0 : };
6275 : OGRErr result;
6276 :
6277 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetCEA",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
6278 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6279 0 : if (!SWIG_IsOK(res1)) {
6280 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6281 : }
6282 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6283 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6284 0 : if (!SWIG_IsOK(ecode2)) {
6285 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCEA" "', argument " "2"" of type '" "double""'");
6286 : }
6287 0 : arg2 = static_cast< double >(val2);
6288 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6289 0 : if (!SWIG_IsOK(ecode3)) {
6290 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetCEA" "', argument " "3"" of type '" "double""'");
6291 : }
6292 0 : arg3 = static_cast< double >(val3);
6293 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6294 0 : if (!SWIG_IsOK(ecode4)) {
6295 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetCEA" "', argument " "4"" of type '" "double""'");
6296 : }
6297 0 : arg4 = static_cast< double >(val4);
6298 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6299 0 : if (!SWIG_IsOK(ecode5)) {
6300 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetCEA" "', argument " "5"" of type '" "double""'");
6301 : }
6302 0 : arg5 = static_cast< double >(val5);
6303 : {
6304 0 : if ( bUseExceptions ) {
6305 0 : CPLErrorReset();
6306 : }
6307 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetCEA(arg1,arg2,arg3,arg4,arg5);
6308 0 : if ( bUseExceptions ) {
6309 0 : CPLErr eclass = CPLGetLastErrorType();
6310 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6311 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6312 : }
6313 : }
6314 : }
6315 : {
6316 : /* %typemap(out) OGRErr */
6317 0 : if ( result != 0 && bUseExceptions) {
6318 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6319 0 : SWIG_fail;
6320 : }
6321 : }
6322 : {
6323 : /* %typemap(ret) OGRErr */
6324 0 : if (resultobj == Py_None ) {
6325 0 : Py_DECREF(resultobj);
6326 0 : resultobj = 0;
6327 : }
6328 0 : if (resultobj == 0) {
6329 0 : resultobj = PyInt_FromLong( result );
6330 : }
6331 : }
6332 0 : return resultobj;
6333 : fail:
6334 0 : return NULL;
6335 : }
6336 :
6337 :
6338 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6339 0 : PyObject *resultobj = 0;
6340 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6341 : double arg2 ;
6342 : double arg3 ;
6343 : double arg4 ;
6344 : double arg5 ;
6345 0 : void *argp1 = 0 ;
6346 0 : int res1 = 0 ;
6347 : double val2 ;
6348 0 : int ecode2 = 0 ;
6349 : double val3 ;
6350 0 : int ecode3 = 0 ;
6351 : double val4 ;
6352 0 : int ecode4 = 0 ;
6353 : double val5 ;
6354 0 : int ecode5 = 0 ;
6355 0 : PyObject * obj0 = 0 ;
6356 0 : PyObject * obj1 = 0 ;
6357 0 : PyObject * obj2 = 0 ;
6358 0 : PyObject * obj3 = 0 ;
6359 0 : PyObject * obj4 = 0 ;
6360 : char * kwnames[] = {
6361 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
6362 0 : };
6363 : OGRErr result;
6364 :
6365 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetCS",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
6366 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6367 0 : if (!SWIG_IsOK(res1)) {
6368 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6369 : }
6370 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6371 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6372 0 : if (!SWIG_IsOK(ecode2)) {
6373 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetCS" "', argument " "2"" of type '" "double""'");
6374 : }
6375 0 : arg2 = static_cast< double >(val2);
6376 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6377 0 : if (!SWIG_IsOK(ecode3)) {
6378 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetCS" "', argument " "3"" of type '" "double""'");
6379 : }
6380 0 : arg3 = static_cast< double >(val3);
6381 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6382 0 : if (!SWIG_IsOK(ecode4)) {
6383 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetCS" "', argument " "4"" of type '" "double""'");
6384 : }
6385 0 : arg4 = static_cast< double >(val4);
6386 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6387 0 : if (!SWIG_IsOK(ecode5)) {
6388 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetCS" "', argument " "5"" of type '" "double""'");
6389 : }
6390 0 : arg5 = static_cast< double >(val5);
6391 : {
6392 0 : if ( bUseExceptions ) {
6393 0 : CPLErrorReset();
6394 : }
6395 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetCS(arg1,arg2,arg3,arg4,arg5);
6396 0 : if ( bUseExceptions ) {
6397 0 : CPLErr eclass = CPLGetLastErrorType();
6398 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6399 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6400 : }
6401 : }
6402 : }
6403 : {
6404 : /* %typemap(out) OGRErr */
6405 0 : if ( result != 0 && bUseExceptions) {
6406 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6407 0 : SWIG_fail;
6408 : }
6409 : }
6410 : {
6411 : /* %typemap(ret) OGRErr */
6412 0 : if (resultobj == Py_None ) {
6413 0 : Py_DECREF(resultobj);
6414 0 : resultobj = 0;
6415 : }
6416 0 : if (resultobj == 0) {
6417 0 : resultobj = PyInt_FromLong( result );
6418 : }
6419 : }
6420 0 : return resultobj;
6421 : fail:
6422 0 : return NULL;
6423 : }
6424 :
6425 :
6426 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6427 0 : PyObject *resultobj = 0;
6428 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6429 : double arg2 ;
6430 : double arg3 ;
6431 : double arg4 ;
6432 : double arg5 ;
6433 : double arg6 ;
6434 : double arg7 ;
6435 0 : void *argp1 = 0 ;
6436 0 : int res1 = 0 ;
6437 : double val2 ;
6438 0 : int ecode2 = 0 ;
6439 : double val3 ;
6440 0 : int ecode3 = 0 ;
6441 : double val4 ;
6442 0 : int ecode4 = 0 ;
6443 : double val5 ;
6444 0 : int ecode5 = 0 ;
6445 : double val6 ;
6446 0 : int ecode6 = 0 ;
6447 : double val7 ;
6448 0 : int ecode7 = 0 ;
6449 0 : PyObject * obj0 = 0 ;
6450 0 : PyObject * obj1 = 0 ;
6451 0 : PyObject * obj2 = 0 ;
6452 0 : PyObject * obj3 = 0 ;
6453 0 : PyObject * obj4 = 0 ;
6454 0 : PyObject * obj5 = 0 ;
6455 0 : PyObject * obj6 = 0 ;
6456 : char * kwnames[] = {
6457 : (char *) "self",(char *) "stdp1",(char *) "stdp2",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
6458 0 : };
6459 : OGRErr result;
6460 :
6461 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOO:SpatialReference_SetEC",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
6462 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6463 0 : if (!SWIG_IsOK(res1)) {
6464 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6465 : }
6466 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6467 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6468 0 : if (!SWIG_IsOK(ecode2)) {
6469 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEC" "', argument " "2"" of type '" "double""'");
6470 : }
6471 0 : arg2 = static_cast< double >(val2);
6472 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6473 0 : if (!SWIG_IsOK(ecode3)) {
6474 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEC" "', argument " "3"" of type '" "double""'");
6475 : }
6476 0 : arg3 = static_cast< double >(val3);
6477 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6478 0 : if (!SWIG_IsOK(ecode4)) {
6479 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEC" "', argument " "4"" of type '" "double""'");
6480 : }
6481 0 : arg4 = static_cast< double >(val4);
6482 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6483 0 : if (!SWIG_IsOK(ecode5)) {
6484 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEC" "', argument " "5"" of type '" "double""'");
6485 : }
6486 0 : arg5 = static_cast< double >(val5);
6487 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
6488 0 : if (!SWIG_IsOK(ecode6)) {
6489 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetEC" "', argument " "6"" of type '" "double""'");
6490 : }
6491 0 : arg6 = static_cast< double >(val6);
6492 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
6493 0 : if (!SWIG_IsOK(ecode7)) {
6494 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetEC" "', argument " "7"" of type '" "double""'");
6495 : }
6496 0 : arg7 = static_cast< double >(val7);
6497 : {
6498 0 : if ( bUseExceptions ) {
6499 0 : CPLErrorReset();
6500 : }
6501 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
6502 0 : if ( bUseExceptions ) {
6503 0 : CPLErr eclass = CPLGetLastErrorType();
6504 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6505 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6506 : }
6507 : }
6508 : }
6509 : {
6510 : /* %typemap(out) OGRErr */
6511 0 : if ( result != 0 && bUseExceptions) {
6512 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6513 0 : SWIG_fail;
6514 : }
6515 : }
6516 : {
6517 : /* %typemap(ret) OGRErr */
6518 0 : if (resultobj == Py_None ) {
6519 0 : Py_DECREF(resultobj);
6520 0 : resultobj = 0;
6521 : }
6522 0 : if (resultobj == 0) {
6523 0 : resultobj = PyInt_FromLong( result );
6524 : }
6525 : }
6526 0 : return resultobj;
6527 : fail:
6528 0 : return NULL;
6529 : }
6530 :
6531 :
6532 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEckertIV(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6533 0 : PyObject *resultobj = 0;
6534 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6535 : double arg2 ;
6536 : double arg3 ;
6537 : double arg4 ;
6538 0 : void *argp1 = 0 ;
6539 0 : int res1 = 0 ;
6540 : double val2 ;
6541 0 : int ecode2 = 0 ;
6542 : double val3 ;
6543 0 : int ecode3 = 0 ;
6544 : double val4 ;
6545 0 : int ecode4 = 0 ;
6546 0 : PyObject * obj0 = 0 ;
6547 0 : PyObject * obj1 = 0 ;
6548 0 : PyObject * obj2 = 0 ;
6549 0 : PyObject * obj3 = 0 ;
6550 : char * kwnames[] = {
6551 : (char *) "self",(char *) "cm",(char *) "fe",(char *) "fn", NULL
6552 0 : };
6553 : OGRErr result;
6554 :
6555 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:SpatialReference_SetEckertIV",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
6556 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6557 0 : if (!SWIG_IsOK(res1)) {
6558 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEckertIV" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6559 : }
6560 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6561 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6562 0 : if (!SWIG_IsOK(ecode2)) {
6563 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEckertIV" "', argument " "2"" of type '" "double""'");
6564 : }
6565 0 : arg2 = static_cast< double >(val2);
6566 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6567 0 : if (!SWIG_IsOK(ecode3)) {
6568 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEckertIV" "', argument " "3"" of type '" "double""'");
6569 : }
6570 0 : arg3 = static_cast< double >(val3);
6571 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6572 0 : if (!SWIG_IsOK(ecode4)) {
6573 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEckertIV" "', argument " "4"" of type '" "double""'");
6574 : }
6575 0 : arg4 = static_cast< double >(val4);
6576 : {
6577 0 : if ( bUseExceptions ) {
6578 0 : CPLErrorReset();
6579 : }
6580 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEckertIV(arg1,arg2,arg3,arg4);
6581 0 : if ( bUseExceptions ) {
6582 0 : CPLErr eclass = CPLGetLastErrorType();
6583 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6584 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6585 : }
6586 : }
6587 : }
6588 : {
6589 : /* %typemap(out) OGRErr */
6590 0 : if ( result != 0 && bUseExceptions) {
6591 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6592 0 : SWIG_fail;
6593 : }
6594 : }
6595 : {
6596 : /* %typemap(ret) OGRErr */
6597 0 : if (resultobj == Py_None ) {
6598 0 : Py_DECREF(resultobj);
6599 0 : resultobj = 0;
6600 : }
6601 0 : if (resultobj == 0) {
6602 0 : resultobj = PyInt_FromLong( result );
6603 : }
6604 : }
6605 0 : return resultobj;
6606 : fail:
6607 0 : return NULL;
6608 : }
6609 :
6610 :
6611 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEckertVI(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6612 0 : PyObject *resultobj = 0;
6613 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6614 : double arg2 ;
6615 : double arg3 ;
6616 : double arg4 ;
6617 0 : void *argp1 = 0 ;
6618 0 : int res1 = 0 ;
6619 : double val2 ;
6620 0 : int ecode2 = 0 ;
6621 : double val3 ;
6622 0 : int ecode3 = 0 ;
6623 : double val4 ;
6624 0 : int ecode4 = 0 ;
6625 0 : PyObject * obj0 = 0 ;
6626 0 : PyObject * obj1 = 0 ;
6627 0 : PyObject * obj2 = 0 ;
6628 0 : PyObject * obj3 = 0 ;
6629 : char * kwnames[] = {
6630 : (char *) "self",(char *) "cm",(char *) "fe",(char *) "fn", NULL
6631 0 : };
6632 : OGRErr result;
6633 :
6634 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:SpatialReference_SetEckertVI",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
6635 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6636 0 : if (!SWIG_IsOK(res1)) {
6637 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEckertVI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6638 : }
6639 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6640 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6641 0 : if (!SWIG_IsOK(ecode2)) {
6642 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEckertVI" "', argument " "2"" of type '" "double""'");
6643 : }
6644 0 : arg2 = static_cast< double >(val2);
6645 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6646 0 : if (!SWIG_IsOK(ecode3)) {
6647 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEckertVI" "', argument " "3"" of type '" "double""'");
6648 : }
6649 0 : arg3 = static_cast< double >(val3);
6650 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6651 0 : if (!SWIG_IsOK(ecode4)) {
6652 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEckertVI" "', argument " "4"" of type '" "double""'");
6653 : }
6654 0 : arg4 = static_cast< double >(val4);
6655 : {
6656 0 : if ( bUseExceptions ) {
6657 0 : CPLErrorReset();
6658 : }
6659 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEckertVI(arg1,arg2,arg3,arg4);
6660 0 : if ( bUseExceptions ) {
6661 0 : CPLErr eclass = CPLGetLastErrorType();
6662 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6663 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6664 : }
6665 : }
6666 : }
6667 : {
6668 : /* %typemap(out) OGRErr */
6669 0 : if ( result != 0 && bUseExceptions) {
6670 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6671 0 : SWIG_fail;
6672 : }
6673 : }
6674 : {
6675 : /* %typemap(ret) OGRErr */
6676 0 : if (resultobj == Py_None ) {
6677 0 : Py_DECREF(resultobj);
6678 0 : resultobj = 0;
6679 : }
6680 0 : if (resultobj == 0) {
6681 0 : resultobj = PyInt_FromLong( result );
6682 : }
6683 : }
6684 0 : return resultobj;
6685 : fail:
6686 0 : return NULL;
6687 : }
6688 :
6689 :
6690 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEquirectangular(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6691 0 : PyObject *resultobj = 0;
6692 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6693 : double arg2 ;
6694 : double arg3 ;
6695 : double arg4 ;
6696 : double arg5 ;
6697 0 : void *argp1 = 0 ;
6698 0 : int res1 = 0 ;
6699 : double val2 ;
6700 0 : int ecode2 = 0 ;
6701 : double val3 ;
6702 0 : int ecode3 = 0 ;
6703 : double val4 ;
6704 0 : int ecode4 = 0 ;
6705 : double val5 ;
6706 0 : int ecode5 = 0 ;
6707 0 : PyObject * obj0 = 0 ;
6708 0 : PyObject * obj1 = 0 ;
6709 0 : PyObject * obj2 = 0 ;
6710 0 : PyObject * obj3 = 0 ;
6711 0 : PyObject * obj4 = 0 ;
6712 : char * kwnames[] = {
6713 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
6714 0 : };
6715 : OGRErr result;
6716 :
6717 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetEquirectangular",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
6718 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6719 0 : if (!SWIG_IsOK(res1)) {
6720 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEquirectangular" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6721 : }
6722 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6723 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6724 0 : if (!SWIG_IsOK(ecode2)) {
6725 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEquirectangular" "', argument " "2"" of type '" "double""'");
6726 : }
6727 0 : arg2 = static_cast< double >(val2);
6728 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6729 0 : if (!SWIG_IsOK(ecode3)) {
6730 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEquirectangular" "', argument " "3"" of type '" "double""'");
6731 : }
6732 0 : arg3 = static_cast< double >(val3);
6733 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6734 0 : if (!SWIG_IsOK(ecode4)) {
6735 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEquirectangular" "', argument " "4"" of type '" "double""'");
6736 : }
6737 0 : arg4 = static_cast< double >(val4);
6738 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6739 0 : if (!SWIG_IsOK(ecode5)) {
6740 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEquirectangular" "', argument " "5"" of type '" "double""'");
6741 : }
6742 0 : arg5 = static_cast< double >(val5);
6743 : {
6744 0 : if ( bUseExceptions ) {
6745 0 : CPLErrorReset();
6746 : }
6747 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular(arg1,arg2,arg3,arg4,arg5);
6748 0 : if ( bUseExceptions ) {
6749 0 : CPLErr eclass = CPLGetLastErrorType();
6750 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6751 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6752 : }
6753 : }
6754 : }
6755 : {
6756 : /* %typemap(out) OGRErr */
6757 0 : if ( result != 0 && bUseExceptions) {
6758 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6759 0 : SWIG_fail;
6760 : }
6761 : }
6762 : {
6763 : /* %typemap(ret) OGRErr */
6764 0 : if (resultobj == Py_None ) {
6765 0 : Py_DECREF(resultobj);
6766 0 : resultobj = 0;
6767 : }
6768 0 : if (resultobj == 0) {
6769 0 : resultobj = PyInt_FromLong( result );
6770 : }
6771 : }
6772 0 : return resultobj;
6773 : fail:
6774 0 : return NULL;
6775 : }
6776 :
6777 :
6778 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetEquirectangular2(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6779 0 : PyObject *resultobj = 0;
6780 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6781 : double arg2 ;
6782 : double arg3 ;
6783 : double arg4 ;
6784 : double arg5 ;
6785 : double arg6 ;
6786 0 : void *argp1 = 0 ;
6787 0 : int res1 = 0 ;
6788 : double val2 ;
6789 0 : int ecode2 = 0 ;
6790 : double val3 ;
6791 0 : int ecode3 = 0 ;
6792 : double val4 ;
6793 0 : int ecode4 = 0 ;
6794 : double val5 ;
6795 0 : int ecode5 = 0 ;
6796 : double val6 ;
6797 0 : int ecode6 = 0 ;
6798 0 : PyObject * obj0 = 0 ;
6799 0 : PyObject * obj1 = 0 ;
6800 0 : PyObject * obj2 = 0 ;
6801 0 : PyObject * obj3 = 0 ;
6802 0 : PyObject * obj4 = 0 ;
6803 0 : PyObject * obj5 = 0 ;
6804 : char * kwnames[] = {
6805 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "pseudostdparallellat",(char *) "fe",(char *) "fn", NULL
6806 0 : };
6807 : OGRErr result;
6808 :
6809 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetEquirectangular2",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
6810 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6811 0 : if (!SWIG_IsOK(res1)) {
6812 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6813 : }
6814 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6815 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6816 0 : if (!SWIG_IsOK(ecode2)) {
6817 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "2"" of type '" "double""'");
6818 : }
6819 0 : arg2 = static_cast< double >(val2);
6820 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6821 0 : if (!SWIG_IsOK(ecode3)) {
6822 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "3"" of type '" "double""'");
6823 : }
6824 0 : arg3 = static_cast< double >(val3);
6825 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6826 0 : if (!SWIG_IsOK(ecode4)) {
6827 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "4"" of type '" "double""'");
6828 : }
6829 0 : arg4 = static_cast< double >(val4);
6830 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6831 0 : if (!SWIG_IsOK(ecode5)) {
6832 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "5"" of type '" "double""'");
6833 : }
6834 0 : arg5 = static_cast< double >(val5);
6835 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
6836 0 : if (!SWIG_IsOK(ecode6)) {
6837 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetEquirectangular2" "', argument " "6"" of type '" "double""'");
6838 : }
6839 0 : arg6 = static_cast< double >(val6);
6840 : {
6841 0 : if ( bUseExceptions ) {
6842 0 : CPLErrorReset();
6843 : }
6844 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetEquirectangular2(arg1,arg2,arg3,arg4,arg5,arg6);
6845 0 : if ( bUseExceptions ) {
6846 0 : CPLErr eclass = CPLGetLastErrorType();
6847 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6848 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6849 : }
6850 : }
6851 : }
6852 : {
6853 : /* %typemap(out) OGRErr */
6854 0 : if ( result != 0 && bUseExceptions) {
6855 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6856 0 : SWIG_fail;
6857 : }
6858 : }
6859 : {
6860 : /* %typemap(ret) OGRErr */
6861 0 : if (resultobj == Py_None ) {
6862 0 : Py_DECREF(resultobj);
6863 0 : resultobj = 0;
6864 : }
6865 0 : if (resultobj == 0) {
6866 0 : resultobj = PyInt_FromLong( result );
6867 : }
6868 : }
6869 0 : return resultobj;
6870 : fail:
6871 0 : return NULL;
6872 : }
6873 :
6874 :
6875 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGaussSchreiberTMercator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6876 0 : PyObject *resultobj = 0;
6877 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6878 : double arg2 ;
6879 : double arg3 ;
6880 : double arg4 ;
6881 : double arg5 ;
6882 : double arg6 ;
6883 0 : void *argp1 = 0 ;
6884 0 : int res1 = 0 ;
6885 : double val2 ;
6886 0 : int ecode2 = 0 ;
6887 : double val3 ;
6888 0 : int ecode3 = 0 ;
6889 : double val4 ;
6890 0 : int ecode4 = 0 ;
6891 : double val5 ;
6892 0 : int ecode5 = 0 ;
6893 : double val6 ;
6894 0 : int ecode6 = 0 ;
6895 0 : PyObject * obj0 = 0 ;
6896 0 : PyObject * obj1 = 0 ;
6897 0 : PyObject * obj2 = 0 ;
6898 0 : PyObject * obj3 = 0 ;
6899 0 : PyObject * obj4 = 0 ;
6900 0 : PyObject * obj5 = 0 ;
6901 : char * kwnames[] = {
6902 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "sc",(char *) "fe",(char *) "fn", NULL
6903 0 : };
6904 : OGRErr result;
6905 :
6906 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetGaussSchreiberTMercator",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
6907 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6908 0 : if (!SWIG_IsOK(res1)) {
6909 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6910 : }
6911 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
6912 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
6913 0 : if (!SWIG_IsOK(ecode2)) {
6914 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "2"" of type '" "double""'");
6915 : }
6916 0 : arg2 = static_cast< double >(val2);
6917 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
6918 0 : if (!SWIG_IsOK(ecode3)) {
6919 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "3"" of type '" "double""'");
6920 : }
6921 0 : arg3 = static_cast< double >(val3);
6922 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
6923 0 : if (!SWIG_IsOK(ecode4)) {
6924 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "4"" of type '" "double""'");
6925 : }
6926 0 : arg4 = static_cast< double >(val4);
6927 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
6928 0 : if (!SWIG_IsOK(ecode5)) {
6929 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "5"" of type '" "double""'");
6930 : }
6931 0 : arg5 = static_cast< double >(val5);
6932 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
6933 0 : if (!SWIG_IsOK(ecode6)) {
6934 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetGaussSchreiberTMercator" "', argument " "6"" of type '" "double""'");
6935 : }
6936 0 : arg6 = static_cast< double >(val6);
6937 : {
6938 0 : if ( bUseExceptions ) {
6939 0 : CPLErrorReset();
6940 : }
6941 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGaussSchreiberTMercator(arg1,arg2,arg3,arg4,arg5,arg6);
6942 0 : if ( bUseExceptions ) {
6943 0 : CPLErr eclass = CPLGetLastErrorType();
6944 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
6945 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
6946 : }
6947 : }
6948 : }
6949 : {
6950 : /* %typemap(out) OGRErr */
6951 0 : if ( result != 0 && bUseExceptions) {
6952 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
6953 0 : SWIG_fail;
6954 : }
6955 : }
6956 : {
6957 : /* %typemap(ret) OGRErr */
6958 0 : if (resultobj == Py_None ) {
6959 0 : Py_DECREF(resultobj);
6960 0 : resultobj = 0;
6961 : }
6962 0 : if (resultobj == 0) {
6963 0 : resultobj = PyInt_FromLong( result );
6964 : }
6965 : }
6966 0 : return resultobj;
6967 : fail:
6968 0 : return NULL;
6969 : }
6970 :
6971 :
6972 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
6973 1 : PyObject *resultobj = 0;
6974 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
6975 : double arg2 ;
6976 : double arg3 ;
6977 : double arg4 ;
6978 1 : void *argp1 = 0 ;
6979 1 : int res1 = 0 ;
6980 : double val2 ;
6981 1 : int ecode2 = 0 ;
6982 : double val3 ;
6983 1 : int ecode3 = 0 ;
6984 : double val4 ;
6985 1 : int ecode4 = 0 ;
6986 1 : PyObject * obj0 = 0 ;
6987 1 : PyObject * obj1 = 0 ;
6988 1 : PyObject * obj2 = 0 ;
6989 1 : PyObject * obj3 = 0 ;
6990 : char * kwnames[] = {
6991 : (char *) "self",(char *) "cm",(char *) "fe",(char *) "fn", NULL
6992 1 : };
6993 : OGRErr result;
6994 :
6995 1 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:SpatialReference_SetGS",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
6996 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
6997 1 : if (!SWIG_IsOK(res1)) {
6998 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
6999 : }
7000 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7001 1 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7002 1 : if (!SWIG_IsOK(ecode2)) {
7003 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGS" "', argument " "2"" of type '" "double""'");
7004 : }
7005 1 : arg2 = static_cast< double >(val2);
7006 1 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7007 1 : if (!SWIG_IsOK(ecode3)) {
7008 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGS" "', argument " "3"" of type '" "double""'");
7009 : }
7010 1 : arg3 = static_cast< double >(val3);
7011 1 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7012 1 : if (!SWIG_IsOK(ecode4)) {
7013 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGS" "', argument " "4"" of type '" "double""'");
7014 : }
7015 1 : arg4 = static_cast< double >(val4);
7016 : {
7017 1 : if ( bUseExceptions ) {
7018 0 : CPLErrorReset();
7019 : }
7020 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetGS(arg1,arg2,arg3,arg4);
7021 1 : if ( bUseExceptions ) {
7022 0 : CPLErr eclass = CPLGetLastErrorType();
7023 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7024 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7025 : }
7026 : }
7027 : }
7028 : {
7029 : /* %typemap(out) OGRErr */
7030 1 : if ( result != 0 && bUseExceptions) {
7031 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7032 0 : SWIG_fail;
7033 : }
7034 : }
7035 : {
7036 : /* %typemap(ret) OGRErr */
7037 1 : if (resultobj == Py_None ) {
7038 0 : Py_DECREF(resultobj);
7039 0 : resultobj = 0;
7040 : }
7041 1 : if (resultobj == 0) {
7042 1 : resultobj = PyInt_FromLong( result );
7043 : }
7044 : }
7045 1 : return resultobj;
7046 : fail:
7047 0 : return NULL;
7048 : }
7049 :
7050 :
7051 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGH(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7052 0 : PyObject *resultobj = 0;
7053 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7054 : double arg2 ;
7055 : double arg3 ;
7056 : double arg4 ;
7057 0 : void *argp1 = 0 ;
7058 0 : int res1 = 0 ;
7059 : double val2 ;
7060 0 : int ecode2 = 0 ;
7061 : double val3 ;
7062 0 : int ecode3 = 0 ;
7063 : double val4 ;
7064 0 : int ecode4 = 0 ;
7065 0 : PyObject * obj0 = 0 ;
7066 0 : PyObject * obj1 = 0 ;
7067 0 : PyObject * obj2 = 0 ;
7068 0 : PyObject * obj3 = 0 ;
7069 : char * kwnames[] = {
7070 : (char *) "self",(char *) "cm",(char *) "fe",(char *) "fn", NULL
7071 0 : };
7072 : OGRErr result;
7073 :
7074 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:SpatialReference_SetGH",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
7075 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7076 0 : if (!SWIG_IsOK(res1)) {
7077 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGH" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7078 : }
7079 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7080 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7081 0 : if (!SWIG_IsOK(ecode2)) {
7082 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGH" "', argument " "2"" of type '" "double""'");
7083 : }
7084 0 : arg2 = static_cast< double >(val2);
7085 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7086 0 : if (!SWIG_IsOK(ecode3)) {
7087 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGH" "', argument " "3"" of type '" "double""'");
7088 : }
7089 0 : arg3 = static_cast< double >(val3);
7090 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7091 0 : if (!SWIG_IsOK(ecode4)) {
7092 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGH" "', argument " "4"" of type '" "double""'");
7093 : }
7094 0 : arg4 = static_cast< double >(val4);
7095 : {
7096 0 : if ( bUseExceptions ) {
7097 0 : CPLErrorReset();
7098 : }
7099 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGH(arg1,arg2,arg3,arg4);
7100 0 : if ( bUseExceptions ) {
7101 0 : CPLErr eclass = CPLGetLastErrorType();
7102 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7103 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7104 : }
7105 : }
7106 : }
7107 : {
7108 : /* %typemap(out) OGRErr */
7109 0 : if ( result != 0 && bUseExceptions) {
7110 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7111 0 : SWIG_fail;
7112 : }
7113 : }
7114 : {
7115 : /* %typemap(ret) OGRErr */
7116 0 : if (resultobj == Py_None ) {
7117 0 : Py_DECREF(resultobj);
7118 0 : resultobj = 0;
7119 : }
7120 0 : if (resultobj == 0) {
7121 0 : resultobj = PyInt_FromLong( result );
7122 : }
7123 : }
7124 0 : return resultobj;
7125 : fail:
7126 0 : return NULL;
7127 : }
7128 :
7129 :
7130 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetIGH(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7131 0 : PyObject *resultobj = 0;
7132 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7133 0 : void *argp1 = 0 ;
7134 0 : int res1 = 0 ;
7135 0 : PyObject * obj0 = 0 ;
7136 : OGRErr result;
7137 :
7138 0 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_SetIGH",&obj0)) SWIG_fail;
7139 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7140 0 : if (!SWIG_IsOK(res1)) {
7141 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetIGH" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7142 : }
7143 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7144 : {
7145 0 : if ( bUseExceptions ) {
7146 0 : CPLErrorReset();
7147 : }
7148 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetIGH(arg1);
7149 0 : if ( bUseExceptions ) {
7150 0 : CPLErr eclass = CPLGetLastErrorType();
7151 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7152 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7153 : }
7154 : }
7155 : }
7156 : {
7157 : /* %typemap(out) OGRErr */
7158 0 : if ( result != 0 && bUseExceptions) {
7159 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7160 0 : SWIG_fail;
7161 : }
7162 : }
7163 : {
7164 : /* %typemap(ret) OGRErr */
7165 0 : if (resultobj == Py_None ) {
7166 0 : Py_DECREF(resultobj);
7167 0 : resultobj = 0;
7168 : }
7169 0 : if (resultobj == 0) {
7170 0 : resultobj = PyInt_FromLong( result );
7171 : }
7172 : }
7173 0 : return resultobj;
7174 : fail:
7175 0 : return NULL;
7176 : }
7177 :
7178 :
7179 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGEOS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7180 0 : PyObject *resultobj = 0;
7181 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7182 : double arg2 ;
7183 : double arg3 ;
7184 : double arg4 ;
7185 : double arg5 ;
7186 0 : void *argp1 = 0 ;
7187 0 : int res1 = 0 ;
7188 : double val2 ;
7189 0 : int ecode2 = 0 ;
7190 : double val3 ;
7191 0 : int ecode3 = 0 ;
7192 : double val4 ;
7193 0 : int ecode4 = 0 ;
7194 : double val5 ;
7195 0 : int ecode5 = 0 ;
7196 0 : PyObject * obj0 = 0 ;
7197 0 : PyObject * obj1 = 0 ;
7198 0 : PyObject * obj2 = 0 ;
7199 0 : PyObject * obj3 = 0 ;
7200 0 : PyObject * obj4 = 0 ;
7201 : char * kwnames[] = {
7202 : (char *) "self",(char *) "cm",(char *) "satelliteheight",(char *) "fe",(char *) "fn", NULL
7203 0 : };
7204 : OGRErr result;
7205 :
7206 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetGEOS",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
7207 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7208 0 : if (!SWIG_IsOK(res1)) {
7209 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGEOS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7210 : }
7211 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7212 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7213 0 : if (!SWIG_IsOK(ecode2)) {
7214 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGEOS" "', argument " "2"" of type '" "double""'");
7215 : }
7216 0 : arg2 = static_cast< double >(val2);
7217 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7218 0 : if (!SWIG_IsOK(ecode3)) {
7219 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGEOS" "', argument " "3"" of type '" "double""'");
7220 : }
7221 0 : arg3 = static_cast< double >(val3);
7222 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7223 0 : if (!SWIG_IsOK(ecode4)) {
7224 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGEOS" "', argument " "4"" of type '" "double""'");
7225 : }
7226 0 : arg4 = static_cast< double >(val4);
7227 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
7228 0 : if (!SWIG_IsOK(ecode5)) {
7229 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGEOS" "', argument " "5"" of type '" "double""'");
7230 : }
7231 0 : arg5 = static_cast< double >(val5);
7232 : {
7233 0 : if ( bUseExceptions ) {
7234 0 : CPLErrorReset();
7235 : }
7236 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGEOS(arg1,arg2,arg3,arg4,arg5);
7237 0 : if ( bUseExceptions ) {
7238 0 : CPLErr eclass = CPLGetLastErrorType();
7239 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7240 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7241 : }
7242 : }
7243 : }
7244 : {
7245 : /* %typemap(out) OGRErr */
7246 0 : if ( result != 0 && bUseExceptions) {
7247 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7248 0 : SWIG_fail;
7249 : }
7250 : }
7251 : {
7252 : /* %typemap(ret) OGRErr */
7253 0 : if (resultobj == Py_None ) {
7254 0 : Py_DECREF(resultobj);
7255 0 : resultobj = 0;
7256 : }
7257 0 : if (resultobj == 0) {
7258 0 : resultobj = PyInt_FromLong( result );
7259 : }
7260 : }
7261 0 : return resultobj;
7262 : fail:
7263 0 : return NULL;
7264 : }
7265 :
7266 :
7267 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGnomonic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7268 0 : PyObject *resultobj = 0;
7269 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7270 : double arg2 ;
7271 : double arg3 ;
7272 : double arg4 ;
7273 : double arg5 ;
7274 0 : void *argp1 = 0 ;
7275 0 : int res1 = 0 ;
7276 : double val2 ;
7277 0 : int ecode2 = 0 ;
7278 : double val3 ;
7279 0 : int ecode3 = 0 ;
7280 : double val4 ;
7281 0 : int ecode4 = 0 ;
7282 : double val5 ;
7283 0 : int ecode5 = 0 ;
7284 0 : PyObject * obj0 = 0 ;
7285 0 : PyObject * obj1 = 0 ;
7286 0 : PyObject * obj2 = 0 ;
7287 0 : PyObject * obj3 = 0 ;
7288 0 : PyObject * obj4 = 0 ;
7289 : char * kwnames[] = {
7290 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
7291 0 : };
7292 : OGRErr result;
7293 :
7294 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetGnomonic",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
7295 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7296 0 : if (!SWIG_IsOK(res1)) {
7297 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGnomonic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7298 : }
7299 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7300 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7301 0 : if (!SWIG_IsOK(ecode2)) {
7302 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetGnomonic" "', argument " "2"" of type '" "double""'");
7303 : }
7304 0 : arg2 = static_cast< double >(val2);
7305 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7306 0 : if (!SWIG_IsOK(ecode3)) {
7307 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetGnomonic" "', argument " "3"" of type '" "double""'");
7308 : }
7309 0 : arg3 = static_cast< double >(val3);
7310 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7311 0 : if (!SWIG_IsOK(ecode4)) {
7312 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetGnomonic" "', argument " "4"" of type '" "double""'");
7313 : }
7314 0 : arg4 = static_cast< double >(val4);
7315 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
7316 0 : if (!SWIG_IsOK(ecode5)) {
7317 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGnomonic" "', argument " "5"" of type '" "double""'");
7318 : }
7319 0 : arg5 = static_cast< double >(val5);
7320 : {
7321 0 : if ( bUseExceptions ) {
7322 0 : CPLErrorReset();
7323 : }
7324 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetGnomonic(arg1,arg2,arg3,arg4,arg5);
7325 0 : if ( bUseExceptions ) {
7326 0 : CPLErr eclass = CPLGetLastErrorType();
7327 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7328 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7329 : }
7330 : }
7331 : }
7332 : {
7333 : /* %typemap(out) OGRErr */
7334 0 : if ( result != 0 && bUseExceptions) {
7335 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7336 0 : SWIG_fail;
7337 : }
7338 : }
7339 : {
7340 : /* %typemap(ret) OGRErr */
7341 0 : if (resultobj == Py_None ) {
7342 0 : Py_DECREF(resultobj);
7343 0 : resultobj = 0;
7344 : }
7345 0 : if (resultobj == 0) {
7346 0 : resultobj = PyInt_FromLong( result );
7347 : }
7348 : }
7349 0 : return resultobj;
7350 : fail:
7351 0 : return NULL;
7352 : }
7353 :
7354 :
7355 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetHOM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7356 0 : PyObject *resultobj = 0;
7357 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7358 : double arg2 ;
7359 : double arg3 ;
7360 : double arg4 ;
7361 : double arg5 ;
7362 : double arg6 ;
7363 : double arg7 ;
7364 : double arg8 ;
7365 0 : void *argp1 = 0 ;
7366 0 : int res1 = 0 ;
7367 : double val2 ;
7368 0 : int ecode2 = 0 ;
7369 : double val3 ;
7370 0 : int ecode3 = 0 ;
7371 : double val4 ;
7372 0 : int ecode4 = 0 ;
7373 : double val5 ;
7374 0 : int ecode5 = 0 ;
7375 : double val6 ;
7376 0 : int ecode6 = 0 ;
7377 : double val7 ;
7378 0 : int ecode7 = 0 ;
7379 : double val8 ;
7380 0 : int ecode8 = 0 ;
7381 0 : PyObject * obj0 = 0 ;
7382 0 : PyObject * obj1 = 0 ;
7383 0 : PyObject * obj2 = 0 ;
7384 0 : PyObject * obj3 = 0 ;
7385 0 : PyObject * obj4 = 0 ;
7386 0 : PyObject * obj5 = 0 ;
7387 0 : PyObject * obj6 = 0 ;
7388 0 : PyObject * obj7 = 0 ;
7389 : char * kwnames[] = {
7390 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "azimuth",(char *) "recttoskew",(char *) "scale",(char *) "fe",(char *) "fn", NULL
7391 0 : };
7392 : OGRErr result;
7393 :
7394 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOO:SpatialReference_SetHOM",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
7395 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7396 0 : if (!SWIG_IsOK(res1)) {
7397 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetHOM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7398 : }
7399 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7400 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7401 0 : if (!SWIG_IsOK(ecode2)) {
7402 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetHOM" "', argument " "2"" of type '" "double""'");
7403 : }
7404 0 : arg2 = static_cast< double >(val2);
7405 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7406 0 : if (!SWIG_IsOK(ecode3)) {
7407 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetHOM" "', argument " "3"" of type '" "double""'");
7408 : }
7409 0 : arg3 = static_cast< double >(val3);
7410 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7411 0 : if (!SWIG_IsOK(ecode4)) {
7412 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetHOM" "', argument " "4"" of type '" "double""'");
7413 : }
7414 0 : arg4 = static_cast< double >(val4);
7415 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
7416 0 : if (!SWIG_IsOK(ecode5)) {
7417 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetHOM" "', argument " "5"" of type '" "double""'");
7418 : }
7419 0 : arg5 = static_cast< double >(val5);
7420 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
7421 0 : if (!SWIG_IsOK(ecode6)) {
7422 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetHOM" "', argument " "6"" of type '" "double""'");
7423 : }
7424 0 : arg6 = static_cast< double >(val6);
7425 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
7426 0 : if (!SWIG_IsOK(ecode7)) {
7427 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetHOM" "', argument " "7"" of type '" "double""'");
7428 : }
7429 0 : arg7 = static_cast< double >(val7);
7430 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
7431 0 : if (!SWIG_IsOK(ecode8)) {
7432 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetHOM" "', argument " "8"" of type '" "double""'");
7433 : }
7434 0 : arg8 = static_cast< double >(val8);
7435 : {
7436 0 : if ( bUseExceptions ) {
7437 0 : CPLErrorReset();
7438 : }
7439 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetHOM(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
7440 0 : if ( bUseExceptions ) {
7441 0 : CPLErr eclass = CPLGetLastErrorType();
7442 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7443 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7444 : }
7445 : }
7446 : }
7447 : {
7448 : /* %typemap(out) OGRErr */
7449 0 : if ( result != 0 && bUseExceptions) {
7450 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7451 0 : SWIG_fail;
7452 : }
7453 : }
7454 : {
7455 : /* %typemap(ret) OGRErr */
7456 0 : if (resultobj == Py_None ) {
7457 0 : Py_DECREF(resultobj);
7458 0 : resultobj = 0;
7459 : }
7460 0 : if (resultobj == 0) {
7461 0 : resultobj = PyInt_FromLong( result );
7462 : }
7463 : }
7464 0 : return resultobj;
7465 : fail:
7466 0 : return NULL;
7467 : }
7468 :
7469 :
7470 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetHOM2PNO(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7471 0 : PyObject *resultobj = 0;
7472 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7473 : double arg2 ;
7474 : double arg3 ;
7475 : double arg4 ;
7476 : double arg5 ;
7477 : double arg6 ;
7478 : double arg7 ;
7479 : double arg8 ;
7480 : double arg9 ;
7481 0 : void *argp1 = 0 ;
7482 0 : int res1 = 0 ;
7483 : double val2 ;
7484 0 : int ecode2 = 0 ;
7485 : double val3 ;
7486 0 : int ecode3 = 0 ;
7487 : double val4 ;
7488 0 : int ecode4 = 0 ;
7489 : double val5 ;
7490 0 : int ecode5 = 0 ;
7491 : double val6 ;
7492 0 : int ecode6 = 0 ;
7493 : double val7 ;
7494 0 : int ecode7 = 0 ;
7495 : double val8 ;
7496 0 : int ecode8 = 0 ;
7497 : double val9 ;
7498 0 : int ecode9 = 0 ;
7499 0 : PyObject * obj0 = 0 ;
7500 0 : PyObject * obj1 = 0 ;
7501 0 : PyObject * obj2 = 0 ;
7502 0 : PyObject * obj3 = 0 ;
7503 0 : PyObject * obj4 = 0 ;
7504 0 : PyObject * obj5 = 0 ;
7505 0 : PyObject * obj6 = 0 ;
7506 0 : PyObject * obj7 = 0 ;
7507 0 : PyObject * obj8 = 0 ;
7508 : char * kwnames[] = {
7509 : (char *) "self",(char *) "clat",(char *) "dfLat1",(char *) "dfLong1",(char *) "dfLat2",(char *) "dfLong2",(char *) "scale",(char *) "fe",(char *) "fn", NULL
7510 0 : };
7511 : OGRErr result;
7512 :
7513 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOOO:SpatialReference_SetHOM2PNO",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
7514 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7515 0 : if (!SWIG_IsOK(res1)) {
7516 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7517 : }
7518 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7519 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7520 0 : if (!SWIG_IsOK(ecode2)) {
7521 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "2"" of type '" "double""'");
7522 : }
7523 0 : arg2 = static_cast< double >(val2);
7524 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7525 0 : if (!SWIG_IsOK(ecode3)) {
7526 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "3"" of type '" "double""'");
7527 : }
7528 0 : arg3 = static_cast< double >(val3);
7529 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7530 0 : if (!SWIG_IsOK(ecode4)) {
7531 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "4"" of type '" "double""'");
7532 : }
7533 0 : arg4 = static_cast< double >(val4);
7534 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
7535 0 : if (!SWIG_IsOK(ecode5)) {
7536 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "5"" of type '" "double""'");
7537 : }
7538 0 : arg5 = static_cast< double >(val5);
7539 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
7540 0 : if (!SWIG_IsOK(ecode6)) {
7541 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "6"" of type '" "double""'");
7542 : }
7543 0 : arg6 = static_cast< double >(val6);
7544 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
7545 0 : if (!SWIG_IsOK(ecode7)) {
7546 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "7"" of type '" "double""'");
7547 : }
7548 0 : arg7 = static_cast< double >(val7);
7549 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
7550 0 : if (!SWIG_IsOK(ecode8)) {
7551 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "8"" of type '" "double""'");
7552 : }
7553 0 : arg8 = static_cast< double >(val8);
7554 0 : ecode9 = SWIG_AsVal_double(obj8, &val9);
7555 0 : if (!SWIG_IsOK(ecode9)) {
7556 0 : SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "SpatialReference_SetHOM2PNO" "', argument " "9"" of type '" "double""'");
7557 : }
7558 0 : arg9 = static_cast< double >(val9);
7559 : {
7560 0 : if ( bUseExceptions ) {
7561 0 : CPLErrorReset();
7562 : }
7563 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetHOM2PNO(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
7564 0 : if ( bUseExceptions ) {
7565 0 : CPLErr eclass = CPLGetLastErrorType();
7566 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7567 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7568 : }
7569 : }
7570 : }
7571 : {
7572 : /* %typemap(out) OGRErr */
7573 0 : if ( result != 0 && bUseExceptions) {
7574 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7575 0 : SWIG_fail;
7576 : }
7577 : }
7578 : {
7579 : /* %typemap(ret) OGRErr */
7580 0 : if (resultobj == Py_None ) {
7581 0 : Py_DECREF(resultobj);
7582 0 : resultobj = 0;
7583 : }
7584 0 : if (resultobj == 0) {
7585 0 : resultobj = PyInt_FromLong( result );
7586 : }
7587 : }
7588 0 : return resultobj;
7589 : fail:
7590 0 : return NULL;
7591 : }
7592 :
7593 :
7594 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetKrovak(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7595 0 : PyObject *resultobj = 0;
7596 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7597 : double arg2 ;
7598 : double arg3 ;
7599 : double arg4 ;
7600 : double arg5 ;
7601 : double arg6 ;
7602 : double arg7 ;
7603 : double arg8 ;
7604 0 : void *argp1 = 0 ;
7605 0 : int res1 = 0 ;
7606 : double val2 ;
7607 0 : int ecode2 = 0 ;
7608 : double val3 ;
7609 0 : int ecode3 = 0 ;
7610 : double val4 ;
7611 0 : int ecode4 = 0 ;
7612 : double val5 ;
7613 0 : int ecode5 = 0 ;
7614 : double val6 ;
7615 0 : int ecode6 = 0 ;
7616 : double val7 ;
7617 0 : int ecode7 = 0 ;
7618 : double val8 ;
7619 0 : int ecode8 = 0 ;
7620 0 : PyObject * obj0 = 0 ;
7621 0 : PyObject * obj1 = 0 ;
7622 0 : PyObject * obj2 = 0 ;
7623 0 : PyObject * obj3 = 0 ;
7624 0 : PyObject * obj4 = 0 ;
7625 0 : PyObject * obj5 = 0 ;
7626 0 : PyObject * obj6 = 0 ;
7627 0 : PyObject * obj7 = 0 ;
7628 : char * kwnames[] = {
7629 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "azimuth",(char *) "pseudostdparallellat",(char *) "scale",(char *) "fe",(char *) "fn", NULL
7630 0 : };
7631 : OGRErr result;
7632 :
7633 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOOO:SpatialReference_SetKrovak",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
7634 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7635 0 : if (!SWIG_IsOK(res1)) {
7636 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetKrovak" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7637 : }
7638 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7639 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7640 0 : if (!SWIG_IsOK(ecode2)) {
7641 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetKrovak" "', argument " "2"" of type '" "double""'");
7642 : }
7643 0 : arg2 = static_cast< double >(val2);
7644 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7645 0 : if (!SWIG_IsOK(ecode3)) {
7646 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetKrovak" "', argument " "3"" of type '" "double""'");
7647 : }
7648 0 : arg3 = static_cast< double >(val3);
7649 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7650 0 : if (!SWIG_IsOK(ecode4)) {
7651 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetKrovak" "', argument " "4"" of type '" "double""'");
7652 : }
7653 0 : arg4 = static_cast< double >(val4);
7654 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
7655 0 : if (!SWIG_IsOK(ecode5)) {
7656 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetKrovak" "', argument " "5"" of type '" "double""'");
7657 : }
7658 0 : arg5 = static_cast< double >(val5);
7659 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
7660 0 : if (!SWIG_IsOK(ecode6)) {
7661 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetKrovak" "', argument " "6"" of type '" "double""'");
7662 : }
7663 0 : arg6 = static_cast< double >(val6);
7664 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
7665 0 : if (!SWIG_IsOK(ecode7)) {
7666 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetKrovak" "', argument " "7"" of type '" "double""'");
7667 : }
7668 0 : arg7 = static_cast< double >(val7);
7669 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
7670 0 : if (!SWIG_IsOK(ecode8)) {
7671 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetKrovak" "', argument " "8"" of type '" "double""'");
7672 : }
7673 0 : arg8 = static_cast< double >(val8);
7674 : {
7675 0 : if ( bUseExceptions ) {
7676 0 : CPLErrorReset();
7677 : }
7678 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetKrovak(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
7679 0 : if ( bUseExceptions ) {
7680 0 : CPLErr eclass = CPLGetLastErrorType();
7681 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7682 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7683 : }
7684 : }
7685 : }
7686 : {
7687 : /* %typemap(out) OGRErr */
7688 0 : if ( result != 0 && bUseExceptions) {
7689 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7690 0 : SWIG_fail;
7691 : }
7692 : }
7693 : {
7694 : /* %typemap(ret) OGRErr */
7695 0 : if (resultobj == Py_None ) {
7696 0 : Py_DECREF(resultobj);
7697 0 : resultobj = 0;
7698 : }
7699 0 : if (resultobj == 0) {
7700 0 : resultobj = PyInt_FromLong( result );
7701 : }
7702 : }
7703 0 : return resultobj;
7704 : fail:
7705 0 : return NULL;
7706 : }
7707 :
7708 :
7709 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLAEA(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7710 0 : PyObject *resultobj = 0;
7711 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7712 : double arg2 ;
7713 : double arg3 ;
7714 : double arg4 ;
7715 : double arg5 ;
7716 0 : void *argp1 = 0 ;
7717 0 : int res1 = 0 ;
7718 : double val2 ;
7719 0 : int ecode2 = 0 ;
7720 : double val3 ;
7721 0 : int ecode3 = 0 ;
7722 : double val4 ;
7723 0 : int ecode4 = 0 ;
7724 : double val5 ;
7725 0 : int ecode5 = 0 ;
7726 0 : PyObject * obj0 = 0 ;
7727 0 : PyObject * obj1 = 0 ;
7728 0 : PyObject * obj2 = 0 ;
7729 0 : PyObject * obj3 = 0 ;
7730 0 : PyObject * obj4 = 0 ;
7731 : char * kwnames[] = {
7732 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
7733 0 : };
7734 : OGRErr result;
7735 :
7736 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetLAEA",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
7737 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7738 0 : if (!SWIG_IsOK(res1)) {
7739 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLAEA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7740 : }
7741 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7742 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7743 0 : if (!SWIG_IsOK(ecode2)) {
7744 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLAEA" "', argument " "2"" of type '" "double""'");
7745 : }
7746 0 : arg2 = static_cast< double >(val2);
7747 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7748 0 : if (!SWIG_IsOK(ecode3)) {
7749 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLAEA" "', argument " "3"" of type '" "double""'");
7750 : }
7751 0 : arg3 = static_cast< double >(val3);
7752 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7753 0 : if (!SWIG_IsOK(ecode4)) {
7754 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLAEA" "', argument " "4"" of type '" "double""'");
7755 : }
7756 0 : arg4 = static_cast< double >(val4);
7757 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
7758 0 : if (!SWIG_IsOK(ecode5)) {
7759 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLAEA" "', argument " "5"" of type '" "double""'");
7760 : }
7761 0 : arg5 = static_cast< double >(val5);
7762 : {
7763 0 : if ( bUseExceptions ) {
7764 0 : CPLErrorReset();
7765 : }
7766 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLAEA(arg1,arg2,arg3,arg4,arg5);
7767 0 : if ( bUseExceptions ) {
7768 0 : CPLErr eclass = CPLGetLastErrorType();
7769 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7770 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7771 : }
7772 : }
7773 : }
7774 : {
7775 : /* %typemap(out) OGRErr */
7776 0 : if ( result != 0 && bUseExceptions) {
7777 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7778 0 : SWIG_fail;
7779 : }
7780 : }
7781 : {
7782 : /* %typemap(ret) OGRErr */
7783 0 : if (resultobj == Py_None ) {
7784 0 : Py_DECREF(resultobj);
7785 0 : resultobj = 0;
7786 : }
7787 0 : if (resultobj == 0) {
7788 0 : resultobj = PyInt_FromLong( result );
7789 : }
7790 : }
7791 0 : return resultobj;
7792 : fail:
7793 0 : return NULL;
7794 : }
7795 :
7796 :
7797 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7798 0 : PyObject *resultobj = 0;
7799 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7800 : double arg2 ;
7801 : double arg3 ;
7802 : double arg4 ;
7803 : double arg5 ;
7804 : double arg6 ;
7805 : double arg7 ;
7806 0 : void *argp1 = 0 ;
7807 0 : int res1 = 0 ;
7808 : double val2 ;
7809 0 : int ecode2 = 0 ;
7810 : double val3 ;
7811 0 : int ecode3 = 0 ;
7812 : double val4 ;
7813 0 : int ecode4 = 0 ;
7814 : double val5 ;
7815 0 : int ecode5 = 0 ;
7816 : double val6 ;
7817 0 : int ecode6 = 0 ;
7818 : double val7 ;
7819 0 : int ecode7 = 0 ;
7820 0 : PyObject * obj0 = 0 ;
7821 0 : PyObject * obj1 = 0 ;
7822 0 : PyObject * obj2 = 0 ;
7823 0 : PyObject * obj3 = 0 ;
7824 0 : PyObject * obj4 = 0 ;
7825 0 : PyObject * obj5 = 0 ;
7826 0 : PyObject * obj6 = 0 ;
7827 : char * kwnames[] = {
7828 : (char *) "self",(char *) "stdp1",(char *) "stdp2",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
7829 0 : };
7830 : OGRErr result;
7831 :
7832 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOO:SpatialReference_SetLCC",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
7833 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7834 0 : if (!SWIG_IsOK(res1)) {
7835 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7836 : }
7837 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7838 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7839 0 : if (!SWIG_IsOK(ecode2)) {
7840 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCC" "', argument " "2"" of type '" "double""'");
7841 : }
7842 0 : arg2 = static_cast< double >(val2);
7843 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7844 0 : if (!SWIG_IsOK(ecode3)) {
7845 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCC" "', argument " "3"" of type '" "double""'");
7846 : }
7847 0 : arg3 = static_cast< double >(val3);
7848 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7849 0 : if (!SWIG_IsOK(ecode4)) {
7850 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCC" "', argument " "4"" of type '" "double""'");
7851 : }
7852 0 : arg4 = static_cast< double >(val4);
7853 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
7854 0 : if (!SWIG_IsOK(ecode5)) {
7855 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCC" "', argument " "5"" of type '" "double""'");
7856 : }
7857 0 : arg5 = static_cast< double >(val5);
7858 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
7859 0 : if (!SWIG_IsOK(ecode6)) {
7860 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCC" "', argument " "6"" of type '" "double""'");
7861 : }
7862 0 : arg6 = static_cast< double >(val6);
7863 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
7864 0 : if (!SWIG_IsOK(ecode7)) {
7865 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetLCC" "', argument " "7"" of type '" "double""'");
7866 : }
7867 0 : arg7 = static_cast< double >(val7);
7868 : {
7869 0 : if ( bUseExceptions ) {
7870 0 : CPLErrorReset();
7871 : }
7872 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCC(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
7873 0 : if ( bUseExceptions ) {
7874 0 : CPLErr eclass = CPLGetLastErrorType();
7875 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7876 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7877 : }
7878 : }
7879 : }
7880 : {
7881 : /* %typemap(out) OGRErr */
7882 0 : if ( result != 0 && bUseExceptions) {
7883 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7884 0 : SWIG_fail;
7885 : }
7886 : }
7887 : {
7888 : /* %typemap(ret) OGRErr */
7889 0 : if (resultobj == Py_None ) {
7890 0 : Py_DECREF(resultobj);
7891 0 : resultobj = 0;
7892 : }
7893 0 : if (resultobj == 0) {
7894 0 : resultobj = PyInt_FromLong( result );
7895 : }
7896 : }
7897 0 : return resultobj;
7898 : fail:
7899 0 : return NULL;
7900 : }
7901 :
7902 :
7903 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCC1SP(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
7904 0 : PyObject *resultobj = 0;
7905 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
7906 : double arg2 ;
7907 : double arg3 ;
7908 : double arg4 ;
7909 : double arg5 ;
7910 : double arg6 ;
7911 0 : void *argp1 = 0 ;
7912 0 : int res1 = 0 ;
7913 : double val2 ;
7914 0 : int ecode2 = 0 ;
7915 : double val3 ;
7916 0 : int ecode3 = 0 ;
7917 : double val4 ;
7918 0 : int ecode4 = 0 ;
7919 : double val5 ;
7920 0 : int ecode5 = 0 ;
7921 : double val6 ;
7922 0 : int ecode6 = 0 ;
7923 0 : PyObject * obj0 = 0 ;
7924 0 : PyObject * obj1 = 0 ;
7925 0 : PyObject * obj2 = 0 ;
7926 0 : PyObject * obj3 = 0 ;
7927 0 : PyObject * obj4 = 0 ;
7928 0 : PyObject * obj5 = 0 ;
7929 : char * kwnames[] = {
7930 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "scale",(char *) "fe",(char *) "fn", NULL
7931 0 : };
7932 : OGRErr result;
7933 :
7934 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetLCC1SP",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
7935 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
7936 0 : if (!SWIG_IsOK(res1)) {
7937 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCC1SP" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
7938 : }
7939 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
7940 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
7941 0 : if (!SWIG_IsOK(ecode2)) {
7942 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCC1SP" "', argument " "2"" of type '" "double""'");
7943 : }
7944 0 : arg2 = static_cast< double >(val2);
7945 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
7946 0 : if (!SWIG_IsOK(ecode3)) {
7947 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCC1SP" "', argument " "3"" of type '" "double""'");
7948 : }
7949 0 : arg3 = static_cast< double >(val3);
7950 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
7951 0 : if (!SWIG_IsOK(ecode4)) {
7952 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCC1SP" "', argument " "4"" of type '" "double""'");
7953 : }
7954 0 : arg4 = static_cast< double >(val4);
7955 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
7956 0 : if (!SWIG_IsOK(ecode5)) {
7957 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCC1SP" "', argument " "5"" of type '" "double""'");
7958 : }
7959 0 : arg5 = static_cast< double >(val5);
7960 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
7961 0 : if (!SWIG_IsOK(ecode6)) {
7962 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCC1SP" "', argument " "6"" of type '" "double""'");
7963 : }
7964 0 : arg6 = static_cast< double >(val6);
7965 : {
7966 0 : if ( bUseExceptions ) {
7967 0 : CPLErrorReset();
7968 : }
7969 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCC1SP(arg1,arg2,arg3,arg4,arg5,arg6);
7970 0 : if ( bUseExceptions ) {
7971 0 : CPLErr eclass = CPLGetLastErrorType();
7972 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
7973 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
7974 : }
7975 : }
7976 : }
7977 : {
7978 : /* %typemap(out) OGRErr */
7979 0 : if ( result != 0 && bUseExceptions) {
7980 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
7981 0 : SWIG_fail;
7982 : }
7983 : }
7984 : {
7985 : /* %typemap(ret) OGRErr */
7986 0 : if (resultobj == Py_None ) {
7987 0 : Py_DECREF(resultobj);
7988 0 : resultobj = 0;
7989 : }
7990 0 : if (resultobj == 0) {
7991 0 : resultobj = PyInt_FromLong( result );
7992 : }
7993 : }
7994 0 : return resultobj;
7995 : fail:
7996 0 : return NULL;
7997 : }
7998 :
7999 :
8000 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLCCB(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8001 0 : PyObject *resultobj = 0;
8002 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8003 : double arg2 ;
8004 : double arg3 ;
8005 : double arg4 ;
8006 : double arg5 ;
8007 : double arg6 ;
8008 : double arg7 ;
8009 0 : void *argp1 = 0 ;
8010 0 : int res1 = 0 ;
8011 : double val2 ;
8012 0 : int ecode2 = 0 ;
8013 : double val3 ;
8014 0 : int ecode3 = 0 ;
8015 : double val4 ;
8016 0 : int ecode4 = 0 ;
8017 : double val5 ;
8018 0 : int ecode5 = 0 ;
8019 : double val6 ;
8020 0 : int ecode6 = 0 ;
8021 : double val7 ;
8022 0 : int ecode7 = 0 ;
8023 0 : PyObject * obj0 = 0 ;
8024 0 : PyObject * obj1 = 0 ;
8025 0 : PyObject * obj2 = 0 ;
8026 0 : PyObject * obj3 = 0 ;
8027 0 : PyObject * obj4 = 0 ;
8028 0 : PyObject * obj5 = 0 ;
8029 0 : PyObject * obj6 = 0 ;
8030 : char * kwnames[] = {
8031 : (char *) "self",(char *) "stdp1",(char *) "stdp2",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
8032 0 : };
8033 : OGRErr result;
8034 :
8035 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOO:SpatialReference_SetLCCB",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
8036 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8037 0 : if (!SWIG_IsOK(res1)) {
8038 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLCCB" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8039 : }
8040 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8041 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8042 0 : if (!SWIG_IsOK(ecode2)) {
8043 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetLCCB" "', argument " "2"" of type '" "double""'");
8044 : }
8045 0 : arg2 = static_cast< double >(val2);
8046 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8047 0 : if (!SWIG_IsOK(ecode3)) {
8048 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetLCCB" "', argument " "3"" of type '" "double""'");
8049 : }
8050 0 : arg3 = static_cast< double >(val3);
8051 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8052 0 : if (!SWIG_IsOK(ecode4)) {
8053 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetLCCB" "', argument " "4"" of type '" "double""'");
8054 : }
8055 0 : arg4 = static_cast< double >(val4);
8056 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8057 0 : if (!SWIG_IsOK(ecode5)) {
8058 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetLCCB" "', argument " "5"" of type '" "double""'");
8059 : }
8060 0 : arg5 = static_cast< double >(val5);
8061 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
8062 0 : if (!SWIG_IsOK(ecode6)) {
8063 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetLCCB" "', argument " "6"" of type '" "double""'");
8064 : }
8065 0 : arg6 = static_cast< double >(val6);
8066 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
8067 0 : if (!SWIG_IsOK(ecode7)) {
8068 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetLCCB" "', argument " "7"" of type '" "double""'");
8069 : }
8070 0 : arg7 = static_cast< double >(val7);
8071 : {
8072 0 : if ( bUseExceptions ) {
8073 0 : CPLErrorReset();
8074 : }
8075 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLCCB(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
8076 0 : if ( bUseExceptions ) {
8077 0 : CPLErr eclass = CPLGetLastErrorType();
8078 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8079 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8080 : }
8081 : }
8082 : }
8083 : {
8084 : /* %typemap(out) OGRErr */
8085 0 : if ( result != 0 && bUseExceptions) {
8086 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8087 0 : SWIG_fail;
8088 : }
8089 : }
8090 : {
8091 : /* %typemap(ret) OGRErr */
8092 0 : if (resultobj == Py_None ) {
8093 0 : Py_DECREF(resultobj);
8094 0 : resultobj = 0;
8095 : }
8096 0 : if (resultobj == 0) {
8097 0 : resultobj = PyInt_FromLong( result );
8098 : }
8099 : }
8100 0 : return resultobj;
8101 : fail:
8102 0 : return NULL;
8103 : }
8104 :
8105 :
8106 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8107 0 : PyObject *resultobj = 0;
8108 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8109 : double arg2 ;
8110 : double arg3 ;
8111 : double arg4 ;
8112 : double arg5 ;
8113 0 : void *argp1 = 0 ;
8114 0 : int res1 = 0 ;
8115 : double val2 ;
8116 0 : int ecode2 = 0 ;
8117 : double val3 ;
8118 0 : int ecode3 = 0 ;
8119 : double val4 ;
8120 0 : int ecode4 = 0 ;
8121 : double val5 ;
8122 0 : int ecode5 = 0 ;
8123 0 : PyObject * obj0 = 0 ;
8124 0 : PyObject * obj1 = 0 ;
8125 0 : PyObject * obj2 = 0 ;
8126 0 : PyObject * obj3 = 0 ;
8127 0 : PyObject * obj4 = 0 ;
8128 : char * kwnames[] = {
8129 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
8130 0 : };
8131 : OGRErr result;
8132 :
8133 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetMC",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
8134 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8135 0 : if (!SWIG_IsOK(res1)) {
8136 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8137 : }
8138 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8139 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8140 0 : if (!SWIG_IsOK(ecode2)) {
8141 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMC" "', argument " "2"" of type '" "double""'");
8142 : }
8143 0 : arg2 = static_cast< double >(val2);
8144 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8145 0 : if (!SWIG_IsOK(ecode3)) {
8146 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMC" "', argument " "3"" of type '" "double""'");
8147 : }
8148 0 : arg3 = static_cast< double >(val3);
8149 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8150 0 : if (!SWIG_IsOK(ecode4)) {
8151 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMC" "', argument " "4"" of type '" "double""'");
8152 : }
8153 0 : arg4 = static_cast< double >(val4);
8154 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8155 0 : if (!SWIG_IsOK(ecode5)) {
8156 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMC" "', argument " "5"" of type '" "double""'");
8157 : }
8158 0 : arg5 = static_cast< double >(val5);
8159 : {
8160 0 : if ( bUseExceptions ) {
8161 0 : CPLErrorReset();
8162 : }
8163 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetMC(arg1,arg2,arg3,arg4,arg5);
8164 0 : if ( bUseExceptions ) {
8165 0 : CPLErr eclass = CPLGetLastErrorType();
8166 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8167 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8168 : }
8169 : }
8170 : }
8171 : {
8172 : /* %typemap(out) OGRErr */
8173 0 : if ( result != 0 && bUseExceptions) {
8174 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8175 0 : SWIG_fail;
8176 : }
8177 : }
8178 : {
8179 : /* %typemap(ret) OGRErr */
8180 0 : if (resultobj == Py_None ) {
8181 0 : Py_DECREF(resultobj);
8182 0 : resultobj = 0;
8183 : }
8184 0 : if (resultobj == 0) {
8185 0 : resultobj = PyInt_FromLong( result );
8186 : }
8187 : }
8188 0 : return resultobj;
8189 : fail:
8190 0 : return NULL;
8191 : }
8192 :
8193 :
8194 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMercator(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8195 0 : PyObject *resultobj = 0;
8196 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8197 : double arg2 ;
8198 : double arg3 ;
8199 : double arg4 ;
8200 : double arg5 ;
8201 : double arg6 ;
8202 0 : void *argp1 = 0 ;
8203 0 : int res1 = 0 ;
8204 : double val2 ;
8205 0 : int ecode2 = 0 ;
8206 : double val3 ;
8207 0 : int ecode3 = 0 ;
8208 : double val4 ;
8209 0 : int ecode4 = 0 ;
8210 : double val5 ;
8211 0 : int ecode5 = 0 ;
8212 : double val6 ;
8213 0 : int ecode6 = 0 ;
8214 0 : PyObject * obj0 = 0 ;
8215 0 : PyObject * obj1 = 0 ;
8216 0 : PyObject * obj2 = 0 ;
8217 0 : PyObject * obj3 = 0 ;
8218 0 : PyObject * obj4 = 0 ;
8219 0 : PyObject * obj5 = 0 ;
8220 : char * kwnames[] = {
8221 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "scale",(char *) "fe",(char *) "fn", NULL
8222 0 : };
8223 : OGRErr result;
8224 :
8225 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetMercator",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
8226 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8227 0 : if (!SWIG_IsOK(res1)) {
8228 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMercator" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8229 : }
8230 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8231 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8232 0 : if (!SWIG_IsOK(ecode2)) {
8233 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMercator" "', argument " "2"" of type '" "double""'");
8234 : }
8235 0 : arg2 = static_cast< double >(val2);
8236 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8237 0 : if (!SWIG_IsOK(ecode3)) {
8238 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMercator" "', argument " "3"" of type '" "double""'");
8239 : }
8240 0 : arg3 = static_cast< double >(val3);
8241 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8242 0 : if (!SWIG_IsOK(ecode4)) {
8243 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMercator" "', argument " "4"" of type '" "double""'");
8244 : }
8245 0 : arg4 = static_cast< double >(val4);
8246 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8247 0 : if (!SWIG_IsOK(ecode5)) {
8248 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetMercator" "', argument " "5"" of type '" "double""'");
8249 : }
8250 0 : arg5 = static_cast< double >(val5);
8251 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
8252 0 : if (!SWIG_IsOK(ecode6)) {
8253 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetMercator" "', argument " "6"" of type '" "double""'");
8254 : }
8255 0 : arg6 = static_cast< double >(val6);
8256 : {
8257 0 : if ( bUseExceptions ) {
8258 0 : CPLErrorReset();
8259 : }
8260 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetMercator(arg1,arg2,arg3,arg4,arg5,arg6);
8261 0 : if ( bUseExceptions ) {
8262 0 : CPLErr eclass = CPLGetLastErrorType();
8263 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8264 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8265 : }
8266 : }
8267 : }
8268 : {
8269 : /* %typemap(out) OGRErr */
8270 0 : if ( result != 0 && bUseExceptions) {
8271 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8272 0 : SWIG_fail;
8273 : }
8274 : }
8275 : {
8276 : /* %typemap(ret) OGRErr */
8277 0 : if (resultobj == Py_None ) {
8278 0 : Py_DECREF(resultobj);
8279 0 : resultobj = 0;
8280 : }
8281 0 : if (resultobj == 0) {
8282 0 : resultobj = PyInt_FromLong( result );
8283 : }
8284 : }
8285 0 : return resultobj;
8286 : fail:
8287 0 : return NULL;
8288 : }
8289 :
8290 :
8291 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetMollweide(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8292 0 : PyObject *resultobj = 0;
8293 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8294 : double arg2 ;
8295 : double arg3 ;
8296 : double arg4 ;
8297 0 : void *argp1 = 0 ;
8298 0 : int res1 = 0 ;
8299 : double val2 ;
8300 0 : int ecode2 = 0 ;
8301 : double val3 ;
8302 0 : int ecode3 = 0 ;
8303 : double val4 ;
8304 0 : int ecode4 = 0 ;
8305 0 : PyObject * obj0 = 0 ;
8306 0 : PyObject * obj1 = 0 ;
8307 0 : PyObject * obj2 = 0 ;
8308 0 : PyObject * obj3 = 0 ;
8309 : char * kwnames[] = {
8310 : (char *) "self",(char *) "cm",(char *) "fe",(char *) "fn", NULL
8311 0 : };
8312 : OGRErr result;
8313 :
8314 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:SpatialReference_SetMollweide",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
8315 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8316 0 : if (!SWIG_IsOK(res1)) {
8317 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetMollweide" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8318 : }
8319 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8320 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8321 0 : if (!SWIG_IsOK(ecode2)) {
8322 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetMollweide" "', argument " "2"" of type '" "double""'");
8323 : }
8324 0 : arg2 = static_cast< double >(val2);
8325 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8326 0 : if (!SWIG_IsOK(ecode3)) {
8327 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetMollweide" "', argument " "3"" of type '" "double""'");
8328 : }
8329 0 : arg3 = static_cast< double >(val3);
8330 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8331 0 : if (!SWIG_IsOK(ecode4)) {
8332 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetMollweide" "', argument " "4"" of type '" "double""'");
8333 : }
8334 0 : arg4 = static_cast< double >(val4);
8335 : {
8336 0 : if ( bUseExceptions ) {
8337 0 : CPLErrorReset();
8338 : }
8339 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetMollweide(arg1,arg2,arg3,arg4);
8340 0 : if ( bUseExceptions ) {
8341 0 : CPLErr eclass = CPLGetLastErrorType();
8342 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8343 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8344 : }
8345 : }
8346 : }
8347 : {
8348 : /* %typemap(out) OGRErr */
8349 0 : if ( result != 0 && bUseExceptions) {
8350 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8351 0 : SWIG_fail;
8352 : }
8353 : }
8354 : {
8355 : /* %typemap(ret) OGRErr */
8356 0 : if (resultobj == Py_None ) {
8357 0 : Py_DECREF(resultobj);
8358 0 : resultobj = 0;
8359 : }
8360 0 : if (resultobj == 0) {
8361 0 : resultobj = PyInt_FromLong( result );
8362 : }
8363 : }
8364 0 : return resultobj;
8365 : fail:
8366 0 : return NULL;
8367 : }
8368 :
8369 :
8370 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetNZMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8371 0 : PyObject *resultobj = 0;
8372 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8373 : double arg2 ;
8374 : double arg3 ;
8375 : double arg4 ;
8376 : double arg5 ;
8377 0 : void *argp1 = 0 ;
8378 0 : int res1 = 0 ;
8379 : double val2 ;
8380 0 : int ecode2 = 0 ;
8381 : double val3 ;
8382 0 : int ecode3 = 0 ;
8383 : double val4 ;
8384 0 : int ecode4 = 0 ;
8385 : double val5 ;
8386 0 : int ecode5 = 0 ;
8387 0 : PyObject * obj0 = 0 ;
8388 0 : PyObject * obj1 = 0 ;
8389 0 : PyObject * obj2 = 0 ;
8390 0 : PyObject * obj3 = 0 ;
8391 0 : PyObject * obj4 = 0 ;
8392 : char * kwnames[] = {
8393 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
8394 0 : };
8395 : OGRErr result;
8396 :
8397 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetNZMG",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
8398 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8399 0 : if (!SWIG_IsOK(res1)) {
8400 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetNZMG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8401 : }
8402 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8403 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8404 0 : if (!SWIG_IsOK(ecode2)) {
8405 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetNZMG" "', argument " "2"" of type '" "double""'");
8406 : }
8407 0 : arg2 = static_cast< double >(val2);
8408 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8409 0 : if (!SWIG_IsOK(ecode3)) {
8410 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetNZMG" "', argument " "3"" of type '" "double""'");
8411 : }
8412 0 : arg3 = static_cast< double >(val3);
8413 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8414 0 : if (!SWIG_IsOK(ecode4)) {
8415 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetNZMG" "', argument " "4"" of type '" "double""'");
8416 : }
8417 0 : arg4 = static_cast< double >(val4);
8418 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8419 0 : if (!SWIG_IsOK(ecode5)) {
8420 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetNZMG" "', argument " "5"" of type '" "double""'");
8421 : }
8422 0 : arg5 = static_cast< double >(val5);
8423 : {
8424 0 : if ( bUseExceptions ) {
8425 0 : CPLErrorReset();
8426 : }
8427 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetNZMG(arg1,arg2,arg3,arg4,arg5);
8428 0 : if ( bUseExceptions ) {
8429 0 : CPLErr eclass = CPLGetLastErrorType();
8430 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8431 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8432 : }
8433 : }
8434 : }
8435 : {
8436 : /* %typemap(out) OGRErr */
8437 0 : if ( result != 0 && bUseExceptions) {
8438 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8439 0 : SWIG_fail;
8440 : }
8441 : }
8442 : {
8443 : /* %typemap(ret) OGRErr */
8444 0 : if (resultobj == Py_None ) {
8445 0 : Py_DECREF(resultobj);
8446 0 : resultobj = 0;
8447 : }
8448 0 : if (resultobj == 0) {
8449 0 : resultobj = PyInt_FromLong( result );
8450 : }
8451 : }
8452 0 : return resultobj;
8453 : fail:
8454 0 : return NULL;
8455 : }
8456 :
8457 :
8458 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetOS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8459 0 : PyObject *resultobj = 0;
8460 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8461 : double arg2 ;
8462 : double arg3 ;
8463 : double arg4 ;
8464 : double arg5 ;
8465 : double arg6 ;
8466 0 : void *argp1 = 0 ;
8467 0 : int res1 = 0 ;
8468 : double val2 ;
8469 0 : int ecode2 = 0 ;
8470 : double val3 ;
8471 0 : int ecode3 = 0 ;
8472 : double val4 ;
8473 0 : int ecode4 = 0 ;
8474 : double val5 ;
8475 0 : int ecode5 = 0 ;
8476 : double val6 ;
8477 0 : int ecode6 = 0 ;
8478 0 : PyObject * obj0 = 0 ;
8479 0 : PyObject * obj1 = 0 ;
8480 0 : PyObject * obj2 = 0 ;
8481 0 : PyObject * obj3 = 0 ;
8482 0 : PyObject * obj4 = 0 ;
8483 0 : PyObject * obj5 = 0 ;
8484 : char * kwnames[] = {
8485 : (char *) "self",(char *) "dfOriginLat",(char *) "dfCMeridian",(char *) "scale",(char *) "fe",(char *) "fn", NULL
8486 0 : };
8487 : OGRErr result;
8488 :
8489 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetOS",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
8490 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8491 0 : if (!SWIG_IsOK(res1)) {
8492 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetOS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8493 : }
8494 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8495 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8496 0 : if (!SWIG_IsOK(ecode2)) {
8497 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetOS" "', argument " "2"" of type '" "double""'");
8498 : }
8499 0 : arg2 = static_cast< double >(val2);
8500 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8501 0 : if (!SWIG_IsOK(ecode3)) {
8502 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetOS" "', argument " "3"" of type '" "double""'");
8503 : }
8504 0 : arg3 = static_cast< double >(val3);
8505 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8506 0 : if (!SWIG_IsOK(ecode4)) {
8507 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetOS" "', argument " "4"" of type '" "double""'");
8508 : }
8509 0 : arg4 = static_cast< double >(val4);
8510 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8511 0 : if (!SWIG_IsOK(ecode5)) {
8512 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetOS" "', argument " "5"" of type '" "double""'");
8513 : }
8514 0 : arg5 = static_cast< double >(val5);
8515 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
8516 0 : if (!SWIG_IsOK(ecode6)) {
8517 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetOS" "', argument " "6"" of type '" "double""'");
8518 : }
8519 0 : arg6 = static_cast< double >(val6);
8520 : {
8521 0 : if ( bUseExceptions ) {
8522 0 : CPLErrorReset();
8523 : }
8524 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetOS(arg1,arg2,arg3,arg4,arg5,arg6);
8525 0 : if ( bUseExceptions ) {
8526 0 : CPLErr eclass = CPLGetLastErrorType();
8527 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8528 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8529 : }
8530 : }
8531 : }
8532 : {
8533 : /* %typemap(out) OGRErr */
8534 0 : if ( result != 0 && bUseExceptions) {
8535 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8536 0 : SWIG_fail;
8537 : }
8538 : }
8539 : {
8540 : /* %typemap(ret) OGRErr */
8541 0 : if (resultobj == Py_None ) {
8542 0 : Py_DECREF(resultobj);
8543 0 : resultobj = 0;
8544 : }
8545 0 : if (resultobj == 0) {
8546 0 : resultobj = PyInt_FromLong( result );
8547 : }
8548 : }
8549 0 : return resultobj;
8550 : fail:
8551 0 : return NULL;
8552 : }
8553 :
8554 :
8555 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetOrthographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8556 0 : PyObject *resultobj = 0;
8557 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8558 : double arg2 ;
8559 : double arg3 ;
8560 : double arg4 ;
8561 : double arg5 ;
8562 0 : void *argp1 = 0 ;
8563 0 : int res1 = 0 ;
8564 : double val2 ;
8565 0 : int ecode2 = 0 ;
8566 : double val3 ;
8567 0 : int ecode3 = 0 ;
8568 : double val4 ;
8569 0 : int ecode4 = 0 ;
8570 : double val5 ;
8571 0 : int ecode5 = 0 ;
8572 0 : PyObject * obj0 = 0 ;
8573 0 : PyObject * obj1 = 0 ;
8574 0 : PyObject * obj2 = 0 ;
8575 0 : PyObject * obj3 = 0 ;
8576 0 : PyObject * obj4 = 0 ;
8577 : char * kwnames[] = {
8578 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
8579 0 : };
8580 : OGRErr result;
8581 :
8582 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetOrthographic",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
8583 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8584 0 : if (!SWIG_IsOK(res1)) {
8585 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetOrthographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8586 : }
8587 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8588 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8589 0 : if (!SWIG_IsOK(ecode2)) {
8590 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetOrthographic" "', argument " "2"" of type '" "double""'");
8591 : }
8592 0 : arg2 = static_cast< double >(val2);
8593 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8594 0 : if (!SWIG_IsOK(ecode3)) {
8595 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetOrthographic" "', argument " "3"" of type '" "double""'");
8596 : }
8597 0 : arg3 = static_cast< double >(val3);
8598 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8599 0 : if (!SWIG_IsOK(ecode4)) {
8600 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetOrthographic" "', argument " "4"" of type '" "double""'");
8601 : }
8602 0 : arg4 = static_cast< double >(val4);
8603 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8604 0 : if (!SWIG_IsOK(ecode5)) {
8605 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetOrthographic" "', argument " "5"" of type '" "double""'");
8606 : }
8607 0 : arg5 = static_cast< double >(val5);
8608 : {
8609 0 : if ( bUseExceptions ) {
8610 0 : CPLErrorReset();
8611 : }
8612 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetOrthographic(arg1,arg2,arg3,arg4,arg5);
8613 0 : if ( bUseExceptions ) {
8614 0 : CPLErr eclass = CPLGetLastErrorType();
8615 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8616 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8617 : }
8618 : }
8619 : }
8620 : {
8621 : /* %typemap(out) OGRErr */
8622 0 : if ( result != 0 && bUseExceptions) {
8623 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8624 0 : SWIG_fail;
8625 : }
8626 : }
8627 : {
8628 : /* %typemap(ret) OGRErr */
8629 0 : if (resultobj == Py_None ) {
8630 0 : Py_DECREF(resultobj);
8631 0 : resultobj = 0;
8632 : }
8633 0 : if (resultobj == 0) {
8634 0 : resultobj = PyInt_FromLong( result );
8635 : }
8636 : }
8637 0 : return resultobj;
8638 : fail:
8639 0 : return NULL;
8640 : }
8641 :
8642 :
8643 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetPolyconic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8644 0 : PyObject *resultobj = 0;
8645 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8646 : double arg2 ;
8647 : double arg3 ;
8648 : double arg4 ;
8649 : double arg5 ;
8650 0 : void *argp1 = 0 ;
8651 0 : int res1 = 0 ;
8652 : double val2 ;
8653 0 : int ecode2 = 0 ;
8654 : double val3 ;
8655 0 : int ecode3 = 0 ;
8656 : double val4 ;
8657 0 : int ecode4 = 0 ;
8658 : double val5 ;
8659 0 : int ecode5 = 0 ;
8660 0 : PyObject * obj0 = 0 ;
8661 0 : PyObject * obj1 = 0 ;
8662 0 : PyObject * obj2 = 0 ;
8663 0 : PyObject * obj3 = 0 ;
8664 0 : PyObject * obj4 = 0 ;
8665 : char * kwnames[] = {
8666 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
8667 0 : };
8668 : OGRErr result;
8669 :
8670 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetPolyconic",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
8671 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8672 0 : if (!SWIG_IsOK(res1)) {
8673 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetPolyconic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8674 : }
8675 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8676 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8677 0 : if (!SWIG_IsOK(ecode2)) {
8678 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetPolyconic" "', argument " "2"" of type '" "double""'");
8679 : }
8680 0 : arg2 = static_cast< double >(val2);
8681 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8682 0 : if (!SWIG_IsOK(ecode3)) {
8683 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetPolyconic" "', argument " "3"" of type '" "double""'");
8684 : }
8685 0 : arg3 = static_cast< double >(val3);
8686 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8687 0 : if (!SWIG_IsOK(ecode4)) {
8688 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetPolyconic" "', argument " "4"" of type '" "double""'");
8689 : }
8690 0 : arg4 = static_cast< double >(val4);
8691 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8692 0 : if (!SWIG_IsOK(ecode5)) {
8693 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetPolyconic" "', argument " "5"" of type '" "double""'");
8694 : }
8695 0 : arg5 = static_cast< double >(val5);
8696 : {
8697 0 : if ( bUseExceptions ) {
8698 0 : CPLErrorReset();
8699 : }
8700 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetPolyconic(arg1,arg2,arg3,arg4,arg5);
8701 0 : if ( bUseExceptions ) {
8702 0 : CPLErr eclass = CPLGetLastErrorType();
8703 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8704 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8705 : }
8706 : }
8707 : }
8708 : {
8709 : /* %typemap(out) OGRErr */
8710 0 : if ( result != 0 && bUseExceptions) {
8711 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8712 0 : SWIG_fail;
8713 : }
8714 : }
8715 : {
8716 : /* %typemap(ret) OGRErr */
8717 0 : if (resultobj == Py_None ) {
8718 0 : Py_DECREF(resultobj);
8719 0 : resultobj = 0;
8720 : }
8721 0 : if (resultobj == 0) {
8722 0 : resultobj = PyInt_FromLong( result );
8723 : }
8724 : }
8725 0 : return resultobj;
8726 : fail:
8727 0 : return NULL;
8728 : }
8729 :
8730 :
8731 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetPS(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8732 0 : PyObject *resultobj = 0;
8733 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8734 : double arg2 ;
8735 : double arg3 ;
8736 : double arg4 ;
8737 : double arg5 ;
8738 : double arg6 ;
8739 0 : void *argp1 = 0 ;
8740 0 : int res1 = 0 ;
8741 : double val2 ;
8742 0 : int ecode2 = 0 ;
8743 : double val3 ;
8744 0 : int ecode3 = 0 ;
8745 : double val4 ;
8746 0 : int ecode4 = 0 ;
8747 : double val5 ;
8748 0 : int ecode5 = 0 ;
8749 : double val6 ;
8750 0 : int ecode6 = 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 : char * kwnames[] = {
8758 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "scale",(char *) "fe",(char *) "fn", NULL
8759 0 : };
8760 : OGRErr result;
8761 :
8762 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetPS",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
8763 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8764 0 : if (!SWIG_IsOK(res1)) {
8765 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetPS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8766 : }
8767 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8768 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8769 0 : if (!SWIG_IsOK(ecode2)) {
8770 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetPS" "', argument " "2"" of type '" "double""'");
8771 : }
8772 0 : arg2 = static_cast< double >(val2);
8773 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8774 0 : if (!SWIG_IsOK(ecode3)) {
8775 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetPS" "', argument " "3"" of type '" "double""'");
8776 : }
8777 0 : arg3 = static_cast< double >(val3);
8778 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8779 0 : if (!SWIG_IsOK(ecode4)) {
8780 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetPS" "', argument " "4"" of type '" "double""'");
8781 : }
8782 0 : arg4 = static_cast< double >(val4);
8783 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
8784 0 : if (!SWIG_IsOK(ecode5)) {
8785 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetPS" "', argument " "5"" of type '" "double""'");
8786 : }
8787 0 : arg5 = static_cast< double >(val5);
8788 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
8789 0 : if (!SWIG_IsOK(ecode6)) {
8790 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetPS" "', argument " "6"" of type '" "double""'");
8791 : }
8792 0 : arg6 = static_cast< double >(val6);
8793 : {
8794 0 : if ( bUseExceptions ) {
8795 0 : CPLErrorReset();
8796 : }
8797 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetPS(arg1,arg2,arg3,arg4,arg5,arg6);
8798 0 : if ( bUseExceptions ) {
8799 0 : CPLErr eclass = CPLGetLastErrorType();
8800 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8801 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8802 : }
8803 : }
8804 : }
8805 : {
8806 : /* %typemap(out) OGRErr */
8807 0 : if ( result != 0 && bUseExceptions) {
8808 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8809 0 : SWIG_fail;
8810 : }
8811 : }
8812 : {
8813 : /* %typemap(ret) OGRErr */
8814 0 : if (resultobj == Py_None ) {
8815 0 : Py_DECREF(resultobj);
8816 0 : resultobj = 0;
8817 : }
8818 0 : if (resultobj == 0) {
8819 0 : resultobj = PyInt_FromLong( result );
8820 : }
8821 : }
8822 0 : return resultobj;
8823 : fail:
8824 0 : return NULL;
8825 : }
8826 :
8827 :
8828 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetRobinson(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8829 0 : PyObject *resultobj = 0;
8830 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8831 : double arg2 ;
8832 : double arg3 ;
8833 : double arg4 ;
8834 0 : void *argp1 = 0 ;
8835 0 : int res1 = 0 ;
8836 : double val2 ;
8837 0 : int ecode2 = 0 ;
8838 : double val3 ;
8839 0 : int ecode3 = 0 ;
8840 : double val4 ;
8841 0 : int ecode4 = 0 ;
8842 0 : PyObject * obj0 = 0 ;
8843 0 : PyObject * obj1 = 0 ;
8844 0 : PyObject * obj2 = 0 ;
8845 0 : PyObject * obj3 = 0 ;
8846 : char * kwnames[] = {
8847 : (char *) "self",(char *) "clong",(char *) "fe",(char *) "fn", NULL
8848 0 : };
8849 : OGRErr result;
8850 :
8851 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:SpatialReference_SetRobinson",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
8852 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8853 0 : if (!SWIG_IsOK(res1)) {
8854 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetRobinson" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8855 : }
8856 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8857 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8858 0 : if (!SWIG_IsOK(ecode2)) {
8859 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetRobinson" "', argument " "2"" of type '" "double""'");
8860 : }
8861 0 : arg2 = static_cast< double >(val2);
8862 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8863 0 : if (!SWIG_IsOK(ecode3)) {
8864 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetRobinson" "', argument " "3"" of type '" "double""'");
8865 : }
8866 0 : arg3 = static_cast< double >(val3);
8867 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8868 0 : if (!SWIG_IsOK(ecode4)) {
8869 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetRobinson" "', argument " "4"" of type '" "double""'");
8870 : }
8871 0 : arg4 = static_cast< double >(val4);
8872 : {
8873 0 : if ( bUseExceptions ) {
8874 0 : CPLErrorReset();
8875 : }
8876 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetRobinson(arg1,arg2,arg3,arg4);
8877 0 : if ( bUseExceptions ) {
8878 0 : CPLErr eclass = CPLGetLastErrorType();
8879 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8880 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8881 : }
8882 : }
8883 : }
8884 : {
8885 : /* %typemap(out) OGRErr */
8886 0 : if ( result != 0 && bUseExceptions) {
8887 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8888 0 : SWIG_fail;
8889 : }
8890 : }
8891 : {
8892 : /* %typemap(ret) OGRErr */
8893 0 : if (resultobj == Py_None ) {
8894 0 : Py_DECREF(resultobj);
8895 0 : resultobj = 0;
8896 : }
8897 0 : if (resultobj == 0) {
8898 0 : resultobj = PyInt_FromLong( result );
8899 : }
8900 : }
8901 0 : return resultobj;
8902 : fail:
8903 0 : return NULL;
8904 : }
8905 :
8906 :
8907 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetSinusoidal(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8908 0 : PyObject *resultobj = 0;
8909 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8910 : double arg2 ;
8911 : double arg3 ;
8912 : double arg4 ;
8913 0 : void *argp1 = 0 ;
8914 0 : int res1 = 0 ;
8915 : double val2 ;
8916 0 : int ecode2 = 0 ;
8917 : double val3 ;
8918 0 : int ecode3 = 0 ;
8919 : double val4 ;
8920 0 : int ecode4 = 0 ;
8921 0 : PyObject * obj0 = 0 ;
8922 0 : PyObject * obj1 = 0 ;
8923 0 : PyObject * obj2 = 0 ;
8924 0 : PyObject * obj3 = 0 ;
8925 : char * kwnames[] = {
8926 : (char *) "self",(char *) "clong",(char *) "fe",(char *) "fn", NULL
8927 0 : };
8928 : OGRErr result;
8929 :
8930 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:SpatialReference_SetSinusoidal",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
8931 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
8932 0 : if (!SWIG_IsOK(res1)) {
8933 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetSinusoidal" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
8934 : }
8935 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
8936 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
8937 0 : if (!SWIG_IsOK(ecode2)) {
8938 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetSinusoidal" "', argument " "2"" of type '" "double""'");
8939 : }
8940 0 : arg2 = static_cast< double >(val2);
8941 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
8942 0 : if (!SWIG_IsOK(ecode3)) {
8943 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetSinusoidal" "', argument " "3"" of type '" "double""'");
8944 : }
8945 0 : arg3 = static_cast< double >(val3);
8946 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
8947 0 : if (!SWIG_IsOK(ecode4)) {
8948 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetSinusoidal" "', argument " "4"" of type '" "double""'");
8949 : }
8950 0 : arg4 = static_cast< double >(val4);
8951 : {
8952 0 : if ( bUseExceptions ) {
8953 0 : CPLErrorReset();
8954 : }
8955 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetSinusoidal(arg1,arg2,arg3,arg4);
8956 0 : if ( bUseExceptions ) {
8957 0 : CPLErr eclass = CPLGetLastErrorType();
8958 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
8959 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
8960 : }
8961 : }
8962 : }
8963 : {
8964 : /* %typemap(out) OGRErr */
8965 0 : if ( result != 0 && bUseExceptions) {
8966 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
8967 0 : SWIG_fail;
8968 : }
8969 : }
8970 : {
8971 : /* %typemap(ret) OGRErr */
8972 0 : if (resultobj == Py_None ) {
8973 0 : Py_DECREF(resultobj);
8974 0 : resultobj = 0;
8975 : }
8976 0 : if (resultobj == 0) {
8977 0 : resultobj = PyInt_FromLong( result );
8978 : }
8979 : }
8980 0 : return resultobj;
8981 : fail:
8982 0 : return NULL;
8983 : }
8984 :
8985 :
8986 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetStereographic(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
8987 0 : PyObject *resultobj = 0;
8988 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
8989 : double arg2 ;
8990 : double arg3 ;
8991 : double arg4 ;
8992 : double arg5 ;
8993 : double arg6 ;
8994 0 : void *argp1 = 0 ;
8995 0 : int res1 = 0 ;
8996 : double val2 ;
8997 0 : int ecode2 = 0 ;
8998 : double val3 ;
8999 0 : int ecode3 = 0 ;
9000 : double val4 ;
9001 0 : int ecode4 = 0 ;
9002 : double val5 ;
9003 0 : int ecode5 = 0 ;
9004 : double val6 ;
9005 0 : int ecode6 = 0 ;
9006 0 : PyObject * obj0 = 0 ;
9007 0 : PyObject * obj1 = 0 ;
9008 0 : PyObject * obj2 = 0 ;
9009 0 : PyObject * obj3 = 0 ;
9010 0 : PyObject * obj4 = 0 ;
9011 0 : PyObject * obj5 = 0 ;
9012 : char * kwnames[] = {
9013 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "scale",(char *) "fe",(char *) "fn", NULL
9014 0 : };
9015 : OGRErr result;
9016 :
9017 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetStereographic",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
9018 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9019 0 : if (!SWIG_IsOK(res1)) {
9020 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetStereographic" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9021 : }
9022 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9023 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9024 0 : if (!SWIG_IsOK(ecode2)) {
9025 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetStereographic" "', argument " "2"" of type '" "double""'");
9026 : }
9027 0 : arg2 = static_cast< double >(val2);
9028 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9029 0 : if (!SWIG_IsOK(ecode3)) {
9030 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetStereographic" "', argument " "3"" of type '" "double""'");
9031 : }
9032 0 : arg3 = static_cast< double >(val3);
9033 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9034 0 : if (!SWIG_IsOK(ecode4)) {
9035 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetStereographic" "', argument " "4"" of type '" "double""'");
9036 : }
9037 0 : arg4 = static_cast< double >(val4);
9038 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9039 0 : if (!SWIG_IsOK(ecode5)) {
9040 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetStereographic" "', argument " "5"" of type '" "double""'");
9041 : }
9042 0 : arg5 = static_cast< double >(val5);
9043 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9044 0 : if (!SWIG_IsOK(ecode6)) {
9045 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetStereographic" "', argument " "6"" of type '" "double""'");
9046 : }
9047 0 : arg6 = static_cast< double >(val6);
9048 : {
9049 0 : if ( bUseExceptions ) {
9050 0 : CPLErrorReset();
9051 : }
9052 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetStereographic(arg1,arg2,arg3,arg4,arg5,arg6);
9053 0 : if ( bUseExceptions ) {
9054 0 : CPLErr eclass = CPLGetLastErrorType();
9055 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9056 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9057 : }
9058 : }
9059 : }
9060 : {
9061 : /* %typemap(out) OGRErr */
9062 0 : if ( result != 0 && bUseExceptions) {
9063 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9064 0 : SWIG_fail;
9065 : }
9066 : }
9067 : {
9068 : /* %typemap(ret) OGRErr */
9069 0 : if (resultobj == Py_None ) {
9070 0 : Py_DECREF(resultobj);
9071 0 : resultobj = 0;
9072 : }
9073 0 : if (resultobj == 0) {
9074 0 : resultobj = PyInt_FromLong( result );
9075 : }
9076 : }
9077 0 : return resultobj;
9078 : fail:
9079 0 : return NULL;
9080 : }
9081 :
9082 :
9083 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetSOC(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9084 0 : PyObject *resultobj = 0;
9085 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9086 : double arg2 ;
9087 : double arg3 ;
9088 : double arg4 ;
9089 : double arg5 ;
9090 0 : void *argp1 = 0 ;
9091 0 : int res1 = 0 ;
9092 : double val2 ;
9093 0 : int ecode2 = 0 ;
9094 : double val3 ;
9095 0 : int ecode3 = 0 ;
9096 : double val4 ;
9097 0 : int ecode4 = 0 ;
9098 : double val5 ;
9099 0 : int ecode5 = 0 ;
9100 0 : PyObject * obj0 = 0 ;
9101 0 : PyObject * obj1 = 0 ;
9102 0 : PyObject * obj2 = 0 ;
9103 0 : PyObject * obj3 = 0 ;
9104 0 : PyObject * obj4 = 0 ;
9105 : char * kwnames[] = {
9106 : (char *) "self",(char *) "latitudeoforigin",(char *) "cm",(char *) "fe",(char *) "fn", NULL
9107 0 : };
9108 : OGRErr result;
9109 :
9110 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetSOC",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
9111 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9112 0 : if (!SWIG_IsOK(res1)) {
9113 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetSOC" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9114 : }
9115 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9116 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9117 0 : if (!SWIG_IsOK(ecode2)) {
9118 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetSOC" "', argument " "2"" of type '" "double""'");
9119 : }
9120 0 : arg2 = static_cast< double >(val2);
9121 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9122 0 : if (!SWIG_IsOK(ecode3)) {
9123 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetSOC" "', argument " "3"" of type '" "double""'");
9124 : }
9125 0 : arg3 = static_cast< double >(val3);
9126 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9127 0 : if (!SWIG_IsOK(ecode4)) {
9128 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetSOC" "', argument " "4"" of type '" "double""'");
9129 : }
9130 0 : arg4 = static_cast< double >(val4);
9131 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9132 0 : if (!SWIG_IsOK(ecode5)) {
9133 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetSOC" "', argument " "5"" of type '" "double""'");
9134 : }
9135 0 : arg5 = static_cast< double >(val5);
9136 : {
9137 0 : if ( bUseExceptions ) {
9138 0 : CPLErrorReset();
9139 : }
9140 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetSOC(arg1,arg2,arg3,arg4,arg5);
9141 0 : if ( bUseExceptions ) {
9142 0 : CPLErr eclass = CPLGetLastErrorType();
9143 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9144 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9145 : }
9146 : }
9147 : }
9148 : {
9149 : /* %typemap(out) OGRErr */
9150 0 : if ( result != 0 && bUseExceptions) {
9151 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9152 0 : SWIG_fail;
9153 : }
9154 : }
9155 : {
9156 : /* %typemap(ret) OGRErr */
9157 0 : if (resultobj == Py_None ) {
9158 0 : Py_DECREF(resultobj);
9159 0 : resultobj = 0;
9160 : }
9161 0 : if (resultobj == 0) {
9162 0 : resultobj = PyInt_FromLong( result );
9163 : }
9164 : }
9165 0 : return resultobj;
9166 : fail:
9167 0 : return NULL;
9168 : }
9169 :
9170 :
9171 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTM(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9172 0 : PyObject *resultobj = 0;
9173 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9174 : double arg2 ;
9175 : double arg3 ;
9176 : double arg4 ;
9177 : double arg5 ;
9178 : double arg6 ;
9179 0 : void *argp1 = 0 ;
9180 0 : int res1 = 0 ;
9181 : double val2 ;
9182 0 : int ecode2 = 0 ;
9183 : double val3 ;
9184 0 : int ecode3 = 0 ;
9185 : double val4 ;
9186 0 : int ecode4 = 0 ;
9187 : double val5 ;
9188 0 : int ecode5 = 0 ;
9189 : double val6 ;
9190 0 : int ecode6 = 0 ;
9191 0 : PyObject * obj0 = 0 ;
9192 0 : PyObject * obj1 = 0 ;
9193 0 : PyObject * obj2 = 0 ;
9194 0 : PyObject * obj3 = 0 ;
9195 0 : PyObject * obj4 = 0 ;
9196 0 : PyObject * obj5 = 0 ;
9197 : char * kwnames[] = {
9198 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "scale",(char *) "fe",(char *) "fn", NULL
9199 0 : };
9200 : OGRErr result;
9201 :
9202 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetTM",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
9203 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9204 0 : if (!SWIG_IsOK(res1)) {
9205 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9206 : }
9207 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9208 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9209 0 : if (!SWIG_IsOK(ecode2)) {
9210 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTM" "', argument " "2"" of type '" "double""'");
9211 : }
9212 0 : arg2 = static_cast< double >(val2);
9213 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9214 0 : if (!SWIG_IsOK(ecode3)) {
9215 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTM" "', argument " "3"" of type '" "double""'");
9216 : }
9217 0 : arg3 = static_cast< double >(val3);
9218 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9219 0 : if (!SWIG_IsOK(ecode4)) {
9220 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTM" "', argument " "4"" of type '" "double""'");
9221 : }
9222 0 : arg4 = static_cast< double >(val4);
9223 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9224 0 : if (!SWIG_IsOK(ecode5)) {
9225 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTM" "', argument " "5"" of type '" "double""'");
9226 : }
9227 0 : arg5 = static_cast< double >(val5);
9228 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9229 0 : if (!SWIG_IsOK(ecode6)) {
9230 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTM" "', argument " "6"" of type '" "double""'");
9231 : }
9232 0 : arg6 = static_cast< double >(val6);
9233 : {
9234 0 : if ( bUseExceptions ) {
9235 0 : CPLErrorReset();
9236 : }
9237 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTM(arg1,arg2,arg3,arg4,arg5,arg6);
9238 0 : if ( bUseExceptions ) {
9239 0 : CPLErr eclass = CPLGetLastErrorType();
9240 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9241 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9242 : }
9243 : }
9244 : }
9245 : {
9246 : /* %typemap(out) OGRErr */
9247 0 : if ( result != 0 && bUseExceptions) {
9248 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9249 0 : SWIG_fail;
9250 : }
9251 : }
9252 : {
9253 : /* %typemap(ret) OGRErr */
9254 0 : if (resultobj == Py_None ) {
9255 0 : Py_DECREF(resultobj);
9256 0 : resultobj = 0;
9257 : }
9258 0 : if (resultobj == 0) {
9259 0 : resultobj = PyInt_FromLong( result );
9260 : }
9261 : }
9262 0 : return resultobj;
9263 : fail:
9264 0 : return NULL;
9265 : }
9266 :
9267 :
9268 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMVariant(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9269 0 : PyObject *resultobj = 0;
9270 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9271 0 : char *arg2 = (char *) 0 ;
9272 : double arg3 ;
9273 : double arg4 ;
9274 : double arg5 ;
9275 : double arg6 ;
9276 : double arg7 ;
9277 0 : void *argp1 = 0 ;
9278 0 : int res1 = 0 ;
9279 : int res2 ;
9280 0 : char *buf2 = 0 ;
9281 0 : int alloc2 = 0 ;
9282 : double val3 ;
9283 0 : int ecode3 = 0 ;
9284 : double val4 ;
9285 0 : int ecode4 = 0 ;
9286 : double val5 ;
9287 0 : int ecode5 = 0 ;
9288 : double val6 ;
9289 0 : int ecode6 = 0 ;
9290 : double val7 ;
9291 0 : int ecode7 = 0 ;
9292 0 : PyObject * obj0 = 0 ;
9293 0 : PyObject * obj1 = 0 ;
9294 0 : PyObject * obj2 = 0 ;
9295 0 : PyObject * obj3 = 0 ;
9296 0 : PyObject * obj4 = 0 ;
9297 0 : PyObject * obj5 = 0 ;
9298 0 : PyObject * obj6 = 0 ;
9299 : char * kwnames[] = {
9300 : (char *) "self",(char *) "pszVariantName",(char *) "clat",(char *) "clong",(char *) "scale",(char *) "fe",(char *) "fn", NULL
9301 0 : };
9302 : OGRErr result;
9303 :
9304 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOOO:SpatialReference_SetTMVariant",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
9305 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9306 0 : if (!SWIG_IsOK(res1)) {
9307 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMVariant" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9308 : }
9309 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9310 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
9311 0 : if (!SWIG_IsOK(res2)) {
9312 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetTMVariant" "', argument " "2"" of type '" "char const *""'");
9313 : }
9314 0 : arg2 = reinterpret_cast< char * >(buf2);
9315 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9316 0 : if (!SWIG_IsOK(ecode3)) {
9317 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMVariant" "', argument " "3"" of type '" "double""'");
9318 : }
9319 0 : arg3 = static_cast< double >(val3);
9320 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9321 0 : if (!SWIG_IsOK(ecode4)) {
9322 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMVariant" "', argument " "4"" of type '" "double""'");
9323 : }
9324 0 : arg4 = static_cast< double >(val4);
9325 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9326 0 : if (!SWIG_IsOK(ecode5)) {
9327 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMVariant" "', argument " "5"" of type '" "double""'");
9328 : }
9329 0 : arg5 = static_cast< double >(val5);
9330 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9331 0 : if (!SWIG_IsOK(ecode6)) {
9332 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTMVariant" "', argument " "6"" of type '" "double""'");
9333 : }
9334 0 : arg6 = static_cast< double >(val6);
9335 0 : ecode7 = SWIG_AsVal_double(obj6, &val7);
9336 0 : if (!SWIG_IsOK(ecode7)) {
9337 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetTMVariant" "', argument " "7"" of type '" "double""'");
9338 : }
9339 0 : arg7 = static_cast< double >(val7);
9340 : {
9341 0 : if ( bUseExceptions ) {
9342 0 : CPLErrorReset();
9343 : }
9344 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMVariant(arg1,(char const *)arg2,arg3,arg4,arg5,arg6,arg7);
9345 0 : if ( bUseExceptions ) {
9346 0 : CPLErr eclass = CPLGetLastErrorType();
9347 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9348 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9349 : }
9350 : }
9351 : }
9352 : {
9353 : /* %typemap(out) OGRErr */
9354 0 : if ( result != 0 && bUseExceptions) {
9355 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9356 0 : SWIG_fail;
9357 : }
9358 : }
9359 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9360 : {
9361 : /* %typemap(ret) OGRErr */
9362 0 : if (resultobj == Py_None ) {
9363 0 : Py_DECREF(resultobj);
9364 0 : resultobj = 0;
9365 : }
9366 0 : if (resultobj == 0) {
9367 0 : resultobj = PyInt_FromLong( result );
9368 : }
9369 : }
9370 0 : return resultobj;
9371 : fail:
9372 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9373 0 : return NULL;
9374 : }
9375 :
9376 :
9377 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9378 0 : PyObject *resultobj = 0;
9379 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9380 : double arg2 ;
9381 : double arg3 ;
9382 : double arg4 ;
9383 : double arg5 ;
9384 0 : void *argp1 = 0 ;
9385 0 : int res1 = 0 ;
9386 : double val2 ;
9387 0 : int ecode2 = 0 ;
9388 : double val3 ;
9389 0 : int ecode3 = 0 ;
9390 : double val4 ;
9391 0 : int ecode4 = 0 ;
9392 : double val5 ;
9393 0 : int ecode5 = 0 ;
9394 0 : PyObject * obj0 = 0 ;
9395 0 : PyObject * obj1 = 0 ;
9396 0 : PyObject * obj2 = 0 ;
9397 0 : PyObject * obj3 = 0 ;
9398 0 : PyObject * obj4 = 0 ;
9399 : char * kwnames[] = {
9400 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "fe",(char *) "fn", NULL
9401 0 : };
9402 : OGRErr result;
9403 :
9404 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOO:SpatialReference_SetTMG",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
9405 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9406 0 : if (!SWIG_IsOK(res1)) {
9407 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9408 : }
9409 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9410 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9411 0 : if (!SWIG_IsOK(ecode2)) {
9412 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTMG" "', argument " "2"" of type '" "double""'");
9413 : }
9414 0 : arg2 = static_cast< double >(val2);
9415 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9416 0 : if (!SWIG_IsOK(ecode3)) {
9417 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMG" "', argument " "3"" of type '" "double""'");
9418 : }
9419 0 : arg3 = static_cast< double >(val3);
9420 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9421 0 : if (!SWIG_IsOK(ecode4)) {
9422 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMG" "', argument " "4"" of type '" "double""'");
9423 : }
9424 0 : arg4 = static_cast< double >(val4);
9425 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9426 0 : if (!SWIG_IsOK(ecode5)) {
9427 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMG" "', argument " "5"" of type '" "double""'");
9428 : }
9429 0 : arg5 = static_cast< double >(val5);
9430 : {
9431 0 : if ( bUseExceptions ) {
9432 0 : CPLErrorReset();
9433 : }
9434 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMG(arg1,arg2,arg3,arg4,arg5);
9435 0 : if ( bUseExceptions ) {
9436 0 : CPLErr eclass = CPLGetLastErrorType();
9437 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9438 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9439 : }
9440 : }
9441 : }
9442 : {
9443 : /* %typemap(out) OGRErr */
9444 0 : if ( result != 0 && bUseExceptions) {
9445 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9446 0 : SWIG_fail;
9447 : }
9448 : }
9449 : {
9450 : /* %typemap(ret) OGRErr */
9451 0 : if (resultobj == Py_None ) {
9452 0 : Py_DECREF(resultobj);
9453 0 : resultobj = 0;
9454 : }
9455 0 : if (resultobj == 0) {
9456 0 : resultobj = PyInt_FromLong( result );
9457 : }
9458 : }
9459 0 : return resultobj;
9460 : fail:
9461 0 : return NULL;
9462 : }
9463 :
9464 :
9465 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTMSO(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9466 0 : PyObject *resultobj = 0;
9467 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9468 : double arg2 ;
9469 : double arg3 ;
9470 : double arg4 ;
9471 : double arg5 ;
9472 : double arg6 ;
9473 0 : void *argp1 = 0 ;
9474 0 : int res1 = 0 ;
9475 : double val2 ;
9476 0 : int ecode2 = 0 ;
9477 : double val3 ;
9478 0 : int ecode3 = 0 ;
9479 : double val4 ;
9480 0 : int ecode4 = 0 ;
9481 : double val5 ;
9482 0 : int ecode5 = 0 ;
9483 : double val6 ;
9484 0 : int ecode6 = 0 ;
9485 0 : PyObject * obj0 = 0 ;
9486 0 : PyObject * obj1 = 0 ;
9487 0 : PyObject * obj2 = 0 ;
9488 0 : PyObject * obj3 = 0 ;
9489 0 : PyObject * obj4 = 0 ;
9490 0 : PyObject * obj5 = 0 ;
9491 : char * kwnames[] = {
9492 : (char *) "self",(char *) "clat",(char *) "clong",(char *) "scale",(char *) "fe",(char *) "fn", NULL
9493 0 : };
9494 : OGRErr result;
9495 :
9496 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOOOO:SpatialReference_SetTMSO",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
9497 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9498 0 : if (!SWIG_IsOK(res1)) {
9499 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTMSO" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9500 : }
9501 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9502 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9503 0 : if (!SWIG_IsOK(ecode2)) {
9504 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTMSO" "', argument " "2"" of type '" "double""'");
9505 : }
9506 0 : arg2 = static_cast< double >(val2);
9507 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9508 0 : if (!SWIG_IsOK(ecode3)) {
9509 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTMSO" "', argument " "3"" of type '" "double""'");
9510 : }
9511 0 : arg3 = static_cast< double >(val3);
9512 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9513 0 : if (!SWIG_IsOK(ecode4)) {
9514 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTMSO" "', argument " "4"" of type '" "double""'");
9515 : }
9516 0 : arg4 = static_cast< double >(val4);
9517 0 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9518 0 : if (!SWIG_IsOK(ecode5)) {
9519 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTMSO" "', argument " "5"" of type '" "double""'");
9520 : }
9521 0 : arg5 = static_cast< double >(val5);
9522 0 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9523 0 : if (!SWIG_IsOK(ecode6)) {
9524 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTMSO" "', argument " "6"" of type '" "double""'");
9525 : }
9526 0 : arg6 = static_cast< double >(val6);
9527 : {
9528 0 : if ( bUseExceptions ) {
9529 0 : CPLErrorReset();
9530 : }
9531 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetTMSO(arg1,arg2,arg3,arg4,arg5,arg6);
9532 0 : if ( bUseExceptions ) {
9533 0 : CPLErr eclass = CPLGetLastErrorType();
9534 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9535 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9536 : }
9537 : }
9538 : }
9539 : {
9540 : /* %typemap(out) OGRErr */
9541 0 : if ( result != 0 && bUseExceptions) {
9542 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9543 0 : SWIG_fail;
9544 : }
9545 : }
9546 : {
9547 : /* %typemap(ret) OGRErr */
9548 0 : if (resultobj == Py_None ) {
9549 0 : Py_DECREF(resultobj);
9550 0 : resultobj = 0;
9551 : }
9552 0 : if (resultobj == 0) {
9553 0 : resultobj = PyInt_FromLong( result );
9554 : }
9555 : }
9556 0 : return resultobj;
9557 : fail:
9558 0 : return NULL;
9559 : }
9560 :
9561 :
9562 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVDG(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
9563 0 : PyObject *resultobj = 0;
9564 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9565 : double arg2 ;
9566 : double arg3 ;
9567 : double arg4 ;
9568 0 : void *argp1 = 0 ;
9569 0 : int res1 = 0 ;
9570 : double val2 ;
9571 0 : int ecode2 = 0 ;
9572 : double val3 ;
9573 0 : int ecode3 = 0 ;
9574 : double val4 ;
9575 0 : int ecode4 = 0 ;
9576 0 : PyObject * obj0 = 0 ;
9577 0 : PyObject * obj1 = 0 ;
9578 0 : PyObject * obj2 = 0 ;
9579 0 : PyObject * obj3 = 0 ;
9580 : char * kwnames[] = {
9581 : (char *) "self",(char *) "clong",(char *) "fe",(char *) "fn", NULL
9582 0 : };
9583 : OGRErr result;
9584 :
9585 0 : if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"OOOO:SpatialReference_SetVDG",kwnames,&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
9586 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9587 0 : if (!SWIG_IsOK(res1)) {
9588 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVDG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9589 : }
9590 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9591 0 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9592 0 : if (!SWIG_IsOK(ecode2)) {
9593 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetVDG" "', argument " "2"" of type '" "double""'");
9594 : }
9595 0 : arg2 = static_cast< double >(val2);
9596 0 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9597 0 : if (!SWIG_IsOK(ecode3)) {
9598 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetVDG" "', argument " "3"" of type '" "double""'");
9599 : }
9600 0 : arg3 = static_cast< double >(val3);
9601 0 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9602 0 : if (!SWIG_IsOK(ecode4)) {
9603 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVDG" "', argument " "4"" of type '" "double""'");
9604 : }
9605 0 : arg4 = static_cast< double >(val4);
9606 : {
9607 0 : if ( bUseExceptions ) {
9608 0 : CPLErrorReset();
9609 : }
9610 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetVDG(arg1,arg2,arg3,arg4);
9611 0 : if ( bUseExceptions ) {
9612 0 : CPLErr eclass = CPLGetLastErrorType();
9613 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9614 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9615 : }
9616 : }
9617 : }
9618 : {
9619 : /* %typemap(out) OGRErr */
9620 0 : if ( result != 0 && bUseExceptions) {
9621 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9622 0 : SWIG_fail;
9623 : }
9624 : }
9625 : {
9626 : /* %typemap(ret) OGRErr */
9627 0 : if (resultobj == Py_None ) {
9628 0 : Py_DECREF(resultobj);
9629 0 : resultobj = 0;
9630 : }
9631 0 : if (resultobj == 0) {
9632 0 : resultobj = PyInt_FromLong( result );
9633 : }
9634 : }
9635 0 : return resultobj;
9636 : fail:
9637 0 : return NULL;
9638 : }
9639 :
9640 :
9641 37 : SWIGINTERN PyObject *_wrap_SpatialReference_SetWellKnownGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9642 37 : PyObject *resultobj = 0;
9643 37 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9644 37 : char *arg2 = (char *) 0 ;
9645 37 : void *argp1 = 0 ;
9646 37 : int res1 = 0 ;
9647 : int res2 ;
9648 37 : char *buf2 = 0 ;
9649 37 : int alloc2 = 0 ;
9650 37 : PyObject * obj0 = 0 ;
9651 37 : PyObject * obj1 = 0 ;
9652 : OGRErr result;
9653 :
9654 37 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_SetWellKnownGeogCS",&obj0,&obj1)) SWIG_fail;
9655 37 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9656 37 : if (!SWIG_IsOK(res1)) {
9657 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetWellKnownGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9658 : }
9659 37 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9660 37 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
9661 37 : if (!SWIG_IsOK(res2)) {
9662 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetWellKnownGeogCS" "', argument " "2"" of type '" "char const *""'");
9663 : }
9664 37 : arg2 = reinterpret_cast< char * >(buf2);
9665 : {
9666 37 : if (!arg2) {
9667 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9668 : }
9669 : }
9670 : {
9671 37 : if ( bUseExceptions ) {
9672 0 : CPLErrorReset();
9673 : }
9674 37 : result = (OGRErr)OSRSpatialReferenceShadow_SetWellKnownGeogCS(arg1,(char const *)arg2);
9675 37 : if ( bUseExceptions ) {
9676 0 : CPLErr eclass = CPLGetLastErrorType();
9677 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9678 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9679 : }
9680 : }
9681 : }
9682 : {
9683 : /* %typemap(out) OGRErr */
9684 37 : if ( result != 0 && bUseExceptions) {
9685 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9686 0 : SWIG_fail;
9687 : }
9688 : }
9689 37 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9690 : {
9691 : /* %typemap(ret) OGRErr */
9692 37 : if (resultobj == Py_None ) {
9693 0 : Py_DECREF(resultobj);
9694 0 : resultobj = 0;
9695 : }
9696 37 : if (resultobj == 0) {
9697 37 : resultobj = PyInt_FromLong( result );
9698 : }
9699 : }
9700 37 : return resultobj;
9701 : fail:
9702 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9703 0 : return NULL;
9704 : }
9705 :
9706 :
9707 241 : SWIGINTERN PyObject *_wrap_SpatialReference_SetFromUserInput(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9708 241 : PyObject *resultobj = 0;
9709 241 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9710 241 : char *arg2 = (char *) 0 ;
9711 241 : void *argp1 = 0 ;
9712 241 : int res1 = 0 ;
9713 : int res2 ;
9714 241 : char *buf2 = 0 ;
9715 241 : int alloc2 = 0 ;
9716 241 : PyObject * obj0 = 0 ;
9717 241 : PyObject * obj1 = 0 ;
9718 : OGRErr result;
9719 :
9720 241 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_SetFromUserInput",&obj0,&obj1)) SWIG_fail;
9721 241 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9722 241 : if (!SWIG_IsOK(res1)) {
9723 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetFromUserInput" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9724 : }
9725 241 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9726 241 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
9727 241 : if (!SWIG_IsOK(res2)) {
9728 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetFromUserInput" "', argument " "2"" of type '" "char const *""'");
9729 : }
9730 241 : arg2 = reinterpret_cast< char * >(buf2);
9731 : {
9732 241 : if (!arg2) {
9733 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9734 : }
9735 : }
9736 : {
9737 241 : if ( bUseExceptions ) {
9738 0 : CPLErrorReset();
9739 : }
9740 241 : result = (OGRErr)OSRSpatialReferenceShadow_SetFromUserInput(arg1,(char const *)arg2);
9741 241 : if ( bUseExceptions ) {
9742 0 : CPLErr eclass = CPLGetLastErrorType();
9743 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9744 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9745 : }
9746 : }
9747 : }
9748 : {
9749 : /* %typemap(out) OGRErr */
9750 241 : if ( result != 0 && bUseExceptions) {
9751 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9752 0 : SWIG_fail;
9753 : }
9754 : }
9755 241 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9756 : {
9757 : /* %typemap(ret) OGRErr */
9758 241 : if (resultobj == Py_None ) {
9759 0 : Py_DECREF(resultobj);
9760 0 : resultobj = 0;
9761 : }
9762 241 : if (resultobj == 0) {
9763 241 : resultobj = PyInt_FromLong( result );
9764 : }
9765 : }
9766 241 : return resultobj;
9767 : fail:
9768 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
9769 0 : return NULL;
9770 : }
9771 :
9772 :
9773 0 : SWIGINTERN PyObject *_wrap_SpatialReference_CopyGeogCSFrom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9774 0 : PyObject *resultobj = 0;
9775 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9776 0 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
9777 0 : void *argp1 = 0 ;
9778 0 : int res1 = 0 ;
9779 0 : void *argp2 = 0 ;
9780 0 : int res2 = 0 ;
9781 0 : PyObject * obj0 = 0 ;
9782 0 : PyObject * obj1 = 0 ;
9783 : OGRErr result;
9784 :
9785 0 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_CopyGeogCSFrom",&obj0,&obj1)) SWIG_fail;
9786 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9787 0 : if (!SWIG_IsOK(res1)) {
9788 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_CopyGeogCSFrom" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9789 : }
9790 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9791 0 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9792 0 : if (!SWIG_IsOK(res2)) {
9793 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_CopyGeogCSFrom" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
9794 : }
9795 0 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
9796 : {
9797 0 : if (!arg2) {
9798 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
9799 : }
9800 : }
9801 : {
9802 0 : if ( bUseExceptions ) {
9803 0 : CPLErrorReset();
9804 : }
9805 0 : result = (OGRErr)OSRSpatialReferenceShadow_CopyGeogCSFrom(arg1,arg2);
9806 0 : if ( bUseExceptions ) {
9807 0 : CPLErr eclass = CPLGetLastErrorType();
9808 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9809 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9810 : }
9811 : }
9812 : }
9813 : {
9814 : /* %typemap(out) OGRErr */
9815 0 : if ( result != 0 && bUseExceptions) {
9816 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9817 0 : SWIG_fail;
9818 : }
9819 : }
9820 : {
9821 : /* %typemap(ret) OGRErr */
9822 0 : if (resultobj == Py_None ) {
9823 0 : Py_DECREF(resultobj);
9824 0 : resultobj = 0;
9825 : }
9826 0 : if (resultobj == 0) {
9827 0 : resultobj = PyInt_FromLong( result );
9828 : }
9829 : }
9830 0 : return resultobj;
9831 : fail:
9832 0 : return NULL;
9833 : }
9834 :
9835 :
9836 20 : SWIGINTERN PyObject *_wrap_SpatialReference_SetTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9837 20 : PyObject *resultobj = 0;
9838 20 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9839 : double arg2 ;
9840 : double arg3 ;
9841 : double arg4 ;
9842 20 : double arg5 = (double) 0.0 ;
9843 20 : double arg6 = (double) 0.0 ;
9844 20 : double arg7 = (double) 0.0 ;
9845 20 : double arg8 = (double) 0.0 ;
9846 20 : void *argp1 = 0 ;
9847 20 : int res1 = 0 ;
9848 : double val2 ;
9849 20 : int ecode2 = 0 ;
9850 : double val3 ;
9851 20 : int ecode3 = 0 ;
9852 : double val4 ;
9853 20 : int ecode4 = 0 ;
9854 : double val5 ;
9855 20 : int ecode5 = 0 ;
9856 : double val6 ;
9857 20 : int ecode6 = 0 ;
9858 : double val7 ;
9859 20 : int ecode7 = 0 ;
9860 : double val8 ;
9861 20 : int ecode8 = 0 ;
9862 20 : PyObject * obj0 = 0 ;
9863 20 : PyObject * obj1 = 0 ;
9864 20 : PyObject * obj2 = 0 ;
9865 20 : PyObject * obj3 = 0 ;
9866 20 : PyObject * obj4 = 0 ;
9867 20 : PyObject * obj5 = 0 ;
9868 20 : PyObject * obj6 = 0 ;
9869 20 : PyObject * obj7 = 0 ;
9870 : OGRErr result;
9871 :
9872 20 : if (!PyArg_ParseTuple(args,(char *)"OOOO|OOOO:SpatialReference_SetTOWGS84",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
9873 20 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9874 20 : if (!SWIG_IsOK(res1)) {
9875 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9876 : }
9877 20 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9878 20 : ecode2 = SWIG_AsVal_double(obj1, &val2);
9879 20 : if (!SWIG_IsOK(ecode2)) {
9880 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_SetTOWGS84" "', argument " "2"" of type '" "double""'");
9881 : }
9882 20 : arg2 = static_cast< double >(val2);
9883 20 : ecode3 = SWIG_AsVal_double(obj2, &val3);
9884 20 : if (!SWIG_IsOK(ecode3)) {
9885 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_SetTOWGS84" "', argument " "3"" of type '" "double""'");
9886 : }
9887 20 : arg3 = static_cast< double >(val3);
9888 20 : ecode4 = SWIG_AsVal_double(obj3, &val4);
9889 20 : if (!SWIG_IsOK(ecode4)) {
9890 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetTOWGS84" "', argument " "4"" of type '" "double""'");
9891 : }
9892 20 : arg4 = static_cast< double >(val4);
9893 20 : if (obj4) {
9894 19 : ecode5 = SWIG_AsVal_double(obj4, &val5);
9895 19 : if (!SWIG_IsOK(ecode5)) {
9896 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetTOWGS84" "', argument " "5"" of type '" "double""'");
9897 : }
9898 19 : arg5 = static_cast< double >(val5);
9899 : }
9900 20 : if (obj5) {
9901 19 : ecode6 = SWIG_AsVal_double(obj5, &val6);
9902 19 : if (!SWIG_IsOK(ecode6)) {
9903 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetTOWGS84" "', argument " "6"" of type '" "double""'");
9904 : }
9905 19 : arg6 = static_cast< double >(val6);
9906 : }
9907 20 : if (obj6) {
9908 19 : ecode7 = SWIG_AsVal_double(obj6, &val7);
9909 19 : if (!SWIG_IsOK(ecode7)) {
9910 0 : SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "SpatialReference_SetTOWGS84" "', argument " "7"" of type '" "double""'");
9911 : }
9912 19 : arg7 = static_cast< double >(val7);
9913 : }
9914 20 : if (obj7) {
9915 19 : ecode8 = SWIG_AsVal_double(obj7, &val8);
9916 19 : if (!SWIG_IsOK(ecode8)) {
9917 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetTOWGS84" "', argument " "8"" of type '" "double""'");
9918 : }
9919 19 : arg8 = static_cast< double >(val8);
9920 : }
9921 : {
9922 20 : if ( bUseExceptions ) {
9923 0 : CPLErrorReset();
9924 : }
9925 20 : result = (OGRErr)OSRSpatialReferenceShadow_SetTOWGS84(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
9926 20 : if ( bUseExceptions ) {
9927 0 : CPLErr eclass = CPLGetLastErrorType();
9928 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9929 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9930 : }
9931 : }
9932 : }
9933 : {
9934 : /* %typemap(out) OGRErr */
9935 20 : if ( result != 0 && bUseExceptions) {
9936 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9937 0 : SWIG_fail;
9938 : }
9939 : }
9940 : {
9941 : /* %typemap(ret) OGRErr */
9942 20 : if (resultobj == Py_None ) {
9943 0 : Py_DECREF(resultobj);
9944 0 : resultobj = 0;
9945 : }
9946 20 : if (resultobj == 0) {
9947 20 : resultobj = PyInt_FromLong( result );
9948 : }
9949 : }
9950 20 : return resultobj;
9951 : fail:
9952 0 : return NULL;
9953 : }
9954 :
9955 :
9956 2 : SWIGINTERN PyObject *_wrap_SpatialReference_GetTOWGS84(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9957 2 : PyObject *resultobj = 0;
9958 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
9959 : double *arg2 ;
9960 2 : void *argp1 = 0 ;
9961 2 : int res1 = 0 ;
9962 : double argout2[7] ;
9963 2 : PyObject * obj0 = 0 ;
9964 : OGRErr result;
9965 :
9966 : {
9967 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
9968 2 : arg2 = argout2;
9969 : }
9970 2 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_GetTOWGS84",&obj0)) SWIG_fail;
9971 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
9972 2 : if (!SWIG_IsOK(res1)) {
9973 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_GetTOWGS84" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
9974 : }
9975 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
9976 : {
9977 2 : if ( bUseExceptions ) {
9978 0 : CPLErrorReset();
9979 : }
9980 2 : result = (OGRErr)OSRSpatialReferenceShadow_GetTOWGS84(arg1,arg2);
9981 2 : if ( bUseExceptions ) {
9982 0 : CPLErr eclass = CPLGetLastErrorType();
9983 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
9984 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
9985 : }
9986 : }
9987 : }
9988 : {
9989 : /* %typemap(out) OGRErr */
9990 2 : if ( result != 0 && bUseExceptions) {
9991 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
9992 0 : SWIG_fail;
9993 : }
9994 : }
9995 : {
9996 : /* %typemap(argout) (double argout[ANY]) */
9997 2 : PyObject *out = CreateTupleFromDoubleArray( arg2, 7 );
9998 2 : resultobj = t_output_helper(resultobj,out);
9999 : }
10000 : {
10001 : /* %typemap(ret) OGRErr */
10002 2 : if (resultobj == Py_None ) {
10003 0 : Py_DECREF(resultobj);
10004 0 : resultobj = 0;
10005 : }
10006 2 : if (resultobj == 0) {
10007 0 : resultobj = PyInt_FromLong( result );
10008 : }
10009 : }
10010 2 : return resultobj;
10011 : fail:
10012 0 : return NULL;
10013 : }
10014 :
10015 :
10016 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetLocalCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10017 0 : PyObject *resultobj = 0;
10018 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10019 0 : char *arg2 = (char *) 0 ;
10020 0 : void *argp1 = 0 ;
10021 0 : int res1 = 0 ;
10022 : int res2 ;
10023 0 : char *buf2 = 0 ;
10024 0 : int alloc2 = 0 ;
10025 0 : PyObject * obj0 = 0 ;
10026 0 : PyObject * obj1 = 0 ;
10027 : OGRErr result;
10028 :
10029 0 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_SetLocalCS",&obj0,&obj1)) SWIG_fail;
10030 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10031 0 : if (!SWIG_IsOK(res1)) {
10032 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetLocalCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10033 : }
10034 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10035 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10036 0 : if (!SWIG_IsOK(res2)) {
10037 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetLocalCS" "', argument " "2"" of type '" "char const *""'");
10038 : }
10039 0 : arg2 = reinterpret_cast< char * >(buf2);
10040 : {
10041 0 : if ( bUseExceptions ) {
10042 0 : CPLErrorReset();
10043 : }
10044 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetLocalCS(arg1,(char const *)arg2);
10045 0 : if ( bUseExceptions ) {
10046 0 : CPLErr eclass = CPLGetLastErrorType();
10047 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10048 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10049 : }
10050 : }
10051 : }
10052 : {
10053 : /* %typemap(out) OGRErr */
10054 0 : if ( result != 0 && bUseExceptions) {
10055 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10056 0 : SWIG_fail;
10057 : }
10058 : }
10059 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10060 : {
10061 : /* %typemap(ret) OGRErr */
10062 0 : if (resultobj == Py_None ) {
10063 0 : Py_DECREF(resultobj);
10064 0 : resultobj = 0;
10065 : }
10066 0 : if (resultobj == 0) {
10067 0 : resultobj = PyInt_FromLong( result );
10068 : }
10069 : }
10070 0 : return resultobj;
10071 : fail:
10072 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10073 0 : return NULL;
10074 : }
10075 :
10076 :
10077 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10078 1 : PyObject *resultobj = 0;
10079 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10080 1 : char *arg2 = (char *) 0 ;
10081 1 : char *arg3 = (char *) 0 ;
10082 1 : char *arg4 = (char *) 0 ;
10083 : double arg5 ;
10084 : double arg6 ;
10085 1 : char *arg7 = (char *) "Greenwich" ;
10086 1 : double arg8 = (double) 0.0 ;
10087 1 : char *arg9 = (char *) "degree" ;
10088 1 : double arg10 = (double) 0.0174532925199433 ;
10089 1 : void *argp1 = 0 ;
10090 1 : int res1 = 0 ;
10091 : int res2 ;
10092 1 : char *buf2 = 0 ;
10093 1 : int alloc2 = 0 ;
10094 : int res3 ;
10095 1 : char *buf3 = 0 ;
10096 1 : int alloc3 = 0 ;
10097 : int res4 ;
10098 1 : char *buf4 = 0 ;
10099 1 : int alloc4 = 0 ;
10100 : double val5 ;
10101 1 : int ecode5 = 0 ;
10102 : double val6 ;
10103 1 : int ecode6 = 0 ;
10104 : int res7 ;
10105 1 : char *buf7 = 0 ;
10106 1 : int alloc7 = 0 ;
10107 : double val8 ;
10108 1 : int ecode8 = 0 ;
10109 : int res9 ;
10110 1 : char *buf9 = 0 ;
10111 1 : int alloc9 = 0 ;
10112 : double val10 ;
10113 1 : int ecode10 = 0 ;
10114 1 : PyObject * obj0 = 0 ;
10115 1 : PyObject * obj1 = 0 ;
10116 1 : PyObject * obj2 = 0 ;
10117 1 : PyObject * obj3 = 0 ;
10118 1 : PyObject * obj4 = 0 ;
10119 1 : PyObject * obj5 = 0 ;
10120 1 : PyObject * obj6 = 0 ;
10121 1 : PyObject * obj7 = 0 ;
10122 1 : PyObject * obj8 = 0 ;
10123 1 : PyObject * obj9 = 0 ;
10124 : OGRErr result;
10125 :
10126 1 : if (!PyArg_ParseTuple(args,(char *)"OOOOOO|OOOO:SpatialReference_SetGeogCS",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
10127 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10128 1 : if (!SWIG_IsOK(res1)) {
10129 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10130 : }
10131 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10132 1 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10133 1 : if (!SWIG_IsOK(res2)) {
10134 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetGeogCS" "', argument " "2"" of type '" "char const *""'");
10135 : }
10136 1 : arg2 = reinterpret_cast< char * >(buf2);
10137 1 : res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
10138 1 : if (!SWIG_IsOK(res3)) {
10139 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetGeogCS" "', argument " "3"" of type '" "char const *""'");
10140 : }
10141 1 : arg3 = reinterpret_cast< char * >(buf3);
10142 1 : res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
10143 1 : if (!SWIG_IsOK(res4)) {
10144 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetGeogCS" "', argument " "4"" of type '" "char const *""'");
10145 : }
10146 1 : arg4 = reinterpret_cast< char * >(buf4);
10147 1 : ecode5 = SWIG_AsVal_double(obj4, &val5);
10148 1 : if (!SWIG_IsOK(ecode5)) {
10149 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_SetGeogCS" "', argument " "5"" of type '" "double""'");
10150 : }
10151 1 : arg5 = static_cast< double >(val5);
10152 1 : ecode6 = SWIG_AsVal_double(obj5, &val6);
10153 1 : if (!SWIG_IsOK(ecode6)) {
10154 0 : SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "SpatialReference_SetGeogCS" "', argument " "6"" of type '" "double""'");
10155 : }
10156 1 : arg6 = static_cast< double >(val6);
10157 1 : if (obj6) {
10158 0 : res7 = SWIG_AsCharPtrAndSize(obj6, &buf7, NULL, &alloc7);
10159 0 : if (!SWIG_IsOK(res7)) {
10160 0 : SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "SpatialReference_SetGeogCS" "', argument " "7"" of type '" "char const *""'");
10161 : }
10162 0 : arg7 = reinterpret_cast< char * >(buf7);
10163 : }
10164 1 : if (obj7) {
10165 0 : ecode8 = SWIG_AsVal_double(obj7, &val8);
10166 0 : if (!SWIG_IsOK(ecode8)) {
10167 0 : SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "SpatialReference_SetGeogCS" "', argument " "8"" of type '" "double""'");
10168 : }
10169 0 : arg8 = static_cast< double >(val8);
10170 : }
10171 1 : if (obj8) {
10172 0 : res9 = SWIG_AsCharPtrAndSize(obj8, &buf9, NULL, &alloc9);
10173 0 : if (!SWIG_IsOK(res9)) {
10174 0 : SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "SpatialReference_SetGeogCS" "', argument " "9"" of type '" "char const *""'");
10175 : }
10176 0 : arg9 = reinterpret_cast< char * >(buf9);
10177 : }
10178 1 : if (obj9) {
10179 0 : ecode10 = SWIG_AsVal_double(obj9, &val10);
10180 0 : if (!SWIG_IsOK(ecode10)) {
10181 0 : SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "SpatialReference_SetGeogCS" "', argument " "10"" of type '" "double""'");
10182 : }
10183 0 : arg10 = static_cast< double >(val10);
10184 : }
10185 : {
10186 1 : if ( bUseExceptions ) {
10187 0 : CPLErrorReset();
10188 : }
10189 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetGeogCS(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5,arg6,(char const *)arg7,arg8,(char const *)arg9,arg10);
10190 1 : if ( bUseExceptions ) {
10191 0 : CPLErr eclass = CPLGetLastErrorType();
10192 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10193 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10194 : }
10195 : }
10196 : }
10197 : {
10198 : /* %typemap(out) OGRErr */
10199 1 : if ( result != 0 && bUseExceptions) {
10200 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10201 0 : SWIG_fail;
10202 : }
10203 : }
10204 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10205 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
10206 1 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
10207 1 : if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
10208 1 : if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
10209 : {
10210 : /* %typemap(ret) OGRErr */
10211 1 : if (resultobj == Py_None ) {
10212 0 : Py_DECREF(resultobj);
10213 0 : resultobj = 0;
10214 : }
10215 1 : if (resultobj == 0) {
10216 1 : resultobj = PyInt_FromLong( result );
10217 : }
10218 : }
10219 1 : return resultobj;
10220 : fail:
10221 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10222 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
10223 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
10224 0 : if (alloc7 == SWIG_NEWOBJ) delete[] buf7;
10225 0 : if (alloc9 == SWIG_NEWOBJ) delete[] buf9;
10226 0 : return NULL;
10227 : }
10228 :
10229 :
10230 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetProjCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10231 0 : PyObject *resultobj = 0;
10232 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10233 0 : char *arg2 = (char *) "unnamed" ;
10234 0 : void *argp1 = 0 ;
10235 0 : int res1 = 0 ;
10236 : int res2 ;
10237 0 : char *buf2 = 0 ;
10238 0 : int alloc2 = 0 ;
10239 0 : PyObject * obj0 = 0 ;
10240 0 : PyObject * obj1 = 0 ;
10241 : OGRErr result;
10242 :
10243 0 : if (!PyArg_ParseTuple(args,(char *)"O|O:SpatialReference_SetProjCS",&obj0,&obj1)) SWIG_fail;
10244 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10245 0 : if (!SWIG_IsOK(res1)) {
10246 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetProjCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10247 : }
10248 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10249 0 : if (obj1) {
10250 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10251 0 : if (!SWIG_IsOK(res2)) {
10252 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetProjCS" "', argument " "2"" of type '" "char const *""'");
10253 : }
10254 0 : arg2 = reinterpret_cast< char * >(buf2);
10255 : }
10256 : {
10257 0 : if (!arg2) {
10258 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10259 : }
10260 : }
10261 : {
10262 0 : if ( bUseExceptions ) {
10263 0 : CPLErrorReset();
10264 : }
10265 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetProjCS(arg1,(char const *)arg2);
10266 0 : if ( bUseExceptions ) {
10267 0 : CPLErr eclass = CPLGetLastErrorType();
10268 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10269 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10270 : }
10271 : }
10272 : }
10273 : {
10274 : /* %typemap(out) OGRErr */
10275 0 : if ( result != 0 && bUseExceptions) {
10276 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10277 0 : SWIG_fail;
10278 : }
10279 : }
10280 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10281 : {
10282 : /* %typemap(ret) OGRErr */
10283 0 : if (resultobj == Py_None ) {
10284 0 : Py_DECREF(resultobj);
10285 0 : resultobj = 0;
10286 : }
10287 0 : if (resultobj == 0) {
10288 0 : resultobj = PyInt_FromLong( result );
10289 : }
10290 : }
10291 0 : return resultobj;
10292 : fail:
10293 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10294 0 : return NULL;
10295 : }
10296 :
10297 :
10298 5 : SWIGINTERN PyObject *_wrap_SpatialReference_SetGeocCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10299 5 : PyObject *resultobj = 0;
10300 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10301 5 : char *arg2 = (char *) "unnamed" ;
10302 5 : void *argp1 = 0 ;
10303 5 : int res1 = 0 ;
10304 : int res2 ;
10305 5 : char *buf2 = 0 ;
10306 5 : int alloc2 = 0 ;
10307 5 : PyObject * obj0 = 0 ;
10308 5 : PyObject * obj1 = 0 ;
10309 : OGRErr result;
10310 :
10311 5 : if (!PyArg_ParseTuple(args,(char *)"O|O:SpatialReference_SetGeocCS",&obj0,&obj1)) SWIG_fail;
10312 5 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10313 5 : if (!SWIG_IsOK(res1)) {
10314 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetGeocCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10315 : }
10316 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10317 5 : if (obj1) {
10318 5 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10319 5 : if (!SWIG_IsOK(res2)) {
10320 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetGeocCS" "', argument " "2"" of type '" "char const *""'");
10321 : }
10322 5 : arg2 = reinterpret_cast< char * >(buf2);
10323 : }
10324 : {
10325 5 : if (!arg2) {
10326 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10327 : }
10328 : }
10329 : {
10330 5 : if ( bUseExceptions ) {
10331 0 : CPLErrorReset();
10332 : }
10333 5 : result = (OGRErr)OSRSpatialReferenceShadow_SetGeocCS(arg1,(char const *)arg2);
10334 5 : if ( bUseExceptions ) {
10335 0 : CPLErr eclass = CPLGetLastErrorType();
10336 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10337 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10338 : }
10339 : }
10340 : }
10341 : {
10342 : /* %typemap(out) OGRErr */
10343 5 : if ( result != 0 && bUseExceptions) {
10344 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10345 0 : SWIG_fail;
10346 : }
10347 : }
10348 5 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10349 : {
10350 : /* %typemap(ret) OGRErr */
10351 5 : if (resultobj == Py_None ) {
10352 0 : Py_DECREF(resultobj);
10353 0 : resultobj = 0;
10354 : }
10355 5 : if (resultobj == 0) {
10356 5 : resultobj = PyInt_FromLong( result );
10357 : }
10358 : }
10359 5 : return resultobj;
10360 : fail:
10361 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10362 0 : return NULL;
10363 : }
10364 :
10365 :
10366 0 : SWIGINTERN PyObject *_wrap_SpatialReference_SetVertCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10367 0 : PyObject *resultobj = 0;
10368 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10369 0 : char *arg2 = (char *) "unnamed" ;
10370 0 : char *arg3 = (char *) "unnamed" ;
10371 0 : int arg4 = (int) 0 ;
10372 0 : void *argp1 = 0 ;
10373 0 : int res1 = 0 ;
10374 : int res2 ;
10375 0 : char *buf2 = 0 ;
10376 0 : int alloc2 = 0 ;
10377 : int res3 ;
10378 0 : char *buf3 = 0 ;
10379 0 : int alloc3 = 0 ;
10380 : int val4 ;
10381 0 : int ecode4 = 0 ;
10382 0 : PyObject * obj0 = 0 ;
10383 0 : PyObject * obj1 = 0 ;
10384 0 : PyObject * obj2 = 0 ;
10385 0 : PyObject * obj3 = 0 ;
10386 : OGRErr result;
10387 :
10388 0 : if (!PyArg_ParseTuple(args,(char *)"O|OOO:SpatialReference_SetVertCS",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
10389 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10390 0 : if (!SWIG_IsOK(res1)) {
10391 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetVertCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10392 : }
10393 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10394 0 : if (obj1) {
10395 0 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10396 0 : if (!SWIG_IsOK(res2)) {
10397 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetVertCS" "', argument " "2"" of type '" "char const *""'");
10398 : }
10399 0 : arg2 = reinterpret_cast< char * >(buf2);
10400 : }
10401 0 : if (obj2) {
10402 0 : res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
10403 0 : if (!SWIG_IsOK(res3)) {
10404 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetVertCS" "', argument " "3"" of type '" "char const *""'");
10405 : }
10406 0 : arg3 = reinterpret_cast< char * >(buf3);
10407 : }
10408 0 : if (obj3) {
10409 0 : ecode4 = SWIG_AsVal_int(obj3, &val4);
10410 0 : if (!SWIG_IsOK(ecode4)) {
10411 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "SpatialReference_SetVertCS" "', argument " "4"" of type '" "int""'");
10412 : }
10413 0 : arg4 = static_cast< int >(val4);
10414 : }
10415 : {
10416 0 : if ( bUseExceptions ) {
10417 0 : CPLErrorReset();
10418 : }
10419 0 : result = (OGRErr)OSRSpatialReferenceShadow_SetVertCS(arg1,(char const *)arg2,(char const *)arg3,arg4);
10420 0 : if ( bUseExceptions ) {
10421 0 : CPLErr eclass = CPLGetLastErrorType();
10422 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10423 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10424 : }
10425 : }
10426 : }
10427 : {
10428 : /* %typemap(out) OGRErr */
10429 0 : if ( result != 0 && bUseExceptions) {
10430 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10431 0 : SWIG_fail;
10432 : }
10433 : }
10434 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10435 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
10436 : {
10437 : /* %typemap(ret) OGRErr */
10438 0 : if (resultobj == Py_None ) {
10439 0 : Py_DECREF(resultobj);
10440 0 : resultobj = 0;
10441 : }
10442 0 : if (resultobj == 0) {
10443 0 : resultobj = PyInt_FromLong( result );
10444 : }
10445 : }
10446 0 : return resultobj;
10447 : fail:
10448 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10449 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
10450 0 : return NULL;
10451 : }
10452 :
10453 :
10454 1 : SWIGINTERN PyObject *_wrap_SpatialReference_SetCompoundCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10455 1 : PyObject *resultobj = 0;
10456 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10457 1 : char *arg2 = (char *) 0 ;
10458 1 : OSRSpatialReferenceShadow *arg3 = (OSRSpatialReferenceShadow *) 0 ;
10459 1 : OSRSpatialReferenceShadow *arg4 = (OSRSpatialReferenceShadow *) 0 ;
10460 1 : void *argp1 = 0 ;
10461 1 : int res1 = 0 ;
10462 : int res2 ;
10463 1 : char *buf2 = 0 ;
10464 1 : int alloc2 = 0 ;
10465 1 : void *argp3 = 0 ;
10466 1 : int res3 = 0 ;
10467 1 : void *argp4 = 0 ;
10468 1 : int res4 = 0 ;
10469 1 : PyObject * obj0 = 0 ;
10470 1 : PyObject * obj1 = 0 ;
10471 1 : PyObject * obj2 = 0 ;
10472 1 : PyObject * obj3 = 0 ;
10473 : OGRErr result;
10474 :
10475 1 : if (!PyArg_ParseTuple(args,(char *)"OOOO:SpatialReference_SetCompoundCS",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
10476 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10477 1 : if (!SWIG_IsOK(res1)) {
10478 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_SetCompoundCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10479 : }
10480 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10481 1 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10482 1 : if (!SWIG_IsOK(res2)) {
10483 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_SetCompoundCS" "', argument " "2"" of type '" "char const *""'");
10484 : }
10485 1 : arg2 = reinterpret_cast< char * >(buf2);
10486 1 : res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10487 1 : if (!SWIG_IsOK(res3)) {
10488 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_SetCompoundCS" "', argument " "3"" of type '" "OSRSpatialReferenceShadow *""'");
10489 : }
10490 1 : arg3 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp3);
10491 1 : res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10492 1 : if (!SWIG_IsOK(res4)) {
10493 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_SetCompoundCS" "', argument " "4"" of type '" "OSRSpatialReferenceShadow *""'");
10494 : }
10495 1 : arg4 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp4);
10496 : {
10497 1 : if (!arg2) {
10498 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10499 : }
10500 : }
10501 : {
10502 1 : if (!arg3) {
10503 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10504 : }
10505 : }
10506 : {
10507 1 : if (!arg4) {
10508 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10509 : }
10510 : }
10511 : {
10512 1 : if ( bUseExceptions ) {
10513 0 : CPLErrorReset();
10514 : }
10515 1 : result = (OGRErr)OSRSpatialReferenceShadow_SetCompoundCS(arg1,(char const *)arg2,arg3,arg4);
10516 1 : if ( bUseExceptions ) {
10517 0 : CPLErr eclass = CPLGetLastErrorType();
10518 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10519 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10520 : }
10521 : }
10522 : }
10523 : {
10524 : /* %typemap(out) OGRErr */
10525 1 : if ( result != 0 && bUseExceptions) {
10526 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10527 0 : SWIG_fail;
10528 : }
10529 : }
10530 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10531 : {
10532 : /* %typemap(ret) OGRErr */
10533 1 : if (resultobj == Py_None ) {
10534 0 : Py_DECREF(resultobj);
10535 0 : resultobj = 0;
10536 : }
10537 1 : if (resultobj == 0) {
10538 1 : resultobj = PyInt_FromLong( result );
10539 : }
10540 : }
10541 1 : return resultobj;
10542 : fail:
10543 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10544 0 : return NULL;
10545 : }
10546 :
10547 :
10548 6021 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10549 6021 : PyObject *resultobj = 0;
10550 6021 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10551 6021 : char **arg2 = (char **) 0 ;
10552 6021 : void *argp1 = 0 ;
10553 6021 : int res1 = 0 ;
10554 : char *val2 ;
10555 6021 : PyObject * obj0 = 0 ;
10556 6021 : PyObject * obj1 = 0 ;
10557 : OGRErr result;
10558 :
10559 6021 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_ImportFromWkt",&obj0,&obj1)) SWIG_fail;
10560 6021 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10561 6021 : if (!SWIG_IsOK(res1)) {
10562 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10563 : }
10564 6021 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10565 : {
10566 : /* %typemap(in) (char **ignorechange) */
10567 6021 : PyArg_Parse( obj1, "s", &val2 );
10568 6021 : arg2 = &val2;
10569 : }
10570 : {
10571 6021 : if ( bUseExceptions ) {
10572 0 : CPLErrorReset();
10573 : }
10574 6021 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromWkt(arg1,arg2);
10575 6021 : if ( bUseExceptions ) {
10576 0 : CPLErr eclass = CPLGetLastErrorType();
10577 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10578 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10579 : }
10580 : }
10581 : }
10582 : {
10583 : /* %typemap(out) OGRErr */
10584 6021 : if ( result != 0 && bUseExceptions) {
10585 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10586 0 : SWIG_fail;
10587 : }
10588 : }
10589 : {
10590 : /* %typemap(ret) OGRErr */
10591 6021 : if (resultobj == Py_None ) {
10592 0 : Py_DECREF(resultobj);
10593 0 : resultobj = 0;
10594 : }
10595 6021 : if (resultobj == 0) {
10596 6021 : resultobj = PyInt_FromLong( result );
10597 : }
10598 : }
10599 6021 : return resultobj;
10600 : fail:
10601 0 : return NULL;
10602 : }
10603 :
10604 :
10605 69 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromProj4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10606 69 : PyObject *resultobj = 0;
10607 69 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10608 69 : char *arg2 = (char *) 0 ;
10609 69 : void *argp1 = 0 ;
10610 69 : int res1 = 0 ;
10611 : int res2 ;
10612 69 : char *buf2 = 0 ;
10613 69 : int alloc2 = 0 ;
10614 69 : PyObject * obj0 = 0 ;
10615 69 : PyObject * obj1 = 0 ;
10616 : OGRErr result;
10617 :
10618 69 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_ImportFromProj4",&obj0,&obj1)) SWIG_fail;
10619 69 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10620 69 : if (!SWIG_IsOK(res1)) {
10621 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromProj4" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10622 : }
10623 69 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10624 69 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10625 69 : if (!SWIG_IsOK(res2)) {
10626 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromProj4" "', argument " "2"" of type '" "char *""'");
10627 : }
10628 69 : arg2 = reinterpret_cast< char * >(buf2);
10629 : {
10630 69 : if ( bUseExceptions ) {
10631 0 : CPLErrorReset();
10632 : }
10633 69 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromProj4(arg1,arg2);
10634 69 : if ( bUseExceptions ) {
10635 0 : CPLErr eclass = CPLGetLastErrorType();
10636 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10637 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10638 : }
10639 : }
10640 : }
10641 : {
10642 : /* %typemap(out) OGRErr */
10643 69 : if ( result != 0 && bUseExceptions) {
10644 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10645 0 : SWIG_fail;
10646 : }
10647 : }
10648 69 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10649 : {
10650 : /* %typemap(ret) OGRErr */
10651 69 : if (resultobj == Py_None ) {
10652 0 : Py_DECREF(resultobj);
10653 0 : resultobj = 0;
10654 : }
10655 69 : if (resultobj == 0) {
10656 69 : resultobj = PyInt_FromLong( result );
10657 : }
10658 : }
10659 69 : return resultobj;
10660 : fail:
10661 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10662 0 : return NULL;
10663 : }
10664 :
10665 :
10666 2 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromUrl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10667 2 : PyObject *resultobj = 0;
10668 2 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10669 2 : char *arg2 = (char *) 0 ;
10670 2 : void *argp1 = 0 ;
10671 2 : int res1 = 0 ;
10672 : int res2 ;
10673 2 : char *buf2 = 0 ;
10674 2 : int alloc2 = 0 ;
10675 2 : PyObject * obj0 = 0 ;
10676 2 : PyObject * obj1 = 0 ;
10677 : OGRErr result;
10678 :
10679 2 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_ImportFromUrl",&obj0,&obj1)) SWIG_fail;
10680 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10681 2 : if (!SWIG_IsOK(res1)) {
10682 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromUrl" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10683 : }
10684 2 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10685 2 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10686 2 : if (!SWIG_IsOK(res2)) {
10687 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromUrl" "', argument " "2"" of type '" "char *""'");
10688 : }
10689 2 : arg2 = reinterpret_cast< char * >(buf2);
10690 : {
10691 2 : if (!arg2) {
10692 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
10693 : }
10694 : }
10695 : {
10696 2 : if ( bUseExceptions ) {
10697 0 : CPLErrorReset();
10698 : }
10699 2 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUrl(arg1,arg2);
10700 2 : if ( bUseExceptions ) {
10701 0 : CPLErr eclass = CPLGetLastErrorType();
10702 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10703 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10704 : }
10705 : }
10706 : }
10707 : {
10708 : /* %typemap(out) OGRErr */
10709 2 : if ( result != 0 && bUseExceptions) {
10710 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10711 0 : SWIG_fail;
10712 : }
10713 : }
10714 2 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10715 : {
10716 : /* %typemap(ret) OGRErr */
10717 2 : if (resultobj == Py_None ) {
10718 0 : Py_DECREF(resultobj);
10719 0 : resultobj = 0;
10720 : }
10721 2 : if (resultobj == 0) {
10722 2 : resultobj = PyInt_FromLong( result );
10723 : }
10724 : }
10725 2 : return resultobj;
10726 : fail:
10727 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
10728 0 : return NULL;
10729 : }
10730 :
10731 :
10732 5 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10733 5 : PyObject *resultobj = 0;
10734 5 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10735 5 : char **arg2 = (char **) 0 ;
10736 5 : void *argp1 = 0 ;
10737 5 : int res1 = 0 ;
10738 5 : PyObject * obj0 = 0 ;
10739 5 : PyObject * obj1 = 0 ;
10740 : OGRErr result;
10741 :
10742 5 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_ImportFromESRI",&obj0,&obj1)) SWIG_fail;
10743 5 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10744 5 : if (!SWIG_IsOK(res1)) {
10745 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10746 : }
10747 5 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10748 : {
10749 : /* %typemap(in) char **options */
10750 : /* Check if is a list */
10751 5 : if ( ! PySequence_Check(obj1)) {
10752 0 : PyErr_SetString(PyExc_TypeError,"not a sequence");
10753 0 : SWIG_fail;
10754 : }
10755 :
10756 5 : int size = PySequence_Size(obj1);
10757 48 : for (int i = 0; i < size; i++) {
10758 43 : PyObject* pyObj = PySequence_GetItem(obj1,i);
10759 43 : if (PyUnicode_Check(pyObj))
10760 : {
10761 : char *pszStr;
10762 : Py_ssize_t nLen;
10763 0 : PyObject* pyUTF8Str = PyUnicode_AsUTF8String(pyObj);
10764 : #if PY_VERSION_HEX >= 0x03000000
10765 : PyBytes_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
10766 : #else
10767 0 : PyString_AsStringAndSize(pyUTF8Str, &pszStr, &nLen);
10768 : #endif
10769 0 : arg2 = CSLAddString( arg2, pszStr );
10770 0 : Py_XDECREF(pyUTF8Str);
10771 : }
10772 : #if PY_VERSION_HEX >= 0x03000000
10773 : else if (PyBytes_Check(pyObj))
10774 : arg2 = CSLAddString( arg2, PyBytes_AsString(pyObj) );
10775 : #else
10776 43 : else if (PyString_Check(pyObj))
10777 43 : arg2 = CSLAddString( arg2, PyString_AsString(pyObj) );
10778 : #endif
10779 : else
10780 : {
10781 0 : Py_DECREF(pyObj);
10782 0 : PyErr_SetString(PyExc_TypeError,"sequence must contain strings");
10783 0 : SWIG_fail;
10784 : }
10785 43 : Py_DECREF(pyObj);
10786 : }
10787 : }
10788 : {
10789 5 : if ( bUseExceptions ) {
10790 0 : CPLErrorReset();
10791 : }
10792 5 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromESRI(arg1,arg2);
10793 5 : if ( bUseExceptions ) {
10794 0 : CPLErr eclass = CPLGetLastErrorType();
10795 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10796 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10797 : }
10798 : }
10799 : }
10800 : {
10801 : /* %typemap(out) OGRErr */
10802 5 : if ( result != 0 && bUseExceptions) {
10803 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10804 0 : SWIG_fail;
10805 : }
10806 : }
10807 : {
10808 : /* %typemap(freearg) char **options */
10809 5 : CSLDestroy( arg2 );
10810 : }
10811 : {
10812 : /* %typemap(ret) OGRErr */
10813 5 : if (resultobj == Py_None ) {
10814 0 : Py_DECREF(resultobj);
10815 0 : resultobj = 0;
10816 : }
10817 5 : if (resultobj == 0) {
10818 5 : resultobj = PyInt_FromLong( result );
10819 : }
10820 : }
10821 5 : return resultobj;
10822 : fail:
10823 : {
10824 : /* %typemap(freearg) char **options */
10825 0 : CSLDestroy( arg2 );
10826 : }
10827 0 : return NULL;
10828 : }
10829 :
10830 :
10831 8988 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromEPSG(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10832 8988 : PyObject *resultobj = 0;
10833 8988 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10834 : int arg2 ;
10835 8988 : void *argp1 = 0 ;
10836 8988 : int res1 = 0 ;
10837 : int val2 ;
10838 8988 : int ecode2 = 0 ;
10839 8988 : PyObject * obj0 = 0 ;
10840 8988 : PyObject * obj1 = 0 ;
10841 : OGRErr result;
10842 :
10843 8988 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_ImportFromEPSG",&obj0,&obj1)) SWIG_fail;
10844 8988 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10845 8988 : if (!SWIG_IsOK(res1)) {
10846 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromEPSG" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10847 : }
10848 8988 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10849 8988 : ecode2 = SWIG_AsVal_int(obj1, &val2);
10850 8988 : if (!SWIG_IsOK(ecode2)) {
10851 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromEPSG" "', argument " "2"" of type '" "int""'");
10852 : }
10853 8988 : arg2 = static_cast< int >(val2);
10854 : {
10855 8988 : if ( bUseExceptions ) {
10856 0 : CPLErrorReset();
10857 : }
10858 8988 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSG(arg1,arg2);
10859 8988 : if ( bUseExceptions ) {
10860 0 : CPLErr eclass = CPLGetLastErrorType();
10861 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10862 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10863 : }
10864 : }
10865 : }
10866 : {
10867 : /* %typemap(out) OGRErr */
10868 8988 : if ( result != 0 && bUseExceptions) {
10869 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10870 0 : SWIG_fail;
10871 : }
10872 : }
10873 : {
10874 : /* %typemap(ret) OGRErr */
10875 8988 : if (resultobj == Py_None ) {
10876 0 : Py_DECREF(resultobj);
10877 0 : resultobj = 0;
10878 : }
10879 8988 : if (resultobj == 0) {
10880 8988 : resultobj = PyInt_FromLong( result );
10881 : }
10882 : }
10883 8988 : return resultobj;
10884 : fail:
10885 0 : return NULL;
10886 : }
10887 :
10888 :
10889 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromEPSGA(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10890 3 : PyObject *resultobj = 0;
10891 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10892 : int arg2 ;
10893 3 : void *argp1 = 0 ;
10894 3 : int res1 = 0 ;
10895 : int val2 ;
10896 3 : int ecode2 = 0 ;
10897 3 : PyObject * obj0 = 0 ;
10898 3 : PyObject * obj1 = 0 ;
10899 : OGRErr result;
10900 :
10901 3 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_ImportFromEPSGA",&obj0,&obj1)) SWIG_fail;
10902 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10903 3 : if (!SWIG_IsOK(res1)) {
10904 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromEPSGA" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10905 : }
10906 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10907 3 : ecode2 = SWIG_AsVal_int(obj1, &val2);
10908 3 : if (!SWIG_IsOK(ecode2)) {
10909 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromEPSGA" "', argument " "2"" of type '" "int""'");
10910 : }
10911 3 : arg2 = static_cast< int >(val2);
10912 : {
10913 3 : if ( bUseExceptions ) {
10914 0 : CPLErrorReset();
10915 : }
10916 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromEPSGA(arg1,arg2);
10917 3 : if ( bUseExceptions ) {
10918 0 : CPLErr eclass = CPLGetLastErrorType();
10919 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
10920 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
10921 : }
10922 : }
10923 : }
10924 : {
10925 : /* %typemap(out) OGRErr */
10926 3 : if ( result != 0 && bUseExceptions) {
10927 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
10928 0 : SWIG_fail;
10929 : }
10930 : }
10931 : {
10932 : /* %typemap(ret) OGRErr */
10933 3 : if (resultobj == Py_None ) {
10934 0 : Py_DECREF(resultobj);
10935 0 : resultobj = 0;
10936 : }
10937 3 : if (resultobj == 0) {
10938 3 : resultobj = PyInt_FromLong( result );
10939 : }
10940 : }
10941 3 : return resultobj;
10942 : fail:
10943 0 : return NULL;
10944 : }
10945 :
10946 :
10947 7 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromPCI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10948 7 : PyObject *resultobj = 0;
10949 7 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
10950 7 : char *arg2 = (char *) 0 ;
10951 7 : char *arg3 = (char *) "METRE" ;
10952 7 : double *arg4 = (double *) (double *)0 ;
10953 7 : void *argp1 = 0 ;
10954 7 : int res1 = 0 ;
10955 : int res2 ;
10956 7 : char *buf2 = 0 ;
10957 7 : int alloc2 = 0 ;
10958 : int res3 ;
10959 7 : char *buf3 = 0 ;
10960 7 : int alloc3 = 0 ;
10961 : double argin4[17] ;
10962 7 : PyObject * obj0 = 0 ;
10963 7 : PyObject * obj1 = 0 ;
10964 7 : PyObject * obj2 = 0 ;
10965 7 : PyObject * obj3 = 0 ;
10966 : OGRErr result;
10967 :
10968 7 : if (!PyArg_ParseTuple(args,(char *)"OO|OO:SpatialReference_ImportFromPCI",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
10969 7 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
10970 7 : if (!SWIG_IsOK(res1)) {
10971 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromPCI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
10972 : }
10973 7 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
10974 7 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
10975 7 : if (!SWIG_IsOK(res2)) {
10976 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromPCI" "', argument " "2"" of type '" "char const *""'");
10977 : }
10978 7 : arg2 = reinterpret_cast< char * >(buf2);
10979 7 : if (obj2) {
10980 7 : res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
10981 7 : if (!SWIG_IsOK(res3)) {
10982 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromPCI" "', argument " "3"" of type '" "char const *""'");
10983 : }
10984 7 : arg3 = reinterpret_cast< char * >(buf3);
10985 : }
10986 7 : if (obj3) {
10987 : {
10988 : /* %typemap(in) (double argin4[ANY]) */
10989 7 : arg4 = argin4;
10990 7 : if (! PySequence_Check(obj3) ) {
10991 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
10992 0 : SWIG_fail;
10993 : }
10994 7 : int seq_size = PySequence_Size(obj3);
10995 7 : if ( seq_size != 17 ) {
10996 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
10997 0 : SWIG_fail;
10998 : }
10999 126 : for (unsigned int i=0; i<17; i++) {
11000 119 : PyObject *o = PySequence_GetItem(obj3,i);
11001 : double val;
11002 119 : if ( !PyArg_Parse(o, "d", &val ) ) {
11003 0 : PyErr_SetString(PyExc_TypeError, "not a number");
11004 0 : Py_DECREF(o);
11005 : SWIG_fail;
11006 : }
11007 119 : arg4[i] = val;
11008 119 : Py_DECREF(o);
11009 : }
11010 : }
11011 : }
11012 : {
11013 7 : if ( bUseExceptions ) {
11014 0 : CPLErrorReset();
11015 : }
11016 7 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromPCI(arg1,(char const *)arg2,(char const *)arg3,arg4);
11017 7 : if ( bUseExceptions ) {
11018 0 : CPLErr eclass = CPLGetLastErrorType();
11019 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11020 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11021 : }
11022 : }
11023 : }
11024 : {
11025 : /* %typemap(out) OGRErr */
11026 7 : if ( result != 0 && bUseExceptions) {
11027 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11028 0 : SWIG_fail;
11029 : }
11030 : }
11031 7 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11032 7 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
11033 : {
11034 : /* %typemap(ret) OGRErr */
11035 7 : if (resultobj == Py_None ) {
11036 0 : Py_DECREF(resultobj);
11037 0 : resultobj = 0;
11038 : }
11039 7 : if (resultobj == 0) {
11040 7 : resultobj = PyInt_FromLong( result );
11041 : }
11042 : }
11043 7 : return resultobj;
11044 : fail:
11045 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11046 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
11047 0 : return NULL;
11048 : }
11049 :
11050 :
11051 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromUSGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11052 1 : PyObject *resultobj = 0;
11053 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11054 : long arg2 ;
11055 1 : long arg3 = (long) 0 ;
11056 1 : double *arg4 = (double *) (double *)0 ;
11057 1 : long arg5 = (long) 0 ;
11058 1 : void *argp1 = 0 ;
11059 1 : int res1 = 0 ;
11060 : long val2 ;
11061 1 : int ecode2 = 0 ;
11062 : long val3 ;
11063 1 : int ecode3 = 0 ;
11064 : double argin4[15] ;
11065 : long val5 ;
11066 1 : int ecode5 = 0 ;
11067 1 : PyObject * obj0 = 0 ;
11068 1 : PyObject * obj1 = 0 ;
11069 1 : PyObject * obj2 = 0 ;
11070 1 : PyObject * obj3 = 0 ;
11071 1 : PyObject * obj4 = 0 ;
11072 : OGRErr result;
11073 :
11074 1 : if (!PyArg_ParseTuple(args,(char *)"OO|OOO:SpatialReference_ImportFromUSGS",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
11075 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11076 1 : if (!SWIG_IsOK(res1)) {
11077 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11078 : }
11079 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11080 1 : ecode2 = SWIG_AsVal_long(obj1, &val2);
11081 1 : if (!SWIG_IsOK(ecode2)) {
11082 0 : SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "2"" of type '" "long""'");
11083 : }
11084 1 : arg2 = static_cast< long >(val2);
11085 1 : if (obj2) {
11086 1 : ecode3 = SWIG_AsVal_long(obj2, &val3);
11087 1 : if (!SWIG_IsOK(ecode3)) {
11088 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "3"" of type '" "long""'");
11089 : }
11090 1 : arg3 = static_cast< long >(val3);
11091 : }
11092 1 : if (obj3) {
11093 : {
11094 : /* %typemap(in) (double argin4[ANY]) */
11095 1 : arg4 = argin4;
11096 1 : if (! PySequence_Check(obj3) ) {
11097 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
11098 0 : SWIG_fail;
11099 : }
11100 1 : int seq_size = PySequence_Size(obj3);
11101 1 : if ( seq_size != 15 ) {
11102 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
11103 0 : SWIG_fail;
11104 : }
11105 16 : for (unsigned int i=0; i<15; i++) {
11106 15 : PyObject *o = PySequence_GetItem(obj3,i);
11107 : double val;
11108 15 : if ( !PyArg_Parse(o, "d", &val ) ) {
11109 0 : PyErr_SetString(PyExc_TypeError, "not a number");
11110 0 : Py_DECREF(o);
11111 : SWIG_fail;
11112 : }
11113 15 : arg4[i] = val;
11114 15 : Py_DECREF(o);
11115 : }
11116 : }
11117 : }
11118 1 : if (obj4) {
11119 1 : ecode5 = SWIG_AsVal_long(obj4, &val5);
11120 1 : if (!SWIG_IsOK(ecode5)) {
11121 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "SpatialReference_ImportFromUSGS" "', argument " "5"" of type '" "long""'");
11122 : }
11123 1 : arg5 = static_cast< long >(val5);
11124 : }
11125 : {
11126 1 : if ( bUseExceptions ) {
11127 0 : CPLErrorReset();
11128 : }
11129 1 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromUSGS(arg1,arg2,arg3,arg4,arg5);
11130 1 : if ( bUseExceptions ) {
11131 0 : CPLErr eclass = CPLGetLastErrorType();
11132 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11133 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11134 : }
11135 : }
11136 : }
11137 : {
11138 : /* %typemap(out) OGRErr */
11139 1 : if ( result != 0 && bUseExceptions) {
11140 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11141 0 : SWIG_fail;
11142 : }
11143 : }
11144 : {
11145 : /* %typemap(ret) OGRErr */
11146 1 : if (resultobj == Py_None ) {
11147 0 : Py_DECREF(resultobj);
11148 0 : resultobj = 0;
11149 : }
11150 1 : if (resultobj == 0) {
11151 1 : resultobj = PyInt_FromLong( result );
11152 : }
11153 : }
11154 1 : return resultobj;
11155 : fail:
11156 0 : return NULL;
11157 : }
11158 :
11159 :
11160 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromXML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11161 1 : PyObject *resultobj = 0;
11162 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11163 1 : char *arg2 = (char *) 0 ;
11164 1 : void *argp1 = 0 ;
11165 1 : int res1 = 0 ;
11166 : int res2 ;
11167 1 : char *buf2 = 0 ;
11168 1 : int alloc2 = 0 ;
11169 1 : PyObject * obj0 = 0 ;
11170 1 : PyObject * obj1 = 0 ;
11171 : OGRErr result;
11172 :
11173 1 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_ImportFromXML",&obj0,&obj1)) SWIG_fail;
11174 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11175 1 : if (!SWIG_IsOK(res1)) {
11176 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromXML" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11177 : }
11178 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11179 1 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
11180 1 : if (!SWIG_IsOK(res2)) {
11181 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromXML" "', argument " "2"" of type '" "char const *""'");
11182 : }
11183 1 : arg2 = reinterpret_cast< char * >(buf2);
11184 : {
11185 1 : if ( bUseExceptions ) {
11186 0 : CPLErrorReset();
11187 : }
11188 1 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromXML(arg1,(char const *)arg2);
11189 1 : if ( bUseExceptions ) {
11190 0 : CPLErr eclass = CPLGetLastErrorType();
11191 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11192 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11193 : }
11194 : }
11195 : }
11196 : {
11197 : /* %typemap(out) OGRErr */
11198 1 : if ( result != 0 && bUseExceptions) {
11199 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11200 0 : SWIG_fail;
11201 : }
11202 : }
11203 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11204 : {
11205 : /* %typemap(ret) OGRErr */
11206 1 : if (resultobj == Py_None ) {
11207 0 : Py_DECREF(resultobj);
11208 0 : resultobj = 0;
11209 : }
11210 1 : if (resultobj == 0) {
11211 1 : resultobj = PyInt_FromLong( result );
11212 : }
11213 : }
11214 1 : return resultobj;
11215 : fail:
11216 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11217 0 : return NULL;
11218 : }
11219 :
11220 :
11221 6 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromERM(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11222 6 : PyObject *resultobj = 0;
11223 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11224 6 : char *arg2 = (char *) 0 ;
11225 6 : char *arg3 = (char *) 0 ;
11226 6 : char *arg4 = (char *) 0 ;
11227 6 : void *argp1 = 0 ;
11228 6 : int res1 = 0 ;
11229 : int res2 ;
11230 6 : char *buf2 = 0 ;
11231 6 : int alloc2 = 0 ;
11232 : int res3 ;
11233 6 : char *buf3 = 0 ;
11234 6 : int alloc3 = 0 ;
11235 : int res4 ;
11236 6 : char *buf4 = 0 ;
11237 6 : int alloc4 = 0 ;
11238 6 : PyObject * obj0 = 0 ;
11239 6 : PyObject * obj1 = 0 ;
11240 6 : PyObject * obj2 = 0 ;
11241 6 : PyObject * obj3 = 0 ;
11242 : OGRErr result;
11243 :
11244 6 : if (!PyArg_ParseTuple(args,(char *)"OOOO:SpatialReference_ImportFromERM",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
11245 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11246 6 : if (!SWIG_IsOK(res1)) {
11247 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromERM" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11248 : }
11249 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11250 6 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
11251 6 : if (!SWIG_IsOK(res2)) {
11252 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromERM" "', argument " "2"" of type '" "char const *""'");
11253 : }
11254 6 : arg2 = reinterpret_cast< char * >(buf2);
11255 6 : res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
11256 6 : if (!SWIG_IsOK(res3)) {
11257 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromERM" "', argument " "3"" of type '" "char const *""'");
11258 : }
11259 6 : arg3 = reinterpret_cast< char * >(buf3);
11260 6 : res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
11261 6 : if (!SWIG_IsOK(res4)) {
11262 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_ImportFromERM" "', argument " "4"" of type '" "char const *""'");
11263 : }
11264 6 : arg4 = reinterpret_cast< char * >(buf4);
11265 : {
11266 6 : if (!arg2) {
11267 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
11268 : }
11269 : }
11270 : {
11271 6 : if (!arg3) {
11272 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
11273 : }
11274 : }
11275 : {
11276 6 : if ( bUseExceptions ) {
11277 0 : CPLErrorReset();
11278 : }
11279 6 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromERM(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
11280 6 : if ( bUseExceptions ) {
11281 0 : CPLErr eclass = CPLGetLastErrorType();
11282 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11283 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11284 : }
11285 : }
11286 : }
11287 : {
11288 : /* %typemap(out) OGRErr */
11289 6 : if ( result != 0 && bUseExceptions) {
11290 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11291 0 : SWIG_fail;
11292 : }
11293 : }
11294 6 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11295 6 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
11296 6 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
11297 : {
11298 : /* %typemap(ret) OGRErr */
11299 6 : if (resultobj == Py_None ) {
11300 0 : Py_DECREF(resultobj);
11301 0 : resultobj = 0;
11302 : }
11303 6 : if (resultobj == 0) {
11304 6 : resultobj = PyInt_FromLong( result );
11305 : }
11306 : }
11307 6 : return resultobj;
11308 : fail:
11309 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11310 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
11311 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
11312 0 : return NULL;
11313 : }
11314 :
11315 :
11316 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromMICoordSys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11317 1 : PyObject *resultobj = 0;
11318 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11319 1 : char *arg2 = (char *) 0 ;
11320 1 : void *argp1 = 0 ;
11321 1 : int res1 = 0 ;
11322 : int res2 ;
11323 1 : char *buf2 = 0 ;
11324 1 : int alloc2 = 0 ;
11325 1 : PyObject * obj0 = 0 ;
11326 1 : PyObject * obj1 = 0 ;
11327 : OGRErr result;
11328 :
11329 1 : if (!PyArg_ParseTuple(args,(char *)"OO:SpatialReference_ImportFromMICoordSys",&obj0,&obj1)) SWIG_fail;
11330 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11331 1 : if (!SWIG_IsOK(res1)) {
11332 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromMICoordSys" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11333 : }
11334 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11335 1 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
11336 1 : if (!SWIG_IsOK(res2)) {
11337 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromMICoordSys" "', argument " "2"" of type '" "char const *""'");
11338 : }
11339 1 : arg2 = reinterpret_cast< char * >(buf2);
11340 : {
11341 1 : if ( bUseExceptions ) {
11342 0 : CPLErrorReset();
11343 : }
11344 1 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromMICoordSys(arg1,(char const *)arg2);
11345 1 : if ( bUseExceptions ) {
11346 0 : CPLErr eclass = CPLGetLastErrorType();
11347 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11348 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11349 : }
11350 : }
11351 : }
11352 : {
11353 : /* %typemap(out) OGRErr */
11354 1 : if ( result != 0 && bUseExceptions) {
11355 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11356 0 : SWIG_fail;
11357 : }
11358 : }
11359 1 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11360 : {
11361 : /* %typemap(ret) OGRErr */
11362 1 : if (resultobj == Py_None ) {
11363 0 : Py_DECREF(resultobj);
11364 0 : resultobj = 0;
11365 : }
11366 1 : if (resultobj == 0) {
11367 1 : resultobj = PyInt_FromLong( result );
11368 : }
11369 : }
11370 1 : return resultobj;
11371 : fail:
11372 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11373 0 : return NULL;
11374 : }
11375 :
11376 :
11377 3 : SWIGINTERN PyObject *_wrap_SpatialReference_ImportFromOzi(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11378 3 : PyObject *resultobj = 0;
11379 3 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11380 3 : char *arg2 = (char *) 0 ;
11381 3 : char *arg3 = (char *) 0 ;
11382 3 : char *arg4 = (char *) 0 ;
11383 3 : void *argp1 = 0 ;
11384 3 : int res1 = 0 ;
11385 : int res2 ;
11386 3 : char *buf2 = 0 ;
11387 3 : int alloc2 = 0 ;
11388 : int res3 ;
11389 3 : char *buf3 = 0 ;
11390 3 : int alloc3 = 0 ;
11391 : int res4 ;
11392 3 : char *buf4 = 0 ;
11393 3 : int alloc4 = 0 ;
11394 3 : PyObject * obj0 = 0 ;
11395 3 : PyObject * obj1 = 0 ;
11396 3 : PyObject * obj2 = 0 ;
11397 3 : PyObject * obj3 = 0 ;
11398 : OGRErr result;
11399 :
11400 3 : if (!PyArg_ParseTuple(args,(char *)"OOOO:SpatialReference_ImportFromOzi",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
11401 3 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11402 3 : if (!SWIG_IsOK(res1)) {
11403 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ImportFromOzi" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11404 : }
11405 3 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11406 3 : res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
11407 3 : if (!SWIG_IsOK(res2)) {
11408 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_ImportFromOzi" "', argument " "2"" of type '" "char const *""'");
11409 : }
11410 3 : arg2 = reinterpret_cast< char * >(buf2);
11411 3 : res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
11412 3 : if (!SWIG_IsOK(res3)) {
11413 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ImportFromOzi" "', argument " "3"" of type '" "char const *""'");
11414 : }
11415 3 : arg3 = reinterpret_cast< char * >(buf3);
11416 3 : res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
11417 3 : if (!SWIG_IsOK(res4)) {
11418 0 : SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "SpatialReference_ImportFromOzi" "', argument " "4"" of type '" "char const *""'");
11419 : }
11420 3 : arg4 = reinterpret_cast< char * >(buf4);
11421 : {
11422 3 : if (!arg2) {
11423 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
11424 : }
11425 : }
11426 : {
11427 3 : if (!arg3) {
11428 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
11429 : }
11430 : }
11431 : {
11432 3 : if (!arg4) {
11433 0 : SWIG_exception(SWIG_ValueError,"Received a NULL pointer.");
11434 : }
11435 : }
11436 : {
11437 3 : if ( bUseExceptions ) {
11438 0 : CPLErrorReset();
11439 : }
11440 3 : result = (OGRErr)OSRSpatialReferenceShadow_ImportFromOzi(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
11441 3 : if ( bUseExceptions ) {
11442 0 : CPLErr eclass = CPLGetLastErrorType();
11443 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11444 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11445 : }
11446 : }
11447 : }
11448 : {
11449 : /* %typemap(out) OGRErr */
11450 3 : if ( result != 0 && bUseExceptions) {
11451 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11452 0 : SWIG_fail;
11453 : }
11454 : }
11455 3 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11456 3 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
11457 3 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
11458 : {
11459 : /* %typemap(ret) OGRErr */
11460 3 : if (resultobj == Py_None ) {
11461 0 : Py_DECREF(resultobj);
11462 0 : resultobj = 0;
11463 : }
11464 3 : if (resultobj == 0) {
11465 3 : resultobj = PyInt_FromLong( result );
11466 : }
11467 : }
11468 3 : return resultobj;
11469 : fail:
11470 0 : if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
11471 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
11472 0 : if (alloc4 == SWIG_NEWOBJ) delete[] buf4;
11473 0 : return NULL;
11474 : }
11475 :
11476 :
11477 60393 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11478 60393 : PyObject *resultobj = 0;
11479 60393 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11480 60393 : char **arg2 = (char **) 0 ;
11481 60393 : void *argp1 = 0 ;
11482 60393 : int res1 = 0 ;
11483 60393 : char *argout2 = 0 ;
11484 60393 : PyObject * obj0 = 0 ;
11485 : OGRErr result;
11486 :
11487 : {
11488 : /* %typemap(in,numinputs=0) (char **argout2) */
11489 60393 : arg2 = &argout2;
11490 : }
11491 60393 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_ExportToWkt",&obj0)) SWIG_fail;
11492 60393 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11493 60393 : if (!SWIG_IsOK(res1)) {
11494 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11495 : }
11496 60393 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11497 : {
11498 60393 : if ( bUseExceptions ) {
11499 0 : CPLErrorReset();
11500 : }
11501 60393 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToWkt(arg1,arg2);
11502 60393 : if ( bUseExceptions ) {
11503 0 : CPLErr eclass = CPLGetLastErrorType();
11504 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11505 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11506 : }
11507 : }
11508 : }
11509 : {
11510 : /* %typemap(out) OGRErr */
11511 60393 : if ( result != 0 && bUseExceptions) {
11512 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11513 0 : SWIG_fail;
11514 : }
11515 : }
11516 : {
11517 : /* %typemap(argout) (char **argout) */
11518 : PyObject *o;
11519 120786 : if ( arg2 != NULL && *arg2 != NULL) {
11520 60393 : o = GDALPythonObjectFromCStr( *arg2 );
11521 : }
11522 : else {
11523 0 : o = Py_None;
11524 0 : Py_INCREF( o );
11525 : }
11526 60393 : resultobj = t_output_helper(resultobj, o);
11527 : }
11528 : {
11529 : /* %typemap(freearg) (char **argout) */
11530 60393 : if ( *arg2 )
11531 60393 : CPLFree( *arg2 );
11532 : }
11533 : {
11534 : /* %typemap(ret) OGRErr */
11535 60393 : if (resultobj == Py_None ) {
11536 0 : Py_DECREF(resultobj);
11537 0 : resultobj = 0;
11538 : }
11539 60393 : if (resultobj == 0) {
11540 0 : resultobj = PyInt_FromLong( result );
11541 : }
11542 : }
11543 60393 : return resultobj;
11544 : fail:
11545 : {
11546 : /* %typemap(freearg) (char **argout) */
11547 0 : if ( *arg2 )
11548 0 : CPLFree( *arg2 );
11549 : }
11550 0 : return NULL;
11551 : }
11552 :
11553 :
11554 34 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPrettyWkt(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11555 34 : PyObject *resultobj = 0;
11556 34 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11557 34 : char **arg2 = (char **) 0 ;
11558 34 : int arg3 = (int) 0 ;
11559 34 : void *argp1 = 0 ;
11560 34 : int res1 = 0 ;
11561 34 : char *argout2 = 0 ;
11562 : int val3 ;
11563 34 : int ecode3 = 0 ;
11564 34 : PyObject * obj0 = 0 ;
11565 34 : PyObject * obj1 = 0 ;
11566 : OGRErr result;
11567 :
11568 : {
11569 : /* %typemap(in,numinputs=0) (char **argout2) */
11570 34 : arg2 = &argout2;
11571 : }
11572 34 : if (!PyArg_ParseTuple(args,(char *)"O|O:SpatialReference_ExportToPrettyWkt",&obj0,&obj1)) SWIG_fail;
11573 34 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11574 34 : if (!SWIG_IsOK(res1)) {
11575 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPrettyWkt" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11576 : }
11577 34 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11578 34 : if (obj1) {
11579 14 : ecode3 = SWIG_AsVal_int(obj1, &val3);
11580 14 : if (!SWIG_IsOK(ecode3)) {
11581 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SpatialReference_ExportToPrettyWkt" "', argument " "3"" of type '" "int""'");
11582 : }
11583 14 : arg3 = static_cast< int >(val3);
11584 : }
11585 : {
11586 34 : if ( bUseExceptions ) {
11587 0 : CPLErrorReset();
11588 : }
11589 34 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPrettyWkt(arg1,arg2,arg3);
11590 34 : if ( bUseExceptions ) {
11591 0 : CPLErr eclass = CPLGetLastErrorType();
11592 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11593 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11594 : }
11595 : }
11596 : }
11597 : {
11598 : /* %typemap(out) OGRErr */
11599 34 : if ( result != 0 && bUseExceptions) {
11600 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11601 0 : SWIG_fail;
11602 : }
11603 : }
11604 : {
11605 : /* %typemap(argout) (char **argout) */
11606 : PyObject *o;
11607 68 : if ( arg2 != NULL && *arg2 != NULL) {
11608 34 : o = GDALPythonObjectFromCStr( *arg2 );
11609 : }
11610 : else {
11611 0 : o = Py_None;
11612 0 : Py_INCREF( o );
11613 : }
11614 34 : resultobj = t_output_helper(resultobj, o);
11615 : }
11616 : {
11617 : /* %typemap(freearg) (char **argout) */
11618 34 : if ( *arg2 )
11619 34 : CPLFree( *arg2 );
11620 : }
11621 : {
11622 : /* %typemap(ret) OGRErr */
11623 34 : if (resultobj == Py_None ) {
11624 0 : Py_DECREF(resultobj);
11625 0 : resultobj = 0;
11626 : }
11627 34 : if (resultobj == 0) {
11628 0 : resultobj = PyInt_FromLong( result );
11629 : }
11630 : }
11631 34 : return resultobj;
11632 : fail:
11633 : {
11634 : /* %typemap(freearg) (char **argout) */
11635 0 : if ( *arg2 )
11636 0 : CPLFree( *arg2 );
11637 : }
11638 0 : return NULL;
11639 : }
11640 :
11641 :
11642 104 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToProj4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11643 104 : PyObject *resultobj = 0;
11644 104 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11645 104 : char **arg2 = (char **) 0 ;
11646 104 : void *argp1 = 0 ;
11647 104 : int res1 = 0 ;
11648 104 : char *argout2 = 0 ;
11649 104 : PyObject * obj0 = 0 ;
11650 : OGRErr result;
11651 :
11652 : {
11653 : /* %typemap(in,numinputs=0) (char **argout2) */
11654 104 : arg2 = &argout2;
11655 : }
11656 104 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_ExportToProj4",&obj0)) SWIG_fail;
11657 104 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11658 104 : if (!SWIG_IsOK(res1)) {
11659 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToProj4" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11660 : }
11661 104 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11662 : {
11663 104 : if ( bUseExceptions ) {
11664 0 : CPLErrorReset();
11665 : }
11666 104 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToProj4(arg1,arg2);
11667 104 : if ( bUseExceptions ) {
11668 0 : CPLErr eclass = CPLGetLastErrorType();
11669 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11670 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11671 : }
11672 : }
11673 : }
11674 : {
11675 : /* %typemap(out) OGRErr */
11676 104 : if ( result != 0 && bUseExceptions) {
11677 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11678 0 : SWIG_fail;
11679 : }
11680 : }
11681 : {
11682 : /* %typemap(argout) (char **argout) */
11683 : PyObject *o;
11684 208 : if ( arg2 != NULL && *arg2 != NULL) {
11685 104 : o = GDALPythonObjectFromCStr( *arg2 );
11686 : }
11687 : else {
11688 0 : o = Py_None;
11689 0 : Py_INCREF( o );
11690 : }
11691 104 : resultobj = t_output_helper(resultobj, o);
11692 : }
11693 : {
11694 : /* %typemap(freearg) (char **argout) */
11695 104 : if ( *arg2 )
11696 104 : CPLFree( *arg2 );
11697 : }
11698 : {
11699 : /* %typemap(ret) OGRErr */
11700 104 : if (resultobj == Py_None ) {
11701 0 : Py_DECREF(resultobj);
11702 0 : resultobj = 0;
11703 : }
11704 104 : if (resultobj == 0) {
11705 0 : resultobj = PyInt_FromLong( result );
11706 : }
11707 : }
11708 104 : return resultobj;
11709 : fail:
11710 : {
11711 : /* %typemap(freearg) (char **argout) */
11712 0 : if ( *arg2 )
11713 0 : CPLFree( *arg2 );
11714 : }
11715 0 : return NULL;
11716 : }
11717 :
11718 :
11719 6 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToPCI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11720 6 : PyObject *resultobj = 0;
11721 6 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11722 6 : char **arg2 = (char **) 0 ;
11723 6 : char **arg3 = (char **) 0 ;
11724 : double **arg4 ;
11725 6 : void *argp1 = 0 ;
11726 6 : int res1 = 0 ;
11727 6 : char *argout2 = 0 ;
11728 6 : char *argout3 = 0 ;
11729 : double *argout4 ;
11730 6 : PyObject * obj0 = 0 ;
11731 : OGRErr result;
11732 :
11733 : {
11734 : /* %typemap(in,numinputs=0) (char **argout2) */
11735 6 : arg2 = &argout2;
11736 : }
11737 : {
11738 : /* %typemap(in,numinputs=0) (char **argout3) */
11739 6 : arg3 = &argout3;
11740 : }
11741 : {
11742 : /* %typemap(in,numinputs=0) (double *argout4[ANY]) */
11743 6 : arg4 = &argout4;
11744 : }
11745 6 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_ExportToPCI",&obj0)) SWIG_fail;
11746 6 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11747 6 : if (!SWIG_IsOK(res1)) {
11748 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToPCI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11749 : }
11750 6 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11751 : {
11752 6 : if ( bUseExceptions ) {
11753 0 : CPLErrorReset();
11754 : }
11755 6 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToPCI(arg1,arg2,arg3,arg4);
11756 6 : if ( bUseExceptions ) {
11757 0 : CPLErr eclass = CPLGetLastErrorType();
11758 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11759 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11760 : }
11761 : }
11762 : }
11763 : {
11764 : /* %typemap(out) OGRErr */
11765 6 : if ( result != 0 && bUseExceptions) {
11766 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11767 0 : SWIG_fail;
11768 : }
11769 : }
11770 : {
11771 : /* %typemap(argout) (char **argout) */
11772 : PyObject *o;
11773 12 : if ( arg2 != NULL && *arg2 != NULL) {
11774 6 : o = GDALPythonObjectFromCStr( *arg2 );
11775 : }
11776 : else {
11777 0 : o = Py_None;
11778 0 : Py_INCREF( o );
11779 : }
11780 6 : resultobj = t_output_helper(resultobj, o);
11781 : }
11782 : {
11783 : /* %typemap(argout) (char **argout) */
11784 : PyObject *o;
11785 12 : if ( arg3 != NULL && *arg3 != NULL) {
11786 6 : o = GDALPythonObjectFromCStr( *arg3 );
11787 : }
11788 : else {
11789 0 : o = Py_None;
11790 0 : Py_INCREF( o );
11791 : }
11792 6 : resultobj = t_output_helper(resultobj, o);
11793 : }
11794 : {
11795 : /* %typemap(argout) (double *argout[ANY]) */
11796 6 : PyObject *out = CreateTupleFromDoubleArray( *arg4, 17 );
11797 6 : resultobj = t_output_helper(resultobj,out);
11798 : }
11799 : {
11800 : /* %typemap(freearg) (char **argout) */
11801 6 : if ( *arg2 )
11802 6 : CPLFree( *arg2 );
11803 : }
11804 : {
11805 : /* %typemap(freearg) (char **argout) */
11806 6 : if ( *arg3 )
11807 6 : CPLFree( *arg3 );
11808 : }
11809 : {
11810 : /* %typemap(freearg) (double *argout[ANY]) */
11811 6 : CPLFree(*arg4);
11812 : }
11813 : {
11814 : /* %typemap(ret) OGRErr */
11815 6 : if (resultobj == Py_None ) {
11816 0 : Py_DECREF(resultobj);
11817 0 : resultobj = 0;
11818 : }
11819 6 : if (resultobj == 0) {
11820 0 : resultobj = PyInt_FromLong( result );
11821 : }
11822 : }
11823 6 : return resultobj;
11824 : fail:
11825 : {
11826 : /* %typemap(freearg) (char **argout) */
11827 0 : if ( *arg2 )
11828 0 : CPLFree( *arg2 );
11829 : }
11830 : {
11831 : /* %typemap(freearg) (char **argout) */
11832 0 : if ( *arg3 )
11833 0 : CPLFree( *arg3 );
11834 : }
11835 : {
11836 : /* %typemap(freearg) (double *argout[ANY]) */
11837 0 : CPLFree(*arg4);
11838 : }
11839 0 : return NULL;
11840 : }
11841 :
11842 :
11843 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToUSGS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11844 1 : PyObject *resultobj = 0;
11845 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11846 1 : long *arg2 = (long *) 0 ;
11847 1 : long *arg3 = (long *) 0 ;
11848 : double **arg4 ;
11849 1 : long *arg5 = (long *) 0 ;
11850 1 : void *argp1 = 0 ;
11851 1 : int res1 = 0 ;
11852 : long temp2 ;
11853 1 : int res2 = SWIG_TMPOBJ ;
11854 : long temp3 ;
11855 1 : int res3 = SWIG_TMPOBJ ;
11856 : double *argout4 ;
11857 : long temp5 ;
11858 1 : int res5 = SWIG_TMPOBJ ;
11859 1 : PyObject * obj0 = 0 ;
11860 : OGRErr result;
11861 :
11862 1 : arg2 = &temp2;
11863 1 : arg3 = &temp3;
11864 : {
11865 : /* %typemap(in,numinputs=0) (double *argout4[ANY]) */
11866 1 : arg4 = &argout4;
11867 : }
11868 1 : arg5 = &temp5;
11869 1 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_ExportToUSGS",&obj0)) SWIG_fail;
11870 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11871 1 : if (!SWIG_IsOK(res1)) {
11872 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToUSGS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11873 : }
11874 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11875 : {
11876 1 : if ( bUseExceptions ) {
11877 0 : CPLErrorReset();
11878 : }
11879 1 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToUSGS(arg1,arg2,arg3,arg4,arg5);
11880 1 : if ( bUseExceptions ) {
11881 0 : CPLErr eclass = CPLGetLastErrorType();
11882 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11883 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11884 : }
11885 : }
11886 : }
11887 : {
11888 : /* %typemap(out) OGRErr */
11889 1 : if ( result != 0 && bUseExceptions) {
11890 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11891 0 : SWIG_fail;
11892 : }
11893 : }
11894 2 : if (SWIG_IsTmpObj(res2)) {
11895 1 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg2)));
11896 : } else {
11897 0 : int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
11898 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_long, new_flags));
11899 : }
11900 2 : if (SWIG_IsTmpObj(res3)) {
11901 1 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg3)));
11902 : } else {
11903 0 : int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
11904 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_long, new_flags));
11905 : }
11906 : {
11907 : /* %typemap(argout) (double *argout[ANY]) */
11908 1 : PyObject *out = CreateTupleFromDoubleArray( *arg4, 15 );
11909 1 : resultobj = t_output_helper(resultobj,out);
11910 : }
11911 2 : if (SWIG_IsTmpObj(res5)) {
11912 1 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_long((*arg5)));
11913 : } else {
11914 0 : int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
11915 0 : resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_long, new_flags));
11916 : }
11917 : {
11918 : /* %typemap(freearg) (double *argout[ANY]) */
11919 1 : CPLFree(*arg4);
11920 : }
11921 : {
11922 : /* %typemap(ret) OGRErr */
11923 1 : if (resultobj == Py_None ) {
11924 0 : Py_DECREF(resultobj);
11925 0 : resultobj = 0;
11926 : }
11927 1 : if (resultobj == 0) {
11928 0 : resultobj = PyInt_FromLong( result );
11929 : }
11930 : }
11931 1 : return resultobj;
11932 : fail:
11933 : {
11934 : /* %typemap(freearg) (double *argout[ANY]) */
11935 0 : CPLFree(*arg4);
11936 : }
11937 0 : return NULL;
11938 : }
11939 :
11940 :
11941 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToXML(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11942 1 : PyObject *resultobj = 0;
11943 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
11944 1 : char **arg2 = (char **) 0 ;
11945 1 : char *arg3 = (char *) "" ;
11946 1 : void *argp1 = 0 ;
11947 1 : int res1 = 0 ;
11948 1 : char *argout2 = 0 ;
11949 : int res3 ;
11950 1 : char *buf3 = 0 ;
11951 1 : int alloc3 = 0 ;
11952 1 : PyObject * obj0 = 0 ;
11953 1 : PyObject * obj1 = 0 ;
11954 : OGRErr result;
11955 :
11956 : {
11957 : /* %typemap(in,numinputs=0) (char **argout2) */
11958 1 : arg2 = &argout2;
11959 : }
11960 1 : if (!PyArg_ParseTuple(args,(char *)"O|O:SpatialReference_ExportToXML",&obj0,&obj1)) SWIG_fail;
11961 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
11962 1 : if (!SWIG_IsOK(res1)) {
11963 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToXML" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
11964 : }
11965 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
11966 1 : if (obj1) {
11967 0 : res3 = SWIG_AsCharPtrAndSize(obj1, &buf3, NULL, &alloc3);
11968 0 : if (!SWIG_IsOK(res3)) {
11969 0 : SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "SpatialReference_ExportToXML" "', argument " "3"" of type '" "char const *""'");
11970 : }
11971 0 : arg3 = reinterpret_cast< char * >(buf3);
11972 : }
11973 : {
11974 1 : if ( bUseExceptions ) {
11975 0 : CPLErrorReset();
11976 : }
11977 1 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToXML(arg1,arg2,(char const *)arg3);
11978 1 : if ( bUseExceptions ) {
11979 0 : CPLErr eclass = CPLGetLastErrorType();
11980 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
11981 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
11982 : }
11983 : }
11984 : }
11985 : {
11986 : /* %typemap(out) OGRErr */
11987 1 : if ( result != 0 && bUseExceptions) {
11988 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
11989 0 : SWIG_fail;
11990 : }
11991 : }
11992 : {
11993 : /* %typemap(argout) (char **argout) */
11994 : PyObject *o;
11995 2 : if ( arg2 != NULL && *arg2 != NULL) {
11996 1 : o = GDALPythonObjectFromCStr( *arg2 );
11997 : }
11998 : else {
11999 0 : o = Py_None;
12000 0 : Py_INCREF( o );
12001 : }
12002 1 : resultobj = t_output_helper(resultobj, o);
12003 : }
12004 : {
12005 : /* %typemap(freearg) (char **argout) */
12006 1 : if ( *arg2 )
12007 1 : CPLFree( *arg2 );
12008 : }
12009 1 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
12010 : {
12011 : /* %typemap(ret) OGRErr */
12012 1 : if (resultobj == Py_None ) {
12013 0 : Py_DECREF(resultobj);
12014 0 : resultobj = 0;
12015 : }
12016 1 : if (resultobj == 0) {
12017 0 : resultobj = PyInt_FromLong( result );
12018 : }
12019 : }
12020 1 : return resultobj;
12021 : fail:
12022 : {
12023 : /* %typemap(freearg) (char **argout) */
12024 0 : if ( *arg2 )
12025 0 : CPLFree( *arg2 );
12026 : }
12027 0 : if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
12028 0 : return NULL;
12029 : }
12030 :
12031 :
12032 1 : SWIGINTERN PyObject *_wrap_SpatialReference_ExportToMICoordSys(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12033 1 : PyObject *resultobj = 0;
12034 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12035 1 : char **arg2 = (char **) 0 ;
12036 1 : void *argp1 = 0 ;
12037 1 : int res1 = 0 ;
12038 1 : char *argout2 = 0 ;
12039 1 : PyObject * obj0 = 0 ;
12040 : OGRErr result;
12041 :
12042 : {
12043 : /* %typemap(in,numinputs=0) (char **argout2) */
12044 1 : arg2 = &argout2;
12045 : }
12046 1 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_ExportToMICoordSys",&obj0)) SWIG_fail;
12047 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12048 1 : if (!SWIG_IsOK(res1)) {
12049 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_ExportToMICoordSys" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12050 : }
12051 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12052 : {
12053 1 : if ( bUseExceptions ) {
12054 0 : CPLErrorReset();
12055 : }
12056 1 : result = (OGRErr)OSRSpatialReferenceShadow_ExportToMICoordSys(arg1,arg2);
12057 1 : if ( bUseExceptions ) {
12058 0 : CPLErr eclass = CPLGetLastErrorType();
12059 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12060 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12061 : }
12062 : }
12063 : }
12064 : {
12065 : /* %typemap(out) OGRErr */
12066 1 : if ( result != 0 && bUseExceptions) {
12067 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12068 0 : SWIG_fail;
12069 : }
12070 : }
12071 : {
12072 : /* %typemap(argout) (char **argout) */
12073 : PyObject *o;
12074 2 : if ( arg2 != NULL && *arg2 != NULL) {
12075 1 : o = GDALPythonObjectFromCStr( *arg2 );
12076 : }
12077 : else {
12078 0 : o = Py_None;
12079 0 : Py_INCREF( o );
12080 : }
12081 1 : resultobj = t_output_helper(resultobj, o);
12082 : }
12083 : {
12084 : /* %typemap(freearg) (char **argout) */
12085 1 : if ( *arg2 )
12086 1 : CPLFree( *arg2 );
12087 : }
12088 : {
12089 : /* %typemap(ret) OGRErr */
12090 1 : if (resultobj == Py_None ) {
12091 0 : Py_DECREF(resultobj);
12092 0 : resultobj = 0;
12093 : }
12094 1 : if (resultobj == 0) {
12095 0 : resultobj = PyInt_FromLong( result );
12096 : }
12097 : }
12098 1 : return resultobj;
12099 : fail:
12100 : {
12101 : /* %typemap(freearg) (char **argout) */
12102 0 : if ( *arg2 )
12103 0 : CPLFree( *arg2 );
12104 : }
12105 0 : return NULL;
12106 : }
12107 :
12108 :
12109 14 : SWIGINTERN PyObject *_wrap_SpatialReference_CloneGeogCS(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12110 14 : PyObject *resultobj = 0;
12111 14 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12112 14 : void *argp1 = 0 ;
12113 14 : int res1 = 0 ;
12114 14 : PyObject * obj0 = 0 ;
12115 14 : OSRSpatialReferenceShadow *result = 0 ;
12116 :
12117 14 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_CloneGeogCS",&obj0)) SWIG_fail;
12118 14 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12119 14 : if (!SWIG_IsOK(res1)) {
12120 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_CloneGeogCS" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12121 : }
12122 14 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12123 : {
12124 14 : if ( bUseExceptions ) {
12125 0 : CPLErrorReset();
12126 : }
12127 14 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_CloneGeogCS(arg1);
12128 14 : if ( bUseExceptions ) {
12129 0 : CPLErr eclass = CPLGetLastErrorType();
12130 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12131 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12132 : }
12133 : }
12134 : }
12135 14 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
12136 14 : return resultobj;
12137 : fail:
12138 0 : return NULL;
12139 : }
12140 :
12141 :
12142 28494 : SWIGINTERN PyObject *_wrap_SpatialReference_Clone(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12143 28494 : PyObject *resultobj = 0;
12144 28494 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12145 28494 : void *argp1 = 0 ;
12146 28494 : int res1 = 0 ;
12147 28494 : PyObject * obj0 = 0 ;
12148 28494 : OSRSpatialReferenceShadow *result = 0 ;
12149 :
12150 28494 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_Clone",&obj0)) SWIG_fail;
12151 28494 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12152 28494 : if (!SWIG_IsOK(res1)) {
12153 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Clone" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12154 : }
12155 28494 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12156 : {
12157 28494 : if ( bUseExceptions ) {
12158 0 : CPLErrorReset();
12159 : }
12160 28494 : result = (OSRSpatialReferenceShadow *)OSRSpatialReferenceShadow_Clone(arg1);
12161 28494 : if ( bUseExceptions ) {
12162 0 : CPLErr eclass = CPLGetLastErrorType();
12163 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12164 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12165 : }
12166 : }
12167 : }
12168 28494 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_POINTER_OWN | 0 );
12169 28494 : return resultobj;
12170 : fail:
12171 0 : return NULL;
12172 : }
12173 :
12174 :
12175 60 : SWIGINTERN PyObject *_wrap_SpatialReference_Validate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12176 60 : PyObject *resultobj = 0;
12177 60 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12178 60 : void *argp1 = 0 ;
12179 60 : int res1 = 0 ;
12180 60 : PyObject * obj0 = 0 ;
12181 : OGRErr result;
12182 :
12183 60 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_Validate",&obj0)) SWIG_fail;
12184 60 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12185 60 : if (!SWIG_IsOK(res1)) {
12186 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Validate" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12187 : }
12188 60 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12189 : {
12190 60 : if ( bUseExceptions ) {
12191 0 : CPLErrorReset();
12192 : }
12193 60 : result = (OGRErr)OSRSpatialReferenceShadow_Validate(arg1);
12194 60 : if ( bUseExceptions ) {
12195 0 : CPLErr eclass = CPLGetLastErrorType();
12196 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12197 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12198 : }
12199 : }
12200 : }
12201 : {
12202 : /* %typemap(out) OGRErr */
12203 60 : if ( result != 0 && bUseExceptions) {
12204 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12205 0 : SWIG_fail;
12206 : }
12207 : }
12208 : {
12209 : /* %typemap(ret) OGRErr */
12210 60 : if (resultobj == Py_None ) {
12211 0 : Py_DECREF(resultobj);
12212 0 : resultobj = 0;
12213 : }
12214 60 : if (resultobj == 0) {
12215 60 : resultobj = PyInt_FromLong( result );
12216 : }
12217 : }
12218 60 : return resultobj;
12219 : fail:
12220 0 : return NULL;
12221 : }
12222 :
12223 :
12224 16693 : SWIGINTERN PyObject *_wrap_SpatialReference_StripCTParms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12225 16693 : PyObject *resultobj = 0;
12226 16693 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12227 16693 : void *argp1 = 0 ;
12228 16693 : int res1 = 0 ;
12229 16693 : PyObject * obj0 = 0 ;
12230 : OGRErr result;
12231 :
12232 16693 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_StripCTParms",&obj0)) SWIG_fail;
12233 16693 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12234 16693 : if (!SWIG_IsOK(res1)) {
12235 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_StripCTParms" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12236 : }
12237 16693 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12238 : {
12239 16693 : if ( bUseExceptions ) {
12240 0 : CPLErrorReset();
12241 : }
12242 16693 : result = (OGRErr)OSRSpatialReferenceShadow_StripCTParms(arg1);
12243 16693 : if ( bUseExceptions ) {
12244 0 : CPLErr eclass = CPLGetLastErrorType();
12245 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12246 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12247 : }
12248 : }
12249 : }
12250 : {
12251 : /* %typemap(out) OGRErr */
12252 16693 : if ( result != 0 && bUseExceptions) {
12253 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12254 0 : SWIG_fail;
12255 : }
12256 : }
12257 : {
12258 : /* %typemap(ret) OGRErr */
12259 16693 : if (resultobj == Py_None ) {
12260 0 : Py_DECREF(resultobj);
12261 0 : resultobj = 0;
12262 : }
12263 16693 : if (resultobj == 0) {
12264 16693 : resultobj = PyInt_FromLong( result );
12265 : }
12266 : }
12267 16693 : return resultobj;
12268 : fail:
12269 0 : return NULL;
12270 : }
12271 :
12272 :
12273 0 : SWIGINTERN PyObject *_wrap_SpatialReference_FixupOrdering(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12274 0 : PyObject *resultobj = 0;
12275 0 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12276 0 : void *argp1 = 0 ;
12277 0 : int res1 = 0 ;
12278 0 : PyObject * obj0 = 0 ;
12279 : OGRErr result;
12280 :
12281 0 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_FixupOrdering",&obj0)) SWIG_fail;
12282 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12283 0 : if (!SWIG_IsOK(res1)) {
12284 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_FixupOrdering" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12285 : }
12286 0 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12287 : {
12288 0 : if ( bUseExceptions ) {
12289 0 : CPLErrorReset();
12290 : }
12291 0 : result = (OGRErr)OSRSpatialReferenceShadow_FixupOrdering(arg1);
12292 0 : if ( bUseExceptions ) {
12293 0 : CPLErr eclass = CPLGetLastErrorType();
12294 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12295 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12296 : }
12297 : }
12298 : }
12299 : {
12300 : /* %typemap(out) OGRErr */
12301 0 : if ( result != 0 && bUseExceptions) {
12302 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12303 0 : SWIG_fail;
12304 : }
12305 : }
12306 : {
12307 : /* %typemap(ret) OGRErr */
12308 0 : if (resultobj == Py_None ) {
12309 0 : Py_DECREF(resultobj);
12310 0 : resultobj = 0;
12311 : }
12312 0 : if (resultobj == 0) {
12313 0 : resultobj = PyInt_FromLong( result );
12314 : }
12315 : }
12316 0 : return resultobj;
12317 : fail:
12318 0 : return NULL;
12319 : }
12320 :
12321 :
12322 1 : SWIGINTERN PyObject *_wrap_SpatialReference_Fixup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12323 1 : PyObject *resultobj = 0;
12324 1 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12325 1 : void *argp1 = 0 ;
12326 1 : int res1 = 0 ;
12327 1 : PyObject * obj0 = 0 ;
12328 : OGRErr result;
12329 :
12330 1 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_Fixup",&obj0)) SWIG_fail;
12331 1 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12332 1 : if (!SWIG_IsOK(res1)) {
12333 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_Fixup" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12334 : }
12335 1 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12336 : {
12337 1 : if ( bUseExceptions ) {
12338 0 : CPLErrorReset();
12339 : }
12340 1 : result = (OGRErr)OSRSpatialReferenceShadow_Fixup(arg1);
12341 1 : if ( bUseExceptions ) {
12342 0 : CPLErr eclass = CPLGetLastErrorType();
12343 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12344 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12345 : }
12346 : }
12347 : }
12348 : {
12349 : /* %typemap(out) OGRErr */
12350 1 : if ( result != 0 && bUseExceptions) {
12351 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12352 0 : SWIG_fail;
12353 : }
12354 : }
12355 : {
12356 : /* %typemap(ret) OGRErr */
12357 1 : if (resultobj == Py_None ) {
12358 0 : Py_DECREF(resultobj);
12359 0 : resultobj = 0;
12360 : }
12361 1 : if (resultobj == 0) {
12362 1 : resultobj = PyInt_FromLong( result );
12363 : }
12364 : }
12365 1 : return resultobj;
12366 : fail:
12367 0 : return NULL;
12368 : }
12369 :
12370 :
12371 14262 : SWIGINTERN PyObject *_wrap_SpatialReference_MorphToESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12372 14262 : PyObject *resultobj = 0;
12373 14262 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12374 14262 : void *argp1 = 0 ;
12375 14262 : int res1 = 0 ;
12376 14262 : PyObject * obj0 = 0 ;
12377 : OGRErr result;
12378 :
12379 14262 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_MorphToESRI",&obj0)) SWIG_fail;
12380 14262 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12381 14262 : if (!SWIG_IsOK(res1)) {
12382 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_MorphToESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12383 : }
12384 14262 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12385 : {
12386 14262 : if ( bUseExceptions ) {
12387 0 : CPLErrorReset();
12388 : }
12389 14262 : result = (OGRErr)OSRSpatialReferenceShadow_MorphToESRI(arg1);
12390 14262 : if ( bUseExceptions ) {
12391 0 : CPLErr eclass = CPLGetLastErrorType();
12392 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12393 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12394 : }
12395 : }
12396 : }
12397 : {
12398 : /* %typemap(out) OGRErr */
12399 14262 : if ( result != 0 && bUseExceptions) {
12400 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12401 0 : SWIG_fail;
12402 : }
12403 : }
12404 : {
12405 : /* %typemap(ret) OGRErr */
12406 14262 : if (resultobj == Py_None ) {
12407 0 : Py_DECREF(resultobj);
12408 0 : resultobj = 0;
12409 : }
12410 14262 : if (resultobj == 0) {
12411 14262 : resultobj = PyInt_FromLong( result );
12412 : }
12413 : }
12414 14262 : return resultobj;
12415 : fail:
12416 0 : return NULL;
12417 : }
12418 :
12419 :
12420 14265 : SWIGINTERN PyObject *_wrap_SpatialReference_MorphFromESRI(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12421 14265 : PyObject *resultobj = 0;
12422 14265 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12423 14265 : void *argp1 = 0 ;
12424 14265 : int res1 = 0 ;
12425 14265 : PyObject * obj0 = 0 ;
12426 : OGRErr result;
12427 :
12428 14265 : if (!PyArg_ParseTuple(args,(char *)"O:SpatialReference_MorphFromESRI",&obj0)) SWIG_fail;
12429 14265 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12430 14265 : if (!SWIG_IsOK(res1)) {
12431 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SpatialReference_MorphFromESRI" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12432 : }
12433 14265 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12434 : {
12435 14265 : if ( bUseExceptions ) {
12436 0 : CPLErrorReset();
12437 : }
12438 14265 : result = (OGRErr)OSRSpatialReferenceShadow_MorphFromESRI(arg1);
12439 14265 : if ( bUseExceptions ) {
12440 0 : CPLErr eclass = CPLGetLastErrorType();
12441 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12442 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12443 : }
12444 : }
12445 : }
12446 : {
12447 : /* %typemap(out) OGRErr */
12448 14265 : if ( result != 0 && bUseExceptions) {
12449 0 : PyErr_SetString( PyExc_RuntimeError, OGRErrMessages(result) );
12450 0 : SWIG_fail;
12451 : }
12452 : }
12453 : {
12454 : /* %typemap(ret) OGRErr */
12455 14265 : if (resultobj == Py_None ) {
12456 0 : Py_DECREF(resultobj);
12457 0 : resultobj = 0;
12458 : }
12459 14265 : if (resultobj == 0) {
12460 14265 : resultobj = PyInt_FromLong( result );
12461 : }
12462 : }
12463 14265 : return resultobj;
12464 : fail:
12465 0 : return NULL;
12466 : }
12467 :
12468 :
12469 4 : SWIGINTERN PyObject *SpatialReference_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12470 : PyObject *obj;
12471 4 : if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
12472 4 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRSpatialReferenceShadow, SWIG_NewClientData(obj));
12473 4 : return SWIG_Py_Void();
12474 : }
12475 :
12476 38 : SWIGINTERN PyObject *_wrap_new_CoordinateTransformation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12477 38 : PyObject *resultobj = 0;
12478 38 : OSRSpatialReferenceShadow *arg1 = (OSRSpatialReferenceShadow *) 0 ;
12479 38 : OSRSpatialReferenceShadow *arg2 = (OSRSpatialReferenceShadow *) 0 ;
12480 38 : void *argp1 = 0 ;
12481 38 : int res1 = 0 ;
12482 38 : void *argp2 = 0 ;
12483 38 : int res2 = 0 ;
12484 38 : PyObject * obj0 = 0 ;
12485 38 : PyObject * obj1 = 0 ;
12486 38 : OSRCoordinateTransformationShadow *result = 0 ;
12487 :
12488 38 : if (!PyArg_ParseTuple(args,(char *)"OO:new_CoordinateTransformation",&obj0,&obj1)) SWIG_fail;
12489 38 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12490 38 : if (!SWIG_IsOK(res1)) {
12491 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_CoordinateTransformation" "', argument " "1"" of type '" "OSRSpatialReferenceShadow *""'");
12492 : }
12493 38 : arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1);
12494 38 : res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 | 0 );
12495 38 : if (!SWIG_IsOK(res2)) {
12496 0 : SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_CoordinateTransformation" "', argument " "2"" of type '" "OSRSpatialReferenceShadow *""'");
12497 : }
12498 38 : arg2 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp2);
12499 : {
12500 38 : if ( bUseExceptions ) {
12501 0 : CPLErrorReset();
12502 : }
12503 38 : result = (OSRCoordinateTransformationShadow *)new_OSRCoordinateTransformationShadow(arg1,arg2);
12504 38 : if ( bUseExceptions ) {
12505 0 : CPLErr eclass = CPLGetLastErrorType();
12506 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12507 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12508 : }
12509 : }
12510 : }
12511 38 : resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_NEW | 0 );
12512 38 : return resultobj;
12513 : fail:
12514 0 : return NULL;
12515 : }
12516 :
12517 :
12518 38 : SWIGINTERN PyObject *_wrap_delete_CoordinateTransformation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12519 38 : PyObject *resultobj = 0;
12520 38 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
12521 38 : void *argp1 = 0 ;
12522 38 : int res1 = 0 ;
12523 38 : PyObject * obj0 = 0 ;
12524 :
12525 38 : if (!PyArg_ParseTuple(args,(char *)"O:delete_CoordinateTransformation",&obj0)) SWIG_fail;
12526 38 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_POINTER_DISOWN | 0 );
12527 38 : if (!SWIG_IsOK(res1)) {
12528 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CoordinateTransformation" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
12529 : }
12530 38 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
12531 : {
12532 38 : if ( bUseExceptions ) {
12533 0 : CPLErrorReset();
12534 : }
12535 : delete_OSRCoordinateTransformationShadow(arg1);
12536 38 : if ( bUseExceptions ) {
12537 0 : CPLErr eclass = CPLGetLastErrorType();
12538 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12539 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12540 : }
12541 : }
12542 : }
12543 38 : resultobj = SWIG_Py_Void();
12544 38 : return resultobj;
12545 : fail:
12546 0 : return NULL;
12547 : }
12548 :
12549 :
12550 0 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12551 0 : PyObject *resultobj = 0;
12552 0 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
12553 : double *arg2 ;
12554 0 : void *argp1 = 0 ;
12555 0 : int res1 = 0 ;
12556 : double argin2[3] ;
12557 0 : PyObject * obj0 = 0 ;
12558 0 : PyObject * obj1 = 0 ;
12559 :
12560 0 : if (!PyArg_ParseTuple(args,(char *)"OO:CoordinateTransformation_TransformPoint",&obj0,&obj1)) SWIG_fail;
12561 0 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
12562 0 : if (!SWIG_IsOK(res1)) {
12563 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
12564 : }
12565 0 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
12566 : {
12567 : /* %typemap(in) (double argin2[ANY]) */
12568 0 : arg2 = argin2;
12569 0 : if (! PySequence_Check(obj1) ) {
12570 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
12571 0 : SWIG_fail;
12572 : }
12573 0 : int seq_size = PySequence_Size(obj1);
12574 0 : if ( seq_size != 3 ) {
12575 0 : PyErr_SetString(PyExc_TypeError, "sequence must have length ##size");
12576 0 : SWIG_fail;
12577 : }
12578 0 : for (unsigned int i=0; i<3; i++) {
12579 0 : PyObject *o = PySequence_GetItem(obj1,i);
12580 : double val;
12581 0 : if ( !PyArg_Parse(o, "d", &val ) ) {
12582 0 : PyErr_SetString(PyExc_TypeError, "not a number");
12583 0 : Py_DECREF(o);
12584 : SWIG_fail;
12585 : }
12586 0 : arg2[i] = val;
12587 0 : Py_DECREF(o);
12588 : }
12589 : }
12590 : {
12591 0 : if ( bUseExceptions ) {
12592 0 : CPLErrorReset();
12593 : }
12594 : OSRCoordinateTransformationShadow_TransformPoint__SWIG_0(arg1,arg2);
12595 0 : if ( bUseExceptions ) {
12596 0 : CPLErr eclass = CPLGetLastErrorType();
12597 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12598 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12599 : }
12600 : }
12601 : }
12602 0 : resultobj = SWIG_Py_Void();
12603 : {
12604 : /* %typemap(argout) (double argout[ANY]) */
12605 0 : PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
12606 0 : resultobj = t_output_helper(resultobj,out);
12607 : }
12608 0 : return resultobj;
12609 : fail:
12610 0 : return NULL;
12611 : }
12612 :
12613 :
12614 83 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12615 83 : PyObject *resultobj = 0;
12616 83 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
12617 : double *arg2 ;
12618 : double arg3 ;
12619 : double arg4 ;
12620 83 : double arg5 = (double) 0.0 ;
12621 83 : void *argp1 = 0 ;
12622 83 : int res1 = 0 ;
12623 : double argout2[3] ;
12624 : double val3 ;
12625 83 : int ecode3 = 0 ;
12626 : double val4 ;
12627 83 : int ecode4 = 0 ;
12628 : double val5 ;
12629 83 : int ecode5 = 0 ;
12630 83 : PyObject * obj0 = 0 ;
12631 83 : PyObject * obj1 = 0 ;
12632 83 : PyObject * obj2 = 0 ;
12633 83 : PyObject * obj3 = 0 ;
12634 :
12635 : {
12636 : /* %typemap(in,numinputs=0) (double argout2[ANY]) */
12637 83 : arg2 = argout2;
12638 : }
12639 83 : if (!PyArg_ParseTuple(args,(char *)"OOO|O:CoordinateTransformation_TransformPoint",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
12640 83 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
12641 83 : if (!SWIG_IsOK(res1)) {
12642 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
12643 : }
12644 83 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
12645 83 : ecode3 = SWIG_AsVal_double(obj1, &val3);
12646 83 : if (!SWIG_IsOK(ecode3)) {
12647 0 : SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "3"" of type '" "double""'");
12648 : }
12649 83 : arg3 = static_cast< double >(val3);
12650 83 : ecode4 = SWIG_AsVal_double(obj2, &val4);
12651 83 : if (!SWIG_IsOK(ecode4)) {
12652 0 : SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "4"" of type '" "double""'");
12653 : }
12654 83 : arg4 = static_cast< double >(val4);
12655 83 : if (obj3) {
12656 83 : ecode5 = SWIG_AsVal_double(obj3, &val5);
12657 83 : if (!SWIG_IsOK(ecode5)) {
12658 0 : SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "CoordinateTransformation_TransformPoint" "', argument " "5"" of type '" "double""'");
12659 : }
12660 83 : arg5 = static_cast< double >(val5);
12661 : }
12662 : {
12663 83 : if ( bUseExceptions ) {
12664 0 : CPLErrorReset();
12665 : }
12666 : OSRCoordinateTransformationShadow_TransformPoint__SWIG_1(arg1,arg2,arg3,arg4,arg5);
12667 83 : if ( bUseExceptions ) {
12668 0 : CPLErr eclass = CPLGetLastErrorType();
12669 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12670 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12671 : }
12672 : }
12673 : }
12674 83 : resultobj = SWIG_Py_Void();
12675 : {
12676 : /* %typemap(argout) (double argout[ANY]) */
12677 83 : PyObject *out = CreateTupleFromDoubleArray( arg2, 3 );
12678 83 : resultobj = t_output_helper(resultobj,out);
12679 : }
12680 83 : return resultobj;
12681 : fail:
12682 0 : return NULL;
12683 : }
12684 :
12685 :
12686 83 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoint(PyObject *self, PyObject *args) {
12687 : int argc;
12688 : PyObject *argv[5];
12689 : int ii;
12690 :
12691 83 : if (!PyTuple_Check(args)) SWIG_fail;
12692 83 : argc = (int)PyObject_Length(args);
12693 415 : for (ii = 0; (ii < argc) && (ii < 4); ii++) {
12694 332 : argv[ii] = PyTuple_GET_ITEM(args,ii);
12695 : }
12696 83 : if (argc == 2) {
12697 : int _v;
12698 0 : void *vptr = 0;
12699 0 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
12700 0 : _v = SWIG_CheckState(res);
12701 0 : if (_v) {
12702 0 : void *vptr = 0;
12703 0 : int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_double, 0);
12704 0 : _v = SWIG_CheckState(res);
12705 0 : if (_v) {
12706 0 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_0(self, args);
12707 : }
12708 : }
12709 : }
12710 83 : if ((argc >= 3) && (argc <= 4)) {
12711 : int _v;
12712 83 : void *vptr = 0;
12713 83 : int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_OSRCoordinateTransformationShadow, 0);
12714 83 : _v = SWIG_CheckState(res);
12715 83 : if (_v) {
12716 : {
12717 83 : int res = SWIG_AsVal_double(argv[1], NULL);
12718 83 : _v = SWIG_CheckState(res);
12719 : }
12720 83 : if (_v) {
12721 : {
12722 83 : int res = SWIG_AsVal_double(argv[2], NULL);
12723 83 : _v = SWIG_CheckState(res);
12724 : }
12725 83 : if (_v) {
12726 83 : if (argc <= 3) {
12727 0 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_1(self, args);
12728 : }
12729 : {
12730 83 : int res = SWIG_AsVal_double(argv[3], NULL);
12731 83 : _v = SWIG_CheckState(res);
12732 : }
12733 83 : if (_v) {
12734 83 : return _wrap_CoordinateTransformation_TransformPoint__SWIG_1(self, args);
12735 : }
12736 : }
12737 : }
12738 : }
12739 : }
12740 :
12741 : fail:
12742 : SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'CoordinateTransformation_TransformPoint'.\n"
12743 : " Possible C/C++ prototypes are:\n"
12744 : " TransformPoint(OSRCoordinateTransformationShadow *,double [3])\n"
12745 0 : " TransformPoint(OSRCoordinateTransformationShadow *,double [3],double,double,double)\n");
12746 0 : return NULL;
12747 : }
12748 :
12749 :
12750 2 : SWIGINTERN PyObject *_wrap_CoordinateTransformation_TransformPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12751 2 : PyObject *resultobj = 0;
12752 2 : OSRCoordinateTransformationShadow *arg1 = (OSRCoordinateTransformationShadow *) 0 ;
12753 : int arg2 ;
12754 2 : double *arg3 = (double *) 0 ;
12755 2 : double *arg4 = (double *) 0 ;
12756 2 : double *arg5 = (double *) 0 ;
12757 2 : void *argp1 = 0 ;
12758 2 : int res1 = 0 ;
12759 2 : PyObject * obj0 = 0 ;
12760 2 : PyObject * obj1 = 0 ;
12761 :
12762 2 : if (!PyArg_ParseTuple(args,(char *)"OO:CoordinateTransformation_TransformPoints",&obj0,&obj1)) SWIG_fail;
12763 2 : res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_OSRCoordinateTransformationShadow, 0 | 0 );
12764 2 : if (!SWIG_IsOK(res1)) {
12765 0 : SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CoordinateTransformation_TransformPoints" "', argument " "1"" of type '" "OSRCoordinateTransformationShadow *""'");
12766 : }
12767 2 : arg1 = reinterpret_cast< OSRCoordinateTransformationShadow * >(argp1);
12768 : {
12769 2 : if ( !PySequence_Check(obj1) ) {
12770 0 : PyErr_SetString(PyExc_TypeError, "not a sequence");
12771 0 : SWIG_fail;
12772 : }
12773 :
12774 2 : arg2 = PySequence_Size(obj1);
12775 2 : arg3 = (double*) VSIMalloc(arg2*sizeof(double));
12776 2 : arg4 = (double*) VSIMalloc(arg2*sizeof(double));
12777 2 : arg5 = (double*) VSIMalloc(arg2*sizeof(double));
12778 :
12779 2 : if (arg3 == NULL || arg4 == NULL || arg5 == NULL)
12780 : {
12781 0 : PyErr_SetString( PyExc_RuntimeError, "Out of memory" );
12782 0 : SWIG_fail;
12783 : }
12784 :
12785 2 : if (!DecomposeSequenceOfCoordinates(obj1,arg2,arg3,arg4,arg5)) {
12786 : SWIG_fail;
12787 : }
12788 : }
12789 : {
12790 2 : if ( bUseExceptions ) {
12791 0 : CPLErrorReset();
12792 : }
12793 : OSRCoordinateTransformationShadow_TransformPoints(arg1,arg2,arg3,arg4,arg5);
12794 2 : if ( bUseExceptions ) {
12795 0 : CPLErr eclass = CPLGetLastErrorType();
12796 0 : if ( eclass == CE_Failure || eclass == CE_Fatal ) {
12797 0 : SWIG_exception( SWIG_RuntimeError, CPLGetLastErrorMsg() );
12798 : }
12799 : }
12800 : }
12801 2 : resultobj = SWIG_Py_Void();
12802 : {
12803 : /* %typemap(argout) (int nCount, double *x, double *y, double *z) */
12804 2 : Py_DECREF(resultobj);
12805 2 : PyObject *out = PyList_New( arg2 );
12806 6 : for( int i=0; i< arg2; i++ ) {
12807 4 : PyObject *tuple = PyTuple_New( 3 );
12808 4 : PyTuple_SetItem( tuple, 0, PyFloat_FromDouble( (arg3)[i] ) );
12809 4 : PyTuple_SetItem( tuple, 1, PyFloat_FromDouble( (arg4)[i] ) );
12810 4 : PyTuple_SetItem( tuple, 2, PyFloat_FromDouble( (arg5)[i] ) );
12811 4 : PyList_SetItem( out, i, tuple );
12812 : }
12813 2 : resultobj = out;
12814 : }
12815 : {
12816 : /* %typemap(freearg) (int nCount, double *x, double *y, double *z) */
12817 2 : VSIFree(arg3);
12818 2 : VSIFree(arg4);
12819 2 : VSIFree(arg5);
12820 : }
12821 2 : return resultobj;
12822 : fail:
12823 : {
12824 : /* %typemap(freearg) (int nCount, double *x, double *y, double *z) */
12825 0 : VSIFree(arg3);
12826 0 : VSIFree(arg4);
12827 0 : VSIFree(arg5);
12828 : }
12829 0 : return NULL;
12830 : }
12831 :
12832 :
12833 4 : SWIGINTERN PyObject *CoordinateTransformation_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12834 : PyObject *obj;
12835 4 : if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
12836 4 : SWIG_TypeNewClientData(SWIGTYPE_p_OSRCoordinateTransformationShadow, SWIG_NewClientData(obj));
12837 4 : return SWIG_Py_Void();
12838 : }
12839 :
12840 : static PyMethodDef SwigMethods[] = {
12841 : { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
12842 : { (char *)"GetUseExceptions", _wrap_GetUseExceptions, METH_VARARGS, (char *)"GetUseExceptions() -> int"},
12843 : { (char *)"UseExceptions", _wrap_UseExceptions, METH_VARARGS, (char *)"UseExceptions()"},
12844 : { (char *)"DontUseExceptions", _wrap_DontUseExceptions, METH_VARARGS, (char *)"DontUseExceptions()"},
12845 : { (char *)"GetProjectionMethods", py_OPTGetProjectionMethods, METH_VARARGS, NULL},
12846 : { (char *)"GetWellKnownGeogCSAsWKT", _wrap_GetWellKnownGeogCSAsWKT, METH_VARARGS, (char *)"GetWellKnownGeogCSAsWKT(char name) -> OGRErr"},
12847 : { (char *)"GetUserInputAsWKT", _wrap_GetUserInputAsWKT, METH_VARARGS, (char *)"GetUserInputAsWKT(char name) -> OGRErr"},
12848 : { (char *)"new_SpatialReference", (PyCFunction) _wrap_new_SpatialReference, METH_VARARGS | METH_KEYWORDS, (char *)"new_SpatialReference(char wkt = \"\") -> SpatialReference"},
12849 : { (char *)"delete_SpatialReference", _wrap_delete_SpatialReference, METH_VARARGS, (char *)"delete_SpatialReference(SpatialReference self)"},
12850 : { (char *)"SpatialReference___str__", _wrap_SpatialReference___str__, METH_VARARGS, (char *)"SpatialReference___str__(SpatialReference self) -> retStringAndCPLFree"},
12851 : { (char *)"SpatialReference_IsSame", _wrap_SpatialReference_IsSame, METH_VARARGS, (char *)"SpatialReference_IsSame(SpatialReference self, SpatialReference rhs) -> int"},
12852 : { (char *)"SpatialReference_IsSameGeogCS", _wrap_SpatialReference_IsSameGeogCS, METH_VARARGS, (char *)"SpatialReference_IsSameGeogCS(SpatialReference self, SpatialReference rhs) -> int"},
12853 : { (char *)"SpatialReference_IsSameVertCS", _wrap_SpatialReference_IsSameVertCS, METH_VARARGS, (char *)"SpatialReference_IsSameVertCS(SpatialReference self, SpatialReference rhs) -> int"},
12854 : { (char *)"SpatialReference_IsGeographic", _wrap_SpatialReference_IsGeographic, METH_VARARGS, (char *)"SpatialReference_IsGeographic(SpatialReference self) -> int"},
12855 : { (char *)"SpatialReference_IsProjected", _wrap_SpatialReference_IsProjected, METH_VARARGS, (char *)"SpatialReference_IsProjected(SpatialReference self) -> int"},
12856 : { (char *)"SpatialReference_IsCompound", _wrap_SpatialReference_IsCompound, METH_VARARGS, (char *)"SpatialReference_IsCompound(SpatialReference self) -> int"},
12857 : { (char *)"SpatialReference_IsGeocentric", _wrap_SpatialReference_IsGeocentric, METH_VARARGS, (char *)"SpatialReference_IsGeocentric(SpatialReference self) -> int"},
12858 : { (char *)"SpatialReference_IsLocal", _wrap_SpatialReference_IsLocal, METH_VARARGS, (char *)"SpatialReference_IsLocal(SpatialReference self) -> int"},
12859 : { (char *)"SpatialReference_IsVertical", _wrap_SpatialReference_IsVertical, METH_VARARGS, (char *)"SpatialReference_IsVertical(SpatialReference self) -> int"},
12860 : { (char *)"SpatialReference_EPSGTreatsAsLatLong", _wrap_SpatialReference_EPSGTreatsAsLatLong, METH_VARARGS, (char *)"SpatialReference_EPSGTreatsAsLatLong(SpatialReference self) -> int"},
12861 : { (char *)"SpatialReference_SetAuthority", _wrap_SpatialReference_SetAuthority, METH_VARARGS, (char *)"\n"
12862 : "SpatialReference_SetAuthority(SpatialReference self, char pszTargetKey, char pszAuthority, \n"
12863 : " int nCode) -> OGRErr\n"
12864 : ""},
12865 : { (char *)"SpatialReference_GetAttrValue", _wrap_SpatialReference_GetAttrValue, METH_VARARGS, (char *)"SpatialReference_GetAttrValue(SpatialReference self, char name, int child = 0) -> char"},
12866 : { (char *)"SpatialReference_SetAttrValue", _wrap_SpatialReference_SetAttrValue, METH_VARARGS, (char *)"SpatialReference_SetAttrValue(SpatialReference self, char name, char value) -> OGRErr"},
12867 : { (char *)"SpatialReference_SetAngularUnits", _wrap_SpatialReference_SetAngularUnits, METH_VARARGS, (char *)"SpatialReference_SetAngularUnits(SpatialReference self, char name, double to_radians) -> OGRErr"},
12868 : { (char *)"SpatialReference_GetAngularUnits", _wrap_SpatialReference_GetAngularUnits, METH_VARARGS, (char *)"SpatialReference_GetAngularUnits(SpatialReference self) -> double"},
12869 : { (char *)"SpatialReference_SetTargetLinearUnits", _wrap_SpatialReference_SetTargetLinearUnits, METH_VARARGS, (char *)"SpatialReference_SetTargetLinearUnits(SpatialReference self, char target, char name, double to_meters) -> OGRErr"},
12870 : { (char *)"SpatialReference_SetLinearUnits", _wrap_SpatialReference_SetLinearUnits, METH_VARARGS, (char *)"SpatialReference_SetLinearUnits(SpatialReference self, char name, double to_meters) -> OGRErr"},
12871 : { (char *)"SpatialReference_SetLinearUnitsAndUpdateParameters", _wrap_SpatialReference_SetLinearUnitsAndUpdateParameters, METH_VARARGS, (char *)"SpatialReference_SetLinearUnitsAndUpdateParameters(SpatialReference self, char name, double to_meters) -> OGRErr"},
12872 : { (char *)"SpatialReference_GetLinearUnits", _wrap_SpatialReference_GetLinearUnits, METH_VARARGS, (char *)"SpatialReference_GetLinearUnits(SpatialReference self) -> double"},
12873 : { (char *)"SpatialReference_GetLinearUnitsName", _wrap_SpatialReference_GetLinearUnitsName, METH_VARARGS, (char *)"SpatialReference_GetLinearUnitsName(SpatialReference self) -> char"},
12874 : { (char *)"SpatialReference_GetAuthorityCode", _wrap_SpatialReference_GetAuthorityCode, METH_VARARGS, (char *)"SpatialReference_GetAuthorityCode(SpatialReference self, char target_key) -> char"},
12875 : { (char *)"SpatialReference_GetAuthorityName", _wrap_SpatialReference_GetAuthorityName, METH_VARARGS, (char *)"SpatialReference_GetAuthorityName(SpatialReference self, char target_key) -> char"},
12876 : { (char *)"SpatialReference_SetUTM", _wrap_SpatialReference_SetUTM, METH_VARARGS, (char *)"SpatialReference_SetUTM(SpatialReference self, int zone, int north = 1) -> OGRErr"},
12877 : { (char *)"SpatialReference_GetUTMZone", _wrap_SpatialReference_GetUTMZone, METH_VARARGS, (char *)"SpatialReference_GetUTMZone(SpatialReference self) -> int"},
12878 : { (char *)"SpatialReference_SetStatePlane", _wrap_SpatialReference_SetStatePlane, METH_VARARGS, (char *)"\n"
12879 : "SpatialReference_SetStatePlane(SpatialReference self, int zone, int is_nad83 = 1, \n"
12880 : " char unitsname = \"\", double units = 0.0) -> OGRErr\n"
12881 : ""},
12882 : { (char *)"SpatialReference_AutoIdentifyEPSG", _wrap_SpatialReference_AutoIdentifyEPSG, METH_VARARGS, (char *)"SpatialReference_AutoIdentifyEPSG(SpatialReference self) -> OGRErr"},
12883 : { (char *)"SpatialReference_SetProjection", _wrap_SpatialReference_SetProjection, METH_VARARGS, (char *)"SpatialReference_SetProjection(SpatialReference self, char arg) -> OGRErr"},
12884 : { (char *)"SpatialReference_SetProjParm", _wrap_SpatialReference_SetProjParm, METH_VARARGS, (char *)"SpatialReference_SetProjParm(SpatialReference self, char name, double val) -> OGRErr"},
12885 : { (char *)"SpatialReference_GetProjParm", _wrap_SpatialReference_GetProjParm, METH_VARARGS, (char *)"SpatialReference_GetProjParm(SpatialReference self, char name, double default_val = 0.0) -> double"},
12886 : { (char *)"SpatialReference_SetNormProjParm", _wrap_SpatialReference_SetNormProjParm, METH_VARARGS, (char *)"SpatialReference_SetNormProjParm(SpatialReference self, char name, double val) -> OGRErr"},
12887 : { (char *)"SpatialReference_GetNormProjParm", _wrap_SpatialReference_GetNormProjParm, METH_VARARGS, (char *)"SpatialReference_GetNormProjParm(SpatialReference self, char name, double default_val = 0.0) -> double"},
12888 : { (char *)"SpatialReference_GetSemiMajor", _wrap_SpatialReference_GetSemiMajor, METH_VARARGS, (char *)"SpatialReference_GetSemiMajor(SpatialReference self) -> double"},
12889 : { (char *)"SpatialReference_GetSemiMinor", _wrap_SpatialReference_GetSemiMinor, METH_VARARGS, (char *)"SpatialReference_GetSemiMinor(SpatialReference self) -> double"},
12890 : { (char *)"SpatialReference_GetInvFlattening", _wrap_SpatialReference_GetInvFlattening, METH_VARARGS, (char *)"SpatialReference_GetInvFlattening(SpatialReference self) -> double"},
12891 : { (char *)"SpatialReference_SetACEA", (PyCFunction) _wrap_SpatialReference_SetACEA, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12892 : "SpatialReference_SetACEA(SpatialReference self, double stdp1, double stdp2, \n"
12893 : " double clat, double clong, double fe, double fn) -> OGRErr\n"
12894 : ""},
12895 : { (char *)"SpatialReference_SetAE", (PyCFunction) _wrap_SpatialReference_SetAE, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12896 : "SpatialReference_SetAE(SpatialReference self, double clat, double clong, double fe, \n"
12897 : " double fn) -> OGRErr\n"
12898 : ""},
12899 : { (char *)"SpatialReference_SetBonne", (PyCFunction) _wrap_SpatialReference_SetBonne, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12900 : "SpatialReference_SetBonne(SpatialReference self, double stdp, double cm, double fe, \n"
12901 : " double fn) -> OGRErr\n"
12902 : ""},
12903 : { (char *)"SpatialReference_SetCEA", (PyCFunction) _wrap_SpatialReference_SetCEA, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12904 : "SpatialReference_SetCEA(SpatialReference self, double stdp1, double cm, double fe, \n"
12905 : " double fn) -> OGRErr\n"
12906 : ""},
12907 : { (char *)"SpatialReference_SetCS", (PyCFunction) _wrap_SpatialReference_SetCS, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12908 : "SpatialReference_SetCS(SpatialReference self, double clat, double clong, double fe, \n"
12909 : " double fn) -> OGRErr\n"
12910 : ""},
12911 : { (char *)"SpatialReference_SetEC", (PyCFunction) _wrap_SpatialReference_SetEC, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12912 : "SpatialReference_SetEC(SpatialReference self, double stdp1, double stdp2, \n"
12913 : " double clat, double clong, double fe, double fn) -> OGRErr\n"
12914 : ""},
12915 : { (char *)"SpatialReference_SetEckertIV", (PyCFunction) _wrap_SpatialReference_SetEckertIV, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetEckertIV(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
12916 : { (char *)"SpatialReference_SetEckertVI", (PyCFunction) _wrap_SpatialReference_SetEckertVI, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetEckertVI(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
12917 : { (char *)"SpatialReference_SetEquirectangular", (PyCFunction) _wrap_SpatialReference_SetEquirectangular, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12918 : "SpatialReference_SetEquirectangular(SpatialReference self, double clat, double clong, double fe, \n"
12919 : " double fn) -> OGRErr\n"
12920 : ""},
12921 : { (char *)"SpatialReference_SetEquirectangular2", (PyCFunction) _wrap_SpatialReference_SetEquirectangular2, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12922 : "SpatialReference_SetEquirectangular2(SpatialReference self, double clat, double clong, double pseudostdparallellat, \n"
12923 : " double fe, double fn) -> OGRErr\n"
12924 : ""},
12925 : { (char *)"SpatialReference_SetGaussSchreiberTMercator", (PyCFunction) _wrap_SpatialReference_SetGaussSchreiberTMercator, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12926 : "SpatialReference_SetGaussSchreiberTMercator(SpatialReference self, double clat, double clong, double sc, \n"
12927 : " double fe, double fn) -> OGRErr\n"
12928 : ""},
12929 : { (char *)"SpatialReference_SetGS", (PyCFunction) _wrap_SpatialReference_SetGS, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetGS(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
12930 : { (char *)"SpatialReference_SetGH", (PyCFunction) _wrap_SpatialReference_SetGH, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetGH(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
12931 : { (char *)"SpatialReference_SetIGH", _wrap_SpatialReference_SetIGH, METH_VARARGS, (char *)"SpatialReference_SetIGH(SpatialReference self) -> OGRErr"},
12932 : { (char *)"SpatialReference_SetGEOS", (PyCFunction) _wrap_SpatialReference_SetGEOS, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12933 : "SpatialReference_SetGEOS(SpatialReference self, double cm, double satelliteheight, \n"
12934 : " double fe, double fn) -> OGRErr\n"
12935 : ""},
12936 : { (char *)"SpatialReference_SetGnomonic", (PyCFunction) _wrap_SpatialReference_SetGnomonic, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12937 : "SpatialReference_SetGnomonic(SpatialReference self, double clat, double clong, double fe, \n"
12938 : " double fn) -> OGRErr\n"
12939 : ""},
12940 : { (char *)"SpatialReference_SetHOM", (PyCFunction) _wrap_SpatialReference_SetHOM, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12941 : "SpatialReference_SetHOM(SpatialReference self, double clat, double clong, double azimuth, \n"
12942 : " double recttoskew, double scale, \n"
12943 : " double fe, double fn) -> OGRErr\n"
12944 : ""},
12945 : { (char *)"SpatialReference_SetHOM2PNO", (PyCFunction) _wrap_SpatialReference_SetHOM2PNO, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12946 : "SpatialReference_SetHOM2PNO(SpatialReference self, double clat, double dfLat1, \n"
12947 : " double dfLong1, double dfLat2, double dfLong2, \n"
12948 : " double scale, double fe, double fn) -> OGRErr\n"
12949 : ""},
12950 : { (char *)"SpatialReference_SetKrovak", (PyCFunction) _wrap_SpatialReference_SetKrovak, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12951 : "SpatialReference_SetKrovak(SpatialReference self, double clat, double clong, double azimuth, \n"
12952 : " double pseudostdparallellat, double scale, \n"
12953 : " double fe, double fn) -> OGRErr\n"
12954 : ""},
12955 : { (char *)"SpatialReference_SetLAEA", (PyCFunction) _wrap_SpatialReference_SetLAEA, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12956 : "SpatialReference_SetLAEA(SpatialReference self, double clat, double clong, double fe, \n"
12957 : " double fn) -> OGRErr\n"
12958 : ""},
12959 : { (char *)"SpatialReference_SetLCC", (PyCFunction) _wrap_SpatialReference_SetLCC, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12960 : "SpatialReference_SetLCC(SpatialReference self, double stdp1, double stdp2, \n"
12961 : " double clat, double clong, double fe, double fn) -> OGRErr\n"
12962 : ""},
12963 : { (char *)"SpatialReference_SetLCC1SP", (PyCFunction) _wrap_SpatialReference_SetLCC1SP, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12964 : "SpatialReference_SetLCC1SP(SpatialReference self, double clat, double clong, double scale, \n"
12965 : " double fe, double fn) -> OGRErr\n"
12966 : ""},
12967 : { (char *)"SpatialReference_SetLCCB", (PyCFunction) _wrap_SpatialReference_SetLCCB, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12968 : "SpatialReference_SetLCCB(SpatialReference self, double stdp1, double stdp2, \n"
12969 : " double clat, double clong, double fe, double fn) -> OGRErr\n"
12970 : ""},
12971 : { (char *)"SpatialReference_SetMC", (PyCFunction) _wrap_SpatialReference_SetMC, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12972 : "SpatialReference_SetMC(SpatialReference self, double clat, double clong, double fe, \n"
12973 : " double fn) -> OGRErr\n"
12974 : ""},
12975 : { (char *)"SpatialReference_SetMercator", (PyCFunction) _wrap_SpatialReference_SetMercator, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12976 : "SpatialReference_SetMercator(SpatialReference self, double clat, double clong, double scale, \n"
12977 : " double fe, double fn) -> OGRErr\n"
12978 : ""},
12979 : { (char *)"SpatialReference_SetMollweide", (PyCFunction) _wrap_SpatialReference_SetMollweide, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetMollweide(SpatialReference self, double cm, double fe, double fn) -> OGRErr"},
12980 : { (char *)"SpatialReference_SetNZMG", (PyCFunction) _wrap_SpatialReference_SetNZMG, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12981 : "SpatialReference_SetNZMG(SpatialReference self, double clat, double clong, double fe, \n"
12982 : " double fn) -> OGRErr\n"
12983 : ""},
12984 : { (char *)"SpatialReference_SetOS", (PyCFunction) _wrap_SpatialReference_SetOS, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12985 : "SpatialReference_SetOS(SpatialReference self, double dfOriginLat, double dfCMeridian, \n"
12986 : " double scale, double fe, double fn) -> OGRErr\n"
12987 : ""},
12988 : { (char *)"SpatialReference_SetOrthographic", (PyCFunction) _wrap_SpatialReference_SetOrthographic, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12989 : "SpatialReference_SetOrthographic(SpatialReference self, double clat, double clong, double fe, \n"
12990 : " double fn) -> OGRErr\n"
12991 : ""},
12992 : { (char *)"SpatialReference_SetPolyconic", (PyCFunction) _wrap_SpatialReference_SetPolyconic, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12993 : "SpatialReference_SetPolyconic(SpatialReference self, double clat, double clong, double fe, \n"
12994 : " double fn) -> OGRErr\n"
12995 : ""},
12996 : { (char *)"SpatialReference_SetPS", (PyCFunction) _wrap_SpatialReference_SetPS, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
12997 : "SpatialReference_SetPS(SpatialReference self, double clat, double clong, double scale, \n"
12998 : " double fe, double fn) -> OGRErr\n"
12999 : ""},
13000 : { (char *)"SpatialReference_SetRobinson", (PyCFunction) _wrap_SpatialReference_SetRobinson, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetRobinson(SpatialReference self, double clong, double fe, double fn) -> OGRErr"},
13001 : { (char *)"SpatialReference_SetSinusoidal", (PyCFunction) _wrap_SpatialReference_SetSinusoidal, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetSinusoidal(SpatialReference self, double clong, double fe, double fn) -> OGRErr"},
13002 : { (char *)"SpatialReference_SetStereographic", (PyCFunction) _wrap_SpatialReference_SetStereographic, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
13003 : "SpatialReference_SetStereographic(SpatialReference self, double clat, double clong, double scale, \n"
13004 : " double fe, double fn) -> OGRErr\n"
13005 : ""},
13006 : { (char *)"SpatialReference_SetSOC", (PyCFunction) _wrap_SpatialReference_SetSOC, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
13007 : "SpatialReference_SetSOC(SpatialReference self, double latitudeoforigin, double cm, \n"
13008 : " double fe, double fn) -> OGRErr\n"
13009 : ""},
13010 : { (char *)"SpatialReference_SetTM", (PyCFunction) _wrap_SpatialReference_SetTM, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
13011 : "SpatialReference_SetTM(SpatialReference self, double clat, double clong, double scale, \n"
13012 : " double fe, double fn) -> OGRErr\n"
13013 : ""},
13014 : { (char *)"SpatialReference_SetTMVariant", (PyCFunction) _wrap_SpatialReference_SetTMVariant, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
13015 : "SpatialReference_SetTMVariant(SpatialReference self, char pszVariantName, double clat, \n"
13016 : " double clong, double scale, double fe, \n"
13017 : " double fn) -> OGRErr\n"
13018 : ""},
13019 : { (char *)"SpatialReference_SetTMG", (PyCFunction) _wrap_SpatialReference_SetTMG, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
13020 : "SpatialReference_SetTMG(SpatialReference self, double clat, double clong, double fe, \n"
13021 : " double fn) -> OGRErr\n"
13022 : ""},
13023 : { (char *)"SpatialReference_SetTMSO", (PyCFunction) _wrap_SpatialReference_SetTMSO, METH_VARARGS | METH_KEYWORDS, (char *)"\n"
13024 : "SpatialReference_SetTMSO(SpatialReference self, double clat, double clong, double scale, \n"
13025 : " double fe, double fn) -> OGRErr\n"
13026 : ""},
13027 : { (char *)"SpatialReference_SetVDG", (PyCFunction) _wrap_SpatialReference_SetVDG, METH_VARARGS | METH_KEYWORDS, (char *)"SpatialReference_SetVDG(SpatialReference self, double clong, double fe, double fn) -> OGRErr"},
13028 : { (char *)"SpatialReference_SetWellKnownGeogCS", _wrap_SpatialReference_SetWellKnownGeogCS, METH_VARARGS, (char *)"SpatialReference_SetWellKnownGeogCS(SpatialReference self, char name) -> OGRErr"},
13029 : { (char *)"SpatialReference_SetFromUserInput", _wrap_SpatialReference_SetFromUserInput, METH_VARARGS, (char *)"SpatialReference_SetFromUserInput(SpatialReference self, char name) -> OGRErr"},
13030 : { (char *)"SpatialReference_CopyGeogCSFrom", _wrap_SpatialReference_CopyGeogCSFrom, METH_VARARGS, (char *)"SpatialReference_CopyGeogCSFrom(SpatialReference self, SpatialReference rhs) -> OGRErr"},
13031 : { (char *)"SpatialReference_SetTOWGS84", _wrap_SpatialReference_SetTOWGS84, METH_VARARGS, (char *)"\n"
13032 : "SpatialReference_SetTOWGS84(SpatialReference self, double p1, double p2, double p3, \n"
13033 : " double p4 = 0.0, double p5 = 0.0, double p6 = 0.0, \n"
13034 : " double p7 = 0.0) -> OGRErr\n"
13035 : ""},
13036 : { (char *)"SpatialReference_GetTOWGS84", _wrap_SpatialReference_GetTOWGS84, METH_VARARGS, (char *)"SpatialReference_GetTOWGS84(SpatialReference self) -> OGRErr"},
13037 : { (char *)"SpatialReference_SetLocalCS", _wrap_SpatialReference_SetLocalCS, METH_VARARGS, (char *)"SpatialReference_SetLocalCS(SpatialReference self, char pszName) -> OGRErr"},
13038 : { (char *)"SpatialReference_SetGeogCS", _wrap_SpatialReference_SetGeogCS, METH_VARARGS, (char *)"\n"
13039 : "SpatialReference_SetGeogCS(SpatialReference self, char pszGeogName, char pszDatumName, \n"
13040 : " char pszEllipsoidName, double dfSemiMajor, \n"
13041 : " double dfInvFlattening, char pszPMName = \"Greenwich\", \n"
13042 : " double dfPMOffset = 0.0, char pszUnits = \"degree\", \n"
13043 : " double dfConvertToRadians = 0.0174532925199433) -> OGRErr\n"
13044 : ""},
13045 : { (char *)"SpatialReference_SetProjCS", _wrap_SpatialReference_SetProjCS, METH_VARARGS, (char *)"SpatialReference_SetProjCS(SpatialReference self, char name = \"unnamed\") -> OGRErr"},
13046 : { (char *)"SpatialReference_SetGeocCS", _wrap_SpatialReference_SetGeocCS, METH_VARARGS, (char *)"SpatialReference_SetGeocCS(SpatialReference self, char name = \"unnamed\") -> OGRErr"},
13047 : { (char *)"SpatialReference_SetVertCS", _wrap_SpatialReference_SetVertCS, METH_VARARGS, (char *)"\n"
13048 : "SpatialReference_SetVertCS(SpatialReference self, char VertCSName = \"unnamed\", \n"
13049 : " char VertDatumName = \"unnamed\", int VertDatumType = 0) -> OGRErr\n"
13050 : ""},
13051 : { (char *)"SpatialReference_SetCompoundCS", _wrap_SpatialReference_SetCompoundCS, METH_VARARGS, (char *)"\n"
13052 : "SpatialReference_SetCompoundCS(SpatialReference self, char name, SpatialReference horizcs, \n"
13053 : " SpatialReference vertcs) -> OGRErr\n"
13054 : ""},
13055 : { (char *)"SpatialReference_ImportFromWkt", _wrap_SpatialReference_ImportFromWkt, METH_VARARGS, (char *)"SpatialReference_ImportFromWkt(SpatialReference self, char ppszInput) -> OGRErr"},
13056 : { (char *)"SpatialReference_ImportFromProj4", _wrap_SpatialReference_ImportFromProj4, METH_VARARGS, (char *)"SpatialReference_ImportFromProj4(SpatialReference self, char ppszInput) -> OGRErr"},
13057 : { (char *)"SpatialReference_ImportFromUrl", _wrap_SpatialReference_ImportFromUrl, METH_VARARGS, (char *)"SpatialReference_ImportFromUrl(SpatialReference self, char url) -> OGRErr"},
13058 : { (char *)"SpatialReference_ImportFromESRI", _wrap_SpatialReference_ImportFromESRI, METH_VARARGS, (char *)"SpatialReference_ImportFromESRI(SpatialReference self, char ppszInput) -> OGRErr"},
13059 : { (char *)"SpatialReference_ImportFromEPSG", _wrap_SpatialReference_ImportFromEPSG, METH_VARARGS, (char *)"SpatialReference_ImportFromEPSG(SpatialReference self, int arg) -> OGRErr"},
13060 : { (char *)"SpatialReference_ImportFromEPSGA", _wrap_SpatialReference_ImportFromEPSGA, METH_VARARGS, (char *)"SpatialReference_ImportFromEPSGA(SpatialReference self, int arg) -> OGRErr"},
13061 : { (char *)"SpatialReference_ImportFromPCI", _wrap_SpatialReference_ImportFromPCI, METH_VARARGS, (char *)"\n"
13062 : "SpatialReference_ImportFromPCI(SpatialReference self, char proj, char units = \"METRE\", \n"
13063 : " double argin = 0) -> OGRErr\n"
13064 : ""},
13065 : { (char *)"SpatialReference_ImportFromUSGS", _wrap_SpatialReference_ImportFromUSGS, METH_VARARGS, (char *)"\n"
13066 : "SpatialReference_ImportFromUSGS(SpatialReference self, long proj_code, long zone = 0, \n"
13067 : " double argin = 0, long datum_code = 0) -> OGRErr\n"
13068 : ""},
13069 : { (char *)"SpatialReference_ImportFromXML", _wrap_SpatialReference_ImportFromXML, METH_VARARGS, (char *)"SpatialReference_ImportFromXML(SpatialReference self, char xmlString) -> OGRErr"},
13070 : { (char *)"SpatialReference_ImportFromERM", _wrap_SpatialReference_ImportFromERM, METH_VARARGS, (char *)"SpatialReference_ImportFromERM(SpatialReference self, char proj, char datum, char units) -> OGRErr"},
13071 : { (char *)"SpatialReference_ImportFromMICoordSys", _wrap_SpatialReference_ImportFromMICoordSys, METH_VARARGS, (char *)"SpatialReference_ImportFromMICoordSys(SpatialReference self, char pszCoordSys) -> OGRErr"},
13072 : { (char *)"SpatialReference_ImportFromOzi", _wrap_SpatialReference_ImportFromOzi, METH_VARARGS, (char *)"SpatialReference_ImportFromOzi(SpatialReference self, char datum, char proj, char projParms) -> OGRErr"},
13073 : { (char *)"SpatialReference_ExportToWkt", _wrap_SpatialReference_ExportToWkt, METH_VARARGS, (char *)"SpatialReference_ExportToWkt(SpatialReference self) -> OGRErr"},
13074 : { (char *)"SpatialReference_ExportToPrettyWkt", _wrap_SpatialReference_ExportToPrettyWkt, METH_VARARGS, (char *)"SpatialReference_ExportToPrettyWkt(SpatialReference self, int simplify = 0) -> OGRErr"},
13075 : { (char *)"SpatialReference_ExportToProj4", _wrap_SpatialReference_ExportToProj4, METH_VARARGS, (char *)"SpatialReference_ExportToProj4(SpatialReference self) -> OGRErr"},
13076 : { (char *)"SpatialReference_ExportToPCI", _wrap_SpatialReference_ExportToPCI, METH_VARARGS, (char *)"SpatialReference_ExportToPCI(SpatialReference self) -> OGRErr"},
13077 : { (char *)"SpatialReference_ExportToUSGS", _wrap_SpatialReference_ExportToUSGS, METH_VARARGS, (char *)"SpatialReference_ExportToUSGS(SpatialReference self) -> OGRErr"},
13078 : { (char *)"SpatialReference_ExportToXML", _wrap_SpatialReference_ExportToXML, METH_VARARGS, (char *)"SpatialReference_ExportToXML(SpatialReference self, char dialect = \"\") -> OGRErr"},
13079 : { (char *)"SpatialReference_ExportToMICoordSys", _wrap_SpatialReference_ExportToMICoordSys, METH_VARARGS, (char *)"SpatialReference_ExportToMICoordSys(SpatialReference self) -> OGRErr"},
13080 : { (char *)"SpatialReference_CloneGeogCS", _wrap_SpatialReference_CloneGeogCS, METH_VARARGS, (char *)"SpatialReference_CloneGeogCS(SpatialReference self) -> SpatialReference"},
13081 : { (char *)"SpatialReference_Clone", _wrap_SpatialReference_Clone, METH_VARARGS, (char *)"SpatialReference_Clone(SpatialReference self) -> SpatialReference"},
13082 : { (char *)"SpatialReference_Validate", _wrap_SpatialReference_Validate, METH_VARARGS, (char *)"SpatialReference_Validate(SpatialReference self) -> OGRErr"},
13083 : { (char *)"SpatialReference_StripCTParms", _wrap_SpatialReference_StripCTParms, METH_VARARGS, (char *)"SpatialReference_StripCTParms(SpatialReference self) -> OGRErr"},
13084 : { (char *)"SpatialReference_FixupOrdering", _wrap_SpatialReference_FixupOrdering, METH_VARARGS, (char *)"SpatialReference_FixupOrdering(SpatialReference self) -> OGRErr"},
13085 : { (char *)"SpatialReference_Fixup", _wrap_SpatialReference_Fixup, METH_VARARGS, (char *)"SpatialReference_Fixup(SpatialReference self) -> OGRErr"},
13086 : { (char *)"SpatialReference_MorphToESRI", _wrap_SpatialReference_MorphToESRI, METH_VARARGS, (char *)"SpatialReference_MorphToESRI(SpatialReference self) -> OGRErr"},
13087 : { (char *)"SpatialReference_MorphFromESRI", _wrap_SpatialReference_MorphFromESRI, METH_VARARGS, (char *)"SpatialReference_MorphFromESRI(SpatialReference self) -> OGRErr"},
13088 : { (char *)"SpatialReference_swigregister", SpatialReference_swigregister, METH_VARARGS, NULL},
13089 : { (char *)"new_CoordinateTransformation", _wrap_new_CoordinateTransformation, METH_VARARGS, (char *)"new_CoordinateTransformation(SpatialReference src, SpatialReference dst) -> CoordinateTransformation"},
13090 : { (char *)"delete_CoordinateTransformation", _wrap_delete_CoordinateTransformation, METH_VARARGS, (char *)"delete_CoordinateTransformation(CoordinateTransformation self)"},
13091 : { (char *)"CoordinateTransformation_TransformPoint", _wrap_CoordinateTransformation_TransformPoint, METH_VARARGS, (char *)"\n"
13092 : "TransformPoint(double inout)\n"
13093 : "CoordinateTransformation_TransformPoint(CoordinateTransformation self, double x, double y, \n"
13094 : " double z = 0.0)\n"
13095 : ""},
13096 : { (char *)"CoordinateTransformation_TransformPoints", _wrap_CoordinateTransformation_TransformPoints, METH_VARARGS, (char *)"CoordinateTransformation_TransformPoints(CoordinateTransformation self, int nCount)"},
13097 : { (char *)"CoordinateTransformation_swigregister", CoordinateTransformation_swigregister, METH_VARARGS, NULL},
13098 : { NULL, NULL, 0, NULL }
13099 : };
13100 :
13101 :
13102 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
13103 :
13104 : static swig_type_info _swigt__p_OSRCoordinateTransformationShadow = {"_p_OSRCoordinateTransformationShadow", "OSRCoordinateTransformationShadow *", 0, 0, (void*)0, 0};
13105 : static swig_type_info _swigt__p_OSRSpatialReferenceShadow = {"_p_OSRSpatialReferenceShadow", "OSRSpatialReferenceShadow *", 0, 0, (void*)0, 0};
13106 : static swig_type_info _swigt__p_char = {"_p_char", "char *|retStringAndCPLFree *", 0, 0, (void*)0, 0};
13107 : static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
13108 : static swig_type_info _swigt__p_int = {"_p_int", "int *|OGRErr *", 0, 0, (void*)0, 0};
13109 : static swig_type_info _swigt__p_long = {"_p_long", "long *", 0, 0, (void*)0, 0};
13110 : static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
13111 : static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
13112 :
13113 : static swig_type_info *swig_type_initial[] = {
13114 : &_swigt__p_OSRCoordinateTransformationShadow,
13115 : &_swigt__p_OSRSpatialReferenceShadow,
13116 : &_swigt__p_char,
13117 : &_swigt__p_double,
13118 : &_swigt__p_int,
13119 : &_swigt__p_long,
13120 : &_swigt__p_p_char,
13121 : &_swigt__p_p_double,
13122 : };
13123 :
13124 : static swig_cast_info _swigc__p_OSRCoordinateTransformationShadow[] = { {&_swigt__p_OSRCoordinateTransformationShadow, 0, 0, 0},{0, 0, 0, 0}};
13125 : static swig_cast_info _swigc__p_OSRSpatialReferenceShadow[] = { {&_swigt__p_OSRSpatialReferenceShadow, 0, 0, 0},{0, 0, 0, 0}};
13126 : static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
13127 : static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
13128 : static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
13129 : static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
13130 : static swig_cast_info _swigc__p_p_char[] = { {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
13131 : static swig_cast_info _swigc__p_p_double[] = { {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
13132 :
13133 : static swig_cast_info *swig_cast_initial[] = {
13134 : _swigc__p_OSRCoordinateTransformationShadow,
13135 : _swigc__p_OSRSpatialReferenceShadow,
13136 : _swigc__p_char,
13137 : _swigc__p_double,
13138 : _swigc__p_int,
13139 : _swigc__p_long,
13140 : _swigc__p_p_char,
13141 : _swigc__p_p_double,
13142 : };
13143 :
13144 :
13145 : /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
13146 :
13147 : static swig_const_info swig_const_table[] = {
13148 : {0, 0, 0, 0.0, 0, 0}};
13149 :
13150 : #ifdef __cplusplus
13151 : }
13152 : #endif
13153 : /* -----------------------------------------------------------------------------
13154 : * Type initialization:
13155 : * This problem is tough by the requirement that no dynamic
13156 : * memory is used. Also, since swig_type_info structures store pointers to
13157 : * swig_cast_info structures and swig_cast_info structures store pointers back
13158 : * to swig_type_info structures, we need some lookup code at initialization.
13159 : * The idea is that swig generates all the structures that are needed.
13160 : * The runtime then collects these partially filled structures.
13161 : * The SWIG_InitializeModule function takes these initial arrays out of
13162 : * swig_module, and does all the lookup, filling in the swig_module.types
13163 : * array with the correct data and linking the correct swig_cast_info
13164 : * structures together.
13165 : *
13166 : * The generated swig_type_info structures are assigned staticly to an initial
13167 : * array. We just loop through that array, and handle each type individually.
13168 : * First we lookup if this type has been already loaded, and if so, use the
13169 : * loaded structure instead of the generated one. Then we have to fill in the
13170 : * cast linked list. The cast data is initially stored in something like a
13171 : * two-dimensional array. Each row corresponds to a type (there are the same
13172 : * number of rows as there are in the swig_type_initial array). Each entry in
13173 : * a column is one of the swig_cast_info structures for that type.
13174 : * The cast_initial array is actually an array of arrays, because each row has
13175 : * a variable number of columns. So to actually build the cast linked list,
13176 : * we find the array of casts associated with the type, and loop through it
13177 : * adding the casts to the list. The one last trick we need to do is making
13178 : * sure the type pointer in the swig_cast_info struct is correct.
13179 : *
13180 : * First off, we lookup the cast->type name to see if it is already loaded.
13181 : * There are three cases to handle:
13182 : * 1) If the cast->type has already been loaded AND the type we are adding
13183 : * casting info to has not been loaded (it is in this module), THEN we
13184 : * replace the cast->type pointer with the type pointer that has already
13185 : * been loaded.
13186 : * 2) If BOTH types (the one we are adding casting info to, and the
13187 : * cast->type) are loaded, THEN the cast info has already been loaded by
13188 : * the previous module so we just ignore it.
13189 : * 3) Finally, if cast->type has not already been loaded, then we add that
13190 : * swig_cast_info to the linked list (because the cast->type) pointer will
13191 : * be correct.
13192 : * ----------------------------------------------------------------------------- */
13193 :
13194 : #ifdef __cplusplus
13195 : extern "C" {
13196 : #if 0
13197 : } /* c-mode */
13198 : #endif
13199 : #endif
13200 :
13201 : #if 0
13202 : #define SWIGRUNTIME_DEBUG
13203 : #endif
13204 :
13205 :
13206 : SWIGRUNTIME void
13207 4 : SWIG_InitializeModule(void *clientdata) {
13208 : size_t i;
13209 : swig_module_info *module_head, *iter;
13210 : int found, init;
13211 :
13212 4 : clientdata = clientdata;
13213 :
13214 : /* check to see if the circular list has been setup, if not, set it up */
13215 4 : if (swig_module.next==0) {
13216 : /* Initialize the swig_module */
13217 4 : swig_module.type_initial = swig_type_initial;
13218 4 : swig_module.cast_initial = swig_cast_initial;
13219 4 : swig_module.next = &swig_module;
13220 4 : init = 1;
13221 : } else {
13222 0 : init = 0;
13223 : }
13224 :
13225 : /* Try and load any already created modules */
13226 4 : module_head = SWIG_GetModule(clientdata);
13227 4 : if (!module_head) {
13228 : /* This is the first module loaded for this interpreter */
13229 : /* so set the swig module into the interpreter */
13230 : SWIG_SetModule(clientdata, &swig_module);
13231 0 : module_head = &swig_module;
13232 : } else {
13233 : /* the interpreter has loaded a SWIG module, but has it loaded this one? */
13234 4 : found=0;
13235 4 : iter=module_head;
13236 8 : do {
13237 8 : if (iter==&swig_module) {
13238 0 : found=1;
13239 0 : break;
13240 : }
13241 8 : iter=iter->next;
13242 : } while (iter!= module_head);
13243 :
13244 : /* if the is found in the list, then all is done and we may leave */
13245 4 : if (found) return;
13246 : /* otherwise we must add out module into the list */
13247 4 : swig_module.next = module_head->next;
13248 4 : module_head->next = &swig_module;
13249 : }
13250 :
13251 : /* When multiple interpeters are used, a module could have already been initialized in
13252 : a different interpreter, but not yet have a pointer in this interpreter.
13253 : In this case, we do not want to continue adding types... everything should be
13254 : set up already */
13255 4 : if (init == 0) return;
13256 :
13257 : /* Now work on filling in swig_module.types */
13258 : #ifdef SWIGRUNTIME_DEBUG
13259 : printf("SWIG_InitializeModule: size %d\n", swig_module.size);
13260 : #endif
13261 36 : for (i = 0; i < swig_module.size; ++i) {
13262 32 : swig_type_info *type = 0;
13263 : swig_type_info *ret;
13264 : swig_cast_info *cast;
13265 :
13266 : #ifdef SWIGRUNTIME_DEBUG
13267 : printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
13268 : #endif
13269 :
13270 : /* if there is another module already loaded */
13271 32 : if (swig_module.next != &swig_module) {
13272 32 : type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
13273 : }
13274 32 : if (type) {
13275 : /* Overwrite clientdata field */
13276 : #ifdef SWIGRUNTIME_DEBUG
13277 : printf("SWIG_InitializeModule: found type %s\n", type->name);
13278 : #endif
13279 16 : if (swig_module.type_initial[i]->clientdata) {
13280 0 : type->clientdata = swig_module.type_initial[i]->clientdata;
13281 : #ifdef SWIGRUNTIME_DEBUG
13282 : printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
13283 : #endif
13284 : }
13285 : } else {
13286 16 : type = swig_module.type_initial[i];
13287 : }
13288 :
13289 : /* Insert casting types */
13290 32 : cast = swig_module.cast_initial[i];
13291 96 : while (cast->type) {
13292 : /* Don't need to add information already in the list */
13293 32 : ret = 0;
13294 : #ifdef SWIGRUNTIME_DEBUG
13295 : printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
13296 : #endif
13297 32 : if (swig_module.next != &swig_module) {
13298 32 : ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
13299 : #ifdef SWIGRUNTIME_DEBUG
13300 : if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
13301 : #endif
13302 : }
13303 32 : if (ret) {
13304 16 : if (type == swig_module.type_initial[i]) {
13305 : #ifdef SWIGRUNTIME_DEBUG
13306 : printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
13307 : #endif
13308 0 : cast->type = ret;
13309 0 : ret = 0;
13310 : } else {
13311 : /* Check for casting already in the list */
13312 16 : swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
13313 : #ifdef SWIGRUNTIME_DEBUG
13314 : if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
13315 : #endif
13316 16 : if (!ocast) ret = 0;
13317 : }
13318 : }
13319 :
13320 32 : if (!ret) {
13321 : #ifdef SWIGRUNTIME_DEBUG
13322 : printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
13323 : #endif
13324 16 : if (type->cast) {
13325 0 : type->cast->prev = cast;
13326 0 : cast->next = type->cast;
13327 : }
13328 16 : type->cast = cast;
13329 : }
13330 32 : cast++;
13331 : }
13332 : /* Set entry in modules->types array equal to the type */
13333 32 : swig_module.types[i] = type;
13334 : }
13335 4 : swig_module.types[i] = 0;
13336 :
13337 : #ifdef SWIGRUNTIME_DEBUG
13338 : printf("**** SWIG_InitializeModule: Cast List ******\n");
13339 : for (i = 0; i < swig_module.size; ++i) {
13340 : int j = 0;
13341 : swig_cast_info *cast = swig_module.cast_initial[i];
13342 : printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
13343 : while (cast->type) {
13344 : printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
13345 : cast++;
13346 : ++j;
13347 : }
13348 : printf("---- Total casts: %d\n",j);
13349 : }
13350 : printf("**** SWIG_InitializeModule: Cast List ******\n");
13351 : #endif
13352 : }
13353 :
13354 : /* This function will propagate the clientdata field of type to
13355 : * any new swig_type_info structures that have been added into the list
13356 : * of equivalent types. It is like calling
13357 : * SWIG_TypeClientData(type, clientdata) a second time.
13358 : */
13359 : SWIGRUNTIME void
13360 : SWIG_PropagateClientData(void) {
13361 : size_t i;
13362 : swig_cast_info *equiv;
13363 : static int init_run = 0;
13364 :
13365 : if (init_run) return;
13366 : init_run = 1;
13367 :
13368 : for (i = 0; i < swig_module.size; i++) {
13369 : if (swig_module.types[i]->clientdata) {
13370 : equiv = swig_module.types[i]->cast;
13371 : while (equiv) {
13372 : if (!equiv->converter) {
13373 : if (equiv->type && !equiv->type->clientdata)
13374 : SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
13375 : }
13376 : equiv = equiv->next;
13377 : }
13378 : }
13379 : }
13380 : }
13381 :
13382 : #ifdef __cplusplus
13383 : #if 0
13384 : {
13385 : /* c-mode */
13386 : #endif
13387 : }
13388 : #endif
13389 :
13390 :
13391 :
13392 : #ifdef __cplusplus
13393 : extern "C" {
13394 : #endif
13395 :
13396 : /* Python-specific SWIG API */
13397 : #define SWIG_newvarlink() SWIG_Python_newvarlink()
13398 : #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
13399 : #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
13400 :
13401 : /* -----------------------------------------------------------------------------
13402 : * global variable support code.
13403 : * ----------------------------------------------------------------------------- */
13404 :
13405 : typedef struct swig_globalvar {
13406 : char *name; /* Name of global variable */
13407 : PyObject *(*get_attr)(void); /* Return the current value */
13408 : int (*set_attr)(PyObject *); /* Set the value */
13409 : struct swig_globalvar *next;
13410 : } swig_globalvar;
13411 :
13412 : typedef struct swig_varlinkobject {
13413 : PyObject_HEAD
13414 : swig_globalvar *vars;
13415 : } swig_varlinkobject;
13416 :
13417 : SWIGINTERN PyObject *
13418 : swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
13419 : #if PY_VERSION_HEX >= 0x03000000
13420 : return PyUnicode_InternFromString("<Swig global variables>");
13421 : #else
13422 : return PyString_FromString("<Swig global variables>");
13423 : #endif
13424 : }
13425 :
13426 : SWIGINTERN PyObject *
13427 : swig_varlink_str(swig_varlinkobject *v) {
13428 : #if PY_VERSION_HEX >= 0x03000000
13429 : PyObject *str = PyUnicode_InternFromString("(");
13430 : PyObject *tail;
13431 : PyObject *joined;
13432 : swig_globalvar *var;
13433 : for (var = v->vars; var; var=var->next) {
13434 : tail = PyUnicode_FromString(var->name);
13435 : joined = PyUnicode_Concat(str, tail);
13436 : Py_DecRef(str);
13437 : Py_DecRef(tail);
13438 : str = joined;
13439 : if (var->next) {
13440 : tail = PyUnicode_InternFromString(", ");
13441 : joined = PyUnicode_Concat(str, tail);
13442 : Py_DecRef(str);
13443 : Py_DecRef(tail);
13444 : str = joined;
13445 : }
13446 : }
13447 : tail = PyUnicode_InternFromString(")");
13448 : joined = PyUnicode_Concat(str, tail);
13449 : Py_DecRef(str);
13450 : Py_DecRef(tail);
13451 : str = joined;
13452 : #else
13453 : PyObject *str = PyString_FromString("(");
13454 : swig_globalvar *var;
13455 : for (var = v->vars; var; var=var->next) {
13456 : PyString_ConcatAndDel(&str,PyString_FromString(var->name));
13457 : if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
13458 : }
13459 : PyString_ConcatAndDel(&str,PyString_FromString(")"));
13460 : #endif
13461 : return str;
13462 : }
13463 :
13464 : SWIGINTERN int
13465 : swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
13466 : char *tmp;
13467 : PyObject *str = swig_varlink_str(v);
13468 : fprintf(fp,"Swig global variables ");
13469 : fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
13470 : SWIG_Python_str_DelForPy3(tmp);
13471 : Py_DECREF(str);
13472 : return 0;
13473 : }
13474 :
13475 : SWIGINTERN void
13476 : swig_varlink_dealloc(swig_varlinkobject *v) {
13477 : swig_globalvar *var = v->vars;
13478 : while (var) {
13479 : swig_globalvar *n = var->next;
13480 : free(var->name);
13481 : free(var);
13482 : var = n;
13483 : }
13484 : }
13485 :
13486 : SWIGINTERN PyObject *
13487 : swig_varlink_getattr(swig_varlinkobject *v, char *n) {
13488 : PyObject *res = NULL;
13489 : swig_globalvar *var = v->vars;
13490 : while (var) {
13491 : if (strcmp(var->name,n) == 0) {
13492 : res = (*var->get_attr)();
13493 : break;
13494 : }
13495 : var = var->next;
13496 : }
13497 : if (res == NULL && !PyErr_Occurred()) {
13498 : PyErr_SetString(PyExc_NameError,"Unknown C global variable");
13499 : }
13500 : return res;
13501 : }
13502 :
13503 : SWIGINTERN int
13504 : swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
13505 : int res = 1;
13506 : swig_globalvar *var = v->vars;
13507 : while (var) {
13508 : if (strcmp(var->name,n) == 0) {
13509 : res = (*var->set_attr)(p);
13510 : break;
13511 : }
13512 : var = var->next;
13513 : }
13514 : if (res == 1 && !PyErr_Occurred()) {
13515 : PyErr_SetString(PyExc_NameError,"Unknown C global variable");
13516 : }
13517 : return res;
13518 : }
13519 :
13520 : SWIGINTERN PyTypeObject*
13521 : swig_varlink_type(void) {
13522 : static char varlink__doc__[] = "Swig var link object";
13523 : static PyTypeObject varlink_type;
13524 : static int type_init = 0;
13525 : if (!type_init) {
13526 : const PyTypeObject tmp
13527 : = {
13528 : /* PyObject header changed in Python 3 */
13529 : #if PY_VERSION_HEX >= 0x03000000
13530 : PyVarObject_HEAD_INIT(&PyType_Type, 0)
13531 : #else
13532 : PyObject_HEAD_INIT(NULL)
13533 : 0, /* Number of items in variable part (ob_size) */
13534 : #endif
13535 : (char *)"swigvarlink", /* Type name (tp_name) */
13536 : sizeof(swig_varlinkobject), /* Basic size (tp_basicsize) */
13537 : 0, /* Itemsize (tp_itemsize) */
13538 : (destructor) swig_varlink_dealloc, /* Deallocator (tp_dealloc) */
13539 : (printfunc) swig_varlink_print, /* Print (tp_print) */
13540 : (getattrfunc) swig_varlink_getattr, /* get attr (tp_getattr) */
13541 : (setattrfunc) swig_varlink_setattr, /* Set attr (tp_setattr) */
13542 : 0, /* tp_compare */
13543 : (reprfunc) swig_varlink_repr, /* tp_repr */
13544 : 0, /* tp_as_number */
13545 : 0, /* tp_as_sequence */
13546 : 0, /* tp_as_mapping */
13547 : 0, /* tp_hash */
13548 : 0, /* tp_call */
13549 : (reprfunc) swig_varlink_str, /* tp_str */
13550 : 0, /* tp_getattro */
13551 : 0, /* tp_setattro */
13552 : 0, /* tp_as_buffer */
13553 : 0, /* tp_flags */
13554 : varlink__doc__, /* tp_doc */
13555 : 0, /* tp_traverse */
13556 : 0, /* tp_clear */
13557 : 0, /* tp_richcompare */
13558 : 0, /* tp_weaklistoffset */
13559 : #if PY_VERSION_HEX >= 0x02020000
13560 : 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
13561 : #endif
13562 : #if PY_VERSION_HEX >= 0x02030000
13563 : 0, /* tp_del */
13564 : #endif
13565 : #ifdef COUNT_ALLOCS
13566 : 0,0,0,0 /* tp_alloc -> tp_next */
13567 : #endif
13568 : };
13569 : varlink_type = tmp;
13570 : /* for Python 3 we already assigned ob_type in PyVarObject_HEAD_INIT() */
13571 : #if PY_VERSION_HEX < 0x03000000
13572 : varlink_type.ob_type = &PyType_Type;
13573 : #endif
13574 : type_init = 1;
13575 : }
13576 : return &varlink_type;
13577 : }
13578 :
13579 : /* Create a variable linking object for use later */
13580 : SWIGINTERN PyObject *
13581 : SWIG_Python_newvarlink(void) {
13582 : swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
13583 : if (result) {
13584 : result->vars = 0;
13585 : }
13586 : return ((PyObject*) result);
13587 : }
13588 :
13589 : SWIGINTERN void
13590 : SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
13591 : swig_varlinkobject *v = (swig_varlinkobject *) p;
13592 : swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
13593 : if (gv) {
13594 : size_t size = strlen(name)+1;
13595 : gv->name = (char *)malloc(size);
13596 : if (gv->name) {
13597 : strncpy(gv->name,name,size);
13598 : gv->get_attr = get_attr;
13599 : gv->set_attr = set_attr;
13600 : gv->next = v->vars;
13601 : }
13602 : }
13603 : v->vars = gv;
13604 : }
13605 :
13606 : SWIGINTERN PyObject *
13607 : SWIG_globals(void) {
13608 : static PyObject *_SWIG_globals = 0;
13609 : if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
13610 : return _SWIG_globals;
13611 : }
13612 :
13613 : /* -----------------------------------------------------------------------------
13614 : * constants/methods manipulation
13615 : * ----------------------------------------------------------------------------- */
13616 :
13617 : /* Install Constants */
13618 : SWIGINTERN void
13619 4 : SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
13620 4 : PyObject *obj = 0;
13621 : size_t i;
13622 4 : for (i = 0; constants[i].type; ++i) {
13623 0 : switch(constants[i].type) {
13624 : case SWIG_PY_POINTER:
13625 0 : obj = SWIG_NewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
13626 0 : break;
13627 : case SWIG_PY_BINARY:
13628 0 : obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
13629 0 : break;
13630 : default:
13631 0 : obj = 0;
13632 : break;
13633 : }
13634 0 : if (obj) {
13635 0 : PyDict_SetItemString(d, constants[i].name, obj);
13636 0 : Py_DECREF(obj);
13637 : }
13638 : }
13639 4 : }
13640 :
13641 : /* -----------------------------------------------------------------------------*/
13642 : /* Fix SwigMethods to carry the callback ptrs when needed */
13643 : /* -----------------------------------------------------------------------------*/
13644 :
13645 : SWIGINTERN void
13646 4 : SWIG_Python_FixMethods(PyMethodDef *methods,
13647 : swig_const_info *const_table,
13648 : swig_type_info **types,
13649 : swig_type_info **types_initial) {
13650 : size_t i;
13651 516 : for (i = 0; methods[i].ml_name; ++i) {
13652 512 : const char *c = methods[i].ml_doc;
13653 1008 : if (c && (c = strstr(c, "swig_ptr: "))) {
13654 : int j;
13655 0 : swig_const_info *ci = 0;
13656 0 : const char *name = c + 10;
13657 0 : for (j = 0; const_table[j].type; ++j) {
13658 0 : if (strncmp(const_table[j].name, name,
13659 0 : strlen(const_table[j].name)) == 0) {
13660 0 : ci = &(const_table[j]);
13661 0 : break;
13662 : }
13663 : }
13664 0 : if (ci) {
13665 0 : size_t shift = (ci->ptype) - types;
13666 0 : swig_type_info *ty = types_initial[shift];
13667 0 : size_t ldoc = (c - methods[i].ml_doc);
13668 0 : size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
13669 0 : char *ndoc = (char*)malloc(ldoc + lptr + 10);
13670 0 : if (ndoc) {
13671 0 : char *buff = ndoc;
13672 0 : void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
13673 0 : if (ptr) {
13674 0 : strncpy(buff, methods[i].ml_doc, ldoc);
13675 0 : buff += ldoc;
13676 : strncpy(buff, "swig_ptr: ", 10);
13677 0 : buff += 10;
13678 0 : SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
13679 0 : methods[i].ml_doc = ndoc;
13680 : }
13681 : }
13682 : }
13683 : }
13684 : }
13685 4 : }
13686 :
13687 : #ifdef __cplusplus
13688 : }
13689 : #endif
13690 :
13691 : /* -----------------------------------------------------------------------------*
13692 : * Partial Init method
13693 : * -----------------------------------------------------------------------------*/
13694 :
13695 : #ifdef __cplusplus
13696 : extern "C"
13697 : #endif
13698 :
13699 : SWIGEXPORT
13700 : #if PY_VERSION_HEX >= 0x03000000
13701 : PyObject*
13702 : #else
13703 : void
13704 : #endif
13705 4 : SWIG_init(void) {
13706 : PyObject *m, *d;
13707 : #if PY_VERSION_HEX >= 0x03000000
13708 : static struct PyModuleDef SWIG_module = {
13709 : PyModuleDef_HEAD_INIT,
13710 : (char *) SWIG_name,
13711 : NULL,
13712 : -1,
13713 : SwigMethods,
13714 : NULL,
13715 : NULL,
13716 : NULL,
13717 : NULL
13718 : };
13719 : #endif
13720 :
13721 : /* Fix SwigMethods to carry the callback ptrs when needed */
13722 4 : SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
13723 :
13724 : #if PY_VERSION_HEX >= 0x03000000
13725 : m = PyModule_Create(&SWIG_module);
13726 : #else
13727 4 : m = Py_InitModule((char *) SWIG_name, SwigMethods);
13728 : #endif
13729 4 : d = PyModule_GetDict(m);
13730 :
13731 4 : SWIG_InitializeModule(0);
13732 4 : SWIG_InstallConstants(d,swig_const_table);
13733 :
13734 :
13735 4 : SWIG_Python_SetConstant(d, "SRS_WKT_WGS84",SWIG_FromCharPtr("GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9108\"]],AUTHORITY[\"EPSG\",\"4326\"]]"));
13736 4 : SWIG_Python_SetConstant(d, "SRS_PT_ALBERS_CONIC_EQUAL_AREA",SWIG_FromCharPtr("Albers_Conic_Equal_Area"));
13737 4 : SWIG_Python_SetConstant(d, "SRS_PT_AZIMUTHAL_EQUIDISTANT",SWIG_FromCharPtr("Azimuthal_Equidistant"));
13738 4 : SWIG_Python_SetConstant(d, "SRS_PT_CASSINI_SOLDNER",SWIG_FromCharPtr("Cassini_Soldner"));
13739 4 : SWIG_Python_SetConstant(d, "SRS_PT_CYLINDRICAL_EQUAL_AREA",SWIG_FromCharPtr("Cylindrical_Equal_Area"));
13740 4 : SWIG_Python_SetConstant(d, "SRS_PT_BONNE",SWIG_FromCharPtr("Bonne"));
13741 4 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_I",SWIG_FromCharPtr("Eckert_I"));
13742 4 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_II",SWIG_FromCharPtr("Eckert_II"));
13743 4 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_III",SWIG_FromCharPtr("Eckert_III"));
13744 4 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_IV",SWIG_FromCharPtr("Eckert_IV"));
13745 4 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_V",SWIG_FromCharPtr("Eckert_V"));
13746 4 : SWIG_Python_SetConstant(d, "SRS_PT_ECKERT_VI",SWIG_FromCharPtr("Eckert_VI"));
13747 4 : SWIG_Python_SetConstant(d, "SRS_PT_EQUIDISTANT_CONIC",SWIG_FromCharPtr("Equidistant_Conic"));
13748 4 : SWIG_Python_SetConstant(d, "SRS_PT_EQUIRECTANGULAR",SWIG_FromCharPtr("Equirectangular"));
13749 4 : SWIG_Python_SetConstant(d, "SRS_PT_GALL_STEREOGRAPHIC",SWIG_FromCharPtr("Gall_Stereographic"));
13750 4 : SWIG_Python_SetConstant(d, "SRS_PT_GAUSSSCHREIBERTMERCATOR",SWIG_FromCharPtr("Gauss_Schreiber_Transverse_Mercator"));
13751 4 : SWIG_Python_SetConstant(d, "SRS_PT_GEOSTATIONARY_SATELLITE",SWIG_FromCharPtr("Geostationary_Satellite"));
13752 4 : SWIG_Python_SetConstant(d, "SRS_PT_GOODE_HOMOLOSINE",SWIG_FromCharPtr("Goode_Homolosine"));
13753 4 : SWIG_Python_SetConstant(d, "SRS_PT_IGH",SWIG_FromCharPtr("Interrupted_Goode_Homolosine"));
13754 4 : SWIG_Python_SetConstant(d, "SRS_PT_GNOMONIC",SWIG_FromCharPtr("Gnomonic"));
13755 4 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR",SWIG_FromCharPtr("Hotine_Oblique_Mercator"));
13756 4 : SWIG_Python_SetConstant(d, "SRS_PT_HOTINE_OBLIQUE_MERCATOR_TWO_POINT_NATURAL_ORIGIN",SWIG_FromCharPtr("Hotine_Oblique_Mercator_Two_Point_Natural_Origin"));
13757 4 : SWIG_Python_SetConstant(d, "SRS_PT_LABORDE_OBLIQUE_MERCATOR",SWIG_FromCharPtr("Laborde_Oblique_Mercator"));
13758 4 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_1SP",SWIG_FromCharPtr("Lambert_Conformal_Conic_1SP"));
13759 4 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP",SWIG_FromCharPtr("Lambert_Conformal_Conic_2SP"));
13760 4 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_CONFORMAL_CONIC_2SP_BELGIUM",SWIG_FromCharPtr("Lambert_Conformal_Conic_2SP_Belgium"));
13761 4 : SWIG_Python_SetConstant(d, "SRS_PT_LAMBERT_AZIMUTHAL_EQUAL_AREA",SWIG_FromCharPtr("Lambert_Azimuthal_Equal_Area"));
13762 4 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_1SP",SWIG_FromCharPtr("Mercator_1SP"));
13763 4 : SWIG_Python_SetConstant(d, "SRS_PT_MERCATOR_2SP",SWIG_FromCharPtr("Mercator_2SP"));
13764 4 : SWIG_Python_SetConstant(d, "SRS_PT_MILLER_CYLINDRICAL",SWIG_FromCharPtr("Miller_Cylindrical"));
13765 4 : SWIG_Python_SetConstant(d, "SRS_PT_MOLLWEIDE",SWIG_FromCharPtr("Mollweide"));
13766 4 : SWIG_Python_SetConstant(d, "SRS_PT_NEW_ZEALAND_MAP_GRID",SWIG_FromCharPtr("New_Zealand_Map_Grid"));
13767 4 : SWIG_Python_SetConstant(d, "SRS_PT_OBLIQUE_STEREOGRAPHIC",SWIG_FromCharPtr("Oblique_Stereographic"));
13768 4 : SWIG_Python_SetConstant(d, "SRS_PT_ORTHOGRAPHIC",SWIG_FromCharPtr("Orthographic"));
13769 4 : SWIG_Python_SetConstant(d, "SRS_PT_POLAR_STEREOGRAPHIC",SWIG_FromCharPtr("Polar_Stereographic"));
13770 4 : SWIG_Python_SetConstant(d, "SRS_PT_POLYCONIC",SWIG_FromCharPtr("Polyconic"));
13771 4 : SWIG_Python_SetConstant(d, "SRS_PT_ROBINSON",SWIG_FromCharPtr("Robinson"));
13772 4 : SWIG_Python_SetConstant(d, "SRS_PT_SINUSOIDAL",SWIG_FromCharPtr("Sinusoidal"));
13773 4 : SWIG_Python_SetConstant(d, "SRS_PT_STEREOGRAPHIC",SWIG_FromCharPtr("Stereographic"));
13774 4 : SWIG_Python_SetConstant(d, "SRS_PT_SWISS_OBLIQUE_CYLINDRICAL",SWIG_FromCharPtr("Swiss_Oblique_Cylindrical"));
13775 4 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR",SWIG_FromCharPtr("Transverse_Mercator"));
13776 4 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_SOUTH_ORIENTED",SWIG_FromCharPtr("Transverse_Mercator_South_Orientated"));
13777 4 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_21",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_21"));
13778 4 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_22",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_22"));
13779 4 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_23",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_23"));
13780 4 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_24",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_24"));
13781 4 : SWIG_Python_SetConstant(d, "SRS_PT_TRANSVERSE_MERCATOR_MI_25",SWIG_FromCharPtr("Transverse_Mercator_MapInfo_25"));
13782 4 : SWIG_Python_SetConstant(d, "SRS_PT_TUNISIA_MINING_GRID",SWIG_FromCharPtr("Tunisia_Mining_Grid"));
13783 4 : SWIG_Python_SetConstant(d, "SRS_PT_TWO_POINT_EQUIDISTANT",SWIG_FromCharPtr("Two_Point_Equidistant"));
13784 4 : SWIG_Python_SetConstant(d, "SRS_PT_VANDERGRINTEN",SWIG_FromCharPtr("VanDerGrinten"));
13785 4 : SWIG_Python_SetConstant(d, "SRS_PT_KROVAK",SWIG_FromCharPtr("Krovak"));
13786 4 : SWIG_Python_SetConstant(d, "SRS_PT_IMW_POLYCONIC",SWIG_FromCharPtr("International_Map_of_the_World_Polyconic"));
13787 4 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_I",SWIG_FromCharPtr("Wagner_I"));
13788 4 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_II",SWIG_FromCharPtr("Wagner_II"));
13789 4 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_III",SWIG_FromCharPtr("Wagner_III"));
13790 4 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_IV",SWIG_FromCharPtr("Wagner_IV"));
13791 4 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_V",SWIG_FromCharPtr("Wagner_V"));
13792 4 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_VI",SWIG_FromCharPtr("Wagner_VI"));
13793 4 : SWIG_Python_SetConstant(d, "SRS_PT_WAGNER_VII",SWIG_FromCharPtr("Wagner_VII"));
13794 4 : SWIG_Python_SetConstant(d, "SRS_PP_CENTRAL_MERIDIAN",SWIG_FromCharPtr("central_meridian"));
13795 4 : SWIG_Python_SetConstant(d, "SRS_PP_SCALE_FACTOR",SWIG_FromCharPtr("scale_factor"));
13796 4 : SWIG_Python_SetConstant(d, "SRS_PP_STANDARD_PARALLEL_1",SWIG_FromCharPtr("standard_parallel_1"));
13797 4 : SWIG_Python_SetConstant(d, "SRS_PP_STANDARD_PARALLEL_2",SWIG_FromCharPtr("standard_parallel_2"));
13798 4 : SWIG_Python_SetConstant(d, "SRS_PP_PSEUDO_STD_PARALLEL_1",SWIG_FromCharPtr("pseudo_standard_parallel_1"));
13799 4 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_CENTER",SWIG_FromCharPtr("longitude_of_center"));
13800 4 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_CENTER",SWIG_FromCharPtr("latitude_of_center"));
13801 4 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_ORIGIN",SWIG_FromCharPtr("longitude_of_origin"));
13802 4 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_ORIGIN",SWIG_FromCharPtr("latitude_of_origin"));
13803 4 : SWIG_Python_SetConstant(d, "SRS_PP_FALSE_EASTING",SWIG_FromCharPtr("false_easting"));
13804 4 : SWIG_Python_SetConstant(d, "SRS_PP_FALSE_NORTHING",SWIG_FromCharPtr("false_northing"));
13805 4 : SWIG_Python_SetConstant(d, "SRS_PP_AZIMUTH",SWIG_FromCharPtr("azimuth"));
13806 4 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_1",SWIG_FromCharPtr("longitude_of_point_1"));
13807 4 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_1",SWIG_FromCharPtr("latitude_of_point_1"));
13808 4 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_2",SWIG_FromCharPtr("longitude_of_point_2"));
13809 4 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_2",SWIG_FromCharPtr("latitude_of_point_2"));
13810 4 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_POINT_3",SWIG_FromCharPtr("longitude_of_point_3"));
13811 4 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_POINT_3",SWIG_FromCharPtr("latitude_of_point_3"));
13812 4 : SWIG_Python_SetConstant(d, "SRS_PP_RECTIFIED_GRID_ANGLE",SWIG_FromCharPtr("rectified_grid_angle"));
13813 4 : SWIG_Python_SetConstant(d, "SRS_PP_LANDSAT_NUMBER",SWIG_FromCharPtr("landsat_number"));
13814 4 : SWIG_Python_SetConstant(d, "SRS_PP_PATH_NUMBER",SWIG_FromCharPtr("path_number"));
13815 4 : SWIG_Python_SetConstant(d, "SRS_PP_PERSPECTIVE_POINT_HEIGHT",SWIG_FromCharPtr("perspective_point_height"));
13816 4 : SWIG_Python_SetConstant(d, "SRS_PP_SATELLITE_HEIGHT",SWIG_FromCharPtr("satellite_height"));
13817 4 : SWIG_Python_SetConstant(d, "SRS_PP_FIPSZONE",SWIG_FromCharPtr("fipszone"));
13818 4 : SWIG_Python_SetConstant(d, "SRS_PP_ZONE",SWIG_FromCharPtr("zone"));
13819 4 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_1ST_POINT",SWIG_FromCharPtr("Latitude_Of_1st_Point"));
13820 4 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_1ST_POINT",SWIG_FromCharPtr("Longitude_Of_1st_Point"));
13821 4 : SWIG_Python_SetConstant(d, "SRS_PP_LATITUDE_OF_2ND_POINT",SWIG_FromCharPtr("Latitude_Of_2nd_Point"));
13822 4 : SWIG_Python_SetConstant(d, "SRS_PP_LONGITUDE_OF_2ND_POINT",SWIG_FromCharPtr("Longitude_Of_2nd_Point"));
13823 4 : SWIG_Python_SetConstant(d, "SRS_UL_METER",SWIG_FromCharPtr("Meter"));
13824 4 : SWIG_Python_SetConstant(d, "SRS_UL_FOOT",SWIG_FromCharPtr("Foot (International)"));
13825 4 : SWIG_Python_SetConstant(d, "SRS_UL_FOOT_CONV",SWIG_FromCharPtr("0.3048"));
13826 4 : SWIG_Python_SetConstant(d, "SRS_UL_US_FOOT",SWIG_FromCharPtr("Foot_US"));
13827 4 : SWIG_Python_SetConstant(d, "SRS_UL_US_FOOT_CONV",SWIG_FromCharPtr("0.3048006096012192"));
13828 4 : SWIG_Python_SetConstant(d, "SRS_UL_NAUTICAL_MILE",SWIG_FromCharPtr("Nautical Mile"));
13829 4 : SWIG_Python_SetConstant(d, "SRS_UL_NAUTICAL_MILE_CONV",SWIG_FromCharPtr("1852.0"));
13830 4 : SWIG_Python_SetConstant(d, "SRS_UL_LINK",SWIG_FromCharPtr("Link"));
13831 4 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_CONV",SWIG_FromCharPtr("0.20116684023368047"));
13832 4 : SWIG_Python_SetConstant(d, "SRS_UL_CHAIN",SWIG_FromCharPtr("Chain"));
13833 4 : SWIG_Python_SetConstant(d, "SRS_UL_CHAIN_CONV",SWIG_FromCharPtr("20.116684023368047"));
13834 4 : SWIG_Python_SetConstant(d, "SRS_UL_ROD",SWIG_FromCharPtr("Rod"));
13835 4 : SWIG_Python_SetConstant(d, "SRS_UL_ROD_CONV",SWIG_FromCharPtr("5.02921005842012"));
13836 4 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_Clarke",SWIG_FromCharPtr("Link_Clarke"));
13837 4 : SWIG_Python_SetConstant(d, "SRS_UL_LINK_Clarke_CONV",SWIG_FromCharPtr("0.2011661949"));
13838 4 : SWIG_Python_SetConstant(d, "SRS_UA_DEGREE",SWIG_FromCharPtr("degree"));
13839 4 : SWIG_Python_SetConstant(d, "SRS_UA_DEGREE_CONV",SWIG_FromCharPtr("0.0174532925199433"));
13840 4 : SWIG_Python_SetConstant(d, "SRS_UA_RADIAN",SWIG_FromCharPtr("radian"));
13841 4 : SWIG_Python_SetConstant(d, "SRS_PM_GREENWICH",SWIG_FromCharPtr("Greenwich"));
13842 4 : SWIG_Python_SetConstant(d, "SRS_DN_NAD27",SWIG_FromCharPtr("North_American_Datum_1927"));
13843 4 : SWIG_Python_SetConstant(d, "SRS_DN_NAD83",SWIG_FromCharPtr("North_American_Datum_1983"));
13844 4 : SWIG_Python_SetConstant(d, "SRS_DN_WGS72",SWIG_FromCharPtr("WGS_1972"));
13845 4 : SWIG_Python_SetConstant(d, "SRS_DN_WGS84",SWIG_FromCharPtr("WGS_1984"));
13846 4 : SWIG_Python_SetConstant(d, "SRS_WGS84_SEMIMAJOR",SWIG_From_double(static_cast< double >(6378137.0)));
13847 4 : SWIG_Python_SetConstant(d, "SRS_WGS84_INVFLATTENING",SWIG_From_double(static_cast< double >(298.257223563)));
13848 : #if PY_VERSION_HEX >= 0x03000000
13849 : return m;
13850 : #else
13851 : return;
13852 : #endif
13853 8 : }
13854 :
|